[Bf-blender-cvs] [d9362291f32] PSketch-279: PSculpt UI: Use the icon-based "brush" selector instead of a column of buttons

Joshua Leung noreply at git.blender.org
Tue May 8 18:03:25 CEST 2018


Commit: d9362291f324979ff168e255ad6d060ca3e9c134
Author: Joshua Leung
Date:   Mon Jan 1 01:57:10 2018 +1300
Branches: PSketch-279
https://developer.blender.org/rBd9362291f324979ff168e255ad6d060ca3e9c134

PSculpt UI: Use the icon-based "brush" selector instead of a column of buttons

It currently uses placeholder icons (based on the default set of icons),
so they look a bit nasty, as those icons were never meant to be shown
that large. However, since this list is still liable to change, it's
best to use icons which capture the intent for now, and make some nicer
proper icons later when we have time.

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

M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/makesrna/intern/rna_sculpt_paint.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 4d75b382da0..6e324409768 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -889,7 +889,7 @@ class VIEW3D_PT_tools_posemode_sculpt(View3DPanel, Panel):
         tool = settings.tool
         brush = settings.brush
 
-        layout.column().prop(settings, "tool", expand=True)
+        layout.template_icon_view(settings, "tool", show_labels=True)
 
         layout.separator()
 
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 0882f96d0a3..e1f318c9006 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -1140,27 +1140,28 @@ static void rna_def_gpencil_sculpt(BlenderRNA *brna)
 
 static void rna_def_pose_sculpt(BlenderRNA *brna)
 {
+	/* FIXME: Create dedicated icons */
 	static EnumPropertyItem pose_sculpt_brush_items[] = {
-		{0, "", 0, "Draw:", ""},
-		{PSCULPT_BRUSH_DRAW, "DRAW", 0, "Draw", "Easily sculpt bones into place by drawing over the rig"},
-		{PSCULPT_BRUSH_ADJUST, "ADJUST", 0, "Adjust", "Make small adjustments to the pose using a trackball-like tool"},
-		{PSCULPT_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Reduce orientation differences between bones"},
+		//{0, "", 0, "Draw:", ""},
+		{PSCULPT_BRUSH_DRAW, "DRAW", ICON_ANIM, "Draw", "Easily sculpt bones into place by drawing over the rig"},
+		{PSCULPT_BRUSH_ADJUST, "ADJUST", ICON_HAND, "Adjust", "Make small adjustments to the pose using a trackball-like tool"},
+		{PSCULPT_BRUSH_SMOOTH, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", "Reduce orientation differences between bones"},
 		
-		{0, "", 0, "Transform:", ""},
-		{PSCULPT_BRUSH_GRAB, "GRAB", 0, "Grab", "Move bones around as if affected by a force"},
-		{PSCULPT_BRUSH_PUSH, "PUSH", 0, "Push", "Reshape bendy bones by pushing their segments around"},
-		{PSCULPT_BRUSH_CURL, "CURL", 0, "Curl", "Rotate all bones along some local axis (e.g. finger curling)"},
-		{PSCULPT_BRUSH_TWIST, "TWIST", 0, "Twist", "Roll bones along their main axis"},
-		{PSCULPT_BRUSH_STRETCH, "STRETCH", 0, "Stretch", "Scale bones length-wise"},
+		//{0, "", 0, "Transform:", ""},
+		{PSCULPT_BRUSH_GRAB, "GRAB", ICON_MANIPUL, "Grab", "Move bones around as if affected by a force"},
+		{PSCULPT_BRUSH_PUSH, "PUSH", ICON_STYLUS_PRESSURE, "Push", "Reshape bendy bones by pushing their segments around"},
+		{PSCULPT_BRUSH_CURL, "CURL", ICON_FORCE_VORTEX, "Curl", "Rotate all bones along some local axis (e.g. finger curling)"},
+		{PSCULPT_BRUSH_TWIST, "TWIST", ICON_FORCE_MAGNETIC, "Twist", "Roll bones along their main axis"},
+		{PSCULPT_BRUSH_STRETCH, "STRETCH", ICON_MAN_SCALE, "Stretch", "Scale bones length-wise"},
 	
 #if 0	
 		{0, "", 0, "Distribute:", ""},
 		{PSCULPT_BRUSH_WRAP, "WRAP", 0, "Wrap", "Snap bones to lie on the nearest surface"},
 #endif		
 	
-		{0, "", 0, "Utils:", ""},
-		{PSCULPT_BRUSH_RESET, "RESET", 0, "Reset", "Clear/reset transforms"},
-		{PSCULPT_BRUSH_SELECT, "SELECT", 0, "Select", "Brush-select bones to mask affected area"},
+		//{0, "", 0, "Utils:", ""},
+		{PSCULPT_BRUSH_RESET, "RESET", ICON_RECOVER_LAST, "Reset", "Clear/reset transforms"},
+		{PSCULPT_BRUSH_SELECT, "SELECT", ICON_RESTRICT_SELECT_OFF, "Select", "Brush-select bones to mask affected area"},
 		{0, NULL, 0, NULL, NULL}};
 		
 	static EnumPropertyItem prop_direction_items[]= {



More information about the Bf-blender-cvs mailing list