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

Photoshop: Ability to remove/purge layers not used in any Layer Comp

Community Beginner ,
Apr 01, 2011 Apr 01, 2011
I work extensively with deeply-layered screen-resolution documents (ie. mock-ups). I like to keep my history -- or at least some of it -- of experiments as Layer Comps. But every now and again, these PSDs will get prohibitively heavy.

So what I'm looking for is a command, or script, that will let me purge any layer which is not visible in ANY Layer Comp in the file.

Does such a script exist?
Idea No status
592
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
9 Comments
LEGEND ,
Jun 01, 2011 Jun 01, 2011
Rasmus, I'm not sure if this will help. Perhaps I did not understand your issue correctly.

But if you need simply remove all non-viewed Layers in a document, then you can do this by choosing Layer Palate Option and selecting the option 'Delete Hidden Layers'.

Hope this helps 😉
Translate
Report
Community Beginner ,
Jun 01, 2011 Jun 01, 2011
Thanks, but I meant exactly what I said :-)

ie.:
- search through all Layer Comps, building a total list of used layers
- finally, delete any layers not used in any Layer Comp

I dug a bit and found a couple of scripts that users made which purportedly do this. I wasn't able to get any of them to work. Should be a simple job and would be very helpful as a PS feature. I often need it.
Translate
Report
LEGEND ,
Oct 12, 2011 Oct 12, 2011
And how about one better? Why not be able to set a setting on your PSD that trims all layers to size. That way the app automatically removes blank layer margin pixels. They're not necessary in smart comps most often.

But basically what the guy wants is a way to optimize the PSD as it saves, because there's PSDs that weigh about let's say 1GB, and if it was all trimmed and optimized, then it may be...say 200MB. Some people's workflow (such as mine) utilizes a lot of different extra layers that we turn on and off or use to make layer masks. Then 50GB of your harddrive goes to 50 Psds. Not that I don't gladly store all my PSDs for future use, but after a few years of work, it becomes an issue.
Just imagine the 50GB cache of a person's PSD files gets to 5 or even 10GB instead of the 50.

Is there a quick way to crop/minimize layers?
Translate
Report
Valorous Hero ,
Mar 11, 2012 Mar 11, 2012
I have just written a script here to do this...
http://forums.adobe.com/thread/973796...
Translate
Report
LEGEND ,
Jan 02, 2015 Jan 02, 2015
Scripts scare me, so I found a really freaking easy workaround:

1. Filter layers list to Attribute = Not Visible
2. Select all the matching layers
3. Cycle through all layer comps
4. Layers still selected aren’t used in any layer comp

Delete the layers that are still selected. Bingo bango. With keyboard shortcuts for navigating layer comps, this takes like 7 seconds or something.
Translate
Report
LEGEND ,
Mar 08, 2015 Mar 08, 2015
Brilliant workaround.
Thanks!
Translate
Report
New Here ,
Aug 18, 2015 Aug 18, 2015
I would still prefer something built into Photoshop without a workaround or a script.
Translate
Report
LEGEND ,
Sep 28, 2015 Sep 28, 2015
Really smart. Thanks!
Translate
Report
Community Expert ,
Oct 03, 2024 Oct 03, 2024
LATEST

Another scripted option for the sake of completeness:

 

https://gist.github.com/Vestride/3050563/

 

Translate
Report