Notifications
Clear all

[Closed] object referancing

here is another one i’m stuggling to get. referanceing a node is simple in a scene by using its name either by string or by the obejct in an array. the problem i have hit is i have a script on a charater that allignes to objects together “pritty simple except if an animator clones the rigg or imports and renames the objects then script wont work because.

obj.transform = obj2.tranform not the same any longer infact obvious thing is that it will align the other rigg elements if you have the 2 riggs in the scene.

is there a way of referancing an object by Id so that if a name change ocurs things wont break and can you add somthing that will change the object array of the aligning objects to the new cloned object arrays? what is a good method here.

cheers

john

2 Replies

-- get a node's handle (an integer value)
_handle = $.inode.handle

-- get the node for a given handle
_node = maxops.getNodeByHandle _handle

See also:
http://forums.cgsociety.org/showthread.php?f=98&t=608572

thanks man,
i never came across that one.

cheers

john