Fix: Don't take overlays into account when drawing curves

Previously when drawing curves and using surface project, the strokes
would snap to gizmos like lights and camera objects. This is not what
most people expect when projecting to surface objects, so disable them
from the depth check.

Pull Request: https://projects.blender.org/blender/blender/pulls/121530
This commit is contained in:
Sebastian Parborg 2024-05-08 14:04:43 +02:00 committed by Sebastian Parborg
parent d3b2906348
commit 0e67f060ee
2 changed files with 2 additions and 2 deletions

@ -1111,7 +1111,7 @@ static int curve_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event)
cdd->vc.region,
cdd->vc.v3d,
nullptr,
V3D_DEPTH_NO_GPENCIL,
V3D_DEPTH_NO_OVERLAYS,
&cdd->depths);
if (cdd->depths != nullptr) {

@ -1087,7 +1087,7 @@ static int curves_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event)
cdd->vc.region,
cdd->vc.v3d,
nullptr,
V3D_DEPTH_NO_GPENCIL,
V3D_DEPTH_NO_OVERLAYS,
&cdd->depths);
if (cdd->depths != nullptr) {