Skip to main content
ThatMGuy
Inspiring
June 9, 2017
Question

AEGP_RegisterListener in AE SDK 2017.1

  • June 9, 2017
  • 1 reply
  • 1731 views

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 =

    { NBAERenderJobStarted,

      NBAERenderJobEnded,

      NBAERenderJobItemStarted,

      NBAERenderJobItemUpdated,

      NBAERenderJobItemEnded,

      NBAERenderJobItemReportLog };

err = SUITE_RENDERQUEUEMONITOR->AEGP_RegisterListener(PLUGIN->id(), (AEGP_RQM_Refcon)this, &g_renderFunctionBlock);

SUITE_RENDERQUEUE->AEGP_AddCompToRenderQueue(compH, path.c_str());

SUITE_RENDERQUEUE->AEGP_SetRenderQueueState(AEGP_RenderQueueState_RENDERING);

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.

This topic has been closed for replies.

1 reply

Inspiring
June 12, 2017

Hi Marc,

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?

ThatMGuy
ThatMGuyAuthor
Inspiring
June 13, 2017

Hi Zac,

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?

Inspiring
June 14, 2017

Yes, good catch in AEGP_SuiteHandler.h.  Try adding the registration in there.