2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 13:47:43 +00:00

BlenderConnection tweaks

This commit is contained in:
Jack Andersen
2016-10-02 12:34:10 -10:00
parent 4f53d886ce
commit e65fe14c53
6 changed files with 69 additions and 8 deletions

View File

@@ -291,6 +291,21 @@ def dataout_loop():
writepipebuf(struct.pack('IIfffffb', layer, type, obj.data.energy, spotCutoff, constant, linear, quadratic,
castShadow))
elif cmdargs[0] == 'GETTEXTURES':
writepipeline(b'OK')
img_count = 0
for img in bpy.data.images:
if img.type == 'IMAGE':
img_count += 1
writepipebuf(struct.pack('I', img_count))
for img in bpy.data.images:
if img.type == 'IMAGE':
path = os.path.normpath(bpy.path.abspath(img.filepath))
writepipebuf(struct.pack('I', len(path)))
writepipebuf(path.encode())
elif cmdargs[0] == 'ACTORCOMPILE':
writepipeline(b'OK')
hecl.sact.cook(writepipebuf)