What it does
scene
Scene tab for the System Tools inspector — lists saved + library
scenes (grouped by prefix), click-to-load buttons, a Save-as row.
Input-driven (refresh = 0) — the panel only rebuilds on click or
save callbacks. Scene list is cached for 1 s because the scene set
rarely changes.
Exports
M.build(_state) -> any— build the zui widget tree for the tab.M.onCallback(callbackId: string, data, _state) -> boolean— handle scene-load (saved/lib), Save-as input, Save button.M.label: string— tab title.M.refresh: number— refresh cadence in seconds (0 = input-driven).
Usage
local Scene = require("@builtin::modules.engine.editor.system_tools.tabs.scene")
local widget = Scene.build(state)
Scene.onCallback("scene-save-as", nil, state)
Notes
- Saved scenes are local; library scenes are identified by the
::in their identity and are grouped under their first dotted prefix. - All
layers.load/layers.active:savecalls go throughpcall; the outcome is surfaced via the inline flash message (lasts ~4 s). - The Save-as input value lives in module-local
saveAsName; it is updated on every keystroke via the input callback.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.