Describing a panel: the values#
The enumerations and values of this group, each the word an author writes.
AnchorX#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.AnchorX[source]#
Bases:
StrEnumWhere along the panel width an actor would like to stand.
Horizontal only. Actors stand on a ground line, so their vertical position is derived from the camera rather than requested – which is why this has no vertical counterpart and
PlacementZone, used for balloons, does.These are weak preferences. Non-overlap and declared left-to-right ordering are required constraints and will override an anchor without complaint; two actors both asking for
centerwill simply be pushed apart around it.Example
>>> from scenet import AnchorX, compile_source >>> core = compile_source("cast: {a: {reference: alice, at: left_third}}").core >>> AnchorX("left_third") is AnchorX.LEFT_THIRD True >>> core.actors[0].bounds.centre.x < core.width / 2 True
See also
CastMember, whoseattakes one.Predicate, to stage two actors against each other instead.- LEFT_EDGE = 'left_edge'#
- LEFT_THIRD = 'left_third'#
- CENTRE = 'center'#
- RIGHT_THIRD = 'right_third'#
- RIGHT_EDGE = 'right_edge'#
BalloonKind#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.BalloonKind[source]#
Bases:
StrEnumWhat kind of balloon carries a line, which is how it gets drawn.
The kind changes the outline and the tail, never the placement: a whisper is subject to exactly the same face-avoidance and reading-order rules as a shout.
Kind
Outline
Tail
speechrounded rectangle
tapered pointer
thoughtellipse
trail of bubbles
whisperdashed rounded rectangle
tapered pointer
shoutjagged burst
tapered pointer
Example
>>> from scenet import BalloonKind, compile_source >>> core = compile_source( ... "cast: {a: {reference: alice}}\n" ... "script: [{say: {by: a, text: Psst., kind: whisper}}]" ... ).core >>> core.balloons[0].kind is BalloonKind.WHISPER True
See also
SayEvent, whosekindtakes one.- SPEECH = 'speech'#
- THOUGHT = 'thought'#
- WHISPER = 'whisper'#
- SHOUT = 'shout'#
CameraAngle#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.CameraAngle[source]#
Bases:
StrEnumThe camera’s height relative to the subject.
Affects headroom rather than perspective: this is a flat, orthographic compiler, so a tilted camera does not foreshorten anything. What it changes is how much air sits above the head – which is the compositional cue readers actually take from an angle, and one that survives being drawn flat.
A low camera looks up and the subject looms, so the head rides high in the frame with little space above it. A high camera looks down, so the head sits lower and more space opens up above. See
headroom_forfor the exact factors.Example
>>> from scenet import CameraAngle, compile_source >>> core = compile_source("camera: {angle: low}\ncast: {a: {reference: alice}}").core >>> core.camera.angle is CameraAngle.LOW True
See also
CameraSpec, whoseangletakes one.ShotType, the other half of the camera.- LOW = 'low'#
- EYE_LEVEL = 'eye_level'#
- HIGH = 'high'#
CaptionKind#
Import |
|
Defined in |
|
Install |
|
Since |
0.4 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.CaptionKind[source]#
Bases:
StrEnumWhat a caption box is doing, which is how it gets set.
These four are the letterers’ own vocabulary, taken from Blambot’s Comic Book Grammar & Tradition rather than invented – for the same reason the predicates were taken from Visual Genome. Note that “narration”, the obvious guess, is not among them.
Kind
What it is
How it is set
localeLocation and time – “Midnight. The docks.”
Italic
monologueA character’s inner voice
Italic
spokenOff-panel dialogue
Roman, in quotation marks
editorialThe voice of the writer or editor
Italic
monologuehas largely replaced the thought balloon in modern comics, so a panel has two ways to render an inner voice: this andBalloonKind.THOUGHT. Both are correct. They are different eras of the same convention, not a duplication.Example
>>> from scenet import CaptionKind >>> CaptionKind.LOCALE.is_italic, CaptionKind.SPOKEN.is_italic (True, False)
See also
CaptionEvent, whosekindtakes one.CaptionTone, the box a caption is lettered on.- LOCALE = 'locale'#
- MONOLOGUE = 'monologue'#
- SPOKEN = 'spoken'#
- EDITORIAL = 'editorial'#
CaptionTone#
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.CaptionTone[source]#
Bases:
StrEnumThe value a caption box is filled with.
A caption box is opaque, so its lettering is never at risk: the text sits on the fill whatever is behind it. What a tone changes is whether the box reads. On a clear day the atmosphere is
#eeeeeeand a white box on it is 1.16:1 – legible, and invisible. The failing case is the pale end, not the dark one.Tone
Fill
Where it comes from
Lettered in
paper#ffffffthe paper the panel is printed on
ink
pale#adadadthe
dayrow of the value ladder, far planeink
ink#090909the
dayrow of the value ladder, foregroundpaper
warm#eeeeeethe
dayrow of the value ladder, atmosphereink
Drawn from the ladder in `solve/backdrop.py`, not from a second palette. Three of the four are rungs of it, taken by index rather than restated, which is what keeps lettering and backdrop from drifting apart as either is tuned. The
dayrow is the ladder at its widest, so tones taken from it span the most ground.A tone is fixed, not a function of the panel’s hour. A caption’s value is a property of the caption; letting it drift with
timewould make the contrast table a function of the panel and the legibility floor unenforceable.inkproduces what letterers call reversed type: the lettering inverts to paper, because black type on a near-black box is not lettering, it is a filled rectangle. Which mark reads is resolved by the solver – seeCoreCaption.ink– exactly as falling rain’s is.warmis the classic yellowlocalecaption, under the colour policy: its value is the grey above, and in a palette with colour it is drawn in that grey’s twin, a pale yellow of the same lightness. Inmonoit is the grey, which is what a black-and-white reprint does to a yellow caption. The other three are neutral in every palette.There is no free-form colour here. A
fill:taking any string would be the language’s one open vocabulary, and would let an author produce an unreadable box.Example
>>> from scenet import CaptionEvent, CaptionTone >>> CaptionEvent(text="Later.", tone="ink").tone is CaptionTone.INK True
See also
CaptionEvent, whosetonetakes one.Palette, which decides whatwarmis printed in.- PAPER = 'paper'#
- PALE = 'pale'#
- INK = 'ink'#
- WARM = 'warm'#
Direction#
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.Direction[source]#
Bases:
StrEnumWhich way a comic is read: its progression, not the direction of its text.
ltrreads from the top left, as Western comics do;rtlfrom the top right, as manga do – the panels on a page and in a strip, the pages side by side, and the balloons and captions in a panel. The words in a balloon are not touched: a manga translated into English still reads right to left while each line reads left to right.It is the whole document’s, written once, as EPUB’s
page-progression-directionis per book, whose words these are. Only what reading decides follows it. The scene is never mirrored: figures, gaze, staging, tails and sound effects stay as staged, and every word that names a place on the panel –at:,left_of,facing:,prefer:, a side foroff_panel, an inset’s corner – means the same place either way.Example
>>> from scenet import Direction, compile_source >>> core = compile_source("direction: rtl\ncast: {a: {reference: alice}}").core >>> core.direction is Direction.RTL True
See also
render_stripandrender_pages, which lay panels out in it.- LTR = 'ltr'#
- RTL = 'rtl'#
Facing#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.Facing[source]#
Bases:
StrEnumWhich way an actor is turned.
Mirroring the whole puppet, gaze vector included. Defaults to
right, so a cast written left to right ends up looking into the panel rather than out of it.Example
>>> from scenet import Facing, compile_source >>> core = compile_source("cast: {a: {reference: alice, facing: left}}").core >>> Facing("left") is Facing.LEFT, core.actors[0].transform.mirrored (True, True)
See also
CastMember, whosefacingtakes one.- LEFT = 'left'#
- RIGHT = 'right'#
Mark#
Import |
|
Defined in |
|
Install |
|
Since |
0.8 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.Mark[source]#
Bases:
StrEnumSomething drawn around a character, rather than on them, to say how they are.
The vocabulary is Mort Walker’s, from The Lexicon of Comicana (1980), which grew out of his 1964 National Cartoonists Society piece “Let’s Get Down to Grawlixes”. The book is tongue-in-cheek, but the terms entered real use, and they are comics’ own names for comics’ own conventions. So the set is closed and citable, and nothing in it is invented here.
Mark
What it is
What it says
plewdsDroplets flying off the head
sweating: effort, heat, nerves
squeansLittle starbursts and circles over the head
dizzy, drunk, or sick
grawlixesSymbols over the head standing in for words
swearing
briffitsA dust cloud left at the feet
gone, fast
“Emanata” is Walker’s general term for these, which is why it names the module that draws them and the Core field that holds them.
A mark is not an expression. A character can be angry and sweating, so marks are a list that composes with
expression:rather than a second one. Grawlixes are drawn as symbols – a jarn (spiral), a nittle (bursting star), a bolt and a hash – rather than typed: an oath written as@#$%!already works, as dialogue.All four are drawn outside the head circle, in the space balloons are placed in. They never move a character. A balloon prefers not to cover them, and covers them anyway rather than fail when a panel is too crowded to oblige.
Example
>>> from scenet import Mark, compile_source >>> core = compile_source("cast: {a: {reference: alice, marks: [plewds]}}").core >>> core.actors[0].marks == (Mark.PLEWDS,) True
See also
CastMember, whosemarkslists them.- PLEWDS = 'plewds'#
- SQUEANS = 'squeans'#
- GRAWLIXES = 'grawlixes'#
- BRIFFITS = 'briffits'#
Palette#
Import |
|
Defined in |
|
Install |
|
Since |
0.13 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.Palette[source]#
Bases:
StrEnumWhat a panel is drawn in: the value ladder in grey, or its twin in colour.
Palette
What it draws
monoEvery value as the grey it is – the default, and what every panel was
tintedEvery value on the ladder in its twin colour: same rung, same hour
Colour is a twin of value, never a replacement. A tinted colour has the OKLab lightness of the grey it stands for, so in monochrome a tinted panel is the mono one, and every decision the compiler makes from a value – which rung a mass takes, whether rain is inked or papered, how a caption is lettered – is made on the grey. Panel Core keeps the grey where it always did and adds the colour beside it.
Only the ladder is tinted: the masses of a setting, the veil and the falling rain. Snow, the paper, the figures and all lettering stay as they are in every palette.
A closed set of names, not a colour field, for the reason
CaptionToneis one: an open colour would be the language’s one open vocabulary, and would let a value break the ladder. Seecolour_for.Example
>>> from scenet import Palette, compile_source >>> core = compile_source("palette: tinted\ncast: {a: {reference: alice}}").core >>> core.palette is Palette.TINTED, core.as_mono().palette is Palette.MONO (True, True)
See also
PanelCore.as_mono, the same panel in greys.CaptionTone, whosewarma palette colours.- MONO = 'mono'#
- TINTED = 'tinted'#
PlacementZone#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.PlacementZone[source]#
Bases:
StrEnumWhere in the panel a balloon would prefer to sit.
Two-dimensional, unlike
AnchorX: an actor is placed along the ground line and so only needs a horizontal anchor, whereas a balloon floats and needs both axes. These are hints of the weakest priority – occlusion and reading order override them freely.Example
>>> from scenet import PlacementZone, compile_source >>> core = compile_source( ... "cast: {a: {reference: alice}}\n" ... "script: [{say: {by: a, text: Up here., prefer: top_right}}]" ... ).core >>> PlacementZone("top_right").value 'top_right' >>> core.balloons[0].box.x > core.width / 2 True
See also
SayEvent, whoseprefertakes one: a preference, which a hard rule such as reading order may overrule.- TOP_LEFT = 'top_left'#
- TOP_CENTRE = 'top_center'#
- TOP_RIGHT = 'top_right'#
- MIDDLE_LEFT = 'middle_left'#
- MIDDLE_CENTRE = 'middle_center'#
- MIDDLE_RIGHT = 'middle_right'#
- BOTTOM_LEFT = 'bottom_left'#
- BOTTOM_CENTRE = 'bottom_center'#
- BOTTOM_RIGHT = 'bottom_right'#
Predicate#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.Predicate[source]#
Bases:
StrEnumHow one actor stands in relation to another.
Drawn from the spatial subset of the Visual Genome vocabulary rather than invented, so a scene stays convertible to and from the scene-graph representations used elsewhere in computer vision.
left_ofandright_ofare the load-bearing ones: they are resolved at parse time into a linear ordering, because Cassowary cannot express the disjunction “A left of B or B left of A”.Example
>>> from scenet import Predicate, compile_source >>> core = compile_source( ... "cast: {a: {reference: alice}, b: {reference: bob}}\nstaging: [b left_of a]" ... ).core >>> Predicate("left_of") is Predicate.LEFT_OF True >>> core.actor("b").bounds.centre.x < core.actor("a").bounds.centre.x True
See also
Relation, one predicate between two actors.- LEFT_OF = 'left_of'#
- RIGHT_OF = 'right_of'#
- IN_FRONT_OF = 'in_front_of'#
- BEHIND = 'behind'#
- LOOKING_AT = 'looking_at'#
- GROUND_SHARED_WITH = 'ground_shared_with'#
SfxSize#
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.SfxSize[source]#
Bases:
StrEnumHow big a sound effect is lettered, as a multiple of the dialogue type size.
Size
Times the dialogue size
small1.6
medium2.6
large4
A multiple of the type size rather than of the figure, so an effect reads at
long_shotas well as atclose_up: a sound does not get quieter because the camera stepped back. Three steps, not a number, for the reason every other size in the language is named – the author says how loud, the compiler says how big.Example
>>> from scenet import SfxEvent, SfxSize >>> SfxEvent(text="BAM", size="large").size is SfxSize.LARGE True
See also
SfxEvent, whosesizetakes one.- SMALL = 'small'#
- MEDIUM = 'medium'#
- LARGE = 'large'#
ShotType#
Import |
|
Defined in |
|
Install |
|
Since |
0.1 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.ir.ShotType[source]#
Bases:
StrEnumHow tightly the camera frames the cast.
Ordered from widest to tightest, and the order is enforced by a test: reading down the ladder, the figure never gets smaller.
A shot type is defined by two things in two different units. The crop landmark is anatomical – the waist, the chest, the shoulders – which is what stops a shot type baking in one body and one pose; naming a fraction of panel height instead would do exactly that. The headroom is a plain fraction of panel height, because it is about composition within the frame rather than anatomy.
docs/reference/shot_types.mdis normative.The requested shot is an upper bound on tightness, not a promise. If the cast cannot fit across the panel at that framing the camera retreats, and says so in
CompileResult.notes.Example
>>> from scenet import ShotType >>> ShotType("close_up") <ShotType.CLOSE_UP: 'close_up'>
See also
CameraSpec, whoseshottakes one.Landmark, the crop lines a shot names.- LONG_SHOT = 'long_shot'#
- WIDE = 'wide'#
- FULL_SHOT = 'full_shot'#
- MEDIUM_FULL = 'medium_full'#
- COWBOY = 'cowboy'#
- MEDIUM_SHOT = 'medium_shot'#
- MEDIUM_CLOSE_UP = 'medium_close_up'#
- CLOSE_UP = 'close_up'#
- BIG_CLOSE_UP = 'big_close_up'#
- EXTREME_CLOSE_UP = 'extreme_close_up'#
Side#
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.Side[source]#
Bases:
StrEnumA side of the panel’s frame: where an off-panel speaker is, or where it bleeds.
An off-panel balloon’s tail ends on the frame on this side – Blambot, Off-Panel Dialogue: “the tail of the balloon generally butts against the panel border”. A panel on a page bleeds past the trim on the sides its placement lists.
Example
>>> from scenet import Side, compile_source >>> core = compile_source( ... "cast: {a: {reference: alice}}\n" ... "script: [{say: {by: z, text: Over here!, off_panel: right}}]" ... ).core >>> core.balloons[0].off_panel is Side.RIGHT True
See also
SayEvent, whoseoff_paneltakes one.PanelPlacement, whosebleedlists them.- LEFT = 'left'#
- RIGHT = 'right'#
- TOP = 'top'#
- BOTTOM = 'bottom'#