Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2021-03-17 12:55:39 +0300
committerSebastian Parborg <darkdefende@gmail.com>2021-03-17 17:24:26 +0300
commit256da1c4b97224bc93b4d685896fabc9399639c5 (patch)
treec98fbee32545ab8291dde71b3e0ebde0697597bf /source/blender/gpencil_modifiers
parent0bae3002cf4b8928834feb3a5783944b922096be (diff)
LineArt: Fix transparenct mask in cutting function.
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 31cffad5a7e..ca65fc9bd57 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -252,7 +252,9 @@ static void lineart_line_cut(LineartRenderBuffer *rb,
if (cut_start_before) {
if (cut_start_before != ns) {
/* Insert cutting points for when a new cut is needed. */
- ns->occlusion = cut_start_before->prev ? (irls = cut_start_before->prev)->occlusion : 0;
+ irls = cut_start_before->prev ? cut_start_before->prev : NULL;
+ ns->occlusion = irls ? irls->occlusion : 0;
+ ns->transparency_mask = irls->transparency_mask;
BLI_insertlinkbefore(&rl->segments, (void *)cut_start_before, (void *)ns);
}
/* Otherwise we already found a existing cutting point, no need to insert a new one. */