Fix T44503 full sample does not display any preview any more.
authorAntony Riakiotakis <kalast@gmail.com>
Mon, 4 May 2015 14:57:17 +0000 (16:57 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Mon, 4 May 2015 14:57:48 +0000 (16:57 +0200)
The fix exposes another error not fixed in this commit, escaping the
render will not flush the full sample render result correctly.

source/blender/blenkernel/intern/image.c

index b714e8b7eaca4266687b68c206b9b81ceac7982e..5169559d80b1d2635b32d41a8c78e8f826903da9 100644 (file)
@@ -3623,6 +3623,15 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
                        if (rpass) {
                                channels = rpass->channels;
                                rectf = rpass->rect;
+
+                               if (!rectf) {
+                                       /* Happens when Save Buffers is enabled.
+                                        * Use display buffer stored in the render layer.
+                                        */
+                                       rect = (unsigned int *) rl->display_buffer;
+                                       byte_buffer_in_display_space = true;
+                               }
+
                                dither = 0.0f; /* don't dither passes */
                        }