Skip to content

feat: add uv-layer-grid example (create_grid calc_uvs silent no-op)#67

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/uv-layer-grid-example
Jul 19, 2026
Merged

feat: add uv-layer-grid example (create_grid calc_uvs silent no-op)#67
TMHSDigital merged 1 commit into
mainfrom
feat/uv-layer-grid-example

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

  • Ships examples/uv-layer-grid/ witnessing that bmesh.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.
  • Checks: hazard (0 layers), pre-create + calc_uvs against closed-form UVs ((x/size+1)/2, (y/size+1)/2) within 1e-6 (bmesh + mesh persistence), and an explicit loop-assignment fallback. Dual-panel gallery still: flat teal (broken) beside neon checker (repaired).
  • Wired gallery.json, plugin manifest, blender-smoke, README counts (21), ROADMAP (shipped + added attribute-domain candidate).

API contract / falsification

Check Failure caught Falsified
Silent no-op calc_uvs=True starts creating a layer alone Pre-created a layer before the hazard probe → exit 3
Closed-form UVs Wrong parameterization / shift Added 0.1 to every U after calc_uvs → exit 6, measured err 1.00e-01

Test plan

  • Check-only on Blender 5.1.1 locally — measured: 0 UV layers on hazard path; calc/mesh/explicit errs 0.00e+00 (tol 1e-06)
  • Check-only on Blender 4.5 LTSnot installed locally (host has 4.4.3 + 5.1.1 only); rely on blender-smoke 4.5 job
  • Cycles gallery render + visual inspect (full + thumbnail); webp hero/preview generated
  • python scripts/build_gallery.py; local count/manifest/gallery path checks
  • CI: validate, drift, blender-smoke 4.5 + 5.1

Visual 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.

…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>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci labels Jul 19, 2026
@TMHSDigital
TMHSDigital merged commit a12a6bf into main Jul 19, 2026
9 checks passed
@TMHSDigital
TMHSDigital deleted the feat/uv-layer-grid-example branch July 19, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant