### Frame Setup Function Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Performs necessary setup immediately before rendering a frame. ```APIDOC ## PR_FrameSetupFunc ### Description Perform any setup necessary to render a frame (called immediately before rendering). ### Function Signature ```c PR_FrameSetupFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH PR_RenderContextH render_contextH, PR_GlobalDataH global_dataH, PR_InstanceDataH instance_dataH, PR_RenderDataH *render_dataPH); ``` ``` -------------------------------- ### Global Setup and Teardown for Artisan Plugins Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Functions for initializing and cleaning up global resources used by Artisan plugins. Global setup is called once after GP_Main, and teardown must free any allocated global data. ```c PR_GlobalSetupFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_GlobalDataH *global_dataPH); ``` ```c PR_GlobalSetdownFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_GlobalDataH global_dataH); ``` -------------------------------- ### Instance Setup and Teardown for Artisan Plugins Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Functions for managing instance-specific data within Artisan plugins. Setup allocates resources for each instance, and teardown deallocates them. This is crucial for managing memory per plugin instance. ```c PR_InstanceSetupFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH, PR_GlobalDataH global_dataH, PR_InstanceFlags flags, PR_FlatHandle flat_dataH0, PR_InstanceDataH *instance_dataPH); ``` ```c PR_InstanceSetdownFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH, PR_GlobalDataH global_dataH, PR_InstanceDataH instance_dataH); ``` -------------------------------- ### AEGP Plugin Entry Point Source: https://ae-plugins.docsforadobe.dev/aegps/implementation The primary function called when an AEGP plugin is loaded by After Effects. It is responsible for initial setup and registration of other functions. ```APIDOC ## AEGP_PluginInitFuncPrototype ### Description This is the main entry point function for an AEGP plugin, called once during After Effects launch. All subsequent interactions with the AEGP API are handled through functions registered here. ### Method (Not applicable, this is a function prototype) ### Endpoint (Not applicable, this is a function prototype) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body (None) #### Function Parameters - **pica_basicP** (*SPBasicSuite*) - Pointer to the basic PICA suite, providing access to core functionalities. - **major_versionL** (*A_long*) - The major version of the AEGP API. - **minor_versionL** (*A_long*) - The minor version of the AEGP API. - **aegp_plugin_id** (*AEGP_PluginID*) - A unique identifier for the plugin. - **global_refconP** (*AEGP_GlobalRefcon*) - A pointer for storing global plugin-specific data. ### Request Example (Not applicable, this is a function prototype) ### Response #### Success Response (A_Err) Returns an A_Err code indicating success or failure of the initialization. #### Response Example (Not applicable, this is a function prototype) ``` -------------------------------- ### Batch Sampling Setup and Teardown (C) Source: https://ae-plugins.docsforadobe.dev/effect-details/graphics-utility-suites Functions to optimize sampling operations in After Effects. `begin_sampling` prepares for batch sampling, and `end_sampling` signals completion, allowing After Effects to perform setup tasks. ```c PF_Err (*begin_sampling)( PF_ProgPtr effect_ref, PF_Quality qual, PF_ModeFlags mf, PF_SampPB *params); PF_Err (*end_sampling)( PF_ProgPtr effect_ref, PF_Quality qual, PF_ModeFlags mf, PF_SampPB *params); ``` -------------------------------- ### Instance Setup Function Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Allocates and instantiates data specific to each instance of the Artisan plugin. ```APIDOC ## PR_InstanceSetupFunc ### Description Allocate and instantiate any data specific to this instance of your Artisan. ### Function Signature ```c PR_InstanceSetupFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH, PR_GlobalDataH global_dataH, PR_InstanceFlags flags, PR_FlatHandle flat_dataH0, PR_InstanceDataH *instance_dataPH); ``` ``` -------------------------------- ### macOS Installer Hints for Plug-in Paths Source: https://ae-plugins.docsforadobe.dev/intro/whats-new Developers can now access macOS plug-in, script, and preset default installation paths via a new plist file: /Library/Preferences/com.Adobe.After Effects.paths.plist. This provides similar functionality to Windows registry paths. ```APIDOC ## macOS Installer Hints for Plug-in Paths ### Description For macOS, developers can now locate the default paths for plug-ins, scripts, and presets by referencing a new property list file. This file, located at `/Library/Preferences/com.Adobe.After Effects.paths.plist`, provides the same path information that was previously accessible via the Windows registry. ### Method Not Applicable (this is a file path information) ### Endpoint Not Applicable ### Parameters Not Applicable ### Request Example Not Applicable ### Response Not Applicable ### Notes * This plist file can be used by installers and scripts to determine the correct directories for writing files, mirroring the functionality of Windows registry keys like `HKEY_LOCAL_MACHINE\SOFTWARE\Adobe\After Effects\13.5`. ``` -------------------------------- ### Set Render Guide Layers Option Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Configures whether guide layers should be rendered. This function takes a handle to render options and a boolean indicating whether to render them. ```c AEGP_SetRenderGuideLayers)( AEGP_RenderOptionsH optionsH, A_Boolean render_themB); ``` -------------------------------- ### AEGP_SetRenderGuideLayers: Enable Render Guide Layers (C) Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Sets whether guide layers should be rendered for the given AEGP_RenderOptionsH. This function allows controlling the inclusion of guide layers in the final output. ```c AEGP_SetRenderGuideLayers( AEGP_RenderOptionsH optionsH, A_Boolean will_render); ``` -------------------------------- ### Get Output Info - AEIO_GetOutputInfo (C) Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Describes the output options in an AEIO_OutSpecH using text. ```c AEIO_GetOutputInfo( AEIO_BasicData *basic_dataP, AEIO_OutSpecH outH, AEIO_Verbiage *verbiage); ``` -------------------------------- ### Global Setdown Function Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Disposes of any global data that was allocated during the global setup phase. ```APIDOC ## PR_GlobalSetdownFunc ### Description Dispose of any global data you allocated. ### Function Signature ```c PR_GlobalSetdownFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_GlobalDataH global_dataH); ``` ``` -------------------------------- ### Get Native Start Time from AEIO_InSpecH (C) Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Retrieves the native start time of the footage. This function is available in CC and later versions and is used to get the timecode at which the footage originates. ```c AEGP_GetInSpecNativeStartTime( AEIO_InSpecH inH, A_Time *startTimeP); ``` -------------------------------- ### AEIO_StartAdding Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Prepares to add frames to the output file. This is the point to create output files, write headers, and allocate pixel buffers. ```APIDOC ## AEIO_StartAdding ### Description Prepares the system for adding frames to the output file. This function should be used to create output files on disk, write any necessary header information, and allocate pixel buffers based on valid output specifications. ### Method Not applicable (this is a function signature) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```c AEIO_StartAdding( AEIO_BasicData *basic_dataP, AEIO_OutSpecH outH, A_long flags); ``` ### Response #### Success Response (200) None (this is a function signature) #### Response Example None ``` -------------------------------- ### Get Next Installed Effect Key - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves the installed key of the next available effect in the After Effects system. It can be used iteratively to enumerate all installed effects. ```c AEGP_GetNextInstalledEffect( AEGP_InstalledEffectKey key, AEGP_InstalledEffectKey *next_keyPH); ``` -------------------------------- ### Get Composition Display Start Time - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves the displayed start time of a composition. It takes a composition handle and a pointer to an A_Time structure to store the start time. ```c AEGP_GetCompDisplayStartTime( AEGP_CompH compH, const A_Time *start_timePT); ``` -------------------------------- ### Start Adding Frames - AEIO_StartAdding (C) Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Prepares to add frames to the output file, allowing for file creation, header writing, and pixel buffer allocation based on output spec values. AEIO_Err_USE_DFLT_CALLBACK is not allowed. ```c AEIO_StartAdding( AEIO_BasicData *basic_dataP, AEIO_OutSpecH outH, A_long flags); ``` -------------------------------- ### Global Setup Function Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Called once after GP_Main to initialize global data common across all plugin instances. ```APIDOC ## PR_GlobalSetupFunc ### Description Called only once, right after `GP_Main`. The global data is common across all instances of the plug-in. If you allocate memory during Global Setup, you must free it during your `global_setdown_func`. ### Function Signature ```c PR_GlobalSetupFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_GlobalDataH *global_dataPH); ``` ``` -------------------------------- ### Get Installed Effects Count - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Returns the total number of effects installed within After Effects. This is useful for iterating through all available effects. ```c AEGP_GetNumInstalledEffects( A_long *num_installed_effectsPL); ``` -------------------------------- ### Get Effect Installed Key - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Obtains the unique installed key for an effect reference. This key is used to identify and reference the effect in other AEGP functions. ```c AEGP_GetInstalledKeyFromLayerEffect( AEGP_EffectRefH effect_refH, AEGP_InstalledEffectKey *installed_keyP); ``` -------------------------------- ### GPU Device Setup and Teardown in After Effects Plugins Source: https://ae-plugins.docsforadobe.dev/effect-basics/command-selectors Handles the initialization and release of GPU resources for After Effects plugins. PF_Cmd_GPU_DEVICE_SETUP is called to initialize and allow the effect to opt-out of a GPU device. PF_Cmd_GPU_DEVICE_SETDOWN is called to release associated resources. ```c typedef struct { void *gpu_data; // effect must dispose. PF_GPU_Framework what_gpu; A_u_long device_index; // For use in conjunction with PrSDKGPUDeviceSuite } PF_GPUDeviceSetdownInput; typedef struct { PF_GPUDeviceSetdownInput input; } PF_GPUDeviceSetdownExtra; ``` -------------------------------- ### After Effects Plug-in Frame Setup Source: https://ae-plugins.docsforadobe.dev/effect-basics/command-selectors Handles frame-specific data allocation and output buffer resizing. It is called before each frame render. If the output buffer size changes, specify new dimensions and origin. Setting width and height to 0 skips rendering for the current frame. Be aware that `PF_Cmd_FRAME_SETUP` and `PF_Cmd_FRAME_SETDOWN` may be called twice if `PF_Outflag_I_EXPAND_BUFFER` is set, without a `PF_Cmd_RENDER` in between. ```c PF_Cmd_FRAME_SETUP ``` -------------------------------- ### New AEGP Functions for I/O Operations Source: https://ae-plugins.docsforadobe.dev/intro/whats-new Details new functions within the AEGP_IOInSuite (version 5) for managing native start time and drop-frame settings of footage. These functions allow plug-ins to get, set, and clear the native start time, as well as get and set the drop-frame status. ```c AEGP_Err AEGP_SetNativeStartTime(AEGP_ContextH h, AEGP_FootageH footage, AEGP_Time time); AEGP_Err AEGP_GetNativeStartTime(AEGP_ContextH h, AEGP_FootageH footage, AEGP_Time *time); AEGP_Err AEGP_ClearNativeStartTime(AEGP_ContextH h, AEGP_FootageH footage); AEGP_Err AEGP_SetDropFrame(AEGP_ContextH h, AEGP_FootageH footage, A_Boolean drop_frame); AEGP_Err AEGP_GetDropFrame(AEGP_ContextH h, AEGP_FootageH footage, A_Boolean *drop_frame); ``` -------------------------------- ### Obtain Start Frame Time for AEIO_OutSpecH Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Gets the time of the first frame within the `AEIO_OutSpecH`. This function takes the output specification handle and a pointer to an `A_long` which will store the start frame's time. ```c AEGP_GetOutSpecStartFrame( AEIO_OutSpecH outH, A_long *start_frameP); ``` -------------------------------- ### Get Effect Category - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves the menu category of an installed effect. This determines where the effect appears in After Effects' effect menus. ```c AEGP_GetEffectCategory( AEGP_InstalledEffectKey installed_key, A_char *categoryZ); ``` -------------------------------- ### Get and Set Layer Offset (C) Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Functions to retrieve and modify a layer's offset from the start of the composition. `AEGP_SetLayerOffset` is undoable. ```c AEGP_GetLayerOffset( AEGP_LayerH layerH, A_Time *offsetPT); AEGP_SetLayerOffset( AEGP_LayerH layerH, A_Time *offsetPT); ``` -------------------------------- ### Define Windows on Arm Entry Point in Resource File Source: https://ae-plugins.docsforadobe.dev/intro/windows-on-arm-support This snippet shows how to define the main entry point for Windows on Arm builds within a plugin's resource file. It assumes a Windows environment and specifies `EffectMain` as the entry point for both Intel and Arm64 targets. This is crucial for After Effects to correctly load the plugin on Windows on Arm. ```cpp #if defined(AE_OS_WIN) CodeWinARM64 {"EffectMain"}, CodeWin64X86 {"EffectMain"}, #endif ``` -------------------------------- ### Get Effect Name - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves the user-facing name of an installed effect using its key. The name is stored in the provided character buffer. ```c AEGP_GetEffectName( AEGP_InstalledEffectKey installed_key, A_char *nameZ); ``` -------------------------------- ### GLator Sample - OpenGL Context Management Source: https://ae-plugins.docsforadobe.dev/intro/whats-new The GLator sample project has been updated to demonstrate proper OpenGL context management within an effect plug-in. This ensures that OpenGL resources are correctly initialized, used, and released, preventing potential rendering issues. ```c++ // Conceptual structure for OpenGL context management in an After Effects effect // This is a simplified representation. Actual implementation involves AEGP_Suite calls. // Function to create/acquire OpenGL context PF_Err SetupOpenGLContext(PF_EffectWorld *world) { // ... Use AEGP_GetGLContext() or similar to get/create context ... // ... Perform necessary OpenGL initializations ... return PF_Err_NONE; } // Function to render using OpenGL PF_Err RenderWithOpenGL(PF_EffectWorld *world) { // ... Ensure context is current ... // ... Perform OpenGL drawing commands ... return PF_Err_NONE; } // Function to release OpenGL context PF_Err ReleaseOpenGLContext(PF_EffectWorld *world) { // ... Use AEGP_ReleaseGLContext() or similar ... // ... Clean up any OpenGL resources ... return PF_Err_NONE; } // In the effect's main processing function (e.g., PF_Cmd_RENDER): // SetupOpenGLContext(world); // RenderWithOpenGL(world); // ReleaseOpenGLContext(world); ``` -------------------------------- ### Get Expression Text - AEGP_GetExpression Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves the text of an expression. Starting from suite version 5 (After Effects 15.0 and later), this function supports Unicode. ```c AEGP_GetExpression( AEGP_PluginID aegp_plugin_id, AEGP_StreamRefH streamH, AEGP_MemHandle *unicodeHZ); ``` -------------------------------- ### Initialize Input Specification from File Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Initializes an AEIO_InSpecH by describing the contents of a file. It uses AEGP_IOInSuite calls to set image and audio properties like depth, dimensions, alpha interpretation, channels, and sample rate. The file path is expected as a null-terminated UTF-16 string with platform separators. ```c AEIO_Err AEIO_InitInSpecFromFile( AEIO_BasicData *basic_dataP, const A_UTF16Char *file_pathZ, AEIO_InSpecH inH); ``` -------------------------------- ### Get Composition Work Area Start Time (AEGP C) Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves the time at which the current work area begins in the specified composition. This is useful for scripting operations related to time ranges. ```c AEGP_GetCompWorkAreaStart( AEGP_CompH compH, A_Time *startPT); ``` -------------------------------- ### After Effects Plug-in Audio Setup Source: https://ae-plugins.docsforadobe.dev/effect-basics/command-selectors Called before each audio render to request input audio time spans and to allocate/initialize sequence-specific data. If your effect needs input audio from a different time span than the output, update the `startsampL` and `endsampL` fields in `PF_OutData`. -------------------------------- ### Get Layer by Index - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves a handle to a specific layer within a composition using its index. Layer indexing starts from 0 for the foremost layer. This is useful for accessing layers sequentially or by their position. ```c AEGP_GetCompLayerByIndex( AEGP_CompH compH, A_long layer_indexL, AEGP_LayerH *layerPH); ``` -------------------------------- ### Handle Exceptions in AE Plugin Entry Point for Apple Silicon Source: https://ae-plugins.docsforadobe.dev/intro/apple-silicon-support This C++ code demonstrates how to wrap the main entry point of an After Effects plugin (`EffectMain`) within a try/catch block. This is essential for handling exceptions correctly on Apple Silicon, as unhandled exceptions propagating through 'C' functions can lead to program termination due to ABI changes. ```cpp PF_Err EffectMain ( PF_Cmd cmd, PF_InData *in_data, PF_OutData *out_data, PF_ParamDef *params[], PF_LayerDef *output ) { try { /* Your code here */ } catch { /* return most appropriate PF_Err */ } } ``` -------------------------------- ### Get Layer In Point - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves the time of the first visible frame for a layer, expressed either in composition time or layer time. In layer time, the in-point is always considered 0. This function helps determine the start of a layer's active period. ```c AEGP_GetLayerInPoint( AEGP_LayerH layerH, A_Time *in_pointPT); ``` -------------------------------- ### AEIO_InitInSpecInteractive Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Initializes an AEIO_InSpecH by describing audio and video content through user interaction, rather than a file path provided by After Effects. ```APIDOC ## AEIO_InitInSpecInteractive ### Description 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. ### Method AEIO Function (Internal API) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```c AEIO_InitInSpecInteractive( AEIO_BasicData *basic_dataP, AEIO_InSpecH inH); ``` ### Response #### Success Response N/A (Function modifies `AEIO_InSpecH`) #### Response Example None ``` -------------------------------- ### Setup Plug-in Parameters with PF_ADD_PARAM Source: https://ae-plugins.docsforadobe.dev/effect-details/interaction-callback-functions Use PF_ADD_PARAM to enumerate plug-in parameters during PF_Cmd_PARAM_SETUP. It's crucial to clear the PF_ParamDef structure before each call using AEFX_CLR_STRUCT to prevent issues. Convenience macros are available for common parameter types. ```c PF_Err PF_ADD_PARAM ( PF_InData *in_data, PF_ParamIndex index, PF_ParamDefPtr def); // Example usage with convenience macros: // PF_ADD_COLOR(...) // PF_ADD_SLIDER(...) // PF_ADD_POPUPX(...) ``` -------------------------------- ### Set Native Start Time for AEIO_InSpecH (C) Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Assigns a native start time to the footage. This CC-specific function allows setting a custom start time for the footage, which is distinct from setting it to 0. ```c AEGP_SetInSpecNativeStartTime( AEIO_InSpecH inH, const A_Time *startTimeP); ``` -------------------------------- ### PF_Cmd_GPU_DEVICE_SETUP Source: https://ae-plugins.docsforadobe.dev/effect-basics/command-selectors Called once per GPU device to initialize and allow the effect to opt out of using the device. Effects that do not set specific flags will not be considered for GPU rendering. ```APIDOC ## PF_Cmd_GPU_DEVICE_SETUP ### Description This selector is called at any time by the host, not more than once for each GPU device. It allows the effect to perform GPU initialization and opt out of using a specific GPU device based on its properties. ### Method Not Applicable (Command Selector) ### Endpoint Not Applicable (Internal Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (This is a command selector, not an API endpoint with a request body). ### Request Example None ### Response #### Success Response - **PF_OutData::out_flags2** (PF_OutFlag2) - Effect is expected to set one or both of the `PF_OutFlag2_SUPPORTS_GPU_RENDER_Fxx` flags if the device and framework in `what_gpu` is supported. #### Response Example None ``` -------------------------------- ### Set Composition Work Area Start and Duration - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Sets the start time and duration of a composition's work area. This operation is undo-able. It takes a composition handle and pointers to A_Time structures for the start and duration. ```c AEGP_SetCompWorkAreaStartAndDuration( AEGP_CompH compH, const A_Time *startPT) const A_Time *durationPT); ``` -------------------------------- ### Runtime Effect Registration in After Effects Source: https://ae-plugins.docsforadobe.dev/intro/whats-new A new entry point allows effects to register basic information with the host at runtime, bypassing legacy PiPL resources. This enables effects to register multiple entry points within a single binary. Premiere Pro supports this feature, with After Effects to follow in a future release. ```c++ // Conceptual example of runtime registration entry point // This is a placeholder and actual implementation would depend on the AEGP API extern "C" AE_EXP PF_Err AEGP_Entry(AEGP_EntryParamRec* in_params) { // Register effect information here without relying on PiPL // For example, using AEGP_RegisterEffectInfo() or similar function return PF_Err_NONE; } ``` -------------------------------- ### Clear Native Start Time from AEIO_InSpecH (C) Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Clears the native start time of the footage. This CC-specific function explicitly removes any previously set native start time, differentiating it from simply setting the time to 0. ```c AEGP_ClearInSpecNativeStartTime( AEIO_InSpecH inH); ``` -------------------------------- ### AEGP_GetRenderGuideLayers: Check Render Guide Layers (C) Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Passes back a boolean that is true if the render guide layers setting is enabled for the given AEGP_RenderOptionsH. This setting affects whether guide layers are included in the final render. ```c AEGP_GetRenderGuideLayers)( AEGP_RenderOptionsH optionsH, A_Boolean *will_renderPB); ``` -------------------------------- ### Frame Selectors Source: https://ae-plugins.docsforadobe.dev/effect-basics/command-selectors Commands related to setting up, rendering, and cleaning up individual frames. ```APIDOC ## PF_Cmd_FRAME_SETUP ### Description Allocate any frame-specific data. This is sent immediately before each frame is rendered, to allow for frame-specific setup data. If your effect changes the size of its output buffer, specify the new output height, width, and relative origin. ### Method Not Applicable (Command Selector) ### Endpoint Not Applicable ### Parameters None ### Request Example None ### Response #### Success Response - **width** (integer) - New output width if changed. - **height** (integer) - New output height if changed. - **origin_x** (integer) - Relative origin X of the new output buffer. - **origin_y** (integer) - Relative origin Y of the new output buffer. ### Response Example ```json { "width": 1920, "height": 1080, "origin_x": 0, "origin_y": 0 } ``` ``` ```APIDOC ## PF_Cmd_RENDER ### Description Render the effect into the output, based on the input frame and any parameters. This render call can only support 8-bit or 16-bit per channel rendering. 32-bit per channel rendering must be handled in `PF_Cmd_SMART_RENDER`. All fields in `PF_InData` are valid. ### Method Not Applicable (Command Selector) ### Endpoint Not Applicable ### Parameters None ### Request Example None ### Response #### Success Response - **output_buffer** (pointer) - Pointer to the rendered output buffer. ### Response Example ```json { "output_buffer": "0x..." } ``` ``` ```APIDOC ## PF_Cmd_FRAME_SETDOWN ### Description Free any frame data allocated during `PF_Cmd_FRAME_SETUP`. ### Method Not Applicable (Command Selector) ### Endpoint Not Applicable ### Parameters None ### Request Example None ### Response #### Success Response None ### Response Example None ``` -------------------------------- ### Frame Setdown Function Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Disposes of any setup data allocated during frame setup, immediately after rendering. ```APIDOC ## PR_FrameSetdownFunc ### Description Dispose of any setup data allocated during `frame_setup` (sent immediately after rendering). ### Function Signature ```c PR_FrameSetdownFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH PR_RenderContextH render_contextH, PR_GlobalDataH global_dataH, PR_InstanceDataH instance_dataH, PR_RenderDataH render_dataH); ``` ``` -------------------------------- ### AEIO_GetOutputInfo Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Provides textual descriptions of the output options configured in an AEIO_OutSpecH. ```APIDOC ## AEIO_GetOutputInfo ### Description Describes the output options currently set in an `AEIO_OutSpecH` using textual verbiage. ### Method Not applicable (this is a function signature) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```c AEIO_GetOutputInfo( AEIO_BasicData *basic_dataP, AEIO_OutSpecH outH, AEIO_Verbiage *verbiage); ``` ### Response #### Success Response (200) None (this is a function signature) #### Response Example None ``` -------------------------------- ### Set Composition Display Start Time - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Sets the displayed start time of a composition. This operation is not undo-able and does not affect the composition's duration. ```c AEGP_SetCompDisplayStartTime( AEGP_CompH compH, const A_Time *start_timePT); ``` -------------------------------- ### Audio Selectors Source: https://ae-plugins.docsforadobe.dev/effect-basics/command-selectors Commands related to setting up, rendering, and cleaning up audio segments. ```APIDOC ## PF_Cmd_AUDIO_SETUP ### Description Sent before every audio render. Request a time span of input audio. Allocate and initialize any sequence-specific data. If your effect requires input from a time span other than the output time span, update the `startsampL` and `endsampL` field in `PF_OutData`. ### Method Not Applicable (Command Selector) ### Endpoint Not Applicable ### Parameters None ### Request Example None ### Response #### Success Response - **startsampL** (integer) - Starting sample index for input audio. - **endsampL** (integer) - Ending sample index for input audio. ### Response Example ```json { "startsampL": 0, "endsampL": 44100 } ``` ``` ```APIDOC ## PF_Cmd_AUDIO_RENDER ### Description Populate PF_OutData.dest_snd with effect-ed audio. All fields in `PF_InData` are valid. If your response to this selector is interrupted (your calls to `PF_ABORT` or `PF_PROGRESS` returns an error code), your results will not be used. ### Method Not Applicable (Command Selector) ### Endpoint Not Applicable ### Parameters None ### Request Example None ### Response #### Success Response - **dest_snd** (pointer) - Pointer to the processed audio data. ### Response Example ```json { "dest_snd": "0x..." } ``` ``` ```APIDOC ## PF_Cmd_AUDIO_SETDOWN ### Description Free memory allocated during `PF_Cmd_AUDIO_SETUP`. ### Method Not Applicable (Command Selector) ### Endpoint Not Applicable ### Parameters None ### Request Example None ### Response #### Success Response None ### Response Example None ``` -------------------------------- ### List Binaries and Source Files (Windows) Source: https://ae-plugins.docsforadobe.dev/effect-details/multi-frame-rendering-in-ae This command outputs a list of binaries and the source files they pull data from, helping to identify changed files and their dependencies. ```batch CheckThreadSafeSymbols.exe -sf [absolute path to .pdb] ``` -------------------------------- ### AEGP_GetChannelOrder: Get Channel Order (C) Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Gets the AEGP_ChannelOrder for the given AEGP_RenderOptionsH. This specifies the order of color channels (e.g., ARGB or BGRA) in the output. ```c AEGP_GetChannelOrder( AEGP_RenderOptionsH optionsH, AEGP_ChannelOrder *orderP); ``` -------------------------------- ### Add Apple Silicon Target for AE Plugin Resource File Source: https://ae-plugins.docsforadobe.dev/intro/apple-silicon-support This code snippet demonstrates how to add the Apple Silicon target to your plugin's resource file (.r) to define the main entry point for ARM64 builds. It is crucial for creating universal binaries that run on both Intel and Apple Silicon Macs. ```plaintext #if defined(AE_OS_MAC) CodeMacARM64 {"EffectMain"}, CodeMacIntel64 {"EffectMain"}, #endif ``` -------------------------------- ### Initialize Input Specification Interactively Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Initializes an AEIO_InSpecH through user interaction, without requiring a file path. This function is used to describe audio and video content generated interactively within After Effects. ```c AEIO_Err AEIO_InitInSpecInteractive( AEIO_BasicData *basic_dataP, AEIO_InSpecH inH); ``` -------------------------------- ### Retrieve GUID for Rendered Frame - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Retrieves a Globally Unique Identifier (GUID) for a rendered frame. The memory handle returned must be disposed of after use. New in CS6. ```c AEGP_GetReceiptGuid( AEGP_FrameReceiptH receiptH, AEGP_MemHandle *guidMH) ``` -------------------------------- ### PF_Cmd_UPDATE_PARAMS_UI GUID Change Source: https://ae-plugins.docsforadobe.dev/intro/whats-new In the PF_Cmd_UPDATE_PARAMS_UI context, PF_GetCurrentState() will now return a random GUID. This behavior change is specific to this context and will not affect other uses of PF_GetCurrentState(). ```APIDOC ## PF_Cmd_UPDATE_PARAMS_UI GUID Change ### Description In the `PF_Cmd_UPDATE_PARAMS_UI` command only, `PF_GetCurrentState()` will now return a random GUID. This change is specific to this context and does not affect the behavior of `PF_GetCurrentState()` elsewhere. ### Method Not Applicable (this is a function behavior change) ### Endpoint Not Applicable ### Parameters Not Applicable ### Request Example Not Applicable ### Response Not Applicable ### Notes This change might affect rare use cases. Contact the development team for potential workarounds if this impacts your plug-in. ``` -------------------------------- ### AEIO_InitInSpecFromFile Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Initializes an AEIO_InSpecH by describing the contents of a file to After Effects. It handles setting image depth, dimensions, alpha interpretation, audio channels, and sample rates. ```APIDOC ## AEIO_InitInSpecFromFile ### Description Given a file path, describe its contents to After Effects in the provided `AEIO_InSpecH`. Use all appropriate "set" calls from the AEGP_IOInSuite to do so; if there is image data, set its depth, dimensions, and alpha interpretation. If there is audio, describe its channels and sample rate. The file path is a NULL-terminated UTF-16 string with platform separators. ### Method AEIO Function (Internal API) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```c AEIO_InitInSpecFromFile( AEIO_BasicData *basic_dataP, const A_UTF16Char *file_pathZ, AEIO_InSpecH inH); ``` ### Response #### Success Response N/A (Function modifies `AEIO_InSpecH`) #### Response Example None ``` -------------------------------- ### Get Item MRU View - AEGP Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Gets an item's most recently used view information. This view can be used with the AEGP_ColorSettingsSuite for color transformations between working and view color spaces. ```c AEGP_GetItemMRUView( AEGP_ItemH itemH, AEGP_ItemViewP *mru_viewP); ``` -------------------------------- ### Initialize Output Layer Before Rendering in After Effects Plug-in Source: https://ae-plugins.docsforadobe.dev/effect-details/tips-tricks This C++ code snippet illustrates how to prepare the output layer for rendering by clearing it to a default state before applying any transformations or copies. It uses PF_FILL to clear the output and PF_COPY to transfer data from the input, respecting a source rectangle. ```cpp src_rect.left = in_data>output_origin_x; src_rect.right = src_rect.left + input>width; src_rect.top = in_data>output_origin_y; src_rect.bottom = src_rect.top + input>height; err = PF_FILL(NULL, NULL, output); if (!err) { err = PF_COPY(¶ms[0]>u.ld, output, NULL, &src_rect); } ``` -------------------------------- ### Set and Get Marker Flags - AEGP_MarkerSuite2 Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Functions to set and get the value of marker flags. AEGP_SetMarkerFlag modifies a flag, while AEGP_GetMarkerFlag retrieves its current value. Supported flags include AEGP_MarkerFlag_NAVIGATION. ```c AEGP_SetMarkerFlag( AEGP_MarkerValP markerP, AEGP_MarkerFlagType flagType, A_Boolean valueB); AEGP_GetMarkerFlag( AEGP_ConstMarkerValP markerP, AEGP_MarkerFlagType flagType, A_Boolean *valueBP); ``` -------------------------------- ### Artisan Frame Rendering Functions Source: https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types Functions responsible for setting up resources before rendering a frame and for the actual rendering process. Frame setup allocates necessary data, while the render function executes the scene rendering. ```c PR_FrameSetupFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH PR_RenderContextH render_contextH, PR_GlobalDataH global_dataH, PR_InstanceDataH instance_dataH, PR_RenderDataH *render_dataPH); ``` ```c PR_FrameSetdownFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH PR_RenderContextH render_contextH, PR_GlobalDataH global_dataH, PR_InstanceDataH instance_dataH, PR_RenderDataH render_dataH); ``` ```c PR_FrameRenderFunc( const PR_InData *in_dataP, PR_GlobalContextH global_contextH, PR_InstanceContextH instance_contextH PR_RenderContextH render_contextH, PR_GlobalDataH global_dataH, PR_InstanceDataH instance_dataH, PR_RenderDataH render_dataH); ``` -------------------------------- ### Get and Set Alpha Channel Interpretation for AEIO_InSpecH Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block These functions are used to retrieve and set the alpha channel interpretation information for an AEIO_InSpecH. AEGP_GetInSpecAlphaLabel gets the current interpretation, and AEGP_SetInSpecAlphaLabel sets a new interpretation. ```c AEGP_GetInSpecAlphaLabel( AEIO_InSpecH inH, AEIO_AlphaLabel *alphaP); ``` ```c AEGP_SetInSpecAlphaLabel( AEIO_InSpecH inH, const AEIO_AlphaLabel* alphaP); ``` -------------------------------- ### PF_CheckinKeyframe Source: https://ae-plugins.docsforadobe.dev/effect-details/parameter-supervision Balances calls to PF_CheckoutKeyframe to ensure proper keyframe database management within After Effects. ```APIDOC ## PF_CheckinKeyframe ### Description All calls to PF_CheckoutKeyframe must be balanced with this check-in to avoid issues with the keyframe database. ### Method `PF_CheckinKeyframe` ### Endpoint N/A (This is a library function call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **effect_ref** (PF_ProgPtr) - Required - A pointer to the effect's progress structure. - **paramP** (PF_ParamDef *) - Required - A pointer to the parameter definition structure. ### Request Example ```c PF_CheckinKeyframe(effect_ref, paramP); ``` ### Response #### Success Response (0) This function does not return a value indicating success or failure directly, but its absence of errors indicates successful execution. #### Response Example N/A ``` -------------------------------- ### Open Project From Path Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Opens a project from a given file path and returns its handle. This action closes the current project without saving. ```c AEGP_OpenProjectFromPath( const A_UTF16Char *pathZ, AEGP_ProjectH *projectPH); ``` -------------------------------- ### Get Number of Job Item Frame Properties Source: https://ae-plugins.docsforadobe.dev/aegps/aegp-suites Gets the total number of properties associated with a specific frame of a job item. This function requires the session ID, item ID, and frame ID. The count is returned through a pointer. ```c AEGP_GetNumJobItemFrameProperties( AEGP_RQM_SessionId sessid, AEGP_RQM_ItemId itemid, AEGP_RQM_FrameId frameid, A_long *num_propertiesPL); ``` -------------------------------- ### Sample Pixel at Specific Coordinates in After Effects Plug-in Source: https://ae-plugins.docsforadobe.dev/effect-details/tips-tricks This C++ code demonstrates how to sample a pixel at a given (x, y) coordinate from an input frame. It provides functions for both 32-bit and 64-bit deep pixel formats. Ensure the PF_EffectWorld structure is correctly populated. ```cpp PF_Pixel *sampleIntegral32(PF_EffectWorld &def, int x, int y){ return (PF_Pixel*)((char*)def.data + (y * def.rowbytes) + (x * sizeof(PF_Pixel))); } PF_Pixel16 *sampleIntegral64(PF_EffectWorld &def, int x, int y){ assert(PF_WORLD_IS_DEEP(&def)); return (PF_Pixel16*)((char*)def.data + (y * def.rowbytes) + (x * sizeof(PF_Pixel16))); } ``` -------------------------------- ### Set Output File - AEIO_SetOutputFile (C) Source: https://ae-plugins.docsforadobe.dev/aeios/new-kids-on-the-function-block Sets the file path for output in an AEIO_OutSpecH. The file path is a NULL-terminated UTF-16 string with platform separators. AEIO_Err_USE_DEFAULT_CALLBACK should be returned unless the path is changed. ```c AEIO_SetOutputFile( AEIO_BasicData *basic_dataP, AEIO_OutSpecH outH, A_UTF16Char *file_pathZ); ```