Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-04-05 16:48:28 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-04-05 16:48:37 +0300
commit44c76e4ce31052501706d9d10850f3d41a5b3fcc (patch)
tree76334c81e044c0604aee836ad99b2552b91f14a1 /source/blender/editors/curve
parent50782df42586a5a038cad11530714371edaa5cd4 (diff)
3D View Utils: Add 'margin' parameter to 'ED_view3d_depth_read_cached'
Matches the alternative function ED_view3d_autodist_depth, but is more efficient since it uses the cache. No functional changes.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve_paint.c4
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;