looking for all keyframes

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
zold
Posts: 14
Joined: March 25th, 2011, 9:15 am
Contact:

Here's something I'm surprised I've never seen or asked:

Is there a good (meaning foolproof and efficient) trick for knowing what properties on a given layer have keyframes? Let's say you have no idea what properties are keyframed -- it could be one property or a hundred properties, Adobe or third-party, and you need a script to be able to know what has keyframes (then do stuff with that data). This is for a script that has other things to do, not a UI 'just hit the u button' solution.

I must be missing something.

[update: as far as I can tell, it's just a matter of traversing through the layer's properties (and properties of properties), looking for numKeys ... ]
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

>... it's just a matter of traversing through the layer's properties (and properties of properties), looking for numKeys ...

That's pretty much it. Keep in mind that you won't be able to access the data for any property that has "custom" data.

Dan
zold
Posts: 14
Joined: March 25th, 2011, 9:15 am
Contact:

Dan Ebberts wrote:That's pretty much it. Keep in mind that you won't be able to access the data for any property that has "custom" data.
Thanks for the tip, Dan. Could you give a quick example of this? I don't think it is going to be an issue with what I'm working on, but I don't want to miss any potential SNAFUs.
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Any plugin can define custom data. The one that comes to mind is the Histogram parameter of the Levels effects. Any data of that type will have a propertyValueType of PropertyValueType.CUSTOM_VALUE.

Dan
zold
Posts: 14
Joined: March 25th, 2011, 9:15 am
Contact:

Right. Gotcha. Thanks a ton.
Post Reply