Anim: rename action_slot_name to last_slot_identifier

`AnimData`, NLA strips, and action constraints all have an `action_slot_name`
field in RNA. The purpose of this field is to store the identifier of the most
recently assigned slot, so that it can be used for auto-assignment when later
assigning different actions.

However, this field name is misleading in two ways:

1. In accordance with #130740, it's actually the slot *identifier*, not name.
2. It could be mistaken as a way to rename the currently assigned slot, which it
   is not.

To resolve both of those issues, we're renaming the field to
`last_slot_identifier`, which better communicates its actual nature.

As a bonus, this also ends up decluttering Python autocomplete when looking
for things related to action_slot.

Ref: #130892
Pull Request: https://projects.blender.org/blender/blender/pulls/130911
This commit is contained in:
Nathan Vegdahl
2024-11-26 16:05:40 +01:00
committed by Nathan Vegdahl
parent cbc185dbbd
commit 409697a962
17 changed files with 95 additions and 77 deletions

View File

@@ -66,7 +66,7 @@ class ActionSlotAssignmentTest(unittest.TestCase):
# Unassigning should keep the slot identifier.
cube_adt.action = None
self.assertEqual(cube_adt.action_slot_name, slot_cube.identifier)
self.assertEqual(cube_adt.last_slot_identifier, slot_cube.identifier)
# It should not be possible to set the slot handle while the Action is unassigned.
slot_extra = action.slots.new()