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>2012-04-20 14:52:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-20 14:52:13 +0400
commit3d851bfd5bf4fd486d8e9b8baec3d184dd4be939 (patch)
tree20bfe9c682351b8997e9b9890481b7bd9e7702cd /source/blender/editors/mesh/mesh_ops.c
parent80ff1984f87dc44e984edb5b84e41f769fa64fee (diff)
knife tool modifications
from user freedback it seems there are 2 use cases, both valid. * Select geometry and cut the selection in half (as 2.4x worked) * Point-to-point define the faces to cut, dont cut through everything (only cut what you see). With the second, since you are already selecting the edges to cut and snapping to them. only cutting the selecting is limiting/annoying. Modifying these options while the knife tool runs doesn't work well, so expose under 2 keys, K, Shift-K.
Diffstat (limited to 'source/blender/editors/mesh/mesh_ops.c')
-rw-r--r--source/blender/editors/mesh/mesh_ops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 145bef56285..7e8c38c9abc 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -156,7 +156,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_select_nth);
WM_operatortype_append(MESH_OT_vert_connect);
WM_operatortype_append(MESH_OT_vert_slide);
- WM_operatortype_append(MESH_OT_knifetool);
+ WM_operatortype_append(MESH_OT_knife_tool);
WM_operatortype_append(MESH_OT_bevel);
@@ -347,8 +347,13 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_delete", DELKEY, KM_PRESS, 0, 0);
- WM_keymap_add_item(keymap, "MESH_OT_knifetool", KKEY, KM_PRESS, 0, 0);
- //RNA_enum_set(WM_keymap_add_item(keymap, "MESH_OT_knife_cut", LEFTMOUSE, KM_PRESS, KM_SHIFT, KKEY)->ptr, "type", 2/*KNIFE_MIDPOINT*/);
+ kmi = WM_keymap_add_item(keymap, "MESH_OT_knife_tool", KKEY, KM_PRESS, 0, 0);
+ RNA_boolean_set(kmi->ptr, "use_occlude_geometry", TRUE);
+ RNA_boolean_set(kmi->ptr, "only_select", FALSE);
+
+ kmi = WM_keymap_add_item(keymap, "MESH_OT_knife_tool", KKEY, KM_PRESS, KM_SHIFT, 0);
+ RNA_boolean_set(kmi->ptr, "use_occlude_geometry", FALSE);
+ RNA_boolean_set(kmi->ptr, "only_select", TRUE);
WM_keymap_add_item(keymap, "OBJECT_OT_vertex_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);