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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-21 20:16:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-21 20:16:00 +0300
commitf9d8145abedb431c546042bb6cd9888055dde6b2 (patch)
tree59b525c7a8db2cce19de46193d66f91dfc62ccf9 /source/blender/editors/mesh/mesh_data.c
parent6f38938a64178f0a3ed6a4b96e4bf459c9076468 (diff)
fix for [#19940] Remove vertex color layer and remove texture layer operators don't work
- only when in mesh editmode.
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r--source/blender/editors/mesh/mesh_data.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 1369d1a7263..0285faf7949 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -196,11 +196,12 @@ int ED_mesh_uv_texture_add(bContext *C, Scene *scene, Object *ob, Mesh *me)
int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me)
{
+ CustomData *data= (me->edit_mesh)? &me->edit_mesh->fdata: &me->fdata;
CustomDataLayer *cdl;
int index;
- index= CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
- cdl= (index == -1)? NULL: &me->fdata.layers[index];
+ index= CustomData_get_active_layer_index(data, CD_MTFACE);
+ cdl= (index == -1) ? NULL: &data->layers[index];
if(!cdl)
return 0;
@@ -255,11 +256,12 @@ int ED_mesh_color_add(bContext *C, Scene *scene, Object *ob, Mesh *me)
int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me)
{
+ CustomData *data= (me->edit_mesh)? &me->edit_mesh->fdata: &me->fdata;
CustomDataLayer *cdl;
int index;
- index= CustomData_get_active_layer_index(&me->fdata, CD_MCOL);
- cdl= (index == -1)? NULL: &me->fdata.layers[index];
+ index= CustomData_get_active_layer_index(data, CD_MCOL);
+ cdl= (index == -1)? NULL: &data->layers[index];
if(!cdl)
return 0;