From 2e3e044d27e90dc87bdce6af9cef77d9543e4d89 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 10 Jul 2009 19:56:13 +0000 Subject: RNA * Enums can now be dynamically created in the _itemf callback, using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking for enum items now need to potentially free the items. * This callback now also gets context, this was added specifically for operators. This doesn't fit design well at all, needed to do some ugly hacks, but can't find a good solution at the moment. * All enums must have a default list of items too, even with an _itemf callback, for docs and fallback in case there is no context. * Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation. * Also changes some operator properties that were enums to booleas (unselected, deselect), to make them consistent with other ops. --- source/blender/editors/mesh/mesh_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/mesh/mesh_ops.c') diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 6bc2f240859..cfe8dd4352d 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -75,7 +75,7 @@ static int vertex_specials_invoke(bContext *C, wmOperator *op, wmEvent *event) uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN); uiItemO(layout, "Remove Doubles", 0, "MESH_OT_remove_doubles"); - uiItemO(layout, "Merge...", 0, "MESH_OT_merge"); // mergmenu(em) + uiItemO(layout, "Merge...", 0, "MESH_OT_merge"); uiItemO(layout, "Smooth", 0, "MESH_OT_vertices_smooth"); uiItemO(layout, "Select Vertex Path", 0, "MESH_OT_select_vertex_path"); //uiItemO(layout, "Blend From Shape", 0, "MESH_OT_blend_from_shape"); @@ -387,6 +387,7 @@ void ED_keymap_mesh(wmWindowManager *wm) WM_keymap_add_item(keymap, "MESH_OT_colors_mirror",EIGHTKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_rip",VKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MESH_OT_merge", MKEY, KM_PRESS, KM_ALT, 0); /* add/remove */ WM_keymap_add_item(keymap, "MESH_OT_edge_face_add", FKEY, KM_PRESS, 0, 0); -- cgit v1.2.3