Fix T46148: Sculpt view-clip fails in ortho mode

This commit is contained in:
Campbell Barton 2015-09-18 15:29:49 +10:00
parent 276732ee62
commit f7239e9084
Notes: blender-bot 2023-02-14 08:39:17 +01:00
Referenced by issue #46148, sculpt fails on clipping mode (fixed)
1 changed files with 4 additions and 1 deletions

View File

@ -4217,7 +4217,10 @@ static float sculpt_raycast_init(ViewContext *vc, const float mouse[2], float ra
sub_v3_v3v3(ray_normal, ray_end, ray_start);
dist = normalize_v3(ray_normal);
if (!rv3d->is_persp) {
if ((rv3d->is_persp == false) &&
/* if the ray is clipped, don't adjust its start/end */
((rv3d->rflag & RV3D_CLIPPING) == 0))
{
BKE_pbvh_raycast_project_ray_root(ob->sculpt->pbvh, original, ray_start, ray_end, ray_normal);
/* recalculate the normal */