Martoon
03-02-2007, 03:31 PM
First, background and context: I'm relatively new to MaxScript, and using Max 8.
I'm iterating through all of the nodes in the scene and for each node, I need to get its pos/rot/scale relative to its parent. I can use
in coordsys parent thisPos = thisNode.position
But for nodes having controllers without a position subcontroller (IK, etc.), this gives an "Unknown property" error. To avoid this error, instead of <node>.position I can use <node>.transform.position, which always gives a position (regardless of controller type). But <node>.transform.position always gives position in world coordinates, even if I use in coordsys parent.
So my question is; How do I get the pos/rot/scale of a node relative to its parent, regardless of controller type?
I'm iterating through all of the nodes in the scene and for each node, I need to get its pos/rot/scale relative to its parent. I can use
in coordsys parent thisPos = thisNode.position
But for nodes having controllers without a position subcontroller (IK, etc.), this gives an "Unknown property" error. To avoid this error, instead of <node>.position I can use <node>.transform.position, which always gives a position (regardless of controller type). But <node>.transform.position always gives position in world coordinates, even if I use in coordsys parent.
So my question is; How do I get the pos/rot/scale of a node relative to its parent, regardless of controller type?
