[Bf-blender-cvs] [0bbd381] temp_custom_loop_normals: Minor BLI_bitmap change.

Bastien Montagne noreply at git.blender.org
Tue Oct 14 09:48:12 CEST 2014


Commit: 0bbd381eed1d155524b05c9b8fd7219baa58fcd1
Author: Bastien Montagne
Date:   Tue Oct 14 09:27:23 2014 +0200
Branches: temp_custom_loop_normals
https://developer.blender.org/rB0bbd381eed1d155524b05c9b8fd7219baa58fcd1

Minor BLI_bitmap change.

===================================================================

M	source/blender/blenkernel/intern/mesh_evaluate.c
M	source/blender/blenlib/BLI_bitmap.h

===================================================================

diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index 2a35987..7e4052f 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -1320,7 +1320,7 @@ static void mesh_normals_loop_custom_set(MVert *mverts, const int numVerts, MEdg
 		                            &lnors_spaces, use_clnors_data ? r_clnors_data : NULL, loop_to_poly);
 	}
 	else {
-		BLI_BITMAP_ENABLE_ALL(done_loops, (size_t)numLoops);
+		BLI_BITMAP_SET_ALL(done_loops, true, (size_t)numLoops);
 	}
 
 	/* And we just have to convert plain object-space custom normals to our lnor space-encoded ones. */
diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h
index c9b15de..594bf89 100644
--- a/source/blender/blenlib/BLI_bitmap.h
+++ b/source/blender/blenlib/BLI_bitmap.h
@@ -91,15 +91,15 @@ typedef unsigned int BLI_bitmap;
 			BLI_BITMAP_DISABLE(_bitmap, _index); \
 	} (void)0
 
-/* set the value of the whole bitmap (needs size info) */
-#define BLI_BITMAP_ENABLE_ALL(_bitmap, _tot) \
-	(CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
-	 (memset(_bitmap, UCHAR_MAX, BLI_BITMAP_SIZE(_tot))))
-
-/* clear the value of the whole bitmap (needs size info) */
-#define BLI_BITMAP_DISABLE_ALL(_bitmap, _tot) \
-	(CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
-	 (memset(_bitmap, 0, BLI_BITMAP_SIZE(_tot))))
+/* set or clear the value of the whole bitmap (needs size info) */
+#define BLI_BITMAP_SET_ALL(_bitmap, _set, _tot) \
+	{ \
+		CHECK_TYPE(_bitmap, BLI_bitmap *); \
+		if (_set) \
+			memset(_bitmap, UCHAR_MAX, BLI_BITMAP_SIZE(_tot)); \
+		else \
+			memset(_bitmap, 0, BLI_BITMAP_SIZE(_tot)); \
+	} (void)0
 
 /* resize bitmap to have space for '_tot' bits */
 #define BLI_BITMAP_RESIZE(_bitmap, _tot) \




More information about the Bf-blender-cvs mailing list