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:
authorHans Goudey <h.goudey@me.com>2020-06-23 05:25:55 +0300
committerHans Goudey <h.goudey@me.com>2020-06-23 05:25:55 +0300
commit6703c7f7f1f68ae59f9ccbf4fcabc3c035d648bf (patch)
treebf5def93b54ba810bbaef693ecc79d81e97e635b /release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
parent716a8241d387180fd8ad69cdec33633bc7a0f963 (diff)
Bevel: Refactor profile type input to use an enum
This will allow the easier addition of a constant radius mode in the future and some changes in the UI to mirror the recent similar change from "Only Vertices" to the "Affect" enum.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_toolsystem_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 9f26abec805..bfd5be8862d 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -747,18 +747,30 @@ class _defs_edit_mesh:
layout.prop(props, "offset_type")
layout.prop(props, "segments")
- layout.prop(props, "profile", slider=True)
+
+ row = layout.row()
+ row.prop(props, "profile_type", expand=True)
+ if props.profile_type == 'SUPERELLIPSE':
+ layout.prop(props, "profile", text="Shape", slider=True)
if region_type == 'TOOL_HEADER':
layout.popover("TOPBAR_PT_tool_settings_extra", text="...")
else:
extra = True
- if extra or region_type != 'TOOL_HEADER':
- layout.prop(props, "vertex_only")
- layout.prop(props, "clamp_overlap")
- layout.prop(props, "loop_slide")
- layout.prop(props, "harden_normals")
+ if extra:
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ if props.profile_type == 'CUSTOM':
+ layout.prop(props, "profile", text="Miter Shape", slider=True)
+
+ col = layout.column()
+ col.prop(props, "vertex_only")
+ col.prop(props, "clamp_overlap")
+ col.prop(props, "loop_slide")
+ col.prop(props, "harden_normals")
+
col = layout.column(heading="Mark")
col.prop(props, "mark_seam", text="Seam")
col.prop(props, "mark_sharp", text="Sharp")
@@ -770,8 +782,7 @@ class _defs_edit_mesh:
if props.miter_inner == 'ARC':
layout.prop(props, "spread")
- layout.prop(props, "use_custom_profile")
- if props.use_custom_profile:
+ if props.profile_type == 'CUSTOM':
tool_settings = context.tool_settings
layout.template_curveprofile(tool_settings, "custom_bevel_profile_preset")