Fix the GPencil stroke not sticking to other strokes
Issue seen when setting `Stroke Placement` of type `Stroke`. Regression introduced in {rBaa0ac0035a0d3601672a0c732e3f8f932a36fc04}.
This commit is contained in:
parent
0c6b815855
commit
c0fdaf700a
Notes:
blender-bot
2023-12-22 20:14:11 +01:00
Referenced by commit 6ae34bb071
, Fix drawing annotations on surface
|
@ -2277,8 +2277,9 @@ static void gpencil_paint_initstroke(tGPsdata *p,
|
|||
static void gpencil_paint_strokeend(tGPsdata *p)
|
||||
{
|
||||
ToolSettings *ts = p->scene->toolsettings;
|
||||
/* for surface sketching, need to set the right OpenGL context stuff so that
|
||||
* the conversions will project the values correctly...
|
||||
const bool is_eraser = (p->gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) != 0;
|
||||
/* for surface sketching, need to set the right OpenGL context stuff so
|
||||
* that the conversions will project the values correctly...
|
||||
*/
|
||||
if (gpencil_project_check(p)) {
|
||||
View3D *v3d = p->area->spacedata.first;
|
||||
|
@ -2292,11 +2293,11 @@ static void gpencil_paint_strokeend(tGPsdata *p)
|
|||
(ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ?
|
||||
V3D_DEPTH_GPENCIL_ONLY :
|
||||
V3D_DEPTH_NO_GPENCIL,
|
||||
NULL);
|
||||
is_eraser ? NULL : &p->depths);
|
||||
}
|
||||
|
||||
/* check if doing eraser or not */
|
||||
if ((p->gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) {
|
||||
if (!is_eraser) {
|
||||
/* transfer stroke to frame */
|
||||
gpencil_stroke_newfrombuffer(p);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue