Matrix attributes being interpreted as MFnTypedAttribute

Hey guys. I’m trying to understand why this happens:

from maya.api import OpenMaya as om2
sel = om2.MGlobal.getActiveSelectionList()
obj = sel.getDependNode(0)
dep = om2.MFnDependencyNode(obj)
plug = dep.findPlug("worldMatrix", False)
print plug.attribute().apiTypeStr

This outputs kTypedAttribute for any attribute that’s either a matrix or an array of matrices. Shouldn’t it be kMatrixAttribute?

It’s a typed attribute whose type happens to be kMatrix

attr = plug.attribute()
ta = om2.MFnTypedAttribute(attr)
print ta.attrType() == om2.MFnData.kMatrix
1 Like

Awesome, thanks @tfox_TD !