[Bf-blender-cvs] [652826dc77d] greasepencil-object: Fix broken Tools group by previous commit.

Antonio Vazquez noreply at git.blender.org
Wed Jul 11 15:32:27 CEST 2018


Commit: 652826dc77d5d0c4305c8a0134cf430a607ba649
Author: Antonio Vazquez
Date:   Wed Jul 11 15:30:52 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB652826dc77d5d0c4305c8a0134cf430a607ba649

Fix broken Tools group by previous commit.

The commit f468302660d220b01e838f0d7b70323bd0ff1d33 broke the groups for mesh tools.

This is a temp hack to make the tools work, but need a better solution.

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

M	release/scripts/startup/bl_ui/space_toolsystem_toolbar.py

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

diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 8bb96a4880a..31a0e43e278 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -82,7 +82,14 @@ def generate_from_brushes_ex(
             tool_defs = tuple(brush_categories.pop(groups[0], ()))
         else:
             tool_defs = tuple(item for g in groups for item in brush_categories.pop(g, ()))
-        return tool_defs
+
+        if context.mode != 'GPENCIL_PAINT':
+            if len(tool_defs) > 1:
+                return (tool_defs,)
+            else:
+                return tool_defs
+        else:
+            return tool_defs
 
     # Each item below is a single toolbar entry:
     # Grouped for multiple or none if no brushes are found.



More information about the Bf-blender-cvs mailing list