[Bf-blender-cvs] [365df4b5aa0] lanpr-under-gp: LANPR: Removed excessive scene relationship in updateDepsgraph.

YimingWu noreply at git.blender.org
Sat Jul 4 11:22:08 CEST 2020


Commit: 365df4b5aa0f5d25045592226c43a7435118efec
Author: YimingWu
Date:   Sat Jul 4 17:22:02 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB365df4b5aa0f5d25045592226c43a7435118efec

LANPR: Removed excessive scene relationship in updateDepsgraph.

===================================================================

M	source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c

===================================================================

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 14626d6236f..801713c3638 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -198,15 +198,16 @@ static void bakeModifier(Main *UNUSED(bmain),
 static void updateDepsgraph(GpencilModifierData *md, const ModifierUpdateDepsgraphContext *ctx)
 {
   LineartGpencilModifierData *lmd = (LineartGpencilModifierData *)md;
-  if (lmd->source_type == LRT_SOURCE_OBJECT) {
+  if (lmd->source_type == LRT_SOURCE_OBJECT && lmd->source_object) {
     DEG_add_object_relation(
         ctx->node, lmd->source_object, DEG_OB_COMP_GEOMETRY, "Line Art Modifier");
     DEG_add_object_relation(
         ctx->node, lmd->source_object, DEG_OB_COMP_TRANSFORM, "Line Art Modifier");
   }
   else {
+    /* TODO: add relationship to objects instead of scene, then when rendering, those mesh objects
+     * will be evaluated first for their modifiers. */
     DEG_add_scene_relation(ctx->node, ctx->scene, DEG_SCENE_COMP_PARAMETERS, "Line Art Modifier");
-    DEG_add_scene_relation(ctx->node, ctx->scene, DEG_SCENE_COMP_ANIMATION, "Line Art Modifier");
   }
   DEG_add_object_relation(
       ctx->node, ctx->scene->camera, DEG_OB_COMP_TRANSFORM, "Line Art Modifier");



More information about the Bf-blender-cvs mailing list