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

Which attribute defines the transparency of an object?

Contributor ,
May 06, 2022 May 06, 2022

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
689
Translate
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);
Translate
Adobe
Community Expert ,
May 06, 2022 May 06, 2022

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

Translate
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

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

 

 

Translate
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

opacity?

 

can you elaborate?

Translate
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

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

 

 

Translate
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

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

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.

Translate
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
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

 

Translate
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