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...
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);
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
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....
Copy link to clipboard
Copied
opacity?
can you elaborate?
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....
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);
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.
Copy link to clipboard
Copied
My test found that it can only access the opacity of the whole object, not the opacity with details.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now