Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-28 20:37:15 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-28 20:37:15 +0400
commitc0a3ebedb331f1a10b5ba56030327596a5435598 (patch)
tree16944275c2a803fba0f602531b7d6b9cd1837e7c /source
parent08f737c3b96d0f9233df768ec008585a9c7d2285 (diff)
Fix #34372: mesh.verts.foreach_set not working with normals, regression due to my
bugfix for multidimensional arrays.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_access.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index adfb096b25f..d00a4832446 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -3196,18 +3196,16 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
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);