== Transform Limiting Constraints ==

Two tweaks:
* Reduced the amount of empty space at the bottom of these constraints.
* When using the Add Constraint menu (Ctrl Alt C) to add new constraints,
an empty is no longer created when creating a "Limit *" constraint.
This commit is contained in:
Joshua Leung
2006-12-17 10:02:23 +00:00
parent 65eda9e6e1
commit 8a5a29ae33
2 changed files with 8 additions and 5 deletions

View File

@@ -1010,7 +1010,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
int togButWidth = 50;
int textButWidth = ((width/2)-togButWidth);
height = 118;
height = 106;
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 */
@@ -1060,10 +1060,13 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
case CONSTRAINT_TYPE_ROTLIMIT:
{
bRotLimitConstraint *data = con->data;
int normButWidth = (width/3);
height = 118;
if (ob->type == OB_ARMATURE && (ob->flag & OB_POSEMODE))
height = 106;
else
height = 78;
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 */
@@ -1100,7 +1103,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
int togButWidth = 50;
int textButWidth = ((width/2)-togButWidth);
height = 90;
height = 78;
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 */

View File

@@ -749,7 +749,7 @@ void add_constraint(int only_IK)
else if(obsel) {
set_constraint_target(con, obsel, NULL);
}
else if(nr!=11) { /* add new empty as target */
else if(ELEM4(nr, 11, 13, 14, 15)==0) { /* add new empty as target */
Base *base= BASACT, *newbase;
Object *obt;