fix(blender): use shutil.move for cross-fs copy, disable denoiser

os.rename fails across Docker volume boundaries (different filesystems).
Debian Blender 3.4 lacks OpenImageDenoiser — disable denoising in prompt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-25 17:21:53 -07:00
parent 555a51f8a7
commit ac028cbe04
2 changed files with 3 additions and 2 deletions

View File

@ -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,

View File

@ -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.`);