i seem to recall a while back someone posting a photoshop script that would take and export out folders as seperate files based on the folder name
say i have a file with 50 folders in its layers, in each folder theres like 2 or 3 layers
i would like to save these all out as .dds with each one named the same as the folder. anyone remember anything like that?
Replies
I also found this:
http://www.damienvanholten.com/blog/export-groups-to-files-photoshop/
it saves out as PNGs but I'm sure you can modify to save as other formats.
sure you could first save them out as tga and batch convert to DDS.
i used the vTools Folder Exporting heavily on a project (around 40-60 folders) - but as its scripted, it can take an awufully long time to process everything. maybe anyone comes up with something better.
#target photoshop app.bringToFront(); docRef = app.activeDocument; for(i = 0; i < docRef.layerSets.length; i++) { tempDoc = app.documents.add(docRef.width, docRef.height, 72, docRef.layerSets[i].name); app.activeDocument = docRef; docRef.layerSets[i].duplicate(tempDoc); app.activeDocument = tempDoc; tempDoc.mergeVisibleLayers(); tempDoc.saveAs(File(docRef.path + "\\" + tempDoc.name + ".tga"), TargaSaveOptions, false, Extension.NONE); //you could change "\\" to "\\TGA\\" or something, if you prefer tempDoc.close(SaveOptions.DONOTSAVECHANGES); }You just need to replace the TGA part with that and change the "filename.dds" part with the corresponding variable. ( something like [ docRef.path + "/" + tempDoc.name + ".dds" ] )
var idsave = charIDToTypeID( "save" ); var desc2 = new ActionDescriptor(); var idAs = charIDToTypeID( "As " ); var desc3 = new ActionDescriptor(); var idbarF = charIDToTypeID( "barF" ); desc3.putBoolean( idbarF, true ); var idfdev = charIDToTypeID( "fdev" ); desc3.putDouble( idfdev, 3.000000 ); var idfbia = charIDToTypeID( "fbia" ); desc3.putDouble( idfbia, 0.000000 ); var idurad = charIDToTypeID( "urad" ); desc3.putDouble( idurad, 5.000000 ); var iduamo = charIDToTypeID( "uamo" ); desc3.putDouble( iduamo, 0.500000 ); var iduthr = charIDToTypeID( "uthr" ); desc3.putDouble( iduthr, 0.000000 ); var idxstf = charIDToTypeID( "xstf" ); desc3.putDouble( idxstf, 1.000000 ); var idxthf = charIDToTypeID( "xthf" ); desc3.putDouble( idxthf, 1.000000 ); var idqual = charIDToTypeID( "qual" ); desc3.putInteger( idqual, 71 ); var iderdi = charIDToTypeID( "erdi" ); desc3.putBoolean( iderdi, false ); var iderdw = charIDToTypeID( "erdw" ); desc3.putInteger( iderdw, 1 ); var idusfa = charIDToTypeID( "usfa" ); desc3.putBoolean( idusfa, false ); var idtxfm = charIDToTypeID( "txfm" ); desc3.putInteger( idtxfm, 7 ); var idweig = charIDToTypeID( "weig" ); desc3.putInteger( idweig, 0 ); var idtmty = charIDToTypeID( "tmty" ); desc3.putInteger( idtmty, 0 ); var idmmty = charIDToTypeID( "mmty" ); desc3.putInteger( idmmty, 30 ); var idsmip = charIDToTypeID( "smip" ); desc3.putInteger( idsmip, 0 ); var idbina = charIDToTypeID( "bina" ); desc3.putBoolean( idbina, false ); var idprem = charIDToTypeID( "prem" ); desc3.putBoolean( idprem, false ); var idfilm = charIDToTypeID( "film" ); desc3.putBoolean( idfilm, false ); var idalpb = charIDToTypeID( "alpb" ); desc3.putBoolean( idalpb, false ); var idbord = charIDToTypeID( "bord" ); desc3.putBoolean( idbord, false ); var idbrdr = charIDToTypeID( "brdr" ); desc3.putDouble( idbrdr, 0.000000 ); var idbrdg = charIDToTypeID( "brdg" ); desc3.putDouble( idbrdg, 0.000000 ); var idbrdb = charIDToTypeID( "brdb" ); desc3.putDouble( idbrdb, 0.000000 ); var idmmft = charIDToTypeID( "mmft" ); desc3.putInteger( idmmft, 1 ); var idfdcl = charIDToTypeID( "fdcl" ); desc3.putBoolean( idfdcl, false ); var idfdaf = charIDToTypeID( "fdaf" ); desc3.putBoolean( idfdaf, false ); var idftworl = charIDToTypeID( "f2rl" ); desc3.putDouble( idftworl, 0.500000 ); var idftwogl = charIDToTypeID( "f2gl" ); desc3.putDouble( idftwogl, 0.500000 ); var idftwobl = charIDToTypeID( "f2bl" ); desc3.putDouble( idftwobl, 0.500000 ); var idftwoal = charIDToTypeID( "f2al" ); desc3.putDouble( idftwoal, 0.500000 ); var idfddl = charIDToTypeID( "fddl" ); desc3.putInteger( idfddl, 0 ); var idfafm = charIDToTypeID( "fafm" ); desc3.putDouble( idfafm, 0.150000 ); var idbafh = charIDToTypeID( "bafh" ); desc3.putDouble( idbafh, 0.500000 ); var iddthc = charIDToTypeID( "dthc" ); desc3.putBoolean( iddthc, false ); var iddthzero = charIDToTypeID( "dth0" ); desc3.putBoolean( iddthzero, false ); var idsmth = charIDToTypeID( "smth" ); desc3.putInteger( idsmth, 0 ); var idfilg = charIDToTypeID( "filg" ); desc3.putDouble( idfilg, 2.200000 ); var idfieg = charIDToTypeID( "fieg" ); desc3.putBoolean( idfieg, false ); var idfilw = charIDToTypeID( "filw" ); desc3.putDouble( idfilw, 10.000000 ); var idover = charIDToTypeID( "over" ); desc3.putBoolean( idover, false ); var idfblr = charIDToTypeID( "fblr" ); desc3.putDouble( idfblr, 1.000000 ); var idnmcv = charIDToTypeID( "nmcv" ); desc3.putBoolean( idnmcv, false ); var idncnv = charIDToTypeID( "ncnv" ); desc3.putInteger( idncnv, 1009 ); var idnflt = charIDToTypeID( "nflt" ); desc3.putInteger( idnflt, 1040 ); var idnmal = charIDToTypeID( "nmal" ); desc3.putInteger( idnmal, 1033 ); var idnmbr = charIDToTypeID( "nmbr" ); desc3.putBoolean( idnmbr, false ); var idnmix = charIDToTypeID( "nmix" ); desc3.putBoolean( idnmix, false ); var idnmiy = charIDToTypeID( "nmiy" ); desc3.putBoolean( idnmiy, true ); var idnmiz = charIDToTypeID( "nmiz" ); desc3.putBoolean( idnmiz, false ); var idnmah = charIDToTypeID( "nmah" ); desc3.putBoolean( idnmah, false ); var idnswp = charIDToTypeID( "nswp" ); desc3.putBoolean( idnswp, false ); var idnmsc = charIDToTypeID( "nmsc" ); desc3.putDouble( idnmsc, 5.000000 ); var idnmnz = charIDToTypeID( "nmnz" ); desc3.putInteger( idnmnz, 0 ); var idusbi = charIDToTypeID( "usbi" ); desc3.putBoolean( idusbi, false ); var idlien = charIDToTypeID( "lien" ); desc3.putBoolean( idlien, false ); var idshdi = charIDToTypeID( "shdi" ); desc3.putBoolean( idshdi, false ); var idshfi = charIDToTypeID( "shfi" ); desc3.putBoolean( idshfi, false ); var idshmm = charIDToTypeID( "shmm" ); desc3.putBoolean( idshmm, true ); var idshan = charIDToTypeID( "shan" ); desc3.putBoolean( idshan, true ); var idclrc = charIDToTypeID( "clrc" ); desc3.putInteger( idclrc, 0 ); var idvdxone = charIDToTypeID( "vdx1" ); desc3.putBoolean( idvdxone, true ); var idvdxtwo = charIDToTypeID( "vdx2" ); desc3.putBoolean( idvdxtwo, true ); var idvdxthree = charIDToTypeID( "vdx3" ); desc3.putBoolean( idvdxthree, true ); var idvdxfive = charIDToTypeID( "vdx5" ); desc3.putBoolean( idvdxfive, true ); var idvfourfourfour = charIDToTypeID( "v444" ); desc3.putBoolean( idvfourfourfour, true ); var idvfivefivefive = charIDToTypeID( "v555" ); desc3.putBoolean( idvfivefivefive, true ); var idvfivesixfive = charIDToTypeID( "v565" ); desc3.putBoolean( idvfivesixfive, true ); var idveighteighteight = charIDToTypeID( "v888" ); desc3.putBoolean( idveighteighteight, true ); var idalph = charIDToTypeID( "alph" ); desc3.putBoolean( idalph, false ); var idusra = charIDToTypeID( "usra" ); desc3.putBoolean( idusra, false ); var idusfs = charIDToTypeID( "usfs" ); desc3.putInteger( idusfs, 0 ); var idprev = charIDToTypeID( "prev" ); desc3.putBoolean( idprev, false ); var idrdep = charIDToTypeID( "rdep" ); desc3.putInteger( idrdep, 3000 ); var idlomm = charIDToTypeID( "lomm" ); desc3.putBoolean( idlomm, false ); var idsflp = charIDToTypeID( "sflp" ); desc3.putBoolean( idsflp, false ); var idlflp = charIDToTypeID( "lflp" ); desc3.putBoolean( idlflp, false ); var idscar = charIDToTypeID( "scar" ); desc3.putDouble( idscar, 1.000000 ); var idscag = charIDToTypeID( "scag" ); desc3.putDouble( idscag, 1.000000 ); var idscab = charIDToTypeID( "scab" ); desc3.putDouble( idscab, 1.000000 ); var idscaa = charIDToTypeID( "scaa" ); desc3.putDouble( idscaa, 1.000000 ); var idbiar = charIDToTypeID( "biar" ); desc3.putDouble( idbiar, 0.000000 ); var idbiag = charIDToTypeID( "biag" ); desc3.putDouble( idbiag, 0.000000 ); var idbiab = charIDToTypeID( "biab" ); desc3.putDouble( idbiab, 0.000000 ); var idbiaa = charIDToTypeID( "biaa" ); desc3.putDouble( idbiaa, 0.000000 ); var idsiar = charIDToTypeID( "siar" ); desc3.putDouble( idsiar, 1.000000 ); var idsiag = charIDToTypeID( "siag" ); desc3.putDouble( idsiag, 1.000000 ); var idsiab = charIDToTypeID( "siab" ); desc3.putDouble( idsiab, 1.000000 ); var idsiaa = charIDToTypeID( "siaa" ); desc3.putDouble( idsiaa, 1.000000 ); var idbiir = charIDToTypeID( "biir" ); desc3.putDouble( idbiir, 0.000000 ); var idbiig = charIDToTypeID( "biig" ); desc3.putDouble( idbiig, 0.000000 ); var idbiib = charIDToTypeID( "biib" ); desc3.putDouble( idbiib, 0.000000 ); var idbiia = charIDToTypeID( "biia" ); desc3.putDouble( idbiia, 0.000000 ); var idoutw = charIDToTypeID( "outw" ); desc3.putBoolean( idoutw, false ); var idclcL = charIDToTypeID( "clcL" ); desc3.putBoolean( idclcL, true ); var idNVIDIADthreeDDS = stringIDToTypeID( "NVIDIA D3D/DDS" ); desc2.putObject( idAs, idNVIDIADthreeDDS, desc3 ); var idIn = charIDToTypeID( "In " ); desc2.putPath( idIn, new File( "C:/filename.dds" ) ); var idCpy = charIDToTypeID( "Cpy " ); desc2.putBoolean( idCpy, true ); executeAction( idsave, desc2, DialogModes.NO );vSavePSDTGA and vQuickPSDTGA are the ones you want
is old but works in my PS cs5 fine
edit didnt notice someone already mentioned vtools