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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-02-28 12:51:05 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-02-28 12:52:21 +0400
commit96a51e99fb8a5dcb9e6b15eed876d7ea6f1cc94b (patch)
treee2891b6ff715d5487b271bc758c89ab24d21f878
parente82b5f61fee64a02fd71be605fea75dad4f7ce22 (diff)
Fix T38877: F-Curve modal input is incorrect when set to Imperial units.
Using length units outside of 3dview does not make sense...
-rw-r--r--source/blender/editors/transform/transform.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 7cab4614606..d52b494131b 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -4075,10 +4075,18 @@ static void initTranslation(TransInfo *t)
copy_v3_fl(t->num.val_inc, t->snap[1]);
t->num.unit_sys = t->scene->unit.system;
- t->num.unit_type[0] = B_UNIT_LENGTH;
- t->num.unit_type[1] = B_UNIT_LENGTH;
- t->num.unit_type[2] = B_UNIT_LENGTH;
-
+ if (t->spacetype == SPACE_VIEW3D) {
+ /* Handling units makes only sense in 3Dview... See T38877. */
+ t->num.unit_type[0] = B_UNIT_LENGTH;
+ t->num.unit_type[1] = B_UNIT_LENGTH;
+ t->num.unit_type[2] = B_UNIT_LENGTH;
+ }
+ else {
+ /* SPACE_IPO, SPACE_ACTION, etc. could use some time units, when we have them... */
+ t->num.unit_type[0] = B_UNIT_NONE;
+ t->num.unit_type[1] = B_UNIT_NONE;
+ t->num.unit_type[2] = B_UNIT_NONE;
+ }
}
static void headerTranslation(TransInfo *t, float vec[3], char str[MAX_INFO_LEN])