New Kids On The Function Block¶
During its main entry point function, each AEIO plug-in must fill in an AEIO_FunctionBlock, providing pointers to the functions After Effects will call for different file-related tasks.
The table below shows which functions are needed for input, and which ones are needed for output. For a bare-bones implementation, start with the functions that are noted as "Required" in the right column. You can often invoke "best-case" behavior by having After Effects handle the call for you (by returning AEIO_Err_USE_DFLT_CALLBACK
).
For a barebones AEIO for video input only, implement the following functions: AEIO_InitInSpecFromFile
or AEIO_InitInSpecInteractive
(depending on whether the source is a file or interactively generated), AEIO_DisposeInSpec
, AEIO_GetInSpecInfo
, AEIO_DrawSparseFrame
, AEIO_CloseSourceFiles
, and AEIO_InqNextFrameTime
(using AEIO_Err_USE_DFLT_CALLBACK
is fine).
Starting from the IO sample, it is best to leave the other functions defined too, and fill them in further as needed.
AEIO_FunctionBlock4¶
Function |
Response |
I or O? |
Required? |
---|---|---|---|
|
Given a file path, describe its contents to After Effects in the provided The file path is a NULL-terminated UTF-16 string with platform separators.
|
Input |
Yes, for file-based media |
|
Using some form of user interaction (and not a file path provided by After Effects), describe the audio and video your generated AEIO_InSpecH contains.
|
Input |
Yes, for interactiv ely generated media |
|
Free an
|
Input |
Yes |
|
For the given Obtain the unflattened options handle using
|
Input |
No |
|
For the given
|
Input |
No |
|
|
Input |
No |
|
|
Input |
Yes |
|
Provide a few strings in
This function gets called OFTEN; every time we refresh the project panel. Keep allocations to a minimum. In the AEIOs that ship with After Effects, we check for a valid This is important; if your AEIO handles still images, this function will get called for the folder containing the stills. Hopefully, there won't be an optionsH associated with it (unless you're writing a truly bizarre AEIO). |
Input |
Yes |
|
Draw a frame from the The
NOTE: return data as linear light (1.0), and After Effects will perform any necessary transformations to bring the footage into the working colorspace. |
Input |
Yes |
|
|
Input |
No |
|
|
Input |
No |
|
Here are the values we use internally for common timebases:
|
Input |
No |
|
|
Input |
No |
|
Provide the time of the next frame (in the source footage's timebase) within the
|
Input |
Yes |
|
Perform any initialization necessary for a new
Note The first time your AEIO is used, After Effects caches the last-known-good When testing this function, delete your preferences often. |
Output |
Yes |
|
Describe (in an Note that your output options must be cross-platform, so pay attention to byte ordering issues.
|
Output |
Yes |
|
|
Output |
No |
|
Display an output settings dialog (select TIFF output within After Effects to see when this dialog will occur). Store this information in an options handle using
|
Output |
No |
|
Describe (in text) the output options in an
|
||
|
Update the
|
Output |
No |
|
Return The file path is a NULL-terminated UTF-16 string with platform separators.
|
Output |
Yes |
|
Prepare to add frames to the output file. This is a good time to create the ouput file(s) on disk, and to write any header information to such files. This is also your first opportunity to allocate pixel buffers based on valid output spec values.
|
Output |
Yes, for writing formats that support multiple frames |
|
Add frame(s) to output file. You may pass a pointer to a function you want called if the user interrupts the render.
|
Output |
Yes, for writing formats that support multiple frames |
|
Perform any clean-up associated with adding frames.
|
Output |
Yes, for writing formats that support multiple frames |
|
Output a single frame.
|
Output |
Yes, for writing formats that support a single frame |
|
Indicate in
|
Output |
Yes |
|
|
Output |
Yes |
|
Destroy any options or user data associated with the
|
||
|
Add the given sound to the output file.
|
Output |
Yes, for writing formats with audio |
|
Optional. Do something with idle time.
|
Output |
No |
|
Set See the discussion on Export Bit-Depth.
|
Output |
Yes |
|
|
Output |
Yes |
|
Display a footage options dialog, and indicate whether the user made any changes.
|
Input |
No |
|
Enumerate the auxiliary (beyond red, green, blue and alpha) channels of data contained in an
|
Input |
No |
|
Describe the data type, name, channel, and dimensionality of an auxiliary data channel.
|
Input |
No |
|
Draw the auxiliary channel(s) from an
|
||
|
Free data associated with an auxiliary channel.
|
Input |
No |
|
Enumerate the files needed to render the given This function and
|
Input |
No |
|
Retrieve data from the nth auxiliary file, for the specified frame. The path is a handle to a NULL-terminated A_UTF16Char string, and must be disposed with
|
Input |
No, if no aux files |
|
Close (or open, depending upon closeB) the source files for an When the user Collects Files, the AEIO will first be asked to close its source files, then re-open them.
|
Input |
Yes |
|
Enumerate the units of user data associated with the
|
||
|
Set user data (of the given index and type) for the given
|
Output |
No |
|
Describe the user data (at the index and of the type given) associated with the
|
Input |
No |
|
Associate a marker of the specified type, at the specified frame, with the You may provide an interrupt function to handle user cancellation of this action.
|
Output |
No |
|
Indicate (by setting Note that After Effects has already done basic extension checking; you may wish to open the file and determine whether or not it's valid. This can be a time-consuming process; most AEIOs that ship with After Effects simply return TRUE, and deal with bad files during The file path is a NULL-terminated UTF-16 string with platform separators.
|
Input |
No |
|
Display an audio options dialog.
|
Output |
No |
|
Add a marker, with a flag specifying whether or not this is a composition marker.
|
Output |
No |
|
Describe the output mime type. This is used for XMP support.
|
Output |
No |
What Goes In¶
These functions manage an input specification, After Effects' internal representation of data gathered from any source.
Any image or audio data in After Effects (except solids) is obtained from an input specification handle, or AEIO_InSpecH
.
AEGP_IOInSuite5¶
Function |
Purpose |
---|---|
|
Retrieves the options data (created by your AEIO) for the given
|
|
Sets the options data for the given Must be allocated using the Memory Suite.
|
|
Retrieves the file path for the The file path is a handle to a NULL-terminated A_UTF16Char string, and must be disposed with
|
|
Retrieves the frame rate of the
|
|
Sets the frame rate of the
|
|
Retrieves the bit depth of the image data in the
|
|
Indicates to After Effects the bit depth of the image data in the
|
|
Retrieves the size (in bytes) of the data referenced by the
|
|
Indicates to After Effects the size (in bytes) of the data referenced by the
|
|
Retrieves field information for the
|
|
Specifies field information for the
|
|
Retrieves alpha channel interpretation information for the
|
|
Sets alpha channel interpretation information for the
|
|
Retrieves the duration of the
|
|
Sets the duration of the Note As of 5.5, this must be called, even for frame-based file formats. If you don't set the This will be fixed in future versions.
|
|
Retrieves the width and height of the image data in the
|
|
Indicates to After Effects the width and height of the image data in the
|
|
Retrieves the width, height, bounding rect, and scaling factor applied to an
|
|
Retrieves the horizontal scaling factor applied to an
|
|
Sets the horizontal scaling factor of an
|
|
Obtains the sampling rate (in samples per second) for the audio data referenced by the
|
|
Sets the sampling rate (in samples per second) for the audio data referenced by the
|
|
Obtains the encoding method (signed PCM, unsigned PCM, or floating point) from an AEIO_InSpecH.
|
|
Sets the encoding method of an AEIO_InSpecH.
|
|
Retrieves the bytes-per-sample (1,2, or 4) from an
|
|
Set the bytes per sample of an
|
|
Determines whether the audio in the
|
|
Sets the audio in an
|
|
If your file format has auxiliary files which you want to prevent users from opening directly, pass it's extension, file type and creator to this function to keep it from appearing in input dialogs.
|
|
In case of RGB data, if there is an embedded icc profile, build an In case of non-RGB data, if there is an embedded non-RGB icc profile or you know the color space the data is in, set the color profile set to NULL, and provide the description as a NULL-terminated unicode string. Doing this disables color management UI that allows user to affect profile choice in the application UI. If you are unpacking non-RGB data directly into working space (to get working space use If you are unpacking non-RGB data into specific RGB color space, you must pass the profile describing this space to Either color profile or profile description should be NULL in this function. You cannot use both.
|
|
Assign a valid RGB color profile to the footage.
|
|
New in CC. Retrieves the native start time of the footage.
|
|
New in CC. Assign a native start time to the footage.
|
|
New in CC. Clear the native start time of the footage. Setting the native start time to 0 using It still means there is a special native start time provided.
|
|
New in CC. Retrieve the drop-frame setting of the footage.
|
|
New in CC. Assign the drop-frame setting of the footage.
|
What Goes Out¶
These functions manage all interactions with an output specification in After Effects' render queue.
AEGPIOOutSuite4¶
Function |
Purpose |
---|---|
|
Retrieves the Options for the
|
|
Sets the Options for the
|
|
Obtains the path for the The file path is a handle to a NULL-terminated A_UTF16Char string, and must be disposed with If
|
|
Obtains the frames per second of the
|
|
Sets the frames per second of the
|
|
Obtains the pixel bit depth of the
|
|
Sets the pixel bit depth of the
|
|
Obtains field information for the
|
|
Set the field information for the
|
|
Obtains alpha interpretation information for the
|
|
Sets the alpha interpretation for the
|
|
Obtains the duration of the
|
|
Sets the duration of the
|
|
Obtains the dimensions of the
|
|
Obtains the horizontal scaling factor of the
|
|
Sets the horizontal scaling factor of the
|
|
Obtains the sampling rate for the
|
|
Sets the sampling rate for the
|
|
Obtains the sound encoding format of the
|
|
Sets the sound encoding format of the
|
|
Obtains the bytes-per-sample of the
|
|
Sets the bytes-per-sample of the
|
|
Obtains the number of sounds channels in the
|
|
Sets the number of sounds channels in the
|
|
Determines whether the
|
|
Obtains the time of the
|
|
Obtains the time of the first frame in the
|
|
Obtains the pulldown phase of the
|
|
Passes back TRUE if there is no
|
|
Returns TRUE if the AEIO should embed a color profile in the output.
|
|
Returns an (opaque) ICC color profile for embedding in the AEIO's output. Must be disposed with
|
|
Returns the Fails if the render queue item is not found, or if
|