Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Push graphics with multiply blend mode in a list

Explorer ,
May 13, 2021 May 13, 2021

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);
    }
}
TOPICS
Scripting

Views

241

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , May 13, 2021 May 13, 2021
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...

Likes

Translate

Translate
Adobe Community Professional ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

Should at least one graphic on the page have it or all graphics on the page?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

Hi brian, at least one graphic on the page.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 13, 2021 May 13, 2021

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? 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

Multiply effects directly applied to linked images (i. e. the same applied to photoshop layers).

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 13, 2021 May 13, 2021

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);

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 13, 2021 May 13, 2021

Copy link to clipboard

Copied

LATEST

It runs within hidden layers too but IT WORKS for me.

Well done brian!

Thanks again

Mario

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines