Looking for a script that can either stamp or paste randomized layers along a path?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Kukurykus, Tom, xbytor

Wolf_22
Posts: 2
Joined: Tue Nov 24, 2020 7:00 pm

Looking for a script that can either stamp or paste randomized layers along a path?

Post by Wolf_22 »

Hi, everyone... I just now came across this site after doing countless Google searches for help with a project I'm working on. So I created an account (this is my first post!) and now I'm hoping someone around here can shine some light on the issue I'm facing...

To make a long story short, I'm trying to find a way to use Photoshop to make maps. It's the perfect tool for something like this (in my opinion, at least) but I'm using an older version here (CS3), which causes some problems for any scripting efforts. What I'm hoping for is a way to put a few layers inside a group and from that group, find a way to paste one or many of the layers at random (from the group) along either a path or via using a mouse gesture while holding down the paint button, like if I was dragging the paintbrush making a paint stroke.

Here's the use case for this:
Let's say I'm working on one of my maps and I'm trying to create a tree row along a roadside. Any real map isn't going to have the same tree top for every tree... So the best way to apply the trees along the road side would be to have a way to "paint them along the road." Whether that would be along a shape path or else, via a brush stroke, is left up for debate. Personally, I'd prefer a brush as that to me would be easiest to use, but either would work. Does that make sense? So it would be like I'd be painting random layers from my layer group using a custom paint brush tool... And every time I drag the mouse with the button held down, it would select one or many of the random layers from inside that special group using different random settings, such as random angles, random contrasts, etc. to maximize a natural appearance. (For truly unique and randomized / natural-looking tree lines.) Of course, this same approach could be used for other things, like buildings, rock formations, lakes and ponds, people, etc.

I've posted about this idea over on the Adobe Community Support forum. Thankfully, there's others that have wanted something like this as I was referred to this post that appears to come awfully close to what I'm hoping for using the *Count Tool." The only problem is that the script doesn't work out-of-the-box, at least not in my CS3 install. Because of this, it's lead me down the path of trying to debug it, which is a pain as this Extend Script stuff isn't very similar to debugging some browser-based JavaScript. I can't use something like console.log and the Extend Script Toolkit, while great, just isn't as helpful as I'd like. As such, it's given me more headaches than I care to admit. Ha. I've made *some* progress in making it work in CS3 but it's going at a snail's pace... So I was hoping someone out here might have something that actually works without any debugging efforts? Maybe some better approach?

Any insights into this would be appreciated. If nobody knows of such a script or easy way to make this happen, I'll just keep trying to pursue corrections to the script I found on the other site, try to get it to work, and if/when I complete that, I'll provide it on here for all. :)

Thanks in advance.