[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23913] trunk/blender/source/blender/ editors: Another attempt to fix the problems with confirming transforms while snapping (LMB confirm, CTRL-key still held for snapping) and "ctrl-click" extrusion.

Joshua Leung aligorith at gmail.com
Sun Oct 18 04:15:55 CEST 2009


Revision: 23913
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23913
Author:   aligorith
Date:     2009-10-18 04:15:55 +0200 (Sun, 18 Oct 2009)

Log Message:
-----------
Another attempt to fix the problems with confirming transforms while snapping (LMB confirm, CTRL-key still held for snapping) and "ctrl-click" extrusion.

Made the confirm keymap for transforms use KM_RELEASE instead of KM_ANY (I didn't see any case where this failed yet?), and restored the "ctrl-click" as it was before r23903

Modified Paths:
--------------
    trunk/blender/source/blender/editors/mesh/mesh_ops.c
    trunk/blender/source/blender/editors/transform/transform.c

Modified: trunk/blender/source/blender/editors/mesh/mesh_ops.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/mesh_ops.c	2009-10-18 02:06:06 UTC (rev 23912)
+++ trunk/blender/source/blender/editors/mesh/mesh_ops.c	2009-10-18 02:15:55 UTC (rev 23913)
@@ -267,10 +267,8 @@
 	RNA_string_set(kmi->ptr, "name", "INFO_MT_mesh_add");
 	
 	WM_keymap_add_item(keymap, "MESH_OT_separate", PKEY, KM_PRESS, 0, 0);
-						/* use KM_RELEASE because same key is used for tweaks
-						 * TEMPORARY REMAP TO ALT+CTRL TO AVOID CONFLICT 
-						 * */
-	WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", LEFTMOUSE, KM_RELEASE, KM_CTRL|KM_ALT, 0);
+		/* KM_CTRL+KM_RELEASE is used here, since KM_CTRL+KM_PRESS is taken for lasso */
+	WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", LEFTMOUSE, KM_RELEASE, KM_CTRL, 0); 
 	
 	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);

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2009-10-18 02:06:06 UTC (rev 23912)
+++ trunk/blender/source/blender/editors/transform/transform.c	2009-10-18 02:15:55 UTC (rev 23913)
@@ -536,7 +536,8 @@
 	
 	/* items for modal map */
 	WM_modalkeymap_add_item(keymap, ESCKEY,    KM_PRESS, KM_ANY, 0, TFM_MODAL_CANCEL);
-	WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_ANY, KM_ANY, 0, TFM_MODAL_CONFIRM);
+		/* only use KM_RELEASE, otherwise LMB-CTRL extrude will catch the release event when we finish and were snapping */
+	WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, TFM_MODAL_CONFIRM); 
 	WM_modalkeymap_add_item(keymap, RETKEY, KM_PRESS, KM_ANY, 0, TFM_MODAL_CONFIRM);
 	WM_modalkeymap_add_item(keymap, PADENTER, KM_PRESS, KM_ANY, 0, TFM_MODAL_CONFIRM);
 





More information about the Bf-blender-cvs mailing list