diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-20 09:07:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-20 09:15:18 +0300 |
commit | 1501c3adad13c3b0ae4f02a84f1be2c84f6f1db2 (patch) | |
tree | a259123829ce56c09996901b09fc9ddd4bce284a /source/blender/editors/include/ED_view3d.h | |
parent | a8f4affb2ead7f49996f54a8e6a14be5a48db785 (diff) |
Add Object Tool: support placing objects in orthographic axis views
When an projecting onto a plane that is orthogonal to the views Z axis,
project onto a view aligned axis then map it back to the original plane.
see: ED_view3d_win_to_3d_on_plane_with_fallback
Since the depth can't be properly visualized in 3D, display a 2D so
it's possible to to tell the depth from the cursor motion.
Diffstat (limited to 'source/blender/editors/include/ED_view3d.h')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index e8aa312f444..596533406c3 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -364,6 +364,12 @@ bool ED_view3d_win_to_3d_on_plane(const struct ARegion *region, const float mval[2], const bool do_clip, float r_out[3]); +bool ED_view3d_win_to_3d_on_plane_with_fallback(const struct ARegion *region, + const float plane[4], + const float mval[2], + const bool do_clip, + const float plane_fallback[4], + float r_out[3]); bool ED_view3d_win_to_3d_on_plane_int(const struct ARegion *region, const float plane[4], const int mval[2], |