Skip to main content
Inspiring
February 21, 2022
Question

Forcing PF_Cmd_SEQUENCE_FLATTEN / PF_Cmd_GET_FLATTENED_SEQUENCE_DATA via idle cmd?

  • February 21, 2022
  • 2 replies
  • 592 views

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

This topic has been closed for replies.

2 replies

Community Manager
March 16, 2022

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.

Inspiring
March 16, 2022

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

Community Expert
February 21, 2022

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."

Inspiring
February 22, 2022

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.