diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-05 18:16:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-05 18:16:37 +0300 |
commit | 422241c4e61f252260d91ad35da65019e910a43e (patch) | |
tree | 3e4ba717841f7956961d1e64e27061ea05e38972 /source | |
parent | d08c480cfe4fc2f7a7b57e5ab0005ed587b6ee66 (diff) |
Fix #21442: RNA mesh texture face layer was giving corrupt data while
in edit mode. Accessing this data would require editmesh wrapping, so
for now just don't allowed this to be accessed in edit mode.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index a088e633b19..2925c9cde3a 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -569,13 +569,13 @@ static void rna_MeshTextureFaceLayer_data_begin(CollectionPropertyIterator *iter { Mesh *me= (Mesh*)ptr->id.data; CustomDataLayer *layer= (CustomDataLayer*)ptr->data; - rna_iterator_array_begin(iter, layer->data, sizeof(MTFace), me->totface, 0, NULL); + rna_iterator_array_begin(iter, layer->data, sizeof(MTFace), (me->edit_mesh)? 0: me->totface, 0, NULL); } static int rna_MeshTextureFaceLayer_data_length(PointerRNA *ptr) { Mesh *me= (Mesh*)ptr->id.data; - return me->totface; + return (me->edit_mesh)? 0: me->totface; } static int rna_MeshTextureFaceLayer_active_render_get(PointerRNA *ptr) @@ -691,13 +691,13 @@ static void rna_MeshColorLayer_data_begin(CollectionPropertyIterator *iter, Poin { Mesh *me= (Mesh*)ptr->id.data; CustomDataLayer *layer= (CustomDataLayer*)ptr->data; - rna_iterator_array_begin(iter, layer->data, sizeof(MCol)*4, me->totface, 0, NULL); + rna_iterator_array_begin(iter, layer->data, sizeof(MCol)*4, (me->edit_mesh)? 0: me->totface, 0, NULL); } static int rna_MeshColorLayer_data_length(PointerRNA *ptr) { Mesh *me= (Mesh*)ptr->id.data; - return me->totface; + return (me->edit_mesh)? 0: me->totface; } static int rna_MeshColorLayer_active_render_get(PointerRNA *ptr) @@ -733,13 +733,13 @@ static void rna_MeshFloatPropertyLayer_data_begin(CollectionPropertyIterator *it { Mesh *me= (Mesh*)ptr->id.data; CustomDataLayer *layer= (CustomDataLayer*)ptr->data; - rna_iterator_array_begin(iter, layer->data, sizeof(MFloatProperty), me->totface, 0, NULL); + rna_iterator_array_begin(iter, layer->data, sizeof(MFloatProperty), (me->edit_mesh)? 0: me->totface, 0, NULL); } static int rna_MeshFloatPropertyLayer_data_length(PointerRNA *ptr) { Mesh *me= (Mesh*)ptr->id.data; - return me->totface; + return (me->edit_mesh)? 0: me->totface; } static int rna_float_layer_check(CollectionPropertyIterator *iter, void *data) @@ -770,13 +770,13 @@ static void rna_MeshIntPropertyLayer_data_begin(CollectionPropertyIterator *iter { Mesh *me= (Mesh*)ptr->id.data; CustomDataLayer *layer= (CustomDataLayer*)ptr->data; - rna_iterator_array_begin(iter, layer->data, sizeof(MIntProperty), me->totface, 0, NULL); + rna_iterator_array_begin(iter, layer->data, sizeof(MIntProperty), (me->edit_mesh)? 0: me->totface, 0, NULL); } static int rna_MeshIntPropertyLayer_data_length(PointerRNA *ptr) { Mesh *me= (Mesh*)ptr->id.data; - return me->totface; + return (me->edit_mesh)? 0: me->totface; } static void rna_Mesh_int_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) @@ -801,13 +801,13 @@ static void rna_MeshStringPropertyLayer_data_begin(CollectionPropertyIterator *i { Mesh *me= (Mesh*)ptr->id.data; CustomDataLayer *layer= (CustomDataLayer*)ptr->data; - rna_iterator_array_begin(iter, layer->data, sizeof(MStringProperty), me->totface, 0, NULL); + rna_iterator_array_begin(iter, layer->data, sizeof(MStringProperty), (me->edit_mesh)? 0: me->totface, 0, NULL); } static int rna_MeshStringPropertyLayer_data_length(PointerRNA *ptr) { Mesh *me= (Mesh*)ptr->id.data; - return me->totface; + return (me->edit_mesh)? 0: me->totface; } static void rna_Mesh_string_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) |