Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKdaf <Kdaf>2021-02-24 21:27:25 +0300
committerHans Goudey <h.goudey@me.com>2021-02-24 21:27:25 +0300
commite8a99dda25813aa54497c816bb2f918ce0bdc826 (patch)
treedc920cfc2dad657fd098921c204a9ecb8853eb9f
parent5dd176cde8aa04132e9ffaa02c95ccf1022bc217 (diff)
Fix T84796: Particle tool properties displayed for select tool
When using particle mode, the particle tool settings were always displayed, even if select/cursor is the active tool. This patch hides the properties of the particle tools for non-brush tools, using the same check as in other modes. Differential Revision: https://developer.blender.org/D10266
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 257b9edf4e8..a469973c28f 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -333,6 +333,17 @@ class VIEW3D_PT_tools_particlemode(Panel, View3DPaintPanel):
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
+ from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
+ tool_context = ToolSelectPanelHelper.tool_active_from_context(context)
+
+ if not tool_context:
+ # If there is no active tool, then there can't be an active brush.
+ tool = None
+
+ if not tool_context.has_datablock:
+ # tool.has_datablock is always true for tools that use brushes.
+ tool = None
+
if tool is not None:
col = layout.column()
col.prop(brush, "size", slider=True)