← ClaudeAtlas

ai-mesh-cleanuplisted

Ordered cleanup for an imported generated mesh. Unit scale, transform apply, origin, normals, evaluated triangle count, decimate to budget, convex collider. Targets 5.2 LTS with 4.5 LTS fallback.
TMHSDigital/Blender-Developer-Tools · ★ 13 · AI & Automation · score 66
Install: claude install-skill TMHSDigital/Blender-Developer-Tools
# AI Mesh Cleanup ## Trigger Use this skill when the user: - Has a generated or scanned GLB/glTF/FBX that is not engine-ready - Mentions unit scale, unapplied transforms, triangle budget, LOD, or a collision hull - Wants a headless cleanup pass (import in, cleaned mesh out) - Is about to run mesh operators on an import without checking scale This skill is the ordered pipeline. It composes `depsgraph-and-evaluated-data` and `mesh-editing-and-bmesh`; it does not replace them. It does not generate meshes and does not call any generation vendor. ## The core misunderstanding An imported generated mesh is not a game asset. Typical residue: object scale not identity, scene units not meters, origin in the wrong place, inverted normals, triangle soup over budget, no collider. Running decimate or export on that state bakes the pathology in. Do the cleanup in this order. Skipping a step makes later measurements lie. ## The canonical pattern ```python import bmesh import bpy def imported_meshes(): return [o for o in bpy.context.selected_objects if o.type == "MESH"] def scene_units_are_meters(scene): units = scene.unit_settings if units.system not in {"METRIC", "NONE"}: return False return abs(units.scale_length - 1.0) < 1e-6 def scale_is_identity(obj, tol=1e-6): sx, sy, sz = obj.scale return abs(sx - 1.0) < tol and abs(sy - 1.0) < tol and abs(sz - 1.0) < tol def apply_object_transform(obj): with bpy.context.temp_override( objec