diff options
author | YimingWu <xp8110@outlook.com> | 2021-10-28 12:12:57 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-10-28 14:38:45 +0300 |
commit | ddb4eb8a897eeb78c3eb9b975ca77a693a964ac1 (patch) | |
tree | 8ec29991a8518d789e6ca440421b2d0b72996169 /source/blender/gpencil_modifiers/intern | |
parent | aebb3d3062babd9da7c89a7acd4126f4339d201f (diff) |
LineArt: Fix(unreported) depsgraph camera error
This fixes unintentional line art error when custom camera doesn't
exist, now not adding custom camera relation in this case.
Diffstat (limited to 'source/blender/gpencil_modifiers/intern')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c index 06dea6cd4d2..4411762aeea 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c @@ -264,13 +264,13 @@ static void updateDepsgraph(GpencilModifierData *md, else { add_this_collection(ctx->scene->master_collection, ctx, mode); } - if (lmd->calculation_flags & LRT_USE_CUSTOM_CAMERA) { + if (lmd->calculation_flags & LRT_USE_CUSTOM_CAMERA && lmd->source_camera) { DEG_add_object_relation( ctx->node, lmd->source_camera, DEG_OB_COMP_TRANSFORM, "Line Art Modifier"); DEG_add_object_relation( ctx->node, lmd->source_camera, DEG_OB_COMP_PARAMETERS, "Line Art Modifier"); } - if (ctx->scene->camera) { + else if (ctx->scene->camera) { DEG_add_object_relation( ctx->node, ctx->scene->camera, DEG_OB_COMP_TRANSFORM, "Line Art Modifier"); DEG_add_object_relation( |