fix(docker): bake blender_path into EditorSettings for headless import
Godot's headless --import/--export-release refuses to auto-detect Blender for .blend import: "Blender path is invalid or not set... Cannot configure blender path in headless mode" (modules/gltf/editor/editor_scene_importer_blend.cpp). Without this, the image's Blender install was silently unusable for its one job — no .blend file would ever import in CI. Bakes filesystem/import/blender/blender_path into a per-minor-version EditorSettings .tres, same pattern barichello/godot-ci and abarichello's own Dockerfile use for Android SDK/JDK paths. Found and verified while resolving ticket #9 (Merge, publish, and validate the debian-slim image end-to-end): confirmed a .blend import produces a real .scn with this fix, and fails without it, on a real container built from this Dockerfile. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+13
-1
@@ -47,4 +47,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
&& mkdir -p /opt/blender \
|
||||
&& tar -xJf /tmp/blender.tar.xz -C /opt/blender --strip-components=1 \
|
||||
&& ln -sf /opt/blender/blender /usr/local/bin/blender \
|
||||
&& rm /tmp/blender.tar.xz
|
||||
&& rm /tmp/blender.tar.xz \
|
||||
# Godot's headless `--import`/`--export-release` refuses to auto-detect Blender for .blend
|
||||
# import ("Blender path is invalid or not set... Cannot configure blender path in headless
|
||||
# mode") — it has to be pre-baked into EditorSettings, same as barichello/godot-ci bakes
|
||||
# Android SDK/JDK paths into its editor_settings.tres. Settings are stored per minor version
|
||||
# since Godot 4.3 (see abarichello/godot-ci's own Dockerfile for this same pattern).
|
||||
&& mkdir -p /root/.config/godot \
|
||||
&& printf '%s\n' \
|
||||
'[gd_resource type="EditorSettings" format=3]' \
|
||||
'' \
|
||||
'[resource]' \
|
||||
'filesystem/import/blender/blender_path = "/usr/local/bin/blender"' \
|
||||
> "/root/.config/godot/editor_settings-${GODOT_VERSION%.*}.tres"
|
||||
|
||||
Reference in New Issue
Block a user