[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45292] trunk/blender/source/blender/bmesh /intern/bmesh_operators.c: Fix out-of-date slot type sizes.

Nicholas Bishop nicholasbishop at gmail.com
Fri Mar 30 15:49:46 CEST 2012


Revision: 45292
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45292
Author:   nicholasbishop
Date:     2012-03-30 13:49:32 +0000 (Fri, 30 Mar 2012)
Log Message:
-----------
Fix out-of-date slot type sizes.

The BMO_OPSLOT_TYPEINFO array was out of date, the last two entries
were off by one. Updated with correct values and added comments to
make it easier to match up in future.

Also changed the alloc string for mapping slot's ghash to something
more descriptive than "bemsh op".

Modified Paths:
--------------
    trunk/blender/source/blender/bmesh/intern/bmesh_operators.c

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_operators.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_operators.c	2012-03-30 13:04:29 UTC (rev 45291)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_operators.c	2012-03-30 13:49:32 UTC (rev 45292)
@@ -64,16 +64,17 @@
 
 /* operator slot type information - size of one element of the type given. */
 const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES] = {
-	0,
-	sizeof(int),
-	sizeof(int),
-	sizeof(float),
-	sizeof(void *),
-	0, /* unused */
-	0, /* unused */
-	0, /* unused */
-	sizeof(void *),	/* pointer buffer */
-	sizeof(BMOElemMapping)
+	0,                      /*  0: BMO_OP_SLOT_SENTINEL */
+	sizeof(int),            /*  1: BMO_OP_SLOT_BOOL */ 
+	sizeof(int),            /*  2: BMO_OP_SLOT_INT */ 
+	sizeof(float),          /*  3: BMO_OP_SLOT_FLT */ 
+	sizeof(void *),         /*  4: BMO_OP_SLOT_PNT */ 
+	sizeof(void *),         /*  5: BMO_OP_SLOT_PNT */
+	0,                      /*  6: unused */
+	0,                      /*  7: unused */
+	sizeof(float) * 3,      /*  8: BMO_OP_SLOT_VEC */
+	sizeof(void *),	        /*  9: BMO_OP_SLOT_ELEMENT_BUF */
+	sizeof(BMOElemMapping)  /* 10: BMO_OP_SLOT_MAPPING */
 };
 
 /* Dummy slot so there is something to return when slot name lookup fails */
@@ -546,7 +547,7 @@
 
 	if (!slot->data.ghash) {
 		slot->data.ghash = BLI_ghash_new(BLI_ghashutil_ptrhash,
-		                                 BLI_ghashutil_ptrcmp, "bmesh op");
+		                                 BLI_ghashutil_ptrcmp, "bmesh slot map hash");
 	}
 
 	BLI_ghash_insert(slot->data.ghash, element, mapping);




More information about the Bf-blender-cvs mailing list