Fix #129142: GPv3: gesture select tools selecting only right handles

When selection type is set/and for gesture selection tools, Instead of
current attribute, all three selection attributes (`.selection`, `left_handle`,
`right_handle`) are reset in every iteration of for loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/129147
This commit is contained in:
Pratik Borhade
2024-10-18 15:32:53 +02:00
committed by Falk David
parent 49bfcbc06d
commit 74129b648b

View File

@@ -265,13 +265,9 @@ bool selection_update(const ViewContext *vc,
/* Modes that un-set all elements not in the mask. */
if (ELEM(sel_op, SEL_OP_SET, SEL_OP_AND)) {
ed::curves::foreach_selection_attribute_writer(
curves, selection_domain, [&](bke::GSpanAttributeWriter &writer) {
for (const int element_i : IndexRange(writer.span.size())) {
ed::curves::apply_selection_operation_at_index(
writer.span, element_i, SEL_OP_SUB);
}
});
bke::GSpanAttributeWriter selection =
curves.attributes_for_write().lookup_for_write_span(attribute_name);
ed::curves::fill_selection_false(selection.span);
}
if (use_segment_selection) {