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:

November 5th, 2011, 9:10 pm

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: 319
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

November 6th, 2011, 12:11 pm

>... 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:

November 6th, 2011, 1:50 pm

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: 319
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

November 6th, 2011, 2:34 pm

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:

November 6th, 2011, 4:32 pm

Right. Gotcha. Thanks a ton.
Post Reply