NoTranslateScaler

WARNING: TOOL MAY CRASH!!!
This plugin makes things bigger along the X and Y axes WITHOUT moving them (translate is the geometry term). It has a simple table where you plugin your # for the x axis, and the y axis. You can use it to stretch objects if you like.
A version which does translate objects will be in the works eventually, as that has it's own usefulness.
In my thoughts is a version which considers scaling with a skew factor (like angles). but that is beyond me at this time. Enjoy!
This plugin makes things bigger along the X and Y axes WITHOUT moving them (translate is the geometry term). It has a simple table where you plugin your # for the x axis, and the y axis. You can use it to stretch objects if you like.
A version which does translate objects will be in the works eventually, as that has it's own usefulness.
In my thoughts is a version which considers scaling with a skew factor (like angles). but that is beyond me at this time. Enjoy!
- Code:
- -- Scale Tool for X plane
-- Authored by Thomas of Hilo
-- Based on works by Kaen, raptor, Watusimoto
function getArgsMenu()
menu = {
TextEntryMenuItem.new("Scale X: ", "1", "10.0", "I don't know what's going on here"),
TextEntryMenuItem.new("Scale Y: ", "1", "10.0", "Woo hoo")
}
return "NoTranslateScaler", "Scale selections on the X Y axis without them moving around", "Ctrl+=", menu
end
function main()
local sx = table.remove(arg, 1)
local sy = table.remove(arg, 1)
local objects = plugin:getSelectedObjects()
if #objects == 0 then
plugin:showMessage("Operation failed. No objects are selected", false)
return
else
for _, obj in pairs(objects) do
local geom = obj:getGeom()
local result = Geom.scale(geom, sx, sy)
obj:setGeom(result)
end
end
end