diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-08-19 18:52:52 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-08-19 18:52:52 +0300 |
commit | 6ef4267d5ef6fe91069c1ce1a131f49534eeb516 (patch) | |
tree | 69b954ea3c6c3ca45f0912aa00f642b9b8f5ce20 /source/blender/editors | |
parent | 78e0c936c1e6c74508ad8e58c1b851eb2fd17f48 (diff) | |
parent | be5c296e522474aeb15b12562e68faea255b7f3b (diff) |
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 70f12151fdd..eb4243c0053 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -20,6 +20,7 @@ #include "BLI_utildefines.h" #include "BLT_translation.h" +#include "BLT_translation.h" #include "PIL_time.h" @@ -1024,8 +1025,10 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) gpd->runtime.sbuffer, &gpd->runtime.sbuffer_size, &gpd->runtime.sbuffer_used, false); /* add small offset to keep stroke over the surface */ - if ((depth_arr) && (gpd->zdepth_offset > 0.0f) && (depth_arr[i] != DEPTH_INVALID)) { - depth_arr[i] *= (1.0f - (gpd->zdepth_offset / 1000.0f)); + if (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) { + if ((depth_arr) && (gpd->zdepth_offset > 0.0f) && (depth_arr[i] != DEPTH_INVALID)) { + depth_arr[i] *= (1.0f - (gpd->zdepth_offset / 1000.0f)); + } } /* convert screen-coordinates to 3D coordinates */ |