Using path in photoshop

Hello everyone. I am trying to develop some plugins for Photoshop and need some assistance. :blush:

What I’m working on is a plugin that receives coordinates from an AI server and uses them to automatically create paths in Photoshop (I’m not sure if this is possible).

The purpose of this plugin is to divide images for sorting based on our specific requirements.

If anyone has experience with this, I would greatly appreciate your tips.

Thank you!

Did you check paths docs?

Yes, I did… but I couldn’t grasp the concept of it. :exploding_head: :exploding_head: I thought the document was about handling paths that already exist… :(… maybe I’m too noob for photoshop and plugin programming

Right… It could be DOM is available just for existing paths. Did you try Alchemist while creating a path and see what it generates?

Yes. Contrary to what I expected, it didn’t show me any coordinates information. It seems Photoshop uses the mouse pointer inside the app and doesn’t display it to the UXP layer. so I was curious if that I can generate path by BatchPlay or etc

This doc in particular talks about creating new paths, there’s also an example script. Have you tried that? I think the main thing to help understand the path item is that there’s a difference between accessing data of existing paths and providing data (i.e. ‘info’) about new ones for Photoshop to create.

Another key thing is that paths consist of subpaths (curve segments), which in turn consist of points (anchor points and their control handle points). You might have to freshen up on B-splines, etc. to figure out how to turn your coordinates into meaningful curve data. You could probably start by just creating linear (non curved) paths, in which case anchor points and control handle points are the same (i.e. duplicate coordinates).

3 Likes