Fix T66072: GPencil "stroke placement:surface" uses "stroke placement:stroke"s target parameters

The stroke parameters were used in Surface mode becaus ethe mode was not checked.
This commit is contained in:
Antonio Vazquez 2019-06-24 10:14:39 +02:00
parent 829561c03c
commit 3fb099bf81
Notes: blender-bot 2023-10-12 12:49:04 +02:00
Referenced by issue #66072, Grease Pencil "stroke placement:surface" uses "stroke placement:stroke"s target parameters
2 changed files with 6 additions and 4 deletions

View File

@ -1130,8 +1130,9 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
}
}
else {
if ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_ENDPOINTS) ||
(ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_FIRST)) {
if ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) &&
((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_ENDPOINTS) ||
(ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_FIRST))) {
int first_valid = 0;
int last_valid = 0;

View File

@ -770,8 +770,9 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
is_depth = false;
}
else {
if ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_ENDPOINTS) ||
(ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_FIRST)) {
if ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) &&
((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_ENDPOINTS) ||
(ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE_FIRST))) {
int first_valid = 0;
int last_valid = 0;