the length of mesh.tessface_vertex_colors was reported incorrect. (fix needed for...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 7 Mar 2012 22:21:28 +0000 (22:21 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 7 Mar 2012 22:21:28 +0000 (22:21 +0000)
source/blender/makesrna/intern/rna_mesh.c

index 45f812bb18dfb7de53290e8dbc6a3dfe78b6b841..5dd6bbbe1679aa2cc0f15f6df47f62035b349107 100644 (file)
@@ -665,14 +665,14 @@ DEFINE_CUSTOMDATA_LAYER_COLLECTION_ACTIVEITEM(tessface_vertex_color, fdata, CD_M
 static void rna_MeshColorLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
 {
        Mesh *me = rna_mesh(ptr);
 static void rna_MeshColorLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
 {
        Mesh *me = rna_mesh(ptr);
-       CustomDataLayer *layer = (CustomDataLayer*)ptr->data;
-       rna_iterator_array_begin(iter, layer->data, sizeof(CD_MCOL), me->totloop, 0, NULL);
+       CustomDataLayer *layer = (CustomDataLayer *)ptr->data;
+       rna_iterator_array_begin(iter, layer->data, sizeof(CD_MCOL), me->totface, 0, NULL);
 }
 
 static int rna_MeshColorLayer_data_length(PointerRNA *ptr)
 {
        Mesh *me = rna_mesh(ptr);
 }
 
 static int rna_MeshColorLayer_data_length(PointerRNA *ptr)
 {
        Mesh *me = rna_mesh(ptr);
-       return me->totloop;
+       return me->totface;
 }
 
 static int rna_MeshColorLayer_active_render_get(PointerRNA *ptr)
 }
 
 static int rna_MeshColorLayer_active_render_get(PointerRNA *ptr)