Useful Utility Functions¶
PF_EffectUISuite¶
Although not strictly concerned with parameters, this suite can change the name of the options button.
Function |
Purpose |
---|---|
|
Changes the text on the options button in the effect controls palette. Note This must be called during PF_Cmd_PARAM_SETUP.
|
PF_AppSuite¶
Roughly 437 years ago, when we released After Effects 5.0, we published some useful utility callbacks in PF_AppSuite. They're as useful today as they were then. After Effects has user-controllable UI brightness.
In addition to the PF_EffectCustomUIOverlayThemeSuite for custom UI in effects, use these calls to integrate seamlessly into the After Effects UI.
What better way to shame someone into purchasing a copy of your plug-in than by putting their personal information into a watermark, eh? Or set the cursor to add mask vertices, just to confuse people? Heh heh heh. But that would be wrong.
Function |
Purpose |
---|---|
|
Retrieves the current background color.
|
|
Retrieves the color for the specified UI element. See AE_EffectSuites.h for a complete enumeration of available CC adds several new Note that in CS6, the color definitions are off from Use following psuedocode for CS6 only:
|
|
New in CC. Retrieves the active displayed language of AE UI so plug-in can match. Here are the possible language codes as of CC:
|
|
Retrieves the user's registration information.
|
|
Retrieves font style sheet information for the fonts used in After Effects' UI. Trivia: The font used in After Effects' UI starting in 15.0 is Adobe Clean. Before that, it was Tahoma on Windows and Lucida Grande on macOS X.
|
|
Sets the cursor to any of After Effects' cursors. See AE_EffectUI.h for a complete enumeration. Set to:
-
|
|
Returns TRUE if After Effects is running in watched folder mode, or is a render engine installation.
As of AE6.5, this function returns |
|
Displays the After Effects color picker dialog (which may be the system color picker, depending on the user's preferences). Will return
|
|
Returns the position of the mouse in the custom UI coordinate space.
|
|
Queue up a redraw of a specific area of the custom UI for an effect. Only valid while handling a non-drawing event in the effect. Specify Set the
|
|
Converts from the custom UI coordinate system to global screen coordinates. Use only during custom UI event handling.
|
Advanced Appsuite: You Can Do That?!¶
PF_AdvAppSuite
was originally designed for some pretty nefarious purposes; an external application was pretending to be an After Effects plug-in, and required ways to notify After Effects of the changes it had made to the project. Our API impurity is your gain.
PF_AdvAppSuite2¶
Function |
Purpose |
---|---|
|
Tells After Effects that the project has been changed since it was last saved.
|
|
Saves the project to the current path. To save the project elsewhere, use AEGP_SaveProjectToPath().
|
|
Stores the background state (After Effects' position in the stacking order of open applications and windows).
|
|
Brings After Effects to the front of all currently open applications and windows.
|
|
Puts After Effects back where it was, in relation to other applications and windows.
|
|
Forces all After Effects windows to update. Note that although the Composition panel will be refreshed, this does not guarantee a new frame will be sent to External Monitor Preview plug-ins.
|
|
Writes text into the After Effects info palette.
|
|
Draws the specified color in the After Effects info palette (alpha is ignored).
|
|
Writes three lines of text into the After Effects info palette.
|
|
Writes three lines of text into the After Effects info palette, with portions of the second and third lines left and right justified.
|
|
Appends characters to the currently-displayed info text.
|
Formatting Time¶
PF_AdvTimeSuite
provides several functions to match how After Effects displays time. In fact, these are the same functions we use internally.
PF_AdvTimeSuite4¶
Function |
Purpose |
---|---|
|
Given a time value and scale, returns a formatted string representing that time. If durationB is
|
|
Contextualizes the formatted time string for the given PF_InData and PF_EffectWorld (i.e., layer time).
|
|
Allows you to select composition or layer time.
|
|
Returns the starting frame number (specified by the user in composition settings), and the composition's time display preferences. Updated in 14.2 to support higher frame rates.
|
|
New in 15.0. Returns the index of the frame in the current comp.
|
Affecting The Timeline¶
Long ago, we helped a developer integrate their stand-alone tracker with After Effects by exposing a set of functions to give them some way to notify us of, and be notified of, changes to the timeline.
With the numerous AEGP API calls available, these aren't used much, but they're still available.
Don't confuse this suite with AEGP_ItemSuite.
PF_AdvItemSuite1¶
Function |
Purpose |
---|---|
|
Moves current time num_stepsL in the specified direction.
|
|
Moves num_stepsL in the specified direction, for the active item.
|
|
Tells After Effects that the active item must be updated.
|
|
Forces After Effects to rerender the current frame.
|
|
Returns whether the effect which owns the
|
Accessing Auxiliary Channel Data¶
Some file types contain more than just pixel data; use PF_ChannelSuite
to determine whether such information is present, and the macros in AE_ChannelSuites.h to retrieve it in the format you need.
PF_ChannelSuite1¶
Function |
Purpose |
---|---|
|
Retrieves the number of auxiliary channels associated with the indexed layer.
|
|
Retrieves (by index) a reference to, and description of, the specified channel.
|
|
Retrieves an auxiliary channel by type. Returned information is valid only if
PF_DataType will be one of the following:
PF_ChannelType will be one of the following:
|
|
Retrieves the
|
|
Checks in the
|