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:
authorJoshua Leung <aligorith@gmail.com>2010-01-26 06:16:14 +0300
committerJoshua Leung <aligorith@gmail.com>2010-01-26 06:16:14 +0300
commit14d4feca576e78d3707872bfb8b29c749bb20572 (patch)
tree1f9b6fa131a1011ea6d4f60876b3fccca2ca8e78 /source/blender/blenkernel
parente6a23762da3f6b88da21669b7ae30c834ace2f55 (diff)
Radians vs Degrees: The Second Attempt
F-Curves now internally store radians again instead of degrees. - This solves problems with inconsistencies when working with drivers. - No need to version patch old files, potentially screwing them up. As such, removed the version patching for F-Curves. - Is better suited to optionally showing radians throughout the UI instead or degrees. As a result, values are now converted on the fly in the Graph Editor for display and operators that operate on values. I've made the conversion system for this rather general, so that other unit type conversions can also be hooked up with the type conversion backend. Also, made some tweaks to F-Curve RNA wrapping to make it represent the data better. TODO: - Transform code currently still needs to be corrected to work with these changes. Currently moving keyframes for rotation curves will make them change too rapidly vertically when using degrees.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c10
-rw-r--r--source/blender/blenkernel/intern/fcurve.c5
2 files changed, 0 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 46f569a5310..c617ca33e8a 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -730,11 +730,6 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i
/* set value - only for animatable numerical values */
if (RNA_property_animateable(&new_ptr, prop))
{
- /* convert to radians */
- if (RNA_SUBTYPE_UNIT(RNA_property_subtype(prop)) == PROP_UNIT_ROTATION) {
- value *= M_PI/180.0;
- }
-
switch (RNA_property_type(prop))
{
case PROP_BOOLEAN:
@@ -1471,11 +1466,6 @@ void nladata_flush_channels (ListBase *channels)
int array_index= nec->index;
float value= nec->value;
- /* convert to radians */
- if (RNA_SUBTYPE_UNIT(RNA_property_subtype(prop)) == PROP_UNIT_ROTATION) {
- value *= M_PI/180.0;
- }
-
/* write values - see animsys_write_rna_setting() to sync the code */
switch (RNA_property_type(prop))
{
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index e5d2cf3fee5..28de10a64f9 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -816,11 +816,6 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar)
default:
break;
}
-
- /* degrees to radians (since curves are stored in degrees, but drivers need radians) */
- if (RNA_SUBTYPE_UNIT(RNA_property_subtype(prop)) == PROP_UNIT_ROTATION) {
- value *= 180.0/M_PI;
- }
}
else {
if (G.f & G_DEBUG)