Revision: 28104
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28104
Author: blendix
Date: 2010-04-09 12:54:19 +0200 (Fri, 09 Apr 2010)
Log Message:
-----------
Render Branch: attempt to fix crashes where scene updates would run while
rendering. G.rendering was set in the job thread, which is too late.
Modified Paths:
--------------
branches/render25/source/blender/editors/render/render_internal.c
Modified: branches/render25/source/blender/editors/render/render_internal.c
===================================================================
--- branches/render25/source/blender/editors/render/render_internal.c
2010-04-09 07:47:57 UTC (rev 28103)
+++ branches/render25/source/blender/editors/render/render_internal.c
2010-04-09 10:54:19 UTC (rev 28104)
@@ -558,8 +558,10 @@
static int screen_render_modal(bContext *C, wmOperator *op, wmEvent *event)
{
/* no running blender, remove handler and pass through */
- if(0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
+ if(0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) {
+ G.rendering = 0;
return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+ }
/* running render */
switch (event->type) {
@@ -667,6 +669,11 @@
WM_cursor_wait(0);
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene);
+ /* we set G.rendering here already instead of only in the job, this
ensure
+ main loop or other scene updates are disabled in time, since they may
+ have started before the job thread */
+ G.rendering = 1;
+
/* add modal handler for ESC */
WM_event_add_modal_handler(C, op);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs