[Bf-blender-cvs] [c25c3f73c46] master: Cleanup: reuse mesh select mode enum
Campbell Barton
noreply at git.blender.org
Thu Sep 5 20:48:03 CEST 2019
Commit: c25c3f73c4670de0e1d3c9dbea5f46abf8dccd3e
Author: Campbell Barton
Date: Fri Sep 6 02:15:20 2019 +1000
Branches: master
https://developer.blender.org/rBc25c3f73c4670de0e1d3c9dbea5f46abf8dccd3e
Cleanup: reuse mesh select mode enum
===================================================================
M source/blender/editors/mesh/editmesh_select.c
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 53b4efbd968..ce8d26542d9 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1381,13 +1381,6 @@ void MESH_OT_select_mode(wmOperatorType *ot)
{
PropertyRNA *prop;
- static const EnumPropertyItem elem_items[] = {
- {SCE_SELECT_VERTEX, "VERT", ICON_VERTEXSEL, "Vertices", ""},
- {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edges", ""},
- {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Faces", ""},
- {0, NULL, 0, NULL, NULL},
- };
-
static const EnumPropertyItem actions_items[] = {
{0, "DISABLE", 0, "Disable", "Disable selected markers"},
{1, "ENABLE", 0, "Enable", "Enable selected markers"},
@@ -1414,7 +1407,7 @@ void MESH_OT_select_mode(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
prop = RNA_def_boolean(ot->srna, "use_expand", false, "Expand", "");
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
- ot->prop = prop = RNA_def_enum(ot->srna, "type", elem_items, 0, "Type", "");
+ ot->prop = prop = RNA_def_enum(ot->srna, "type", rna_enum_mesh_select_mode_items, 0, "Type", "");
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
prop = RNA_def_enum(
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 0ddf91d24db..3758bd6b0ac 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -143,7 +143,7 @@ const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = {
/* keep for operators, not used here */
const EnumPropertyItem rna_enum_mesh_select_mode_items[] = {
- {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
+ {SCE_SELECT_VERTEX, "VERT", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
{SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"},
{SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"},
{0, NULL, 0, NULL, NULL},
More information about the Bf-blender-cvs
mailing list