c618ab5d35
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.
17 lines
378 B
Python
Executable File
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()) |