fieldEditDisabledReason method

String? fieldEditDisabledReason(
  1. TSourceDocument document,
  2. ElementId nodeId,
  3. CanvasFieldKey fieldKey
)

Returns why a registered literal field cannot currently be edited.

This is evaluated against the current canonical TSourceDocument. Return null to allow the literal commit, or a non-empty user-facing reason to deny it.

nodeId is kSceneFieldsId for registered scene-level fields.

This hook governs registered literal edits through EditorController.commitField only. It is not an authorization boundary and does not restrict structural EditorEdit operations or source-document-level mutations.

Implementations must be synchronous, deterministic, side-effect-free, and fast because this may be evaluated during UI builds and commits.

Implementation

String? fieldEditDisabledReason(
  TSourceDocument document,
  rt.ElementId nodeId,
  rt.CanvasFieldKey fieldKey,
) => null;