#1
|
|||
|
|||
Iterate through node3d children
Is there any way to obtain the list of childs from a node3d object?
I have been trying to use list = <node3d>.getChildren() to obtain such a list, as I need to attribute a value to each i in list. On your documentation it clearly says that: "NOTE: This command does NOT return a list of the underlying scene graph nodes and does NOT create new Vizard node3d objects. It will only return existing node3d objects" ... but it never mentions how to actually do these things. ideas? |
#2
|
|||
|
|||
The command <node3D>.getChildren() will return the list of children for an object that you have defined in the Vizard script. It will not return the list of sub-objects for that object as defined in the modeling software.
If you want to get a list with all sub-objects you could first get all the sub-object names and then use <node3D>getChild() to get the handles to the sub-objects passing in their names. This prints out all sub-object names: Code:
model = viz.add('gallery.ive') for name in model.getNodeNames(): print name |
#3
|
|||
|
|||
Thank you, this solved my problem. And this is my new code:
for name in world.getNodeNames(): abc = world.getChild(str(name)) abc.appearance(viz.DECAL) |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
node3d: vertices, faces | jdoerr | Vizard | 3 | 09-02-2010 08:32 AM |
How to move a text object and its children text objects as a whole | knightgba | Vizard | 2 | 08-24-2010 11:21 AM |
passing node3d to c++ | jdoerr | Plug-in development | 1 | 04-23-2009 04:16 PM |
how to enable node and all children | michaelrepucci | Vizard | 2 | 08-01-2008 12:47 PM |
Inheritence with node3d | dan12345 | Vizard | 1 | 05-23-2008 07:14 PM |