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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 77de09a5526..7d79ce46c1a 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -2645,7 +2645,6 @@ static LineartRenderBuffer *lineart_create_render_buffer(Scene *scene,
rb->crease_threshold = cos(M_PI - lmd->crease_threshold);
rb->angle_splitting_threshold = lmd->angle_splitting_threshold;
rb->chaining_image_threshold = lmd->chaining_image_threshold;
- rb->chaining_geometry_threshold = lmd->chaining_geometry_threshold;
rb->fuzzy_intersections = (lmd->calculation_flags & LRT_INTERSECTION_AS_CONTOUR) != 0;
rb->fuzzy_everything = (lmd->calculation_flags & LRT_EVERYTHING_AS_CONTOUR) != 0;
@@ -3676,32 +3675,18 @@ int MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, LineartGpencilModifi
* spit, where the splitting point could be any cut in e->segments. */
MOD_lineart_chain_split_for_fixed_occlusion(rb);
- /* Then we connect chains based on the _proximity_ of their end points in geometry or image
- * space, here's the place threashold value gets involved. */
-
- /* If both chaining thresholds are zero, then we allow at least image space chaining to do a
- * little bit of work so we don't end up in fragmented strokes. */
- float *t_image = &lmd->chaining_image_threshold;
- float *t_geom = &lmd->chaining_geometry_threshold;
- if (*t_image < FLT_EPSILON && *t_geom < FLT_EPSILON) {
- *t_geom = 0.0f;
- *t_image = 0.001f;
- }
+ /* Then we connect chains based on the _proximity_ of their end points in image space, here's
+ * the place threashold value gets involved. */
/* do_geometry_space = true. */
- MOD_lineart_chain_connect(rb, true);
+ MOD_lineart_chain_connect(rb);
- /* After chaining, we need to clear flags so we can do another round in image space. */
- MOD_lineart_chain_clear_picked_flag(rb);
-
- /* do_geometry_space = false (it's image_space). */
- MOD_lineart_chain_connect(rb, false);
-
- /* Clear again so we don't confuse GPencil generation calls. */
+ /* After chaining, we need to clear flags so we don't confuse GPencil generation calls. */
MOD_lineart_chain_clear_picked_flag(rb);
+ float *t_image = &lmd->chaining_image_threshold;
/* This configuration ensures there won't be accidental lost of short unchained segments. */
- MOD_lineart_chain_discard_short(rb, MIN3(*t_image, *t_geom, 0.001f) - FLT_EPSILON);
+ MOD_lineart_chain_discard_short(rb, MIN2(*t_image, 0.001f) - FLT_EPSILON);
if (rb->angle_splitting_threshold > FLT_EPSILON) {
MOD_lineart_chain_split_angle(rb, rb->angle_splitting_threshold);