[Bf-blender-cvs] [3767c012695] blender2.8: Fix issue w/ recent tool name use

Campbell Barton noreply at git.blender.org
Sun May 13 18:40:21 CEST 2018


Commit: 3767c0126953d252d3ce2e8dad3b695f94499aed
Author: Campbell Barton
Date:   Sun May 13 18:39:15 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3767c0126953d252d3ce2e8dad3b695f94499aed

Fix issue w/ recent tool name use

Use the context space type, not the workspace.
Broke setting tools for the first time.

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

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

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

diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 84c9b57f590..ed683bcc312 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -257,8 +257,7 @@ class ToolSelectPanelHelper:
         """
         Return the active Python tool definition and index (if in sub-group, else -1).
         """
-        workspace = context.workspace
-        cls = ToolSelectPanelHelper._tool_class_from_space_type(workspace.tool_space_type)
+        cls = ToolSelectPanelHelper._tool_class_from_space_type(context.space_data.type)
         if cls is not None:
             context_mode = context.mode
             for item, index in ToolSelectPanelHelper._tools_flatten_with_tool_index(cls.tools_from_context(context)):



More information about the Bf-blender-cvs mailing list