On 13/05/2015 at 18:37, xxxxxxxx wrote:
Cinema 4D Version: 15+
Platform: Windows ;
Language(s) : C++ ;
I'm creating my custom renderer, I want to detect different messages.
1- for example when the user renders in viewport, if he clicks anything "some message is sent" , it stops the rendering.
2- when he renders in picture viewer, to stop the rendering there is a cancel message "I wanna know which message to listen to it".
3- what about different messages, for example when object moves, camera moves, etc...
I know this question may seem too broad, but I just need a hint of where to start so I can manage different messages correctly.
On 14/05/2015 at 06:07, xxxxxxxx wrote:
you can check if the current render process should end by checking the render thread.
if(vps->thread && vps->thread->TestBreak())
Moving an object or the camera is a form of user interaction and has nothing to do with rendering. Such interactions typically trigger a core message, especially EVMSG_CHANGE.
On 14/05/2015 at 06:18, xxxxxxxx wrote:
thanks Sebastian, I want to listen to these messages for interactive rendering.
On 04/06/2015 at 12:58, xxxxxxxx wrote:
sorry for opening this thread again, but I tested this, and found a main problem, my render call is something similar to this:
if (vps->vp==VIDEOPOSTCALL_INNER && vps->open)
//prepare data from RayObject(s)....
myRender();// a blocking call!!
so how can I do this check?? even if the GUI is showing the message and I click it, the execution of this message won't happen before myRender() function exits.
On 04/06/2015 at 13:14, xxxxxxxx wrote:
nvm, I think I know now how to do it, I put "(vps->thread && vps->thread->TestBreak())" in my render cancel callback.