Skip to main content
Participating Frequently
February 16, 2017
Answered

sub paths to layers

  • February 16, 2017
  • 1 reply
  • 650 views

Hi forum!

I am looking for a script which creates layers for each separate selection. The following image should illustrate what I mean:

Imagine you have a lot of such selections and want to have each of them in a single layer so that you can play around with them. I know that this should be possible, as I found a dead link to a script posted 5 years ago in another forum (subpathstolayers.zip).

Can anyone help me? !

This topic has been closed for replies.
Correct answer c.pfaffenbichler

If you first lift the content onto a Layer of its own (Layer Via Copy, cmd-J) this should work, provided the distance between the elements is sufficient.

Re: Isolating groups of pixels

1 reply

Chuck Uebele
Community Expert
Community Expert
February 16, 2017

I don't think you can separate out the various selections. While changing the selections to a path seems like it should work, as the reference you gave. I don't think it would work with Photoshop. You can't use scripting to select subpaths of a single path, as you can in Illustrator. Somehow, you would have to be able to separate all the subpaths into separate paths. The only workaround, I can think of is to import the path into IA, then script IA to break up the paths to bring back into PS.

Participating Frequently
February 16, 2017

Thanks for your fast reply! I was really hoping that there was a script, as they discussed it here: Photoshop: Quick way to make multiple layers from inversely selected objects. | Photoshop Family Customer Community

The workaround with IA seems a bit too complicated for my use.

Chuck Uebele
Community Expert
Community Expert
February 16, 2017

I looked at that thread. Lots of knowledgeable people: Chris, Paul, & Christoph. There didn't seem to be a good way to do this, other than maybe splitting up the image. One possible way, which would be slow, would be to place the selection on a new layer without the background. Then sample the color of the layer in steps using a try/catch block. if the sample didn't throw an error, then use the magic wand tool on contiguous to make a selection of that spot with a big tolerance so it captures all the area. Then put that selection on a new layer and delete the selection that it found on the original layer. keep doing that until the entire image is done. This might take longer than it would to do it manually.