Anim: disable 'New Slot' operator on linked Actions

The 'New Slot' operator now checks for editability of the Action.

Pull Request: https://projects.blender.org/blender/blender/pulls/128708
This commit is contained in:
Sybren A. Stüvel
2024-10-08 15:20:55 +02:00
parent 0156b38905
commit 411f399a7f

View File

@@ -691,6 +691,9 @@ class ANIM_OT_slot_new_for_id(Operator):
if not animated_id.animation_data.action.is_action_layered:
cls.poll_message_set("Action slots are only supported by layered Actions. Upgrade this Action first")
return False
if not animated_id.animation_data.action.is_editable:
cls.poll_message_set("Creating a new Slot is not possible on a linked Action")
return False
return True
def execute(self, context):