lifecycle
Lifecycle traits.
Persistent dataclass
Bases: TraitBase
Persistent trait model.
Persistent trait is opposite to transient trait. It marks representation as persistent. Such representations are persisted in the system (e.g. in the database).
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be a namespaced trait name with the version |
Source code in client/ayon_core/pipeline/traits/lifecycle.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
validate_trait(representation)
Validate representation is not Transient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
representation | Representation | Representation model. | required |
Raises:
| Type | Description |
|---|---|
TraitValidationError | If representation is marked as both Persistent and Transient. |
Source code in client/ayon_core/pipeline/traits/lifecycle.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
Transient dataclass
Bases: TraitBase
Transient trait model.
Transient trait marks representation as transient. Such representations are not persisted in the system.
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be a namespaced trait name with the version |
Source code in client/ayon_core/pipeline/traits/lifecycle.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
validate_trait(representation)
Validate representation is not Persistent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
representation | Representation | Representation model. | required |
Raises:
| Type | Description |
|---|---|
TraitValidationError | If representation is marked as both Persistent and Transient. |
Source code in client/ayon_core/pipeline/traits/lifecycle.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |