diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index f71ce442d90..c98b10eb277 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -139,7 +139,9 @@ static void convert_action_in_place(blender::animrig::Action &action) Slot &slot = action.slot_add(); slot.idtype = idtype; - slot.identifier_ensure_prefix(); + + const std::string slot_identifier{slot.identifier_prefix_for_idtype() + DATA_("Legacy Slot")}; + action.slot_identifier_define(slot, slot_identifier); Layer &layer = action.layer_add("Layer"); blender::animrig::Strip &strip = layer.strip_add(action, @@ -244,11 +246,6 @@ static void version_legacy_actions_to_layered(Main *bmain) blender::Vector &user_infos = item.value; Slot &slot_to_assign = *action.slot(0); - if (user_infos.size() == 1) { - /* Rename the slot after its single user. If there are multiple users, the name is unchanged - * because there is no good way to determine a name. */ - action.slot_identifier_set(*bmain, slot_to_assign, user_infos[0].id->name); - } for (ActionUserInfo &action_user : user_infos) { const ActionSlotAssignmentResult result = generic_assign_action_slot( &slot_to_assign, diff --git a/tests/python/bl_animation_action.py b/tests/python/bl_animation_action.py index efe85cb3614..0ba4d556131 100644 --- a/tests/python/bl_animation_action.py +++ b/tests/python/bl_animation_action.py @@ -513,8 +513,8 @@ class VersioningTest(unittest.TestCase): self.assertEqual(len(strip.channelbags[0].groups), 1) self.assertEqual(len(strip.channelbags[0].groups[0].channels), 9) - # Multi user slots do not get named after their users. - self.assertEqual(action.slots[0].identifier, "OBSlot") + # Slots created from legacy Actions are always called "Legacy SLot". + self.assertEqual(action.slots[0].identifier, "OBLegacy Slot") def test_action_constraint(self): constrained_object = bpy.data.objects["action_constraint_constrained"] @@ -546,8 +546,8 @@ class VersioningTest(unittest.TestCase): self.assertEqual(len(strip.channelbags[0].groups[0].channels), 10) self.assertEqual(len(strip.channelbags[0].groups[1].channels), 10) - # Slots with a single user are named after their user. - self.assertEqual(action.slots[0].identifier, "OBarmature_object") + # Slots on converted Actions are always called "Legacy Slot" + self.assertEqual(action.slots[0].identifier, "OBLegacy Slot") for fcurve in strip.channelbags[0].groups[0].channels: self.assertEqual(fcurve.group.name, "Bone")