diff --git a/docker/blender-worker/server.py b/docker/blender-worker/server.py index a119b02..acd36f8 100644 --- a/docker/blender-worker/server.py +++ b/docker/blender-worker/server.py @@ -3,6 +3,7 @@ import json import os import random +import shutil import string import subprocess import time @@ -78,7 +79,7 @@ class RenderHandler(BaseHTTPRequestHandler): dest = os.path.join(GENERATED_DIR, filename) os.makedirs(GENERATED_DIR, exist_ok=True) - os.rename(render_path, dest) + shutil.move(render_path, dest) self._json_response(200, { "success": True, diff --git a/server/index.ts b/server/index.ts index 05cf73b..f09ae69 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1589,7 +1589,7 @@ The script should: - Clear the default scene (delete all default objects) - Create the described objects with materials and colors - Set up basic lighting (sun + area light) and camera positioned to frame the scene -- Use Cycles render engine with CPU device: bpy.context.scene.render.engine = "CYCLES" and bpy.context.scene.cycles.device = "CPU" and bpy.context.scene.cycles.samples = 64 +- Use Cycles render engine with CPU device: bpy.context.scene.render.engine = "CYCLES" and bpy.context.scene.cycles.device = "CPU" and bpy.context.scene.cycles.samples = 64 and bpy.context.scene.cycles.use_denoising = False - Render to /tmp/render.png at 1024x1024 with bpy.context.scene.render.image_settings.file_format = "PNG" Output ONLY the Python code, no explanations or comments outside the code.`);