Extract XmlUI entries into .xml files

This commit is contained in:
Adam Goldsmith 2023-03-12 03:37:18 -04:00
parent 29b5a7b4da
commit a8f7e9673f

View File

@ -90,6 +90,12 @@ def recursivelyUnpackObject(parent_dir, obj,
obj['LuaScript'] = IncludeTag(obj_base_name + '.ttslua') obj['LuaScript'] = IncludeTag(obj_base_name + '.ttslua')
if 'XmlUI' in obj and len(obj['XmlUI']) > 0:
with open(file_base_path + '.xml', 'w') as f:
f.write(obj['XmlUI'])
obj['XmlUI'] = IncludeTag(obj_base_name + '.xml')
# round transforms, as TTS seems to slightly change them on each save # round transforms, as TTS seems to slightly change them on each save
for k in ['Transform', 'AttachedSnapPoints', 'SnapPoints', 'Hands']: for k in ['Transform', 'AttachedSnapPoints', 'SnapPoints', 'Hands']:
if k in obj: if k in obj: