oh i know pretty much every part of the api related to animation / rigging.
Im just pointing out that in order to use the API in python you have to follow some strict procedure ( automatic binding with swig)
import maya.OpenMaya as OpenMaya
def getMObject(nodeName):
selList = OpenMaya.MSelectionList()
OpenMaya.MGlobal.getSelectionListByName(nodeName, selList)
depNode = OpenMaya.MObject()
selList.getDependNode(0, depNode)
return depNode
nodeFn = OpenMaya.MFnDependencyNode(getMObject('joint1'))
matrixPlug = nodeFn.findPlug('rotatePivot')
for childIndex in range(matrixPlug.numChildren()):
print matrixPlug.child(childIndex).asFloat()
Hence me getting a plug from dependency Mfn function set and not fiddling with the MSelectionList ( which conceptually is for dag/dependency and components).
Most of the time when working with python programmer, or other artist i have to point out that the api is exposed and use some python syntax but you must adopt maya philosophy ( so asking for more pythonic doesnt make sense : at some point
you will write it in c++ and your python code will be a waste of time to translate back to pure API)