mirror of
https://github.com/Cian-H/simple_blender_server.git
synced 2025-12-22 21:41:56 +00:00
Added more libraries for better model generation
This commit is contained in:
@@ -7,7 +7,10 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o server ./main.go
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk update
|
||||
RUN apk add blender
|
||||
RUN apk add blender py3-pip
|
||||
RUN pip install numpy scipy trimesh
|
||||
RUN del py3-pip
|
||||
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /app/server .
|
||||
COPY main.py.tmpl .
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import bpy # type: ignore
|
||||
import bmesh
|
||||
import bpy
|
||||
import mathutils
|
||||
import numpy
|
||||
import scipy
|
||||
import trimesh
|
||||
|
||||
|
||||
{{.ModelCode}}
|
||||
@@ -6,7 +11,7 @@ import bpy # type: ignore
|
||||
|
||||
def guarded_model() -> bpy.types.Object:
|
||||
try:
|
||||
out = model() # type: ignore
|
||||
out = model()
|
||||
if out is None:
|
||||
raise TypeError("Function `model` cannot return type `None`.")
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user