Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PF_Cmd_SEQUENCE_SETUP called multiple times on the same plugin instance

Explorer ,
Aug 22, 2023 Aug 22, 2023

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

 

 

 

TOPICS
SDK
812
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Aug 22, 2023 Aug 22, 2023

Did you try setting the PF_OutFlag2_PPRO_DO_NOT_CLONE_SEQUENCE_DATA_FOR_RENDER in out_flags2 in in you GlobalSetup selector?

Translate
Explorer ,
Aug 22, 2023 Aug 22, 2023

This is a Video Effect plugin using AE SDK for the  moment. I am wondering if some PremierePro suite could give me a hint ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 22, 2023 Aug 22, 2023

>...ONCE per plugin instance.

PF_Cmd_GLOBAL_SETUP is the right scope for such allocation. 


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 22, 2023 Aug 22, 2023

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 22, 2023 Aug 22, 2023

What outflags are you returning, at the end of your PF_Cmd_SEQUENCE_SETUP response?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

I don't change them in SequenceSetup !!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 22, 2023 Aug 22, 2023

Did you try setting the PF_OutFlag2_PPRO_DO_NOT_CLONE_SEQUENCE_DATA_FOR_RENDER in out_flags2 in in you GlobalSetup selector?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 06, 2023 Nov 06, 2023
LATEST

Thanks @reimundd1593001 this is exactly what I needed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines