[Bf-blender-cvs] [67dda3611fd] blender2.8: UI: use icons for orientation types

Campbell Barton noreply at git.blender.org
Sat May 12 19:03:50 CEST 2018


Commit: 67dda3611fda6ddf3e23b7d5d252bccc6284721d
Author: Campbell Barton
Date:   Sat May 12 19:02:38 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB67dda3611fda6ddf3e23b7d5d252bccc6284721d

UI: use icons for orientation types

See: T55038

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

M	release/scripts/startup/bl_ui/space_topbar.py
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 9c98df00850..a0a4aae7dbb 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -196,7 +196,7 @@ class TOPBAR_HT_lower_bar(Header):
 
         # 3D View Options, tsk. maybe users aren't always using 3D view?
         scene = context.scene
-        layout.prop(scene, "transform_orientation", text="", icon='MANIPUL')
+        layout.prop(scene, "transform_orientation", text="")
 
         # Command Settings (redo)
         op = context.active_operator
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index d7aa544fd37..aac91fd806b 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -438,15 +438,16 @@ static const EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = {
 
 #endif
 
+/* Icons could be made a consistent set of images. */
 static const EnumPropertyItem transform_orientation_items[] = {
-	{V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"},
-	{V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"},
-	{V3D_MANIP_NORMAL, "NORMAL", 0, "Normal",
+	{V3D_MANIP_GLOBAL, "GLOBAL", ICON_SCENE_DATA, "Global", "Align the transformation axes to world space"},
+	{V3D_MANIP_LOCAL, "LOCAL", ICON_MANIPUL, "Local", "Align the transformation axes to the selected objects' local space"},
+	{V3D_MANIP_NORMAL, "NORMAL", ICON_SNAP_NORMAL, "Normal",
 	                   "Align the transformation axes to average normal of selected elements "
 	                   "(bone Y axis for pose mode)"},
-	{V3D_MANIP_GIMBAL, "GIMBAL", 0, "Gimbal", "Align each axis to the Euler rotation axis as used for input"},
-	{V3D_MANIP_VIEW, "VIEW", 0, "View", "Align the transformation axes to the window"},
-	{V3D_MANIP_CURSOR, "CURSOR", 0, "Cursor", "Align the transformation axes to the 3D cursor"},
+	{V3D_MANIP_GIMBAL, "GIMBAL", ICON_NDOF_DOM, "Gimbal", "Align each axis to the Euler rotation axis as used for input"},
+	{V3D_MANIP_VIEW, "VIEW", ICON_VISIBLE_IPO_ON, "View", "Align the transformation axes to the window"},
+	{V3D_MANIP_CURSOR, "CURSOR", ICON_CURSOR, "Cursor", "Align the transformation axes to the 3D cursor"},
 	// {V3D_MANIP_CUSTOM, "CUSTOM", 0, "Custom", "Use a custom transform orientation"},
 	{0, NULL, 0, NULL, NULL}
 };



More information about the Bf-blender-cvs mailing list