Commit: 5529e51a210936bcbf5e9c6388b6276ef736933a
Author: Antony Riakiotakis
Date: Tue Jul 8 22:57:50 2014 +0300
https://developer.blender.org/rB5529e51a210936bcbf5e9c6388b6276ef736933a
Extrude operator sticky key pie:
* Press once to extrude along normals
* Hold to spawn pie with options
* Removed the Alt-E shortcut.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/editors/mesh/mesh_ops.c
M source/blender/editors/object/object_ops.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py
b/release/scripts/startup/bl_ui/space_view3d.py
index 3ba8435..d8cb0a9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2154,6 +2154,8 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
layout.operator("view3d.edit_mesh_extrude_move_normal",
text="Region"),
'REGION_VERT_NORMAL': lambda layout:
layout.operator("view3d.edit_mesh_extrude_move_shrink_fatten",
text="Region (Vertex Normals)"),
+ 'NULL': lambda layout:
+ layout.separator(),
}
@staticmethod
@@ -2164,10 +2166,16 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
menu = []
if mesh.total_face_sel:
menu += ['REGION', 'REGION_VERT_NORMAL', 'FACE']
+ else:
+ menu += ['NULL', 'NULL', 'NULL']
if mesh.total_edge_sel and (select_mode[0] or select_mode[1]):
menu += ['EDGE']
+ else:
+ menu += ['NULL']
if mesh.total_vert_sel and select_mode[0]:
menu += ['VERT']
+ else:
+ menu += ['NULL']
# should never get here
return menu
@@ -2175,9 +2183,10 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
+ pie = layout.menu_pie()
for menu_id in self.extrude_options(context):
- self._extrude_funcs[menu_id](layout)
+ self._extrude_funcs[menu_id](pie)
class VIEW3D_MT_edit_mesh_vertices(Menu):
diff --git a/source/blender/editors/mesh/mesh_ops.c
b/source/blender/editors/mesh/mesh_ops.c
index cf1f338..f550dfd 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -209,7 +209,7 @@ void ED_operatormacros_mesh(void)
{
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
-
+
ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut
and Slide", "Cut mesh loop and slide it",
OPTYPE_UNDO | OPTYPE_REGISTER);
WM_operatortype_macro_define(ot, "MESH_OT_loopcut");
@@ -281,6 +281,11 @@ void ED_operatormacros_mesh(void)
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", false);
+
+ WM_operator_pie_macro("VIEW3D_OT_edit_mesh_extrude_sticky", "Extrude
Sticky",
+ "Extrude the mesh surface",
+ OPTYPE_UNDO | OPTYPE_REGISTER,
"VIEW3D_OT_edit_mesh_extrude_move_normal", /* python operator */
+ "VIEW3D_MT_edit_mesh_extrude");
}
/* note mesh keymap also for other space? */
@@ -358,8 +363,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent",
NKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "inside", true);
- WM_keymap_add_item(keymap, "VIEW3D_OT_edit_mesh_extrude_move_normal",
EKEY, KM_PRESS, 0, 0); /* python operator */
- WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_extrude", EKEY,
KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_edit_mesh_extrude_sticky", EKEY,
KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "TRANSFORM_OT_edge_crease", EKEY, KM_PRESS,
KM_SHIFT, 0);
diff --git a/source/blender/editors/object/object_ops.c
b/source/blender/editors/object/object_ops.c
index 455baf1..b205980 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -496,12 +496,6 @@ void ED_keymap_proportional_editmode(struct wmKeyConfig
*UNUSED(keyconf), struct
kmi = WM_keymap_add_item(keymap, "WM_OT_proportional_mode_sticky",
OKEY, KM_PRESS, 0, 0);
- /*
- RNA_string_set(kmi->ptr, "data_path",
"tool_settings.proportional_edit");
- RNA_string_set(kmi->ptr, "value_1", "DISABLED");
- RNA_string_set(kmi->ptr, "value_2", "ENABLED");
- */
-
/* for modes/object types that allow 'connected' mode, add the Alt O
key */
if (do_connected) {
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum",
OKEY, KM_PRESS, KM_ALT, 0);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs