an.timing.address#
The address grammar: one way to name an animatable value, in every genre.
<entity>[/<node>…]:<field>[@<qualifier>]
entity— what the scene holds (a character, a prop, the camera, a view);/<node>…— a path inside it (charlie/left_arm);rootis the stage’s reserved scene root, which the camera lowers onto;field— a property the entity kind’s property space declares (an.timing.spaces). It may be a dotted path (view:light.color), and a dotted segment names a declared field, never a member inside a composite value: anorbitinterpolates as one value, soview:camera.azimuthis addressable only if the space declarescamera.azimuthitself;@<qualifier>— a variant of the field (mouth:viseme@happy, a variant swap set), which the stage already emits.
The compiled form’s (target, property) pair is exactly
(entity/nodes, field@qualifier), and the golden vectors key every state by
the address string.
>>> a = parse_address("charlie/head/mouth:viseme@happy")
>>> a.entity, a.nodes, a.field, a.qualifier
('charlie', ('head', 'mouth'), 'viseme', 'happy')
>>> a.target, a.property
('charlie/head/mouth', 'viseme@happy')
>>> str(parse_address("view:light.color")), parse_address("view:light.color").field_path
('view:light.color', ('light', 'color'))
>>> str(Address.of("root", "pivot_x"))
'root:pivot_x'
>>> parse_address("charlie:")
Traceback (most recent call last):
...
an.timing.address.AddressError: 'charlie:': the field is empty
Module Attributes
Separators of the grammar; none of them may appear inside a name. |
Functions
|
The address string of a compiled |
|
|
Classes
|
A parsed address. |
Exceptions
A string is not an address under the grammar. |
- class an.timing.address.Address(entity, nodes=(), field='', qualifier=None)[source]#
Bases:
objectA parsed address.
str(address)writes it back unchanged.
- exception an.timing.address.AddressError[source]#
Bases:
ValueErrorA string is not an address under the grammar.
- an.timing.address.ENTITY_FIELD_SEP: str = ':'#
Separators of the grammar; none of them may appear inside a name.
- an.timing.address.format_address(target, prop)[source]#
The address string of a compiled
(target, property)pair, unvalidated (the fast path for keying states;Address.of()validates).- Return type:
- an.timing.address.parse_address(text)[source]#
textas anAddress; raisesAddressErrornaming the fault.- Return type:
>>> parse_address("charlie/left_arm:rotation").target 'charlie/left_arm' >>> parse_address("a::b") Traceback (most recent call last): ... an.timing.address.AddressError: 'a::b': an address has exactly one ':', found 2