From 01fed2804062d671dd3e3772528980c8f014130f Mon Sep 17 00:00:00 2001 From: Tellow Krinkle Date: Sat, 15 Sep 2018 00:59:17 -0500 Subject: [PATCH] Make TMPAssetConverter work without atlas file --- scripts/TMPAssetConverter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/TMPAssetConverter.py b/scripts/TMPAssetConverter.py index 080e24a..548196b 100644 --- a/scripts/TMPAssetConverter.py +++ b/scripts/TMPAssetConverter.py @@ -249,10 +249,10 @@ with open(originalFN, "rb") as originalFile: with open(behaviourFN, "rb") as behaviourFile: behaviour = FontFile(behaviourFile.read(), behaviourFN, emptyAtlasPoint) - -atlasName = readString(atlasName) -with open(outFN + "/" + atlasName + "_Texture2D.dat", "wb") as outFile: - outFile.write(atlasOut) +if len(sys.argv) > 4: + atlasName = readString(atlasName) + with open(outFN + "/" + atlasName + "_Texture2D.dat", "wb") as outFile: + outFile.write(atlasOut) with open(outFN + "/" + original.filename + "_TextMeshProFont.dat", "wb") as outFile: outFile.write(combineFonts(original=original, new=behaviour))