From 3378782eeeb55a6ed64dba479e37f8b98fab63b1 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sat, 7 Jul 2018 18:39:45 +0300 Subject: 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 --- release/scripts/startup/bl_ui/properties_constraint.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_constraint.py') diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index 76b87a9011d..c76f3255d97 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -748,6 +748,9 @@ class ConstraintButtonsPanel: layout.prop(con, "distance") layout.prop(con, "shrinkwrap_type") + if con.shrinkwrap_type in {'PROJECT', 'NEAREST_SURFACE'}: + layout.prop(con, 'wrap_mode', text="Snap Mode") + if con.shrinkwrap_type == 'PROJECT': row = layout.row(align=True) row.prop(con, "project_axis", expand=True) -- cgit v1.2.3