transforms between instanced nodes
I am really confused by something in max that looks like a bug.
If you clone a node (say, and Editable_Poly) and create an instance, then their rotation quats would obviously be the same.
When I rotate one of the nodes, then their rotation quats would obviously be different.
Now, if I reset the transform of both nodes using something like "ResetTransform($)", then their rotation quats become the same, yet their apparent orientations within the viewport remain different.
How is this possible? If the orientations of two instances are the same, then shouldn't they be right on top of one another?
I am using the maxscript code bellow to check this:
for i = 1 to selection.count do( print( selection[i].name + ": " + ( selection[i].rotation as string ) ) )
I even tried it again in Python thinking that lower level access would give me the REAL orientation of the two instances:
import MaxPlus def getSelectedNodes( rootNode ): currentSelection = MaxPlus.SelectionManager.GetNodes() for i in range( 0, MaxPlus.INodeTab.GetCount( currentSelection ) ): tempNode = MaxPlus.INodeTab.GetItem( currentSelection, i ) #tempNodeRotation = MaxPlus.INode.GetLocalRotation( tempNode ) tempNodeRotation = MaxPlus.INode.GetWorldRotation( tempNode ) print( MaxPlus.INode.GetName( tempNode ) + ': ' + str(tempNodeRotation) ) if __name__ == '__main__': theNodes = getSelectedNodes( MaxPlus.Core.GetRootNode() )
Clearly, there is something I am missing. How do I get the REAL orientation of two instances regardless on weather or not the user reset their transforms?
Comments
import MaxPlus
ı am trying to import ,MaxPlus but max script is giving me eror...why?
MaxPlus is a library for a
MaxPlus is a library for a Python script. Its not a maxscript. Its Python only.
I wrote it in Python because I thought a low level implementation would give me different transforms between instanced objects... but it didn't.
SOLUTION FOUND
Found this great little doc:
http://help.autodesk.com/view/3DSMAX/2015/ENU/?guid=__files_GUID_3B001F2...
Haven't gotten through all of it, but it looks like its answering my questions.
apparently there's a difference between $.transform and $.objectTransform. :)