Log inGet started
Package

ZeroBlender.package

README.md

meshEdit

Blender edit-mode operations on meshBuf Meshes, in place, with no mesh-sized Luau tables. Used by bpy (B.ops.mesh / B.ops.transform, SUBSURF modifier).

Selection lives on the mesh: m.selMode ("VERT" | "EDGE" | "FACE") and m.SEL (per vertex, per MB.edges(m) edge id, or per face).

  • selectAll(m, action) — "SELECT" | "DESELECT" | "INVERT"; selectMode(m, mode) (clears the selection)
  • selectedVerts(m) -> W flags, count; median(m) -> x, y, z
  • translate(m, v), resize(m, v, center?), rotate(m, angle, axis, center?) — on the selected vertices; center defaults to the selection median. v/center are {x,y,z}, {x=,y=,z=} or a vector.
  • extrudeRegion(m, t) — FACE mode; selected faces become the moved caps (keep indices, stay selected), side quads appended; originals kept flipped when the region touches an open boundary.
  • inset(m, thickness, depth, individual?) — FACE mode; region (default) or per-face.
  • subdivide(m, cuts) — all faces selected; cuts=1 simple split, cuts>1 grid split of quads.
  • subsurf(m, levels, simple) -> NEW Mesh (caller frees). Catmull-Clark with Blender boundary rules (boundary vertex 3/4 p + 1/8 neighbours, boundary edge midpoints, non-manifold vertices fixed).
  • triangulateFace = MB.triangulateFace.

Material slots (FM) and UV layers are carried onto every created face.