[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37065] branches/soc-2011-pepper/source/ blender/editors: Usability Tweak [#27469]

Joshua Leung aligorith at gmail.com
Wed Jun 1 08:26:54 CEST 2011


Revision: 37065
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37065
Author:   aligorith
Date:     2011-06-01 06:26:54 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Usability Tweak [#27469]

Adding/Rename markers (M/Ctrl-M) were restricted to only being
available when the mouse was hovering just over the time scroller at
the bottom of animation editors, as otherwise we'd get nasty keymap
conflicts where markers keymap would block all the primary function
keymaps.

However, in the case of Adding/Renaming markers, there are no other
keys which currently conflict with these in such cases. Hence, it is
fine to let these ones be able to be run from anywhere within the
animation editors, which should make it easier to add markers for
lipsyncing purposes again for example.

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/editors/animation/anim_markers.c
    branches/soc-2011-pepper/source/blender/editors/include/ED_markers.h
    branches/soc-2011-pepper/source/blender/editors/space_action/action_ops.c
    branches/soc-2011-pepper/source/blender/editors/space_graph/graph_ops.c
    branches/soc-2011-pepper/source/blender/editors/space_nla/nla_ops.c

Modified: branches/soc-2011-pepper/source/blender/editors/animation/anim_markers.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/animation/anim_markers.c	2011-06-01 06:09:34 UTC (rev 37064)
+++ branches/soc-2011-pepper/source/blender/editors/animation/anim_markers.c	2011-06-01 06:26:54 UTC (rev 37065)
@@ -1495,3 +1495,14 @@
 	WM_keymap_add_item(keymap, "MARKER_OT_camera_bind", BKEY, KM_PRESS, KM_CTRL, 0);
 #endif
 }
+
+/* to be called from animation editor keymaps, see note below */
+void ED_marker_keymap_animedit_conflictfree(wmKeyMap *keymap)
+{
+	/* duplicate of some marker-hotkeys but without the bounds checking
+	 * since these are handy to be able to do unrestricted and won't conflict
+	 * with primary function hotkeys (Usability tweak [#27469])
+	 */
+	WM_keymap_add_item(keymap, "MARKER_OT_add", MKEY, KM_PRESS, 0, 0);
+	WM_keymap_add_item(keymap, "MARKER_OT_rename", MKEY, KM_PRESS, KM_CTRL, 0);
+}

Modified: branches/soc-2011-pepper/source/blender/editors/include/ED_markers.h
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/include/ED_markers.h	2011-06-01 06:09:34 UTC (rev 37064)
+++ branches/soc-2011-pepper/source/blender/editors/include/ED_markers.h	2011-06-01 06:26:54 UTC (rev 37065)
@@ -72,6 +72,9 @@
 /* called in screen_ops.c:ED_keymap_screen() */
 void ED_marker_keymap(struct wmKeyConfig *keyconf);
 
+/* called in animation editors - keymap defines */
+void ED_marker_keymap_animedit_conflictfree(struct wmKeyMap *keymap);
+
 /* debugging only */
 void debug_markers_print_list(struct ListBase *markers);
 

Modified: branches/soc-2011-pepper/source/blender/editors/space_action/action_ops.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/space_action/action_ops.c	2011-06-01 06:09:34 UTC (rev 37064)
+++ branches/soc-2011-pepper/source/blender/editors/space_action/action_ops.c	2011-06-01 06:26:54 UTC (rev 37065)
@@ -40,6 +40,7 @@
 #include "BLI_blenlib.h"
 
 #include "ED_anim_api.h"
+#include "ED_markers.h"
 #include "ED_transform.h"
 
 #include "action_intern.h"
@@ -193,6 +194,9 @@
 	
 	/* transform system */
 	transform_keymap_for_space(keyconf, keymap, SPACE_ACTION);
+	
+	/* special markers hotkeys for anim editors: see note in definition of this function */
+	ED_marker_keymap_animedit_conflictfree(keymap);
 }
 
 /* --------------- */

Modified: branches/soc-2011-pepper/source/blender/editors/space_graph/graph_ops.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/space_graph/graph_ops.c	2011-06-01 06:09:34 UTC (rev 37064)
+++ branches/soc-2011-pepper/source/blender/editors/space_graph/graph_ops.c	2011-06-01 06:26:54 UTC (rev 37065)
@@ -46,6 +46,7 @@
 #include "UI_view2d.h"
 
 #include "ED_anim_api.h"
+#include "ED_markers.h"
 #include "ED_screen.h"
 #include "ED_transform.h"
 
@@ -399,6 +400,9 @@
 	
 	/* transform system */
 	transform_keymap_for_space(keyconf, keymap, SPACE_IPO);
+	
+	/* special markers hotkeys for anim editors: see note in definition of this function */
+	ED_marker_keymap_animedit_conflictfree(keymap);
 }
 
 /* --------------- */

Modified: branches/soc-2011-pepper/source/blender/editors/space_nla/nla_ops.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/space_nla/nla_ops.c	2011-06-01 06:09:34 UTC (rev 37064)
+++ branches/soc-2011-pepper/source/blender/editors/space_nla/nla_ops.c	2011-06-01 06:26:54 UTC (rev 37065)
@@ -45,6 +45,7 @@
 #include "BKE_screen.h"
 
 #include "ED_anim_api.h"
+#include "ED_markers.h"
 #include "ED_screen.h"
 #include "ED_transform.h"
 
@@ -262,6 +263,9 @@
 	
 	/* transform system */
 	transform_keymap_for_space(keyconf, keymap, SPACE_NLA);
+	
+	/* special markers hotkeys for anim editors: see note in definition of this function */
+	ED_marker_keymap_animedit_conflictfree(keymap);
 }
 
 /* --------------- */




More information about the Bf-blender-cvs mailing list