View Full Version : accessing Maya internals

05 May 2007, 02:27 PM
I want to ask whether it is possible to access a set of nodes from the top hierarchy.
I found out some usefull info at the site (and the thanks goes to Robert, the site is like the water in the desert :)) to traverse over the nodes in the scene. But what I want to know is whether the access is possible form the top.

For example,
Let us have a car model with wheels (nodes) under it and car lights(nodes), each added as seperate dag nodes to the scene. How can I manage to get the car (may be the whole node) as a whole? I mean when adding these maya nodes to the scene, are these nodes added as seperate nodes or added below another node just similar to the scene graph concepts.

the reason behind such a desire is, I want to get the names of the models in my scene form a standalone application, for example to attach a camera on them.

Sorry for such different type question, but I am used to programming wtih scene graph open source libraries like opensceengraph and really hitting rocks while trying to learn the maya programming both mel and api.

If I am not clear, let me know.
Any ideas/opinions/to do firsts are appreciated.



Robert Bateman
05 May 2007, 02:56 PM
MItDag traverses the scene graph nodes hierarchically....
MitDependencyNodes just traverses every node (including materials etc) in a flat list.

05 May 2007, 03:01 AM
This will list all of the dag objects under the node you're referring to.

$objectName = "nameOfTheObjectYouWantTheChildrenOf";
string $list[] = `ls -dag $objectName`;

CGTalk Moderation
05 May 2007, 03:01 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.