Describing where and when it happens: the values#
The enumerations and values of this group, each the word an author writes.
PLACES#
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. |
- scenet.places.PLACES: dict[Place, tuple[Mass, ...]]#
What each place is made of, as the masses a
setting: {place: ...}expands into.Every entry here is a plain mass list, and a test proves it: whatever a preset produces, an author could have typed. The expansion happens in the frontend, so nothing downstream ever sees a place.
Example
>>> from scenet import PLACES, Place >>> [mass.kind.value for mass in PLACES[Place.DOCKS]] ['sky', 'building', 'water', 'structural', 'ground']
Fit#
Import |
|
Defined in |
|
Install |
|
Since |
0.12 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.Fit[source]#
Bases:
StrEnumHow a supplied picture fills the panel, keeping its own proportions.
Fit
The picture
SVG’s word
coverFills the panel; what overhangs it is cropped, equally on both sides
slicecontainIs shown whole; the panel shows round it where their shapes differ
meetCentred either way. A picture is never stretched: its shape is a fact about it, and a figure drawn into it would be stretched with it.
Example
>>> from scenet import Fit, SettingSpec >>> SettingSpec(image="art/street.png", fit="contain").fit is Fit.CONTAIN True
See also
SettingSpec, whosefittakes one.- COVER = 'cover'#
- CONTAIN = 'contain'#
Horizon#
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.Horizon[source]#
Bases:
StrEnumWhere the ground meets whatever is behind it.
One line for the whole panel, which every mass is composed against: masses of the ground sort start at it and run down, masses that stand in the world rise from it. Named rather than given as a number for the same reason
at:is – the author is saying how the panel is composed, not typing a coordinate.Example
>>> from scenet import Horizon, SettingSpec >>> SettingSpec(horizon="low").horizon is Horizon.LOW True
See also
SettingSpec, whosehorizontakes one.Mass, which is composed against it.- HIGH = 'high'#
- MID = 'mid'#
- LOW = 'low'#
MassKind#
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.MassKind[source]#
Bases:
StrEnumWhat a tonal mass in the backdrop is made of.
Subsetted from the supercategories of COCO-Stuff, the canonical taxonomy of stuff – “amorphous background regions” as opposed to things with a well-defined shape. Its own argument is that stuff classes explain scene type and the geometric properties of a scene, which is exactly the job here. Taken from an existing vocabulary for the same reason the predicates were taken from Visual Genome.
Deliberately not the leaf names. COCO-Stuff’s actual classes are
building-other,sky-other,wall-brick,water-otherand so on, where the-othersuffix marks the catch-all inside a supercategory.building-otheris not a word anyone should have to type.Seven are outdoor –
building,ground,plant,sky,solid,structural,water– and five indoor:ceiling,floor,furniture,wall,window. COCO-Stuff’s own indoor/outdoor split is where that distinction comes from, so it did not have to be invented either. Itstextile,foodandrawmaterialsupercategories are left out: drapery and objects, not scene-defining masses.A kind decides the shape a mass takes, never its value. Value comes from the plane, which is what keeps the notan reading honest – see
Plane.Example
>>> from scenet import Mass, MassKind >>> Mass(kind="wall").kind is MassKind.WALL True
See also
Mass, whosekindtakes one.- BUILDING = 'building'#
- CEILING = 'ceiling'#
- FLOOR = 'floor'#
- FURNITURE = 'furniture'#
- GROUND = 'ground'#
- PLANT = 'plant'#
- SKY = 'sky'#
- SOLID = 'solid'#
- STRUCTURAL = 'structural'#
- WALL = 'wall'#
- WATER = 'water'#
- WINDOW = 'window'#
Place#
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.places.Place[source]#
Bases:
StrEnumA named setting, expanded into masses by the frontend.
Ten to start with, chosen to span the distinctions that change how a backdrop is built rather than to be a catalogue: exterior and interior, built and natural, open and enclosed.
alleyis the one with a foreground mass, which is what makes it read as a place you are standing in rather than looking at.Example
>>> from scenet import PLACES, Place >>> [mass.kind.value for mass in PLACES[Place.SHORE]] ['sky', 'water', 'ground']
See also
PLACES, what each place expands into.SettingSpec, whoseplacetakes one.- ALLEY = 'alley'#
- DESERT = 'desert'#
- DOCKS = 'docks'#
- FIELD = 'field'#
- FOREST = 'forest'#
- MOUNTAIN = 'mountain'#
- OFFICE = 'office'#
- ROOM = 'room'#
- SHORE = 'shore'#
- STREET = 'street'#
Plane#
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.Plane[source]#
Bases:
StrEnumHow far back a mass sits, which decides both its draw order and its value.
Four planes, ordered from the back of the panel forward. They map onto the existing integer
CoreActor.depthpainter’s order rather than introducing a second ordering mechanism: the three backdrop planes take negative depths, andforegroundtakes one above the frontmost actor, so a foreground mass draws over the cast the way a silhouetted doorway does.Value follows from the plane and from nothing else, which is what makes the aerial perspective rule parametric: with distance, contrast drops toward the atmosphere. Reading front to back, a mass never gets darker. See
tone_for.Example
>>> from scenet import Mass, Plane >>> Mass(kind="building", plane="far").plane is Plane.FAR True
See also
Mass, whoseplanetakes one.- FOREGROUND = 'foreground'#
- NEAR = 'near'#
- MID = 'mid'#
- FAR = 'far'#
Spans#
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.Spans[source]#
Bases:
StrEnumHow much of the panel’s width a mass covers.
Resolved to an extent in the frontend, and that is not cosmetic. Any construct that would reintroduce a left/right disjunction has to resolve it before the solver, because Cassowary cannot express “A left of B or B left of A”. A span is an absolute extent rather than a relation, which is what stops masses becoming an unordered
beside.Example
>>> from scenet import Mass, Spans >>> Mass(kind="building", spans="left").spans is Spans.LEFT True
See also
Mass, whosespanstakes one.- FULL = 'full'#
- LEFT = 'left'#
- CENTRE = 'center'#
- RIGHT = 'right'#
- property fractions: tuple[float, float]#
The extent as
(start, end)fractions of panel width.leftandrightoverlap slightly in the middle. Butting them exactly would leave a seam down the centre of the panel wherever both are used at the same plane, which reads as a mistake rather than as two masses.Example
>>> from scenet import Spans >>> Spans.FULL.fractions (0.0, 1.0)
TimeOfDay#
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.TimeOfDay[source]#
Bases:
StrEnumWhen the panel happens, which shifts the whole value ladder.
Each time supplies two numbers – the value of the foreground and the value of the atmosphere – and the planes are spaced evenly between them. So
nightis not a blue filter over a daytime panel: it is a darker, more compressed ladder, which is what night actually does to a drawn scene. The ladder stays monotonic in depth at every time of day, by construction rather than by tuning.Example
>>> from scenet import SettingSpec, TimeOfDay >>> SettingSpec(time="night").time is TimeOfDay.NIGHT True
See also
SettingSpec, whosetimetakes one.- DAWN = 'dawn'#
- DAY = 'day'#
- DUSK = 'dusk'#
- NIGHT = 'night'#
TypeSize#
Import |
|
Defined in |
|
Install |
|
Since |
0.11 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.TypeSize[source]#
Bases:
StrEnumHow large a line of dialogue is lettered, against the panel’s dialogue size.
Dark Horse lists “(small), (burst), and (weak)” among the common indications for modified lettering. Blambot, Small Dialogue / Big Balloon: “A reduced font size is used when a character mutters something, says something to him/herself, or speaks sheepishly” – smaller type, in the room the balloon would have had.
Example
>>> from scenet import TypeSize, compile_source >>> def size(text): ... source = "cast: {a: {reference: alice}}\nscript: [{say: " + text + "}]" ... return compile_source(source).core.balloons[0].font_size >>> size("{by: a, text: mm., size: small}") < size("{by: a, text: mm.}") True >>> TypeSize("small") is TypeSize.SMALL True
See also
SayEvent, whosesizetakes one.LetteringSpec, the panel’s own dialogue size.- NORMAL = 'normal'#
- SMALL = 'small'#
Weather#
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.Weather[source]#
Bases:
StrEnumWhat the air is doing between the reader and the panel.
cloudsandfogare first-class stuff in COCO-Stuff, so this vocabulary did not have to be invented either.fogrenders as a turbulence veil over the backdrop;rainandsnowadd that veil as cloud and put falling marks over everything, because weather is between the reader and the figures rather than behind them.Example
>>> from scenet import SettingSpec, Weather >>> SettingSpec(weather="rain").weather is Weather.RAIN True
See also
SettingSpec, whoseweathertakes one.- CLEAR = 'clear'#
- RAIN = 'rain'#
- FOG = 'fog'#
- SNOW = 'snow'#