Typed value object for how a placed 3D object is mounted. Replaces the untyped mount sub-dictionary that passed between ObjectPlacementService3D (save side) and Demo3DPlacement ._on_placed_objects_restored (restore side). The mount type, cell, and edge/face keys now live on a typed object with a single 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 entry for the in-memory SAVE path (ObjectPlacementService3D.get_save_metadata() reads it), but it is intentionally EXCLUDED from to_dict() — a Resource does not survive a JSON round-trip, so on LOAD the entry is NOT in the saved dict and from_dict() leaves it null. The restore side therefore supplies the entry explicitly: the demo reads it from PlaceableInstance.placeable and passes it to 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): to_dict() / from_dict() own the string-key serialization, and get_save_metadata() still returns the { "mount": {...}, "entry": ... } 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 to_dict() / 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_CORNER | Field | |
KEY_YAW_STEPS | Field | |
type | Property | |
cell | Property | |
edge | Property | |
face_normal | Property | |
corner | 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 from_dict(). |
for_cell | Method | |
for_edge | Method | |
for_face | Method | |
for_top | Method | |
for_corner | Method | |
to_dict | Method | |
from_dict | Method | |
is_valid_dict | Method | |
apply_to | Method |