diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-01-14 09:46:28 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-01-14 09:46:28 +0300 |
commit | 62eb77c119c97f78fc2b818714dcbe234bcaf399 (patch) | |
tree | 800c78e91db604f4621dfa3724f1fa68c366f2f0 /source/blender/editors/transform/transform.c | |
parent | af4bc28c44f08629ba2bd6afb406edfe19011b63 (diff) |
Transform tweak:
2D Editors using the standard translation transform tool no longer
have their values converted. For instance, it simply didn't make much
sense in such editors to be showing frame numbers/timing in terms of
meters/inches.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 23f4f103eae..2d541b63bd0 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -3349,7 +3349,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) { applyAspectRatio(t, dvec); dist = len_v3(vec); - if(t->scene->unit.system) { + if(!(t->flag & T_2D_EDIT) && t->scene->unit.system) { int i, do_split= t->scene->unit.flag & USER_UNIT_OPT_SPLIT ? 1:0; for(i=0; i<3; i++) @@ -3362,7 +3362,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) { } } - if(t->scene->unit.system) + if(!(t->flag & T_2D_EDIT) && t->scene->unit.system) bUnit_AsString(distvec, sizeof(distvec), dist*t->scene->unit.scale_length, 4, t->scene->unit.system, B_UNIT_LENGTH, t->scene->unit.flag & USER_UNIT_OPT_SPLIT, 0); else if( dist > 1e10 || dist < -1e10 ) /* prevent string buffer overflow */ sprintf(distvec, "%.4e", dist); |