Copy link to clipboard
Copied
Here again,
starting from script (courtesy of brianp311 in my last request) I'm trying for pages with graphics in multiply blend mode.
Thanks to everyone
Mario
var pages = app.activeDocument.pages.everyItem().getElements();
var pagesWithGraphics = [];
for (var i = 0; i < pages.length; i++) {
if (pages[i].allGraphics./*with multiply blend mode*/.length > 0) {
pagesWithGraphics.push(pages[i].name);
}
}
Not too accustomed to scripting that setting, but does this work?
var hasMultiplyBlend = function(allGraphics) {
for (var i = 0; i < allGraphics.length; i++) {
if (allGraphics[i].transparencySettings.blendingSettings.blendMode == BlendMode.MULTIPLY) {
return true;
}
}
return false;
}
var pages = app.activeDocument.pages.everyItem().getElements();
var pagesWithGraphics = [];
for (var i = 0; i < pages.length; i++) {
if (hasMultiplyBlend(pages[i].allGrap
...
Copy link to clipboard
Copied
Should at least one graphic on the page have it or all graphics on the page?
Copy link to clipboard
Copied
Hi brian, at least one graphic on the page.
Copy link to clipboard
Copied
What type of multiply blend setting on the graphic. There are many (ie for transparency, drop shadow, for the content of the graphic, etc). Can you take a screenshot of the setting you're wanting to check?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Not too accustomed to scripting that setting, but does this work?
var hasMultiplyBlend = function(allGraphics) {
for (var i = 0; i < allGraphics.length; i++) {
if (allGraphics[i].transparencySettings.blendingSettings.blendMode == BlendMode.MULTIPLY) {
return true;
}
}
return false;
}
var pages = app.activeDocument.pages.everyItem().getElements();
var pagesWithGraphics = [];
for (var i = 0; i < pages.length; i++) {
if (hasMultiplyBlend(pages[i].allGraphics)) {
pagesWithGraphics.push(pages[i].name);
}
}
alert(pagesWithGraphics);
Copy link to clipboard
Copied
It runs within hidden layers too but IT WORKS for me.
Well done brian!
Thanks again
Mario