Copy link to clipboard
Copied
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?
any tips very appreciated ...
1 Correct answer
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;
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
try PF_UpdateParamUI.
at worse, use PF_RefreshAllWindows. ANARCHY!!!!!
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
ah, excellent! thanks for posting back. 🙂
Copy link to clipboard
Copied
And for completeness, on a DO_CLICK or DRAG event,
AppSuite4()->PF_InvalidateRect(extra->contextH, NULL);
does indeed refresh the parameter gui as desired.

