Flush a group in a non-main thread.
I have a group which I want to flush and re-add the components in it.
I have to do that in a VideoPostData's ::Execute(....) method but since this runs in a non-main threaded, the dialog doesn't change.
How can I do that ?
Thank you for your time.
we have the general question, what is the use case of updating a dialog from within the rendering pipeline? This seems pretty unusual to us.
In general you can use Core Messages to execute code in the main thread, see Core Messages Manual. This still works in R20.
In R20 there's ExecuteOnMainThread() in the maxon::JobInterface, see Jobs Manual. But I strongly suggest, that we first discuss, why you want to update a dialog from within the rendering pipeline. Otherwise you'd probably run into unexpected results with this approach.
I turned your thread into a question, see Q&A New Functionality.
This post is deleted!
Once I finish the rendering of an image, I need to retrieve some data from my render engine. These data are produced in a mid-rendering or in a post-rendering state. The ideal position to request the data from my render engine is in Videopost's Execute method, where I update the Picture Viewer image.
Thank you for your support !
you really shouldn't rely on updating a dialog from the render pipeline. You simply do not know, in which context the rendering is happening. For example it could be in command line renderer, which doesn't have a GUI at all.
Instead it would be better to take the result from rendering after it has finished and then update the dialog.
I have solved it by using SpecialEventAdd and sending a message to dialog's CoreMessage.