Thread breaks inside Execute(...)
-
On 24/01/2017 at 04:47, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;---------
Hello.I was trying to support Render Region in my render engine, but for some reason, I was getting vps->thread->TestBreak() as true inside my VideoPostData::Execute(...). After a lot of investigation, I found that the document I get in vps->doc is the same as in GetActiveDocument(). The problem here is that during my render engine initialization, I have to set to false the Linear Workflow parameter using:
vps->doc->SetParameter(DOCUMENT_LINEARWORKFLOW, FALSE, DESCFLAGS_SET_0);
because it would cause the texture baking to create washed out images.Removing the above line, vps->thread stops breaking.
What does this line do that causes thread break and how can I overpass it ?
I have noticed that EventAdd(EVENT_FORCEREDRAW); also causes the thread to break.Could you please help me understand it or give me a link to any manual ?
I have checked BaseThread manual, but I couldn't find any reference to this.Thank you very much for your time !
-
On 25/01/2017 at 02:30, xxxxxxxx wrote:
Hi,
the point is, if the document gets changed the interactive render region needs to re-evaluate and re-render the scene, so this break condition looks absolutely ok to me.
You shouldn't modify the scene when rendering.
Turning off linear workflow feels wrong for me, as it changes the scene against the artists intentions. Instead it's probably better to react correctly to the linear workflow settings. But this should probably be discussed in a separate thread. -
On 25/01/2017 at 04:24, xxxxxxxx wrote:
Hello and thank you very much for your answer.
I am referring to Render Region command (not IRR).
The problem is that I have to disable Linear Workflow before rendering in VIDEOPOSTCALL_RENDER. So, I do it in vps->doc, since it is cloned. But, when using Render Region tool, the document is not cloned, but the same as GetActiveDocument().Thank you.
-
On 25/01/2017 at 04:38, xxxxxxxx wrote:
Sorry, my fault, but it's the same explanation for render region.
And I still think, disabling LWF is a good choice and it should be discussed in another thread.