This commit is contained in:
2025-08-24 15:18:01 -05:00
parent 479aad2f06
commit 947f21cac7
12 changed files with 99 additions and 177 deletions

View File

@@ -1,31 +1,14 @@
import sys, os
import argparse
from assetparser import parseAsset
from header import setOutputDir
# Check if the script is run with the correct arguments
parser = argparse.ArgumentParser(description="Generate chunk header files")
parser.add_argument('--output', required=True, help='Dir to output headers')
parser.add_argument('--input', required=True, help='Input assets to process', nargs='+')
args = parser.parse_args()
from args import inputAssets
from processasset import processAsset
# Setup headers directory.
setOutputDir(args.output)
outputHeaders = []
# setOutputDir(args.output)
# outputHeaders = []
# Create output directory if it doesn't exist
if not os.path.exists(args.output):
os.makedirs(args.output)
# Split input assets by comma
inputAssets = []
for inputArg in args.input:
inputAssets.extend(inputArg.split(','))
# Begin processing assets
if not inputAssets:
print("Error: No input assets provided.")
sys.exit(1)
# # Create output directory if it doesn't exist
# if not os.path.exists(args.output):
# os.makedirs(args.output)
for asset in inputAssets:
outputHeaders.extend(parseAsset(asset))
processAsset(asset)