mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T88362: Lineart countour rendering error
This is caused by lacking of consideration of OB_DUPLICOLLECTION in updateDepsgraph() in the modifier. Reviewed by: Antonio Vazquez (antoniov) https://developer.blender.org/D11292
This commit is contained in:
parent
8dd43ac23e
commit
5239198f17
1 changed files with 19 additions and 9 deletions
|
|
@ -194,6 +194,24 @@ static bool isDisabled(GpencilModifierData *md, int UNUSED(userRenderParams))
|
|||
return isModifierDisabled(md);
|
||||
}
|
||||
|
||||
static void add_this_collection(Collection *c,
|
||||
const ModifierUpdateDepsgraphContext *ctx,
|
||||
const int mode)
|
||||
{
|
||||
FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN (c, ob, mode) {
|
||||
if (ELEM(ob->type, OB_MESH, OB_MBALL, OB_CURVE, OB_SURF, OB_FONT)) {
|
||||
if (ob->lineart.usage != OBJECT_LRT_EXCLUDE) {
|
||||
DEG_add_object_relation(ctx->node, ob, DEG_OB_COMP_GEOMETRY, "Line Art Modifier");
|
||||
DEG_add_object_relation(ctx->node, ob, DEG_OB_COMP_TRANSFORM, "Line Art Modifier");
|
||||
}
|
||||
}
|
||||
if (ob->type == OB_EMPTY && (ob->transflag & OB_DUPLICOLLECTION)) {
|
||||
add_this_collection(ob->instance_collection, ctx, mode);
|
||||
}
|
||||
}
|
||||
FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END;
|
||||
}
|
||||
|
||||
static void updateDepsgraph(GpencilModifierData *md,
|
||||
const ModifierUpdateDepsgraphContext *ctx,
|
||||
const int mode)
|
||||
|
|
@ -208,15 +226,7 @@ static void updateDepsgraph(GpencilModifierData *md,
|
|||
ctx->node, lmd->source_object, DEG_OB_COMP_TRANSFORM, "Line Art Modifier");
|
||||
}
|
||||
else {
|
||||
FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN (ctx->scene->master_collection, ob, mode) {
|
||||
if (ELEM(ob->type, OB_MESH, OB_MBALL, OB_CURVE, OB_SURF, OB_FONT)) {
|
||||
if (ob->lineart.usage != OBJECT_LRT_EXCLUDE) {
|
||||
DEG_add_object_relation(ctx->node, ob, DEG_OB_COMP_GEOMETRY, "Line Art Modifier");
|
||||
DEG_add_object_relation(ctx->node, ob, DEG_OB_COMP_TRANSFORM, "Line Art Modifier");
|
||||
}
|
||||
}
|
||||
}
|
||||
FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END;
|
||||
add_this_collection(ctx->scene->master_collection, ctx, mode);
|
||||
}
|
||||
DEG_add_object_relation(
|
||||
ctx->node, ctx->scene->camera, DEG_OB_COMP_TRANSFORM, "Line Art Modifier");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue