Monday, March 29, 2010

Multiple preview in Filter Plugin

Hi All,



Is it possible to have multiple previews of different images (one for one image)at the same time. I have made a filter plugin which shows one preview of the Current open document.



Now suppose I have opened 5 Different images in Photoshop and I clicked my filter plugin it shows one preview on the dialog, of the image which is on the top of all the Images (i.e. Currently have focus or selection). Can I display the rest 4 Images on my dialog box as preview at the same time without changing the focus.



Does Anyone have any idea?



Thanks and Regards,

Sunil Kumar
Multiple preview in Filter Plugin
I'm not sure if this will help you, but you can loop through all openend documents, as shown in the getter example and retrieve the document ids (code below).



// we are ignoring errors so this will not give an invalid error

// message when there are no documents open

//Get actives doc ID:

PIUGetInfo(classDocument, keyDocumentID, %26amp;currentDocumentID, NULL);



//Get Number of openend docs:

PIUGetInfo(classApplication, keyNumberOfDocuments, %26amp;numDocuments, NULL);



if (numDocuments %26gt; 0)

{

for (docCounter = 1; docCounter %26lt;= numDocuments; docCounter++)

{

// this routine will error if we select the document



// that is already selected, we don't care about this



// as an error, keep chugging



(void) PIUSelectByIndex(classDocument, docCounter);

GetPathInfo(logfilename);

GetHistoryInfo(logfilename);

}

// this routine will error if we select the document

// that is already selected, we don't care about this

// as an error, keep chugging

//select the original front doc again

(void) PIUSelectByID(classDocument, currentDocumentID);

}

No comments:

Post a Comment