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

Which attribute defines the transparency of an object?

Contributor ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

HI, Which attribute defines the transparency of an object? I want to find out from a large number of objects that use transparency...

TOPICS
Scripting

Views

322

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 06, 2022 May 06, 2022

Which objects?

PathItems?

In Groups or CompoundPaths Or in Selections or in Layers/Sublayers/Document?

Fill color opacity? Or Stroke color opacity? Or Opacity in multiple colors/strokes?

In Gradients?

 

Unfortunately, not everything can be accessed with scripting!

 

For the beginning:

// select (only) one pathItem before running this snippet
var aSel = app.activeDocument.selection[0];
if (aSel.typename == "PathItem" && aSel.opacity < 100) alert(aSel.opacity);

Votes

Translate

Translate
Adobe
Community Expert ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

Independent of scripting this ...

Transparency can be applied to

- the object altogether: opacity and/or blend mode and/or pixel based effects

- the fill (there can be multiple)

- the stroke (there can be multiple)

- if there is a gradient applied, the gradient stops can have opacity settings

- in patterns the elements inside the pattern can have opacity/blend modes

- same goes for brushes

- while the stroke width is zero, the brush can still be applied to the object

- there can be an opacity mask applied

- transparency can also be applied to the group or layer the object is a part of

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
Contributor ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

Thank you for your further reply!

I want to find all objects with opacity applied (< 100), regardless of what it is, pathItems,groupItems,text or others pageItems can....

 

RaymondZJH_3-1651891527164.png

 

 

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 06, 2022 May 06, 2022

Copy link to clipboard

Copied

opacity?

 

can you elaborate?

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
Contributor ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

Hi Carlos,

 

Yes, it is opacity (<100)

 

I want to find all objects with opacity applied (< 100), regardless of what it is, pathItems,groupItems,text or others pageItems can....

 

RaymondZJH_1-1651892269444.png

 

 

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 06, 2022 May 06, 2022

Copy link to clipboard

Copied

Which objects?

PathItems?

In Groups or CompoundPaths Or in Selections or in Layers/Sublayers/Document?

Fill color opacity? Or Stroke color opacity? Or Opacity in multiple colors/strokes?

In Gradients?

 

Unfortunately, not everything can be accessed with scripting!

 

For the beginning:

// select (only) one pathItem before running this snippet
var aSel = app.activeDocument.selection[0];
if (aSel.typename == "PathItem" && aSel.opacity < 100) alert(aSel.opacity);

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
Contributor ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

It's pageItems in document.

I want to find all objects with opacity applied (< 100), regardless of what it is, pathItems,groupItems,text or others pageItems can....

 

// select (only) one pathItem before running this snippet
var aSel = app.activeDocument.selection[0];
if (aSel.typename == "PathItem" && aSel.opacity < 100) alert(aSel.opacity);

 

This is really a good beginning:  

aSel.opacity<100

 

Thank you.

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
Contributor ,
May 13, 2022 May 13, 2022

Copy link to clipboard

Copied

LATEST

My test found that it can only access the opacity of the whole object, not the opacity with details.

 

RaymondZJH_1-1652431273751.png

 

RaymondZJH_0-1652431119147.png

 

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