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:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_utils.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 8ae5d4a29e9..c7da3378ae3 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -1017,9 +1017,9 @@ static float view_autodist_depth_margin(ARegion *region, const int mval[2], int
}
ViewDepths depth_temp = {0};
- view3d_update_depths_rect(region, &depth_temp, &rect);
+ view3d_depths_rect_create(region, &rect, &depth_temp);
float depth_close = view3d_depth_near(&depth_temp);
- MEM_SAFE_FREE(depth_temp.depths);
+ ED_view3d_depths_free(&depth_temp);
return depth_close;
}
@@ -1044,7 +1044,7 @@ bool ED_view3d_autodist(Depsgraph *depsgraph,
bool depth_ok = false;
/* Get Z Depths, needed for perspective, nice for ortho */
- ED_view3d_depth_override(depsgraph, region, v3d, NULL, V3D_DEPTH_NO_GPENCIL, false);
+ ED_view3d_depth_override(depsgraph, region, v3d, NULL, V3D_DEPTH_NO_GPENCIL, NULL);
/* Attempt with low margin's first */
int i = 0;
@@ -1694,7 +1694,8 @@ bool ED_view3d_depth_read_cached(const ViewDepths *vd,
return false;
}
-bool ED_view3d_depth_read_cached_normal(const ViewContext *vc,
+bool ED_view3d_depth_read_cached_normal(const ARegion *region,
+ const ViewDepths *depths,
const int mval[2],
float r_normal[3])
{
@@ -1705,9 +1706,6 @@ bool ED_view3d_depth_read_cached_normal(const ViewContext *vc,
bool depths_valid[9] = {false};
float coords[9][3] = {{0}};
- ARegion *region = vc->region;
- const ViewDepths *depths = vc->rv3d->depths;
-
for (int x = 0, i = 0; x < 2; x++) {
for (int y = 0; y < 2; y++) {
const int mval_ofs[2] = {mval[0] + (x - 1), mval[1] + (y - 1)};
@@ -1761,11 +1759,4 @@ bool ED_view3d_depth_unproject_v3(const ARegion *region,
return ED_view3d_unproject_v3(region, centx, centy, depth, r_location_world);
}
-void ED_view3d_depth_tag_update(RegionView3D *rv3d)
-{
- if (rv3d->depths) {
- rv3d->depths->damaged = true;
- }
-}
-
/** \} */