From 3625d23afa51c04925e1ceb042447a7a3cfe8265 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 10 Jan 2007 11:32:36 +0000 Subject: [PATCH] Bugfix #5673 UV ImageWindow, composite preview screwed up view matrix, so UV editing doesnt work with it. Simply fixed it with not allowing this preview panel unless image type is OK. With new image API a trivial check. --- source/blender/src/buttons_scene.c | 2 +- source/blender/src/drawimage.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index ab8dab6d92c..0ab4b4b75f9 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -1224,7 +1224,7 @@ static void render_panel_bake(void) uiNewPanelTabbed("Anim", "Render"); if(uiNewPanel(curarea, block, "Bake", "Render", 320, 0, 318, 204)==0) return; - but= uiDefBut(block, BUT, B_NOP, "BAKE", 10, 150, 190,40, 0, 0, 0, 0, 0, "Start the bake render"); + but= uiDefBut(block, BUT, B_NOP, "BAKE", 10, 150, 190,40, 0, 0, 0, 0, 0, "Start the bake render for selected Objects"); uiButSetFunc(but, do_bake_func, NULL, NULL); #if 0 uiBlockBeginAlign(block); diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 4f54ab1cb8b..257d78c8b95 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -154,7 +154,7 @@ static int image_preview_active(ScrArea *sa, float *xim, float *yim) SpaceImage *sima= sa->spacedata.first; /* only when compositor shows, and image handler set */ - if(sima->image == (Image *)find_id("IM", "Viewer Node")) { + if(sima->image && sima->image->type==IMA_TYPE_COMPOSITE) { short a; for(a=0; aspacedata.first; ScrArea *sa; + /* check if another areawindow has preview set */ for(sa=G.curscreen->areabase.first; sa; sa= sa->next) { if(sa!=cur && sa->spacetype==SPACE_IMAGE) { if(image_preview_active(sa, NULL, NULL)) return 0; } } + /* check image type */ + if(sima->image==NULL || sima->image->type!=IMA_TYPE_COMPOSITE) + return 0; + return 1; }