Tom,
Could you elaborate on the Properties suite you mentioned?
I need to get rather basic info from all layers in a given document - like it's name, but I find iterating through a document with about 50 layers seems to take about 5 seconds, and I'm probably going to need to handle documents with hundreds of layers.
I use the following code in a loop to get the info I need:
PIUGetInfoByIndexIndex(layerIndex, docIndex, classLayer, classDocument, keyName, name, &nameLen);
Is there a faster way or some lighter weight routine which I can use? I adapted my code from the Getter example.
The only reference to the properties suite I found was the SPProperties Suite which seemed to deal with Plugin properties, not document properties.
On a related note, I also need a list of selected layers - the only way I know is to
1) save layer visibility state
2) make all layers invisible
3) make selected layers visible (since this can be done through an API call)
4) loop through layers, the visible layers are the selected layers
5) restore layer visibility
This is a technique used in one of xbytor's scripts.
Is there a faster way? I'm anticipating a massive delay here - as I'm actually going to have to ask PS to change layer visibility *two* times in addition to obtaining layer information, which already takes too long.
Any assistance or suggestions appreciated,
Brian.
P.S I apologize for not starting a new topic, I found my questions complimentary to this thread; if inappropriate, I can post again.