Iam trying to assign "ACTION1" and "ACTION2" to several objects.
This is my current code:
def copyAnim(animObj): context = bpy.context obj = bpy.data.objects[animObj] obs = [o for o in bpy.data.objects if o.name.startswith("object")] action = obj.animation_data.action print(obs) for ob in obs: if ob.animation_data: ob.animation_data.action = action.copy() else: ob.animation_data_create() ob.animation_data.action = action.copy() copyAnim('Object_Holding_ACTION1')
But here is the Problem: if i want to add another action (with
"ACTION1" gets overwritten.