Shrinkwrap Constraint: implement projection features from the modifier.

Allow raycasting in two directions and culling front or back faces.

Also implement a new Invert Cull option in both constraint and
modifier that can be used to aim for faces aligned with the project
axis direction when raycasting both ways.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3737
This commit is contained in:
Alexander Gavrilov
2018-07-08 13:47:26 +03:00
parent be0e58d980
commit e38a0b3748
8 changed files with 106 additions and 9 deletions

View File

@@ -758,6 +758,15 @@ class ConstraintButtonsPanel:
split.label(text="Axis Space:")
rowsub = split.row()
rowsub.prop(con, "project_axis_space", text="")
split = layout.split(factor=0.4)
split.label(text="Face Culling:")
rowsub = split.row()
rowsub.prop(con, "cull_face", expand=True)
row = layout.row()
row.prop(con, "use_project_opposite")
rowsub = row.row()
rowsub.active = con.use_project_opposite and con.cull_face != 'OFF'
rowsub.prop(con, "use_invert_cull")
layout.prop(con, "project_limit")
def DAMPED_TRACK(self, context, layout, con):