Implemented direct image data transfer

via websockets to the job-server.
The images are then served by the job-server itself.
This commit is contained in:
2023-06-15 18:01:32 +02:00
parent 847c5753c2
commit a939497f1a
5 changed files with 34 additions and 8 deletions

View File

@@ -45,8 +45,12 @@ func RenderJob(job):
# Get rendered image
var img = get_viewport().get_texture().get_image()
var outFile = "%s_%s.png" % [job["type"],str(job["elements"]).hash()]
img.save_png("%s/%s" % [$"/root/Main".output_dir, outFile])
var outFile = "{path}/{type}_{hash}.png".format({
"path":$"/root/Main".output_dir,
"type":job["type"],
"hash": str(job["elements"]).hash()
})
img.save_png(outFile)
return outFile