Skip to main content
Participant
September 26, 2012
Answered

Different behaviour of a plug in in CS6 and CS5.5

  • September 26, 2012
  • 1 reply
  • 1308 views

I've noticed a difference in a plugin behaviour in CS6 and CS5.5.

In a SequenceSetup function the following call generates a PF_Cmd_ARBITRARY_CALLBACK in CS6 with the PF_Arbitrary_FLAT_SIZE_FUNC state of extra parameter. The same PF_Cmd_ARBITRARY_CALLBACK appears later in a plugin work and doesn't work properly in CS6. Though in CS5.5 there is no problem with this function, it doesn't generate any weird events.

suites.ParamUtilsSuite1()->PF_GetCurrentState(in_data->effect_ref, &seqData->curSessionParamState); (code for CS5.5)

suites.ParamUtilsSuite3()->PF_GetCurrentState(in_data->effect_ref,PF_P aramIndex_CHECK_ALL, NULL, NULL, &seqData->curSessionParamState); (updated code for CS6, in respect that the signature of PF_GetCurrentState has changed)

I work in Windows 7, x64. CS6 is 11.0.0.378 version, CS5.5 is 10.5.0.253 version. The only change between these two version of the plug in is the PF_GetCurrentState signature. So I suppose that the problem is inside a new SDK. But I have no guess where it may be.. Do you have any idea what might have changed in CS6 to provide such an error?

This topic has been closed for replies.
Correct answer Niakris

Hello,

The problem was not in PF_GetCurrentState call. We use multithreading to handle a frame in our plugin. And each thread had to call PF_Progress callback in her turn. But it turned out that "no AE callbacks are thread-safe unless explicitly noted".

Great thanks to After Effects technical support for fast and friendly answers!

1 reply

NiakrisAuthorCorrect answer
Participant
October 19, 2012

Hello,

The problem was not in PF_GetCurrentState call. We use multithreading to handle a frame in our plugin. And each thread had to call PF_Progress callback in her turn. But it turned out that "no AE callbacks are thread-safe unless explicitly noted".

Great thanks to After Effects technical support for fast and friendly answers!

Inspiring
October 19, 2012

Indeed your effect is not thread safe. SDK guide says the only function that is, is AEGP_CauseIdleRoutinesToBeCalled(), which in turn means you have to register for AEGP handler to catch the idle call.

you have to call PF_Progress while other threads are doing something to make sure your plugin is responsive.

Another thing about threads you cannot use Boost libraries (plugin crashes), unless you link with exactly the same version as that shipped with AE, so the platform threads is your best bet.