diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 15 | ||||
-rw-r--r-- | source/blender/src/buttons_object.c | 2 |
2 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 6cd2147391e..29393d3e7a1 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3178,12 +3178,6 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase * } } - /* convert radians<->degrees */ - if (data->to == 1) { - /* if output is rotation, convert to radians from degrees */ - for (i=0; i<3; i++) - sval[i] = sval[i] / 180 * M_PI; - } /* apply transforms */ switch (data->to) { @@ -3195,11 +3189,14 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase * for (i=0; i<3; i++) { float tmin, tmax; - /* convert destination min/max ranges from degrees to radians */ - tmin= data->to_min[i] / M_PI * 180; - tmax= data->to_max[i] / M_PI * 180; + tmin= data->to_min[i]; + tmax= data->to_max[i]; + /* all values here should be in degrees */ eul[i]= tmin + (sval[data->map[i]] * (tmax - tmin)); + + /* now convert final value back to radians */ + eul[i] = eul[i] / 180 * M_PI; } break; default: /* location */ diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index b7f92919cd7..42e7bd5558f 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -1645,7 +1645,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s uiBlockEndAlign(block); /* Extrapolate Ranges? */ - uiDefButBitC(block, TOG, 1, B_CONSTRAINT_TEST, "Extrapolate", *xco, *yco-42,80,19, &data->expo, 0, 0, 0, 0, "Extrapolate ranges"); + uiDefButBitC(block, TOG, 1, B_CONSTRAINT_TEST, "Extrapolate", *xco-10, *yco-42,80,19, &data->expo, 0, 0, 0, 0, "Extrapolate ranges"); /* Draw options for source motion */ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, "Source:", *xco-10, *yco-62, 50, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); |