From 6e7744451be07141753a102c76aa768509b1d124 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 15 May 2008 14:44:39 +0000 Subject: [PATCH] Sculpt buttons had their events set to zero, this mean clicking on buttons would pass through to 3D view and sculpt, use B_NOP instead. Opening many panels would print an error in the console, show an error message now so users dont get confused. --- source/blender/src/buttons_editing.c | 16 ++++++++-------- source/blender/src/space.c | 5 ++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 2ffec207e84..5a9b6b27754 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -5532,7 +5532,7 @@ void sculptmode_draw_interface_tools(uiBlock *block, unsigned short cx, unsigned uiDefButC(block,ROW,B_NOP,"Sub",cx+89,cy,89,19,&sculptmode_brush()->dir,15.0,2.0,0, 0,"Subtract depth from model [Shift]"); } if(sd->brush_type!=GRAB_BRUSH) - uiDefButBitC(block, TOG, SCULPT_BRUSH_AIRBRUSH, 0, "Airbrush", cx+178,cy,89,19, &sculptmode_brush()->flag,0,0,0,0, "Brush makes changes without waiting for the mouse to move"); + uiDefButBitC(block, TOG, SCULPT_BRUSH_AIRBRUSH, B_NOP, "Airbrush", cx+178,cy,89,19, &sculptmode_brush()->flag,0,0,0,0, "Brush makes changes without waiting for the mouse to move"); cy-= 20; uiDefButS(block,NUMSLI,B_NOP,"Size: ",cx,cy,268,19,&sculptmode_brush()->size,1.0,200.0,0,0,"Set brush radius in pixels"); cy-= 20; @@ -5545,9 +5545,9 @@ void sculptmode_draw_interface_tools(uiBlock *block, unsigned short cx, unsigned uiDefBut( block,LABEL,B_NOP,"Symmetry",cx,cy,90,19,NULL,0,0,0,0,""); cy-= 20; uiBlockBeginAlign(block); - uiDefButBitC(block, TOG, SYMM_X, 0, "X", cx,cy,40,19, &sd->symm, 0,0,0,0, "Mirror brush across X axis"); - uiDefButBitC(block, TOG, SYMM_Y, 0, "Y", cx+40,cy,40,19, &sd->symm, 0,0,0,0, "Mirror brush across Y axis"); - uiDefButBitC(block, TOG, SYMM_Z, 0, "Z", cx+80,cy,40,19, &sd->symm, 0,0,0,0, "Mirror brush across Z axis"); + uiDefButBitC(block, TOG, SYMM_X, B_NOP, "X", cx,cy,40,19, &sd->symm, 0,0,0,0, "Mirror brush across X axis"); + uiDefButBitC(block, TOG, SYMM_Y, B_NOP, "Y", cx+40,cy,40,19, &sd->symm, 0,0,0,0, "Mirror brush across Y axis"); + uiDefButBitC(block, TOG, SYMM_Z, B_NOP, "Z", cx+80,cy,40,19, &sd->symm, 0,0,0,0, "Mirror brush across Z axis"); uiBlockEndAlign(block); @@ -5556,9 +5556,9 @@ void sculptmode_draw_interface_tools(uiBlock *block, unsigned short cx, unsigned uiDefBut( block,LABEL,B_NOP,"LockAxis",cx+140,cy,90,19,NULL,0,0,0,0,""); cy-= 20; uiBlockBeginAlign(block); - uiDefButBitC(block, TOG, AXISLOCK_X, 0, "X", cx+140,cy,40,19, &sd->axislock, 0,0,0,0, "Constrain X axis"); - uiDefButBitC(block, TOG, AXISLOCK_Y, 0, "Y", cx+180,cy,40,19, &sd->axislock, 0,0,0,0, "Constrain Y axis"); - uiDefButBitC(block, TOG, AXISLOCK_Z, 0, "Z", cx+220,cy,40,19, &sd->axislock, 0,0,0,0, "Constrain Z axis"); + uiDefButBitC(block, TOG, AXISLOCK_X, B_NOP, "X", cx+140,cy,40,19, &sd->axislock, 0,0,0,0, "Constrain X axis"); + uiDefButBitC(block, TOG, AXISLOCK_Y, B_NOP, "Y", cx+180,cy,40,19, &sd->axislock, 0,0,0,0, "Constrain Y axis"); + uiDefButBitC(block, TOG, AXISLOCK_Z, B_NOP, "Z", cx+220,cy,40,19, &sd->axislock, 0,0,0,0, "Constrain Z axis"); uiBlockEndAlign(block); @@ -5595,7 +5595,7 @@ void sculptmode_draw_interface_brush(uiBlock *block, unsigned short cx, unsigned if(sd->brush_type == DRAW_BRUSH) uiDefButC(block,NUM,B_NOP, "View", cx,cy,80,19, &sculptmode_brush()->view, 0,10,20,0,"Pulls brush direction towards view"); cy-= 20; - uiDefButBitC(block, TOG, SCULPT_BRUSH_ANCHORED, 0, "Anchored", cx,cy,80,19, &sculptmode_brush()->flag, 0,0,0,0, "Keep the brush center anchored to the initial location"); + uiDefButBitC(block, TOG, SCULPT_BRUSH_ANCHORED, B_NOP, "Anchored", cx,cy,80,19, &sculptmode_brush()->flag, 0,0,0,0, "Keep the brush center anchored to the initial location"); uiBlockEndAlign(block); /* Draw curve */ diff --git a/source/blender/src/space.c b/source/blender/src/space.c index cc7f4322ed9..1d07bfbe22a 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -214,7 +214,10 @@ void add_blockhandler(ScrArea *sa, short eventcode, short val) break; } } - if(a==SPACE_MAXHANDLER) printf("error; max (4) blockhandlers reached!\n"); + if(a==SPACE_MAXHANDLER) { + error("Only %i floating panels allowed", SPACE_MAXHANDLER-1); + } + } void rem_blockhandler(ScrArea *sa, short eventcode)