WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 09-16-2010, 08:23 AM
migoloco migoloco is offline
Join Date: Sep 2010
Posts: 5
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.

Reply With Quote
Old 09-16-2010, 04:37 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
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:
model = viz.add('gallery.ive')

for name in model.getNodeNames():
	print name
Reply With Quote
Old 09-22-2010, 03:43 PM
Renato Lima Renato Lima is offline
Join Date: Sep 2010
Posts: 54
Thank you, this solved my problem. And this is my new code:

for name in world.getNodeNames():
abc = world.getChild(str(name))
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
node3d: vertices, faces jdoerr Vizard 3 09-02-2010 07:32 AM
How to move a text object and its children text objects as a whole knightgba Vizard 2 08-24-2010 10:21 AM
passing node3d to c++ jdoerr Plug-in development 1 04-23-2009 03:16 PM
how to enable node and all children michaelrepucci Vizard 2 08-01-2008 11:47 AM
Inheritence with node3d dan12345 Vizard 1 05-23-2008 06:14 PM

All times are GMT -7. The time now is 02:03 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC