pub type PF_CustomUIInfo = _PF_CustomUIInfo;Expand description
–––––––––– Interaction Callbacks ––––––––––
Effects modules use callbacks to define their parameters. When invoked, they will be given the parameters values at the particular invocation moment, but some effects may need to ask for the parameter values at other times (notably of layer parameters for, say, a visual echo).
While running, effects modules are responsible for checking for user interrupts. This checking can be done with either the abort callback, which will return a value indicating if the user has taken any action, or with the progress callback, which performs user interrupt checking just like the abort callback, and also displays a progress display.
At the bottom of this section are macros for accessing these callback routines. The first parameter to each macro is a pointer to a PF_InData structure, defined below. This pointer will be passed to your effect.
checkout_param The checkout_param callback allows you to inquire param values at times other than the current one, and allows you to access layer params other than the default input layer and the output layer. See the notes on the “params” structure at the end of this file. The PF_ParamDef you must specify cannot point into the “params” array; the memory must exist else- where, such as on the stack.
If you checkout a layer parameter and the layer popup is currently set
to
checkin_param When you have called checkout_param, you must call checkin_param when you are done, so After Effects can clean up after itself and you. This is very important for smooth functioning and also to save memory where possible. Once checked in, the fields in the PF_ParamDef will no longer be valid.
add_param When given the PARAMS_SETUP message, the effect will generally make a series of calls to the add_param routine to define the interface that the After Effects user will see. See the PF_ParamDefs defined above. Currently you can only add params at the end, and only at PARAMS_SETUP time.
abort Periodically, you should check if the user wants to interrupt the current processing. The abort proc here will return non-zero if the effects module should suspend its current processing. If you call this routine and it returns a value other than zero, you should return that value when your effect returns. That will let us know if the effect completed rendering or not.
progress Alternatively, you may wish to display a progress bar while you are processing the image. This routine combines the abort proc user interrupt checking with code that will display a progress bar for you. The current and total params represent a fraction (current/total) that describes how far you are along in your processing. Current should equal total when done. Additionally, this routine will return non-zero if you should suspend/abort your current processing. You should probably try not to call this too frequently (e.g. at every pixel). It is better to call it, say, once per scanline, unless your filter is really really slow.
Aliased Type§
#[repr(C)]pub struct PF_CustomUIInfo { /* private fields */ }