I remember being able to animate layers using keyframes in some previous Blender release.
Now if I try to add a keyframe to an object layer I get the following error message :
"layers" property cannot be animated
I have the following code which can change the layer, but it's not really useful, I would like to have it in an animation, so I can reuse it.
bpy.data.objects['Cube'].layers = [False, True, False, False, False, False, False,False,False,False,False,False,False,False,False,False,False,False,False,False]