Premiere doesn't handle SeqData Flattening properly like AE does
Hi there,
I believe I have found a bug in Premiere. In our plugin, we store a part of sequence data on the heap and have a pointer to it in sequence data. We implement FLATTEN commands to save this to disk, which works great in AE.
However, in Premiere, the FLATTEN command is never sent, unless during the session the user has clicked on the UI (CUI or a button). If not, then when the project is saved and closed, instead of giving us a flatten command, Premiere saves the unflat sequence data to disk as if it didn't need flattening. Then, when we re-open the project and it calls SEQUENCE_RESETUP, the stuff that was on the heap is now junk data, and reading from it sometimes gives a bad access error (which crashes Premiere).
This really seems like a bug to me, but maybe I'm doing something wrong. I set
PF_OutFlag_SEQUENCE_DATA_NEEDS_FLATTENING,
PF_OutFlag2_PPRO_DO_NOT_CLONE_SEQUENCE_DATA_FOR_RENDER, and
PF_OutFlag2_SUPPORTS_GET_FLATTENED_SEQUENCE_DATA
in GlobalSetup.
To reiterate- we do get a flatten command (GetFlattenedSequenceData) if we have clicked on the plugin's UI during the session. Then it flattens fine and works great. The only problem is when we don't click on the plugin's UI during the session - in that case, any data we had stored on the heap is lost/not saved to the project file.
Also, removing PF_OutFlag2_SUPPORTS_GET_FLATTENED_SEQUENCE_DATA alone or removing it and PF_OutFlag2_PPRO_DO_NOT_CLONE_SEQUENCE_DATA_FOR_RENDER (which we need anyway since we have a really slow Resetup) didn’t make a difference.
Also, it's not just this plugin- I could recreate this with the 2023 SDK's HistoGrid example - again, in Premiere, we only get a FLATTEN command if the user has clicked on the UI since the last save, while in AE we get a FLATTEN command every time we save the project.
Any help would be greatly appreciated.
Thanks!
Jonah
