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>2013-01-11 05:41:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-11 05:41:27 +0400
commit0c3e570868b86c26905c7f731e61f47a9e99deca (patch)
tree0c74dc7157ebcab185833a1fffe4b74a584486e8 /source/blender/blenkernel
parent3fc0d2691ddc1a0c8b1a808791924561b306cec1 (diff)
remove CustomData_get_active_offset(), use CustomData_get_offset to return the active layer, matching CustomData_get()
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_customdata.h1
-rw-r--r--source/blender/blenkernel/intern/customdata.c11
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c6
3 files changed, 4 insertions, 14 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 30b15a24a7e..36733d1ced0 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -251,7 +251,6 @@ void *CustomData_get_layer_named(const struct CustomData *data, int type,
const char *name);
int CustomData_get_offset(const struct CustomData *data, int type);
int CustomData_get_n_offset(const struct CustomData *data, int type, int n);
-int CustomData_get_active_offset(const struct CustomData *data, int type);
int CustomData_get_layer_index(const struct CustomData *data, int type);
int CustomData_get_layer_index_n(const struct CustomData *data, int type, int n);
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index aca16861a75..e31d7133daf 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2098,7 +2098,7 @@ void *CustomData_get_layer_named(const struct CustomData *data, int type,
int CustomData_get_offset(const CustomData *data, int type)
{
/* get the layer index of the active layer of type */
- int layer_index = CustomData_get_layer_index(data, type);
+ int layer_index = CustomData_get_active_layer_index(data, type);
if (layer_index < 0) return -1;
return data->layers[layer_index].offset;
@@ -2113,15 +2113,6 @@ int CustomData_get_n_offset(const CustomData *data, int type, int n)
return data->layers[layer_index].offset;
}
-int CustomData_get_active_offset(const CustomData *data, int type)
-{
- /* get the layer index of the active layer of type */
- int layer_index = CustomData_get_active_layer_index(data, type);
- if (layer_index < 0) return -1;
-
- return data->layers[layer_index].offset;
-}
-
int CustomData_set_layer_name(const CustomData *data, int type, int n, const char *name)
{
/* get the layer index of the first layer of type */
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 5bf0f503a51..91577320a9c 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -810,9 +810,9 @@ static void emDM_drawFacesTex_common(DerivedMesh *dm,
BMFace *efa;
MLoopUV *luv[3], dummyluv = {{0}};
MLoopCol *lcol[3] = {NULL} /* , dummylcol = {0} */;
- const int cd_loop_uv_offset = CustomData_get_active_offset(&bm->ldata, CD_MLOOPUV);
- const int cd_loop_color_offset = CustomData_get_active_offset(&bm->ldata, CD_MLOOPCOL);
- const int cd_poly_tex_offset = CustomData_get_active_offset(&bm->pdata, CD_MTEXPOLY);
+ const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
+ const int cd_loop_color_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPCOL);
+ const int cd_poly_tex_offset = CustomData_get_offset(&bm->pdata, CD_MTEXPOLY);
bool has_uv = (cd_loop_uv_offset != -1);
bool has_vcol = (cd_loop_color_offset != -1);
int i;