I am a 2D animator for games and use an animation software called Spine created by Esoteric Software. Spine uses pngs that are then attached to a skeletal structure and manipulated with bones.
Esoteric provide an open source Photoshop script that exports each layer of your PSD as a png, they can then be imported to Spine.
My games process of implementing assets means that each png's dimensions must be divisible by 16. (eg. if a png is 432x240 then this is fine as both the height & width are divisible by 16).
I was hoping someone here could help with customising the current Esoteric script so it could do the following during the png export:
1. Check the layer is divisible by 16
2. If the layer is not divisible by 16, add pixels equally to the height and width to make it divisible & export a png
3. If the layer is divisible, export the layer as a png as normal.
Any help with this would be greatly appreciated, as a humble animator this is WAY over my head!

Many thanks,
Steve