Forcing PF_Cmd_SEQUENCE_FLATTEN / PF_Cmd_GET_FLATTENED_SEQUENCE_DATA via idle cmd?

Participant ,
Feb 21, 2022 Feb 21, 2022

Copy link to clipboard

Copied

Dear community,

 

We're trying to update our plugins in a way to support PF_OutFlag2_SUPPORTS_THREADED_RENDERING | PF_OutFlag2_SUPPORTS_GET_FLATTENED_SEQUENCE_DATA.

 

Our plugin may change its internal state (in a way that can only be represented via its sequence data) during PF_Cmd_EVENT / PF_Event_IDLE. While we managed to froce a rerender via a hidden parameter utilizing StreamSuite4() it seems that AE (22.1.1 Build 74) doesn't bother to flatten the sequence data so the render components' states are out of sync to the UI thread's one, which represents the proper state.

 

Any hints on how to overcome this would be much appreciated.

 

Best,

Reimund

TOPICS
Error or problem , SDK

Views

139

Likes

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 Community Professional ,
Feb 21, 2022 Feb 21, 2022

Copy link to clipboard

Copied

have you used PF_OutFlag_FORCE_RERENDER?

"FORCE_RERENDER doesn’t work in every situation it did before, because it needs to synchronize the UI copy of sequence_data with the render thread copy."

Likes

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
Participant ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

I don't, or in other words, we don't rely on PF_OutFlag_FORCE_RERENDER. The point is, it doesn't make a difference in terms of the described issue. Even if I do set PF_OutFlag_FORCE_RERENDER during PF_Event_IDLE, AE won't trigger a SequenceFlatten or GetFlattenedSequenceData call in order to synchronize the main and render thread instances.

Likes

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
Participant ,
Mar 01, 2022 Mar 01, 2022

Copy link to clipboard

Copied

Let me try to be a little more precise: I'm invalidating my effect's state by using StreamSuite4() during idle which works to some extent because AE will render a new frame corresponding to the current parameter set. However, AE won't call into PF_Cmd_SEQUENCE_FLATTEN nor PF_Cmd_GET_FLATTENED_SEQUENCE_DATA at all so it'll work with inconsistent sequence data during subsequent render calls. The situation doesn't change if I add PF_OutFlag_FORCE_RERENDER, either.

 

Can someone please enlighten me, whether this is a bug or expected behavior and what I need to do in order to force AE into picking up the sequence data??

 

Thanks.

Likes

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 ,
Mar 15, 2022 Mar 15, 2022

Copy link to clipboard

Copied

Hi Reimund,

 

What happens in the UI that triggers the sequence_data change which results in a different render? I ask as After Effects needs to know about model changes to know to push changes to the render side.

Likes

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
Participant ,
Mar 16, 2022 Mar 16, 2022

Copy link to clipboard

Copied

LATEST

Hi Jason,

 

That's the point. There is an internal state change (e.g. the user loading a new LUT via our plugin GUI window) that is signaled to AE via a dummy parameter and the SetStream API. This successfully triggers a new render pass which, however, isn't preceeded by a PF_Cmd_GET_FLATTENED_SEQUENCE_DATA or PF_Cmd_SEQUENCE_FLATTEN, so the render call and all subsequent passes use inconsistent sequence data.

 

Best,

Reimund

Likes

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