Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editcurve_paint.c
| Show First 20 Lines • Show All 1,077 Lines • ▼ Show 20 Lines | if ((cu->flag & CU_3D) == 0) { | ||||
| plane_no = obedit->obmat[2]; | plane_no = obedit->obmat[2]; | ||||
| cdd->project.use_plane = true; | cdd->project.use_plane = true; | ||||
| } | } | ||||
| else { | else { | ||||
| if ((cps->depth_mode == CURVE_PAINT_PROJECT_SURFACE) && (v3d->shading.type > OB_WIRE)) { | if ((cps->depth_mode == CURVE_PAINT_PROJECT_SURFACE) && (v3d->shading.type > OB_WIRE)) { | ||||
| /* needed or else the draw matrix can be incorrect */ | /* needed or else the draw matrix can be incorrect */ | ||||
| view3d_operator_needs_opengl(C); | view3d_operator_needs_opengl(C); | ||||
| ED_view3d_autodist_init(cdd->vc.depsgraph, cdd->vc.region, cdd->vc.v3d, 0); | ED_view3d_depth_override( | ||||
| cdd->vc.depsgraph, cdd->vc.region, cdd->vc.v3d, NULL, V3D_DEPTH_NO_GPENCIL, true); | |||||
| if (cdd->vc.rv3d->depths) { | |||||
| cdd->vc.rv3d->depths->damaged = true; | |||||
| } | |||||
| ED_view3d_depth_update(cdd->vc.region); | |||||
| if (cdd->vc.rv3d->depths != NULL) { | if (cdd->vc.rv3d->depths != NULL) { | ||||
| cdd->project.use_depth = true; | cdd->project.use_depth = true; | ||||
| } | } | ||||
| else { | else { | ||||
| BKE_report(op->reports, RPT_WARNING, "Unable to access depth buffer, using view plane"); | BKE_report(op->reports, RPT_WARNING, "Unable to access depth buffer, using view plane"); | ||||
| cdd->project.use_depth = false; | cdd->project.use_depth = false; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines | |||||