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

dynamically add or remove items from popup menu?

New Here ,
Nov 19, 2009 Nov 19, 2009

Copy link to clipboard

Copied

Hi,

Is there a (safe) way to dynamically add or remove items

from a popup-menu type parameter for an effect plugin?

Thanks.

TOPICS
SDK

Views

2.6K

Translate

Translate

Report

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

Adobe Employee , Nov 20, 2009 Nov 20, 2009

No. Parameter setup, including populating pop-up lists, happens before the effect is applied to a sequence.

Votes

Translate

Translate
Adobe Employee ,
Nov 20, 2009 Nov 20, 2009

Copy link to clipboard

Copied

No. Parameter setup, including populating pop-up lists, happens before the effect is applied to a sequence.

Votes

Translate

Translate

Report

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
Advisor ,
Dec 07, 2009 Dec 07, 2009

Copy link to clipboard

Copied

BBB is right that you can't dynamically add or remove items from a popup menu.  But you can rename the choices, and this might be all that is needed in some situations.  Here's some code to demonstrate it, which would work in the Supervisor sample:

      my_global_dataP         globP                   = reinterpret_cast<my_global_dataP>(DH(in_data->global_data));

      AEGP_SuiteHandler       suites(in_data->pica_basicP);

      AEGP_EffectRefH         meH                     = NULL;

      PF_ParamType            param_type;

      PF_ParamDefUnion        param_union;

      ERR(suites.PFInterfaceSuite1()->AEGP_GetNewEffectForEffect(globP->my_id, in_data->effect_ref, &meH));

      ERR(suites.EffectSuite3()->AEGP_GetEffectParamUnionByIndex(globP->my_id, meH, SUPER_FLAVOR_DISK_ID, &param_type, &param_union));

      if (param_type == PF_Param_POPUP)

      {

            strcpy((char*)param_union.pd.u.namesptr, "Chocolate|(-|Strawberry|(-|And more!");

      }

      if (meH){

            ERR2(suites.EffectSuite2()->AEGP_DisposeEffect(meH));

      }

Specifically, changing the number of items in the menu doesn't work, because modifying param_union.pd.num_choices doesn't seem to stick.

Votes

Translate

Translate

Report

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 12, 2010 Nov 12, 2010

Copy link to clipboard

Copied

Hi,

    Is there a way to add or remove items from pop up menu dynamically? I'm asking this again because in 'Compound Blur' effect there is a pop up menu (Blur Layer) which shows all the layers in the project. As and when any layer is added/deleted the pop up menu is updated. If there is no way of doing it, then how is it done in Compound Blur?

Thanks & Regards,

Dheeraj.

Votes

Translate

Translate

Report

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 ,
Nov 12, 2010 Nov 12, 2010

Copy link to clipboard

Copied

Layer and Path parameters are the exceptions; the contents of other pop-ups are static, and cannot be changed during the AE session.

Votes

Translate

Translate

Report

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 14, 2010 Nov 14, 2010

Copy link to clipboard

Copied

Thanks for the response.

Votes

Translate

Translate

Report

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
New Here ,
Feb 11, 2014 Feb 11, 2014

Copy link to clipboard

Copied

LATEST

You can also check the "Supervisor" sample in the SDK, it shows how to do it.

Votes

Translate

Translate

Report

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