fix [#27820] foreach_get on bpy_prop_collections returns weird results
authorCampbell Barton <ideasman42@gmail.com>
Fri, 1 Jul 2011 08:48:00 +0000 (08:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 1 Jul 2011 08:48:00 +0000 (08:48 +0000)
source/blender/editors/object/object_hook.c
source/blender/makesrna/intern/rna_access.c

index 4dc944db28c07d7eb8f34477f2387935bb17dd5e..bb32869469ac74b21bd22e6f5e1f20b048bd51b6 100644 (file)
@@ -107,7 +107,7 @@ static int return_editmesh_vgroup(Object *obedit, EditMesh *em, char *name, floa
 
        if(obedit->actdef) {
                const int defgrp_index= obedit->actdef-1;
-               int i, totvert=0;
+               int totvert=0;
 
                MDeformVert *dvert;
                EditVert *eve;
index e83161b8c624918915cd5cd50a500cfe6160aeee..d9fbdd7caf2f2dd24155a4d4b62536b01394a13f 100644 (file)
@@ -2839,7 +2839,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                }
 
                                /* editable check */
-                               if(RNA_property_editable(&itemptr, iprop)) {
+                               if(!set || RNA_property_editable(&itemptr, iprop)) {
                                        if(a+itemlen > in.len) {
                                                BKE_reportf(reports, RPT_ERROR, "Array length mismatch (got %d, expected more).", in.len);
                                                err= 1;