== AutoIK - Fixes for MouseScroll Setting ==
* Added display of current chain-length setting to the header, when transforming with Auto-IK on * Removed debug print accidentally left in * Fixed compiler warning in buttons_object.c
This commit is contained in:
@@ -943,7 +943,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
||||
/* Settings */
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButBitS(block, TOG, CONSTRAINT_IK_TIP, B_CONSTRAINT_TEST, "Use Tail", *xco, *yco-92, 137, 19, &data->flag, 0, 0, 0, 0, "Include Bone's tail als last element in Chain");
|
||||
uiDefButI(block, NUM, B_CONSTRAINT_TEST, "ChainLen:", *xco, *yco-112,137,19, &data->rootbone, 0, 255, 0, 0, "If not zero, the amount of bones in this chain");
|
||||
uiDefButS(block, NUM, B_CONSTRAINT_TEST, "ChainLen:", *xco, *yco-112,137,19, &data->rootbone, 0, 255, 0, 0, "If not zero, the amount of bones in this chain");
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButF(block, NUMSLI, B_CONSTRAINT_TEST, "PosW ", *xco+147, *yco-92, 137, 19, &data->weight, 0.01, 1.0, 2, 2, "For Tree-IK: weight of position control for this target");
|
||||
|
||||
@@ -2515,6 +2515,7 @@ void initTranslation(TransInfo *t)
|
||||
static void headerTranslation(TransInfo *t, float vec[3], char *str) {
|
||||
char tvec[60];
|
||||
char distvec[20];
|
||||
char autoik[20];
|
||||
float dvec[3];
|
||||
float dist;
|
||||
|
||||
@@ -2536,23 +2537,34 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) {
|
||||
else
|
||||
sprintf(distvec, "%.4f", dist);
|
||||
|
||||
if(t->flag & T_AUTOIK) {
|
||||
short chainlen= G.scene->toolsettings->autoik_chainlen;
|
||||
|
||||
if(chainlen)
|
||||
sprintf(autoik, "AutoIK-Len: %d", chainlen);
|
||||
else
|
||||
strcpy(autoik, "");
|
||||
}
|
||||
else
|
||||
strcpy(autoik, "");
|
||||
|
||||
if (t->con.mode & CON_APPLY) {
|
||||
switch(t->num.idx_max) {
|
||||
case 0:
|
||||
sprintf(str, "D: %s (%s)%s %s", &tvec[0], distvec, t->con.text, t->proptext);
|
||||
sprintf(str, "D: %s (%s)%s %s %s", &tvec[0], distvec, t->con.text, t->proptext, &autoik[0]);
|
||||
break;
|
||||
case 1:
|
||||
sprintf(str, "D: %s D: %s (%s)%s %s", &tvec[0], &tvec[20], distvec, t->con.text, t->proptext);
|
||||
sprintf(str, "D: %s D: %s (%s)%s %s %s", &tvec[0], &tvec[20], distvec, t->con.text, t->proptext, &autoik[0]);
|
||||
break;
|
||||
case 2:
|
||||
sprintf(str, "D: %s D: %s D: %s (%s)%s %s", &tvec[0], &tvec[20], &tvec[40], distvec, t->con.text, t->proptext);
|
||||
sprintf(str, "D: %s D: %s D: %s (%s)%s %s %s", &tvec[0], &tvec[20], &tvec[40], distvec, t->con.text, t->proptext, &autoik[0]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(t->flag & T_2D_EDIT)
|
||||
sprintf(str, "Dx: %s Dy: %s (%s)%s %s", &tvec[0], &tvec[20], distvec, t->con.text, t->proptext);
|
||||
else
|
||||
sprintf(str, "Dx: %s Dy: %s Dz: %s (%s)%s %s", &tvec[0], &tvec[20], &tvec[40], distvec, t->con.text, t->proptext);
|
||||
sprintf(str, "Dx: %s Dy: %s Dz: %s (%s)%s %s %s", &tvec[0], &tvec[20], &tvec[40], distvec, t->con.text, t->proptext, &autoik[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2598,7 +2610,7 @@ static void applyTranslation(TransInfo *t, float vec[3]) {
|
||||
int Translation(TransInfo *t, short mval[2])
|
||||
{
|
||||
float tvec[3];
|
||||
char str[200];
|
||||
char str[250];
|
||||
|
||||
if(t->flag & T_SHIFT_MOD) {
|
||||
float dvec[3];
|
||||
|
||||
@@ -719,7 +719,6 @@ static void pchan_autoik_adjust (bPoseChannel *pchan, short chainlen)
|
||||
data->rootbone= data->max_rootbone;
|
||||
else
|
||||
data->rootbone= chainlen;
|
||||
printf("chainlen = %d, max = %d, new = %d\n", chainlen, data->max_rootbone, data->rootbone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user