Snap system: Adds support to Clip Planes and uses a clip plane to simulate occlusion
authorGermano <germano.costa@ig.com.br>
Wed, 16 May 2018 13:31:27 +0000 (10:31 -0300)
committerGermano <germano.costa@ig.com.br>
Wed, 16 May 2018 13:32:54 +0000 (10:32 -0300)
commit2ba0951e5219aa82f3e5c00890512c8ba8889c9d
treeacd176a0ba6517a56cdf70941925fa1ee43985d4
parent6a4ba9133ce7937fb90902372302cad0f424e6d7
Snap system: Adds support to Clip Planes and uses a clip plane to simulate occlusion

This patch adds support for clip_planes (ie ignore what is behind a face)...

The idea is to first execute a raycast to get the polygon to which the mouse cursor points.
Then a snap test is done on the vertices or edges of the polygon.
Then with the normal and location obtained in raycast a new clip_plane is created and the snap over the whole scene is processed ignoring the elements behind the clip_plane.

Here 2 gif of how the previous patch would work on blender2.79:

{F497176}

{F497177}

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Subscribers: bliblubli

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D2527
source/blender/blenlib/BLI_kdopbvh.h
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/transform/transform_snap_object.c