Photoshop: Ability to delete multiple paths

  • 28
  • Idea
  • Updated 4 weeks ago
  • Implemented
  • (Edited)
Why can't you delete more than one path at a time? You can do this with Channels and layers... the path palette hasn't changed in ages.
Photo of joshua withers

joshua withers

  • 84 Posts
  • 16 Reply Likes
  • bummed

Posted 8 years ago

  • 28
Photo of Jesper Hammarbäck

Jesper Hammarbäck

  • 10 Posts
  • 1 Reply Like
And I want to be able to make groups in paths and alpha channels!
and a scroll in path.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 47 Reply Likes
Should also be able to delete Paths via the Save dialog, like we can for Alpha Channels and Layers.
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
This is a great idea!
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
An excellent point Joshua. Many versions ago, Photoshop allowed multiple path deletion and other very useful operations like combining paths by simply 'dragging' their icons in Path Palate on top of each other etc...

I agree, Adobe should look into this.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 838 Reply Likes
Photoshop has never supported multiple path selection, and thus couldn't support multiple path deletion. I think you're thinking of another application.
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
Chris, thank you for your response.

You are correct. I got so much used to the the option of selecting multiple items on Layer and Channel palates, I for a moment 'blended' my recollection with the reality.

I have been a professional Photoshop user since 2.0 (1991) and some of my memories are easily fogged by the number of tremendous improvements that happened to this program since that single layer program.

Yes, that is correct, there was no multiple Path deletion option in previous versions, however - for several releases there was certain flexibility in Paths operations that did not carry to the latest versions.

- paths could be simply combined by dragging their icons on top of each other

- parts of a path could be transformed from one Path to another the same way

- and I believe to create a new path in a path palate - Working Path could be dragged from the Work area directly onto the Paths palate..

There was more, but I can't remember now. I recall I was displeased that the consequent version discontinued this great flexibility and there was virtually no way to communicate the frustration. Then we did not have such a great way to communicate with the Adobe Photoshop developers team as we thankfully have today.

I am sorry for confusing the readers here and thanks to Chris for correcting me. I appreciate your feedback.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 838 Reply Likes
Sorry it was just a correction, but I was trying to figure out if this was really lost functionality or not. As it is, just selecting multiple paths at a time will require a lot of changes to the application code.
Photo of joshua withers

joshua withers

  • 84 Posts
  • 16 Reply Likes
Chris, are you saying this is too hard for Adobe to accomplish? I've seen you guys pull off bigger tasks over the years. ;) Seriously though, everybody in the prepress industry would THANK you for adding this functionality. Dragging 20+ paths to the trash one at a time isn't fun. It really kills productivity.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 838 Reply Likes
Where did I say it was too hard?
Photo of joshua withers

joshua withers

  • 84 Posts
  • 16 Reply Likes
; ) To me, somebody at adobe saying that it requires a lot of changes to the application code sounds like a difficult task. That is why i Photoshop for a living! it is much easier! haha...
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 838 Reply Likes
"a lot of changes" == it'll take me more than an hour. :-)
Photo of Mama Shan Canfield

Mama Shan Canfield

  • 50 Posts
  • 5 Reply Likes
I think merging of paths by dragging or alt/option dragging (to make a copy) onto another path is also a great idea to circumvent the Copy & Paste Path methods that have always been available.
Photo of joshua withers

joshua withers

  • 84 Posts
  • 16 Reply Likes
Coincidentally i ran into an example today of why this feature would be very useful. I had to delete all these paths one by one....
See the image:
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 837 Reply Likes
Thank you for the example. That makes it much easier to explain to managers.
Photo of Vaclav Fous

Vaclav Fous

  • 9 Posts
  • 2 Reply Likes
yes, i've got the same issue ... deleting one by one is wasting production time.
Photo of Susan Scott

Susan Scott

  • 16 Posts
  • 1 Reply Like
Me too! I'm doing the same kind of work as Josh W. It's probably my single most biggest gripe about PS.
Photo of René Damkot

René Damkot

  • 48 Posts
  • 4 Reply Likes
If I'd have that many paths to delete, I'd write a script for it.
Something like this:

//remove all paths except clipping path

