We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Hi! I'm using AEGP_RegisterListener (in AEGP_RenderQueueMonitorSuite1) to register callbacks for a render in my AE plugin, but none of the functions I provide are getting called. My goal is to display an update dialog with a progress bar that updates during the render.
When searching for solutions, I found mention of "boilerplate" code that people added to get access to the Render Queue Monitor Suite, but I didn't have to do this to be able to call AEGP_RegisterListener. Is that boilerplate still required, and if so, how would I do it in 14.2 SDK?
Here's some relevant lines from my code (not the entire functions!):
// Structure to provide callback functions. These functions are defined in my code.
const AEGP_RQM_FunctionBlock1 g_renderFunctionBlock =
err = SUITE_RENDERQUEUEMONITOR->AEGP_RegisterListener(PLUGIN->id(), (AEGP_RQM_Refcon)this, &g_renderFunctionBlock);
err = SUITE_RENDERQUEUEMONITOR->AEGP_DeregisterListener(PLUGIN->id(), (AEGP_RQM_Refcon)this);
The composition is rendering correctly. 'err' is 0 after RegisterListener and DeregisterListener. But I put breakpoints and prints in all the callback functions and none of them are hitting or printing.
What am I missing? I expected that during the blocking render (AEGP_SetRenderQueueState) the callbacks would execute, and from NBAERenderJobItemUpdated I would be able to increment the dialog's progress bar.
In our internal plug-ins that use AEGP_RegisterListener(), I see that they make this call in the plug-in's main entry point. Can you move your register call there?
I moved AEGP_RegisterListener to EntryPointFunc() and my callbacks are still not getting called during a render. AEGP_RegisterListener itself still returns 0.
I inherited this plugin from another programmer, so I'm still finding my way around it. He has a modification of your AEFX_SuiteScoper template in AEFX_SuiteHandlerTemplate.h that seems to do mostly the same thing, except it uses an SPBasicSuite* instead of a PF_InData*.
Also, I looked into AEGP_SuiteHandler.h and found that there's no member or boilerplate for RenderQueueMonitor Suite. Is that needed when using the template to access the suites?
Yes, good catch in AEGP_SuiteHandler.h. Try adding the registration in there.
It didn't help. I added the boilerplate to the relevant sections in AEGP_SuiteHandler.h:
AEGP_SUITE_RELEASE_BOILERPLATE(render_queue_monitor_suite1P, kAEGPRenderQueueMonitorSuite, kAEGPRenderQueueMonitorSuiteVersion1);
AEGP_SUITE_ACCESS_BOILERPLATE(RenderQueueMonitorSuite, 1, AEGP_, render_queue_monitor_suite1P, kAEGPRenderQueueMonitorSuite, kAEGPRenderQueueMonitorSuiteVersion1);
But the callbacks still aren't running. Tried registering listeners using the new way, then the old way.
ERR(SUITE_RENDERQUEUEMONITOR->AEGP_RegisterListener(PLUGIN->id(), NULL, &g_renderFunctionBlock));
suites.RenderQueueMonitorSuite1()->AEGP_RegisterListener(PLUGIN->id(), NULL, &g_renderFunctionBlock);
I also stepped into the LoadSuite() call and verified that err = 0. Just for kicks, I changed the access boilerplate version number from kAEGPRenderQueueMonitorSuiteVersion1 to 5, and that threw an exception. So the RenderQueueMonitorSuite is loading.
Would it be possible to get an example that uses AEGP_RegisterListener? None of the samples in the SDK call it.
I also tried all possible options in 15.1.2 and no luck
Maybe you managed to find a solution?
Same here in After Effect 2020 (17.0.5): I can aquire the suite (which has its functions pointing to enties in RQMonitor.aex, so that seems ok), and I can call AEGP_RegisterListener all I want (from global setup, or directly from the plugin's main entry point, after I've obtain my plugin ID of course), and that call returns A_Err_NONE. But nevertheless my callback functions never get called (ever, but speficially not when I then start a render (as a user, I haven't tried programatically since I just wants to know when the user starts and stops a render) or when the render finishes. Since I wasn't sure if AEGP_RegisterListener would copy the function pointers or not, I made sure those are in a static variable, so they remain available for the lifetime of the plugin, but that doesn't help either. Any pointers on how to get this working would be appreciated.
Did anyone manage to get this working? Having issues aswell.