[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24725] trunk/blender/source/blender/ editors/mesh/mesh_data.c: fix for [#19940] Remove vertex color layer and remove texture layer operators don't work
Campbell Barton
ideasman42 at gmail.com
Sat Nov 21 18:16:02 CET 2009
Revision: 24725
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24725
Author: campbellbarton
Date: 2009-11-21 18:16:00 +0100 (Sat, 21 Nov 2009)
Log Message:
-----------
fix for [#19940] Remove vertex color layer and remove texture layer operators don't work
- only when in mesh editmode.
Modified Paths:
--------------
trunk/blender/source/blender/editors/mesh/mesh_data.c
Modified: trunk/blender/source/blender/editors/mesh/mesh_data.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/mesh_data.c 2009-11-21 16:44:05 UTC (rev 24724)
+++ trunk/blender/source/blender/editors/mesh/mesh_data.c 2009-11-21 17:16:00 UTC (rev 24725)
@@ -196,11 +196,12 @@
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_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;
More information about the Bf-blender-cvs
mailing list