diff options
author | Hans Goudey <h.goudey@me.com> | 2020-07-21 23:32:00 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-07-21 23:32:00 +0300 |
commit | 4aa2a5481cec4edc4694ee1edbde4ed3f3986313 (patch) | |
tree | 0dd39e7392e62963a2bcb7d82249e9c84e032fb2 /release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | |
parent | a39da2cbca19102589d5141c80a6bc013bd4c963 (diff) |
Bevel: Refactor "Vertex Only" to an enum
This matches the change that was done to the bevel modifier so that the
interface for the modifier, the active tool, and the operator are consistent.
This commit extends the refactor to the bmesh implementation too, so
that the parameters in the implementation don't stray too far from what
is exposed.
Tests are adjusted and still pass.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_toolbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index ce48b92c419..2b35eb15cdc 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -744,10 +744,14 @@ class _defs_edit_mesh: region_is_header = context.region.type == 'TOOL_HEADER' + edge_bevel = props.affect == 'EDGES' + if not extra: if region_is_header: layout.prop(props, "offset_type", text="") else: + layout.row().prop(props, "affect", expand=True) + layout.prop(props, "offset_type") layout.prop(props, "segments") @@ -766,25 +770,33 @@ class _defs_edit_mesh: layout.use_property_split = True layout.use_property_decorate = False + if region_is_header: + layout.row().prop(props, "affect", expand=True) + if props.profile_type == 'CUSTOM': - layout.prop(props, "profile", text="Miter Shape", slider=True) + col = layout.column() + col.active = edge_bevel + col.prop(props, "profile", text="Miter Shape", slider=True) + + layout.prop(props, "material") col = layout.column() - col.prop(props, "vertex_only") + col.prop(props, "harden_normals") col.prop(props, "clamp_overlap") col.prop(props, "loop_slide") - col.prop(props, "harden_normals") col = layout.column(heading="Mark") + col.active = edge_bevel col.prop(props, "mark_seam", text="Seam") col.prop(props, "mark_sharp", text="Sharp") - layout.prop(props, "material") - layout.prop(props, "miter_outer", text="Outer Miter") - layout.prop(props, "miter_inner", text="Inner Miter") + col = layout.column() + col.active = edge_bevel + col.prop(props, "miter_outer", text="Miter Outer") + col.prop(props, "miter_inner", text="Inner") if props.miter_inner == 'ARC': - layout.prop(props, "spread") + col.prop(props, "spread") if props.profile_type == 'CUSTOM': tool_settings = context.tool_settings |