for (var p = 0; thecopy.pathItems.length > p ; ) {
if (thecopy.pathItems[p].kind == PathKind.CLIPPINGPATH) {
p++
}
else {
thecopy.pathItems[p].remove()
}
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
This may help just a tiny bit - it is the fastest way to delete multiple paths I was able to come up with:

You are gonna need two hands to do this.

I highlight the top most path in Paths Palate and keep my mouse in that exact position. Then using my other hand, I hit 'delete' on my keyboard.

As the top most path is deleted the rest of paths 'move up', so the next path appears right where I left my mouse. So without needing to repositioning my mouse again, I simply click and hit delete, click - delete, click - delete ....

It's quick, give it a try ;)
Photo of Paul Riggott

Paul Riggott

  • 360 Posts
  • 144 Reply Likes
It's only a one line script:-
activeDocument.pathItems.removeAll();
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
I think David Jensen should chime in with a fabulous script to do this elegantly. David? Is this possible?
Photo of joshua withers

joshua withers

  • 84 Posts
  • 16 Reply Likes
please... no scripts.. those are just band-aids.... we need it implemented into the application.
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
agreed
Photo of David Jensen

David Jensen

  • 131 Posts
  • 46 Reply Likes
Many of Photoshop's "built-in" features are scripts... even a couple of features not in the scripts menu.

You can't change the GUI of an existing panel with a script.. Deleting all paths is trivial, though. And a modal dialog that lets you select a bunch of paths at once is possible, too.

Seems like some are worried that Adobe will will delay surgery if I provide a band-aid. :P
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 47 Reply Likes
I'd love a band-aid, if you'd be so kind.
Photo of Mama Shan Canfield

Mama Shan Canfield

  • 50 Posts
  • 5 Reply Likes
I think a delete all paths item would be great, too but a work-around that I have often used is to do a Select-All, then Edit Copy Merged, then create a NEW Document which will automatically have the same size and resolution of the original. Then do an Edit Past into the new document, Flatten and you're ready to print or send off minus all the paths and/or Alpha Channels.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 47 Reply Likes
And then rename it. It's far more work than should be required after all these years. I still don't get why paths aren't an option like Layers and Alphas in the Save As dialog.
Photo of Mama Shan Canfield

Mama Shan Canfield

  • 50 Posts
  • 5 Reply Likes
Ah, just make a little Action for yourself and it'll give you a path free document in the blink of an eye---and it won't hurt so bad :) --- but I still do agree that it should be an option in the Paths Panel!
Photo of iMatt

iMatt

  • 122 Posts
  • 12 Reply Likes
Hi There-
There's a script to delete all paths at once.

You can find it here!
Photo of David Jensen

David Jensen

  • 131 Posts
  • 46 Reply Likes
That's also in this thread too :-)
Photo of Mama Shan Canfield

Mama Shan Canfield

  • 50 Posts
  • 5 Reply Likes
There are also options for deleting all paths and alphas, and a bunch more bells and whistles in Paul's Picture Processor Script here, which is great for batching-

http://www.scriptsrus.talktalk.net/
Photo of Susan Scott

Susan Scott

  • 16 Posts
  • 1 Reply Like
Which script on this site is the "delete all paths" script? I read through all of them and there didn't appear to be anything for deleting paths.
Photo of c rose

c rose

  • 11 Posts
  • 4 Reply Likes
JDI suggestion: I would like to be able to select and delete multiple paths and alpha channels.

This reply was created from a merged topic originally titled
Click, Delete, Click, Delete, Click, Delete, Click, Delete, Click, Delete, Click, Delete....
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 15339 Posts
  • 2226 Reply Likes
You can currently delete more than one Alpha channel at a time in Photoshop CS5.
Photo of Stephen Marsh

Stephen Marsh

  • 98 Posts
  • 19 Reply Likes
I just stumbled across this topic, beware the indiscriminate nature of the following script:

// Remove paths, alphas, layer comps, color samplers & guides
// https://forums.adobe.com/thread/1959150
// https://forums.adobe.com/message/7998834#7998834
#target photoshop
var doc = app.activeDocument;
 
// supress dialog windows
displayDialogs = DialogModes.NO
 
// delete ALL paths, including PathKinds of WORKPATH, NORMALPATH, CLIPPINGPATH & VECTORMASK
doc.pathItems.removeAll();
// delete ALL alphas, including SPOT CHANNELS
doc.channels.removeAll();
 
// delete layercomps
doc.layerComps.removeAll();
 
