Implement additional modes for Shrinkwrap to a surface.
In addition to the original map to surface and Keep Above Surface, add modes that only affect vertices that are inside or outside the object. This is inspired by the Limit Distance constraint, and can be useful for crude collision detection in rigs. The inside/outside test works based on face normals and may not be completely reliable near 90 degree or sharper angles in the target. Reviewers: campbellbarton, mont29 Differential Revision: https://developer.blender.org/D3717
This commit is contained in:
@@ -825,6 +825,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
col.label(text="Mode:")
|
||||
col.prop(md, "wrap_method", text="")
|
||||
|
||||
if md.wrap_method in {'PROJECT', 'NEAREST_SURFACEPOINT'}:
|
||||
col.prop(md, "wrap_mode", text="")
|
||||
|
||||
if md.wrap_method == 'PROJECT':
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
@@ -851,9 +854,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
|
||||
layout.prop(md, "auxiliary_target")
|
||||
|
||||
elif md.wrap_method == 'NEAREST_SURFACEPOINT':
|
||||
layout.prop(md, "use_keep_above_surface")
|
||||
|
||||
def SIMPLE_DEFORM(self, layout, ob, md):
|
||||
|
||||
layout.row().prop(md, "deform_method", expand=True)
|
||||
|
||||
Reference in New Issue
Block a user