Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-11 21:02:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-11 21:02:12 +0300
commit925e7758186048857f9483b037b27b0eaf701cce (patch)
tree9ed60ef8300407fb509497990d1421099653b4b4
parent73a7885ab30bfb1bc11dc2575271bc8b3ab887a4 (diff)
EditMesh: remove duplicate rip macro
Change the fill setting in the keymap, this allows tool access the macro with either setting.
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py6
-rw-r--r--source/blender/editors/mesh/mesh_ops.c22
2 files changed, 14 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index a618ef7fd4e..6334a2ee87e 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2630,8 +2630,10 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
layout.operator("mesh.merge")
layout.operator("mesh.remove_doubles")
- layout.operator("mesh.rip_move")
- layout.operator("mesh.rip_move_fill")
+ props = layout.operator("mesh.rip_move")
+ props.MESH_OT_rip.use_fill = False
+ props = layout.operator("mesh.rip_move", text="Rip Fill")
+ props.MESH_OT_rip.use_fill = True
layout.operator("mesh.rip_edge_move")
layout.operator("mesh.split")
layout.operator_menu_enum("mesh.separate", "type")
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 697a92f36d1..daf0b51f594 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -243,16 +243,6 @@ void ED_operatormacros_mesh(void)
ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", "Rip polygons and move the result",
OPTYPE_UNDO | OPTYPE_REGISTER);
otmacro = WM_operatortype_macro_define(ot, "MESH_OT_rip");
- RNA_boolean_set(otmacro->ptr, "use_fill", false);
- otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
- RNA_enum_set(otmacro->ptr, "proportional", 0);
- RNA_boolean_set(otmacro->ptr, "mirror", false);
-
- /* annoying we can't pass 'use_fill' through the macro */
- ot = WM_operatortype_append_macro("MESH_OT_rip_move_fill", "Rip Fill", "Rip-fill polygons and move the result",
- OPTYPE_UNDO | OPTYPE_REGISTER);
- otmacro = WM_operatortype_macro_define(ot, "MESH_OT_rip");
- RNA_boolean_set(otmacro->ptr, "use_fill", true);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
RNA_boolean_set(otmacro->ptr, "mirror", false);
@@ -403,8 +393,16 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "MESH_OT_tris_convert_to_quads", JKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "MESH_OT_rip_move", VKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "MESH_OT_rip_move_fill", VKEY, KM_PRESS, KM_ALT, 0);
+ kmi = WM_keymap_add_item(keymap, "MESH_OT_rip_move", VKEY, KM_PRESS, 0, 0);
+ {
+ PointerRNA macro_ptr = RNA_pointer_get(kmi->ptr, "MESH_OT_rip");
+ RNA_boolean_set(&macro_ptr, "use_fill", false);
+ }
+ kmi = WM_keymap_add_item(keymap, "MESH_OT_rip_move", VKEY, KM_PRESS, KM_ALT, 0);
+ {
+ PointerRNA macro_ptr = RNA_pointer_get(kmi->ptr, "MESH_OT_rip");
+ RNA_boolean_set(&macro_ptr, "use_fill", true);
+ }
WM_keymap_add_item(keymap, "MESH_OT_rip_edge_move", DKEY, KM_PRESS, KM_ALT, 0);