I'm new in a Photoshop plugin developing and I need your help.
I need to build a Layer's tree (for example layers rectangle coords) with Export plugin.
But I have a problem with:
1. how to make export plugin (there are many filter plugin samples). When I try just to change file extension from 8bf to 8be it's do nothing.
I changed input argument from FilterRecord to the ExportRecord, but still nothing...
2. How can I take the layer's tree? I read about ReadImageDocumentDesc. But how can I get this pointer from my plugin? can I take it from Filter plugin?
Also I need to get Layer's groups, slices on the Layers and Text from text layer. is it possible to get with API. Is it possible to get sucho information with Export plugin, or I need to use automation?
Thx for your reply. I didn't know about PiPL.
I made export plugin. I can get Channels list from ReadImageDocumentDesc structure of ExportRecord->documentInfo.
but I need all layers info. and all учсузе targetCompositeChannels is NULL.
Thx for Your reply.
but I didn't understand about layers.
channel port interface give me the access to the pixels, but not to the layers information. I'll be able to use the user channel port interface for read that layer's image when read the layers RECT info. but I can't find routine for layers metadata..
I try to use ReadImageDocumentDesc (from documentInfo).
But as I wrote upper all the Lists are NULL (in Export and Filter plugins). may be I need to ask PS to give me this pointers (with AdvanceStateProc)?
I found some information.
My PIGeneral.h file was very old... and i havn't ReadLayerDesc definition in it..
i found some information about layer(like a name, id, readchhanelport).
and how can i get layertype information? for example text of the text layer?
Channel Ports give you access to all the layers, channels, etc.
Please see the SDK documentation for how the channel port APIs work.
I don't believe you can get the raw text for a text layer -- because that's about 1% of the information needed to render the text layer.
For getting the layer structure an automation plug-in is the way to go this will give you the layer groups as well very easily. If you really need it in the Export menu I would suggest having a dummy Export that just fires a command and then have your automation plug-in listen for that. Kind of hacky but it seems you really want an export plug-in. If you don't want to go down the automation route you can get some information out of the documentInfo structure in the ExportRecord. This has a linked list of layers in the document.