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:
authorCody Winchester <CodyWinch>2020-03-27 14:20:31 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-03-27 14:25:37 +0300
commit6e505a45a1167537e7628e3feb31893cf8898ec8 (patch)
tree4f900dd748ebfe656a2a942e8a9ee5bb4eaed429 /release
parent1bb7d42cf660c15fe827623aa98fd96155c8c9c6 (diff)
Surface Deform modifier: add vertex group and strength control.
This commit aims to add functionality to the surface deform modifier that gives more control and allows it to work better with the modifier stack. * Maintains compatibility with older files. The default settings keep it so that the whole object is bound and vertex coordinates get overwritten as the modifier currently does. * Turns the deformations from an absolute vertex coordinate overwrite into an additive offset from the vertex location before the modifier to the resulting bound deformation. This gives the ability to control the strength of the deformation and mix the deformation of the modifier with the modifier stack that comes before it. * Also adds in a vertex group with the invert option. This is applied after the bind deformation is added. So the whole object is still bound to target, and the vertex group filters afterwards what parts get affected. I experimented with a version to only binds the geometry weighted to the vertex group, but that would break compatibility with old files. I may bring it in later as a separate option/mode for the surface deform. With several fixes from @mont29. Reviewed By: mont29 Differencial Revision: https://developer.blender.org/D6894
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 4a213c3528e..e5ea1a94945 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1141,13 +1141,24 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.label(text="Settings are inside the Physics tab")
def SURFACE_DEFORM(self, layout, _ob, md):
- col = layout.column()
+ split = layout.split()
+ col = split.column()
col.active = not md.is_bound
- col.prop(md, "target")
- col.prop(md, "falloff")
+ col.label(text="Target:")
+ col.prop(md, "target", text="")
- layout.separator()
+ col = split.column()
+ col.label(text="Vertex Group:")
+ row = col.row(align=True)
+ row.prop_search(md, "vertex_group", _ob, "vertex_groups", text="")
+ row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
+
+ split = layout.split()
+ col = split.column()
+ col.prop(md, "falloff")
+ col = split.column()
+ col.prop(md, "strength")
col = layout.column()