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 13:05:17 +0300
committerMatt Ebb <matt@mke3.net>2010-01-25 13:05:17 +0300
commit41499247dbe947fdb18fe8def48f1c6b2a11bfd6 (patch)
tree052161a3143651041f5433d74cb1f30b48671741 /source/blender/editors/interface/interface.c
parent0a0f4c9d81cfa2a4b4a9999e1dc976bc417d7d54 (diff)
Add option to choose between radians or degrees for rotation units in the UI.
Setting is in Scene->unit settings with the others, degrees by default.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 82b53840ed3..9e76ebe3c64 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1232,7 +1232,10 @@ int ui_is_but_unit(uiBut *but)
unit_type = RNA_SUBTYPE_UNIT(RNA_property_subtype(but->rnaprop));
- if(scene->unit.system == USER_UNIT_NONE) {
+ if (scene->unit.flag & USER_UNIT_ROT_RADIANS && unit_type == PROP_UNIT_ROTATION)
+ return 0;
+
+ if (scene->unit.system == USER_UNIT_NONE) {
if (unit_type != PROP_UNIT_ROTATION)
return 0;
}