[Bf-blender-cvs] [7a489cd639c] lanpr-under-gp: LineArt: Force line types for situations in fuzzy chaining.
YimingWu
noreply at git.blender.org
Sun Jul 26 04:49:07 CEST 2020
Commit: 7a489cd639c1ec772edfe8b4c80d6e1be19189ec
Author: YimingWu
Date: Sun Jul 26 10:48:10 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB7a489cd639c1ec772edfe8b4c80d6e1be19189ec
LineArt: Force line types for situations in fuzzy chaining.
===================================================================
M release/datafiles/locale
M release/scripts/addons
M release/scripts/addons_contrib
M source/blender/editors/lineart/lineart_chain.c
M source/blender/editors/lineart/lineart_cpu.c
M source/tools
===================================================================
diff --git a/release/datafiles/locale b/release/datafiles/locale
index 4af22e0492f..8a05b618f03 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 4af22e0492f401c609a0203cad1a9bc7fa00b863
+Subproject commit 8a05b618f031582c006c6f62b9e60619ab3eef8b
diff --git a/release/scripts/addons b/release/scripts/addons
index 25b00a0a52c..67f1fbca148 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 25b00a0a52c81408b9dc15ea320a79ee956b3c0a
+Subproject commit 67f1fbca1482d9d9362a4001332e785c3fd5d230
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index f2f4a8b3bfa..ef6ef414d22 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit f2f4a8b3bfa36ee49f7bdb3a1acb40ef4b39ee3a
+Subproject commit ef6ef414d22c2578fad99327743b925ab640a99c
diff --git a/source/blender/editors/lineart/lineart_chain.c b/source/blender/editors/lineart/lineart_chain.c
index b5e38fe3873..e768529888a 100644
--- a/source/blender/editors/lineart/lineart_chain.c
+++ b/source/blender/editors/lineart/lineart_chain.c
@@ -210,7 +210,6 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
rlc = lineart_chain_create(rb);
rlc->object_ref = rl->object_ref; /* can only be the same object in a chain. */
- rlc->type = (rl->flags & LRT_EDGE_FLAG_ALL_TYPE);
LineartRenderLine *new_rl = rl;
LineartRenderVert *new_rv;
@@ -444,6 +443,12 @@ void ED_lineart_chain_feature_lines(LineartRenderBuffer *rb)
}
ba = ED_lineart_get_point_bounding_area_deep(rb, new_rv->fbcoord[0], new_rv->fbcoord[1]);
}
+ if (rb->fuzzy_everything) {
+ rlc->type = LRT_EDGE_FLAG_CONTOUR;
+ }
+ else {
+ rlc->type = (rl->flags & LRT_EDGE_FLAG_ALL_TYPE);
+ }
}
}
@@ -615,13 +620,11 @@ static void lineart_chain_connect(LineartRenderBuffer *UNUSED(rb),
int reverse_2)
{
LineartRenderLineChainItem *rlci;
- if (onto->object_ref && !sub->object_ref) {
- sub->object_ref = onto->object_ref;
- sub->type = onto->type;
- }
- else if (sub->object_ref && !onto->object_ref) {
- onto->object_ref = sub->object_ref;
- onto->type = sub->type;
+ if (onto->type == LRT_EDGE_FLAG_INTERSECTION) {
+ if (sub->object_ref) {
+ onto->object_ref = sub->object_ref;
+ onto->type = LRT_EDGE_FLAG_CONTOUR;
+ }
}
if (!reverse_1) { /* L--R L-R */
if (reverse_2) { /* L--R R-L */
diff --git a/source/blender/editors/lineart/lineart_cpu.c b/source/blender/editors/lineart/lineart_cpu.c
index 3abc513fd96..720f0c59446 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -3802,6 +3802,8 @@ static int lineart_gpencil_bake_strokes_exec(bContext *C, wmOperator *UNUSED(op)
int frame_total = frame_end - frame_begin;
int frame_orig = scene->r.cfra;
LineartGpencilModifierData *lmd;
+ LineartRenderBuffer *rb = lineart_share.render_buffer_shared;
+ int use_types;
/* Needed for progress report. */
lineart_share.wm = CTX_wm_manager(C);
@@ -3849,6 +3851,13 @@ static int lineart_gpencil_bake_strokes_exec(bContext *C, wmOperator *UNUSED(op)
cleared = 1;
}
+ if (rb->fuzzy_everything) {
+ use_types = LRT_EDGE_FLAG_CONTOUR;
+ }
+ else if (rb->fuzzy_intersections) {
+ use_types = lmd->line_types | LRT_EDGE_FLAG_INTERSECTION;
+ }
+
ED_lineart_gpencil_generate_strokes_direct(
dg,
ob,
diff --git a/source/tools b/source/tools
index 6a252de776d..5cf2fc3e5dc 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 6a252de776d0b9dca3167c30a7621a4f1e9bc911
+Subproject commit 5cf2fc3e5dc28025394b57d8743401295528f310
More information about the Bf-blender-cvs
mailing list