uv-and-mesh-attributes
Installation
SKILL.md
UV Layers and Mesh Attributes
Trigger
Use this skill when the user:
- Creates or edits UVs from a script (
mesh.uv_layers,bm.loops.layers.uv,calc_uvs=True) - Builds a second UV channel for baked lighting, or runs
uv.lightmap_pack/uv.smart_projecton it - Computes tangents for a normal-mapped game asset (
calc_tangents,bitangent_sign) - Writes vertex colors (
color_attributes, the deprecatedvertex_colors) - Authors shape keys or reads a blended shape
- Caps skin weights at four influences per vertex for a game engine
- Reports a textured mesh that renders as one flat color, a UV op that wrecked channel 0, a crash or garbage values after
calc_tangents, or weights that sum short of one
High-level shape
Every one of these lives in the mesh's CustomData. Three rules cover most bugs: create the layer before anything that fills it, address layers by name, and re-fetch a layer by name after any call that can reallocate CustomData.