Skip to content

fix(examples): resolve --output against the working directory in three render paths - #223

Merged
TMHSDigital merged 2 commits into
mainfrom
fix/relative-output-path
Sep 23, 2026
Merged

TMHSDigital merged 2 commits into
mainfrom
fix/relative-output-path

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Closes #222. damped-track-aim, gn-sdf-remesh and turntable passed --output straight to scene.render.filepath. Blender resolves a relative path against the blend-file directory; a --background run has no .blend, so the path resolves against the drive root. Their documented commands (-- --output aim.png …) wrote to C:\ and exited non-zero. The fix is path = os.path.abspath(path) before the assignment, as every other example already does.

Type

  • feat
  • fix — broken documented render command
  • docs / chore / ci / refactor

Evidence

  • live-run-proven with E:\Blender-Developer-Tools\.scratch\blender-5.2.1-windows-x64\blender.exe (reports Blender 5.2.1 LTS) and ...\blender-4.5.11-windows-x64\blender.exe (reports Blender 4.5.11 LTS):

    Script Before (relative --output, 5.2.1) After, 5.2.1 After, 4.5.11
    damped_track_aim exit 10, Saved: 'C:\.scratch\...' exit 0, file in cwd exit 0, file in cwd
    gn_sdf_remesh exit 4, Saved: 'C:\.scratch\relprobe\...' exit 0, file in cwd exit 0, file in cwd
    turntable exit 4, Saved: 'C:\.scratch\relprobe\...' exit 0, file in cwd exit 0, file in cwd

    After the fix, nothing is written under C:\.scratch\.

  • The "before" column is the falsification: the relative-path failure is reproducible without the fix and gone with it.

  • Check path unchanged: the edit is inside render_still only. Smoke never passes --output to these three; this PR's smoke jobs cover the check path.

Checklist

  • Explicit paths only.
  • Counts and manifest unchanged; no gallery change (render content unchanged).
  • Failure reproduced before and gone after (above).
  • DCO Signed-off-by: present.
  • No credentials or emails. Binary paths are as the template asks.

🤖 Generated with Claude Code

…e render paths

damped-track-aim, gn-sdf-remesh and turntable passed --output straight to
scene.render.filepath. Blender resolves a relative filepath against the
blend-file directory, which for a --background run with no .blend is the
drive root, so the documented `-- --output aim.png` wrote to C:\ and the
script exited with its "no file" code (10, 4, 4). Every other example
already applies os.path.abspath.

Closes #222

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
@github-actions github-actions Bot added the examples Runnable smoke-gated examples under examples/ label Sep 23, 2026
…ne the source)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 23, 2026
@TMHSDigital
TMHSDigital merged commit 2321b2a into main Sep 23, 2026
11 checks passed
@TMHSDigital
TMHSDigital deleted the fix/relative-output-path branch September 23, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation examples Runnable smoke-gated examples under examples/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Three examples write a relative --output to the drive root, not the working directory

1 participant