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

sequence_data gateway from popup_dialog to render

Explorer ,
Sep 04, 2018 Sep 04, 2018

Copy link to clipboard

Copied

Hi everyone.

I'm working on a plugin wich use popupdialog in order to call a script UI. The function works fine.

But I try to send some strings results to the Render function. I tried by using sequence_data (based on pathMaster exemple and reduxFX exemple ) but when I look step by step the execution, the sequence_data get the good value in popudialog function but get back to the initial value before render call....

The popupdialog has the outFlag "PF_OutFlag_FORCE_RERENDER".

Is there an other way to comunicate between the PopupDialog and the Render ?

The code is a bit long with the sequence flattening so so I share the github link :: AE_tl_math/tl_math.cpp at master · crazylafo/AE_tl_math · GitHub

thanks for your help.

TOPICS
SDK

Views

733

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

Community Expert , Sep 04, 2018 Sep 04, 2018

off the top of my head:

1. leave the message in global_data, along with an effect identifier (comp

itemID, layerID, and effect index). the render thread can then see if it's

own matching identifier has a message waiting for it.

2. write the data to an arb param. that gets synchronized immediately and

reliably between threads.

Votes

Translate

Translate
Community Expert ,
Sep 04, 2018 Sep 04, 2018

Copy link to clipboard

Copied

off the top of my head:

1. leave the message in global_data, along with an effect identifier (comp

itemID, layerID, and effect index). the render thread can then see if it's

own matching identifier has a message waiting for it.

2. write the data to an arb param. that gets synchronized immediately and

reliably between threads.

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 ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

thank you Shachar. the global data is a good deal. (but the arb param, it's is looking a bit  complex and it cannot be modify in DO_DIALOG thread). Thanks for your solution.

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
Community Expert ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

the arb param can be changed during DO_DIALOG. just use SetStreamValue().

another advantage, is when using an arb param the user can undo and redo

the operation.

but you know your needs better, so pick the solution you're most

comfortable with.

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 ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

wha SetStreamValue can work on arb and not only "classical" params ? thanks for this trick

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
Community Expert ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

it's a secret! don't tell anyone... 😄

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 ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

  I'll may change my mind with arb... For a simple gateway, does an  arb needs the list of handles with scan/interpolate and compare functions ?

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
Community Expert ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

you can always return the original value instead of creating an actual

interpolation. as for scan and print, i never implemented them, and it

never caused an issue for me.

take a look at the ColorGrid sample project. it's pretty easy taking that

implementation of an arb param and change it for your needs. whatever is

required is already implemented there.

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 ,
Sep 06, 2018 Sep 06, 2018

Copy link to clipboard

Copied

Thanks again I'll take a look on 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
Explorer ,
Sep 10, 2018 Sep 10, 2018

Copy link to clipboard

Copied

thanks the ARB works fine also with undo group in my first tests.

But I've a new strange error  with dispose stream. I'm wrote the function to get the stream value. But if I dispose the streamValue  I get a "magic error" . However, the effectRef and the streamH dispose correctly.

the function :

static PF_Err

AEGP_GetParamStreamValue(PF_InData  *in_data,

  PF_OutData  *out_data,

  AEGP_PluginID   PlugId,

  PF_ParamIndex  param_index,

  PF_Handle  *arbH

)

{

  PF_Err err = PF_Err_NONE,

  err2 = PF_Err_NONE;

  AEGP_LayerH  layerH;

  AEGP_StreamRefH effect_streamH = NULL;

  AEGP_EffectRefH   thisEffect_refH = NULL;

  AEGP_StreamValue2  val;

  AEGP_StreamValue2  *sample_valP = &val;

 

  const A_Time currT = { 0,100 };

 

  AEFX_SuiteScoper<AEGP_PFInterfaceSuite1> PFInterfaceSuite = AEFX_SuiteScoper<AEGP_PFInterfaceSuite1>(in_data,

  kAEGPPFInterfaceSuite,

  kAEGPPFInterfaceSuiteVersion1,

  out_data);

  AEFX_SuiteScoper<AEGP_LayerSuite8> layerSuite = AEFX_SuiteScoper<AEGP_LayerSuite8>(in_data,

  kAEGPLayerSuite,

  kAEGPLayerSuiteVersion8,

  out_data);

  AEFX_SuiteScoper<AEGP_StreamSuite4> StreamSuite = AEFX_SuiteScoper<AEGP_StreamSuite4>(in_data,

  kAEGPStreamSuite,

  kAEGPStreamSuiteVersion4,

  out_data);

  AEFX_SuiteScoper<AEGP_EffectSuite4> EffectSuite = AEFX_SuiteScoper<AEGP_EffectSuite4>(in_data,

  kAEGPEffectSuite,

  kAEGPEffectSuiteVersion4,

  out_data);

  PFInterfaceSuite->AEGP_GetEffectLayer(in_data->effect_ref, &layerH);

  PFInterfaceSuite->AEGP_GetNewEffectForEffect(PlugId, in_data->effect_ref, &thisEffect_refH);

  StreamSuite->AEGP_GetNewEffectStreamByIndex(PlugId, thisEffect_refH, param_index, &effect_streamH);

  StreamSuite->AEGP_GetNewStreamValue(PlugId, effect_streamH, AEGP_LTimeMode_LayerTime, &currT, FALSE, sample_valP);

 

  *arbH = reinterpret_cast<PF_Handle>(val.val.arbH);

  if (thisEffect_refH) {

  ERR2(EffectSuite->AEGP_DisposeEffect(thisEffect_refH));

  }

  if (effect_streamH) {

  ERR2(StreamSuite->AEGP_DisposeStream(effect_streamH));

  }

  /*

  if (sample_valP) {

  ERR2(StreamSuite->AEGP_DisposeStreamValue(sample_valP));

  }*/

  return err;

}

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
Community Expert ,
Sep 10, 2018 Sep 10, 2018

Copy link to clipboard

Copied

i'm not entirely sure... perhaps you should dispose of the value before

disposing of the stream.

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 ,
Sep 11, 2018 Sep 11, 2018

Copy link to clipboard

Copied

LATEST

you(re right Thanks a lot

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