-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync traits declared in #909
- Loading branch information
Showing
9 changed files
with
355 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""Color management related traits.""" | ||
from __future__ import annotations | ||
|
||
from typing import ClassVar, Optional | ||
|
||
from pydantic import Field | ||
|
||
from .trait import TraitBase | ||
|
||
|
||
class ColorManaged(TraitBase): | ||
"""Color managed trait. | ||
Holds color management information. Can be used with Image related | ||
traits to define color space and config. | ||
Sync with OpenAssetIO MediaCreation Traits. | ||
Attributes: | ||
color_space (str): An OCIO colorspace name available | ||
in the "current" OCIO context. | ||
config (str): An OCIO config name defining color space. | ||
""" | ||
id: ClassVar[str] = "ayon.color.ColorManaged.v1" | ||
name: ClassVar[str] = "ColorManaged" | ||
description: ClassVar[str] = "Color Managed trait." | ||
color_space: str = Field( | ||
..., | ||
description="Color space." | ||
) | ||
config: Optional[str] = Field(None, description="Color config.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
"""Cryptography traits.""" | ||
from __future__ import annotations | ||
|
||
from typing import ClassVar, Optional | ||
|
||
from pydantic import Field | ||
|
||
from .trait import TraitBase | ||
|
||
|
||
class DigitallySigned(TraitBase): | ||
"""Digitally signed trait. | ||
This type trait means that the data is digitally signed. | ||
Attributes: | ||
signature (str): Digital signature. | ||
""" | ||
id: ClassVar[str] = "ayon.cryptography.DigitallySigned.v1" | ||
name: ClassVar[str] = "DigitallySigned" | ||
description: ClassVar[str] = "Digitally signed trait." | ||
|
||
|
||
class GPGSigned(DigitallySigned): | ||
"""GPG signed trait. | ||
This trait holds GPG signed data. | ||
Attributes: | ||
signature (str): GPG signature. | ||
""" | ||
id: ClassVar[str] = "ayon.cryptography.GPGSigned.v1" | ||
name: ClassVar[str] = "GPGSigned" | ||
description: ClassVar[str] = "GPG signed trait." | ||
signed_data: str = Field( | ||
..., | ||
description="Signed data." | ||
) | ||
clear_text: Optional[str] = Field( | ||
None, | ||
description="Clear text." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.