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
This commit is contained in:
Falk David
2023-10-10 16:15:43 +02:00
committed by Falk David
parent 7d28b8cb5b
commit cf2ea5979c

View File

@@ -216,7 +216,12 @@ struct PaintOperationExecutor {
bke::MutableAttributeAccessor attributes = curves.attributes_for_write();
bke::SpanAttributeWriter<int> materials = attributes.lookup_or_add_for_write_span<int>(
"material_index", ATTR_DOMAIN_CURVE);
bke::SpanAttributeWriter<bool> cyclic = attributes.lookup_or_add_for_write_span<bool>(
"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;