[Bf-blender-cvs] [3b16530aa13] master: UI: Fix incoherent brush size in popover menu and brush settings
Octave C
noreply at git.blender.org
Sun Mar 13 22:45:43 CET 2022
Commit: 3b16530aa13e11d82cc5bb89d956165dc37e71ce
Author: Octave C
Date: Sun Mar 13 17:45:16 2022 -0400
Branches: master
https://developer.blender.org/rB3b16530aa13e11d82cc5bb89d956165dc37e71ce
UI: Fix incoherent brush size in popover menu and brush settings
Previously, the popover menu in sculpt/texture paint mode did not
take into account the `UnifiedBrushSettings` for the unit.
To fix this, the behavior of `class _draw_tool_settings_context_mode` is matched
by checking the same conditions when setting up the UI of the right-click popover menu.
Fixes T81616
Reviewed By: #sculpt_paint_texture, pablodp606
Maniphest Tasks: T81616
Differential Revision: https://developer.blender.org/D9168
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 39269c95b31..61fbabc5c4e 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -7513,13 +7513,20 @@ class VIEW3D_PT_sculpt_context_menu(Panel):
UnifiedPaintPanel.prop_unified_color_picker(split, context, brush, "color", value_slider=True)
layout.prop(brush, "blend", text="")
+ ups = context.tool_settings.unified_paint_settings
+ size = "size"
+ size_owner = ups if ups.use_unified_size else brush
+ if size_owner.use_locked_size == 'SCENE':
+ size = "unprojected_radius"
+
UnifiedPaintPanel.prop_unified(
layout,
context,
brush,
- "size",
+ size,
unified_name="use_unified_size",
pressure_name="use_pressure_size",
+ text="Radius",
slider=True,
)
UnifiedPaintPanel.prop_unified(
More information about the Bf-blender-cvs
mailing list