I took a look at animation presets but it seems like overkill to use menu commands to save and load them, after all that gets into file I/O.
Pseudocode for what I'd like to get working would be like this:
Locate "TemplateComp"
Find "FXLayer"
Copy any effects from FXLayer into an array
Copy properties and keys into a subarray
Apply all effects in the array to all selected layers in a different comp
Apply properties and keys to new effects on each layer.
Adjust properties of the effects to be relevant to the target layers (for example, perhaps a Bulge Center property)
I have all of this up and running except for how to copy these pesky effects. There seems to be something fundamental I don't understand about how to address properties.
This code works:
Code: Select all
var growEffect = FXLayer.effect(1);
Code: Select all
for ( var i = 0 ; i < FXLayer.Effects.length; i++ )
{
myEffect = FXLayer.Effects;
myEffectArray[myAffectArray.length] = myEffect;
}