cutan.compile.passes¶
The cut-out passes over the stage compiler, and the helpers only they use.
Moved from an.stage.compile (an#225). The stage compiler keeps the passes every
genre shares (scene, actions, camera, parallax, checks) and the helpers both sides use;
this module holds what only the cut-out genre reaches: the speech, swap_pose,
view_spans, visemes and face passes (registered by cutan.genre.CUTOUT
as "cutan.compile.passes:<name>") and the character rig builder.
Module Attributes
The parts the built-in placeholder rig draws when a character ref has no descriptor and no |
|
The procedural rig's leg colour — a literal the palette table never carried, which is why it is a named constant rather than two copies of a string. |
|
The procedural rig's pupil colour. |
|
Co-articulation on/off (an#97). |
|
The procedural (drawn) mouth's swap vocabulary, DECLARED as data on its visual exactly as the runtime declares it ( |
|
the default rig's eye slots ARE its node names, on both the procedural and the descriptor path. |
|
The pupil nodes of the gaze stack (an#99); a rig without them takes gaze as a no-op. |
|
The summed gaze (x, y), in axis units, is clamped to a circle of this radius — the declared travel maps the unit circle onto the sclera's inner ellipse, and 0.95 keeps the whole pupil disc inside it at every angle (measured on the synthesized eye: 1.0 pokes out by 2% of the ellipse at the diagonal). |
|
Where the policy pass leaves the layered shot/style policy for later passes. |
|
not a |
Functions
|
The entity's blink phase in [0, 1): the runtime's rule, ported exactly. |
|
|
- cutan.compile.passes.COARTICULATION_ENABLED: bool = True¶
Co-articulation on/off (an#97). ON is the product; OFF reproduces the pre-#97 mouth CHOICE — the raw provider track thinned by the old drop-not-hold condenser — over the new frame-ceiled clip window (so not byte-for-byte the old emission: OFF still closes the mouth after a line) and exists so the
lipsync-coarticulationdemo and a test can render the two side by side. Not a RenderContext knob: nobody should ship the old behaviour, and a module flag rebound for one render is the shape the bench’s levers already use.
- cutan.compile.passes.DFLT_LEG_COLOUR: str = '#2c3e50'¶
The procedural rig’s leg colour — a literal the palette table never carried, which is why it is a named constant rather than two copies of a string. A
StylePack’slegrole replaces it.
- cutan.compile.passes.DFLT_PUPIL_COLOUR: str = '#1a1a1a'¶
The procedural rig’s pupil colour.
makeEyereads it from the document — the eye WHITE beside it is a literal and cannot be reached, which is the splitREACHABLE_ROLES/UNREACHABLE_ROLESrecords.
- cutan.compile.passes.EYE_NODE_NAMES: frozenset[str] = frozenset({'left_eye', 'right_eye'})¶
the default rig’s eye slots ARE its node names, on both the procedural and the descriptor path.
- Type:
The nodes that blink, by name
- cutan.compile.passes.GAZE_ELLIPSE_MARGIN: float = 0.95¶
The summed gaze (x, y), in axis units, is clamped to a circle of this radius — the declared travel maps the unit circle onto the sclera’s inner ellipse, and 0.95 keeps the whole pupil disc inside it at every angle (measured on the synthesized eye: 1.0 pokes out by 2% of the ellipse at the diagonal).
- cutan.compile.passes.PLACEHOLDER_PARTS: tuple[str, ...] = ('head', 'torso', 'left_arm', 'right_arm')¶
The parts the built-in placeholder rig draws when a character ref has no descriptor and no
parts: arms, no legs (so a walk on it glides).
- cutan.compile.passes.POLICY_PRODUCT: str = 'cutan.policy'¶
Where the policy pass leaves the layered shot/style policy for later passes.
- cutan.compile.passes.POLICY_SKIP_KIND: str = 'policy_skip'¶
not a
methodsubstitution (nothing asked for it), so a tool can tell them apart.- Type:
The
asset_resolutionkind of a policy entry passed over (cutan#9)
- cutan.compile.passes.PROCEDURAL_MOUTH_KEYS: dict[str, str] = {'A': 'A', 'B': 'B', 'C': 'C', 'D': 'D', 'E': 'E', 'F': 'F', 'G': 'G', 'H': 'H', 'X': 'X'}¶
The procedural (drawn) mouth’s swap vocabulary, DECLARED as data on its visual exactly as the runtime declares it (
g._anDrawSets = {viseme: ...}) and as an SVG mouth carries its projection. A drawn mouth has no textures, so each key maps to itself — the code the runtime’s shape table draws. The compiler never branches on the set’s NAME: the drawn mouth is just a node whose visual carries avisemeset (an#87).
- cutan.compile.passes.PUPIL_NODE_NAMES: frozenset[str] = frozenset({'left_pupil', 'right_pupil'})¶
The pupil nodes of the gaze stack (an#99); a rig without them takes gaze as a no-op.
- cutan.compile.passes.blink_phase(entity_id)[source]¶
The entity’s blink phase in [0, 1): the runtime’s rule, ported exactly.
>>> blink_phase("charlie") 0.762- Return type:
- cutan.compile.passes.preset_context_of(vocab, *, policy=None)[source]¶
(entity_id, play) -> PresetContextfor the extent resolver (cutan.characters.play.play_extent_for()): exactly thegaitandscale_with_view_and_posed_parts()will fill in before the expansion, read off the same vocabulary under the samepolicy, so asequencewaits for what the walk runs (cutan#12).