diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-05 19:15:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-05 21:44:12 +0300 |
commit | c25c3f73c4670de0e1d3c9dbea5f46abf8dccd3e (patch) | |
tree | 1c7b98fe27f35e40d37565ef921cca771b8018e9 | |
parent | 3a15643b906f186c87b4777b0ed95f04712dcb82 (diff) |
Cleanup: reuse mesh select mode enum
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
2 files changed, 2 insertions, 9 deletions
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}, |