diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/src/buttons_object.c | 16 | ||||
-rw-r--r-- | source/blender/src/transform.c | 22 | ||||
-rw-r--r-- | source/blender/src/transform_conversions.c | 1 |
3 files changed, 25 insertions, 14 deletions
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index ae259bf6372..3c1a7680ed2 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -937,29 +937,29 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s else { strcpy (data->subtarget, ""); } - + uiBlockEndAlign(block); - + /* 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"); uiDefButBitS(block, TOG, CONSTRAINT_IK_ROT, B_CONSTRAINT_TEST, "Rot", *xco+147, *yco-112, 40,19, &data->flag, 0, 0, 0, 0, "Chain follows rotation of target"); uiDefButF(block, NUMSLI, B_CONSTRAINT_TEST, "W ", *xco+187, *yco-112, 97, 19, &data->orientweight, 0.01, 1.0, 2, 2, "For Tree-IK: Weight of orientation control for this target"); - + uiBlockBeginAlign(block); - + uiDefButBitS(block, TOG, CONSTRAINT_IK_STRETCH, B_CONSTRAINT_TEST, "Stretch", *xco, *yco-137,137,19, &data->flag, 0, 0, 0, 0, "Enable IK stretching"); uiBlockBeginAlign(block); uiDefButS(block, NUM, B_CONSTRAINT_TEST, "Iterations:", *xco+147, *yco-137, 137, 19, &data->iterations, 1, 10000, 0, 0, "Maximum number of solving iterations"); uiBlockEndAlign(block); - + /* Pole Vector */ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, "Pole Target:", *xco+147, *yco-24, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); - + uiBlockBeginAlign(block); uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_CONSTRAINT_CHANGETARGET, "OB:", *xco+147, *yco-44, 137, 19, &data->poletar, "Pole Target Object"); if (is_armature_target(data->poletar)) { diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 39937c60950..632af9e269b 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -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; @@ -2535,24 +2536,35 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) { sprintf(distvec, "%.4e", dist); 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]; diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 26f1d54569b..9b2b563595d 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -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); } } } |