Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

using ActionScript to specify settings in the Hue/Saturation Effect

$
0
0

Hi there,

 

 

I have been trying to write a little action script that sets up a bunch of defaults in the Hue Saturation plug-in but can only get so far.

 

The syntax either falls over or I am missing something here because the same code will work when in After Affects but if I try to run a script from the script UI directory. I get a "property undefined" returned. Uusally you just call the property by name and all is well. In this particularl case though. The only way to access say the "Red channel Saturation" is to have the plug-in in the Red channel pop-up. Ok so it works but not when running an external script.

 

The following does work from within AE but not from the UI scripts directory via the Window menu.

 

currProj = app.project(index).layer(index):

currEffect = currProj.Effects.addProperty("Hue/Saturation");

currEffectProp = currProj.effect("Hue/Saturation");

currEffectProp.masterSaturation.setValue(20);//this call works

currEffectProp.channelControl.setValue(2);//this call works changing the plug-in pane to the Red Channel

 

currEffectProp.redSaturation.setValue(-5); //this returns: "TypeError: undefined is not an object" – yet when run within AE as an expression it works fine???

 

 

Any help would be great – thank you


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>