Move layer to an absolute position, not translate
I have images that have white scalebars of varying lengths on a black background of which I would like to copy and create new layers with my own personalized scalebars (e.g. height, stroke, color, etc.)
Using actions I have been able to select the region, select color region (highlights) and create a new layer from copy. This gets me my new scale bar layer of which I can then manipulate in an action list.
The issue I am having is that I want to move the scalebar to a specific region of the image, which in actions I can do but only for the scale bar which matches the length of the original template image. Once I attempt to run my action on another image with a different length it translates using the cooridinates of the original template image, resulting in a scale bar which is off of the mark.
I need to figure out how to write a script that would take the selected layer (in this case a line), set the reference point for the lower left corner, and then set that layer at a specific x y coordinate such that no matter how long or short my scalebar, it would start the layer at the same place in the image.
Any help would be greatly appreciated.
Thanks,
Matt
