From 3b16530aa13e11d82cc5bb89d956165dc37e71ce Mon Sep 17 00:00:00 2001 From: Octave C Date: Sun, 13 Mar 2022 17:45:16 -0400 Subject: 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 --- release/scripts/startup/bl_ui/space_view3d.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'release') 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( -- cgit v1.2.3