Copy link to clipboard
Copied
Hi all!
I have a really anoying issue with in_data->sequence_data and After Effects CC 2015.
I'm storing data in Sequence_data.
The problem is: I don't get the same data in Render and UserChangedParams...
The exact same code works fine with After Effects CS5.5. First, I thought it might be because of the new flattening calls, but I have the same issue even when I first apply my FX and change one parameter value (I don't receive any other call).
Did anyone run into a similar issue? Any solution?
Cheers,
François
1 Correct answer
try to set PF_OutFlag_FORCE_RERENDER during UserChangedParam. according to
the CC2015 sdk docs this should force a flatten call on the ui thread and
an unflatten on the render thread, syncing the render thread's sequence
data with that of the ui data.
Copy link to clipboard
Copied
hey François! how have you been?
if you see this behavior in cc2015 or later, then that's the big change
everyone was talking about.
the render thread and the UI thread have separate seq data handles, and
they synchronize at very specific occasions.
what is it that you're saving there? perhaps there's a different way to
pass the data, or maybe to force the sync.
Copy link to clipboard
Copied
Hi Shachar, glad you're here! 🙂
In fact, my FX is a particle plugin, and I store previous frame's data, in order not to re-compute everything.
I have 2 types of parameters:
1_parameters that actually modify the physics (I set a Supervise flags on these)
2_parameters that modify only the look of the particles
Then, when I change one of these physics parameter, I get a UserChangedParam call, where I clean up the sequence data to start again from zero...
And of course, for cosmetic changes, I keep my data.
What do you mean by 'force the sync.' ? Is it possible?
Cheers,
François
Copy link to clipboard
Copied
try to set PF_OutFlag_FORCE_RERENDER during UserChangedParam. according to
the CC2015 sdk docs this should force a flatten call on the ui thread and
an unflatten on the render thread, syncing the render thread's sequence
data with that of the ui data.
Copy link to clipboard
Copied
Wow, it works!! Thanx a lot, I was totally lost in the new architecture...
I've set PF_OutFlag_FORCE_RERENDER during UserChangedParam.
It does change the behaviour, but not the way I thought...
1_UserChangedParam is called.
I get some sequence_data, different from the one I got in the Render call before. In my case, it's ok, as I don't need to read the data, only to write it... But I wonder how we can do if we want to read it?
I change this sequence_data (resetting it in my case)
2_GetFlattenedSequenceData is called, not less than 5 times (!!!)
3_SequenceFlatten is called
4_SequenceResetup is called
5_Render is finally called and I get the right sequence_data
Is it me, or is it a bit complicated just to pass some data from one call to the other? I mean, flattening 6 times and unflattening 1 more time...
And what about this (from the SDK) :
"Once we have the full set of APIs in place needed to manage render state, we will be able to deprecate FORCE_RERENDER"
I don't really get it... But it works!
Thanks Shachar!
Cheers,
François
Copy link to clipboard
Copied
yeah...
in cc2015, in order to make AE's UI more responsive, the AE team decided to
create 2 parallel projects, so that the render thread and UI thread could
work separately.
the 2 projects are synced on numerous occasions. HOWEVER, data only travels
from the UI copy to the render copy, and not the other way around.
if you must pass data from the render thread to the ui thread (and luckily
you don't), then a lot of shenanigans need to happen...
yes, the 7 flattens are rather striking, but in the future
the PF_Cmd_GET_FLATTENED_SEQUENCE_DATA should work globally for the plug-in
and not just for custom UI events. (at least i think that's the plan)
as for the deprecation of FORCE_RERENDER, i think you can force the sync
using the GUID calls, but i'm not sure.
i plan on dealing with that as it comes...
Copy link to clipboard
Copied
A lot more fun to come! 😉
Copy link to clipboard
Copied
weeeeeeee!
Copy link to clipboard
Copied
hi shachar , @francois !
there is still no way to update UI sequence_data from render function ?
Copy link to clipboard
Copied
nope, and that's by design. so don't rely on that to change any time soon...
however, global data is shared between threads. perhaps that could solve
your render-to-ui-thread-communitaction needs.

