• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AEGP_RegisterListener in AE SDK 2017.1

Explorer ,
Jun 09, 2017 Jun 09, 2017

Copy link to clipboard

Copied

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.

TOPICS
SDK

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 12, 2017 Jun 12, 2017

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 13, 2017 Jun 13, 2017

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 14, 2017 Jun 14, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 15, 2017 Jun 15, 2017

Copy link to clipboard

Copied

Hi Zac,

It didn't help. I added the boilerplate to the relevant sections in AEGP_SuiteHandler.h:

AEGP_RenderQueueMonitorSuite1 *render_queue_monitor_suite1P;

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));

AEGP_SuiteHandler suites(pica_basicP);

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 23, 2019 Feb 23, 2019

Copy link to clipboard

Copied

I also tried all possible options in 15.1.2 and no luck

Maybe you managed to find a solution?

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 30, 2020 Mar 30, 2020

Copy link to clipboard

Copied

Hi,

 

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2021 May 18, 2021

Copy link to clipboard

Copied

LATEST

Did anyone manage to get this working? Having issues aswell.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines