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

Remove shadows from different kind of objects

New Here ,
Apr 14, 2023 Apr 14, 2023

Hi folks! Is there a way to remove shadows from many different objects at once? (It’s a map, all countries with various colors and lines). 

TOPICS
Feature request , Scripting , Third party plugins , Tools
4.2K
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 , Apr 14, 2023 Apr 14, 2023

Just for the sake of exploring options, here is another approach to removing the shadows. The downside is that it removes any raster items from the document (because expanded shadows are raster items), and doubles the paths into filled paths and stroked paths (instead of previously being both filled and stroked).

var doc = app.activeDocument,
    items = doc.rasterItems;

app.executeMenuCommand('selectall');
app.executeMenuCommand('expandStyle');
app.executeMenuCommand('deselectall');

for (var 
...
Translate
Adobe
Community Expert ,
Apr 14, 2023 Apr 14, 2023

Nadja,

 

If the shadows are the only thing that has been done to simple paths with fills and/or strokes, you can try this on a copy of the artwork (always keep a backup of artwork before you do something destructive):

 

1) Select everything,

2) In the Appearance panel reduce to basic appearance.

 

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
New Here ,
Apr 14, 2023 Apr 14, 2023

This won’t work – the illustration is very complex – some objects have lines, some not, they are filled with different colors, some are grouped, some not. If i select them all it just says mixed appearence. Basic appearance doesn’t help because many objects will change. Some even vanish.

 

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 ,
Apr 14, 2023 Apr 14, 2023

When I tested with your document, I did see some things vanish, eg. small islands. But the reason was simply because the shadows were removed from behind them and they were white on white background. I don't see how any technique could resolve that without changing the stroke settings.

These islands will disappear.These islands will disappear.Screenshot 2023-04-15 at 08.38.51.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 ,
Apr 14, 2023 Apr 14, 2023

Hi @nadjac1030, would you mind posting a small section of a file for us to inspect? It will make things much easier. Unfortunately what you want is made difficult because we don't have access to shadows via scripting. But still worth looking into. If you post a sample file, please save it as .pdf because the forum software doesn't accept .ai files. - Mark

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
New Here ,
Apr 14, 2023 Apr 14, 2023

Hi there, thanks for your support – enclosed you’ll find the map i am talking about.

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 ,
Apr 14, 2023 Apr 14, 2023

You can come a long way with selecting one object with a drop shadow an use the Select Same Appearance (attribute) and turn the drop shadow off in the Appearance panel. You may have to repeat this.

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 ,
Apr 14, 2023 Apr 14, 2023

After unlocking all layers/objects and selecting all, the Reduce to Basic Appearance command in the Appearance panel flyout menu seems to work well in your sample file.

 

Are you sure that you are not confusing it with the Clear Appearance command?

 

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
New Here ,
Apr 14, 2023 Apr 14, 2023

I tried that but still some parts of the map will not react to this. For instance: Panama / Venezuela. And some parts will vanish (Look at Greece > there is a blank spot in between after reducing to basic appearance. But yes, for most parts of the map it works fine (yet it’s not "safe" to convert). Thanks for your help!

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 ,
Apr 14, 2023 Apr 14, 2023

did you try @Ton Frederiks suggestion?

 

it's easy and it works great, here it is a bit more detailed

1. select a single item with a drop shadow effect

2. on the Appearance panel, select (highlight) the drop shadow effect

3. click on the Select->Same->Appearance Attribute menu item to select all objects with a drop shadow effect

4. delete the drop shadow by clicking on the trash can icon on the appearance panel lower right corner

5. repeat, some items didn't get selected for some reason (Russia). I did it 3 times to get rid of all shadows.

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
New Here ,
Apr 14, 2023 Apr 14, 2023
Thanks so much for all your suggestion – i will try @Ton Frederiks solution – for now i had to finish this job today so had just a few hours to solve the problem. I‘m getting back to you letting you know how it worked out.
Thanks a lot folks your awesome!
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 ,
Apr 14, 2023 Apr 14, 2023

Just for the sake of exploring options, here is another approach to removing the shadows. The downside is that it removes any raster items from the document (because expanded shadows are raster items), and doubles the paths into filled paths and stroked paths (instead of previously being both filled and stroked).

var doc = app.activeDocument,
    items = doc.rasterItems;

app.executeMenuCommand('selectall');
app.executeMenuCommand('expandStyle');
app.executeMenuCommand('deselectall');

for (var i = items.length - 1; i >= 0; i--)
    items[i].remove();

If you want to test this script, save it as a plain text file with name, eg. "Expand appearance and remove shadows.js" and run from the File > Scripts > Other Script ... menu.

- Mark

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
New Here ,
Apr 15, 2023 Apr 15, 2023
LATEST
Dear Mark,
Oh wow – i really have to try this – thanks a lot for your recommendation! I am deeply grateful now having several opportunities to solve this.

Best regards, Nadja
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