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.
O luns, 24 de ago. de 2020 ás 14:45, Kamran Khan (<[email protected]>)
escribiu:
> Hello,
>
> How could I select all animated objects in my scene including cameras,
> nurbs curves, mesh etc in one click ?
>
> Thank you
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/bfcd79e0-f383-48d5-b3ee-58acdfa9084en%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/bfcd79e0-f383-48d5-b3ee-58acdfa9084en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAAXmhVuXVn4J6zGbVuczoxwzGa97RQcWR712cQkGWwynqJ7C6g%40mail.gmail.com.