Opacity set with an action does not match appearance of opacity set manually
When trying to select multiple objects with the same fill color and opacity, selecting one of them and under the Select menu choosing Same > Appearance will add all the same fill and opacity objects to the selection.
However, when creating an object via an action and setting the fill color and opacity to match the objects to be selected, Select > Same > Appearance returns no results.
Manually selecting multiple objects in addition to the object created with the action shows "Mixed appearances" in the Properties panel. Individually selecting each of the objects shows the same attributes. Selecting multiples of manually created objects all show the same appearance properties. Adding an object with the same attributes but which was created via an action shows "mixed appearances."
This was posted in the Adobe community forum: https://community.adobe.com/t5/illustrator-discussions/select-same-gt-appearance-works-manually-but-not-in-an-action/td-p/14898865
Here are the steps to repeat:
Make a new, blank document.
Start recording an action in the Action panel.
Record yourself making a new rectangle with the Rectangle tool.
Set the Fill to Black, and the Stroke to None.
Change the Opacity in the Transparency panel to 20%.
Stop recording.
Move that frame to the side.
Manually create a new rectangle, using the same steps as above.
Under the Select menu, choose "Same > Appearance."
You should see the previous rectangle you made included in the selection.
Your Properties and Attributes panels should contain the same information for both objects.
Now run your action you just recorded in the Actions panel.
Choose Select > Same > Appearance.
Note that nothing else gets selected.
Manually select the rectangle created by the action plus either of the ones created manually.
Note the Attributes panel now says "Mixed Attributes."
You recorded yourself making an object with certain attributes. You played back that action and according to every panel it has the same attributes as the one you previously created, but you cannot use Select > Same > Appearance to select them both because the appearances are "Mixed."
The only way to work around this is to create a Graphics Style with the attributes (opacity, fill) being searched for. Then an object can be created with an action, the action can assign the Graphics Style, and then Select > Same > Appearance will find all of the objects with the same fill and opacity (even if those objects do not have the Graphics Style applied).
-
David Cardillo commented
I'll likely add this as a feature request, but a Select > Similar would go a long way toward fixing this.
In my specific case, I had some shadows (set with opacity) at 20%, some were 22%. These were two different selction actions.
I also had upwards of a half-dozen swatches for some colors that were 1-2 units (RGB) apart from each other. Yes, those are different swatches, different colors, but it would be helpful to be able to select a range, as you can in Photoshop.
-
Saving a test document without compression and digging through code reveals that the opacities differ indeed. The one has integer 20, and the other one has a looong fraction tail.
For some reason Ai is way too scrupulous with Select Same with these, but lies when recording an action... or playing it!The one made with an action has the fractions, although if you study the code form the .aia action set file, it says 'value 20’.
-
Bonkers. Confirmed.
-
David Cardillo commented
Video of the observed behavior: https://app.screencast.com/dQQAjWL9SEUgl
-
David Cardillo commented
My system:
MacBook Pro
15-inch, 2018
2.9 GHz 6-Core Intel Core i9
Radeon Pro 560X 4 GB
Intel UHD Graphics 630 1536 MB
32 GB 2400 MHz DDR4
Illustrator version: 28.3.0