[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43417] trunk/blender/source/blender/ editors: went over all keymaps to check for cases where defaults were assumed

Campbell Barton ideasman42 at gmail.com
Mon Jan 16 10:42:37 CET 2012


Revision: 43417
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43417
Author:   campbellbarton
Date:     2012-01-16 09:42:29 +0000 (Mon, 16 Jan 2012)
Log Message:
-----------
went over all keymaps to check for cases where defaults were assumed
(which could be wrong if the previous setting was used).

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_markers.c
    trunk/blender/source/blender/editors/armature/armature_ops.c
    trunk/blender/source/blender/editors/gpencil/gpencil_ops.c
    trunk/blender/source/blender/editors/physics/physics_ops.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
    trunk/blender/source/blender/editors/space_clip/space_clip.c

Modified: trunk/blender/source/blender/editors/animation/anim_markers.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_markers.c	2012-01-16 09:12:34 UTC (rev 43416)
+++ trunk/blender/source/blender/editors/animation/anim_markers.c	2012-01-16 09:42:29 UTC (rev 43417)
@@ -1494,11 +1494,12 @@
 
 #ifdef DURIAN_CAMERA_SWITCH
 	kmi= WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
-	RNA_boolean_set(kmi->ptr, "camera", 1);
+	RNA_boolean_set(kmi->ptr, "extend", FALSE);
+	RNA_boolean_set(kmi->ptr, "camera", TRUE);
 
 	kmi= WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
-	RNA_boolean_set(kmi->ptr, "extend", 1);
-	RNA_boolean_set(kmi->ptr, "camera", 1);
+	RNA_boolean_set(kmi->ptr, "extend", TRUE);
+	RNA_boolean_set(kmi->ptr, "camera", TRUE);
 #else
 	(void)kmi;
 #endif

Modified: trunk/blender/source/blender/editors/armature/armature_ops.c
===================================================================
--- trunk/blender/source/blender/editors/armature/armature_ops.c	2012-01-16 09:12:34 UTC (rev 43416)
+++ trunk/blender/source/blender/editors/armature/armature_ops.c	2012-01-16 09:42:29 UTC (rev 43417)
@@ -220,16 +220,17 @@
 	WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
 	WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0);
 	kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
-	RNA_boolean_set(kmi->ptr, "snap", 1);
+	RNA_boolean_set(kmi->ptr, "snap", TRUE);
 	WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0);
 	kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0);
-	RNA_boolean_set(kmi->ptr, "snap", 1);
+	RNA_boolean_set(kmi->ptr, "snap", TRUE);
 
 	/* only set in editmode armature, by space_view3d listener */
 	kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0);
-		RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+	RNA_boolean_set(kmi->ptr, "unselected", FALSE);
 	kmi= WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+	RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+
 	WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
 	WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
 	WM_keymap_add_item(keymap, "ARMATURE_OT_calculate_roll", NKEY, KM_PRESS, KM_CTRL, 0);
@@ -304,9 +305,11 @@
 	WM_keymap_add_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
 	WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
 	
-	WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0);
-	kmi= WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "unselected", 1);
+	kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0);
+	RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+	kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
+	RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+
 	WM_keymap_add_item(keymap, "POSE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
 	
 	WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_apply", AKEY, KM_PRESS, KM_CTRL, 0);
@@ -321,9 +324,11 @@
 	WM_keymap_add_item(keymap, "POSE_OT_rotation_mode_set", RKEY, KM_PRESS, KM_CTRL, 0);
 	
 	WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
-	WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
+	kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
+	RNA_boolean_set(kmi->ptr, "flipped", FALSE);
+
 	kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
-		RNA_boolean_set(kmi->ptr, "flipped", 1);
+	RNA_boolean_set(kmi->ptr, "flipped", TRUE);
 	
 	kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0);
 		RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_ops.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_ops.c	2012-01-16 09:12:34 UTC (rev 43416)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_ops.c	2012-01-16 09:42:29 UTC (rev 43417)
@@ -55,7 +55,8 @@
 	
 	/* Draw */
 		/* draw */
-	WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, 0, DKEY);
+	kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, 0, DKEY);
+		RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW);
 		/* draw - straight lines */
 	kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, KM_CTRL, DKEY);
 		RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_DRAW_STRAIGHT);

