Typed schema for the preview/decision evidence the placement services emit. The producers (ObjectPlacementService, SmoothPlacementService3D and ObjectPlacementPreviewDiagnostics3D) build one of these and hand to_dictionary() to their diagnostic sink; PlacementTelemetry.snapshot_preview() reads it back through from_dictionary(). The wire keys therefore live in ONE file instead of being spelled again at every producer and consumer, so renaming a field is a parse error rather than a snapshot field that silently reads its default. The dictionary stays at the sink boundary on purpose: the diagnostic entry points are public and accept plain dictionaries, and from_dictionary() keeps those callers working. extra_keys records keys this schema does not know, so a producer that renames a key surfaces as a mismatch instead of a silently dropped field.
Source: addons/grid_placement/telemetry/placement_preview_evidence.gd
Syntax
class PlacementPreviewEvidence extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
ACCEPTED_KEYS | Field | Every wire key this schema accepts, including the decision-only keys that PlacementTelemetry.snapshot_decision() adds to the same envelope. A producer spelling anything else lands in extra_keys. |
kind | Property | The event kind carried on the envelope ("preview" or "decision"). |
definition_key | Property | The wire key is "entry": the entry's resource path. This is the value the snapshot reports as `definition_key`. |
display_name | Property | The wire key is "definition_key": the entry's human label. The 3D producer sends both, and the snapshot does not report this one. |
dimension | Property | |
coordinate_mode | Property | |
mount_mode | Property | |
target | Property | Cell, position or transform the attempt targeted; shape depends on dimension. |
resolved | Property | Where the preview actually landed: Transform2D/Transform3D. |
valid | Property | |
attempt_id | Property | |
placed_instance_id | Property | |
reason | Property | |
occupancy | Property | The occupied cell (3D) or cell:normal pair, as the producers render it. |
provider | Property | |
socket | Property | |
fallback_reason | Property | |
replace_alignment | Property | |
replaced | Property | |
scenario | Property | |
checkpoint | Property | |
issues | Property | Issues that refused the attempt. Reported by the decision snapshot only. |
conflict_owner | Property | The rule that refused the attempt, when a rule owned the refusal. |
extra_keys | Property | Keys the source dictionary carried that this schema does not know. Empty is the only healthy value: a non-empty list means a producer and this schema disagree about the contract. |
from_dictionary | Method | |
to_dictionary | Method |