Fix for fix in revision 32122, viewer node wasn't working anymore in some cases.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 25 Sep 2010 22:21:35 +0000 (22:21 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 25 Sep 2010 22:21:35 +0000 (22:21 +0000)
source/blender/blenkernel/intern/image.c

index 344f85000754517d19656b5c8379f099b6f28f0c..a199c1cf738519c8be230d40d00e24413e17e79c 100644 (file)
@@ -2139,10 +2139,15 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r)
                                                BLI_lock_thread(LOCK_VIEWER);
                                                *lock_r= ima;
 
-                                               /* Composite Viewer, all handled in compositor */
-                                               /* fake ibuf, will be filled in compositor */
-                                               ibuf= IMB_allocImBuf(256, 256, 32, IB_rect, 0);
-                                               image_assign_ibuf(ima, ibuf, 0, frame);
+                                               frame= iuser?iuser->framenr:0;
+                                               ibuf= image_get_ibuf(ima, 0, frame);
+
+                                               if(!ibuf) {
+                                                       /* Composite Viewer, all handled in compositor */
+                                                       /* fake ibuf, will be filled in compositor */
+                                                       ibuf= IMB_allocImBuf(256, 256, 32, IB_rect, 0);
+                                                       image_assign_ibuf(ima, ibuf, 0, frame);
+                                               }
                                        }
                                }
                        }