Typed value object for how a placed 3D object is mounted. Replaces the untyped mount sub-dictionary that passed between [ObjectPlacementService3D] (save side) and [code]Demo3DPlacement ._on_placed_objects_restored[/code] (restore side). The mount type, cell, and edge/face keys now live on a typed object with a single [method apply_to] dispatch entry point, so adding a mount type (e.g. a corner socket) is a one-file change instead of editing the service, the persistence layer, and the demo reader. The placed [ScenePlacementEntry] is carried on [member entry] for the in-memory SAVE path ([method ObjectPlacementService3D.get_save_metadata] reads it), but it is intentionally EXCLUDED from [method to_dict] — a [Resource] does not survive a JSON round-trip, so on LOAD the entry is NOT in the saved dict and [method from_dict] leaves it null. The restore side therefore supplies the entry explicitly: the demo reads it from [member PlaceableInstance.placeable] and passes it to [method apply_to], exactly as the earlier restore did. The on-disk / cross-boundary representation stays a [Dictionary] (the save contract + its contract test are preserved): [method to_dict] / [method from_dict] own the string-key serialization, and [method get_save_metadata] still returns the [code]{ "mount": {...}, "entry": ... }[/code] shape.
Source: addons/grid_placement/systems/building/3d/placement_mount.gd
Syntax
class PlacementMount extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
KEY_TYPE | Field | String keys used by [method to_dict] / [method from_dict]. Centralized so the service, persistence layer, and demo never spell them inline. |
KEY_CELL | Field | |
KEY_EDGE | Field | |
KEY_FACE_NORMAL | Field | |
KEY_YAW_STEPS | Field | |
type | Property | |
cell | Property | |
edge | Property | |
face_normal | Property | |
yaw_steps | Property | Fixed 90-degree yaw steps for cell mounts. A negative value means the source save predates yaw metadata and must recover it from the transform. |
entry | Property | In-memory only (save path). Null after a JSON [method from_dict]. |
for_cell | Method | |
for_edge | Method | |
for_face | Method | |
to_dict | Method | |
from_dict | Method | |
is_valid_dict | Method | |
apply_to | Method |