Modified: trunk/blender/source/blender/editors/physics/physics_ops.c
===================================================================
--- trunk/blender/source/blender/editors/physics/physics_ops.c	2012-01-16 09:12:34 UTC (rev 43416)
+++ trunk/blender/source/blender/editors/physics/physics_ops.c	2012-01-16 09:42:29 UTC (rev 43417)
@@ -39,8 +39,11 @@
 #include "ED_physics.h"
 #include "ED_object.h"
 
+#include "BLI_utildefines.h"
+
 #include "physics_intern.h" // own include
 
+
 /***************************** particles ***********************************/
 
 static void operatortypes_particle(void)
@@ -109,7 +112,7 @@
 	RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
 
 	kmi = WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, KM_ANY, 0);
-	RNA_boolean_set(kmi->ptr, "release_confirm", 1);
+	RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
 
 	WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", LEFTMOUSE, KM_PRESS, 0, 0);
 	WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c	2012-01-16 09:12:34 UTC (rev 43416)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c	2012-01-16 09:42:29 UTC (rev 43417)
@@ -556,11 +556,11 @@
 	/* multires switch */
 	kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0);
 	RNA_int_set(kmi->ptr, "level", 1);
-	RNA_boolean_set(kmi->ptr, "relative", 1);
+	RNA_boolean_set(kmi->ptr, "relative", TRUE);
 
 	kmi= WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEDOWNKEY, KM_PRESS, 0, 0);
 	RNA_int_set(kmi->ptr, "level", -1);
-	RNA_boolean_set(kmi->ptr, "relative", 1);
+	RNA_boolean_set(kmi->ptr, "relative", TRUE);
 
 	ed_keymap_paint_brush_switch(keymap, "sculpt");
 	ed_keymap_paint_brush_size(keymap, "tool_settings.sculpt.brush.size");

Modified: trunk/blender/source/blender/editors/space_clip/space_clip.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-01-16 09:12:34 UTC (rev 43416)
+++ trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-01-16 09:42:29 UTC (rev 43417)
@@ -399,22 +399,24 @@
 
 	/* 2d tracking */
 	kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
-	RNA_boolean_set(kmi->ptr, "backwards", 1);
+	RNA_boolean_set(kmi->ptr, "backwards", TRUE);
+	RNA_boolean_set(kmi->ptr, "sequence", FALSE);
 	WM_keymap_add_item(keymap, "CLIP_OT_track_markers", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
 	kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_CTRL, 0);
-	RNA_boolean_set(kmi->ptr, "sequence", 1);
+	RNA_boolean_set(kmi->ptr, "backwards", FALSE);
+	RNA_boolean_set(kmi->ptr, "sequence", TRUE);
 	kmi= WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
-	RNA_boolean_set(kmi->ptr, "backwards", 1);
-	RNA_boolean_set(kmi->ptr, "sequence", 1);
+	RNA_boolean_set(kmi->ptr, "backwards", TRUE);
+	RNA_boolean_set(kmi->ptr, "sequence", TRUE);
 
 	/* mode */
 	kmi= WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, 0, 0);
 	RNA_enum_set(kmi->ptr, "mode", SC_MODE_RECONSTRUCTION);
-	RNA_boolean_set(kmi->ptr, "toggle", 1);
+	RNA_boolean_set(kmi->ptr, "toggle", TRUE);
 
 	kmi= WM_keymap_add_item(keymap, "CLIP_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
 	RNA_enum_set(kmi->ptr, "mode", SC_MODE_DISTORTION);
-	RNA_boolean_set(kmi->ptr, "toggle", 1);
+	RNA_boolean_set(kmi->ptr, "toggle", TRUE);
 
 	/* ******** Hotkeys avalaible for main region only ******** */
 
@@ -490,10 +492,11 @@
 	kmi= WM_keymap_add_item(keymap, "CLIP_OT_lock_tracks", LKEY, KM_PRESS, KM_ALT, 0);
 	RNA_enum_set(kmi->ptr, "action", 1);	/* unlock */
 
-	WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0);
+	kmi= WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0);
+	RNA_boolean_set(kmi->ptr, "unselected", FALSE);
 
 	kmi= WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, KM_SHIFT, 0);
-	RNA_boolean_set(kmi->ptr, "unselected", 1);
+	RNA_boolean_set(kmi->ptr, "unselected", TRUE);
 
 	WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks_clear", HKEY, KM_PRESS, KM_ALT, 0);
 



More information about the Bf-blender-cvs mailing list