diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-22 06:44:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-22 06:44:03 +0400 |
commit | e4f3a0efa6cc2fdb6762adb4e9d534b33978cf81 (patch) | |
tree | cca946d7c6df98bd3df2de53101b887f567d6693 | |
parent | b0f36f0317a3b4529f325d6ed96c91d36c22f557 (diff) |
patch [#23796] Full support for unit buttons: area, volume, mass, velocity and acceleration
from Lorenzo Tozzi (oni_niubbo), multiple patches: better_split.diff
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 75be48cc885..de22a0e347c 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -395,8 +395,9 @@ void bUnit_AsString(char *str, int len_max, double value, int prec, int system, if(usys==NULL || usys->units[0].name==NULL) usys= &buDummyCollecton; - - if(split) { + + /* split output makes sense only for length, mass and time */ + if(split && (type==B_UNIT_LENGTH || type==B_UNIT_MASS || type==B_UNIT_TIME)) { int i; bUnitDef *unit_a, *unit_b; double value_a, value_b; |