// delete color samplers
doc.colorSamplers.removeAll();
// delete guides
doc.guides.removeAll();
 

I’m not sure how to exclude SPOT CHANNELS or VECTOR MASKS or CLIPPING MASKS...
(Edited)
Photo of Vaclav Fous

Vaclav Fous

  • 9 Posts
  • 2 Reply Likes
Hello Adobe,

I've got ideas, how to do better Paths control in PS CS6.


1) Path folder.

If there is lots of the Paths, it would be easier to control it with Folders ...


2) Clear Path.

It would be easy way to delete all of Paths in the file, and it will by helpful when run Automate / Batch


what are you thinking about?

See my Idea mockup:




This reply was created from a merged topic originally titled
Photoshop: Path Folder and Clear Path.
Photo of Susan Scott

Susan Scott

  • 16 Posts
  • 1 Reply Like
I've been waiting for years, decades, eons, to be able to DELETE SELECTED PATHS in one click as you can with layers and finally now, channels as well. Does no one else have an issue with this? I sometimes have 15 to 20 paths which have to be deleted every time I send the client an updated file ( 5 to 10 versions) and "control/click/delete each one at a time cursing under my breath and feeling like I'm back in the 90's. I had a third party action that worked OK for awhile but lost it a few upgrades ago. But why should I have to get a third party app to do such a stupid, basic thing that PS should have been able to do years ago. I was so hopeful when I tried CS6 beta thinking someone at Adobe must have finally added this long over due feature—but no.

This reply was created from a merged topic originally titled
DELETE SELECTED PATHS in one delicious click.
Photo of Susan Scott

Susan Scott

  • 16 Posts
  • 1 Reply Like
Thanks for moving me into this thread!
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 15339 Posts
  • 2228 Reply Likes
I had hoped that we'd be able to add this for CS6.

As Paul points out, the workaround is a one line script to delete all paths:

activeDocument.pathItems.removeAll();
Photo of joshua withers

joshua withers

  • 84 Posts
  • 16 Reply Likes
I can't believe there was so little improvement on the Pen tool and Paths panel with the JDI initiative in CS6. It has been almost a decade since I have seen any change with the Pen tool. I have been asking for Path improvements with every Beta testing session.

I have figured out dozens of work arounds but it is frustrating and time consuming. For example, i have been making Vector masks on blank layers (or sometimes color layers) so i can see what i am doing, and so i can organize all my paths into folders, and transform them together, delete them all, etc...

I should be able to do that stuff in the Paths Panel.

Additionally, when you have so many paths that you can't expand your paths panel anymore, and you click on a path, it is very hard to de-activiate it (there is nowhere to click off the path).

Please please please Adobe... realize that nearly every professional retoucher (especially car retouchers) will create a path before using some of the selection tools. The pen tool needs to grow up!
Photo of roman weiser

roman weiser

  • 61 Posts
  • 9 Reply Likes
Joshua, to deactivate a path, simply shift-click it's icon in your Path Palette.

At least the multiple path deletion should have been implemented by now. Maybe the Adobe boys here forgot to send our request higher?

I'm not holding my breath tho - see how 'quickly' they respond to this...
Photo of Mike Lippeth

Mike Lippeth

  • 14 Posts
  • 0 Reply Likes
I would like to see this feature added also! I've been waiting for a long time to see this this feature added. I use the pen tool a great deal making lots of working paths. They add up quick in the Paths pallet.

In addition to this proposed idea is to be able to delete all paths except the Clipping Path.
Photo of Jeff Natrop

Jeff Natrop

  • 33 Posts
  • 1 Reply Like
I also do a lot of retouching. And paths are the pros way to make a quick and accurate selection. I agree with Mike Lippeth above, with his "In Addition to " suggestion. Be able to delete all paths except the Clipping Path. That is why the delete all paths script won't work for me. I need to keep the clipping path for the clients file. But I need to delete all the rest.

As was also pointed out... the need to organize the paths into groups / folders like in the layers palette is badly needed.

btw.. tho a pain, the click-delete method is what I currently use. It works faster than the alternative.
Photo of edward.caruso

edward.caruso

  • 153 Posts
  • 42 Reply Likes
make a script that removes all paths except that clipping path - have it named something in the script and exclude it. or find someone who can write one - i think there is a PS scripting exchange online somewhere.
Photo of Paul Riggott

