Hello Community,
My name is Laszlo, also known as Nexeth. I am a digital painter from Germany and Photoshop is my passion. I hope this will be posted in the right Area/Topic.
Unfortunately, I have no experience with programming, but with the assistance of ChatGPT, I aim to create a plugin that makes vanishing points easier and more intuitive to use for myself and potentially other artists. Once completed, I plan to make the plugin freely available and include credits for everyone who helps directly in the plugin.
The Plugin’s Functionality:
1. Vanishing Point Grid Creation:
- The user creates two paths on a path layer in Photoshop using the Pen Tool.
- The plugin determines the intersection point of these paths and sets it as the central point for the vanishing point grid.
- A prompt appears asking, “How many lines should the vanishing point grid have?” (e.g., 10 to 100 lines).
- Optionally (if feasible): Another prompt opens a color picker, allowing the user to select the grid’s color.
- The grid is created using the Polygon Tool as a star-shaped structure (as a Shape Path or Pixels).
- Settings for the Polygon Tool:
- Number of sides: Corresponds to the number of lines (10–100).
- Path Options: Draw from center, Star Ratio 1%.
- Settings for the Polygon Tool:
- The grid should fill the entire canvas.
2. Grid Color:
- If the color picker is not feasible, the plugin window should provide options to change the grid color (e.g., Red, Blue, Green, etc.).
- For Shape Paths: Adjust the stroke color.
- For Pixels: Change the color via Layer Properties.
The Problem:
I have attempted to use the UXP API for Photoshop to access paths using batchPlay
and pathItems
, but I’ve encountered several issues:
- The plugin doesn’t correctly detect paths or returns empty data.
- I am uncertain if I am using the correct method to read the anchor points of the paths.
- The logic for creating the grid isn’t functioning as expected, particularly when determining the intersection point of the paths.
What I Need:
- Help with accessing active paths in Photoshop to retrieve anchor coordinates.
- Assistance with implementing the logic to create the vanishing point grid.
- General advice or guidance on using
batchPlay
or other suitable methods for this project.
If anyone is interested, I would be incredibly grateful for your support. I am happy to share the current code to help troubleshoot or refine the plugin.
Thank you so much in advance for your time and assistance!
Best regards,
Nexeth
Source Code:
- index.html: View on Pastebin
- main.js: View on Pastebin
PS: the manifest file works fine and i only can post 2 links as new member, i hope this doesnt cause any problems while helping.