[Bf-blender-cvs] [88ff5e5fb9d] blender-v3.1-release: Fix T95458: Line art ignores curve objects with no evaluated mesh

Hans Goudey noreply at git.blender.org
Thu Feb 10 18:33:56 CET 2022


Commit: 88ff5e5fb9d66d3a441e325dc381754b6f9c093e
Author: Hans Goudey
Date:   Thu Feb 10 11:33:21 2022 -0600
Branches: blender-v3.1-release
https://developer.blender.org/rB88ff5e5fb9d66d3a441e325dc381754b6f9c093e

Fix T95458: Line art ignores curve objects with no evaluated mesh

Some curve objects don't have an evaluated mesh at all, but line art
currently assumes that all curve objects have one before converting
it to a mesh internally. Fix this by checking if the curve object has an
evaluated mesh before skipping it.

The remaining problem is that evalauted from non-mesh objects or
evaluated curves from non-curve objects, etc. will be ignored if
"Allow Duplicates" is off. That's a different problem though.

Differential Revision: https://developer.blender.org/D14036

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

M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c

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

diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 5434f7768b2..a9ec136831d 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -2224,10 +2224,10 @@ static void lineart_main_load_geometries(
       use_mesh = use_ob->data;
     }
     else {
-      /* If DEG_ITER_OBJECT_FLAG_DUPLI is set, the curve objects are going to have a mesh
-       * equivalent already in the object list, so ignore converting the original curve in this
-       * case. */
-      if (allow_duplicates) {
+      /* If DEG_ITER_OBJECT_FLAG_DUPLI is set, some curve objects may also have an evaluated mesh
+       * object in the list. To avoid adding duplicate geometry, ignore evaluated curve objects in
+       * those cases. */
+      if (allow_duplicates && BKE_object_get_evaluated_mesh(ob) != NULL) {
         continue;
       }
       use_mesh = BKE_mesh_new_from_object(depsgraph, use_ob, true, true);



More information about the Bf-blender-cvs mailing list