Not sure I understand. but you could build up the matrix with 
MTransformationMatrix in the API if you really need to:

import maya.api.OpenMaya as om

translate = [0, 0, 0]
rotate = [0, 0, 0]
scale = [1, 1, 1]

trans = om.MTransformationMatrix()
trans.setTranslation(om.MVector(translate), om.MSpace.kObject)
trans.setRotation(om.MEulerRotation(rotate, om.MTransformationMatrix.kXYZ))
trans.setScale(scale, om.MSpace.kObject)
matrix = trans.asMatrix()

But like Roland states if you're just interested in matrices of nodes in 
Maya you can just as easily query them.

from maya import cmds

selection = cmds.ls(sl=1)
node = selection[0]

world_space = cmds.xform(node, query=True, matrix=True, worldSpace=True)
object_space = cmds.xform(node, query=True, matrix=True, objectSpace=True)
print world_space
print object_space

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/b6533652-fb87-4409-a804-d0245b3ff103o%40googlegroups.com.

Reply via email to