Created
November 21, 2015 18:17
-
-
Save tb-animator/c599e9fb5f4c09098c6d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pymel.core as pm | |
| def select_keyed_objs(): | |
| # empty list for our keyed objects to go in | |
| keyed_objects = [] | |
| # loop over all objects in the scene (transform as mask to ignore animcurves etc) | |
| for obj in pm.ls(type='transform'): | |
| # check the keyframe count on the object | |
| if pm.keyframe(obj, query=True, keyframeCount=True): | |
| # if it's keyed, append it to our list | |
| keyed_objects.append(obj) | |
| return keyed_objects | |
| # usage | |
| ''' | |
| import pymel.core as pm | |
| pm.select(select_keyed_objs(), replace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment