Bugfix: When using 'border render' (part image), and then in compositor
authorTon Roosendaal <ton@blender.org>
Mon, 13 Feb 2006 20:14:42 +0000 (20:14 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 13 Feb 2006 20:14:42 +0000 (20:14 +0000)
the Preview Panel, you got a crash... this case wasn't anticipated in
code... two cropping mechanisms on top. :)

Works OK now, but offset of cropping is drawn a bit weird... this case
needs recode a bit. On list for later.

source/blender/blenkernel/intern/node_composite.c
source/blender/src/drawimage.c

index 1eabc068daa4d54016933d93bb2899355825d37c..f53e844d60a2f2b93f4f2c06bc1231b1928e844f 100644 (file)
@@ -459,7 +459,7 @@ static void generate_preview(bNode *node, CompBuf *stackbuf)
 {
        bNodePreview *preview= node->preview;
        
-       if(preview) {
+       if(preview && stackbuf) {
                CompBuf *cbuf;
                
                if(stackbuf->x > stackbuf->y) {
index 8840a9672bfbab7b9c57ce254f6110d5278097a6..8dd2a624afca4f2fa79d210959c1693ab15c2c3f 100644 (file)
@@ -1057,6 +1057,11 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block)
        int winy= (G.scene->r.size*G.scene->r.ysch)/100;
        short mval[2];
        
+       if(G.scene->r.mode & R_BORDER) {
+               winx*= (G.scene->r.border.xmax - G.scene->r.border.xmin);
+               winy*= (G.scene->r.border.ymax - G.scene->r.border.ymin);
+       }
+       
        /* while dragging we don't update the rects */
        if(block->panel->flag & PNL_SELECT)
                return;