Using Help | Contents | Index Back - Adobe AFTER EFFECTS 5.5 Help Manual

Table of Contents

Advertisement

Adobe After Effects Help
Using Help
|
Contents
To specify effect properties, use either the pop_property function or the effect_value
function. The pop_property function obtains the value of the property currently selected
in the specified Property menu. After you select a layer and load a script into Motion Math,
both Property menus list all properties for all effects in the selected layer. For more infor-
mation on using the pop_property function, see "Using the Layer, Property, and Channel
menus (PB only)" on page 328.
The effect_value function obtains a value for an effect property or creates a keyframe for
an effect property, depending on which side of an assignment it is used. The effect_value
function uses the following format:
effect_value (layer, effect index, property index)
The effect index and the property index are numbers that specify a property in the Effect
Controls window. The effect_index starts numbering at 0, and the property index starts
numbering at 1. To specify a property in the Effect Controls window, use the effect index
and the property index together to identify the order of the property in the window. In the
following example, the Effect Controls window shows three effects for the layer Solid1.
To specify the Blurriness property for the Fast Blur effect, for example, specify the
following values in the effect_value function:
effect_value (Solid1, 1, 0)
Starting at the top of the Effect Controls window, the Fast Blur effect is the second effect
listed, and Blurriness is the first (and only) property. Note that because effect_index starts
numbering at 0, the second effect is identified by 1.
When the effect_value function is used on the right side of an assignment, it obtains the
value from the specified property. You can obtain values only from properties with
numerical values.
When the effect_value function is used on the left side of an assignment, it creates a
keyframe for the specified property. You can assign values only to numerical properties,
such as point controls, angles, and properties controlled by slider bars in the Effect
Controls window.
When you specify a property by indexing, all properties are counted, regardless of their
value types or controls.
Testing a script (PB only)
To view any syntax errors while testing and modifying your scripts, use the Errors notifi-
cation area in the Motion Math window. To display the current value of any variable or
expression in the Errors area, use the print () function, using the following format:
P = print (a)
The variable a can be any variable or expression. To display the value, assign the value
obtained by the function to a second variable (p, in the example). You can use any letter
(except x or y) as this second variable.
In the following example, the vector for the Position property for layer1 is displayed:
P = print (value (layer1, position))
The print () function stops the script at the point where you place it.
Using Help
|
Contents
|
Index
|
Index
Using Motion Math (PB only)
Back
326
Back
326

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents