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.
This commit is contained in:
Ton Roosendaal 2007-01-10 11:32:36 +00:00
parent f236541161
commit 3625d23afa
2 changed files with 8 additions and 2 deletions

@ -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);

@ -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; a<SPACE_MAXHANDLER; a+=2) {
@ -1195,14 +1195,20 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block)
static int is_preview_allowed(ScrArea *cur)
{
SpaceImage *sima= cur->spacedata.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;
}