mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 14:22:37 +01:00
🎨 add Variant trait
This commit is contained in:
parent
828c522b10
commit
e83541abdc
2 changed files with 24 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ from .content import (
|
|||
)
|
||||
from .cryptography import DigitallySigned, GPGSigned
|
||||
from .lifecycle import Persistent, Transient
|
||||
from .meta import Tagged, TemplatePath
|
||||
from .meta import Tagged, TemplatePath, Variant
|
||||
from .representation import Representation
|
||||
from .three_dimensional import Geometry, IESProfile, Lighting, Shader, Spatial
|
||||
from .time import (
|
||||
|
|
@ -71,6 +71,7 @@ __all__ = [
|
|||
# meta
|
||||
"Tagged",
|
||||
"TemplatePath",
|
||||
"Variant",
|
||||
|
||||
# two-dimensional
|
||||
"Compressed",
|
||||
|
|
|
|||
|
|
@ -51,3 +51,25 @@ class TemplatePath(TraitBase):
|
|||
id: ClassVar[str] = "ayon.meta.TemplatePath.v1"
|
||||
template: str = Field(..., title="Template Path")
|
||||
data: dict = Field(..., title="Formatting Data")
|
||||
|
||||
class Variant(TraitBase):
|
||||
"""Variant trait model.
|
||||
|
||||
This model represents a variant of the representation.
|
||||
|
||||
Example::
|
||||
|
||||
Variant(variant="high")
|
||||
Variant(variant="prores444)
|
||||
|
||||
Attributes:
|
||||
name (str): Trait name.
|
||||
description (str): Trait description.
|
||||
id (str): id should be namespaced trait name with version
|
||||
variant (str): Variant name.
|
||||
"""
|
||||
|
||||
name: ClassVar[str] = "Variant"
|
||||
description: ClassVar[str] = "Variant Trait Model"
|
||||
id: ClassVar[str] = "ayon.meta.Variant.v1"
|
||||
variant: str = Field(..., title="Variant")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue