Transforming Linked Nodes
 
 
 

When a parent-child link between nodes is created, the user will not want the nodes in the scene to move. To ensure that the nodes won't move, the transform controllers of the nodes need to be modified. This is because the reference coordinate system has changed. The transform controller is working in a coordinate system which is its parent's coordinates system.

When a node is unlinked, its reference coordinate system is the world coordinate system. When a node is linked, its reference coordinates system becomes that of its parent's. So, when nodes are linked the parents change, and 3ds Max must adjust the transformation matrices to counteract the change in reference coordinates system. All the keys created by a keyframe transform controller must be updated to reflect the change. When a developer creates the link, the nodes and keys must be adjusted in a similar fashion. An option to the method INode::AttachChild() that links a node as a child allows this to be done automatically.

The function INode::AttachChild () makes the specified node a child of this node. If keepPos is nonzero, the child is adjusted as needed to keep it from moving. keepPos counters the change in the reference coordinate system.