Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_edit.c
| Show First 20 Lines • Show All 3,622 Lines • ▼ Show 20 Lines | static int view3d_zoom_border_exec(bContext *C, wmOperator *op) | ||||
| /* get box select values using rna */ | /* get box select values using rna */ | ||||
| WM_operator_properties_border_to_rcti(op, &rect); | WM_operator_properties_border_to_rcti(op, &rect); | ||||
| /* check if zooming in/out view */ | /* check if zooming in/out view */ | ||||
| const bool zoom_in = !RNA_boolean_get(op->ptr, "zoom_out"); | const bool zoom_in = !RNA_boolean_get(op->ptr, "zoom_out"); | ||||
| ED_view3d_dist_range_get(v3d, dist_range); | ED_view3d_dist_range_get(v3d, dist_range); | ||||
| /* Get Z Depths, needed for perspective, nice for ortho */ | ED_view3d_depth_override( | ||||
| ED_view3d_draw_depth(CTX_data_ensure_evaluated_depsgraph(C), region, v3d, true); | CTX_data_ensure_evaluated_depsgraph(C), region, v3d, NULL, V3D_DEPTH_NO_GPENCIL, false); | ||||
| { | { | ||||
| /* avoid allocating the whole depth buffer */ | /* avoid allocating the whole depth buffer */ | ||||
| ViewDepths depth_temp = {0}; | ViewDepths depth_temp = {0}; | ||||
| /* avoid view3d_update_depths() for speed. */ | /* avoid view3d_update_depths() for speed. */ | ||||
| view3d_update_depths_rect(region, &depth_temp, &rect); | view3d_update_depths_rect(region, &depth_temp, &rect); | ||||
| /* find the closest Z pixel */ | /* find the closest Z pixel */ | ||||
| ▲ Show 20 Lines • Show All 1,745 Lines • Show Last 20 Lines | |||||