UI Callbacks¶
After Effects provides callbacks for transposing between coordinate systems, and obtaining OS-specific information about drawing contexts, without guesswork or asking the OS directly. Use these callbacks! Pointers to these callbacks are provided in PF_EventCallbacks. Use the macros in AE_EffectUI.h and AE_EffectCB.h to access these routines.
It is possible to build a functioning plug-in which utilizes a custom UI without implementing the coordinate system transposition callbacks. However, the moment a user zooms into the layer panel or rotates a layer, your plug-in will behave badly. We added these macros and callbacks so that custom user interfaces could be easily integrated into the After Effects UI, without inflicting user interface overhead on developers. Again, please use them!
These macros default the refcon and context handle for simplicity. The refcon assumes you have a local variable named "extra". The default context is the current context. These default parameters are defined in the PF_EventCallbacks structure (in AE_EffectUI.h). You can override the defaults by accessing the callbacks through the PF_EventExtra structure. We don't recommend (or support) modification of the macros in the header file. Don't do it!
Function |
Purpose |
---|---|
|
Transforms layer panel coordinates to the composition panel coordinates.
|
|
Transforms composition panel coordinates to the layer panel coordinates.
|
|
Returns the matrix used to convert from the composition panel to the layer panel. If
|
|
Returns the transformation matrix used to convert from the layer panel to the composition panel. This always exists.
|
|
Transforms the source coordinates in the current context to screen coordinates. Screen (frame) coordinates are affected by the current zoom level.
|
|
Transforms the screen coordinates identified by
|
|
Retrieves platform-specific data. For plug-ins loaded with localized resource files, Use Starting in CS6, use
|