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:
authormano-wii <germano.costa@ig.com.br>2019-10-31 20:09:53 +0300
committermano-wii <germano.costa@ig.com.br>2019-10-31 20:09:53 +0300
commit44d67b6dc8b973dd924ef8b8d1177d650f559790 (patch)
treee6f4d8d78b2dd8a22e0ef666dfa045d0935862ad /source/blender/editors/transform/transform_snap.c
parent3c32c5c2ddd04ef826d58bc3f8dd3f4420adeb73 (diff)
Transform: Add option to exclude back facing geometry from snapping
Add new `Backface Culling` option to the snapping properties. This option has nothing to do with the view3d display or the workbench `Backface Culling` option. Limitation: - In edit mode, this option only affects snap to faces. Maniphest Tasks: T71217 Differential Revision: https://developer.blender.org/D6155
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r--source/blender/editors/transform/transform_snap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index a66e76abc58..15208c1a7d2 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -379,6 +379,8 @@ void applyProject(TransInfo *t)
.snap_select = t->tsnap.modeSelect,
.use_object_edit_cage = (t->flag & T_EDIT) != 0,
.use_occlusion_test = false,
+ .use_backface_culling = (t->scene->toolsettings->snap_flag &
+ SCE_SNAP_BACKFACE_CULLING) != 0,
},
mval_fl,
NULL,
@@ -1364,6 +1366,8 @@ short snapObjectsTransform(
.snap_select = t->tsnap.modeSelect,
.use_object_edit_cage = (t->flag & T_EDIT) != 0,
.use_occlusion_test = t->scene->toolsettings->snap_mode != SCE_SNAP_MODE_FACE,
+ .use_backface_culling = (t->scene->toolsettings->snap_flag &
+ SCE_SNAP_BACKFACE_CULLING) != 0,
},
mval,
t->tsnap.snapTarget,