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>2010-03-05 18:16:37 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-05 18:16:37 +0300
commit422241c4e61f252260d91ad35da65019e910a43e (patch)
tree3e4ba717841f7956961d1e64e27061ea05e38972 /source
parentd08c480cfe4fc2f7a7b57e5ab0005ed587b6ee66 (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.c20
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)