Page MenuHome

Fix 'ED_view3d_win_to_3d_on_plane'
Needs ReviewPublic

Authored by Germano Cavalcante (mano-wii) on Dec 9 2021, 4:17 AM.

Details

Summary

As noted in rB9a69c456bd85, the do_clip option of
ED_view3d_win_to_3d_on_plane can be misleading since it does not
consider clip_start and clip_end.

This is especially bad for orthographic view since clip_start in this
case is negative.

This patch proposes to retrieve the values of clip_start and clip_end
through winmat and use them to peform a most expected do_clip.

NOTE: Functions that check whether rv3d->is_persp for do_clip can be updated after this.
NOTE: as noted in rBcf6be711e2a0, plane aligned is another thing that should be fixed in ED_view3d_win_to_3d_on_plane

Diff Detail

Repository
rB Blender
Branch
fix_ED_view3d_win_to_3d_on_plane (branched from master)
Build Status
Buildable 19318
Build 19318: arc lint + arc unit