Swatch selection reset bug

The app.activeDocument.swatches.getSelected() method gets an array of selected colors in the Swatches panel of the document. What happens when you apply colors from the array to selected objects? If you select one path in the document and apply a color to it, all swatches remain selected.

Applying colors to one selected path

If many paths are selected, applying a swatch to any path resets the color selection. If you create a script to paint objects with selected colors, it makes the user’s job more difficult. To run the script again, the user has to select the swatches again.

Resetting colors for multiple paths

My bug report on Adobe Illustrator Uservoice.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
AiScripts

Sergey Osokin. I’m a illustrator & Script Developer (Ai, Ps). Writing about bugs and tricks.