Syncing Sequence Data between UserChangedParam, SmartRender and UpdateParameterUI
Copy link to clipboard
Copied
Hi. I have a flag - seqP->fdi.fileB and a filename seqP->fdi.filename that is save during UserChangedParam. To avoid using arb data, I have a dummy slider and GuidMixInPtr - I save the filename in the dummy slider namesptr in UpdateParameterUI, and then I save the filename and flag data in PreRender in GuidMixInPtr. Per the previous thread, and docs, any change in sequence data should be visible to SmartRender if set during UserChangedParam.
However, this is not happening. I set fileB to TRUE and set the filename during UserChangedParam, but the subsequent call to Render is made using fileB as FALSE and without filename set.
How do I ensure that data is synced between UserChangedParam and SmartRender?
Some other threads with a similar problem -
https://community.adobe.com/t5/after-effects/sequence-data-in-smart-rendering/td-p/10791045?page=1
Copy link to clipboard
Copied
I notice that SequenceResetup is called 4 times after I set PF_OutFlag_FORCE_RERENDER from UserChangedParam. I intialize the Sequence Data in that callback.
Any idea how this flow of data should work ?
Copy link to clipboard
Copied
PF_OutFlag_FORCE_RERENDER is the way to make AE sync the ui and render thread sequence data.
as for the number of sequence resetups, yes, multiple calls occur. it looks redundant, but that's the expected behavior. your'e not doing it wrong if that was your worry.
Copy link to clipboard
Copied
The problem is that SequenceResetup calls SequenceSetup. In SequenceSetup I initialize the sequence data, hence losing all that information. Is there a way to detect that SequenceResetup is being called due to PF_OutFlag_FORCE_RERENDER ?
In this case, I would bypass the initialization.
Copy link to clipboard
Copied
i think you're referrig to an SDK sample project where sequence data implementation is demonstrated. in that project sequence_restup calls sequence_setup to generate a new structure.
that is entirely a matter convenience that he (or she) who made that sample chose to do. you absolutely don't have to do it loke so, and in my implementations i indeed do not call sequence_setup from sequence_resetup.
during sequence_resetup you just need to deserialize the data send over from AE in the flat handle. how you do it is up to you.
Copy link to clipboard
Copied
Thanks for the explanation - in my particular case, I ended up using a flag within sequence data to indicate that I have called UserChangedParam - this flag is reset within render. If I detect this flag in SequenceSetup, I do not flatten the data.
This works for my project.
Copy link to clipboard
Copied
To revisit this problem, I could only solve it by setting a static variable when a non UI sequence data variable is set in userchangedparam. Using sequence data gave odd sync errors.

