PF_ParamDef¶
After Effects passes effects an array of PF_ParamDefs with each selector, describing the plug-in's parameters at the current time. The values in the params array are only valid during some selectors (this is noted in the selector descriptions).
Param Zero¶
The first parameter, params[0], is the input image (a PF_EffectWorld / PF_LayerDef) to which the effect should be applied.
The Rest Of The Parameters¶
All parameter types are represented by a PF_ParamDef. Unions are used, so that only the pertinent parts of the PF_ParamDef need be (or should be) populated.
PF_ParamDef Members¶
Data Type |
Name |
Description |
---|---|---|
|
|
The ID of this parameter. You can re-order parameters in future versions of your plug-in and not cause users to re-apply your effect, if you maintain the parameter's ID across versions. |
|
|
Set if you've changed a parameter value. Only valid during drag (not click!) events, PF_Cmd_USER_CHANGED_PARAM or PF_Cmd_UPDATE_PARAMS_UI. |
|
Specify a parameter's UI behavior before adding; only |
|
|
|
Width of the parameter's user interface (for non-standard parameters only). |
|
|
Height of the parameter's user interface (for non-standard parameters only). |
|
Type of parameter. |
|
|
|
Name of parameter. Can be changed during event handling. |
|
Specify a parameter's UI behavior before adding; only |
|
|
|
A union of all possible Parameter Types. |
Parameter UI Flags¶
Control a parameter's user interface with these flags.
Don't confuse UI flags with behavior flags; they reside in different fields within your parameter's definition, and will cause unpredictable behavior if misapplied.
Flag |
Description |
---|---|
|
Set this flag if you handle |
|
Set this flag if you handle |
|
Set this flag if you want the standard control only - No data stream will be associated with this parameter, and thus no keyframes will be available in the Timeline panel. |
|
Set this flag if you want no UI to appear in the Effect Controls Window. |
|
Not used in After Effects, but used in Premiere. Set this flag if you'd like a thick line above this parameter in the effect control window. |
|
Disables (grays out) the parameter, usually in response to PF_Cmd_USER_CHANGED_PARAM. |
|
After Effects won't erase parameter's topic. |
|
After Effects won't erase parameter's control. |
|
Not used in After Effects, but used in Premiere. Display parameter as a radio-button group. Only valid for |
|
First supported in Premiere, and now supported in After Effects CS6 and later. This hides the parameter UI in both the Effect Controls and Timeline. |
In addition to these flags, an effect parameter may be hidden or shown by using AEGP_GetDynamicStreamFlags.
Parameter Flags¶
Behavior flags and UI flags describe different qualities of a parameter. Set them before adding the parameter during PF_Cmd_PARAM_SETUP. Flags which may be set during events are noted.
Flag |
Meaning |
---|---|
|
Parameter does not vary with time; no keyframe control will be provided in the Timeline panel. |
|
Values are not algebraically interpolated. |
|
Set this flag during PF_Cmd_USER_CHANGED_PARAM. |
|
Set to receive PF_Cmd_USER_CHANGED_PARAM messages for this parameter. |
|
Controls the twirl-state of a topic spinner. |
|
This only affects the loading of projects saved with an older version of the effect which lacks parameters added later. |
|
Premiere Pro only: Only valid for layer parameters. Indicates that a layer param is used as a track-matte with applied filters. |
|
Only relevant if the effect sets PF_OutFlag2_AUTOMATIC_WIDE_TIME_INPUT and will call PF_AreStatesIdentical or PF_HaveInputsChangedOverTimeSpan |
|
New in CS6. If this parameter is unhidden, then this flag tells After Effects to not twirl open any parents and to not scroll the parameter into view in the Effect Controls panel and the Timeline panel. |
PF_ValueDisplayFlags¶
Within PF_ParamDefUnion, PF_FloatSliderDef and PF_FixedSliderDef both have a member variable, PF_ValueDisplayFlags, which allows them to respond to the user's pixel value display preference (which they set in the info palette). If this is set, the parameter's value will be displayed as 0-1, 0-255, 0-32768, or 0.0 to 1.0, depending on the preference. You can also set the first bit (PF_ValueDisplayFlag_PERCENT) to append a percent sign to the parameter's displayed value.
We know you'd never do anything like this, but if you create a parameter which displays as a percentage, don't confuse the user by allowing any range other than 0 to 100. Please. Percent means 'out of one hundred'.