add SourceApplication trait

This commit is contained in:
Ondřej Samohel 2025-01-22 11:00:06 +01:00
parent 6ffe6af5b8
commit e44901e53e
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
2 changed files with 17 additions and 4 deletions

View file

@ -165,6 +165,7 @@ to different packages based on their use:
| | Variant | Used to differentiate between data variants of the same output (mp4 as h.264 and h.265 for example)
| | KeepOriginalLocation | Marks the representation to keep the original location of the file
| | KeepOriginalName | Marks the representation to keep the original name of the file
| | SourceApplication | Holds information about producing application, about it's version, variant and platform.
| three dimensional | Spatial | Spatial information like up-axis, units and handedness.
| | Geometry | Type trait to mark the representation as a geometry.
| | Shader | Type trait to mark the representation as a Shader.

View file

@ -78,7 +78,7 @@ class Variant(TraitBase):
class KeepOriginalLocation(TraitBase):
"""Keep files in its original location.
Note:
This is not a persistent trait.
@ -86,11 +86,11 @@ class KeepOriginalLocation(TraitBase):
name: ClassVar[str] = "KeepOriginalLocation"
description: ClassVar[str] = "Keep Original Location Trait Model"
id: ClassVar[str] = "ayon.meta.KeepOriginalLocation.v1"
persistent: bool = Field(False, title="Persistent")
persistent: bool = Field(default=False, title="Persistent")
class KeepOriginalName(TraitBase):
"""Keep files in its original name.
Note:
This is not a persistent trait.
@ -98,4 +98,16 @@ class KeepOriginalName(TraitBase):
name: ClassVar[str] = "KeepOriginalName"
description: ClassVar[str] = "Keep Original Name Trait Model"
id: ClassVar[str] = "ayon.meta.KeepOriginalName.v1"
persistent: bool = Field(False, title="Persistent")
persistent: bool = Field(default=False, title="Persistent")
class SourceApplication(TraitBase):
"""Metadata about the source (producing) application."""
name: ClassVar[str] = "SourceApplication"
description: ClassVar[str] = "Source Application Trait Model"
id: ClassVar[str] = "ayon.meta.SourceApplication.v1"
application: str = Field(..., title="Application Name")
variant: str = Field(..., title="Application Variant (e.g. Pro)")
version: str = Field(..., title="Application Version")
platform: str = Field(..., title="Platform Name")