diff options
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 6342076df34..8842274e017 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -206,7 +206,9 @@ static bool stroke_elem_project(const struct CurveDrawData *cdd, else { const ViewDepths *depths = rv3d->depths; if (depths && ((uint)mval_i[0] < depths->w) && ((uint)mval_i[1] < depths->h)) { - const double depth = (double)ED_view3d_depth_read_cached(&cdd->vc, mval_i); + float depth_fl = 1.0f; + 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)) { is_location_world_set = true; |