Skip to content

examples: png-exr-alpha teaches scene image_settings for Image.save(); missing falsifier and per-element writes elsewhere #474

Closed

Description

@TMHSDigital

Why it matters

Small items, but each one teaches a wrong mechanism or leaves a check without a falsifier, and agents copy examples literally.

Items

  • png-exr-alpha :242-254: it sets scene image_settings (EXR/RGBA/32, inside a try/except: pass) before img_f2.save(). Image.save() ignores scene settings, so the example teaches the wrong mechanism (the counterpart of snippets: save_baked_image sets image.file_format, which save_render ignores #332). Use Image.file_format with save(), or save_render with explicit settings. Also remove the silent except: pass.
  • gn-sdf-remesh: the "material dropped" check (exit 6) has no falsifier. Add --no-set-material.
  • triangulate-tangents :606: for loop in uv.data: loop.uv = ... is a per-element bulk write. Use uv.data.foreach_set("uv", ...). tests/check_example_rules.py matches only .polygons and .vertices; widen it to .data, .loops and .edges on mesh/attribute layers.
  • unapplied-scale-gltf :72-80: local_extent builds per-vertex Python lists. Use foreach_get (cosmetic, but it's an example).
  • text-version-stamp: its docstring references export-preset-axis's --same-axis by mistake.

Done when

Each item is fixed, and the widened bulk-write lint passes over examples and showcase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesgood first issuepriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions