SettingSpec#
Import |
|
Defined in |
|
Install |
|
Since |
0.6 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.SettingSpec[source]#
Bases:
StrictWhere and when the panel happens: tonal masses, or a picture drawn elsewhere.
There is no `place` field here, deliberately.
place: docksis surface syntax that the frontend expands into exactly the mass list an author could have written themselves – the same treatmentalice left_of bobgets, which reaches the IR as aRelationand never as text. That is what keeps a preset a library for convenience rather than a second, opaque format: by the time anything downstream sees a backdrop, there is one representation of it.A panel with no masses and clear weather has no backdrop at all, which is what every panel written before this block existed still gets.
Example
>>> from scenet import SettingSpec, parse_panel >>> panel = parse_panel("setting: {place: docks, time: night}") >>> isinstance(panel.setting, SettingSpec) True >>> panel.setting.time.value, len(panel.setting.masses) > 0 ('night', True)
- horizon: Horizon#
Where the ground meets what is behind it, which every mass is composed against:
highshows more ground,lowless.
- masses: tuple[Mass, ...]#
The backdrop as tonal masses, back to front: what a
placeexpands into, written out. Write this,placeorimage, never two of them.
- time: TimeOfDay#
When the panel happens, which sets the two ends of the value ladder: the foreground’s value and the atmosphere’s.
- weather: Weather#
What the air is doing:
fogveils the backdrop;rainandsnowveil it as cloud, and fall over everything, the cast included.
- image: str | None#
A picture drawn elsewhere, behind the cast: a PNG or JPEG file, relative to the document. Only its size is read. Written instead of
placeandmasses.