Force rendering on an event in a separate thread/Coming back to the main UI thread on an event
Hi,
I'm new to the After Effects sdk. I've set the out_data->out_flags to include PF_OutFlag_REFRESH_UI and PF_OutFlag_FORCE_RERENDER in the PF_Cmd_USER_CHANGED_PARAM handler. This works correctly when the parameter value is changed within the user interface.
I recently integrated WebSocket using easywsclient to receive messages from an external application, and I'm handling the messages in a separate thread using tinythread, which is from easywsclient.
Whenever I want to force render on a button tap or anywhere, I set the out_data->out_flags with PF_OutFlag_REFRESH_UI andPF_OutFlag_FORCE_RERENDER.
But if I set these out_flags in the separate thread in which I'm handling the messages received from the websocket, the UI isn't force rendered.
Is there a way to come back to the main UI thread or call a function in the main thraed when receiving message in the other thread?
Or another way to force render when I receive a message in the separate thread.
Thank you!
