diff options
Diffstat (limited to 'source/blender/editors/mesh/mesh_ops.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index e0a91048a2c..282eeef906f 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -26,6 +26,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/editors/mesh/mesh_ops.c + * \ingroup edmesh + */ + + #include <stdlib.h> #include <math.h> @@ -45,6 +50,7 @@ #include "WM_types.h" #include "ED_object.h" +#include "ED_mesh.h" #include "ED_screen.h" #include "ED_view3d.h" @@ -85,6 +91,8 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_fgon_make); WM_operatortype_append(MESH_OT_duplicate); WM_operatortype_append(MESH_OT_remove_doubles); + WM_operatortype_append(MESH_OT_vertices_sort); + WM_operatortype_append(MESH_OT_vertices_randomize); WM_operatortype_append(MESH_OT_extrude); WM_operatortype_append(MESH_OT_spin); WM_operatortype_append(MESH_OT_screw); @@ -145,7 +153,8 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_select_nth); } -int ED_operator_editmesh_face_select(bContext *C) +#if 0 /* UNUSED, remove? */ +static int ED_operator_editmesh_face_select(bContext *C) { Object *obedit= CTX_data_edit_object(C); if(obedit && obedit->type==OB_MESH) { @@ -156,6 +165,7 @@ int ED_operator_editmesh_face_select(bContext *C) } return 0; } +#endif void ED_operatormacros_mesh(void) { @@ -165,7 +175,8 @@ void ED_operatormacros_mesh(void) ot= WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER); ot->description = "Cut mesh loop and slide it"; WM_operatortype_macro_define(ot, "MESH_OT_loopcut"); - WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide"); + otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide"); + RNA_struct_idprops_unset(otmacro->ptr, "release_confirm"); ot= WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); ot->description = "Duplicate mesh and move"; @@ -219,6 +230,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) { wmKeyMap *keymap; wmKeyMapItem *kmi; + int i; keymap= WM_keymap_find(keyconf, "Mesh", 0, 0); keymap->poll= ED_operator_editmesh; @@ -272,7 +284,6 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_beautify_fill", FKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_sort_faces", FKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_tris_convert_to_quads", JKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_edge_flip", FKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); @@ -313,6 +324,12 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_uv_map", UKEY, KM_PRESS, 0, 0); WM_keymap_add_menu(keymap, "VIEW3D_MT_vertex_group", GKEY, KM_PRESS, KM_CTRL, 0); + /* useful stuff from object-mode */ + for (i=0; i<=5; i++) { + kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0); + RNA_int_set(kmi->ptr, "level", i); + } + ED_object_generic_keymap(keyconf, keymap, 3); } |