merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though...
[blender-staging.git] / source / blender / editors / mesh / mesh_ops.c
index 90419b6dd62c28c2f1d87193de436d9a950dc7c7..3daaf5863d5c93a774b659ce5f08d497df0b7004 100644 (file)
@@ -94,14 +94,16 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_primitive_monkey_add);
        WM_operatortype_append(MESH_OT_primitive_uv_sphere_add);
        WM_operatortype_append(MESH_OT_primitive_ico_sphere_add);
-       WM_operatortype_append(MESH_OT_fgon_clear);
-       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_extrude);
        WM_operatortype_append(MESH_OT_spin);
        WM_operatortype_append(MESH_OT_screw);
-       
+
+       WM_operatortype_append(MESH_OT_extrude_region);
+       WM_operatortype_append(MESH_OT_extrude_faces_indiv);
+       WM_operatortype_append(MESH_OT_extrude_edges_indiv);
+       WM_operatortype_append(MESH_OT_extrude_verts_indiv);
+
        WM_operatortype_append(MESH_OT_split);
        WM_operatortype_append(MESH_OT_extrude_repeat);
        WM_operatortype_append(MESH_OT_edge_rotate);
@@ -111,9 +113,7 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_select_axis);
        
        WM_operatortype_append(MESH_OT_uvs_rotate);
-       WM_operatortype_append(MESH_OT_uvs_mirror);
        WM_operatortype_append(MESH_OT_colors_rotate);
-       WM_operatortype_append(MESH_OT_colors_mirror);
        
        WM_operatortype_append(MESH_OT_fill);
        WM_operatortype_append(MESH_OT_beautify_fill);
@@ -160,7 +160,7 @@ int ED_operator_editmesh_face_select(bContext *C)
 {
        Object *obedit= CTX_data_edit_object(C);
        if(obedit && obedit->type==OB_MESH) {
-               EditMesh *em = ((Mesh *)obedit->data)->edit_mesh;
+               BMEditMesh *em = ((Mesh *)obedit->data)->edit_btmesh;
                if (em && em->selectmode & SCE_SELECT_FACE) {
                        return 1;
                }
@@ -192,28 +192,25 @@ void ED_operatormacros_mesh(void)
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude region and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude");
-       RNA_enum_set(otmacro->ptr, "type", 1);
+       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_region");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude faces and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude");
-       RNA_enum_set(otmacro->ptr, "type", 2);
+       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude edges and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude");
-       RNA_enum_set(otmacro->ptr, "type", 3);
+       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude vertices and move result";
-       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude");
+       otmacro= WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv");
        RNA_enum_set(otmacro->ptr, "type", 4);
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
@@ -301,9 +298,6 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "MESH_OT_delete", XKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "MESH_OT_delete", DELKEY, KM_PRESS, 0, 0);
        
-       WM_keymap_add_item(keymap, "MESH_OT_fgon_make", FKEY, KM_PRESS, KM_ALT, 0);
-       WM_keymap_add_item(keymap, "MESH_OT_fgon_clear", FKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0);
-       
        WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, 0, KKEY);
        RNA_enum_set(WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, KM_SHIFT, KKEY)->ptr, "type", 2/*KNIFE_MIDPOINT*/);