From 944e0bd7b5e1d94f8206b4e516c8ff59e8a4899a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 3 May 2015 15:18:27 +0200 Subject: [PATCH] Cleanup: rename clear_skin & clear_mask operators to skin_clear and mask_clear. So that they match all other op names around - and sensible logic as well. --- .../startup/bl_ui/properties_data_mesh.py | 4 ++-- source/blender/editors/mesh/mesh_data.c | 24 +++++++++---------- source/blender/editors/mesh/mesh_intern.h | 4 ++-- source/blender/editors/mesh/mesh_ops.c | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index e2b0121cdbe..5416735494b 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -369,8 +369,8 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel): me = context.mesh col = layout.column() - col.operator("mesh.customdata_clear_mask", icon='X') - col.operator("mesh.customdata_clear_skin", icon='X') + col.operator("mesh.customdata_mask_clear", icon='X') + col.operator("mesh.customdata_skin_clear", icon='X') if me.has_custom_normals: col.operator("mesh.customdata_custom_splitnormals_clear", icon='X') diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 1d0cd6a2934..f497cd7a1aa 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -748,7 +748,7 @@ static int mesh_customdata_clear_exec__internal(bContext *C, } /* Clear Mask */ -static int mesh_customdata_clear_mask_poll(bContext *C) +static int mesh_customdata_mask_clear_poll(bContext *C) { Object *ob = ED_object_context(C); if (ob && ob->type == OB_MESH) { @@ -772,7 +772,7 @@ static int mesh_customdata_clear_mask_poll(bContext *C) } return false; } -static int mesh_customdata_clear_mask_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_mask_clear_exec(bContext *C, wmOperator *UNUSED(op)) { int ret_a = mesh_customdata_clear_exec__internal(C, BM_VERT, CD_PAINT_MASK); int ret_b = mesh_customdata_clear_exec__internal(C, BM_LOOP, CD_GRID_PAINT_MASK); @@ -787,17 +787,17 @@ static int mesh_customdata_clear_mask_exec(bContext *C, wmOperator *UNUSED(op)) } } -void MESH_OT_customdata_clear_mask(wmOperatorType *ot) +void MESH_OT_customdata_mask_clear(wmOperatorType *ot) { /* identifiers */ ot->name = "Clear Sculpt-Mask Data"; - ot->idname = "MESH_OT_customdata_clear_mask"; + ot->idname = "MESH_OT_customdata_mask_clear"; ot->description = "Clear vertex sculpt masking data from the mesh"; /* api callbacks */ - ot->exec = mesh_customdata_clear_mask_exec; - ot->poll = mesh_customdata_clear_mask_poll; + ot->exec = mesh_customdata_mask_clear_exec; + ot->poll = mesh_customdata_mask_clear_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -853,26 +853,26 @@ void MESH_OT_customdata_skin_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static int mesh_customdata_clear_skin_poll(bContext *C) +static int mesh_customdata_skin_clear_poll(bContext *C) { return mesh_customdata_skin_has(C); } -static int mesh_customdata_clear_skin_exec(bContext *C, wmOperator *UNUSED(op)) +static int mesh_customdata_skin_clear_exec(bContext *C, wmOperator *UNUSED(op)) { return mesh_customdata_clear_exec__internal(C, BM_VERT, CD_MVERT_SKIN); } -void MESH_OT_customdata_clear_skin(wmOperatorType *ot) +void MESH_OT_customdata_skin_clear(wmOperatorType *ot) { /* identifiers */ ot->name = "Clear Skin Data"; - ot->idname = "MESH_OT_customdata_clear_skin"; + ot->idname = "MESH_OT_customdata_skin_clear"; ot->description = "Clear vertex skin layer"; /* api callbacks */ - ot->exec = mesh_customdata_clear_skin_exec; - ot->poll = mesh_customdata_clear_skin_poll; + ot->exec = mesh_customdata_skin_clear_exec; + ot->poll = mesh_customdata_skin_clear_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index de7d0f32f6f..9226146bc51 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -232,9 +232,9 @@ void MESH_OT_uv_texture_remove(struct wmOperatorType *ot); void MESH_OT_vertex_color_add(struct wmOperatorType *ot); void MESH_OT_vertex_color_remove(struct wmOperatorType *ot); /* no create_mask yet */ -void MESH_OT_customdata_clear_mask(struct wmOperatorType *ot); +void MESH_OT_customdata_mask_clear(struct wmOperatorType *ot); void MESH_OT_customdata_skin_add(struct wmOperatorType *ot); -void MESH_OT_customdata_clear_skin(struct wmOperatorType *ot); +void MESH_OT_customdata_skin_clear(struct wmOperatorType *ot); void MESH_OT_customdata_custom_splitnormals_add(struct wmOperatorType *ot); void MESH_OT_customdata_custom_splitnormals_clear(struct wmOperatorType *ot); void MESH_OT_drop_named_image(struct wmOperatorType *ot); diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 31d3f019585..197df48d688 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -151,9 +151,9 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_uv_texture_remove); WM_operatortype_append(MESH_OT_vertex_color_add); WM_operatortype_append(MESH_OT_vertex_color_remove); - WM_operatortype_append(MESH_OT_customdata_clear_mask); + WM_operatortype_append(MESH_OT_customdata_mask_clear); WM_operatortype_append(MESH_OT_customdata_skin_add); - WM_operatortype_append(MESH_OT_customdata_clear_skin); + WM_operatortype_append(MESH_OT_customdata_skin_clear); WM_operatortype_append(MESH_OT_customdata_custom_splitnormals_add); WM_operatortype_append(MESH_OT_customdata_custom_splitnormals_clear); WM_operatortype_append(MESH_OT_drop_named_image);