only write animations if the layer has animations