Sculpt buttons had their events set to zero, this mean clicking on buttons would...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 May 2008 14:44:39 +0000 (14:44 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 May 2008 14:44:39 +0000 (14:44 +0000)
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
source/blender/src/space.c

index 2ffec207e84041534e873f375f2f523e9144bb35..5a9b6b27754526d0fe73e5ecbacb3844bed8a96a 100644 (file)
@@ -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 */
index cc7f4322ed93c0df2f03a8d8e91c183deab99cee..1d07bfbe22a6a65a6ede310f1f3549bb7f6d451b 100644 (file)
@@ -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)