AEGP Suites¶
As mentioned earlier, AEGPs do everything through suites. The following suites are used by all types of AEGPs, and may be called from within any hook function (except for the RegisterSuite, which must be used from within the AEGP's entry point). Following is a description of each function in every suite, and, where appropriate details on using those functions.
Suite |
Description |
---|---|
Manage memory resources. Use this suite! Whenever memory-related errors are encountered, After Effects can report errors for you. |
|
Manage your AEGP's menu items. Used in conjunction with the Register Suite. |
|
Used in conjunction with the Command Suite to add functions to menu commands. AEIOs and Artisans must use this suite's functions to indicate to After Effects that they want to receive the appropriate message streams. You can replace some After Effects' commands using this suite. |
|
Reads and modifies project data. |
|
Manages items within a project or composition. Folders, Compositions, Solids, and Footage are all items. |
|
Query which items are currently selected, and create your own selection sets. It's often a good UI move to select all the items your AEGP has modified, just to give the user some idea what you've done. |
|
Manages (and creates) compositions in a project, and composition-specific items like solids. |
|
Manages footage. |
|
Provides information about the layers within a composition, and the relationship(s) between the source and layer times. Solids, text, paint, cameras, lights, images, and image sequences can all become layers. |
|
Provides access to the effects applied to a layer. Use Stream suites to obtain effect keyframe information. Use |
|
Used to access the values of a layer's keyframe properties. |
|
Used to access the characteristics of dynamic streams associated with a layer. |
|
Used to access and manipulate all keyframe data. |
|
Used to manipulate markers. Use |
|
Provides access to retrieve information about a layer's masks. |
|
Used in conjunction with Stream Suite, this suite provides detailed information about the path rendered to make a layer's mask. |
|
Used to access the actual text on a text layer. |
|
Used to access the paths that make up the outlines of a text layer. |
|
Supplies error message handling, AEGP version checking and access to After Effects' undo stack. |
|
Query and manage all persistent data (i.e., the preferences file). AEGPs can also add their own data to the prefs. |
|
Obtain information on After Effects' current color management settings. |
|
Get rendered frames (and audio samples) from within an AEGP. |
|
Allocate, dispose of, and query AEGP_Worlds. Also provides a way to convert a |
|
Exposes After Effects' compositing functionality, including transfer modes, track matting, and good old fashioned bit copying. |
|
Functions for managing and accessing sound data. |
|
Add and remove items from the render queue. |
|
Query and modify items in the render queue. |
|
Query and manage all items exposed in a render queue item's options dialog. |
|
Query and modify the output modules attached to items in the render queue. |
|
The functions in this suite, while technically part of the AEGP API, are for use by effects. |
|
Gives AEGPs a way to have a function (which has the required signature) to be run on any or all available processors. |
|
Registers AEGP file and project importers as part of After Effects' file handling. |
Fail Gracefully¶
If a suite isn't present, make every attempt to fail gracefully. Show the user a message indicating the nature of the problem. Attempt to acquire and use an earlier version of the same suite.
Since AEGPs are so deeply integrated with After Effects, make sure that users know who or what is encountering a given problem.
Identify yourself! Provide support and/or help information to the user whenever possible.
Handling Handles¶
Use the AEGP Memory Suite to manage memory used by the AEGP. Whenever memory related errors are encountered, After Effects can report errors for you to find early on.
AEGP_MemHandle
is a structure that contains more than just the referenced memory. So it should not be dereferenced directly. Use AEGP_LockMemHandle
to get a pointer to the memory referenced by the AEGP_MemHandle
.
And of course, unlock it when you're done.
AEGP_MemorySuite1¶
Function |
Purpose |
---|---|
|
Create a new memory handle. This memory is guaranteed to be 16-byte aligned.
Use
|
|
Release a handle you allocated using
|
|
Locks the handle into memory (cannot be moved by OS). Use this function prior to using memory allocated by
|
|
Allows OS to move the referenced memory. Always balance lock calls with unlocks.
|
|
Returns the allocated size of the handle.
|
|
Changes the allocated size of the handle.
|
|
If After Effects runs into problems with the memory handling, the error should be reported to the user. Make use of this during development! Only memory allocated and then leaked using this suite is reported using this call, so for example memory allocated using PF_HandleSuite1 will not be reported.
|
|
Obtain information about the number of currently allocated handles and their total size. Only memory allocated using this suite is tracked and reported using this call, so for example memory allocated using PF_HandleSuite1 will not be reported here.
|
Managing Menu Items¶
Command Suites allow you to create and handle any menu events.
To add your own menu commands, you must also use Register Suite to assign handlers to menu events.
AEGP_CommandSuite1¶
Function |
Purpose |
---|---|
|
Obtain a unique command identifier. Use the Register Suite to register a handler for the command.
Note: On occasion After Effects will send command 0 (zero), so don't use that as part of your command handling logic. |
|
Add a new menu command. Using
Locations can be set to a specific location in the menu or can be one assigned by After Effects:
For
|
|
Remove a menu command. If you were so motivated, you could remove ALL of the After Effects menu items.
|
|
Set menu name of a command.
|
|
Enable a menu command.
|
|
Disable a menu command.
|
|
After Effects will draw a check mark next to the menu command.
|
|
Call the handler for a specified menu command. Every After Effects menu item has an associated command. Note that we make no guarantees that command IDs will be consistent from version to version.
Having given the disclaimer above, here are a few command numbers that have been supplied to other developers, and may be of interest:
If your AEGP needs to call some other After Effects menu item, there's a fairly easy way to find out most commands you want, using scripting:
With AE running, just open up Adobe ExtendScript Toolkit CC, copy the above script in, and in the app drop-down choose the version of After Effects you have running. Then hit the Play button to run the script in AE. Otherwise, contact API Engineering for the command number. |
Registering with After Effects¶
Register functions for After Effects' use.
AEGP_RegisterSuites5¶
Function |
Purpose |
---|---|
|
Register a hook (command handler) function with After Effects. If you are replacing a function which After Effects also handles,
For each menu item you add, obtain your own Determine which command was sent within this hook function, and act accordingly. Currently,
|
|
Register your menu update function (which determines whether or not items are active), called every time any menu is to be drawn. This hook function handles updates for all menus.
|
|
Register your termination function. Called when the application quits.
|
|
Currently not called. |
|
Currently not called. |
|
Currently not called. |
|
Register your Artisan. See Artisans for more details.
|
|
Register your AEIO plug-in. See AEIOs for more details.
|
|
Register your IdleHook function. After Effects will call the function sporadically, while the user makes difficult artistic decisions (or while they're getting more coffee).
|
|
Registers your AEGP as an interactive artisan, for use in previewing and rendering all layers in a given composition.
|
|
Call this to register as many strings as you like for name-replacement when presets are loaded. Any time a Property name is found, or referred to in an expression, and it starts with an ASCII tab character ('t'), followed by one of the English names, it will be replaced with the localized name. (In English the tab character will simply be removed).
|
Manage Projects¶
These functions access and modify project data. Support for multiple projects is included to prepare for future expansion; After Effects currently adheres to the single project model.
To save project-specific data in After Effects' preferences (and thus, outside the projects themselves), use the Persistent Data Suite.
Use caution: the functions for opening and creating projects do not save changes to the project currently open when they are called!
AEGP_ProjSuite6¶
Function |
Purpose |
---|---|
|
Currently will never return more than 1. After Effects can have only one project open at a time.
|
|
Retrieves a specific project by index.
|
|
Get the project name (up to
|
|
Get the path of the project (empty string the project hasn't been saved yet). The path is a handle to a NULL-terminated A_UTF16Char string, and must be disposed with
|
|
Get the root of the project, which After Effects also treats as a folder.
|
|
Saves the entire project to the specified full path. The file path is a NULL-terminated UTF-16 string with platform separators.
|
|
Retrieves the current time display settings.
|
|
Specified the settings to be used for displaying time.
|
|
Returns
|
|
Saves the project to the specified path. The file path is a NULL-terminated UTF-16 string with platform separators. NOTE: This will overwrite an existing file.
|
|
Creates a new project. NOTE: Will close the current project without saving it first!
|
|
Opens a project from the supplied path, and returns its The file path is a NULL-terminated UTF-16 string with platform separators. NOTE: Will close the current project without saving it first!
|
|
Retrieves the project bit depth.
AEGP_ProjBitDepth will be one of the following:
|
|
Sets the project bit depth. Undoable.
|
AEGP_TimeDisplay2¶
Note
Values in unused fields persist when After Effects is using a different display type.
Member |
Descrpition |
---|---|
|
One of the following:
|
|
0 - 100. Only used for |
|
When the timebase is 30 and the item's framerate is 29.97, determines whether to display as non-drop frame. |
|
Only used for |
|
Usually 0 or 1. Not used when type is usually 0 or 1, not used for |
|
If |
Control Items Within Projects¶
Accesses and modifies items within a project or composition.
Anything in the project bin is an AEGP_Item
. Note that cameras have no source, and thus have no AEGP_ItemH
.
Unless more specificity is required for the function(s) you're using, remain as abstract as possible; AEGP_Comps are passed into and returned from most functions as AEGP_Items.
AEGP_ItemSuite9¶
Function |
Purpose |
---|---|
|
Retrieves the first item in a given project.
|
|
Retrieves the next project item;
|
|
If the Project window is active, the active item is the selected item (if only one item is selected). If a Composition, Timeline, or Footage window is active, returns the parent of the layer associated with the front-most tab in the window. Returns NULL if no item is active.
|
|
Returns true if the Project window is active and the item is selected.
|
|
Toggles the selection state of the item, and (depending on To make selections in the Composition panel, use
|
|
Gets type of an item. Note: solids don't appear in the project, but can be the source to a layer.
Items are one of the following types:
|
|
Get name of type. (name length up to
|
|
Get item name. (name length has no limit).
It must be disposed with
|
|
Specifies the name of the AEGP_ItemH. (name length has no limit). Undoable.
|
|
Returns the item's unique ID, which persists across saves and loads of the project.
|
|
Get properties of an item.
Flag values (may be OR'd together):
Unlike the |
|
Toggle item's proxy usage. Undoable.
|
|
Get folder containing item.
|
|
Sets an item's parent folder. Undoable.
|
|
Get duration of item, in seconds.
|
|
Get current time within item. Not updated while rendering.
|
|
Get width and height of item.
|
|
Get the width of a pixel, assuming its height is 1.0, as numerator over denominator.
|
|
Removes item from all compositions. Undo-able. Do not use the
|
|
Removed in Given a solid item, return its color.
|
|
Removed in Sets the color of an existing solid (error if
|
|
Removed in Sets the dimensions of an existing solid (error if
|
|
Creates a new folder in the project. The newly created folder is allocated and owned by After Effects. Passing
|
|
Sets the current time within a given
|
|
Removed in
|
|
Updated to support Unicode in
|
|
Updated to support Unicode in
|
|
Retrieves an item's label.
|
|
Sets an item's label.
|
|
Gets an item's most recently used view. The view can be used with two calls in the
|
Note
AEGP_RenderNewItemSoundData()
used to be here, but is now part of AEGP_RenderSuite4.
Managing Selections¶
This suite manages selection states, mirroring the functionality supplied by vectors in the C++ Standard Template Library.
Many types of items may be simultaneously selected in After Effects; AEGP_CollectionItems
are unions of layer, mask, effect, stream, mask vertex, and keyframe items.
First acquire the current collection, then iterate across its members to ensure that whatever your AEGP does is applicable to each.
We've added AEGP_Collection2H
and AEGP_CollectionItemV2
so that selected dynamic streams can be handled with the AEGP_CollectionSuite
.
AEGP_CollectionSuite2¶
Function |
Purpose |
---|---|
|
Creates and returns a new, empty collection. To obtain the current composition's selection as a collection, use
|
|
Disposes of a collection.
|
|
Returns the number of items contained in the given collection.
|
|
Retrieves (creates and populates) the index'd collection item.
|
|
Adds an item to the given collection.
|
|
Removes an index'd item (or items) from a given collection. NOTE: this range is exclusive, like STL iterators. To erase the first item, you would pass 0 and 1, respectively.
|
Ownership Of Collection Items¶
When AEGP_StreamRefHs
are inserted into a collection, they are adopted by the collection; do not free them.
AEGP_EffectRefHs
, on the other hand, are not adopted, and must be freed by the calling AEGP.
Manipulate Compositions¶
Provide information about the compositions in a project, and create cameras, lights, and solids.
AEGP_CompSuite11¶
Function |
Purpose |
---|---|
|
Retrieves the handle to the composition, given an item handle. Returns
|
|
Used to get the item handle, given a composition handle.
|
|
Returns current downsample factor. Measured in pixels X by Y. Users can choose a custom downsample factor with independent X and Y.
|
|
Sets the composition's downsample factor.
|
|
Returns the composition background color.
|
|
Sets a composition's background color.
|
|
Returns composition flags, or'd together.
|
|
New in CC. Passes back true if the Comp's timeline shows layer names, false if source names. This will open the comp as a side effect.
|
|
New in CC. Pass in true to have the Comp's timeline show layer names, false for source names. This will open the comp as a side effect.
|
|
New in CC. Passes back true if the Comp's timeline shows blend modes column, false if hidden. This will open the comp as a side effect.
|
|
New in CC. Pass in true to have the Comp's timeline show the blend modes column, false to hide it. This will open the comp as a side effect.
|
|
Returns the composition's frames per second.
|
|
Sets the composition's frames per second.
|
|
The composition shutter angle and phase.
|
|
The duration of the shutter frame, in seconds.
|
|
Retrieves the number of motion blur samples After Effects will perform in the given composition.
|
|
Specifies the number of motion blur samples After Effects will perform in the given composition. Undoable.
|
|
New in CC. Retrieves the motion blur adaptive sample limit for the given composition. As of CC, a new comp defaults to
|
|
New in CC. Specifies the motion blur adaptive sample limit for the given composition. As of CC, both the limit and the suggested values are clamped to [2,256] range and the limit value will not be allowed less than the suggested value. Undoable.
|
|
Get the time where the current work area starts.
|
|
Get the duration of a composition's current work area, in seconds.
|
|
Set the work area start and duration, in seconds. Undo-able. One call to this function is sufficient to set the layer's in point and duration; it's not necessary to call it twice, once for each timespace.
|
|
Creates a new solid with a specified width, height, color, and duration in the composition. Undo-able. If you pass
|
|
Creates and adds a camera to the specified composition. Once created, you can manipulate the camera's parameter streams using the AEGP Stream Suite. To specify a two-node camera, use
|
|
Creates and adds a light to the specified composition. Once created, you can manipulate the light's parameter streams using the AEGP Stream Suite.
|
|
Creates a new composition for the project. If you don't provide a parent folder, the composition will be at the root level of the project. Undo-able.
|
|
Creates a new AEGP_Collection2H from the items selected in the given composition. The plug-in is responsible for disposing of the
|
|
Sets the selection within the given composition to the given Will return an error if members of the
|
|
Gets the displayed start time of a composition.
|
|
Not undo-able. Sets the displayed start time of a composition (has no effect on the duration of the composition).
|
|
Undoable. Sets the duration of the given composition.
|
|
Creates a "null object" in the composition (useful for translating projects from 3D applications into After Effects). If you pass
|
|
Sets the pixel aspect ratio of a composition.
|
|
Updated in CS6. Creates a text layer in the composition, and returns its
|
|
Updated in CS6. Creates a new box text layer, and returns its
|
|
Sets the dimensions of the composition. Undoable.
|
|
Duplicates the composition. Undoable.
|
|
Retrieves the duration of a frame in a composition.
|
|
Returns the most-recently-used composition.
|
|
Creates and returns a handle to a new vector layer.
|
|
Returns an AEGP_StreamRefH to the composition's marker stream. Must be disposed by caller.
|
|
Passes back a boolean that indicates whether the specified comp uses drop-frame timecode or not.
|
|
Sets the dropness of the timecode in the specified composition.
|
|
Move the selection to a certain layer index. Use along with
|
Work with Footage¶
Provides information about footage, or items in a project or composition. When getting and setting footage's interpretation, it is possible to specify incompatible options.
If you encounter warnings and errors during development, be sure to make all related changes atomically, and reassess the logic of the operation you're performing.
For example, changing the pull-down interpretation of footage won't work unless there's a difference between it's native and conformed frame rate.
Depending on what you're trying to accomplish, it may make sense to abort all of your operations at that point, inform the user of the problem encountered.
AEGP_FootageSuite5¶
Function |
Purpose |
---|---|
|
Returns an error if item isn't a footage item. Used to convert an item handle to a footage handle.
|
|
Returns an error if item has no proxy. Returns the proxy footage handle. Note: a composition can have a proxy.
|
|
Returns the number of data (RGBA or audio) files, and the number of files per frame (may be greater than one if the footage has auxiliary channels).
|
|
Get fully realized path to footage source file. Retrieves the footage path for a piece of footage (or for the specified frame of a footage sequence).
The path is a handle to a NULL-terminated
|
|
Retrieves the footage signature of specified footage.
The signature will be one of the following:
|
|
Creates a new footage item. The file path is a NULL-terminated UTF-16 string with platform separators. Note that footage filenames with colons are not allowed, since colons are used as path separators in the HFS+ file system.
Note the optional params. If
|
|
Adds a footage item to a project. Footage will be adopted by the project, and may be added only once. This is Undo-able; do not dispose of the returned added item if it's undone.
|
|
Sets footage as the proxy for an item. Will be adopted by the project. This is Undo-able; do not dispose of the returned added item if it's undone.
|
|
Replaces footage for an item. The item will replace the main footage for this item. This is Undo-able; do not dispose of the returned added item if it's undone.
|
|
Deletes a footage item. Do not dispose of footage you did not create, or that has been added to the project.
|
|
Populates an AEGP_FootageInterp describing the settings of the There is no way to create a valid
If proxyB is |
|
Apply the settings in the
If |
|
Populates an
|
|
Deprecated. Adds a new placeholder footage item to the project. Using this function for missing footage will cause the user to search for each individual missing file, regardless of whether or not they're all in the same directory. Undo-able.
|
|
This is the hip new way to add references to footage that can't be found right this moment. The file path is a NULL-terminated UTF-16 string with platform separators. In CS6 and earlier, file_type was ignored and we previously recommendedsetting it to Starting in CC, If you pass If the path may not exist, pass
|
|
This is the way to add a solid. Until the footage is added to the project, the caller owns the
|
|
Returns the color of a given solid. Returns an error if the
If |
|
Sets the color of a solid. Undo-able.
If |
|
Sets the dimensions of a solid. Undo-able.
If |
|
Retrieves information about the audio data in the footage item (by populating the
|
|
Populates and returns a
|
AEGP_FootageInterp Structure¶
Member |
Purpose |
---|---|
|
The interlace settings for the footage item.
|
|
If |
|
Indicates the phase for use in 3:2 pulldown. One of the following:
|
|
Indicates the number of times the footage should loop.
|
|
Expresses the pixel aspect ratio of the footage (x over y). |
|
The original framerate (in frames per second) of the footage item. |
|
The framerate being used for the footage item. |
|
The pixel depth of the footage. One of the following:
|
|
Indicates whether motion de-interlacing is being applied to the footage item. |
Manage Layers¶
AEGP_LayerSuite
provides information about layers within a composition, and the relationship(s) between the source and layer times.
As most After Effects usage boils down to layer manipulation, this is among the largest function suites in our API.
AEGP_LayerSuite9¶
Function |
Purpose |
---|---|
|
Obtains the number of layers in a composition.
|
|
Get a
|
|
Get the active layer. If a Layer or effect controls palette is active, the active layer is that associated with the front-most tab in the window. If a composition or timeline window is active, the active layer is the selected layer (if only one is selected; otherwise
|
|
Get the index of the layer (0 is the topmost layer in the composition).
|
|
Get the AEGP_ItemH of the layer's source item.
|
|
Retrieves the ID of the given
|
|
Get the AEGP_CompH of the composition containing the layer.
|
|
Get the name of a layer. Both
|
|
Get the quality of a layer.
Layer quality is one of the following flags:
|
|
Sets the quality of a layer (see flag values above). Undoable.
|
|
Get flags for a layer.
|
|
Sets one layer flag at a time. Undoable.
|
|
Determines whether the layer's video is visible. This is necessary to account for 'solo' status of other layers in the composition; non-solo'd layers are still on.
|
|
Accounts for solo status of other layers in the composition.
|
|
Get current time, in layer or composition timespace. This value is not updated during rendering. NOTE: If a layer starts at other than time 0 or is time-stretched other than 100%, layer time and composition time are distinct.
|
|
Get time of first visible frame in composition or layer time. In layer time, the
|
|
Get duration of layer, in composition or layer time, in seconds.
|
|
Set duration and in point of layer in composition or layer time. Undo-able.
|
|
Get the offset from the start of the composition to layer time 0, in composition time.
|
|
Set the offset from the start of the composition to the first frame of the layer, in composition time. Undoable.
|
|
Get stretch factor of a layer.
|
|
Set stretch factor of a layer.
|
|
Get transfer mode of a layer.
|
|
Set transfer mode of a layer. Undoable.
As of 23.0, when you make a layer a track matte, the layer being matted will be disabled, as when you do this via the interface. |
|
Tests whether it's currently valid to add a given item to a composition. A composition cannot be added to itself, or to any compositions which it contains; other conditions can preclude successful adding too. Adding a layer without first using this function will produce undefined results.
|
|
Add an item to the composition, above all other layers. Undo-able. Use
|
|
Change the order of layers. Undoable.
To add a layer to the end of the composition, to use |
|
Given a layer's handle and a time, returns the bounds of area visible with masks applied.
|
|
Returns a layer's object type.
|
|
Is the footage item a 3D layer. All AV layers are either 2D or 3D.
|
|
Is the footage item a 2D layer. All AV layers are either 2D or 3D.
|
|
Given composition time and a layer, see if the layer will render. Time mode is either
|
|
Is the layer used as a track matte?
|
|
Does this layer have a Track Matte?
|
|
Given a time in composition space, returns the time relative to the layer source footage.
|
|
Given a time in layer space, find the corresponding time in composition space.
|
|
Used by the dancing dissolve transfer function.
|
|
Supplies the layer's unique ID. This ID never changes during the lifetime of the project.
|
|
Given a layer handle and time, returns the layer-to-world transformation matrix.
|
|
Given a layer handle, the current (composition) time, and the requested view time, returns the translation between the user's view and the layer, corrected for the composition's current aspect ratio.
|
|
Sets the name of a layer. Undo-able. new_nameZ points to a null terminated UTF-16 string.
|
|
Retrieves the handle to a layer's parent (none if not parented).
|
|
Sets a layer's parent layer.
|
|
Deletes a layer. Can you believe it took us three suite versions to add a delete function? Neither can we.
|
|
Duplicates the layer. Undoable.
|
|
Retrieves the
|
|
Gets a layer's
|
|
Sets a layer's
|
|
New in CC. Get the sampling quality of a layer.
Layer sampling quality is one of the following flags:
|
|
New in CC. Sets the sampling quality of a layer (see flag values above). Option is explicitly set on the layer independent of layer quality. If you want to force it on you must also set the layer quality to Undoable.
|
|
New in 23.0. Returns the track matte layer of
|
|
New in 23.0. Sets the track matte layer and track matte type of Track Matte Types:
Setting the track matte type as
|
|
New in 23.0. Removes the track matte layer of
|
Layer Creation Notes¶
All layers created using AEGP calls will start at composition time 0, and have the duration of the composition.
Use AEGP_SetLayerOffset()
and AEGP_SetLayerInPointAndDuration()
from AEGP_LayerSuite9 to properly set the layer's time information.
When the layer stretch factor (obtained using AEGP_GetLayerStretch
in AEGP_LayerSuite9, naturally) is not 100%, the following computation will be needed to yield the correct layer offset:
offset = compIn - stretch \* layerIn;
Communication With A Layer's Effects¶
Access the effects applied to a layer. This suite provides access to all parameter data streams.
Use the Stream Suite to work with those streams.
An AEGP_Effect_RefH
is a reference to an applied effect. An AEGP_InstalledEffectKey
is a reference to an installed effect, which may or may not be currently applied to anything.
If Foobarocity is applied to a layer twice, there will be two distinct AEGP_Effect_RefHs
, but they'll both return the same AEGP_InstalledEffectKey
.
AEGP_EffectSuite4¶
Function |
Purpose |
---|---|
|
Get number of effects applied to a layer.
|
|
Retrieves (by index) a reference to an effect applied to the layer.
|
|
Given an
|
|
Returns description of effect parameter. Do not use the value(s) in the ParamDef returned by this function (Use Use
|
|
Obtains the flags for the given
Flags will be a combination of the following:
|
|
Sets the flags (enumerated above) for the given
|
|
Change the order of applied effects (pass the requested index).
|
|
Call an effect plug-in, and pass it a pointer to any data you like; the effect can modify it. This is how AEGPs communicate with effects. Pass
|
|
Disposes of an
|
|
Apply an effect to a given layer. Returns the newly-created
|
|
Remove an applied effect.
|
|
Returns the count of effects installed in After Effects.
|
|
Returns the Pass
|
|
Get name of the effect.
Note: use |
|
Get match name of an effect (defined in PiPL).
Match names are in 7-bit ASCII. UI names are in the current application runtime encoding; for example, ISO 8859-1 for most languages on Windows. |
|
Menu category of effect.
|
|
Duplicates a given
|
|
New in CC 2014. How many masks are on this effect?
|
|
New in CC 2014. For a given mask_indexL, returns the corresponding
|
|
New in CC 2014. Add an effect mask, which may be created using the Mask Management. Returns the local stream of the effect ref - useful if you want to add keyframes. Caller must dispose of Undoable.
|
|
New in CC 2014. Remove an effect mask. Undoable.
|
|
New in CC 2014. Set an effect mask on an existing index. Returns the local stream of the effect ref - useful if you want to add keyframes. Caller must dispose of Undoable.
|
Exploiting Effect UI Behavior To Look Cool¶
Even if you manipulate a layer's effects, its effect controls won't necessarily become visible.
However, if you apply then immediately remove an effect, the layer's effect controls will be made visible.
Tricky, eh?
StreamRefs And EffectRefs¶
How do you get an AEGP_StreamRef for an effect? Start by getting the effect's AEGP_EffectRef
, by calling AEGP_GetNewEffectForEffect()
.
Then call AEGP_GetNewEffectStreamByIndex()
, say for param index 1, which passes back a parameter stream.
Then call AEGP_GetNewParentStreamRef()
- voila, your AEGP_StreamRef
sir!
If you acquire references to an effect's streams, do not dispose of the AEGP_EffectRefH
until you're done with the streams, or you'll unbalance After Effects' checkout mechanism. Also remember that AEGP_StreamRefHs are opaque; AEGP_StreamValue2s
are not (entirely).
To get an effect's instance name (as renamed by the user), get the AEGP_StreamRef for the effect itself and call AEGP_GetStreamName
.
Diving Into Streams!¶
Just about everything in After Effects is a stream. Effect parameters, layers, masks, and shapes are all internally represented by streams. The AEGP API can access nearly every aspect of every stream.
The After Effects timeline can contain numerous object types; each object supports a set of parameters called streams. All streams, regardless of which type of object to which they're attached, are conceptually similar (and handled similarly by After Effects. But the way you access each type of stream varies because of their containment.
A stream, once acquired, represents a value which may change over time. Not all streams *can* vary over time, and a particular stream may not be time-variant at the time of access.
There are two ways to access the value of a stream. If the stream has keyframes, you can use the Working With Keyframes. The values provided won't reflect the influence of expressions. Note: In any expression, the current keyframed value is always available as the variable value.
You can also use AEGP_GetNewStreamValue
from AEGP_StreamSuite5, which samples the value of the stream at a particular time. For streams without expressions or keyframes, the time parameter is meaningless, and the function returns what essentially is the constant value of the stream. Use AEGP_SetStreamValue
(which doesn't take a time as a parameter) to set these streams.
Many StreamSuite functions populate a StreamH, which your AEGP must dispose. when done. After Effects allocates and passes you a copy of the values, not a direct handle to the original value. AEGP_GetNewLayerStream()
is restricted to streams for which no memory allocation is required to access their values.
Okay, What Did I Just Get?¶
A stream value is a large union, only one structure of which (depending on the stream type) is populated. Note the similarity to the PF_ParamDef.
typedef union {
AEGP_FourDVal four_d;
AEGP_ThreeDVal three_d;
AEGP_TwoDVal two_d;
AEGP_OneDVal one_d;
AEGP_ColorVal color;
AEGP_ArbBlockVal arbH;
AEGP_MarkerValP markerP;
AEGP_LayerIDVal layer_id;
AEGP_MaskIDVal mask_id;
AEGP_MaskOutlineValH mask;
AEGP_TextDocumentH text_documentH;
} AEGP_StreamVal2;
Layers¶
AEGP_GetLayerStreamValue
is used to access the parameters like anchor point and position, native to almost all layers in AE.
Use IsStreamLegal
to allow you to determine if that stream type is offered on that layer.
Masks¶
Since a layer can have multiple masks, access the masks using AEGP_GetLayerMaskByIndex
from AEGP_MaskSuite6.
Masks don't have streams like layers do; they get their own enumeration. Access their streams using AEGP_GetNewMaskStream
from AEGP_StreamSuite5.
Effects¶
They can have a variable number of streams/parameters, and the order and definition of them is not known when the AEGP is written.
Therefore we cannot offer an enum for selecting them, and instead you must get them by index, hence GetNewEffectStreamByIndex
from AEGP_StreamSuite5.
Stream Suite¶
Access and manipulate the values of a layer's streams. For paint and text streams, use Dynamic Streams instead.
AEGP_StreamSuite5¶
Function |
Purpose |
---|---|
|
Determines if the given stream is appropriate for the given layer.
|
|
Given a stream, returns whether or not a stream is time-variant (and can be keyframed).
|
|
Retrieves an
|
|
|
|
|
|
Get number of parameter streams associated with an effect.
|
|
Get an effect's parameter stream. Plug-in must dispose of
|
|
Get a mask's stream. The stream must be disposed. Also see the AEGP_MaskSuite and AEGP_MaskOutlineSuite for additional Mask functions.
Useful for iteration:
|
|
Dispose of a stream (do this with all streams passed to the plug-in by these functions).
|
|
Get the mask's opacity stream. The stream must be disposed.
|
|
Get name of the stream (localized or forced English). is handle of
NOTE: if |
|
Get stream units, formatted as text (localized or forced English);
|
|
Get stream's flags, as well as minimum and maximum values (as floats), if the stream has mins and maxes. StreamFlags values:
|
|
Returns whether or not the stream is affected by expressions.
|
|
Get type (dimension) of a stream.
NOTE: always returns |
|
Get value, at a time you specify, of stream. The
|
|
Dispose of stream value. Always deallocate values passed to the plug-in.
|
|
Only legal when stream is not time-variant.
|
|
NOTE: This convenience function is only valid for streams with primitive data types, and not for
|
|
Determines whether expressions are enabled on the given
|
|
Enables and disables expressions on the given
|
|
Obtains the expression's text. Starting in suite version 5 (available in 15.0 and later), this now supports Unicode.
|
|
Sets the expression's text. Starting in suite version 5 (available in 15.0 and later), this now supports Unicode.
|
|
Duplicates a given
|
Dynamic Streams¶
AEGP_DynamicStreamSuite
accesses and manipulates paint and text streams.
Use AEGP_GetStreamGroupingType
and AEGP_GetDynamicStreamFlags
to identify the stream before attempting to use functions which only work on certain stream types.
Also note that, often, you can simply use Stream Suite calls to work with dynamic streams. On the other hand, only those functions specific to dynamic streams are in this suite.
AEGP_DynamicStreamSuite4¶
Function |
Purpose |
---|---|
|
Retrieves the AEGP_StreamRefH corresponding to the layer. This function is used to initiate a recursive walk of the layer's streams.
|
|
Retrieves the AEGP_StreamRefH corresponding to the mask.
|
|
Retrieves the number of sub-streams associated with the given
|
|
Retrieves the grouping type for the given
AEGP_StreamGroupingType will be one of the following:
|
|
Retrieves the number of streams associated with the given This function will return an error if called with an
|
|
Retrieves the flags for a given AEGP_StreamRefH.
|
|
Sets the specified flag for the Note: flags must be set individually. Undoable if
This call may be used to dynamically show or hide parameters, by setting and clearing |
|
Retrieves a sub-stream by index from a given
|
|
Retrieves a sub-stream by match name from a given
Here are some handy stream names, for which references may be retrieved:
|
|
Deletes the specified stream from a stream grouping. Note that the caller must still dispose of any Only valid for children of type
Note: as of 6.5, if a stream is deleted while it or any child stream is selected, the current composition selection will become |
|
Sets the new index of the specified Only valid for children of The
|
|
Duplicates the specified stream and appends it to the stream group. Undoable. Only valid for children of
|
|
Sets the name of the given Only valid for children of NOTE: If you retrieve the name with force_englishB set to
Note: Use this on an effect stream's group to change the display name of an effect. |
|
Returns whether or not it is currently possible to add a stream through the API.
|
|
Adds a stream to the specified stream group. Undoable. Only valid for
|
|
Retrieves the match name for the specified Note that this may differ from the display name, which can be retrieves using
|
|
Retrieves an
|
|
Returns whether or not the specified Note: the same result is available throught the After Effect user interface by typing "UU" with the composition selected.
|
|
Retrieves the index of a given stream, relative to its parent stream. Only valid for children of
Note As mentioned elsewhere, If streams are re-ordered, added or removed, all |
|
Valid on leaf streams only. Returns true if this stream is a multidimensional stream that can have its dimensions separated, though they may not be currently separated. Terminology: A Leader is the stream that can be separated, a Follower is one of N automatic streams that correspond to the N dimensions of the Leader. A Leader isn't always separated, call Please do not write code assuming that, we anticipate allowing separation of more streams in the future.
|
|
Methods such as
|
|
Valid only if
|
|
Retrieve the Follower stream corresponding to a given dimension of the Leader stream.
|
|
Valid on leaf streams only. Returns You can retrieve stream from the Leader using
|
|
Valid on separation Followers only, returns the Leader it is part of.
|
|
Valid on separation Followers only, returns which dimension of the Leader it corresponds to.
|
Working With Keyframes¶
Keyframes make After Effects what it is. AEGPs (and...ssshh, don't tell anyone...effects) can use this suite to add, manipulate and remove keyframes from any keyframe-able stream.
AEGP_KeyframeSuite3¶
Function |
Purpose |
---|---|
|
Retrieves the number of keyframes on the given stream. Returns Also, note that a stream without keyframes isn't necessarily constant; it can be altered by expressions.
|
|
Retrieves the time of the specified keyframe.
|
|
Adds a keyframe to the specified stream (at the specified composition or layer time). Returns the new keyframe's index. All indexes greater than the new index are now invalid (but you knew that). If there is already a keyframe at that time, the values will be updated.
|
|
Deletes the specified keyframe.
|
|
Creates and populates an The returned
|
|
Sets the stream's value at the time of the keyframe.
|
|
Retrieves the dimensionality of the stream's value.
|
|
Retrieves the temporal dimensionality of the stream.
|
|
Returns the The returned
|
|
Specifies the tangential The
NOTE: In |
|
Retrieves the
NOTE: the returned ease values must be multiplied by layer height to match the values displayed in the After Effects UI. |
|
Specifies the
The
|
|
Retrieves the flags currently set for the keyframe.
|
|
Sets the specified flag for the keyframe. Flags must be set individually.
|
|
Retrieves the in and out
|
|
Specifies the in and out
|
|
Informs After Effects that you're going to be adding several keyframes to the specified stream. After Effects will return an allocated opaque
|
|
Adds a keyframe to the specified stream at the specified (layer or composition) time. Note: this doesn't actually do anything to the stream's value.
|
|
Sets the value of the specified keyframe.
|
|
Tells After Effects you're done adding keyframes.
|
Adding Multiple Keyframes¶
Each time you call AEGP_InsertKeyframe()
, the entire stream is added to the undo stack.
If you're adding one or two keyframes, this isn't a problem. However, if you're writing a keyframer, you'll want to do things the *right* way.
Before you begin adding keyframes, call the (very-appropriately-named) AEGP_StartAddKeyframes
, passing it an opaque AEGP_AddKeyframesInfoH
.
For each keyframe to add, call AEGP_AddKeyframes
to set the time to be used (and get the newly-added keyframe's index), then AEGP_SetAddKeyframe
to specify the value to be used.
Once you're finished, call AEGP_EndAddKeyframes
to let know After Effects know it's time to add the changed parameter stream to the undo stack.
Marker Streams¶
AEGP_MarkerSuite
allows for direct manipulation of marker data.
AEGP_MarkerSuite2¶
Function |
Purpose |
---|---|
|
Creates a new marker.
|
|
Disposes of a marker.
|
|
Duplicates a marker (didn't see *that* one coming, eh?).
|
|
Sets a marker flag's value.
Currently, AEGP_MarkerFlagType is one of the following:
|
|
Gets the value (see above) of a given
|
|
Retrieves the UTF-16, NULL-terminated string located in the specified marker field. Must be disposed of by caller using
|
|
Sets the specified field of a marker to the provided text.
|
|
Returns the number of cue point parameters.
|
|
Returns the cue point param at the specified index (which must be between Returned handles are UTF-16, NULL-terminated strings, and must be disposed of by caller using
|
|
Set the value of an indexed cue point parameter to the specified value.
|
|
Inserts a cue point parameter. This call is following by
|
|
Deletes the cue point param at the specified index.
|
|
|
|
|
Mask Management¶
Access, manipulate, and delete a layer's masks.
AEGP_MaskSuite6¶
Function |
Purpose |
---|---|
|
Counts the masks applied to a layer,
|
|
Given a layer handle and mask index, returns a pointer to the mask handle. You must destroy the mask handle by using
|
|
Dispose of a mask handle.
|
|
Given a mask handle, determines if the mask is inverted or not.
|
|
Sets the inversion state of a mask.
|
|
Given a mask handle, returns the current mode of the mask.
|
|
Sets the mode of the given mask.
|
|
Retrieves the motion blur setting for the given mask.
|
|
New in CS6. Sets the motion blur setting for the given mask.
|
|
New in CS6. Gets the type of feather falloff for the given mask, either
|
|
Sets the type of feather falloff for the given mask.
|
|
Removed in CS4. Use |
|
|
|
Retrieves the
|
|
Creates a new mask on the referenced
|
|
NOTE: As of 6.5, if you delete a mask and it or a child stream is selected, the current selection within the composition will become NULL. |
|
Retrieves the color of the specified mask.
|
|
Sets the color of the specified mask.
|
|
Retrieves the lock state of the specified mask.
|
|
Sets the lock state of the specified mask.
|
|
Returns whether or not the given mask is used as a rotobezier.
|
|
Sets whether a given mask is to be used as a rotobezier.
|
|
Duplicates a given
|
Mask Outlines¶
The Mask Suite above tells plug-ins about the masks on a layer, but not about the details of those masks.
This is because processing is required on After Effects' part to access the information; the information isn't just lying around.
Plug-ins access that information using this Mask Outline Suite.
AEGP_MaskOutlineSuite3¶
Function |
Purpose |
---|---|
|
Given an mask outline pointer (obtainable through the Stream Suite), determines if the mask path is open or closed.
|
|
Sets the open state of the given mask outline.
|
|
Given a mask outline pointer, returns the number of segments in the path.
|
|
Given a mask outline pointer and a point between 0 and the total number of segments. For closed mask paths,
|
|
Sets the vertex information for a given index. Setting vertex 0 is special; its in tangent will actually set the out tangent of the last vertex in the outline. Of course,
|
|
Creates a vertex at index position. All vertices which formerly had an
NOTE: All masks must have at least one vertex. |
|
Removes a vertex from a mask.
|
|
New in CS6.
|
|
New in CS6.
|
|
New in CS6. Feather must already exist; use
|
|
New in CS6. Index of new feather is passed back in
|
|
New in CS6.
|
Mask Feathering¶
New for CS6, masks can be feathered.
AEGP_MaskFeather
is defined as follows:
typedef struct {
A_long segment; // mask segment where feather is
PF_FpLong segment_sF; // 0-1: feather location on segment
PF_FpLong radiusF; // negative value allowed if type == AEGP_MaskFeatherType_INNER
PF_FpShort ui_corner_angleF; // 0-1: angle of UI handle on corners
PF_FpShort tensionF; // 0-1: tension of boundary at feather pt
AEGP_MaskFeatherInterp interp;
AEGP_MaskFeatherType type;
} AEGP_MaskFeather;
AEGP_MaskFeatherInterp
is either AEGP_MaskFeatherInterp_NORMAL
or AEGP_MaskFeatherInterp_HOLD_CW
.
AEGP_MaskFeatherType
is either AEGP_MaskFeatherType_OUTER
or AEGP_MaskFeatherType_INNER
.
This suite enables AEGPs to get and set the text associated with text layers.
Note: to get started, retrieve an AEGP_TextDocumentH
by calling AEGP_GetLayerStreamValue
, above, and passing AEGP_StreamType_TEXT_DOCUMENT
as the AEGP_StreamType
.
Working With Text Layers¶
This suite enables AEGPs to get and set the text associated with text layers.
AEGP_TextDocumentSuite1¶
Function |
Purpose |
---|---|
|
Retrieves the UTF-16, NULL-terminated string used in the Note: After Effects will allocate the
|
|
Specifies the text to be used by the
|
Working With Text Outlines¶
The AEGP_TextLayerSuite
provides access to the actual outlines of the text used by text layers.
Once you have a path, you can manipulate it with PF_PathQuerySuite1 and PF_PathDataSuite.
AEGP_TextLayerSuite1¶
Function |
Purpose |
---|---|
|
Allocates and returns a handle to the
|
|
Dispose of those outlines we allocated on your behalf!
|
|
Retrieves the number of text outlines for the layer.
|
|
Returns a
|
Utility Functions¶
The Utility suite supplies error message handling, AEGP version checking and access to the undo stack.
Everything you need to keep After Effects and your plug-in tidy.
AEGP_UtilitySuite6¶
Function |
Purpose |
---|---|
|
Displays dialog with name of the AEGP followed by the string passed.
|
|
New in CC. Displays dialog with name of the AEGP followed by the unicode string passed.
|
|
Returns version of
|
|
Silences errors. Must be balanced with The
|
|
Re-enables errors.
|
|
Add action(s) to the undo queue. The user may undo any actions between this and The
|
|
Ends the undo list.
|
|
Returns an AEGP_PluginID, which effect plug-ins can then use in calls to many functions throughout the AEGP API. Effects should only call this function once, during The first parameter can be any value, and the second parameter should be the plug-in's match name.
|
|
Retrieves After Effects' HWND; useful when displaying your own dialog on Windows. If you don't use After Effects' HWND, your modal dialog will not prevent interaction with the windows behind, and pain will ensue.
|
|
Toggles whether or not floating palettes are displayed. Use this with care; users get twitchy when you unexpectedly change the UI on them.
|
|
Retrieves the foreground color from the paint palette.
|
|
Retrieves the background color from the paint palette.
|
|
Sets the foreground color in the paint palette.
|
|
Sets the background color in the paint palette.
|
|
Retrieves the fill color from the character palette.
|
|
Retrieves the stroke color from the character palette.
|
|
Sets the fill color in the character palette.
|
|
Sets the stroke color in the character palette.
|
|
Returns whether or not the fill color is frontmost. If it isn't, the stroke color is frontmost.
|
|
Returns an
|
|
Returns an
|
|
This routine is safe to call from threads other than the main thread. It is asynchronous and will return before the idle handler is called. The suite functions to get this function pointer are not thread safe; save it off in the main thread for use by the child thread.
|
|
Returns whether After Effects is running without a user interface.
|
|
Sends a string to the OS console.
|
|
Writes a message to the debug log, or to the OS command line if After Effects was launched with the "-debug" option.
|
|
Retrieves the last error message displayed to the user, and its associated error number. Pass in the size of the character buffer to be returned.
|
|
Returns
|
|
Have After Effects execute a script. The script passed in can be in either UTF-8 or the current application encoding (if platform_encodingB is passed in as TRUE). The two out arguments are optional. The value of the last line of the script is what is passed back in outResultPH0.
|
|
Returns
|
|
On macOS, returns a Always returns
|
|
Rescans the system font list.
|
|
New in CC. Returns a particular path associated with the plug-in:
|
Persistent Data Suite¶
Plug-ins have read and write access to persistent data in After Effects' preferences. AEGPs may add and manage their own persistent data using the following suite. The data entries are accessed by (section key, value key) pairs. It is recommended that plug-ins use their matchname as their section key, or as a prefix if using multiple section keys.
The available data types are A_long
, A_FpLong
, strings, and void*
. A_FpLongs
are stored with 6 decimal places of precision. There is no provision for specifying a different precision. String data supports the full 8-bit space. Only 0x00 is reserved for string ending. This makes them ideal for storing UTF-8 encoded strings, ISO 8859-1, and plain ASCII. Both section keys and value keys are of this type. For data types not represented by the simple data types provided, use data handles containing your custom data. void* unstructured data allows you to store any kind of data. You must pass in a size in bytes along with the data.
When calling any of the functions to retrieve the value of a key, if a given key is not found, the default value is both written to the blob and returned as the value; if no default is provided, a blank value will be written and returned.
Note that this data is stored in the application's preferences, not in the project. As of 6.5, there is no way to store opaque AEGP-generated data in an After Effects project.
After Effects can handle plug-ins which change the preferences during their application; it checks the in-RAM copy of the prefs before acting upon pref-able settings, rather than relying on the saved prefs. It's like we *planned* this, or something!
AEGP_PersistentDateSuite4¶
Function |
Purpose |
---|---|
|
Obtains the handle to all persistent application data. Modifying this will modify the application. The
|
|
Obtains the number of sections in the application blob.
|
|
Obtains the key at the given index.
|
|
Returns whether or not a given key/value pair exists with the blob.
|
|
Retrieves the number of value keys in the section.
|
|
Retrieves the value of the indexed key.
|
Note
For the functions below, if a given key is not found, the default value is both written to the blob and returned as the value; if no default is provided, a blank value will be written and returned.
Function |
Purpose |
---|---|
|
Obtains the value associated with the given section's key. If using in-memory data structures, watch for endian issues.
|
|
Obtains the data located at a given section's value.
|
|
Obtains the string for a given section key's value (and indicates its length in
|
|
Obtains the
|
|
Obtains the
|
|
New in CC. Obtains the
|
|
New in CC. Obtains the
|
|
Sets the given section key's value to the handle passed in.
|
|
Sets the given section key's value to the data contained in
|
|
Sets the given section key's string to
|
|
Sets the given section key's value to
|
|
Sets the given section key's value to
|
|
New in CC. Sets the given section key's value to
|
|
New in CC. Sets the given section key's value to
|
|
Removes the given section's value from the blob.
|
|
Get the path to the folder containing After Effects' preference file. The path is a handle to a NULL-terminated A_UTF16Char string, and must be disposed with
|
Color Management¶
We've provided a function so AEGPs can obtain information on After Effects' current color management settings.
AEGP_ColorSettingsSuite5¶
Function |
Purpose |
---|---|
|
Retrieves the current opaque
|
|
Returns whether there is a colorspace transform applied to the current item view.
|
|
Changes the view colorspace of the source to be the working colorspace of the destination. Source and destination can be the same.
|
|
Retrieves the opaque current working space ICC profile. Must be disposed. The "New" in the name does not indicate that you're making up a new profile; rather, it's part of our function naming standard; anything with "New" in the name allocates something which the caller must dispose.
|
|
Retrieves a new
|
|
Retrieves a new ICC profile (stored in an Returned
|
|
Returns a textual description of the specified color profile. Text will be a null-terminated UTF16 string, which must be disposed by the caller.
|
|
Disposes of a color profile, obtained using other functions in this suite.
|
|
Returns a floating point number approximating the gamma setting used by the specified color profile.
|
|
Returns whether the specified color profile is RGB.
|
|
Sets the working space to the passed color profile.
|
|
Check if the current project is using the OCIO color engine or not. Returns
|
|
Returns the OCIO configuration file used by the project. Returned config_filePH is a handle of
|
|
Returns the absolute file path to the OCIO configuration used by the project The returned config_filePH is a handle of
|
|
Returns the working color space of the project in OCIO mode. The returned ocio_working_colorspaceH is a handle of
|
|
Returns the Display and View transforms used by the project. The returned ocio_displayH and ocio_viewH are handles of
|
Render Suites¶
Since we introduced the AEGP API, we've been asked to provide functions for retrieving rendered frames.
These function suites allows you to do just that.
First, specify what you want rendered in the AEGP_RenderOptionsSuite4 or AEGP_LayerRenderOptionsSuite1.
Then do the rendering with AEGP_RenderSuite4.
AEGP_RenderOptionsSuite4¶
Function |
Purpose |
---|---|
|
Returns the If there are no options yet specified, After Effects passes back an
|
|
Duplicates an
|
|
Deletes an
|
|
Sets the render time of an
|
|
Retrieves the render time of the given
|
|
Specifies the time step (duration of a frame) for the referenced
|
|
Retrieves the time step (duration of a frame) for the given
|
|
Specifies the field settings for the given
|
|
Retrieves the field settings for the given
|
|
Specifies the AEGP_WorldType of the output of a given
|
|
Retrieves the
|
|
Specifies the downsample factor (with independent horizontal and vertical settings) for the given
|
|
Retrieves the downsample factor for the given
|
|
Specifies the region of interest sub-rectangle for the given
|
|
Retrieves the region of interest sub-rectangle for the given
|
|
Specifies the
|
|
Retrieves the
|
|
Gets the
Factoid: this was added to facilitate live linking with Premiere Pro. |
|
Sets the
|
|
Passes back a boolean that is true if the render guide layers setting is on.
|
|
Specify whether or not to render guide layers.
|
|
Get the render quality of the render queue item. Quality can be either
|
|
Set the render quality of the render queue item.
|
AEGP_LayerRenderOptionsSuite1¶
Note
New in 13.0
Function |
Purpose |
---|---|
|
Returns the Render time is set to the layer's current time, time step is set to layer's frame duration, ROI to the layer's nominal bounds, and EffectsToRender to "all".
|
|
Returns the Render time is set to the layer's current time, time step is set to layer's frame duration, ROI to the layer's nominal bounds, and EffectsToRender to the index of
|
|
Duplicates an
|
|
Deletes an
|
|
Sets the render time of an
|
|
Retrieves the render time of the given
|
|
Specifies the time step (duration of a frame) for the referenced
|
|
Retrieves the time step (duration of a frame) for the given
|
|
Specifies the AEGP_WorldType of the output of a given
|
|
Retrieves the AEGP_WorldType of the given
|
|
Specifies the downsample factor (with independent horizontal and vertical settings) for the given
|
|
Retrieves the downsample factor for the given
|
|
Specifies the AEGP_MatteMode for the given
AEGP_MatteMode will be one of the following:
|
|
Retrieves the AEGP_MatteMode for the given
|
AEGP_RenderSuite4¶
Function |
Purpose |
---|---|
|
Retrieves an Create the Optionally, the AEGP can pass a function to be called by After Effects if the user cancels the current render, as well as a refcon (constant reference to opaque data) for use during that function.
|
|
New in CC 2014. This allows frame checkout of a layer with effects applied at non-render time. This is useful for an operation that requires the frame, for example, when a button is clicked and it is acceptable to wait for a moment while it is rendering. Note: Since it is not asynchronous, it will not solve the general problem where custom UI needs to draw based on the frame. Retrieves an Create the You can actually use Optionally, the AEGP can pass a function to be called by After Effects if the user cancels the current render, as well as a refcon (constant reference to opaque data) for use during that function.
|
|
Call this function as soon as your AEGP is done accessing the frame. After Effects makes caching decisions based on which frames are checked out, so don't hog them!
|
|
Retrieves the pixels (
|
|
Retrieves an Remember that it's possible for only those portions of an image that have been changed to be rendered, so it's important to be able to check whether or not that includes the portion you need.
|
|
Given two sets of
|
|
Obtains an The plug-in must dispose of the returned
NOTE: This function, if called as part of |
|
Retrieves the current The
|
|
Returns whether the video of an AEGP_ItemH has changed since the given Note: this does not track changes in audio.
|
|
Returns whether this frame would be worth rendering externally and checking in to the cache. A speculative renderer should check this twice: before sending the frame out to render and when it is complete, before calling This function is to be used with
|
|
Provide a rendered frame (
|
|
New in CS6. Retrieve a GUID for a rendered frame. The memory handle passed back must be disposed.
|
The AEGP_World As We Know It¶
AEGP_Worlds
are the common format used throughout the AEGP APIs to describe frames of pixels.
AEGP_WorldSuite3¶
Function |
Purpose |
---|---|
|
Returns an allocated, initialized
|
|
Disposes of an
|
|
Returns the type of a given
AEGP_WorldType will be one of the following:
|
|
Returns the width and height of the given
|
|
Returns the rowbytes for the given
|
|
Returns the base address of the Will return an error if used on a non-8bpc world.
|
|
Returns the base address of the Will return an error if used on a non-16bpc world.
|
|
Returns the base address of the Will return an error if used on a non-32bpc world.
|
|
Populates and returns a PF_EffectWorld representing the given NOTE: This does not give your plug-in ownership of the world referenced; destroy the source
|
|
Performs a fast blur on a given
|
|
Creates a new
|
|
Disposes of an
|
|
Retrieves an AEGP_WorldH referring to the given NOTE: This doesn't allocate a new world, it simply provides a reference to an existing one.
|
Track Mattes and Transform Functions¶
Use the AEGP_CompositeSuite
to copy pixel worlds, operate on track mattes, and apply transfer functions.
AEGP_CompositeSuite2¶
Function |
Purpose |
---|---|
|
For the given
|
|
Mattes the pixels in a NOTE: Unlike most of the other pixel mangling functions provided by After Effects, this one doesn't take
|
|
Blends two
|
|
Copies a rectangle of pixels (pass a
|
|
Copies a rectangle of pixels (pass a
|
|
Copies a rectangle of pixels (pass a
|
Work With Audio¶
AEGP_SoundDataSuite
allows AEGPs to obtain and manipulate the audio associated with compositions and footage items.
Audio-only items may be added to the render queue using AEGP_RenderNewItemSoundData()
.
AEGP_SoundDateSuite1¶
Function |
Purpose |
---|---|
|
Creates a new
|
|
Frees an
|
|
Obtains information about the format of a given
|
|
Locks the
|
|
Unlocks an
|
|
Obtains the number of samples in the given
|
Audio Settings¶
Audio render settings are represented using the AEGP_SoundDataFormat
.
struct AEGP_SoundDataFormat {
A_FpLong sample_rateF;
AEGP_SoundEncoding encoding;
A_long bytes_per_sampleL;
A_long num_channelsL; // 1 for mono, 2 for stereo
} AEGP_SoundDataFormat;
bytes_per_sampleL
is always either 1
, 2
, or 4
, and is ignored if float encoding is specified.
AEGP_SoundEncoding
is one of the following:
AEGP_SoundEncoding_UNSIGNED_PCM
AEGP_SoundEncoding_SIGNED_PCM
AEGP_SoundEncoding_FLOAT
Render Queue Suite¶
This suite allows AEGPs to add items the to render queue (using default options), and control the basic state of the render queue.
AEGP_RenderQueueSuite1¶
Function |
Purpose |
---|---|
|
Adds a composition to the render queue, using default options.
|
|
Sets the render queue to one of three valid states. It is not possible to go from stopped to paused.
|
|
Obtains the current render queue state.
|
Render Queue Item Suite¶
Manipulate all aspects of render queue items using this suite.
AEGP_RQItemSuite4¶
Function |
Purpose |
---|---|
|
Returns the number of items currently in the render queue.
|
|
Returns an
|
|
Returns the next To get the first
|
|
Returns the number of output modules applied to the given
|
|
Returns
|
|
Controls whether or not the Returns an error if called during rendering. This function will return:
|
|
Returns the time (in seconds, since 1904) that rendering began.
|
|
Returns the time elapsed since rendering began.
|
|
Returns the log type for the referenced
|
|
Specifies the log type to be used with the referenced
|
|
Removes the specified output module from the referenced
|
|
Updated to support Unicode in Retrieves the comment associated with the referenced
|
|
Updated to support Unicode in Specifies the comment associated with the referenced
|
|
Retrieves the
|
|
Deletes the render queue item. Undoable.
|
Render Queue Monitor Suite¶
New in CS6. This suite provides all the info a render queue manager needs to figure out what is happening at any point in a render.
AEGP_RenderQueueMonitorSuite1¶
Function |
Purpose |
||||
---|---|---|---|---|---|
|
Register a set of plug-in-defined functions to be called by the render queue. Use the refcon to pass in data that you want to use later on when your plug-in-defined functions in
The struct _AEGP_RQM_FunctionBlock1 {
The
|
|
|
|
|
|
Deregister from the render queue.
|
||||
|
Obtain the current project name. The project name is a handle to a NULL-terminated A_UTF16Char string, and must be disposed with
|
||||
|
Obtain the app version. The app version is a handle to a NULL-terminated A_UTF16Char string, and must be disposed with
|
||||
|
Obtain the number of job items.
|
||||
|
Get the job with the index specified.
|
||||
|
Get the number of render settings for the job with the index specified.
|
||||
|
Get a specific render setting of a specific job. The setting name and value are handles to NULL-terminated A_UTF16Char strings, and must be disposed with
|
||||
|
Get the number of output modules for the job with the index specified.
|
||||
|
Get the number of settings for the output module with the index specified.
|
||||
|
Get a specific setting of a job item output module. The setting name and value are handles to NULL-terminated A_UTF16Char strings, and must be disposed with
|
||||
|
Get the number of output module warnings for a job item.
|
||||
|
Get a specific warning of a specific output module for a specific job item. The warning value is a handle to NULL-terminated A_UTF16Char string, and must be disposed with
|
||||
|
Get the number of properties for a job item frame.
|
||||
|
Get a specific property on a job item frame. The property name and values are handle to NULL-terminated A_UTF16Char strings, and must be disposed with
|
||||
|
Get the number of properties for a job item output module.
|
||||
|
Get a specific property off a job item output module. The property name and values are handle to NULL-terminated A_UTF16Char strings, and must be disposed with
|
||||
|
Get a buffer with a JPEG-encoded thumbnail of the job item frame. Pass in the maximum width and height, and the actual dimensions will be passed back.
|
Output Module Suite¶
Every item in the render queue has at least one output module specified.
Use this suite to query and control all aspects of the output modules attached to a given render item.
You may also add and remove output modules.
Factoid: For each frame rendered for a given render item, the list of output modules is traversed. So, for frame 0, output module 0, then 1, then 2 are called.
AEGP_OutputModuleSuite4¶
Function |
Purpose |
---|---|
|
Retrieves the indexed output module. NOTE:
|
|
Retrieves the embedding setting specified for the referenced
|
|
Specifies the embedding setting for the referenced
|
|
Retrieves the post-render action setting for the referenced
|
|
Specifies the post-render action setting for the referenced
|
|
Retrieves which output types are enabled for the referenced
NOTE: These are flags, not an enumeration. |
|
Specifies which output types are enabled for the referenced
|
|
Retrieves which video channels are enabled for output in the referenced AEGP_OutputModuleRefH.
|
|
Specifies which video channels are enabled for output in the referenced
|
|
Retrieves the stretch information enabled for the referenced
|
|
Retrieves the stretch information enabled for the referenced
|
|
Retrieves whether or not the cropping is enabled for the referenced
|
|
Specifies whether cropping is enabled for the referenced
|
|
Retrieves whether or not audio output is enabled for the referenced
|
|
Specifies whether or not audio output is enabled for the referenced
|
|
Retrieves the path to which
|
|
Specifies the path to which
|
|
Adds the default output module to the specified
|
|
Retrieves information about the output module.
|
Working With Effects¶
These functions provide a way for effects (and AEGPs) to obtain information about the context of an applied effect.
Note
Any time you modify or rely on data from outside the normal render pipeline, you run the risk of dependency problems.
There is no way for After Effects to know that you depend on this external information; consequently, you will not be notified if it changes out from under you.
AEGP_PFInterfaceSuite1¶
Function |
Purpose |
---|---|
|
Obtain the layer handle of the layer to which the effect is applied.
|
|
Obtain the
|
|
Retreive the composition time corresponding to the effect's layer time.
|
|
Obtain the camera (if any) being used by After Effects to view the effect's layer.
|
|
Obtain the transform used to move between the layer's coordinate space and that of the containing composition.
NOTE: In cases where the effect's input layer has square pixels, but is in a non-square pixel composition, you must correct for the pixel aspect ratio by premultiplying the matrix by |
AEGP_GetEffectCameraMatrix Notes¶
The model view for the camera matrix is inverse of the matrix obtained from AEGP_GetEffectCameraMatrix()
.
Also note that our matrix is row-based; OpenGL's is column-based.
Do This Many Times¶
Utilizes multiple processors (if available) for your computations.
AEGP_IterateSuite1¶
Function |
Purpose |
---|---|
|
Ask After Effects how many threads are currently available.
|
|
Specify a function for After Effects to manage on multiple processors. Can be any function pointer specified by See Private Data for a description of how
|
File Import Manager Suite¶
The FIMSuite allows file types handled by AEGPs to appear as part of the After Effects import dialog, and drag-and-drop messaging.
These are not for use by AEIOs! Rather, they are for importing projects which are best represented as After Effects compositions.
AEGP_FIMSuite3¶
Function |
Purpose |
---|---|
|
Registers the name of the file type(s) supported by the plug-in. Upon return,
|
|
Registers an array of file types and file extensions (the two arrays need not be of equal length) supported by the AEGP.
|
|
Register the AEGP functions which will respond to import of different filetypes.
|
|
Designates an item as having been imported (possibly replacing an existing item), and sets associated import options.
|