Commit: 64ee6f4e9f31d991ee83c77c428736b9c4e81b59
Author: Germano
Date: Fri May 25 18:43:38 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB64ee6f4e9f31d991ee83c77c428736b9c4e81b59
Fix error when snapping with occlusion.
Face normal may be facing the wrong side.
===================================================================
M source/blender/editors/transform/transform_snap_object.c
===================================================================
diff --git a/source/blender/editors/transform/transform_snap_object.c
b/source/blender/editors/transform/transform_snap_object.c
index 2b95c0fcc41..29497fe801c 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -2513,6 +2513,10 @@ static short
transform_snap_context_project_view3d_mixed_impl(
/* Compute the new clip_pane but do not add it yet. */
float new_clipplane[4];
plane_from_point_normal_v3(new_clipplane, loc, no);
+ if (dot_v3v3(snapdata.clip_plane[0], new_clipplane) >
0.0f) {
+ /* The plane is facing the wrong direction. */
+ negate_v4(new_clipplane);
+ }
/* Try to snap only to the polygon. */
elem = snap_mesh_polygon(
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs