an.stage.prop_validate#
Check a prop’s asset folder offline, and say what a prop must be (an#340).
an props validate <dir> and an props contract: the prop’s twin of
an character validate / an character contract, in the core because a
prop is the stage’s own rig (an.stage.props.PropDescriptor), not a genre’s.
Before it, a carved prop’s layout rules lived in its prop.json metadata and
nothing read them.
The rig rules are the stage’s (an.stage.rig), so this validator, an
validate and the rig builder say the same thing: a structural problem
(rig_problems()) blocks; where the stage cannot draw a
nested chain (chain_draw_order_problems()), the origin and
the rest pose are advisories here, because they are the stage’s limits or a
likely slip, not a malformed rig.
>>> import tempfile
>>> with tempfile.TemporaryDirectory() as d:
... report = validate_prop(d, name="nothing")
>>> report.passed, report.findings[0].description
(False, "nothing has no prop.json, or it is not a PropDescriptor (kind 'PropDescriptor')")
Module Attributes
The descriptor file a prop folder holds (the props store's sidecar name). |
|
Finding severities, the ones |
Functions
What a prop folder must hold, read off the schema and the rig rules (never retyped). |
|
|
Check a prop folder ( |
- an.stage.prop_validate.BLOCKING: str = 'error'#
Finding severities, the ones
an character validateuses.
- an.stage.prop_validate.PROP_META_NAME: str = 'prop.json'#
The descriptor file a prop folder holds (the props store’s sidecar name).
- an.stage.prop_validate.render_prop_contract()[source]#
What a prop folder must hold, read off the schema and the rig rules (never retyped).
- Return type:
>>> "nesting" in render_prop_contract() True
- an.stage.prop_validate.validate_prop(prop_dir, *, name=None)[source]#
Check a prop folder (
prop.json+parts/) against the rig contract, offline.Blocking: no or an unreadable descriptor, a structural rig problem (an unknown bone, a bone cycle), an attachment whose art is not in the folder, a prop that draws nothing. Advisory: a chain the stage cannot draw in its declared order (the compiler refuses it), the origin, the rest pose, an unpopulated
AssetSource.- Return type: