On 27/01/2017 at 00:06, xxxxxxxx wrote:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ;
I would like to disable Linear Workflow via code during VIDEOPOSTCALL_RENDER.
I do it using vps->doc->SetParameter(DOCUMENT_LINEARWORKFLOW,FALSE, DESCFLAGS_SET_0);
The problem is that the given thread breaks and I have to stop rendering.
After some time I noticed that the given document (vps->doc) is the same as GetActiveDocument. This applies only to Render Region (IRR or Picture Viewer seem to pass a cloned document in Execute).
So, I assume that modifying a parameter that affects the view port (Linear Workflow) might cause an EVENT_FORCEREDARW and this is probably why the render thread breaks. Am I correct ?
So my question is what can I do to disable DOCUMENT_LINEARWORKFLOW in the document without breaking the thread ? I don't want to have the users disable it manually since it can be easily forgotten.
Thank you for your time !
On 27/01/2017 at 01:50, xxxxxxxx wrote:
as said in the other thread, I still think, it's wrong to modify the document in any way in a VideoPost. Disabling linear workflow changes the outcome of a scene, an artist might have deliberately chosen. So, actually I'd rather discuss, why LWF is not working for you.
But having said that, you might be able to get away with a SceneHook or a MessageData plugin, where you could react to scene load and import, as well as to EVMSG_CHANGE. Basically resetting LWF checkbox, if your render engine is selected. Then of course you'd need to document this properly for your users, as it probably does not feel right, if she or he wants to set the checkbox and it automagically resets itself.