Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-01-25 09:24:05 +0300
committerMatt Ebb <matt@mke3.net>2010-01-25 09:24:05 +0300
commit0c5998e7998cba70d1dceacc5ed8109a5bba9e23 (patch)
treef9e250055d9de1647b283e7c493902bc51f0a9a5 /source/blender/ikplugin
parentc94f385fce14fa5beb8637590ad4d4662cd733c6 (diff)
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.
Diffstat (limited to 'source/blender/ikplugin')
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c4
1 files changed, 2 insertions, 2 deletions
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);