[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43386] trunk/blender/source/blender/ editors: Fix [#29894] Selection in sequence editor does not de-select other strips

Bastien Montagne montagne29 at wanadoo.fr
Sat Jan 14 23:59:59 CET 2012


Revision: 43386
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43386
Author:   mont29
Date:     2012-01-14 22:59:51 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
Fix [#29894] Selection in sequence editor does not de-select other strips

Another bunch of fixes for select keymaps (sequencer, node, nla, graph, action).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_action/action_ops.c
    trunk/blender/source/blender/editors/space_graph/graph_ops.c
    trunk/blender/source/blender/editors/space_nla/nla_ops.c
    trunk/blender/source/blender/editors/space_node/node_ops.c
    trunk/blender/source/blender/editors/space_sequencer/sequencer_ops.c

Modified: trunk/blender/source/blender/editors/space_action/action_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_action/action_ops.c	2012-01-14 21:41:13 UTC (rev 43385)
+++ trunk/blender/source/blender/editors/space_action/action_ops.c	2012-01-14 22:59:51 UTC (rev 43386)
@@ -36,6 +36,7 @@
 #include "DNA_space_types.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "ED_anim_api.h"
 #include "ED_markers.h"
@@ -110,32 +111,45 @@
 	
 	/* action_select.c - selection tools */
 		/* click-select */
-	WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
+	kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_boolean_set(kmi->ptr, "column", FALSE);
 	kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
-		RNA_boolean_set(kmi->ptr, "column", 1);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_boolean_set(kmi->ptr, "column", TRUE);
 	kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_boolean_set(kmi->ptr, "column", FALSE);
 	kmi= WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
-		RNA_boolean_set(kmi->ptr, "column", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_boolean_set(kmi->ptr, "column", TRUE);
 		
 		/* select left/right */
-	WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+	kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
 	kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST);
 	
 	kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
 		RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT);
 	kmi= WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
 		RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT);
 	
 		/* deselect all */
-	WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
-	RNA_boolean_set(WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+	kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "invert", FALSE);
+	kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
+		RNA_boolean_set(kmi->ptr, "invert", TRUE);
 	
 		/* borderselect */
-	WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0);
-	RNA_boolean_set(WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0)->ptr, "axis_range", 1);
+	kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+	kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
+		RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
 	
 		/* column select */
 	RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS);

Modified: trunk/blender/source/blender/editors/space_graph/graph_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_ops.c	2012-01-14 21:41:13 UTC (rev 43385)
+++ trunk/blender/source/blender/editors/space_graph/graph_ops.c	2012-01-14 22:59:51 UTC (rev 43386)
@@ -269,44 +269,66 @@
 	
 	/* graph_select.c - selection tools */
 		/* click-select */
-	WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
+	kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_boolean_set(kmi->ptr, "curves", FALSE);
+		RNA_boolean_set(kmi->ptr, "column", FALSE);
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
-		RNA_boolean_set(kmi->ptr, "column", 1);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_boolean_set(kmi->ptr, "curves", FALSE);
+		RNA_boolean_set(kmi->ptr, "column", TRUE);
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_boolean_set(kmi->ptr, "curves", FALSE);
+		RNA_boolean_set(kmi->ptr, "column", FALSE);
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
-		RNA_boolean_set(kmi->ptr, "column", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_boolean_set(kmi->ptr, "curves", FALSE);
+		RNA_boolean_set(kmi->ptr, "column", TRUE);
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
-		RNA_boolean_set(kmi->ptr, "curves", 1);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_boolean_set(kmi->ptr, "curves", TRUE);
+		RNA_boolean_set(kmi->ptr, "column", FALSE);
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "curves", 1);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_boolean_set(kmi->ptr, "curves", TRUE);
+		RNA_boolean_set(kmi->ptr, "column", FALSE);
 	
 	/* select left/right */
 	WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST);
 	
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
 		RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_LEFT);
 	kmi= WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
 		RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT);
 	
 		/* deselect all */
-	WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
-	RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+	kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "invert", FALSE);
+	kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
+		RNA_boolean_set(kmi->ptr, "invert", TRUE);
 	
 		/* borderselect */
-	WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
+	kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+		RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
 	kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
-		RNA_boolean_set(kmi->ptr, "axis_range", 1);
+		RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+		RNA_boolean_set(kmi->ptr, "include_handles", FALSE);
 		
 	kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0);
-		RNA_boolean_set(kmi->ptr, "include_handles", 1);
+		RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+		RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
 	kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
-		RNA_boolean_set(kmi->ptr, "axis_range", 1);
-		RNA_boolean_set(kmi->ptr, "include_handles", 1);
+		RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+		RNA_boolean_set(kmi->ptr, "include_handles", TRUE);
 		
 		/* column select */
 	RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", GRAPHKEYS_COLUMNSEL_KEYS);

Modified: trunk/blender/source/blender/editors/space_nla/nla_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_nla/nla_ops.c	2012-01-14 21:41:13 UTC (rev 43385)
+++ trunk/blender/source/blender/editors/space_nla/nla_ops.c	2012-01-14 22:59:51 UTC (rev 43386)
@@ -192,28 +192,39 @@
 	
 	/* selection */
 		/* click select */
-	WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0);
+	kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
 	kmi= WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
 		
 		/* select left/right */
-	WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+	kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
+		RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
 	kmi= WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "extend", 1);
+		RNA_boolean_set(kmi->ptr, "extend", TRUE);
+		RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
 	
 	kmi= WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
 		RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_LEFT);
 	kmi= WM_keymap_add_item(keymap, "NLA_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
+		RNA_boolean_set(kmi->ptr, "extend", FALSE);
 		RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT);
 		
 	

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list