diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-22 06:47:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-22 06:47:08 +0400 |
commit | d2bc4a31a05ecac6770ba198490124ee38b42498 (patch) | |
tree | c4a7f567cc4fa4841b0932de89c962a7c96b13bf | |
parent | e4f3a0efa6cc2fdb6762adb4e9d534b33978cf81 (diff) |
patch [#23796] Full support for unit buttons: area, volume, mass, velocity and acceleration
from Lorenzo Tozzi (oni_niubbo), suppress_only_shown.diff
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index de22a0e347c..3d984c7e877 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -583,10 +583,6 @@ int bUnit_ReplaceString(char *str, int len_max, char *str_prev, double scale_pre for(unit= usys->units; unit->name; unit++) { - - if(unit->flag & B_UNIT_DEF_SUPPRESS) - continue; - /* incase there are multiple instances */ while(unit_replace(str, len_max, str_tmp, scale_pref, unit)) change= 1; @@ -603,13 +599,10 @@ int bUnit_ReplaceString(char *str, int len_max, char *str_prev, double scale_pre usys_iter= unit_get_system(system_iter, type); if (usys_iter) { for(unit= usys_iter->units; unit->name; unit++) { - - if((unit->flag & B_UNIT_DEF_SUPPRESS) == 0) { - int ofs = 0; - /* incase there are multiple instances */ - while((ofs=unit_replace(str+ofs, len_max-ofs, str_tmp, scale_pref, unit))) - change= 1; - } + int ofs = 0; + /* incase there are multiple instances */ + while((ofs=unit_replace(str+ofs, len_max-ofs, str_tmp, scale_pref, unit))) + change= 1; } } } @@ -622,10 +615,6 @@ int bUnit_ReplaceString(char *str, int len_max, char *str_prev, double scale_pre if(str_prev) { /* see which units the original value had */ for(unit= usys->units; unit->name; unit++) { - - if(unit->flag & B_UNIT_DEF_SUPPRESS) - continue; - if (unit_find(str_prev, unit)) break; } |