diff options
author | Falk David <falkdavid@gmx.de> | 2021-02-01 18:27:42 +0300 |
---|---|---|
committer | Falk David <falkdavid@gmx.de> | 2021-02-01 18:27:42 +0300 |
commit | 5ec9e3a26e8cf69bf8a0845a6e51953b1d6bc801 (patch) | |
tree | 554c7e7feddf9fd6972369958c08c035743c5c93 /source/blender/editors/gpencil/gpencil_paint.c | |
parent | 82e2d70024e2fa6e0ab9d32f6fb798613f6bdeee (diff) | |
parent | 006e70dbd7e29c105809eded93169754ade03de5 (diff) |
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index b55e47d74f3..2d5491e7569 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -939,10 +939,10 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p) RegionView3D *rv3d = p->region->regiondata; const int def_nr = obact->actdef - 1; const bool have_weight = (bool)BLI_findlink(&obact->defbase, def_nr); - const char *align_flag = &ts->gpencil_v3d_align; - const bool is_depth = (bool)(*align_flag & (GP_PROJECT_DEPTH_VIEW | GP_PROJECT_DEPTH_STROKE)); - const bool is_camera = (bool)(ts->gp_sculpt.lock_axis == 0) && (rv3d->persp == RV3D_CAMOB) && - (!is_depth); + const char align_flag = ts->gpencil_v3d_align; + const bool is_depth = (bool)(align_flag & (GP_PROJECT_DEPTH_VIEW | GP_PROJECT_DEPTH_STROKE)); + const bool is_lock_axis_view = (bool)(ts->gp_sculpt.lock_axis == 0); + const bool is_camera = is_lock_axis_view && (rv3d->persp == RV3D_CAMOB) && (!is_depth); int totelem; /* For very low pressure at the end, truncate stroke. */ @@ -1087,7 +1087,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p) } /* If camera view or view projection, reproject flat to view to avoid perspective effect. */ - if ((*p->align_flag & GP_PROJECT_VIEWSPACE) || is_camera) { + if (((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || is_camera) { ED_gpencil_project_stroke_to_view(p->C, p->gpl, gps); } } @@ -1236,7 +1236,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p) /* change position relative to parent object */ gpencil_apply_parent(depsgraph, obact, gpl, gps); /* If camera view or view projection, reproject flat to view to avoid perspective effect. */ - if ((*p->align_flag & GP_PROJECT_VIEWSPACE) || is_camera) { + if (((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || is_camera) { ED_gpencil_project_stroke_to_view(p->C, p->gpl, gps); } |