![]() |
|
#7
|
|||
|
|||
Hi,
what is the best way to get the same state after importing a scene? I made an example similar to "Tutorial: Hierarchical Models". In the first run the level is exported, after that the EXPORT should be changed to False. The print output differs although I import the same level I just exported. Additionally I'm not sure how to get a child Node. I want to access one of the Nodes that are mentioned in the "print scene.getNodeNames()" in the line that is commented out, but don't know how. Code:
import viz viz.clearcolor(viz.SKYBLUE) viz.MainView.setPosition([0,1.8,-10]) EXPORT = True if(EXPORT): scene = viz.addGroup() viz.addChild('ground_grass.osgb', parent = scene) carousel = viz.addChild('carousel.wrl', parent = scene) pole1 = viz.addChild('pole.wrl',parent=carousel) pole1.setPosition([2.5,0,0]) horse1 = viz.addChild('horse.wrl',parent=pole1) print scene.getNodeNames() print scene.getChildren() #print scene.getChild('???') scene.save('example.osgb') else: scene = viz.add('example.osgb') print scene.getNodeNames() print scene.getChildren() viz.go() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Vizard 4 Beta Testing | farshizzo | Announcements | 0 | 02-01-2011 10:46 AM |
Vizard 4 Beta Testing | farshizzo | Vizard | 0 | 02-01-2011 10:46 AM |
Vizard tech tip: Using the Python Imaging Library (PIL) | Jeff | Vizard | 0 | 03-23-2009 11:13 AM |
problem with exporting avatars and using them in Vizard | VDong | Vizard | 2 | 02-23-2009 01:25 AM |
Exporting from Maya to Vizard | jfreeman | Vizard | 2 | 06-30-2005 02:14 PM |