Anim: better check for overrides when (un)assigning bone collections

When (un)assigning bone collections, don't just check that the armature is
linked, but also check for the existence of a library override.
This commit is contained in:
Sybren A. Stüvel 2023-12-18 12:54:32 +01:00
parent b70ebf96e7
commit a04bbc8a1f
1 changed files with 2 additions and 1 deletions

View File

@ -381,7 +381,8 @@ static bool bone_collection_assign_poll(bContext *C)
return false;
}
if (ID_IS_LINKED(ob->data)) {
bArmature *armature = static_cast<bArmature *>(ob->data);
if (ID_IS_LINKED(armature) && !ID_IS_OVERRIDE_LIBRARY(armature)) {
CTX_wm_operator_poll_msg_set(
C, "Cannot edit bone collections on linked Armatures without override");
return false;