I'm working with OpenMaya and I need to get the Euler rotation from a matrix but i'm getting an error while I launch this simple code:
code:
import maya.OpenMaya as OpenMaya
import maya.cmds as mc
crcl=mc.circle()
matrx=(OpenMaya.MMatrix(mc.xform(crcl,q=1,m=1)))
tMat = OpenMaya.MTransformationMatrix(matrx)
eulerRotation = tMat.rotation(asQuaternion=False)
error
Error: in method 'new_MMatrix', argument 1 of type 'float const [4][4]'
the problem is the OpenMaya.MTransformationMatrix(matrx)
, looks like is not accepting my matrix.
Any help?
MTransformationMatrix documentation
I'm sure is a simple fix that I'm missing