From 9441c640c82a7eb07822c0349882f0f3f9d4d896 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 22 Oct 2020 21:15:25 +0200 Subject: Fix T81934: Painting/Sculpting in ortho fails to let strokes pass through clipped geometry Caused by rB7878adf49cff. When getting the stroke location via raycast in ortho view, the above commit flipped the condition of the check to perform adjustments on the rays start/end. This would thus happen (even though it shouldnt), resulting in wrong depth and stroke location. Now just flip the condition back, so adjustments only happen when clipping is OFF. Maniphest Tasks: T81934 Differential Revision: https://developer.blender.org/D9318 --- source/blender/editors/sculpt_paint/sculpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index adc62b23559..ae0d43bcf5c 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -7186,7 +7186,7 @@ float SCULPT_raycast_init(ViewContext *vc, if ((rv3d->is_persp == false) && /* If the ray is clipped, don't adjust its start/end. */ - RV3D_CLIPPING_ENABLED(v3d, rv3d)) { + !RV3D_CLIPPING_ENABLED(v3d, rv3d)) { BKE_pbvh_raycast_project_ray_root(ob->sculpt->pbvh, original, ray_start, ray_end, ray_normal); /* rRecalculate the normal. */ -- cgit v1.2.3