Skip to main content
Inspiring
May 13, 2023
Question

How to select all properties of a layer where there are temporary keys?

  • May 13, 2023
  • 1 reply
  • 704 views

 Hi all.

There is such attribute app.project.item(index).propertyGroupSpec.numProperties .  

How to go through the branches of this array and get all the properties of the lower level 

where there are temporary keys for changing the current property, 

to get the string trace content: 

s

property number.sub-property number. key( time, value)

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
May 13, 2023

I think there is no efficient way to filter properties to obtain only keyframed ones. You have to go for the slow approach to iterate over all properties and check numKeys for all of them to see if they are keyframed.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
AnyONAuthor
Inspiring
May 13, 2023

what does the slow approach mean? Is there a straight forward way do this trick using match names for each type of layer in the composition and for each property. but for this you need to create arrays of existing match names. is there really no way to avoid creating such arrays

Mathias Moehl
Community Expert
Community Expert
May 15, 2023

You can loop over all children of a property group like this:

 for (var i = 1; i <= propertyGoup.numProperties; i++) {
        // do something with propertyGoup(i) here
    }

 

Do it recursively to decent to all leaves of the tree.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects