[Bf-blender-cvs] [cb2aca5] pie-menus: Add icons for a few items in the menus.

Antony Riakiotakis noreply at git.blender.org
Tue Jun 17 01:59:17 CEST 2014


Commit: cb2aca58339bebea090b780db6d46478523a7c86
Author: Antony Riakiotakis
Date:   Tue Jun 17 02:50:08 2014 +0300
https://developer.blender.org/rBcb2aca58339bebea090b780db6d46478523a7c86

Add icons for a few items in the menus.

Change edit mode selection to pie menu

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/mesh/mesh_ops.c
M	source/blender/editors/space_view3d/view3d_edit.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index cfa5c32..f6ce373 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1419,7 +1419,7 @@ class VIEW3D_PIE_view(Menu):
 
         pie = layout.menu_pie()
         pie.operator_enum("VIEW3D_OT_viewnumpad", "type")
-        pie.operator("VIEW3D_OT_view_persportho")
+        pie.operator("VIEW3D_OT_view_persportho", text="Persp/Ortho", icon='RESTRICT_VIEW_OFF')
 
 class VIEW3D_PIE_shade(Menu):
     bl_label = "Shade"
@@ -2134,9 +2134,10 @@ class VIEW3D_MT_edit_mesh_select_mode(Menu):
         layout = self.layout
 
         layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("mesh.select_mode", text="Vertex", icon='VERTEXSEL').type = 'VERT'
-        layout.operator("mesh.select_mode", text="Edge", icon='EDGESEL').type = 'EDGE'
-        layout.operator("mesh.select_mode", text="Face", icon='FACESEL').type = 'FACE'
+        pie = layout.menu_pie()
+        pie.operator("mesh.select_mode", text="Vertex", icon='VERTEXSEL').type = 'VERT'
+        pie.operator("mesh.select_mode", text="Edge", icon='EDGESEL').type = 'EDGE'
+        pie.operator("mesh.select_mode", text="Face", icon='FACESEL').type = 'FACE'
 
 
 class VIEW3D_MT_edit_mesh_extrude(Menu):
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 0f65ed2..1398bd9 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -343,7 +343,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
 	WM_keymap_add_item(keymap, "MESH_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0);
 	
 	/* selection mode */
-	WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_select_mode", TABKEY, KM_PRESS, KM_CTRL, 0);
+	WM_keymap_add_pie_menu(keymap, "VIEW3D_MT_edit_mesh_select_mode", TABKEY, KM_PRESS, KM_CTRL, 0);
 	
 	/* hide */
 	kmi = WM_keymap_add_item(keymap, "MESH_OT_hide", HKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 23ae87d..c8efe9c 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -77,6 +77,7 @@
 #include "ED_view3d.h"
 #include "ED_sculpt.h"
 
+#include "UI_resources.h"
 
 #include "PIL_time.h" /* smoothview */
 
@@ -3479,7 +3480,7 @@ static EnumPropertyItem prop_view_items[] = {
     {RV3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"},
     {RV3D_VIEW_FRONT, "FRONT", 0, "Front", "View From the Front"},
 	{RV3D_VIEW_BACK, "BACK", 0, "Back", "View From the Back"},
-	{RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the Active Camera"},
+	{RV3D_VIEW_CAMERA, "CAMERA", ICON_CAMERA_DATA, "Camera", "View From the Active Camera"},
 	{0, NULL, 0, NULL, NULL}
 };




More information about the Bf-blender-cvs mailing list