mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
🎨 add persistent property to trait
persistent drives if the trait should be integrated or not. Difference between Persistent trait and persistent attribute is that the trait drives the lifecycle of the representation but the attribute drives lifecycle of trait.
This commit is contained in:
parent
97fe8ac294
commit
32d82e47e6
1 changed files with 5 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ from pydantic import (
|
|||
AliasGenerator,
|
||||
BaseModel,
|
||||
ConfigDict,
|
||||
Field,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -32,6 +33,10 @@ class TraitBase(ABC, BaseModel):
|
|||
)
|
||||
)
|
||||
|
||||
persitent: bool = Field(
|
||||
default=True, title="Persitent",
|
||||
description="Whether the trait is persistent (integrated) or not.")
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def id(self) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue