From f6167aab31f9f2f4bd4337090a9c2a1483de4e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 2 May 2025 16:03:00 +0200 Subject: [PATCH] Anim: name new action slots after the last-used slot When creating a new action slot for a data-block, via the '+ New' button of the slot selector, use the name of the slot that was last used by that data-block. Previously, it would always use the name of the data-block, interfering with slot auto-selection when toggling between Actions. Pull Request: https://projects.blender.org/blender/blender/pulls/138326 --- scripts/startup/bl_operators/anim.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/startup/bl_operators/anim.py b/scripts/startup/bl_operators/anim.py index ee56554d8fd..9f3e108eb5f 100644 --- a/scripts/startup/bl_operators/anim.py +++ b/scripts/startup/bl_operators/anim.py @@ -712,7 +712,8 @@ class ANIM_OT_slot_new_for_id(Operator): if adt.action_slot: slot = adt.action_slot.duplicate() else: - slot = adt.action.slots.new(animated_id.id_type, animated_id.name) + slot_name = adt.last_slot_identifier[2:] or animated_id.name + slot = adt.action.slots.new(animated_id.id_type, slot_name) adt.action_slot = slot return {'FINISHED'}