Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

edui.inspector.assetSections

The generic sections every asset's Inspector shows, in default order:

idTitleShows
identityAssetname, type, scope, guid and description
problemsProblemswhat asset.validate reports for the asset — a missing required file, a type's semantic problems — one notice each; present only when it reports any, and read once per content version of the asset and of its type's folder. A validation that raises, or answers without a problems list, shows as the one problem inspector.validate_failed naming why, and is read again on the next build
tagsTagsthe asset's tags as removable chips, and an add row
moveMovethe asset's folder path and a Move button; left out for an asset outside the world's own source tree
settingsSettingsthe typed, editable settings (settingsSection.module); left out when the asset has neither values nor a schema problem
previewPreviewthe live preview (drag to orbit, wheel to zoom) or the still picture; left out when the asset has neither
operationsOperationsevery ref method the type declares except setSettings, each a disclosure row whose signature becomes a typed argument form run against the asset; collapsed when the type declares an inspector of its own
local AssetSections = require("@builtin::editor.edui.inspector.assetSections")
local sections = AssetSections.generic(ctx)   -- ctx from edui.inspector's valuesContext
local settingsOnly = AssetSections.generic(ctx, { settings = true })

generic(ctx, only) builds only the sections only names; one it leaves out is not read at all.

Each section's controls carry callback keys under ctx.keyPrefix, so two subjects never share one. The open operation rows, their argument forms, the last result and the pending tag and move inputs are kept per asset; AssetSections.releaseExcept(id) drops every other asset's, and the validation problems read for them.