Paul Riggott

  • 360 Posts
  • 144 Reply Likes
This should delete all paths except clipping paths..

 

#target Photoshop

main();
function main(){
if(!documents.length) return;
var doc = activeDocument;
for(var a = doc.pathItems.length-1;a>-1;a--){
if(doc.pathItems[a].kind != PathKind.CLIPPINGPATH) doc.pathItems[a].remove();
}
}
Photo of Mike Lippeth

Mike Lippeth

  • 14 Posts
  • 0 Reply Likes
Paul, thank you for taking the time and sharing this!
Photo of edward.caruso

edward.caruso

  • 153 Posts
  • 42 Reply Likes
Hi Paul

If you had a path named Path 1 that you want saved - how would you change the script?
Photo of Paul Riggott

Paul Riggott

  • 360 Posts
  • 144 Reply Likes
Like this ...

 

#target Photoshop

main();
function main(){
if(!documents.length) return;
var doc = activeDocument;
for(var a = doc.pathItems.length-1;a>-1;a--){
if(doc.pathItems[a].name != "Path 1") doc.pathItems[a].remove();
}
}
Photo of Paul Shepherd

Paul Shepherd

  • 2 Posts
  • 0 Reply Likes
This is freakin awesome! Thanks
Photo of Bryce Bordenkecher

Bryce Bordenkecher

  • 1 Post
  • 0 Reply Likes
I'm trying to adapt this script, but I need to keep several paths from deletion.
This is what I have (problem is the the indexOf....) :


function deletepaths()
{
if (!documents.length) return false;

var doc = activeDocument;
var save = ["Ex1", "Ex2", "Ex3"];

for (var x = 0; x < doc.pathItems.length; x++)
{
if (save.indexOf(doc.pathItems[x].name) == -1)
{
doc.pathItems[x].remove();
}
}
}
deletepaths();
Photo of Susan Scott

Susan Scott

  • 16 Posts
  • 1 Reply Like
I just copy and pasted this code into Apple Script Editor but get a "syntax error." Am I missing something?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 837 Reply Likes
That's not an Applescript, but appears to be a JavaScript (executable from inside Photoshop).
Photo of Paul Riggott

Paul Riggott

  • 360 Posts
  • 144 Reply Likes
As Chris has said this is JavaScript.
Open ExtendScript Toolkit (this gets installed with Photoshop) copy and paste the code into a window then save the script to the application presets/scripts folder.
If Photoshop was open close and restart it.
To use: File - Scripts - select the script.
An action could be created to call the script by creating a new action, from the action pallete fly-out menu select Insert Menu Item, then File - Scripts - select the script. Stop recording.
The code could also be put behind a button in a Configurator panel.
Photo of edward.caruso

edward.caruso

  • 152 Posts
  • 42 Reply Likes
thank you very much Paul. I did this and it couldn't be easier - I guess we can close the thread now? If a simple script can take care of a task like this - I'd rather Adobe engineers spend time on something else (like my bezier curves warp tool idea!)
Photo of Vaclav Fous

Vaclav Fous

  • 9 Posts
  • 2 Reply Likes
why ... scripts etc. i'm understand

i'm using PS from version 4.0 (PC) and i love it.

so. Adobe guys, WAKE UP, please make useful tool for professionals (i mean managing paths) and don't make same useless thinks for amateurs!
Photo of Jeff Natrop

Jeff Natrop

  • 33 Posts
  • 1 Reply Like
Paul,
Thank you for the explanation and the script!!!
I've never made a script b4 & like Susan, wouldn't have known what to do with it.
I used Edward version only changed the name from Path 1 to Outlined, as the name of the path I need saved is renamed by an action to "Outlined". Your reply to Edward showed me what I needed to do differently in my situation. Thanks!

Paul... seeing that you are knowledgeable in writing scripts. Is it possible to add to your "delete paths" script to also have the same script delete all the extra channels in the channels palette?
If yes, may I ask if you would do that for me (us)?

Paul, it's folks like you that make the Photoshop forum a valuable asset. The exchange of ideas, solutions, helping others.

I'd still like Adobe to integrate this into the Paths fly-out menu, but this is a big help for now.

Noooo... don't close the thread yet,
I'd still like Adobe to integrate the ability to organize path names into sets / groups like the layers palette.

JeffN