diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-22 13:48:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-22 13:48:13 +0300 |
commit | 3221dea46eeb6c5441c4617d704ffb3e8caeeca3 (patch) | |
tree | ea8127162d05477981cffa63bbf72949df2d865e /source/blender/editors/mesh/mesh_data.c | |
parent | 5a3ac3ceeb0d3550c14987f5cfd607e1ad126e64 (diff) |
clone and stencil layer access added, renamed mask to stencil layer internally
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 0285faf7949..1cdc059f57e 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -72,10 +72,10 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la { Mesh *me = ob->data; CustomData *data= (me->edit_mesh)? &me->edit_mesh->fdata: &me->fdata; - void *actlayerdata, *rndlayerdata, *clonelayerdata, *masklayerdata, *layerdata=layer->data; + void *actlayerdata, *rndlayerdata, *clonelayerdata, *stencillayerdata, *layerdata=layer->data; int type= layer->type; int index= CustomData_get_layer_index(data, type); - int i, actindex, rndindex, cloneindex, maskindex; + int i, actindex, rndindex, cloneindex, stencilindex; /* ok, deleting a non-active layer needs to preserve the active layer indices. to do this, we store a pointer to the .data member of both layer and the active layer, @@ -87,7 +87,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la actlayerdata = data->layers[CustomData_get_active_layer_index(data, type)].data; rndlayerdata = data->layers[CustomData_get_render_layer_index(data, type)].data; clonelayerdata = data->layers[CustomData_get_clone_layer_index(data, type)].data; - masklayerdata = data->layers[CustomData_get_mask_layer_index(data, type)].data; + stencillayerdata = data->layers[CustomData_get_stencil_layer_index(data, type)].data; CustomData_set_layer_active(data, type, layer - &data->layers[index]); if(me->edit_mesh) { @@ -144,18 +144,18 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la CustomData_set_layer_clone(data, type, cloneindex); } - if (masklayerdata != layerdata) { + if (stencillayerdata != layerdata) { /* find index */ - maskindex = CustomData_get_layer_index(data, type); - for (i=maskindex; i<data->totlayer; i++) { - if (data->layers[i].data == masklayerdata) { - maskindex = i - maskindex; + stencilindex = CustomData_get_layer_index(data, type); + for (i=stencilindex; i<data->totlayer; i++) { + if (data->layers[i].data == stencillayerdata) { + stencilindex = i - stencilindex; break; } } /* set index */ - CustomData_set_layer_mask(data, type, maskindex); + CustomData_set_layer_stencil(data, type, stencilindex); } } |