• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

418

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

Community Expert , 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
...

Votes

Translate

Translate
Community Expert ,
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?

Votes

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.

 

Votes

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
Community Expert ,
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? 

Votes

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

 

Votes

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
Community Expert ,
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);

Votes

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

Votes

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