[Bf-blender-cvs] [70673c6a6b4] temp-dynamic-overrides: Fix issue w/ recent tool name use

Campbell Barton noreply at git.blender.org
Sun May 13 19:14:40 CEST 2018


Commit: 70673c6a6b45f2e6de07305b0b5d8b73ec784b44
Author: Campbell Barton
Date:   Sun May 13 18:39:15 2018 +0200
Branches: temp-dynamic-overrides
https://developer.blender.org/rB70673c6a6b45f2e6de07305b0b5d8b73ec784b44

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