I have a scaled smart object and I'm trying to make a calculation in my script using the bounds of the smart layer vs the bounds of the content inside the smart layer, so I can add text proportionally outside of the smart layer and have everything line up properly. Is there a good method for determining the dimensions of a smart layer's content?
destX = myLayer.bounds[0] + origX * ((myLayer.bounds[2]-myLayer.bounds[0])/8793); |
destY = myLayer.bounds[1] + origY * ((myLayer.bounds[3]-myLayer.bounds[1])/4990);
This is the calculation I'm using where I know the content inside the smart layer is 8793x4990, but what's the best approach to not hard code this?