Answered
Change Smart Object Size
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?
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[0].as("px");
offsetY = 500 - app.activeDocument.activeLayer.bounds[1].as("px");
app.activeDocument.activeLayer.translate(offsetX, offsetY);
200 and 500 are the coordinates set in pixels in my case.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.