ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

AE Scripting: Copying entire AE Property parades between layers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Peter Srinivasan
AE Scripting: Copying entire AE Property parades between layers
on Jan 25, 2017 at 8:32:02 am

I've been getting into AE scripting recently and ran into a point of confusion. I've read through basically every piece of documentation I could get my hands on, and looked at several examples, but couldn't find an answer more elegant than the one I settled on.

Basically I want to copy all the contents of my_source_layer.Effects to my_target_layer.Effects. Same with Masks. Current solution is stupid (pseudocode follows):

foreach my_source_layer.Effects
my_target_layer.addProperty(Effect.name)
foreach Effect.property
my_target_layer.property = Effect.property.

Basically, it looks at the effect in source, adds a new effect to target with the same type, then adjusts EVERY property of the effect to match.

I'm looking for a more elegant solution, like

my_target_layer.Effects = my_source_layer.Effects;

Essentially assigning the entire effects (or Mask) parade from the source to the target. Obviously, properties are largely unassignable but I feel like there's an obvious way that's similar to the above that I'm missing, and processing hundreds of layers, each with 4 - 5 effects takes time and makes the script itself kinda unwieldy. Thoughts?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]