function savePaddingToLayer(padding, layer) {
  if (!canLayerHavePadding(layer)) return


  var name = layer.name().split('[')[0]

  if (!padding) {
    layer.name = name
    return
  }

  if (name.slice(-1) != ' ')
    name += ' '

  layer.name = name + '[' + paddingToString(padding) + ']'
}
Given a padding object, save it to a layer in it's name
Preserving the layers current name