Split to Layers Script Layer Selection Order

New Here ,
Jun 25, 2021 Jun 25, 2021

Copy link to clipboard

Copied

Hello!

I've been using David Jensen's "Split to Layers" script and it works great.  However, I've run into some problems with the order in which layers are searched out and created.

 

Here is how the script scans the image and thus creates layers based on what is surrounded by transparency.  Please note the order in which the blocks are created (red text):

order-01.jpg

The process scans starting from the top (1), goes to the left(2), then the right(3), then drops down(4), then moves left(5).

 

What I really need it to do is create the layers in this order:

order-02.jpg

Always starting from the left and processing to the right.

 

Like so:

order-03.jpg

Is this even possible?  Any help would be greatly appreciated!

TOPICS
Actions and scripting, Windows

Views

506

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

Make selection and change it into path item, then find its sub paths. They are always stored from top left side.

Likes

Translate

Translate

Report

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 ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

How would that look from a scripting standpoint?

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

There are quite many scripting topics about it, just use appropriate keywords in search box.

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

LATEST
In the first screenshot, the rectangle labeled "4" is higher than the rectangle "5". This is the reason.
 
It is difficult to make the "correct" sequence, since a person draws figures not very accurately and they are not always rectangles.
 
This requires a lot of rework for this script. Easier to rewrite.

Likes

Translate

Translate

Report

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