I can't seem to find a way to query all the attributes objects in animLayers using pymel in Maya. All avenues I've explored only output attributes or the layer names. I'm not very new to pymel but this is stumping me. I'm expecting to find the namespace + object name + attribute name. For example, sph:sphere01.translateX .
Any help would be appreciated!
For animation layer "AnimLayer1" you may get the attributes using maya.cmds:
import maya.cmds as cmds
print(cmds.animLayer("AnimLayer1", query=True, attribute=True))
[u'some_namespace:some_object.visibility', u'some_namespace:some_object.translateX', u'some_namespace:some_object.translateY', u'some_namespace:some_object.translateZ', u'some_namespace:some_object.rotateX', u'some_namespace:some_object.rotateY', u'some_namespace:some_object.rotateZ', u'some_namespace:some_object.scaleX', u'some_namespace:some_object.scaleY', u'some_namespace:some_object.scaleZ']
or with PyMel:
import pymel.core as pm
print(pm.animLayer("AnimLayer1", query=True, attribute=True))
[Attribute(u'some_namespace:some_object.visibility'), Attribute(u'some_namespace:some_object.translateX'), Attribute(u'some_namespace:some_object.translateY'), Attribute(u'some_namespace:some_object.translateZ'), Attribute(u'some_namespace:some_object.rotateX'), Attribute(u'some_namespace:some_object.rotateY'), Attribute(u'some_namespace:some_object.rotateZ'), Attribute(u'some_namespace:some_object.scaleX'), Attribute(u'some_namespace:some_object.scaleY'), Attribute(u'some_namespace:some_object.scaleZ')]