Log inGet started
Package

sceneAuthoring.toolbox

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

Scene authoring

Persistent edit-mode scenes save authored changes automatically and compose them with their generated build state. scene:authoringStatus() reports recorded operations, retained authored fields, conflicts and persistence status.

Use reviewRecorded to inspect pending recorded operations in the open scene. It returns observed, accepted and recorded field values, session ordering, conflicts and a review receipt. Use resolveRecorded with that receipt to keep recorded values, use accepted values, or choose exact fields. The guarded source revisions must still match. Unselected proposed fields remain, and unresolved conflicts retain the journal operation.

local report=tools.use("sceneAuthoring","reviewRecorded",{limit=20})
local result=tools.use("sceneAuthoring","resolveRecorded",{
    review=report.review,operation=report.operations[1].path,
    fields={{entity=report.operations[1].fields[1].entity,
        path=report.operations[1].fields[1].path,choice="recorded"}},
})

An edit recorded on an entity the build placed holds over every build; a build names each one in its authored list, and releaseAuthored releases an entity's recorded edits so its fields follow the build again.

Use reviewSources to find editable build inputs and the placements they affect. It returns source ranges, scope completeness and a revision receipt. replaceSource takes that receipt, the input owner/id, a replacement expression and all reviewed output identities, then commits the source, generated scene and refreshed bindings together while retaining authored overrides. Filter reviewSources by entity to distinguish shared inputs from inputs scoped to one placement.

A build always applies. An authored edit that names a field, entity, parent, reference or component the build no longer produces is retired: it leaves the composed scene, stays in the scene's authoring state, and reviewRecorded lists it under retired with the entity's name, the field path and the value it held. reapplyRetired puts the field edits of one entity on another entity, and discardRecorded removes saved authored edits so their fields follow the build, or forgets retired edits.

A broken part of the scene build.luau itself states (a dangling parent or reference, a parent cycle, a record that cannot be restored) is skipped while the rest of the build is placed; reviewRecorded lists those under skipped, each with source = "build".

The live/session review tools are changes, acceptChanges and rejectChanges. Their survey includes entity differences, referenced assets, play-edited source files, effects and UI registrations. Accepting saves the selected scene content and the play-created assets it references. The session keeps running while a review is inspected. A legacy scene without an operation journal is identified by reviewRecorded and directed to changes.