I really do not know if that is the best way but this works.
import maya.cmds as cmds
def select_animated():
animated = []
xforms = cmds.ls(tr=True)
for xf in xforms:
if cmds.keyframe(xf, q=True):
animated.append(xf)
cmds.select(animated, r=True)
select_animated()
Run this in a python tab in the script editor . Cheers.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/bfcd79e0-f383-48d5-b3ee-58acdfa9084en%40googlegroups.com.