Wakko
Jan 03, 2012
Post id: 309379 Report Item

I have a bunch of items in a series of comps that need to be slowed down. That is to say, my animations are all 6 seconds long, but they need to be 8, and every motion in the animation has to be slowed to fit that new time.

If I could find a way to select every item that has keyframes simultaneously (model elements, shaders, nodes, and anything else that is animated), then I could open the dope sheet, select all the keyframes at once, and just scale them using the "r" key.

Does anyone know how to select all objects, ONLY that have keyframes?

Dashboard_avatar
Jan 04, 2012
Post id: 309381 Report Item

this script should do it, it'll select every dag object in scene that has keyframes.
open script editor, paste the following code in and execute it.



string $allObjects[]=`ls -dag` ;
select -cl;
for($i=0;$i<`size($allObjects)`;$i++)
    if(`keyframe -q -keyframeCount $allObjects[$i]` != 0)
        select -tgl $allObjects[$i] ; 

Wakko
Jan 04, 2012
Post id: 309385 Report Item

Thank you so much, this teaches me a lot.

  Should this select shaders and nodes that have keyframes as well?

-----------S


Dashboard_avatar
Jan 04, 2012
Post id: 309387 Report Item

omit the -dag

>> If I could find a way to select every item that has keyframes simultaneously

But then why not just select all nodes (select `ls`) it would sitill work the way you want no need to filer anything. Or alternatively just select all keyframe nodes (select `ls -type animCurve`). But then you can ask also like this:

select (listConnections(`ls -type animCurve`))

Which is allmost the same as above, tough not completely realiable whereas:

select (listConnections("-scn",1,"-s",1,`ls -type animCurve`));

would be better still not perfect tough, but fix one problem the original suggestion might have. YMMV

Dashboard_avatar
Jan 04, 2012
Post id: 309388 Report Item

Can't you just use the scene summary in the dope sheet? View > Scene Summary.

Related Marketplace Items

  • Mgtoolsthumbnails