[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54943] trunk/blender/source/blender/ makesrna/intern/rna_access.c: Fix #34372: mesh.verts. foreach_set not working with normals, regression due to my

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Feb 28 17:37:16 CET 2013


Revision: 54943
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54943
Author:   blendix
Date:     2013-02-28 16:37:15 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
Fix #34372: mesh.verts.foreach_set not working with normals, regression due to my
bugfix for multidimensional arrays.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_access.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_access.c	2013-02-28 15:33:29 UTC (rev 54942)
+++ trunk/blender/source/blender/makesrna/intern/rna_access.c	2013-02-28 16:37:15 UTC (rev 54943)
@@ -3196,18 +3196,16 @@
 			return 0;
 		}
 
+		/* check item array */
+		itemlen = RNA_property_array_length(&itemptr, itemprop);
+
 		/* dynamic array? need to get length per item */
 		if (itemprop->getlength) {
 			itemprop = NULL;
 		}
 		/* try to access as raw array */
 		else if (RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
-			int arraylen;
-
-			/* check item array */
-			itemlen = RNA_property_array_length(&itemptr, itemprop);
-
-			arraylen = (itemlen == 0) ? 1 : itemlen;
+			int arraylen = (itemlen == 0) ? 1 : itemlen;
 			if (in.len != arraylen * out.len) {
 				BKE_reportf(reports, RPT_ERROR, "Array length mismatch (expected %d, got %d)",
 				            out.len * arraylen, in.len);




More information about the Bf-blender-cvs mailing list