Copy link to clipboard
Hello guys, I am trying to make an script where I can change the size of the current layer
but it is an smart object, is that possible?
I've resolved my problem with the next code:
offsetX = 200 - app.activeDocument.activeLayer.bounds.as("px");offsetY = 500 - app.activeDocument.activeLayer.bounds.as("px");app.activeDocument.activeLayer.translate(offsetX, offsetY);
200 and 500 are the coordinates set in pixels in my case.
One can transform (scale, rotate, …) a Smart Object via Script so what is giving you problems?