Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/gallery/damped-track-aim/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ <h2>Source</h2>
scene.view_settings.view_transform = <span class="s">&quot;Filmic&quot;</span>
scene.view_settings.look = <span class="s">&quot;Medium High Contrast&quot;</span>
scene.render.image_settings.file_format = <span class="s">&quot;PNG&quot;</span>
<span class="c"># Blender resolves a relative filepath against the blend-file directory, which</span>
<span class="c"># for a --background run with no .blend is the drive root, not the cwd.</span>
path = os.path.abspath(path)
scene.render.filepath = path
bpy.ops.render.render(write_still=<span class="k">True</span>)
<span class="k">return</span> os.path.exists(path) <span class="k">and</span> os.path.getsize(path) &gt; <span class="n">0</span>
Expand Down
3 changes: 3 additions & 0 deletions docs/gallery/gn-sdf-remesh/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ <h2>Source</h2>
<span class="k">try</span>: sc.eevee.taa_render_samples = <span class="n">64</span>
<span class="k">except</span> Exception: <span class="k">pass</span>
sc.render.resolution_x = <span class="n">1280</span>; sc.render.resolution_y = <span class="n">720</span>
<span class="c"># Blender resolves a relative filepath against the blend-file directory, which</span>
<span class="c"># for a --background run with no .blend is the drive root, not the cwd.</span>
path = os.path.abspath(path)
sc.render.image_settings.file_format = <span class="s">&#x27;PNG&#x27;</span>; sc.render.filepath = path
<span class="c"># AgX would wash the crimson toward brick (docs/VISUAL-STYLE.md)</span>
sc.view_settings.view_transform = <span class="s">&#x27;Standard&#x27;</span>
Expand Down
3 changes: 3 additions & 0 deletions docs/gallery/turntable/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@ <h2>Source</h2>
<span class="c"># arbitrary turntable frame can land face-away and read as broken geometry.</span>
sc.frame_set(<span class="n">4</span>)
sc.render.resolution_x = <span class="n">1280</span>; sc.render.resolution_y = <span class="n">720</span>
<span class="c"># Blender resolves a relative filepath against the blend-file directory, which</span>
<span class="c"># for a --background run with no .blend is the drive root, not the cwd.</span>
path = os.path.abspath(path)
sc.render.image_settings.file_format = <span class="s">&#x27;PNG&#x27;</span>; sc.render.filepath = path
<span class="c"># AgX would wash the copper toward beige (docs/VISUAL-STYLE.md)</span>
sc.view_settings.view_transform = <span class="s">&#x27;Standard&#x27;</span>
Expand Down
3 changes: 3 additions & 0 deletions examples/damped-track-aim/damped_track_aim.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ def light(name, loc, energy, size, col):
scene.view_settings.view_transform = "Filmic"
scene.view_settings.look = "Medium High Contrast"
scene.render.image_settings.file_format = "PNG"
# Blender resolves a relative filepath against the blend-file directory, which
# for a --background run with no .blend is the drive root, not the cwd.
path = os.path.abspath(path)
scene.render.filepath = path
bpy.ops.render.render(write_still=True)
return os.path.exists(path) and os.path.getsize(path) > 0
Expand Down
3 changes: 3 additions & 0 deletions examples/gn-sdf-remesh/gn_sdf_remesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def render_still(obj, path, engine):
try: sc.eevee.taa_render_samples = 64
except Exception: pass
sc.render.resolution_x = 1280; sc.render.resolution_y = 720
# Blender resolves a relative filepath against the blend-file directory, which
# for a --background run with no .blend is the drive root, not the cwd.
path = os.path.abspath(path)
sc.render.image_settings.file_format = 'PNG'; sc.render.filepath = path
# AgX would wash the crimson toward brick (docs/VISUAL-STYLE.md)
sc.view_settings.view_transform = 'Standard'
Expand Down
3 changes: 3 additions & 0 deletions examples/turntable/turntable.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def render_still(obj, path, engine):
# arbitrary turntable frame can land face-away and read as broken geometry.
sc.frame_set(4)
sc.render.resolution_x = 1280; sc.render.resolution_y = 720
# Blender resolves a relative filepath against the blend-file directory, which
# for a --background run with no .blend is the drive root, not the cwd.
path = os.path.abspath(path)
sc.render.image_settings.file_format = 'PNG'; sc.render.filepath = path
# AgX would wash the copper toward beige (docs/VISUAL-STYLE.md)
sc.view_settings.view_transform = 'Standard'
Expand Down
Loading