diff options
author | YimingWu <xp8110@outlook.com> | 2021-10-26 17:55:27 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-10-26 18:02:17 +0300 |
commit | c3ef1c15f5653ac323f4d077c7faf7b46f3eee0d (patch) | |
tree | 1fb6402cfb8c65a8a6b9268349450f5072ea6550 /source/blender/makesdna | |
parent | 52ccb445011dddd73dde5ee9d7ba29f678e0d076 (diff) |
LineArt: Stroke offset towards camera.
Allows the user to turn off in_front option for grease pencil object
and offset strokes towards camera to allow depth interaction of the
rest of the scene.
Reviewed By: Antonio Vazquez (antoniov)
Differential Revision: https://developer.blender.org/D12046
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_modifier_defaults.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_modifier_types.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h index 11299ae9717..1ad884bee8f 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h @@ -319,6 +319,7 @@ .angle_splitting_threshold = DEG2RAD(60.0f), \ .chaining_image_threshold = 0.001f, \ .chain_smooth_tolerance = 0.2f,\ + .stroke_depth_offset = 0.05,\ } #define _DNA_DEFAULT_LengthGpencilModifierData \ diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h index c7a93080f7c..6ea07163ca8 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_types.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h @@ -1042,7 +1042,6 @@ typedef struct LineartGpencilModifierData { /** Strength for smoothing jagged chains. */ float chain_smooth_tolerance; - int _pad1; /* CPU mode */ float chaining_image_threshold; @@ -1053,6 +1052,9 @@ typedef struct LineartGpencilModifierData { /* #eLineArtGPencilModifierFlags, modifier internal state. */ int flags; + /* Move strokes towards camera to avoid clipping while preserve depth for the viewport. */ + float stroke_depth_offset; + /* Runtime data. */ /* Because we can potentially only compute features lines once per modifier stack (Use Cache), we |