Skip to content

Commit 9a22f58

Browse files
TMHSDigitalclaude
andcommitted
fix(gallery): regenerate export-preset-axis page after the #326 source change
3b0f5a0 changed examples/export-preset-axis/export_preset_axis.py, whose source the gallery detail page inlines, without re-running scripts/build_gallery.py. Validate's "committed gallery matches its generator" step has been red since. Regenerated; no other page changed. Refs #326 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 17c4ca1 commit 9a22f58

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

‎docs/gallery/export-preset-axis/index.html‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ <h2 id="exit-codes">Exit codes<a class="anchor" href="#exit-codes" aria-label="L
8686
<h2>Source</h2>
8787
<div class="src-meta">
8888
<code>examples/export-preset-axis/export_preset_axis.py</code>
89-
<span>758 lines &middot; <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/export-preset-axis/export_preset_axis.py">View on GitHub &rarr;</a></span>
89+
<span>759 lines &middot; <a href="https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/examples/export-preset-axis/export_preset_axis.py">View on GitHub &rarr;</a></span>
9090
</div>
91-
<div class="code" data-lines="758">
91+
<div class="code" data-lines="759">
9292
<pre class="gutter" aria-hidden="true">1
9393
2
9494
3
@@ -846,7 +846,8 @@ <h2>Source</h2>
846846
755
847847
756
848848
757
849-
758</pre><pre class="code-lines"><span class="s">&quot;&quot;&quot;Unity vs Godot glTF presets: a runnable example.
849+
758
850+
759</pre><pre class="code-lines"><span class="s">&quot;&quot;&quot;Unity vs Godot glTF presets: a runnable example.
850851

851852
Same source mesh, two presets. Unity is Y-up (`export_yup=True`). Godot in this
852853
repo is Z-up glTF (`export_yup=False`). Re-importing each file through Blender&#x27;s
@@ -1151,15 +1152,16 @@ <h2>Source</h2>
11511152

11521153

11531154
<span class="k">def</span> apply_selected_mesh_transforms():
1154-
<span class="k">for</span> obj <span class="k">in</span> list(bpy.context.selected_objects):
1155-
<span class="k">if</span> obj.type != <span class="s">&quot;MESH&quot;</span>:
1156-
<span class="k">continue</span>
1157-
<span class="k">with</span> bpy.context.temp_override(
1158-
object=obj, active_object=obj, selected_objects=[obj]
1159-
):
1160-
bpy.ops.object.transform_apply(
1161-
location=<span class="k">False</span>, rotation=<span class="k">True</span>, scale=<span class="k">True</span>
1162-
)
1155+
<span class="c"># Same body as snippets/export_preset_unity.py: one operator call for the</span>
1156+
<span class="c"># whole selection. transform_apply acts on selected_editable_objects, so</span>
1157+
<span class="c"># that is the key to override; selected_objects alone does not narrow it.</span>
1158+
meshes = [o <span class="k">for</span> o <span class="k">in</span> bpy.context.selected_objects <span class="k">if</span> o.type == <span class="s">&quot;MESH&quot;</span>]
1159+
<span class="k">if</span> <span class="k">not</span> meshes:
1160+
<span class="k">return</span>
1161+
<span class="k">with</span> bpy.context.temp_override(
1162+
object=meshes[<span class="n">0</span>], active_object=meshes[<span class="n">0</span>], selected_editable_objects=meshes
1163+
):
1164+
bpy.ops.object.transform_apply(location=<span class="k">False</span>, rotation=<span class="k">True</span>, scale=<span class="k">True</span>)
11631165

11641166

11651167
<span class="k">def</span> export_selected(path, kwargs):

0 commit comments

Comments
 (0)