[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32049] trunk/blender/source/blender/ blenkernel/intern/unit.c: patch [#23796] Full support for unit buttons: area, volume, mass, velocity and acceleration

Campbell Barton ideasman42 at gmail.com
Wed Sep 22 04:47:08 CEST 2010


Revision: 32049
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32049
Author:   campbellbarton
Date:     2010-09-22 04:47:08 +0200 (Wed, 22 Sep 2010)

Log Message:
-----------
patch [#23796] Full support for unit buttons: area, volume, mass, velocity and acceleration
from Lorenzo Tozzi (oni_niubbo), suppress_only_shown.diff

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/unit.c

Modified: trunk/blender/source/blender/blenkernel/intern/unit.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/unit.c	2010-09-22 02:44:03 UTC (rev 32048)
+++ trunk/blender/source/blender/blenkernel/intern/unit.c	2010-09-22 02:47:08 UTC (rev 32049)
@@ -583,10 +583,6 @@
 
 
 	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 @@
 				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 @@
 		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;
 			}





More information about the Bf-blender-cvs mailing list