What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

I've built a Windows Phoshop CS6 / CSS C++ plugin; how it works is it exports each layer in the document (By name) with it's proper image format (png, jpg, etc), my issue is:




I have to turn off visibility on each other layer in order to export the one layer (I have to loop through all the layers and apply event hide / show) like this:



 error = sPSActionControl->Play(&result, eventHide, desc2, plugInDialogSilent);

  if (error) goto returnError;



  error = sPSActionControl->Play(&result, eventShow, desc, plugInDialogSilent); 

  if (error) goto returnError;




What I would like to do is export the layer itself as an object /Element directly.



Do you know off the top of your head if I am able to pass in any predefined key or an event to 'sPSActionControl' that would allow me to export out a single layer (Without having to change any layer visibility)? Or preferably a function to pass in a layer ID and export that directly? ExportLayerByID(1, "myLayer.png"); This is how I get my layers ID (Pulled from my Photoshop listener):




PIUGetInfoByIndexIndex(layCounter, activeDocID, classLayer, classDocument, 0, &descLayer, NULL);




I would like to do something like this:




error = sPSActionList->PutData(desc, keyThatIDontKnowExists, TheLayerToExport);


Thanks for any help, this is killing me. 


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top