Hello!
Need help getting correct matrix values in a custom Maya transform node. I am subclassing Maya’s transform node to compute and output custom translate\rotate values.
if I try to get the node’s matrix values (worldMatrix or parentInverseMatrix) in the compute function of the transform node, those values are not correct. This is how I try to get the data:
def compute(self, plug, data):
handle = data.inputValue(self.parentInverseMatrix)
transformMatrix = OpenMayaMPx.MPxTransformationMatrix(handle.asMatrix())
Using self.baseTransformationMatrix
does return a matrix with expected values. However, how would I go about getting the parentInverseMatrix of the node?
Getting values from other properties such as translate, and rotate does return the values I expect to get.
handle = data.inputValue(self.translate)
vector = handle.asVector()
Thanks in advance for the help!