Render display fix:
authorTon Roosendaal <ton@blender.org>
Sat, 16 Sep 2006 13:53:33 +0000 (13:53 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 16 Sep 2006 13:53:33 +0000 (13:53 +0000)
When using "Border" render, and output to UV/Image window, the compositing
result was not drawn. I had to add a refresh for reading results...

source/blender/src/drawimage.c

index ce6a4e63fcd588414def0c3c67187dd03ee00399..be60509852fbdc8e2f601a11be27823d9fc436f7 100644 (file)
@@ -2061,6 +2061,15 @@ static void imagewindow_progress_display_cb(RenderResult *rr, volatile rcti *rec
 {
        
        if (image_area) {
+               
+               if(rect==NULL) {
+                       SpaceImage *sima= image_area->spacedata.first;
+                       
+                       /* this enforces reading correct buffer in what_image(), renderlayers/scenes/compo/sequences... */
+                       IMB_freeImBuf(sima->image->ibuf);
+                       sima->image->ibuf= NULL;
+               }               
+               
                imagewindow_progress(image_area, rr, rect);
 
                /* no screen_swapbuffers, prevent any other window to draw */
@@ -2168,6 +2177,7 @@ static ScrArea *imagewindow_set_render_display(void)
        else if(sima->image->id.us==0)  /* well... happens on reload, dunno yet what todo, imagewindow cannot be user when hidden*/
                sima->image->id.us= 1;
        
+       /* this enforces reading empty buffer in what_image(), so display is cleared */
        IMB_freeImBuf(sima->image->ibuf);
        sima->image->ibuf= NULL;