[Bf-blender-cvs] [4eb3b3ce905] greasepencil-object: Fix Paint mode icons

Antonio Vazquez noreply at git.blender.org
Thu Jul 19 21:21:11 CEST 2018


Commit: 4eb3b3ce905f723a8b4c55a7011a7c3d52ecea43
Author: Antonio Vazquez
Date:   Thu Jul 19 21:21:00 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB4eb3b3ce905f723a8b4c55a7011a7c3d52ecea43

Fix Paint mode icons

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

R100	release/datafiles/icons/brush.gpencil.draw.eraser_line.dat	release/datafiles/icons/brush.gpencil.draw.eraser_stroke.dat
M	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
M	source/blender/editors/datafiles/CMakeLists.txt

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

diff --git a/release/datafiles/icons/brush.gpencil.draw.eraser_line.dat b/release/datafiles/icons/brush.gpencil.draw.eraser_stroke.dat
similarity index 100%
rename from release/datafiles/icons/brush.gpencil.draw.eraser_line.dat
rename to release/datafiles/icons/brush.gpencil.draw.eraser_stroke.dat
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 10d821eb0dc..ca276d978ed 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -65,18 +65,22 @@ def generate_from_brushes_ex(
                 name = brush.name
                 if name.startswith("Draw "):
                     text = name.replace("Draw ", "")
+                    icon_name = brush.name.lower().replace(" ", "_")
                 elif name.startswith("Eraser "):
                     text = name.replace("Eraser ", "")
+                    icon_name = "draw." + brush.name.lower().replace(" ", "_")
                 elif name.startswith("Fill "):
                     text = name.replace(" Area", "")
+                    icon_name = "draw_fill"
                 else:
                     text = name
+                    icon_name = "draw_pencil"
 
                 brush_categories.setdefault(category, []).append(
                     ToolDef.from_dict(
                         dict(
                             text=text,
-                            icon=icon_prefix + category.lower().replace(" ", "_"),
+                            icon=icon_prefix + icon_name,
                             data_block=name,
                             widget=None,
                             operator="gpencil.draw",
@@ -1038,8 +1042,8 @@ class _defs_gpencil_paint:
             brush_test_attr="use_paint_grease_pencil",
             brush_category_attr="grease_pencil_tool",
             brush_category_layout=(
-                ('Draw Pencil',),
-                ('Draw Pen',),
+                ('Draw Pencil', ),
+                ('Draw Pen', ),
                 ('Draw Ink',),
                 ('Draw Noise',),
                 ('Draw Block',),
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index 89703f8ba7f..03cd74e3540 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -537,8 +537,8 @@ set(ICON_NAMES
 set_property(GLOBAL PROPERTY ICON_GEOM_NAMES
 	# BEGIN ICON_GEOM_NAMES
 	brush.gpencil.draw.eraser_hard
-	brush.gpencil.draw.eraser_line
 	brush.gpencil.draw.eraser_soft
+	brush.gpencil.draw.eraser_stroke
 	brush.gpencil.draw_block
 	brush.gpencil.draw_fill
 	brush.gpencil.draw_ink



More information about the Bf-blender-cvs mailing list