Entities¶
The pipeline revolves around three entity types: Shot, Asset, and Edit. All share the base Entity class.
Entity types¶
| Type | Description |
|---|---|
Shot |
A single camera shot within a sequence |
Asset |
A reusable asset (character, prop, environment) |
Edit |
An editorial cut or assembly |
What Entity provides¶
- Workfile management — versioned DCC project files stored under
work/{task}/ - Product management — versioned published outputs under
publish/{type}/v{version}/ - Metadata persistence — each entity directory contains a
kpipe-metadata.tomlthat tracks workfile and product history
Version constants¶
entity.py defines three sentinel values used wherever a version number is expected:
| Constant | Value | Meaning |
|---|---|---|
VERSION_MAIN |
0 |
The un-versioned "main" slot (path uses vmain instead of v001) |
VERSION_LATEST |
-1 |
Resolve to the highest existing version |
VERSION_NEW |
-2 |
Resolve to the highest existing version + 1 (create a new version) |
Entity exposes two resolution helpers that convert these sentinels to a concrete integer:
resolve_product_version(product_type, layer_name, version)— for published productsresolve_workfile_version(task, filter, version)— for workfiles
Pass a concrete version number to either helper and it is returned unchanged, making the helpers safe to call unconditionally.
MediaPipelineData.version defaults to VERSION_NEW so that a publish action automatically creates the next version unless the collect step sets an explicit number.
File naming convention¶
| Type | Pattern |
|---|---|
| Workfile | {project}-{sequence}_{shot}-{task}-v{version}.{ext} |
| Product | {project}-{sequence}_{shot}-{product_type}-v{version}.{ext} |
Templates are defined in the [anatomy] config section and resolved by path.py. Optional path segments use the </{segment}> syntax — if the segment is empty, the whole bracketed portion is dropped from the resolved path.