Skip to main content
Participating Frequently
April 24, 2008
Question

Importing files from Bridge into a stack in Photoshop

  • April 24, 2008
  • 12 replies
  • 2904 views
Hi guys,

Photoshop has a great function of loading files into a single stack, so as not to have many 10's of files to open. Bridge on the other hand allows for better viewing and navigation through folders etc. Just wondering if it was possible to select all the files you wanted open to a stack from bridge but these then to open in photoshop in a single psd file. It is possible to open all the files from Bridge then run the load in stack from the open files but then you have to close each file manually.

Not sure if a photoshop script can be drag 'n' dropped into Bridge and load from there once the files have been highlighted. If so which folder as there are already Photoshop scripts avaliable in Bridge but cant seem to find how or where they are stored.

Any help would be much appreciated. Many thanks in advance.
This topic has been closed for replies.

12 replies

Paul Riggott
Inspiring
April 28, 2008
This seems to work.<br />Select your files in bridge then run script from Photoshop.<br />It should open all your files, call "Load Files into Stack.jsx"<br />Click the button "Open Open Files" it will then stack your files and then close all files except your new stacked file.<br />Most of the script is from Xbytor.<br />Paul.<br /><br />BridgeTalk.prototype.ah_getBTSpecifier = function (tApp) { <br /> if (BridgeTalk.appName == tApp) return tApp + '-' + app.version.replace(/\..*$/,"") <br /> else if (BridgeTalk.appName == 'bridge' && tApp == 'photoshop') { <br /> return tApp + '-' + Number(Number(app.version.replace(/\..*$/,"")) + 8 ) ;} <br /> else if (BridgeTalk.appName == 'photoshop' && tApp == 'bridge') { <br /> return tApp + '-' + Number(Number(app.version.replace(/\..*$/,"")) - 8 ) ; <br /> } <br />} <br /><br />BridgeTalk.prototype.sendSynch = function(timeout) { <br /> var self = this; <br /> self.onResult = function(res) { <br /> this.result = res.body; <br /> this.complete = true; <br /> } <br /> self.complete = false; <br /> <br /> self.send(); <br /> <br /> if (timeout) { <br /> var i = 0; <br /> while(!self.complete) { <br /> BridgeTalk.pump(); // process any outstanding messages <br /> $.sleep(1000); <br /> if (i == timeout) { <br /> if (!confirm("Still Collection Bridge Data, Continue?")) return; <br /> else i = 0; <br /> } <br /> else i++; <br /> } <br /> } <br /><br /> var res = self.result; <br /> self.result = self.complete = self.onResult = undefined; <br /> return res; <br />}; <br /><br />function getBridgeSelectionsAsString() { <br /> function getBridgeFiles() { <br /> var v = app.document.selections; <br /> var files = new Array(); <br /> for (var i = 0; i < v.length; i++) { <br /> files = v.spec; <br /> } <br /> return files; <br /> } <br /><br /> if (BridgeTalk.appName != "photoshop" || BridgeTalk.appVersion.replace(/\..*$/,"") < 9) { <br /> alert("This only works from Photoshop CS2/CS3"); <br /> return; <br /> } <br /> <br /> var bt = new BridgeTalk(); <br /> var bridgeApp = bt.ah_getBTSpecifier("bridge"); <br /> if (!BridgeTalk.isRunning(bridgeApp)) { <br /> alert("Please launch " + bridgeApp + " then click OK"); <br /> if (!BridgeTalk.isRunning(bridgeApp)) return; <br /> } <br /> bt.target = bridgeApp; <br /> bt.body = getBridgeFiles.name + "();" + getBridgeFiles.toString(); <br /> return bt.sendSynch(2); <br />} <br />var Names = new Array;<br />var fileList = getBridgeSelectionsAsString(); <br />fileList = fileList.split(',');<br />for (var a = 0;a<fileList.length;a++){<br /> var file = new File(fileList);<br /> Names.push(file.name);<br /> open(file);<br /> }<br /><br />$.evalFile(Folder.appPackage+"/Presets/Scripts/Load Files into Stack.jsx");<br /><br />for (var a =0 ; a<Names.length;a++){<br /> activeDocument = documents.getByName(Names);<br /> activeDocument.close(SaveOptions.DONOTSAVECHANGES);<br />}
Participating Frequently
April 28, 2008
Any idea's guys and girls.....?

Would also be possible if I could make a selection of the highlighted files in Bridge, then go back to Photoshop/open and it remember or recall those files I highlighted in Bridge. Then run the script from there. Either way would work.

Thanks again.