Repository navigation
refactor(examples): drop 139 try/except guards that could never fire - #428
Merged
Merged
Conversation
129 example and showcase scripts wrapped `scene.eevee.taa_render_samples` and Principled v2 / Wave input names (Coat Weight, Specular IOR Level, Subsurface Weight, Detail Roughness) in `except AttributeError/KeyError/ Exception: pass`. Probed on 4.5.11 LTS, 5.1.2 and 5.2.1 LTS: every one of those attributes and sockets exists, so the guards were dead code that would silently swallow a typo in exactly the kind of name this repo exists to get right. The statements now run unguarded. Closes #405 Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
CI evidence before merge: all checks pass ( 13 pass ). Blender Smoke on PR head: Blender 5.2.2 LTS / Blender 4.5.14 LTS. Summaries (happy path; falsifiers) per leg: 141 passed, 3 skipped, 0 failed;136 passed, 7 skipped, 0 failed;143 passed, 1 skipped, 0 failed;143 passed, 0 skipped, 0 failed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #405.
Change
A scripted transform unwraps two shapes in 129
examples/andshowcase/scripts:try: <stmt> / except (AttributeError|KeyError|Exception): pass, single-line and multi-line forms;<stmt>touchestaa_render_samplesor one of the input namesCoat Weight,Specular IOR Level,Subsurface WeightorDetail Roughness.That is 139 guards in total: 114
taa_render_samplesplus 9KeyErrorblocks, with the remainder in single-line forms. Every edited fileast.parses. No other try/except was touched.Evidence
Probe, live (
--factory-startup; binaries report 4.5.11 LTS, 5.1.2, 5.2.1 LTS):scene.eevee.taa_render_samples = 64succeeds under that version's EEVEE id and under Cycles.Coat Weight,Specular IOR LevelandSubsurface Weighton all three versions; Wave texture hasDetail Roughness.So none of the guards could ever fire on a supported version.
Scripts whose former
KeyErrorguards were edited, check path on 5.2.1 and 4.5.11. All exit 0:The showcase material builders run on the check path, so these runs exercised the unguarded lines.
Render paths (
--output --engine cycles, 5.2.1):gn-sdf-remesh(former guard inrender_still): exit 0, still written;turntable(one-linetaaguard): exit 0, still written.Validators:
check_helper_drift(--strict, variant counts unchanged),check_render_gates,check_engine_id,check_exit_code_readme,check_witnessesandcheck_falsifier_targetsall pass. CI smoke runs every check path on 5.2 and 4.5.Not run: the render paths of the other ~110 scripts. Their only change is an attribute assignment proven to exist on all three versions.
🤖 Generated with Claude Code