feat: add uv-layer-grid example (create_grid calc_uvs silent no-op)#67
Merged
Conversation
…t no-op AI code trusts calc_uvs=True and ships flat Image Textures; this smoke-gated witness proves the pre-create repair against closed-form UVs and stages the failure mode beside the fix. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
examples/uv-layer-grid/witnessing thatbmesh.ops.create_grid(..., calc_uvs=True)is a silent no-op unless a UV layer already exists — the hazard that makes Image Textures sample texel (0,0) everywhere.calc_uvsagainst closed-form UVs((x/size+1)/2, (y/size+1)/2)within1e-6(bmesh + mesh persistence), and an explicit loop-assignment fallback. Dual-panel gallery still: flat teal (broken) beside neon checker (repaired).API contract / falsification
calc_uvs=Truestarts creating a layer alone0.1to every U aftercalc_uvs→ exit 6, measured err1.00e-01Test plan
0UV layers on hazard path; calc/mesh/explicit errs0.00e+00(tol1e-06)blender-smoke4.5 jobpython scripts/build_gallery.py; local count/manifest/gallery path checksVisual notes
Two easel panels, dark studio + warm wedge. Left = missing UV (flat teal of texel 0,0). Right = pre-create + calc_uvs (magenta/cyan checker). Failure of the UV contract would make both panels identical.