View Single Post
  #2  
Old 12-15-2006, 09:20 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
OK. At some point before collidemesh is called the objects will have to be seperated from eachother and made children of viz.WORLD. When you call viz.add () models are automaticly children of viz.WORLD. If you want to add all of the models at once you will need to get each object by the name it is assgined in the modeling program with the <VizNode>.getChild() method. This would be easier if they were given a nice namming convention in the modeling program so you could do this in a loop instead of hundrds of lines of code.

You could also export each object from the modeling program, hopefuly with some nice namming convention, and call viz.add() 300 times.

Code:
for i in range(NUMBER_OF_OBJECTS):
	object = viz.add('object' + str(i) + '.wrl')
	object.collideMesh()
__________________
Paul Elliott
WorldViz LLC
Reply With Quote