Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_fill.c
| Show First 20 Lines • Show All 1,357 Lines • ▼ Show 20 Lines | static void gpencil_get_depth_array(tGPDfill *tgpf) | ||||
| } | } | ||||
| /* for surface sketching, need to set the right OpenGL context stuff so that | /* for surface sketching, need to set the right OpenGL context stuff so that | ||||
| * the conversions will project the values correctly... | * the conversions will project the values correctly... | ||||
| */ | */ | ||||
| if (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) { | if (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) { | ||||
| /* need to restore the original projection settings before packing up */ | /* need to restore the original projection settings before packing up */ | ||||
| view3d_region_operator_needs_opengl(tgpf->win, tgpf->region); | view3d_region_operator_needs_opengl(tgpf->win, tgpf->region); | ||||
| ED_view3d_autodist_init(tgpf->depsgraph, tgpf->region, tgpf->v3d, 0); | ED_view3d_depth_override( | ||||
| tgpf->depsgraph, tgpf->region, tgpf->v3d, NULL, V3D_DEPTH_NO_GPENCIL, false); | |||||
| /* Since strokes are so fine, when using their depth we need a margin | /* Since strokes are so fine, when using their depth we need a margin | ||||
| * otherwise they might get missed. */ | * otherwise they might get missed. */ | ||||
| int depth_margin = 0; | int depth_margin = 0; | ||||
| /* get an array of depths, far depths are blended */ | /* get an array of depths, far depths are blended */ | ||||
| int mval_prev[2] = {0}; | int mval_prev[2] = {0}; | ||||
| int interp_depth = 0; | int interp_depth = 0; | ||||
| ▲ Show 20 Lines • Show All 887 Lines • Show Last 20 Lines | |||||