: Splitting PSD to Multiple I have a large PSD which has approaching 100 top level groups. They're label designs, all of which are similar but with varying colours/patterns/text/images for the different
I have a large PSD which has approaching 100 top level groups. They're label designs, all of which are similar but with varying colours/patterns/text/images for the different parts of the label. Opening this PSD is taking longer and longer. Is there a way I can (relatively) quickly split the file into multiple PSDs, each of which contains one top level group?
More posts by @Jessie844
2 Comments
Sorted by latest first Latest Oldest Best
If you happen to be less comfortable with scripts and looking for another option, you should know that when you duplicate a layer or a group, you can always pinpoint to send it to another destination document. You could probably streamline some of the process with actions.
Also, if you have a destination document open, you can grab the group to the other document while holding shift so that it will paste in the same place.
This should get you close enough, if not all the way.
This script goes through every top level layer, duplicates them one by one into a new document and triggers an Action after each duplication.
var docName = app.activeDocument.name.split('.')[0];
for( var i = 0 ; i < app.activeDocument.layers.length; i++ ){
app.activeDocument.activeLayer = app.activeDocument.layers[i];
// =======================================================
var idMk = charIDToTypeID( "Mk " );
var desc123 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref86 = new ActionReference();
var idDcmn = charIDToTypeID( "Dcmn" );
ref86.putClass( idDcmn );
desc123.putReference( idnull, ref86 );
var idNm = charIDToTypeID( "Nm " );
desc123.putString( idNm, docName +' '+ ( i + 1 ) );
var idUsng = charIDToTypeID( "Usng" );
var ref87 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref87.putEnumerated( idLyr, idOrdn, idTrgt );
desc123.putReference( idUsng, ref87 );
var idVrsn = charIDToTypeID( "Vrsn" );
desc123.putInteger( idVrsn, 5 );
executeAction( idMk, desc123, DialogModes.NO );
doAction('Loop Layers', 'Loop Layers');
}
All you need next is to create an Action called Loop Layers in a folder called Loop Layers.
The naming is important, because it's hard coded into the script.
What you need to record into the action is this:
Image > Trim ( Optional )
File > Save as... ( Select the location and file format. Just don't touch the filename at all )
File > Close ( Technically optional, but you'll likely want to do this. Make sure that when you record this part, it asks "Save changes before closing..." and you press "No". You can make sure that it asks you by making changes to the document before recording this. ).
The duplication part of the script makes sure that each duplicate document gets a filename based on the original document name + a subsequent number based on the loop cycle. This makes sure that when the files are saved, the filenames are unique.
A little preview of what the script does.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.