WIP: uv-simple-select #1

Closed
Chris Blackbourn wants to merge 182 commits from uv-simple-select into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 9653ea3f27 - Show all commits

View File

@ -793,21 +793,19 @@ static int curves_set_selection_domain_exec(bContext *C, wmOperator *op)
if (curves.points_num() == 0) { if (curves.points_num() == 0) {
continue; continue;
} }
const GVArray src = attributes.lookup(".selection", domain);
if (src.is_empty()) {
continue;
}
const CPPType &type = src.type(); if (const GVArray src = attributes.lookup(".selection", domain)) {
void *dst = MEM_malloc_arrayN(attributes.domain_size(domain), type.size(), __func__); const CPPType &type = src.type();
src.materialize(dst); void *dst = MEM_malloc_arrayN(attributes.domain_size(domain), type.size(), __func__);
src.materialize(dst);
attributes.remove(".selection"); attributes.remove(".selection");
if (!attributes.add(".selection", if (!attributes.add(".selection",
domain, domain,
bke::cpp_type_to_custom_data_type(type), bke::cpp_type_to_custom_data_type(type),
bke::AttributeInitMoveArray(dst))) { bke::AttributeInitMoveArray(dst))) {
MEM_freeN(dst); MEM_freeN(dst);
}
} }
/* Use #ID_RECALC_GEOMETRY instead of #ID_RECALC_SELECT because it is handled as a generic /* Use #ID_RECALC_GEOMETRY instead of #ID_RECALC_SELECT because it is handled as a generic