blendparse/test.py
Josiah c618ab5d35
it's messy but it works
Implement construction of integer values and characters. One-dimensional arrays are handled but are not constructed. I've also added an inspect() method to the BlendStruct class, which prints a nicely formatted dict with json.
2021-07-24 18:24:03 -05:00

17 lines
378 B
Python
Executable File

#!/usr/bin/env python3
import blendparse
import sys
try:
blendfile = sys.argv[1]
except IndexError:
print("Usage: ./test.py <path to .blend>")
sys.exit()
with blendparse.Blendfile(blendfile) as blend:
results = [block() for block in blend.get_blocks("SC").values()]
for structure in results[0]:
print(structure)
print(structure.inspect())