Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Add selection as add and intersect commands combined

$
0
0

I can’t log in to the Forum, it seems, so I can’t post screenshots …

 

Anyway, what I would propose is a two-step Script that checks for the existence of a Channel with a certain name.

That I would use Paths is not terribly relevant, one could probably do without them, too.

 

• When the Script is called the first time (and the »stupidly« named Channel does not exist) it stores the current Selection with a »stupid« name one would not use otherwise and terminate

• After one has made the second Selection and calls the Script the next time it notices the existence of the Channel with the »stupid« name and does something else, namely:

• fill the Selection in the Channel with white

• store the second Selection

• create a Path from the first and second Selections added

• create a Path from the second Selection

• compares the Paths

• makes a new Path from the one subPathItem in the first Path that has identical pathPoints as the second Path

• load that as a Selection, expand the Selection a bit and intesect it with the first Channel

• remove the Channels and Paths created by the Script

 

If the Selections are likely to be soft one may have to edit them prior to Path creation in order not to cut off semi-selected regions with the second to last step.

 

As JJMack points out, Actions are more limited than Scripts, so the comparison step necessitates the use of a Script.


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>