diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-01 05:49:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-01 05:49:53 +0300 |
commit | f71cf996165a81030a92e3e26610bf2e6fa2fc44 (patch) | |
tree | ba683e74b592256d06f80ca69f181d0e8f95adcd /source/blender/editors/curve/editcurve_paint.c | |
parent | c145cb799897d7db89b1c75dc46fb71c33abfe00 (diff) |
GPU: add 2D projection function
When projecting into screen space Z value isn't always needed.
Add 2D projection functions, renaming them to avoid accidents
happening again.
- Add GPU_matrix_project_2fv
- Add ED_view3d_project_v2
- Rename ED_view3d_project to ED_view3d_project_v3
- Use the 2D versions of these functions when the Z value isn't used.
Diffstat (limited to 'source/blender/editors/curve/editcurve_paint.c')
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 8842274e017..e4f2de1f741 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -210,7 +210,7 @@ static bool stroke_elem_project(const struct CurveDrawData *cdd, ED_view3d_depth_read_cached(depths, mval_i, 0, &depth_fl); const double depth = (double)depth_fl; if ((depth > depths->depth_range[0]) && (depth < depths->depth_range[1])) { - if (ED_view3d_depth_unproject(region, mval_i, depth, r_location_world)) { + if (ED_view3d_depth_unproject_v3(region, mval_i, depth, r_location_world)) { is_location_world_set = true; if (r_normal_world) { zero_v3(r_normal_world); |