cutan.expression.presets¶
Expression presets: our art direction on the axes (an#98).
Every name the compiler’s retired brow-tilt table accepted is a preset here
(amused included — live content authors it), plus the two the research
added (afraid, disgusted). The FACS action-unit numbers in each anchor are cross-reference
comments, not sources: no emotion table was transcribed (research
misc/docs/wave6_research.md §3, §8). Gaze is absent from every preset so
the two sources stay independent — “thinking looks up and away” is a gaze
action, not a preset value.
A preset’s mouth_form names the viseme@<form> set its mouth prefers;
a character that declares none falls back to viseme with a warning
(cutan.expression.binding.resolve_mouth_set()).
>>> preset_axes("happy")["brow_height_l"]
0.2
>>> preset_axes("happy", intensity=0.5)["brow_height_l"]
0.1
>>> preset_axes("happy", axes={"brow_height_l": -1.0})["brow_height_l"]
-1.0
>>> preset_axes(None) == {}
True
>>> PRESETS["skeptical"].mouth_form is None
True
Functions
The preset names, in declaration order. |
|
|
The |
|
The numeric axis offsets an expression asks for: the preset's, with |
Classes
|
A named expression: axis offsets, the mouth form it prefers, its anchor. |
- class cutan.expression.presets.Preset(name, axes=dict(), mouth_form=None, anchor='')[source]¶
Bases:
objectA named expression: axis offsets, the mouth form it prefers, its anchor.
- cutan.expression.presets.known_presets()[source]¶
The preset names, in declaration order.
>>> known_presets()[:3] ('neutral', 'happy', 'sad')
- cutan.expression.presets.mouth_form_of(preset)[source]¶
The
viseme@<form>a preset prefers, orNonefor the neutral set.>>> mouth_form_of("amused"), mouth_form_of("thinking"), mouth_form_of(None) ('happy', None, None)
- cutan.expression.presets.preset_axes(preset, *, axes=None, intensity=1.0)[source]¶
The numeric axis offsets an expression asks for: the preset’s, with
axeslayered over them, scaled byintensityand clamped. Only non-zero offsets are returned, so a neutral expression is{}.An unknown preset or axis is a
ValueError— validate reports it as an error, the compiler refuses it.