Skip to main content
Inspiring
March 28, 2025
Question

How to use Premiere's legacy callback suites with After Effect style plugins ?

  • March 28, 2025
  • 0 replies
  • 146 views
TL;DR : I can't find how to acquire piSuite since I can't find the string indentifier, neither how to call the getCurrentPos function.
 
Note : I am aware that this issue is related to the Premiere Pro C++ SDK, but I posted this message here since most of my plugin uses the After Effect C++ SDK.
 
Hi !
 
I am currently making a Premiere Pro plugin, and I wanted to use the legacy callbacks (piSuites) described here, and more specifically, timelineFuncs's getCurrentPos function.
 
My issue
 
When I try to use the piSuites, I can't find any string indentifier within the SDK to acquire the suite...
 
Here it was I call a suite's string identifier :
#define kPFUtilitySuite				"PF Utility Suite"
// ...
#define kPFUtilitySuiteVersion13	13

#define kPFUtilitySuiteVersion		kPFUtilitySuiteVersion13
I might have missed it in the Premiere or After documentations, but there is no code sample or any indication on how to initialize either of the following structures that stores a pointer to the functions I want to use :
- PlugTimelineFuncsPtr
- EffectHandle
- piSuitesPtr
 
I have tried to initialize each of these structures without and with a null pointer, but I get a memory access violation.
 
My guess from the debug logs is that the pointer never gets the actual structure and remains null, although I am new to after effect and premiere pro plugins so I am not certain on how memory allocation works inside the plugins.
 
Configuration
 
I am using After Effect's skeleton project, and I have included the Premiere Pro SDK within my project.
 
What works
 
I have written a few lines of code to check if what I wanted to do was possible. Since I need the PrTimelineID  timelineData, I used the PF_UtilitySuite13 suite. The following code builds and runs well, and I could see the timelineId in my debug console :
static PF_Err 
Render (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
        // ...

        PrTimelineID outTimelineID;
        PF_UtilitySuite13* utilitySuite = nullptr;
        
        int currentFrame;
        
        in_data->pica_basicP->AcquireSuite(kPFUtilitySuite, 1, (const void**)&utilitySuite);
        utilitySuite->GetContainingTimelineID(in_data->effect_ref, &outTimelineID);
        
        in_data->pica_basicP->ReleaseSuite(kPFUtilitySuite, 1);
        
        Logger::debug(
        "Timeline ID : " + std::to_string(outTimelineID)
        );

        // ...
}
The output was : [DEBUG] Timeline ID : 5346, so my conclusion was that the Premiere Pro SDK was well imported into my project.
 
What I understand
 
I understand that a suite must have a string identifier as well as a version number in order to acquire it, but as I explained earlier, I can't find the piSuite's string identifier.
 
My question is How to use the piSuite and/or how the function getCurrentPos can be used ?
 
Thank for your help !