function FollowBounds:Run(moho)
local document = moho.document
local noTransformLayer = document:LayerByName("No Transform")
noTransformLayer = moho:LayerAsVector(noTransformLayer)
local withTransformLayer = document:LayerByName("With Transform")
withTransformLayer = moho:LayerAsVector(withTransformLayer)
local frameZero = 0
local noTransformLayerBounds = noTransformLayer:Bounds(frameZero)
local noTransformLayerBoundsMinimumX = noTransformLayerBounds.fMin.x
local noTransformLayerBoundsMinimumY = noTransformLayerBounds.fMin.y
local noTransformLayerBoundsMaximumX = noTransformLayerBounds.fMax.x
local noTransformLayerBoundsMaximumY = noTransformLayerBounds.fMax.y
local withTransformLayerBounds = withTransformLayer:Bounds(frameZero)
local withTransformLayerBoundsMinimumX = withTransformLayerBounds.fMin.x
local withTransformLayerBoundsMinimumY = withTransformLayerBounds.fMin.y
local withTransformLayerBoundsMaximumX = withTransformLayerBounds.fMax.x
local withTransformLayerBoundsMaximumY = withTransformLayerBounds.fMax.y
local withTransformLayerScale = withTransformLayer.fScale:GetValue(frameZero)
local withTransformLayerScaleX = withTransformLayerScale.x
local withTransformLayerScaleY = withTransformLayerScale.y
local withTransformLayerTranslation = withTransformLayer.fTranslation:GetValue(frameZero)
local withTransformLayerTranslateX = withTransformLayerTranslation.x
local withTransformLayerTranslateY = withTransformLayerTranslation.y
local withTransformLayerOrigin = withTransformLayer:Origin()
local withTransformLayerOriginX = withTransformLayerOrigin.x
local withTransformLayerOriginY = withTransformLayerOrigin.y
local newShapeLayer = document:LayerByName("New Shape")
newShapeLayer = moho:LayerAsVector(newShapeLayer)
local newShapeLayerOrigin = newShapeLayer:Origin()
local newShapeLayerOriginX = newShapeLayerOrigin.x
local newShapeLayerOriginY = newShapeLayerOrigin.y
local newShapeLayerMesh = newShapeLayer:Mesh()
local pointPosition = LM.Vector2:new_local()
local function setPointPosition(x, y)
pointPosition.x = x
pointPosition.y = y
end
local function addPointToNewShapeLayer(x, y)
setPointPosition(x, y)
newShapeLayerMesh:AddPoint(pointPosition, -1, frameZero)
end
local function appendPointToNewShapeLayer(x, y)
setPointPosition(x, y)
newShapeLayerMesh:AppendPoint(pointPosition, frameZero)
end
addPointToNewShapeLayer(noTransformLayerBoundsMinimumX, noTransformLayerBoundsMaximumY)
appendPointToNewShapeLayer(noTransformLayerBoundsMaximumX, noTransformLayerBoundsMaximumY)
appendPointToNewShapeLayer(noTransformLayerBoundsMaximumX, noTransformLayerBoundsMinimumY)
appendPointToNewShapeLayer(noTransformLayerBoundsMinimumX, noTransformLayerBoundsMinimumY)
addPointToNewShapeLayer(withTransformLayerTranslateX + withTransformLayerBoundsMinimumX * withTransformLayerScaleX, withTransformLayerTranslateY + withTransformLayerBoundsMaximumY * withTransformLayerScaleY)
appendPointToNewShapeLayer(withTransformLayerTranslateX + withTransformLayerBoundsMaximumX * withTransformLayerScaleX, withTransformLayerTranslateY + withTransformLayerBoundsMaximumY * withTransformLayerScaleY)
appendPointToNewShapeLayer(withTransformLayerTranslateX + withTransformLayerBoundsMaximumX * withTransformLayerScaleX, withTransformLayerTranslateY + withTransformLayerBoundsMinimumY * withTransformLayerScaleY)
appendPointToNewShapeLayer(withTransformLayerTranslateX + withTransformLayerBoundsMinimumX * withTransformLayerScaleX, withTransformLayerTranslateY + withTransformLayerBoundsMinimumY * withTransformLayerScaleY)
end