diff options
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 1adbbe30286..4c4aa4214b2 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1460,7 +1460,8 @@ static bool point_is_visible(KnifeTool_OpData *kcd, BMFace *f_hit; /* If box clipping on, make sure p is not clipped */ - if (kcd->vc.rv3d->rflag & RV3D_CLIPPING && ED_view3d_clipping_test(kcd->vc.rv3d, p, true)) { + if (RV3D_CLIPPING_ENABLED(kcd->vc.v3d, kcd->vc.rv3d) && + ED_view3d_clipping_test(kcd->vc.rv3d, p, true)) { return false; } @@ -1484,7 +1485,7 @@ static bool point_is_visible(KnifeTool_OpData *kcd, dist = kcd->vc.v3d->clip_end * 2.0f; } - if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) { + if (RV3D_CLIPPING_ENABLED(kcd->vc.v3d, kcd->vc.rv3d)) { float view_clip[2][3]; /* note: view_clip[0] should never get clipped */ copy_v3_v3(view_clip[0], p_ofs); @@ -1935,7 +1936,7 @@ static int knife_sample_screen_density(KnifeTool_OpData *kcd, const float radius dis_sq = len_squared_v2v2(kfv->sco, sco); if (dis_sq < radius_sq) { - if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) { + if (RV3D_CLIPPING_ENABLED(kcd->vc.v3d, kcd->vc.rv3d)) { if (ED_view3d_clipping_test(kcd->vc.rv3d, kfv->cageco, true) == 0) { c++; } @@ -2045,7 +2046,7 @@ static KnifeEdge *knife_find_closest_edge( /* now we have 'lambda' calculated (in screen-space) */ knife_interp_v3_v3v3(kcd, test_cagep, kfe->v1->cageco, kfe->v2->cageco, lambda); - if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) { + if (RV3D_CLIPPING_ENABLED(kcd->vc.v3d, kcd->vc.rv3d)) { /* check we're in the view */ if (ED_view3d_clipping_test(kcd->vc.rv3d, test_cagep, true)) { continue; @@ -2152,7 +2153,7 @@ static KnifeVert *knife_find_closest_vert( dis_sq = len_squared_v2v2(kfv->sco, sco); if (dis_sq < curdis_sq && dis_sq < maxdist_sq) { - if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) { + if (RV3D_CLIPPING_ENABLED(kcd->vc.v3d, kcd->vc.rv3d)) { if (ED_view3d_clipping_test(kcd->vc.rv3d, kfv->cageco, true) == 0) { curv = kfv; curdis_sq = dis_sq; |