Bugfix: Using the "Influence" slider for Constraints popped back to the

keyed positions when an Ipo was assigned to the Constraint.
This commit is contained in:
2005-10-27 17:37:27 +00:00
parent bab1603861
commit 637895d29d
2 changed files with 8 additions and 4 deletions

View File

@@ -579,8 +579,8 @@ enum {
B_CONSTRAINT_ADD_LOCKTRACK,
B_CONSTRAINT_ADD_FOLLOWPATH,
B_CONSTRAINT_ADD_DISTANCELIMIT,
B_CONSTRAINT_ADD_STRETCHTO
B_CONSTRAINT_ADD_STRETCHTO,
B_CONSTRAINT_INF
};
/* *********************** */

View File

@@ -854,7 +854,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
if (con->type!=CONSTRAINT_TYPE_NULL) {
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_CONSTRAINT_TEST, "Influence ", *xco, *yco, 197, 20, &(con->enforce), 0.0, 1.0, 0.0, 0.0, "Amount of influence this constraint will have on the final solution");
uiDefButF(block, NUMSLI, B_CONSTRAINT_INF, "Influence ", *xco, *yco, 197, 20, &(con->enforce), 0.0, 1.0, 0.0, 0.0, "Amount of influence this constraint will have on the final solution");
but = uiDefBut(block, BUT, B_CONSTRAINT_TEST, "Show", *xco+200, *yco, 45, 20, 0, 0.0, 1.0, 0.0, 0.0, "Show constraint's ipo in the Ipo window, adds a channel if not there");
/* If this is on an object or bone, add ipo channel the constraint */
uiButSetFunc (but, enable_constraint_ipo_func, ob, con);
@@ -918,6 +918,10 @@ void do_constraintbuts(unsigned short event)
switch(event) {
case B_CONSTRAINT_TEST:
break; // no handling
case B_CONSTRAINT_INF:
/* influence; do not execute actions for 1 dag_flush */
if(ob->pose)
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
case B_CONSTRAINT_CHANGETARGET:
if(ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels