From cc1a9dda55c683ab88ce7925be8cb3c9511f21c3 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Mon, 7 Apr 2025 09:33:39 +0100 Subject: [PATCH] Cleaned up blender server code --- blender_server/main.go | 8 ++++---- blender_server/main.py.tmpl | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/blender_server/main.go b/blender_server/main.go index 3b54cf4..272036d 100644 --- a/blender_server/main.go +++ b/blender_server/main.go @@ -2,15 +2,15 @@ package main import ( "bytes" + "encoding/json" "fmt" "io" - "os" - "os/exec" - "text/template" - "encoding/json" "log" "net/http" + "os" + "os/exec" "path/filepath" + "text/template" ) func main() { diff --git a/blender_server/main.py.tmpl b/blender_server/main.py.tmpl index 3e6d652..e678c28 100644 --- a/blender_server/main.py.tmpl +++ b/blender_server/main.py.tmpl @@ -24,9 +24,6 @@ def export_to_stl(obj: bpy.types.Object): Returns: bytes: Binary data of the STL file """ - import tempfile - import os - # Ensure the object is the only object, is selected, and is active bpy.ops.object.select_all(action="SELECT") obj.select_set(False)