[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24074] trunk/blender: Toolbar Fixes:

Joshua Leung aligorith at gmail.com
Sun Oct 25 04:47:15 CET 2009


Revision: 24074
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24074
Author:   aligorith
Date:     2009-10-25 04:47:14 +0100 (Sun, 25 Oct 2009)

Log Message:
-----------
Toolbar Fixes:

* Restored the Grease Pencil tools to the toolbar
Probably, if the reason they were commented out before was so that the repeat stuff is visible, we can swap the order of those two. Otherwise, it's good to have somewhere for the operators now (so that the hotkeys can be found)

* Hotkey displays in the tooltips now show the keymodifier too
For example, "D LeftMouse" or "Ctrl D LeftMouse" for the Grease Pencil operators, instead of just "LeftMouse" or "Ctrl LeftMouse". 

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_view3d_toolbar.py
    trunk/blender/source/blender/windowmanager/intern/wm_keymap.c

Modified: trunk/blender/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2009-10-25 00:24:56 UTC (rev 24073)
+++ trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2009-10-25 03:47:14 UTC (rev 24074)
@@ -38,11 +38,11 @@
 		col.itemO("anim.insert_keyframe_menu", text="Insert")
 		col.itemO("anim.delete_keyframe_v3d", text="Remove")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")
@@ -91,11 +91,11 @@
 		col.itemO("mesh.uvs_rotate")
 		col.itemO("mesh.uvs_mirror")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")
@@ -150,11 +150,11 @@
 		col.itemO("curve.extrude")
 		col.itemO("curve.subdivide")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")
@@ -189,11 +189,11 @@
 		col.itemO("curve.extrude")
 		col.itemO("curve.subdivide")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")
@@ -252,11 +252,11 @@
 		col.itemL(text="Modeling:")
 		col.itemO("armature.extrude")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")
@@ -282,11 +282,11 @@
 		col.itemO("tfm.rotate")
 		col.itemO("tfm.resize", text="Scale")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")
@@ -309,11 +309,11 @@
 		col.itemO("tfm.rotate")
 		col.itemO("tfm.resize", text="Scale")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")
@@ -359,11 +359,11 @@
 		col.itemO("pose.push", text="Push")
 		col.itemO("pose.breakdown", text="Breakdowner")
 		
-#		col = layout.column(align=True)
-#		col.itemL(text="Grease Pencil:")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
-#		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
-#		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
+		col = layout.column(align=True)
+		col.itemL(text="Grease Pencil:")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW', text="Draw Freehand")
+		col.item_enumO("gpencil.draw", "mode", 'DRAW_STRAIGHT', text="Straight Line")
+		col.item_enumO("gpencil.draw", "mode", 'ERASER', text="Eraser")
 		
 		col = layout.column(align=True)
 		col.itemL(text="Repeat:")

Modified: trunk/blender/source/blender/windowmanager/intern/wm_keymap.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_keymap.c	2009-10-25 00:24:56 UTC (rev 24073)
+++ trunk/blender/source/blender/windowmanager/intern/wm_keymap.c	2009-10-25 03:47:14 UTC (rev 24074)
@@ -306,6 +306,11 @@
 
 	if(kmi->oskey)
 		strcat(buf, "Cmd ");
+		
+	if(kmi->keymodifier) {
+		strcat(buf, WM_key_event_string(kmi->keymodifier));
+		strcat(buf, " ");
+	}
 
 	strcat(buf, WM_key_event_string(kmi->type));
 	BLI_strncpy(str, buf, len);





More information about the Bf-blender-cvs mailing list