This Python plugin will iterate through the documents' layers, and then write out each bitmap layer to /tmp as a tiff.
import objc, os, math
from Foundation import *
from AppKit import *
ACScriptSuperMenuTitle = None
ACScriptMenuTitle = "Write out layers to tmp"
def main(image):
doc = NSDocumentController.sharedDocumentController().currentDocument()
layerCount = 0
for layer in doc.layers():
if layer.layerType() == 1: # bitmap layer
ciimage = layer.CIImage()
nsimage = ciimage.NSImage()
tiffData = nsimage.TIFFRepresentation()
tiffData.writeToFile_atomically_("/tmp/layer%d.tiff" % layerCount, False)
layerCount = layerCount + 1
# we're not changing the image, so we'll return nothing to put on
return None
Back to
AcornPlugins