Copy link to clipboard
Copied
Please help me find a way to remove all channel masks on the channel panel with .jsx or action files (except 4 default channel masks) like this:
Note: They don't have the certain names.
Copy link to clipboard
Copied
An old script from @xbytor
app.displayDialogs = DialogModes.NO;
// remove all paths,
if (app.documents.length == 0) {
}
else {
var InitialPathCount = activeDocument.pathItems.length;
var PathCount = activeDocument.pathItems.length;
var PathList = new Array( );
for (var i = 0; i < PathCount; i++) {
PathList[i] = activeDocument.pathItems[i].name
}
for (var i = 0; i < PathCount; i++) {
if (activeDocument.pathItems[PathList[i]].kind != PathKind.CLIPPINGPATH) {
if (activeDocument.pathItems[PathList[i]].kind != PathKind.VECTORMASK) {
activeDocument.pathItems[PathList[i]].remove()
}
}
}
};
activeDocument.guides.removeAll();
// remove every but the composite channels,
if (documents.length > 0)
{
docRef = activeDocument;
for (var i = docRef.channels.length-1 ; i >=0 ; i--) {
if (docRef.channels[i].kind != ChannelType.COMPONENT && docRef.channels[i].kind != ChannelType.SPOTCOLOR) {
// $.writeln(docRef.channels[i].kind);
docRef.channels[i].remove(); }
}
};
function deselectLayers() {
var desc01 = new ActionDescriptor();
var ref01 = new ActionReference();
ref01.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc01.putReference( charIDToTypeID('null'), ref01 );
executeAction( stringIDToTypeID('selectNoLayers'), desc01, DialogModes.NO );
};
Copy link to clipboard
Copied
// Remove all alphas, not spot
var myChannel = app.activeDocument.channels;
for (n = myChannel.length - 1; n >= 0; n--) {
var value = myChannel[n];
aC = myChannel[n];
if (aC.kind == "ChannelType.MASKEDAREA") {
aC.remove();
}
}
// Remove all spot channels, not alphas
var myChannel = app.activeDocument.channels;
for (n = myChannel.length - 1; n >= 0; n--) {
var value = myChannel[n];
aC = myChannel[n];
if (aC.kind == "ChannelType.SPOTCOLOR") {
aC.remove();
}
}
// Remove all channels, both alpha and spot
var myChannel = app.activeDocument.channels;
for (n = myChannel.length - 1; n >= 0; n--) {
var value = myChannel[n];
aC = myChannel[n];
if (aC.kind != ChannelType.COMPONENT) {
aC.remove();
}
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Please let me know what is spot/spot color?
I have run the 1st your script, it's OK.
Thank you.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I may have been too vague:
By »printing« I meant print processes like offset or gravure, not printing on an inkjet printer etc.
Spot colors may be useful for packaging and fairly fancy artistic products, for a huge part of commercial printing 4C suffices; though 7C may be becoming more popular.
Copy link to clipboard
Copied
Sorry, forgot to mention that Script also removes Paths except a possible Clipping Path and Vector Masks.
Copy link to clipboard
Copied
Please let me know what is spot/spot color?
Copy link to clipboard
Copied
sr I replied on a wrong comment 😞
Copy link to clipboard
Copied
A Spot Channel is a Channel defining an additional actual spot color for printing.
Pantone is a popular system for defining spot colors.
As mentioned this is only relevant for printing with more (or others) than the composite colors.