Copy link to clipboard
Copied
Hello,
I am developing a PremierePro plugin and I would like to allocate an heavy structure (loading files, ...) ONCE per plugin instance.
I was thinking to use PF_Cmd_SEQUENCE_SETUP, but this is called multiple times for the same plugin instance. Even when I change one parameter in the UI, I got succesive calls to
PF_Cmd_SEQUENCE_SETUP/PF_Cmd_SEQUENCE_FLATTEN
PF_Cmd_SEQUENCE_SETUP/PF_Cmd_SEQUENCE_SETDOWN
So the in_data->sequence_data keeps being allocated/filled/destroyed.
Thanks in advance
David
Did you try setting the PF_OutFlag2_PPRO_DO_NOT_CLONE_SEQUENCE_DATA_FOR_RENDER in out_flags2 in in you GlobalSetup selector?
Copy link to clipboard
Copied
This is a Video Effect plugin using AE SDK for the moment. I am wondering if some PremierePro suite could give me a hint ?
Copy link to clipboard
Copied
>...ONCE per plugin instance.
PF_Cmd_GLOBAL_SETUP is the right scope for such allocation.
Copy link to clipboard
Copied
Sorry I am an not native English. But plugin "instance", I mean the specific instance (with associated parameters) used for a specific sequence.
If I have 2 sequences A and B with paramA and paramB, I will have pluginInstanceA (using paramA) and pluginInstanceB (using paramB)
Copy link to clipboard
Copied
Ahhh...then PF_Cmd_SEQUENCE_SETUP is the right place. 🙂
From what you've described, it seems as though you've set PF_OutFlag_SEQUENCE_DATA_NEEDS_FLATTENING, during PF_Cmd_GLOBAL_SETUP.
Is that correct?
Copy link to clipboard
Copied
No my current GlobalSetup looks like
out_data->out_flags = PF_OutFlag_WIDE_TIME_INPUT |
PF_OutFlag_REFRESH_UI |
PF_OutFlag_SEND_UPDATE_PARAMS_UI;
out_data->out_flags2 = PF_OutFlag2_SUPPORTS_THREADED_RENDERING |
PF_OutFlag2_PARAM_GROUP_START_COLLAPSED_FLAG;
Just applying the effect to one layer, I got the call sequence:
SequenceSetup: 0x310a570e0
SequenceFlatten: 0x310a570e0
SequenceSetup: 0x310a571c0
SequenceSetup: 0x310a56ca0
SequenceSetup: 0x310a69a00
Copy link to clipboard
Copied
What outflags are you returning, at the end of your PF_Cmd_SEQUENCE_SETUP response?
Copy link to clipboard
Copied
I don't change them in SequenceSetup !!!
Copy link to clipboard
Copied
AfterEffects SDK only calls PF_NEW_HANDLE to allocate a private structure and fill it and sets
out_data->out_flags only in the case of an error.
Copy link to clipboard
Copied
Did you try setting the PF_OutFlag2_PPRO_DO_NOT_CLONE_SEQUENCE_DATA_FOR_RENDER in out_flags2 in in you GlobalSetup selector?
Copy link to clipboard
Copied
Thanks @reimundd1593001 this is exactly what I needed.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more