mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
♻️ make fields optional
This commit is contained in:
parent
4da77e7455
commit
5e5a27c7a9
1 changed files with 18 additions and 5 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
"""Metadata traits."""
|
"""Metadata traits."""
|
||||||
from typing import ClassVar, List
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import ClassVar, List, Optional
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
|
|
||||||
|
|
@ -102,15 +104,26 @@ class KeepOriginalName(TraitBase):
|
||||||
|
|
||||||
|
|
||||||
class SourceApplication(TraitBase):
|
class SourceApplication(TraitBase):
|
||||||
"""Metadata about the source (producing) application."""
|
"""Metadata about the source (producing) application.
|
||||||
|
|
||||||
|
This can be useful in cases, where this information is
|
||||||
|
needed but it cannot be determined from other means - like
|
||||||
|
.txt files used for various motion tracking applications that
|
||||||
|
must be interpreted by the loader.
|
||||||
|
|
||||||
|
Note that this is not really connected to any logic in
|
||||||
|
ayon-applications addon.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
name: ClassVar[str] = "SourceApplication"
|
name: ClassVar[str] = "SourceApplication"
|
||||||
description: ClassVar[str] = "Source Application Trait Model"
|
description: ClassVar[str] = "Source Application Trait Model"
|
||||||
id: ClassVar[str] = "ayon.meta.SourceApplication.v1"
|
id: ClassVar[str] = "ayon.meta.SourceApplication.v1"
|
||||||
application: str = Field(..., title="Application Name")
|
application: str = Field(..., title="Application Name")
|
||||||
variant: str = Field(..., title="Application Variant (e.g. Pro)")
|
variant: Optional[str] = Field(None, title="Application Variant (e.g. Pro)")
|
||||||
version: str = Field(..., title="Application Version")
|
version: Optional[str] = Field(None, title="Application Version")
|
||||||
platform: str = Field(..., title="Platform Name")
|
platform: Optional[str] = Field(None, title="Platform Name (e.g. Windows)")
|
||||||
|
host_name: Optional[str] = Field(None, title="AYON host Name if applicable")
|
||||||
|
|
||||||
|
|
||||||
class IntendedUse(TraitBase):
|
class IntendedUse(TraitBase):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue