Anim: bone collections: make the "(de)select bones" work on linked arms

The "(de)select bones in collection" operators only change the selection
state on the pose (when in pose mode), and thus should be able to work
even when the armature (which contains the bone collections) is read-only.
This commit is contained in:
Sybren A. Stüvel
2023-09-18 14:47:46 +02:00
parent 38871b9728
commit 7be628b396

View File

@@ -502,8 +502,9 @@ static bool armature_bone_select_poll(bContext *C)
/* For bone selection, at least the pose should be editable to actually store
* the selection state. */
if (ID_IS_LINKED(ob->data) && !ID_IS_OVERRIDE_LIBRARY(ob->data)) {
CTX_wm_operator_poll_msg_set(C, "Cannot (de)select bones on linked Armature");
if (ID_IS_LINKED(ob) && !ID_IS_OVERRIDE_LIBRARY(ob)) {
CTX_wm_operator_poll_msg_set(
C, "Cannot (de)select bones on linked object, that would need an override");
return false;
}