[Bf-blender-cvs] [17f3369f81c] temp-lineart-contained: LineArt: Fix transparenct mask in cutting function.
YimingWu
noreply at git.blender.org
Wed Mar 17 10:56:01 CET 2021
Commit: 17f3369f81c4b040704a874637b6689e07c9795f
Author: YimingWu
Date: Wed Mar 17 17:55:39 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rB17f3369f81c4b040704a874637b6689e07c9795f
LineArt: Fix transparenct mask in cutting function.
===================================================================
M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
===================================================================
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. */
More information about the Bf-blender-cvs
mailing list