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

AE SDK Custom Effect UI: using PF_Event_KEYDOWNs...

Explorer ,
Jul 31, 2023 Jul 31, 2023

I'm writing a custom ARB handler and UI... It includes text strings, so I want to allow PF_Event_KEYDOWN events to modify the text content.

The problem -- apparently AppSuite4()->PF_InvalidateRect isn't allowed during KEYDOWNs?? The key gets handled ok. But then, AE presents an alert, "After Effects error: internal verification failure, sorry! {PF_InvalidateRect can only be called during valid events.}

I really need to refresh the display after a keystroke changes it... Am I thinking about this wrong?

aeAlert3.jpegexpand image

any tips very appreciated ...

TOPICS
SDK
553
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

Explorer , Aug 03, 2023 Aug 03, 2023

Found i think the correct solution, one of the outflags is just for this. works as desired.

            out_data->out_flags |= PF_OutFlag_REFRESH_UI;

Translate
Explorer ,
Aug 01, 2023 Aug 01, 2023

I have an unsatisfying workaround of marking the param value changed on every keystroke. This does succeed in updating the UI, but marks the document altered even if the param didn't "really" change, such as when moving the cursor in the text area. And of course it triggers re-rendering of the comp...

        ec.param->uu.change_flags |= PF_ChangeFlag_CHANGED_VALUE;

        extraEv->evt_out_flags = PF_EO_HANDLED_EVENT | PF_EO_UPDATE_NOW;

 

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 Expert ,
Aug 02, 2023 Aug 02, 2023

try PF_UpdateParamUI.

at worse, use PF_RefreshAllWindows. ANARCHY!!!!!

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 03, 2023 Aug 03, 2023

Found i think the correct solution, one of the outflags is just for this. works as desired.

            out_data->out_flags |= PF_OutFlag_REFRESH_UI;

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 Expert ,
Aug 03, 2023 Aug 03, 2023

ah, excellent! thanks for posting back. 🙂

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 07, 2023 Aug 07, 2023
LATEST

And for completeness, on a DO_CLICK or DRAG event,
AppSuite4()->PF_InvalidateRect(extra->contextH, NULL);

does indeed refresh the parameter gui as desired.

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