mirror of
https://github.com/Cian-H/simple_blender_server.git
synced 2025-12-22 21:41:56 +00:00
Cleaned up blender server code
This commit is contained in:
@@ -2,15 +2,15 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"text/template"
|
|
||||||
"encoding/json"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"text/template"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ def export_to_stl(obj: bpy.types.Object):
|
|||||||
Returns:
|
Returns:
|
||||||
bytes: Binary data of the STL file
|
bytes: Binary data of the STL file
|
||||||
"""
|
"""
|
||||||
import tempfile
|
|
||||||
import os
|
|
||||||
|
|
||||||
# Ensure the object is the only object, is selected, and is active
|
# Ensure the object is the only object, is selected, and is active
|
||||||
bpy.ops.object.select_all(action="SELECT")
|
bpy.ops.object.select_all(action="SELECT")
|
||||||
obj.select_set(False)
|
obj.select_set(False)
|
||||||
|
|||||||
Reference in New Issue
Block a user