diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-02 23:17:50 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-02 23:18:07 +0300 |
commit | 545b9ddc34da54a04f50e40cd0993ee88c4d56de (patch) | |
tree | 4b4e6e3314a5f4f9b817431dac229f0832aa5053 | |
parent | 049e42ef20cf1e45c9f8207de90502a071a95a8e (diff) |
Cleanup: Simplify curves toolbar drawing logic
Use `elif` to clarify that only one case happens.
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b7fe715ca90..80ea33f8a75 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -510,30 +510,27 @@ class _draw_tool_settings_context_mode: header=True, ) - if brush.curves_sculpt_tool == 'COMB': + curves_tool = brush.curves_sculpt_tool + + if curves_tool == 'COMB': layout.prop(brush, "falloff_shape", expand=True) layout.popover("VIEW3D_PT_tools_brush_falloff") - - if brush.curves_sculpt_tool == 'ADD': + elif curves_tool == 'ADD': layout.prop(brush, "falloff_shape", expand=True) layout.prop(brush.curves_sculpt_settings, "add_amount") layout.popover("VIEW3D_PT_curves_sculpt_add_shape", text="Curve Shape") layout.prop(brush, "use_frontface", text="Front Faces Only") - - if brush.curves_sculpt_tool == 'GROW_SHRINK': + elif curves_tool == 'GROW_SHRINK': layout.prop(brush, "direction", expand=True, text="") layout.prop(brush, "falloff_shape", expand=True) layout.popover("VIEW3D_PT_curves_sculpt_grow_shrink_scaling", text="Scaling") layout.popover("VIEW3D_PT_tools_brush_falloff") - - if brush.curves_sculpt_tool == 'SNAKE_HOOK': + elif curves_tool == 'SNAKE_HOOK': layout.prop(brush, "falloff_shape", expand=True) layout.popover("VIEW3D_PT_tools_brush_falloff") - - if brush.curves_sculpt_tool == 'DELETE': + elif curves_tool == 'DELETE': layout.prop(brush, "falloff_shape", expand=True) - - if brush.curves_sculpt_tool == 'SELECTION_PAINT': + elif curves_tool == 'SELECTION_PAINT': layout.prop(brush, "direction", expand=True, text="") layout.prop(brush, "falloff_shape", expand=True) layout.popover("VIEW3D_PT_tools_brush_falloff") |