Skip to main content
This topic has been closed for replies.

2 replies

GhoulfoolAuthor
Inspiring
October 6, 2014

No. There's a difference between deleting a point (with the delete key) which breaks the path and deleting an anchor point which removes it from the path (and does it's best to interpolate where the path should go with the missing point), but keeps the path unbroken

c.pfaffenbichler
Community Expert
Community Expert
October 6, 2014

As far as I can tell the only option would be to collect the info, delete, collect the changed info, then compare the two sets of path-related information, remove the whole path and create an amended path.

I know of no way to identify a selected pathPoint directly.


The Math for amending the Bezier handles may be a bit of a challenge, though.

JJMack
Community Expert
Community Expert
October 2, 2014

I just created a complex  path with many overlapping ellipses then selected many of the segments in the path.  Enabled the scriptlistner and then delete the selected path segments using the delete key Scriptlistener  recorded this.  However it recorded noting when I used the direct selection tool to select the dozen segment in the path for deletion..

// =======================================================

var idDlt = charIDToTypeID( "Dlt " );

executeAction( idDlt, undefined, DialogModes.NO );

JJMack
GhoulfoolAuthor
Inspiring
October 3, 2014

Not quite what I was after. I'm sure there's a way around it - probably by finding the currently selected point (if that's accessible via scripting)

JJMack
Community Expert
Community Expert
October 3, 2014

I don't know Photoshop scripting.   I know I can select many segments in a path with the direct selection tool.  Photoshop shows they are selected by turning on the display of the control points and handles  on both ends of the selected segments. I can see they are selected and I can delete the segments.  The Scriptlistner records nothing as I make and only redords the delete when I delete them.  I have no idea how to get the selected control points and selected segments.  I have seen some scripts posted here that process path in the Path palette.   Perhaps if you search for those you can see hot they processed the paths. When they get the control points perhaps the some attribute to indicated if they are actively selected.  Here is what I tried to record with the scriptlistener.  Onle two things were recorded.  The play of my path action and the delete. The selections I made were not recorded but were made.

The script in this thread  Re: Transferring multiple paths  had no problem duplicating that path I create into a second document.

JJMack