diff --git a/scripts/addons_core/io_anim_bvh/import_bvh.py b/scripts/addons_core/io_anim_bvh/import_bvh.py index 5f3872a28cf..f999eece177 100644 --- a/scripts/addons_core/io_anim_bvh/import_bvh.py +++ b/scripts/addons_core/io_anim_bvh/import_bvh.py @@ -518,7 +518,13 @@ def bvh_node_dict2armature( arm_ob_adt = arm_ob.animation_data_create() action = bpy.data.actions.new(name=bvh_name) - action_slot = action.slots.new(arm_ob.id_type, arm_ob.name) + # Always use the same name for the slot. The Armature is named after the + # BVH file, and so when importing multiple files to get multiple Actions + # for a single character, it is likely that all but one of the Armatures + # is going to be deleted again. It should be simple to switch between + # imported Actions while keeping Slot auto-assignment, which means that + # all Actions should use the same slot name. + action_slot = action.slots.new(arm_ob.id_type, "Slot") arm_ob_adt.action = action arm_ob_adt.action_slot = action_slot diff --git a/scripts/addons_core/io_scene_fbx/import_fbx.py b/scripts/addons_core/io_scene_fbx/import_fbx.py index 9f688620b37..e86a781527d 100644 --- a/scripts/addons_core/io_scene_fbx/import_fbx.py +++ b/scripts/addons_core/io_scene_fbx/import_fbx.py @@ -1098,8 +1098,14 @@ def blen_read_animations(fbx_tmpl_astack, fbx_tmpl_alayer, stacks, scene, anim_o actions[key] = action = bpy.data.actions.new(action_name) action.use_fake_user = True - # Create an Action Slot. Curves created via action.fcurves will automatically be assigned to it. - action.slots.new(id_data.id_type, action_name) + # Always use the same name for the slot. It should be simple + # to switch between imported Actions while keeping Slot + # auto-assignment, which means that all Actions should use + # the same slot name. As long as there's no separate + # indicator for the "intended object name" for this FBX + # animation, this is the best Blender can do. Maybe the + # 'stack name' would be a better choice? + action.slots.new(id_data.id_type, "Slot") # If none yet assigned, assign this action to id_data. if not id_data.animation_data: