2.5
authorTon Roosendaal <ton@blender.org>
Wed, 25 Feb 2009 09:36:25 +0000 (09:36 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 25 Feb 2009 09:36:25 +0000 (09:36 +0000)
Bugfix: commit of last week that moved object_handle_update() out
of the view3d code into event loop caused render to crash. This
update should not be called during render. In future it'll even
be thread-locked or better; solved by giving objects an 'owner'
for storage of updates.

This solves a lot of crashes on render.

source/blender/windowmanager/intern/wm_event_system.c

index 7bf5cddd1b987edc0ae6022393fd1bfd1f856d2f..5247cb8abc10db51df300e0f46d9b99729727bbf 100644 (file)
@@ -218,18 +218,20 @@ void wm_event_do_notifiers(bContext *C)
                        }
                }
                
-               /* update all objects, ipos, matrices, displists, etc. Flags set by depgraph or manual, 
-                       no layer check here, gets correct flushed */
-               /* sets first, we allow per definition current scene to have dependencies on sets */
-               if(scene->set) {
-                       for(SETLOOPER(scene->set, base))
+               if(G.rendering==0) { // XXX make lock in future, or separated derivedmesh users in scene
+                       
+                       /* update all objects, ipos, matrices, displists, etc. Flags set by depgraph or manual, 
+                               no layer check here, gets correct flushed */
+                       /* sets first, we allow per definition current scene to have dependencies on sets */
+                       if(scene->set) {
+                               for(SETLOOPER(scene->set, base))
+                                       object_handle_update(scene, base->object);
+                       }
+                       
+                       for(base= scene->base.first; base; base= base->next) {
                                object_handle_update(scene, base->object);
-               }
-               
-               for(base= scene->base.first; base; base= base->next) {
-                       object_handle_update(scene, base->object);
-               }
-               
+                       }
+               }               
        }
        CTX_wm_window_set(C, NULL);
 }