two_dimensional
Two-dimensional image traits.
Deep dataclass
Bases: TraitBase
Deep trait model.
Type trait model for deep EXR images.
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be a namespaced trait name with a version |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
Image dataclass
Bases: TraitBase
Image trait model.
Type trait model for image.
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be a namespaced trait name with version |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
Overscan dataclass
Bases: TraitBase
Overscan trait model.
This model represents an overscan (or underscan) trait. Defines the extra pixels around the image.
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be a namespaced trait name with a version |
left | int | Left overscan/underscan. |
right | int | Right overscan/underscan. |
top | int | Top overscan/underscan. |
bottom | int | Bottom overscan/underscan. |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
PixelBased dataclass
Bases: TraitBase
PixelBased trait model.
The pixel-related trait for image data.
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be a namespaced trait name with a version |
display_window_width | int | Width of the image display window. |
display_window_height | int | Height of the image display window. |
pixel_aspect_ratio | float | Pixel aspect ratio. |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
Planar dataclass
Bases: TraitBase
Planar trait model.
This model represents an Image with planar configuration.
Todo
- (antirotor): Is this really a planar configuration? As with bit planes and everything? If it serves as differentiator for Deep images, should it be named differently? Like Raster?
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be namespaced trait name with version |
planar_configuration | str | Planar configuration. |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
UDIM dataclass
Bases: TraitBase
UDIM trait model.
This model represents a UDIM trait.
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | Trait name. |
description | str | Trait description. |
id | str | id should be namespaced trait name with version |
udim | int | UDIM value. |
udim_regex | str | UDIM regex. |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
get_file_location_for_udim(file_locations, udim)
Get file location for UDIM.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_locations | FileLocations | File locations. | required |
udim | int | UDIM value. | required |
Returns:
| Type | Description |
|---|---|
Optional[FileLocation] | Optional[FileLocation]: File location. |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
get_udim_from_file_location(file_location)
Get UDIM from the file location.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_location | FileLocation | File location. | required |
Returns:
| Type | Description |
|---|---|
Optional[int] | Optional[int]: UDIM value. |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
validate_frame_regex(v) classmethod
Validate udim regex.
Returns:
| Type | Description |
|---|---|
Optional[str] | Optional[str]: UDIM regex. |
Raises:
| Type | Description |
|---|---|
ValueError | UDIM regex must include 'udim' named group. |
Source code in client/ayon_core/pipeline/traits/two_dimensional.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |