Fixed missing display buffer invalidation when rendering sequencer animation
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 18 Sep 2012 08:40:53 +0000 (08:40 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 18 Sep 2012 08:40:53 +0000 (08:40 +0000)
source/blender/blenkernel/intern/image.c
source/blender/editors/render/render_internal.c
source/blender/render/intern/source/pipeline.c

index d514a0a7dd03525a71285eba28234ad41f7b05e3..208f5ea89e32d489c8210862632ef909a1704066 100644 (file)
@@ -2585,7 +2585,9 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
 
        /* invalidate color managed buffers if render result changed */
        BLI_lock_thread(LOCK_COLORMANAGE);
-       if (ibuf->x != rres.rectx || ibuf->y != rres.recty || ibuf->rect_float != rectf) {
+       if (ibuf->x != rres.rectx || ibuf->y != rres.recty ||
+           ibuf->rect_float != rectf || ibuf->rect != rect)
+       {
                ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
        }
 
index c371a9ce945066419b6671b6c97f0960a6052b4e..c08ea2b6429d31de0aa7f6c8351c9c28384437b8 100644 (file)
@@ -124,8 +124,14 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
        if (rr->rectf)
                rectf = rr->rectf;
        else {
-               if (rr->rect32)
+               if (rr->rect32) {
+                       /* special case, currently only happens with sequencer rendering,
+                        * which updates the whole frame, so we can only mark display buffer
+                        * as invalid here (sergey)
+                        */
+                       ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
                        return;
+               }
                else {
                        if (rr->renlay == NULL || rr->renlay->rectf == NULL) return;
                        rectf = rr->renlay->rectf;
index 0f8e0a6fcd80761a83117470958671000564c89f..e9ff74bd1accc8910c800fa9d629a273a767ed09 100644 (file)
@@ -1718,6 +1718,9 @@ static void do_render_seq(Render *re)
                re->progress(re->prh, (float)(cfra - re->r.sfra) / (re->r.efra - re->r.sfra));
        else
                re->progress(re->prh, 1.0f);
+
+       /* would mark display buffers as invalid */
+       re->display_draw(re->ddh, re->result, NULL);
 }
 
 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */