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>2019-11-21 00:12:32 +0300
committerHans Goudey <h.goudey@me.com>2019-11-21 00:25:28 +0300
commitba1e9ae4733ae956331c7e8899f6939997205298 (patch)
tree007362ed2c9ee4564b67404f552906d6e66848db /release
parent8c6ce742391b2b8798143a4a2c2224ebbeb7f1ec (diff)
Bevel: Custom Profile and CurveProfile Widget
Custom profiles in bevel allows the profile curve to be controlled by manually placed control points. Orientation is regularized along groups of edges, and the 'pipe case' is updated. This commit includes many updates to comments and changed variable names as well. A 'cutoff' vertex mesh method is added to bevel in addition to the existing grid fill option for replacing vertices. The UI of the bevel modifier and tool are updated and unified. Also, a 'CurveProfile' widget is added to BKE for defining the profile in the interface, which may be useful in other situations. Many thanks to Howard, my mentor for this GSoC project. Reviewers: howardt, campbellbarton Differential Revision: https://developer.blender.org/D5516
Diffstat (limited to 'release')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py48
2 files changed, 32 insertions, 18 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index b2ce3c8e608..f86b017806f 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -4680,6 +4680,8 @@ def km_bevel_modal_map(_params):
("MARK_SHARP_TOGGLE", {"type": 'K', "value": 'PRESS', "any": True}, None),
("OUTER_MITER_CHANGE", {"type": 'O', "value": 'PRESS', "any": True}, None),
("INNER_MITER_CHANGE", {"type": 'I', "value": 'PRESS', "any": True}, None),
+ ("CUSTOM_PROFILE_TOGGLE", {"type": 'Z', "value": 'PRESS', "any": True}, None),
+ ("VERTEX_MESH_CHANGE", {"type": 'N', "value": 'PRESS', "any": True}, None),
])
return keymap
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 05e8f0fce38..f576a29a783 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -133,43 +133,55 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.prop(md, "end_cap")
def BEVEL(self, layout, ob, md):
- split = layout.split()
-
- col = split.column()
- if md.offset_type == 'PERCENT':
- col.prop(md, "width_pct")
+ offset_type = md.offset_type
+ if offset_type == 'PERCENT':
+ layout.prop(md, "width_pct")
else:
- col.prop(md, "width")
- col.prop(md, "segments")
- col.prop(md, "profile")
- col.prop(md, "material")
+ offset_text = "Width"
+ if offset_type == 'DEPTH':
+ offset_text = "Depth"
+ elif offset_type == 'OFFSET':
+ offset_text = "Offset"
+ layout.prop(md, "width", text=offset_text)
+ layout.row().prop(md, "offset_type", expand=True)
+ split = layout.split()
col = split.column()
col.prop(md, "use_only_vertices")
col.prop(md, "use_clamp_overlap")
col.prop(md, "loop_slide")
+ col = split.column()
col.prop(md, "mark_seam")
col.prop(md, "mark_sharp")
col.prop(md, "harden_normals")
+ layout.row().prop(md, "segments")
+ layout.row().prop(md, "profile")
+ layout.row().prop(md, "material")
+
+ layout.label(text="Miter Type:")
+ layout.row().prop(md, "miter_outer", text="Outer")
+ layout.row().prop(md, "miter_inner", text="Inner")
+ if md.miter_inner in {'MITER_PATCH', 'MITER_ARC'}:
+ layout.row().prop(md, "spread")
+
layout.label(text="Limit Method:")
layout.row().prop(md, "limit_method", expand=True)
if md.limit_method == 'ANGLE':
layout.prop(md, "angle_limit")
elif md.limit_method == 'VGROUP':
- layout.label(text="Vertex Group:")
layout.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
- layout.label(text="Width Method:")
- layout.row().prop(md, "offset_type", expand=True)
-
- layout.label(text="Set Face Strength Mode")
+ layout.label(text="Face Strength Mode:")
layout.row().prop(md, "face_strength_mode", expand=True)
- layout.label(text="Miter Patterns")
- layout.row().prop(md, "miter_outer")
- layout.row().prop(md, "miter_inner")
- layout.row().prop(md, "spread")
+ layout.label(text="Intersection Type:")
+ layout.row().prop(md, "vmesh_method", expand=True)
+ layout.row().prop(md, "use_custom_profile")
+ row = layout.row()
+ row.enabled = md.use_custom_profile
+ if md.use_custom_profile:
+ layout.template_curveprofile(md, "custom_profile")
def BOOLEAN(self, layout, _ob, md):
split = layout.split()