Sample post production specifications
What
Define a sample set of representative specifications in the OpenAssetIO-MediaCreation repository to allow us to illustrate typical interactions between a DCC and AMS within the post-production workspace.
Why
The recent work group highlighted that the topics raise are a little abstract without any concrete examples. By producing a set of sample specifications, we can then illustrate typical workflows with real working code.
Acceptance Criteria
- A Python module
openassetio_mediacreationthat provides example specifications under thespecifications.<prefix>module namespace -
EntitySpecificationsfor- Images, CG Renders, 3D scene caches
- Editorial containers and shots
- Document types for Nuke, Katana, Maya, Houdini, Blender
- One of the following schema bases should be used:
-
entity:blob -
entity:container
-
- The specification hierarchy should not be partitioned by data format/encoding. ie.
pngandjpgimages should not be addressed by their own specifications, instead amimeTypeproperty on theblobspec would allow format filtering. - Specifications should make token suggestions as to potential properties defined for each schema.
This Issues is created to form a basis of discussion around the validation of hierarchy .vs. composition raised during #226.
We sketched out a traits-based redesign:
from openassetio import Specification, specifications
"""
EntitySpecification uses:
* Publishing - schema identifiers should be persisted in the AMS.
* Some relationship queries
* managementPolicy
* Asset browser UIs - in particular, previously persisted schema identifiers.
"""
class BlobTrait(specifications.EntityTrait):
_type = "blob"
mimeType = Specification.TypedProperty(str, doc="")
class ContainerTrait(specifications.EntityTrait):
_type = "container"
class ImageTrait(specifications.EntityTrait):
_type = "image"
channelNames = Specification.TypedProperty(list, doc="")
colorSpace = Specification.TypedProperty(str, doc="")
class RasterTrait(specifications.EntityTrait):
_type = "raster"
aspectRatio = Specification.TypedProperty(list, doc="")
resolution = Specification.TypedProperty(list, doc="") # E.g. [“1920x1080”, “420x420”]
class GeometryTrait(specifications.EntityTrait):
_type = "geometry"
# startFrame==endFrame means "not animated"
startFrame = Specification.TypedProperty(float, doc="")
endFrame = Specification.TypedProperty(float, doc="")
class EditorialTrait(specifications.EntityTrait):
_type = "editorial"
startFrame = Specification.TypedProperty(int, doc="")
endFrame = Specification.TypedProperty(int, doc="")
class ShotTrait(specifications.EntityTrait):
_type = "shot"
class DocumentTrait(specifications.EntityTrait):
_type = "document"
class NukeScriptTrait(specifications.EntityTrait):
_type = "nukescript"
usesNukeXNodes = Specification.TypedProperty(bool, doc="")
class KatanaProjectTrait(specifications.EntityTrait):
_type = "katanaproject"
class CacheTrait(specifications.EntityTrait):
_type = "cache"
class ImageSpecification(BlobTrait, ImageTrait):
_type = ".".join(sorted((BlobTrait._type, ImageTrait._type)))
class RasterImageSpecification(BlobTrait, ImageTrait, RasterTrait):
"""
Raster image, as opposed to e.g. SVG.
"""
_type = ".".join(sorted((BlobTrait._type, ImageTrait._type, RasterTrait._type)))
class ImageBundleSpecification(ContainerTrait, ImageTrait):
_type = ".".join(sorted((ContainerTrait._type, ImageTrait._type)))
class SceneCacheSpecification(GeometryTrait, CacheTrait):
_type = ".".join(sorted((GeometryTrait._type, CacheTrait._type)))
class EditorialSpecification(ContainerTrait, EditorialTrait):
_type = ".".join(sorted((ContainerTrait._type, EditorialTrait._type)))
class ShotSpecification(ContainerTrait, EditorialTrait, ShotTrait):
_type = ".".join(sorted((ContainerTrait._type, EditorialTrait._type, ShotTrait._type)))
class DocumentSpecification(BlobTrait, DocumentTrait):
_type = ".".join(sorted((BlobTrait._type, DocumentTrait._type)))
# Application version could be encoded in mimeType?
applicationVersion = Specification.TypedProperty(str, doc="")
modificationTime = Specification.TypedProperty(int, doc="")
class NukeScriptSpecification(BlobTrait, DocumentTrait, NukeScriptTrait):
_type = ".".join(sorted((BlobTrait._type, DocumentTrait._type, NukeScriptTrait._type)))
class KatanaProjectSpecification(BlobTrait, DocumentTrait, KatanaProjectTrait):
_type = ".".join(sorted((BlobTrait._type, DocumentTrait._type, KatanaProjectTrait._type)))
Added on hold label until we can refactor the Core API to support traits.