Fix #35677, #35525: cycles viewport not updating properly in some situations.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 9 Jun 2013 11:57:50 +0000 (11:57 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 9 Jun 2013 11:57:50 +0000 (11:57 +0000)
Revision 56883 broke a mechanism where cycles tags itself to be updated later
while it is busy.

source/blender/editors/render/render_update.c

index 6a4d99d2535698a98d7f69cbafefbc49985d3ef4..436aef943e4a3af43abc10fb1f3a8252fa5bf813 100644 (file)
@@ -83,10 +83,6 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
        wmWindow *win;
        static int recursive_check = FALSE;
 
-       /* why do this function then? :) */
-       if (updated == 0)
-               return;
-       
        /* don't do this render engine update if we're updating the scene from
         * other threads doing e.g. rendering or baking jobs */
        if (!BLI_thread_is_main())
@@ -126,6 +122,9 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
                                rv3d = ar->regiondata;
                                engine = rv3d->render_engine;
 
+                               /* call update if the scene changed, or if the render engine
+                                * tagged itself for update (e.g. because it was busy at the
+                                * time of the last update) */
                                if (engine && (updated || (engine->flag & RE_ENGINE_DO_UPDATE))) {
 
                                        CTX_wm_screen_set(C, sc);