Get selected property
Moderator: Paul Tuersley
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
Both the CompItem and Layer object have a selectedProperties attribute which returns an array of the selected properties. For example, to access the first selected property on a layer:
If you don't already have it you should download the AE CS6 scripting guide pdf as it covers all this stuff.
An effect doesn't have a selectedProperties attribute but you can loop through the effect's properties to see if property.selected == true, although they'll also be listed in the comp/layer selectedProperties array.
Code: Select all
var theProp = theLayer.selectedProperties[0];
An effect doesn't have a selectedProperties attribute but you can loop through the effect's properties to see if property.selected == true, although they'll also be listed in the comp/layer selectedProperties array.