diff options
author | YimingWu <xp8110@outlook.com> | 2021-12-31 16:54:07 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-12-31 16:54:07 +0300 |
commit | e79b4523b410de365d66fa1d44732a973b12ea9b (patch) | |
tree | 696b7032d8d63562779060f6e78e945d78ee9f6d /source | |
parent | 97ae08c9fcca55179f72f9bc318cc750e8f9d8a4 (diff) |
LineArt: Correct collection intersection mask logic.
The logic used to be:
"if collection doesn't have child collection, check if ob is from this one"
The correct logic should be:
"if collection child does not have this ob, then check this collection".
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index 9e1476d928e..2f82a22754d 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -1970,13 +1970,12 @@ static uchar lineart_intersection_mask_check(Collection *c, Object *ob) } } - if (c->children.first == NULL) { - if (BKE_collection_has_object(c, (Object *)(ob->id.orig_id))) { - if (c->lineart_flags & COLLECTION_LRT_USE_INTERSECTION_MASK) { - return c->lineart_intersection_mask; - } + if (BKE_collection_has_object(c, (Object *)(ob->id.orig_id))) { + if (c->lineart_flags & COLLECTION_LRT_USE_INTERSECTION_MASK) { + return c->lineart_intersection_mask; } } + return 0; } |