scripting effects properties
Posted: June 8th, 2005, 6:40 am
I am trying to write a script that adds an (external) effect and set certain properties of that effect automatically. In particular I'd like to know exactly which naming conventions exist (if there is at all?) with effects and their parameter values.
I'll split this into 3 parts: Effect naming convention, Effect method naming convention and parameter values conventions:
Effect naming convention
-What should I write in my script to apply a certain effect to that layer?
I see in the pdf scripting guide on p. 179 the following part of a code:
Which naming conventions are there exactly for the effect? Is it just the name which appears on the screen if you select an effect, which you want to add? In my case this would be something like:
I tested this and it works indeed. But will this work for all effects? Is there a standard?
Effect method naming convention
-What should I write in my script to access certain methods from that effect?
(from the pdf scripting guide on p. 179 the following code:)
Again, what naming conventions are there exactly for the specific method (In the code snippet blurriness)? I guess spaces are omitted, and replaced by first character capitalized words except for the first word.
For example for the Fieldskit Deinterlacer, Field Order will be resolved to fieldOrder. In the example:
I tested this (with assigning: var LowerFirst=2), and this works as well
parameter values conventions
For all kinds of parameter values I found:
-Tick Box. This is either true or false.
For example:
-Numerical values. A number.
For example:
-Combo Box. An integer, starting from 1. The integer 1 will represent the topmost item.
For example:
Can someone confirm my observations, and lead me to a source of more information?
I'll split this into 3 parts: Effect naming convention, Effect method naming convention and parameter values conventions:
Effect naming convention
-What should I write in my script to apply a certain effect to that layer?
I see in the pdf scripting guide on p. 179 the following part of a code:
Code: Select all
// Always best to check if it's safe before adding:
if (the_layer("Effects").canAddProperty("Fast Blur")) {
// add a new Fast Blur effect to the effects group of the layer
the_layer("Effects").addProperty("Fast Blur");
Code: Select all
the_layer("Effects").addProperty("FieldsKit Deinterlacer");
Effect method naming convention
-What should I write in my script to access certain methods from that effect?
(from the pdf scripting guide on p. 179 the following code:)
Code: Select all
// set the parameter values
the_layer("Effects")("Fast Blur").blurriness.setValue(10);
For example for the Fieldskit Deinterlacer, Field Order will be resolved to fieldOrder. In the example:
Code: Select all
the_layer("Effects")("FieldsKit Deinterlacer").fieldOrder.setValue(LowerFirst);
parameter values conventions
For all kinds of parameter values I found:
-Tick Box. This is either true or false.
For example:
Code: Select all
the_layer("Effects")("FieldsKit Deinterlacer").viewMotionMask.setValue(true);
For example:
Code: Select all
the_layer("Effects")("FieldsKit Deinterlacer").motionTolerance.setValue(0.80);
For example:
Code: Select all
var UpperFirst=1;
var LowerFirst=2;
the_layer("Effects")("FieldsKit Deinterlacer").fieldOrder.setValue(UpperFirst);