Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-02-10 20:33:21 +0300
committerHans Goudey <h.goudey@me.com>2022-02-10 20:33:36 +0300
commit88ff5e5fb9d66d3a441e325dc381754b6f9c093e (patch)
treee26219789171cdd1b632a60639aecb9a50f55ced /source
parenta44366a642bc22bc725f2a700abd14f891cfde60 (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c8
1 files changed, 4 insertions, 4 deletions
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);