select all animated nodes


#1

Could anyone teach me using a mel or python to select all animated nodes?
Because in animation phase,animators always need to offset the timing of all keys.
However, when we finished the animation. The result of all keys are complicated.
I always forgot what nodes had been keyed.

My new project need to select all animated nodes(include character ctrls,constrain,visibility,particle…etc)
to create a clip, then the clip can be regarded as a “animation library”(or"anim bundle")
and animators will reference them into shots maya files.

I found a mel to select all animcurve very quickly:
select -r ls -typ animCurve;
but I can’t use the selected animCurve to transfer to all animated nodes.

Please give a hand!

Thanks!


#2
import pymel.core as pm
 pm.select([x.listConnections() for x in pm.ls(typ='animCurve')])
  
         this will select all nodes with an incoming animCurve connection

#3

Hi pollos:

Thank you for your help.
I test your python immediately when I got your reply.
but I got this result:

Error: unexpected indent

Have any idea?
Please help me to solve this problem.

Dragon


#4

Please, post scripting related questions in the appropriate subforum (programming).
Moving it for you.

As for the error, it’s exactly what it says it is, the indentation on the second line shouldn’t be there.


#5
import pymel.core as pm
pm.select([x.listConnections() for x in pm.ls(typ='animCurve')])

sorry, this one should work. :thumbsup:


#6

Hi ThE_JacO:

Sorry for my mistake.
Afterwards,I’ll be careful to post the questions in the appropriate subforum.

Thank you for helping me to move my post.

Dragon


#7

Hi pollos:

Thank you for your help.
It works now,but I got a strange result.
First of all, I execute the mel

select -r ls -typ animCurve;

to get all animCurve in this maya file.
Then I executed the python you gave to me.
All the nodes in outliner have been selected.
I only want to select the character ctrls,constrain,visibility,particle…etc
They are the nodes I keyed them on purpose for animation.

I’m wondering if I do something wrong or maybe it is maya version problem?(I use Maya2015)
Could you test the same procedure as me in Maya2015?

Just take your time.

Thank you!

Dragon