|
Hello Area People :)
I tried to realize a script where I can output the current node “position” inside the outliner/hierarchy.
For example I have the following Objects inside the Outliner:
persp
top
front
side
pCube1
-pCube2 (parent is pCube1)
When i select Node pCube2 and I run the script it should show a Number which indicates the position.
Something like: 4|0
pCube1 is the 4th object (beginning with 0) and pCube2 is the first object (0).
My main problem is, I dont know how I can get information about the hierarchy of an object.
I have here a simple script that returns the type of the selected node.
//make a list of the shapes in the first selected object
string $list[] = `listRelatives -s $sel[0]`;
print("Connected shape is “ + $list[0])
//Find its type
nodeType $list[0];
Which commands could I use to get outliner/hierarchy informations of a selected object?
Thanks for any inputs!
|