Page 1 of 1

looking for all keyframes

Posted: November 5th, 2011, 9:10 pm
by zold
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 ... ]

Re: looking for all keyframes

Posted: November 6th, 2011, 12:11 pm
by Dan Ebberts
>... 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

Re: looking for all keyframes

Posted: November 6th, 2011, 1:50 pm
by zold
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.

Re: looking for all keyframes

Posted: November 6th, 2011, 2:34 pm
by Dan Ebberts
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

Re: looking for all keyframes

Posted: November 6th, 2011, 4:32 pm
by zold
Right. Gotcha. Thanks a ton.