Skip to main content
Known Participant
Jan 11, 2024 5:01 PM UTC
Question

Progress bar in parameter UI

Is there a way to update some parameters name during computation in the rendering thread? The warp stabilizer seems to do this but I cannot find a way to trigger UI redraw from the render thread. Thanks for any help!

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Community Expert
Jan 11, 2024 6:33 PM UTC

have the render thread leave some message in a place reachable by both threads (the global data handle, for example). then on the ui thread implement idle_hook, and during that call check for the message. if it's there, proceed with the renaming on the ui thread.

Translate
Known Participant
Jan 15, 2024 12:27 PM UTC

Thank you for the hint, already looking into it...

I receive the triggers, but how can I access parameters from within the hook? The hooks signature is 

 

static	A_Err	IdleHook(
			AEGP_GlobalRefcon	plugin_refconP,
			AEGP_IdleRefcon		refconP,
			A_long* max_sleepPL)

 

... so I don't have access to the suites or parameters. Any help is appreciated! Thanks.

 

EDIT: I managed to implement this, but now I have another problem. Changing a parameters name via AEGP_SetStreamName triggers a rerender and invalidates the cache. How can I prevent this? Renaming shouldn't change anything.

Translate
Community Expert
Jan 16, 2024 1:37 PM UTC

hmmm...

renaming readlly shouldn't trigger a re-render. what happens if you use AEGP_SetStreamName during UPDATE_PARAMS_UI?

perhaps the name is linked to some param value via expression? is the name factored into GuidMixInPtr() dure pre-render?

Translate