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
|
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
|
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 optionsH (using AEGP_GetInSpecOptionsHandle ); if we find one, we use the information from within it. If not, we do nothing.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
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: - 29.97 fps: scale = 100; value= 2997; - 59.94 fps: scale = 50; value = 2997; - 23.976 fps: scale = 125; value = 2997; - 30 fps: scale = 1; value = 30; - 25 fps: scale = 1; value = 25;
|
Input |
No |
|
AEIO_SndQuality may be:- AEIO_SndQuality_APPROX , (this quality is used to draw the audio waveform)- AEIO_SndQuality_LO ,- AEIO_SndQuality_HI
|
Input |
No |
|
|
Input |
Yes |
|
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
|
Output |
Yes |
|
|
Output |
No |
|
Display an output settings dialog (select TIFF output within After Effects to see when this dialog will occur).
|
Output |
No |
|
Describe (in text) the output options in an
|
||
|
Update the
|
Output |
No |
|
|
Output |
Yes |
|
Prepare to add frames to the output file.
|
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 |
|
|
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
|
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
|
Input |
No |
|
Retrieve data from the nth auxiliary file, for the specified frame.
|
Input |
No, if no aux files |
|
Close (or open, depending upon closeB) the source files for an
- TRUE for close- FALSE for open.
|
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
|
Output |
No |
|
Indicate (by setting
|
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
|
|
Retrieves the file path for the
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
Returns the
|