CDTB
CDTB copied to clipboard
add export option for atlas info files
Converts clientstates/*.cdtb files to a json-format including all relevant information.
Those files are used to index atlas dds files, contained is information about all the atlas's subimages.
Example file clientstates/gameplay/ux/endofgame.cdtb gets converted to:
{
"UIAutoAtlas/ClientStates/Gameplay/UX/EndOfGame/atlas_0.dds": {
"ASSETS/UX/TFTMobile/Modal/TFTM_Modal_ContinueShroud.TFTmT1318.png": {
"startX": 0.00390625,
"startY": 0.015625,
"endX": 0.853515625,
"endY": 0.5703125
}
}
}
Open to suggestions about naming and stuff. This also will require basic testing to make sure all files parse cleanly.
Nice changes overall.
- I would suggest a list rather than a dict for the inner dict, especially because the PNG path is hardly "guessable".
- We should convert asset paths to paths as used on raw (lowercase the path, change
.ddsto.png, ...); this is much easier to use (which means less questions to us!). - I don't know if it's easy, but could we provide dimensions in pixels? (This would require to read the png file but maybe it's worth it...)
- Should we gather all the atlas descriptions into a single file? (No strong opinion on this.)
With proposed changes:
{
"game/uiautoatlas/clientstates/gameplay/ux/endofgame/atlas_0.png": [
{
"path": "ASSETS/UX/TFTMobile/Modal/TFTM_Modal_ContinueShroud.TFTmT1318.png",
"startX": 0.00390625,
"startY": 0.015625,
"endX": 0.853515625,
"endY": 0.5703125
}
]
}