ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

After Effects Script with Light Attributes

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrew DickinsonAfter Effects Script with Light Attributes
by on Mar 11, 2010 at 2:26:08 am

Hi, I'm currently writing a script that recursively searches through the attributes of all layers in a comp, and determines if they have keyframes within a certain range.

Everything's going smoothly, until I tested it on a comp that a co-worker had made. It had a light layer that was at one point a spot, and keyframed, and then changed to a parallel light.

As you may notice in After Effects for light layers, some/all transform properties that are accessible to spot lights are hidden for parallel, point, and ambient lights in After Effect's composition window when you change it. However, in the script, the code is still able to access these properties as attributes (as if they were there!), and when it tries to attempt to select the keyframes, I get the error:

"After Effects Error: Can not "set selected at key" with this property, because the property or a parent property is hidden."

Basically in sudo, the code runs:

if Property isTimeVarying:
   Deselect All Keyframes of Property
   for all keyframes:
      If it is in range:
         Property setSelectedAtKey to true

So, for instance, for a parallel light, when I try to select the (hidden) orientation keyframe, I get the error.

Does anyone know how to check if these properties that are hidden through scripting?

I've tried checking the attributes:


(all of which are the same for the properties if it's hidden or not)

as well as:


(all of which are undefined)

Return to posts index

Joey ForemanRe: After Effects Script with Light Attributes
by on Mar 11, 2010 at 5:51:38 pm

The code monkeys (cows?) tend to hang out more in the Expressions Forum. Give them a holler.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved