I have noticed that when I try “match all transforms” on an object to
something parented to it(a child), it tends to fail quite a bit. It looks
like the rotation gets evaluated first and set, before the position. So the
final position is not the original position where the child was, but where
it became after the object’s rotation is changed to match the child’s.
Also in the past, if an object has any animation keys, match all transforms
would fail to match rotation. This seems to have been addressed in
Softimage 2013, though.
//create some nested nulls and set some transforms
oParent = GetPrim("Null","parent");
oChild = GetPrim("Null","child",oParent);
oChild.posx.value = 2;
oChild.roty.value = 30;
//what i expect "match all transform" should perform
/*
oParent.Kinematics.Global.Transform = oChild.Kinematics.Global.Transform;
*/
//what MatchTransform(oParent,oChild, siSRT) seems to be doing
/*
Rotate(oParent,oChild.Kinematics.Global.Parameters("rotx").value,oChild.Kinematics.Global.Parameters("roty").value,oChild.Kinematics.Global.Parameters("rotz").value);
Translate(oParent,oChild.Kinematics.Global.Parameters("posx").value,oChild.Kinematics.Global.Parameters("posy").value,oChild.Kinematics.Global.Parameters("posz").value);
Scale(oParent,oChild.Kinematics.Global.Parameters("sclx").value,oChild.Kinematics.Global.Parameters("scly").value,oChild.Kinematics.Global.Parameters("sclz").value);
*/