Commit: 2fec1a99c2cb30907699fb2d40629612126d4b7c
Author: YimingWu
Date: Thu Aug 6 14:46:41 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB2fec1a99c2cb30907699fb2d40629612126d4b7c
LineArt: Intersection lines can now be selected by different collections if
fully contained.
===================================================================
M source/blender/editors/lineart/lineart_chain.c
M source/blender/editors/lineart/lineart_cpu.c
===================================================================
diff --git a/source/blender/editors/lineart/lineart_chain.c
b/source/blender/editors/lineart/lineart_chain.c
index e37b98b778c..2492a3109ee 100644
--- a/source/blender/editors/lineart/lineart_chain.c
+++ b/source/blender/editors/lineart/lineart_chain.c
@@ -678,8 +678,9 @@ static LineartChainRegisterEntry
*lineart_chain_get_closest_cre(LineartRenderBuf
next_cre = cre->next;
if (cre->rlc->object_ref != rlc->object_ref) {
if (rb->fuzzy_everything || rb->fuzzy_intersections) {
- /* if both have object_ref, then none is intersection line. */
- if (cre->rlc->object_ref && rlc->object_ref) {
+ /* If none of those are intersection lines... */
+ if ((!(cre->rlc->type & LRT_EDGE_FLAG_INTERSECTION)) &&
+ (!(rlc->object_ref->type & LRT_EDGE_FLAG_INTERSECTION))) {
continue; /* We don't want to chain along different objects at the
moment. */
}
}
diff --git a/source/blender/editors/lineart/lineart_cpu.c
b/source/blender/editors/lineart/lineart_cpu.c
index d083f85972d..8cd82f2d2ff 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -2086,6 +2086,11 @@ static LineartRenderLine
*lineart_triangle_generate_intersection_line_only(
result->r = r;
result->tl = rt;
result->tr = testing;
+
+ /* Currently we can only store one object_ref. Todo in the future: allow
selection of object
+ * pairs when using intersection lines. */
+ result->object_ref = rt->rl[0]->object_ref;
+
LineartRenderLineSegment *rls = lineart_mem_aquire(&rb->render_data_pool,
sizeof(LineartRenderLineSegment));
BLI_addtail(&result->segments, rls);
@@ -3634,9 +3639,6 @@ void ED_lineart_gpencil_generate_from_chain(Depsgraph
*UNUSED(depsgraph),
if (rlc->picked) {
continue;
}
- if (orig_ob && !rlc->object_ref) {
- continue; /* intersection lines are all in the first collection running
into here */
- }
if (!(rlc->type & types)) {
continue;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs