Reputation: 49
I've been looking around in the PyMel docs but can't I get the inverse of a matrix from pymel.core.datatypes. My code is:
inverseM = orientationM*bindRotationM;
inverseM = inverseM.asMatrixInverse()
I just get the error: Error: line 1: AttributeError: file S:\Maya_2017_DI\build\Release\runTime\Python\Lib\site-packages\maya\OpenMaya.py line 54: asMatrixInverse #
Upvotes: 1
Views: 679
Reputation: 12218
if inverseM
is already a pymel matrix, you want inverseM.inverse()
. The doc is here. Actually its the same thing for an OpenMaya MMatrix too
Upvotes: 1