Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 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 "XYScaler", "Scale selection on the X Y axis", "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(geom)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment