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

SDK AE arbitrary params data flow

Community Beginner ,
Aug 27, 2025 Aug 27, 2025

Hi, 
I have an arbitrary parameter where the user can draw two polygonal curves. 
So far it works a little. But I have trouble to get the arbH data correctly. 

It is created - ok. I get in in ClickEvent, the user clicks, a new point is addet (background: 1)
Parameter is PF_CHECKIN_PARAM. 
But then its disposed and copied again. 

ArbitraryCopyFunc SRC background: 0 foreground: 0  - OK, empty polygons 

ArbitraryCopyFunc DST after background: 0 foreground: 0    - OK 
LoadArbData background: 0 foreground: 0  - OK
SaveArbData background: 1 foreground: 0  <-- here the point was set
DisposeArbData background: 1 foreground: 0 <- it was saved, dispose get the changed one, but why dispose? 
ArbitraryCopyFunc SRC background: 0 foreground: 0 <-- but the next copy came and get the default one

And there are a lot of ArbitraryCopy events! Is this normal or a symptom of the problem. 

There is no error or exception. 

I need some explanations. 
If you need more Info I can give them. I am using smart render approache if that does matter. 

Thank you
Thomas

TOPICS
Error or problem , SDK
217
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 27, 2025 Aug 27, 2025

Hi Thomas,

Thanks for the post. I'm glad your marked it appropriately as SDK. That means that the proper product team member or Adobe Expert will come along and assist you as soon as possible. Sorry that I have to ask for your patience on this. I hope we can help you shortly.

 

Thanks,
Kevin

 

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio
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
Community Beginner ,
Aug 29, 2025 Aug 29, 2025

Thank you. I hope. 

 

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
Community Beginner ,
Sep 03, 2025 Sep 03, 2025

Hello?!? 
Please help. I am stuck. 

 

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
Community Beginner ,
Sep 22, 2025 Sep 22, 2025

The problem is that AE does not recognize the changes I made. So the next copy is from the default. And my handle is disposed. 


 

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
Community Beginner ,
Sep 23, 2025 Sep 23, 2025
LATEST

Because noone wanted to help me I post my solution for others. 
To get AE to accept the changed data I create a new handle and copy the data. 
Then it works and AE accepts the changed data.

PF_Err TTAEPluginParamStruct::EventClick(PF_InData * const in_data, PF_OutData * const out_data, PF_ParamDef *params[], PF_EventExtra	* const event_extra) {
  PF_Err err = PF_Err_NONE;
  //select the param to be drawn
  TTAEPluginParamDiagram* const diagram = GetArbitraryParam();
  if (diagram) {
    //get data first and set into param 
    AEFX_SuiteScoper<PF_HandleSuite1> handleSuite(in_data, kPFHandleSuite, kPFHandleSuiteVersion1); 
    
    PF_ParamDef	aeParamDef;
    ERR(PF_CHECKOUT_PARAM(in_data, diagram->Numberation - 1, in_data->current_time, in_data->time_step, in_data->time_scale, &aeParamDef));
   // PF_Handle	arbH = aeParamDef.u.arb_d.value;
    PF_Handle arbH = params[diagram->Numberation - 1]->u.arb_d.value;
    
    if (arbH) {
      ArbData* const data = reinterpret_cast<ArbData*>(handleSuite->host_lock_handle(arbH));
      if (data) {
        diagram->LoadArbData(data);
        diagram->Click(in_data, out_data, event_extra);
        diagram->SaveArbData(data);

        const size_t size = handleSuite->host_get_handle_size(arbH);

        PF_Handle newH = handleSuite->host_new_handle(size);
        void* newData = handleSuite->host_lock_handle(newH);
        std::memcpy(newData, data, size);

        handleSuite->host_unlock_handle(newH);
        handleSuite->host_unlock_handle(arbH);

        LogHexDump("TTAEPluginParamStruct::EventClick", data, 20);

        params[diagram->Numberation - 1]->u.arb_d.value = newH; 
        params[diagram->Numberation - 1]->uu.change_flags |= PF_ChangeFlag_CHANGED_VALUE;

        event_extra->evt_out_flags |= PF_EO_HANDLED_EVENT | PF_EO_UPDATE_NOW;
        out_data->out_flags |= PF_OutFlag_FORCE_RERENDER; 
        aeParamDef.uu.change_flags |= PF_ChangeFlag_CHANGED_VALUE;
      }
    }
    event_extra->evt_out_flags |= PF_EO_HANDLED_EVENT | PF_EO_UPDATE_NOW;
    Logger::getInstance().println( "CHECKIN_PARAM arb handle = " +std::to_string(reinterpret_cast<uintptr_t>(aeParamDef.u.arb_d.value)));
    ERR(PF_CHECKIN_PARAM(in_data, &aeParamDef));
  }
  return err;
}


 

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