[Bf-blender-cvs] [f6b4d81933c] temp-lineart-contained: Fix T88362: Lineart countour rendering error

YimingWu noreply at git.blender.org
Tue May 18 16:42:00 CEST 2021


Commit: f6b4d81933cb7c541a2a75606cae60fe830433d1
Author: YimingWu
Date:   Tue May 18 22:39:49 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBf6b4d81933cb7c541a2a75606cae60fe830433d1

Fix T88362: Lineart countour rendering error

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

M	release/datafiles/locale
M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M	source/tools

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

diff --git a/release/datafiles/locale b/release/datafiles/locale
index f7b706dd643..5ab29b1331d 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit f7b706dd6434db2d752f47c4b8c3148b2990fd73
+Subproject commit 5ab29b1331d2103dae634b987f121c4599459d7f
diff --git a/release/scripts/addons b/release/scripts/addons
index 4cb833e84ac..4fcdbfe7c20 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 4cb833e84acfd2be5fa08ce75118ce9cb60643b8
+Subproject commit 4fcdbfe7c20edfc1204c0aa46c98ea25354abcd9
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 8970953d4a8..7d78c8a63f2 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 8970953d4a8a4ea3bf77c66370c817ed0cf1308a
+Subproject commit 7d78c8a63f2f4b146f9327ddc0d567a5921b94ea
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index b9ef610bb0a..3137b9b0332 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -218,6 +218,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)
@@ -232,15 +250,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");
diff --git a/source/tools b/source/tools
index 2afbb8ec472..f99d29ae3e6 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 2afbb8ec472cac5102eb239f57b006f8c9387685
+Subproject commit f99d29ae3e6ad44d45d79309454c45f8088781a4



More information about the Bf-blender-cvs mailing list