Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit61a33237e0

README.md

MaterialAuthor.toolbox / shared.module

⚠️ Authoring-only. Helpers for an agent-facing, design-time toolbox. Never used from gameplay/runtime code.

Cross-tool helpers required by each authoring tool via require(".shared"):

  • ok(value, formatted) / fail(message, exitCode) — result envelopes.
  • createMaterial(name, opts) — create a material via the generic asset.create("material", …) path and return its live AssetRef.
  • SLOTS — canonical pbr texture-slot names.
  • slotForName(stem) — infer a PBR slot from a texture filename/asset stem (albedo/basecolor/diffuse → base colour, normal, roughness/ metallic/orm, ao/occlusion, emissive).
  • textureRef(texture) — coerce a texture proxy / AssetRef / identity / path to the slot ref string + a display name.
  • resolveMaterial(source) — resolve a material AssetRef / identity / name to a live AssetRef<material>.
  • stripExt(name) / IMAGE_EXTS — naming + image-extension helpers.

Per convention, per-tool logic stays in each <x>.tool/init.luau; only genuinely shared helpers live here.