I am trying to work out how to make a script that would get a sprite sheet and an xml file containing the coordinates, names, width and height of all sprites within it and create many sub images which are cropped automatically which would save me a lot of time.
I usually have to manually use the crop tool and find sprites myself. How would I go at this?
How would I work with an xml texture atlas?
Moderators: Víctor Paredes, Belgarath, slowtiger
How would I work with an xml texture atlas?
https://youtube.com/ghostympa
i make youtube videos with animations in them
i make youtube videos with animations in them
- synthsin75
- Posts: 10265
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: How would I work with an xml texture atlas?
You'd need to use the Lua I/O functions to read the xml and then ImageLayer:SetCroppingBounds(bounds) to crop the image.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/