From 0c5998e7998cba70d1dceacc5ed8109a5bba9e23 Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Mon, 25 Jan 2010 06:24:05 +0000 Subject: Radians -> Degrees (in UI) Rotations are now stored internally as radians, while exposing degrees in the UI - in the graph editor and UI controls. This is done in two areas: 1) Using the unit system to convert RNA data to display as degrees in the UI controls 2) FCurves now use degrees for rotation, so you can edit in the graph editor what you see in the UI. All rotation data is consistently accessible in DNA and RNA as radians, degrees are only used for the UI controls and graph editor. This commit includes conversions will convert old files (stored data and also fcurve data) to the new units, hopefully everything should go smoothly! Part of this also changes a few properties that were hard-coded as degrees before (such as IK pole angle and brush texture rotation) to also use the same consistent system of radians (dna/rna) and degrees (ui). Thanks to Joshua for hints and review here too. --- source/blender/ikplugin/intern/iksolver_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/ikplugin') diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index e9378a7e12b..c80bf43ce00 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -413,7 +413,7 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) if(data->weight != 0.0) { if(poleconstrain) IK_SolverSetPoleVectorConstraint(solver, iktarget, goalpos, - polepos, data->poleangle*M_PI/180, (poleangledata == data)); + polepos, data->poleangle, (poleangledata == data)); IK_SolverAddGoal(solver, iktarget, goalpos, data->weight); } if((data->flag & CONSTRAINT_IK_ROT) && (data->orientweight != 0.0)) @@ -426,7 +426,7 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) IK_Solve(solver, 0.0f, tree->iterations); if(poleangledata) - poleangledata->poleangle= IK_SolverGetPoleAngle(solver)*180/M_PI; + poleangledata->poleangle= IK_SolverGetPoleAngle(solver); IK_FreeSolver(solver); -- cgit v1.2.3