Bugfix: the sticky and use rot buttons for the floor constraint were
[blender.git] / source / blender / src / buttons_object.c
index 150ba466ecb128eb0c418726bd537810fdfc2024..e0190ab474f78fd12709d9cf8b830f5513ebe698 100644 (file)
@@ -459,7 +459,6 @@ static void draw_constraint_spaceselect (uiBlock *block, bConstraint *con, short
                bwidth = 125;
                tarx = 120;
                ownx = 0;
-               
        }
        else if (target == -1) {
                bwidth = 125;
@@ -528,7 +527,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
        uiBlockSetEmboss(block, UI_EMBOSSN);
        
        /* rounded header */
-       rb_col= (con->flag & CONSTRAINT_ACTIVE)?40:20;
+       rb_col= (con->flag & CONSTRAINT_ACTIVE)?50:20;
        uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-1, width+40, 22, NULL, 5.0, 0.0, 
                         (con->flag & CONSTRAINT_EXPAND)?3:15 , rb_col-20, ""); 
        
@@ -1085,8 +1084,8 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
                                        }
                                uiBlockEndAlign(block);
                                
-                               uiDefButBitI(block, TOG, 0, B_CONSTRAINT_TEST, "Sticky", *xco, *yco-24, 44, 18, &data->flag, 0, 24, 0, 0, "Immobilize object while constrained");
-                               uiDefButBitI(block, TOG, 2, B_CONSTRAINT_TEST, "Use Rot", *xco+44, *yco-24, 64, 18, &data->flag, 0, 24, 0, 0, "Use target object rotation");
+                               uiDefButBitI(block, TOG, MINMAX_STICKY, B_CONSTRAINT_TEST, "Sticky", *xco, *yco-24, 44, 18, &data->flag, 0, 24, 0, 0, "Immobilize object while constrained");
+                               uiDefButBitI(block, TOG, MINMAX_USEROT, B_CONSTRAINT_TEST, "Use Rot", *xco+44, *yco-24, 64, 18, &data->flag, 0, 24, 0, 0, "Use target object rotation");
                                
                                uiDefBut(block, LABEL, B_CONSTRAINT_TEST, "Max/Min:", *xco-8, *yco-64, 54, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); 
                                
@@ -1250,7 +1249,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
                                int togButWidth = 50;
                                int textButWidth = ((width/2)-togButWidth);
                                
-                               height = 106; 
+                               height = 136; 
                                uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-height, width+40,height-1, NULL, 5.0, 0.0, 12, rb_col, ""); 
                                
                                /* Draw Pairs of LimitToggle+LimitValue */
@@ -1284,8 +1283,11 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
                                        uiDefButF(block, NUM, B_CONSTRAINT_TEST, "", *xco+(width-textButWidth-5), *yco-72, (textButWidth-5), 18, &(data->zmax), -1000, 1000, 0.1,0.5,"Highest z value to allow"); 
                                uiBlockEndAlign(block);
                                
+                               /* special option(s) */
+                               uiDefButBitS(block, TOG, LIMIT_TRANSFORM, B_CONSTRAINT_TEST, "For Transform", *xco+(width/4), *yco-100, (width/2), 18, &data->flag2, 0, 24, 0, 0, "Transforms are affected by this constraint as well"); 
+                               
                                /* constraint space settings */
-                               draw_constraint_spaceselect(block, con, *xco, *yco-100, is_armature_owner(ob), -1);
+                               draw_constraint_spaceselect(block, con, *xco, *yco-130, is_armature_owner(ob), -1);
                        }
                        break;
                case CONSTRAINT_TYPE_ROTLIMIT:
@@ -4105,9 +4107,9 @@ static void object_panel_particle_physics(Object *ob)
 
                        butw=103;
                        uiBlockBeginAlign(block);
-                       uiDefButF(block, NUM, B_PART_RECALC, "AccX:",           butx,(buty-=buth),butw,buth, part->acc, -200.0, 200.0, 100, 0, "Specify a constant acceleration along the X-axis");
-                       uiDefButF(block, NUM, B_PART_RECALC, "AccY:",           butx+butw,buty,butw,buth, part->acc+1,-200.0, 200.0, 100, 0, "Specify a constant acceleration along the Y-axis");
-                       uiDefButF(block, NUM, B_PART_RECALC, "AccZ:",           butx+2*butw,buty,butw+1,buth, part->acc+2, -200.0, 200.0, 100, 0, "Specify a constant acceleration along the Z-axis");
+                       uiDefButF(block, NUM, B_PART_RECALC, "AccX:",           butx,(buty-=buth),butw,buth, part->acc, -200.0, 200.0, 10, 0, "Specify a constant acceleration along the X-axis");
+                       uiDefButF(block, NUM, B_PART_RECALC, "AccY:",           butx+butw,buty,butw,buth, part->acc+1,-200.0, 200.0, 10, 0, "Specify a constant acceleration along the Y-axis");
+                       uiDefButF(block, NUM, B_PART_RECALC, "AccZ:",           butx+2*butw,buty,butw+1,buth, part->acc+2, -200.0, 200.0, 10, 0, "Specify a constant acceleration along the Z-axis");
 
                        uiDefButF(block, NUM, B_PART_RECALC, "Drag:",           butx,(buty-=buth),butw,buth, &part->dragfac, 0.0, 1.0, 1, 0, "Specify the amount of air-drag");
                        uiDefButF(block, NUM, B_PART_RECALC, "Brown:",          butx+butw,buty,butw,buth, &part->brownfac, 0.0, 200.0, 1, 0, "Specify the amount of brownian motion");