Fix: Don't allow duplicate color attribute operator in edit mode
The internal function relies on `CustomData_copy_data_layer` currently, which doesn't work for BMesh. Support could be added as a special case for BMesh, but in the meantime avoid bugs by just changing the poll.
This commit is contained in:
parent
ca9d65cc97
commit
c7942c31b2
|
@ -539,6 +539,10 @@ static bool geometry_color_attributes_duplicate_poll(bContext *C)
|
|||
if (!geometry_attributes_poll(C)) {
|
||||
return false;
|
||||
}
|
||||
if (CTX_data_edit_object(C) != nullptr) {
|
||||
CTX_wm_operator_poll_msg_set(C, "Operation is not allowed in edit mode");
|
||||
return false;
|
||||
}
|
||||
|
||||
Object *ob = ED_object_context(C);
|
||||
ID *data = ob ? static_cast<ID *>(ob->data) : nullptr;
|
||||
|
|
Loading…
Reference in New Issue