From cf2ea5979cc21164320369161b25c70cb1fee699 Mon Sep 17 00:00:00 2001 From: Falk David Date: Tue, 10 Oct 2023 16:15:43 +0200 Subject: [PATCH] Fix: GPv3 draw tool sometimes draws a cyclic curve The issue was that the drawing tool did not write to the "cyclic" attribute. Resolves #113423. Pull Request: https://projects.blender.org/blender/blender/pulls/113500 --- source/blender/editors/sculpt_paint/grease_pencil_paint.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/editors/sculpt_paint/grease_pencil_paint.cc b/source/blender/editors/sculpt_paint/grease_pencil_paint.cc index 720d1548fd6..6d98ce15dd5 100644 --- a/source/blender/editors/sculpt_paint/grease_pencil_paint.cc +++ b/source/blender/editors/sculpt_paint/grease_pencil_paint.cc @@ -216,7 +216,12 @@ struct PaintOperationExecutor { bke::MutableAttributeAccessor attributes = curves.attributes_for_write(); bke::SpanAttributeWriter materials = attributes.lookup_or_add_for_write_span( "material_index", ATTR_DOMAIN_CURVE); + bke::SpanAttributeWriter cyclic = attributes.lookup_or_add_for_write_span( + "cyclic", ATTR_DOMAIN_CURVE); + cyclic.span.last() = false; materials.span.last() = material_index; + + cyclic.finish(); materials.finish(); curves.curve_types_for_write().last() = CURVE_TYPE_POLY;