editorial
convert_to_padded_path(path, padding)
Return correct padding in sequence string
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | path url or simple file name | required |
padding | int | number of padding | required |
Returns:
| Name | Type | Description |
|---|---|---|
type | string with reformatted path |
Example
convert_to_padded_path("plate.%d.exr") > plate.%04d.exr
Source code in client/ayon_core/pipeline/editorial.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
frames_to_seconds(frames, framerate)
Returning seconds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frames | int | frame | required |
framerate | float | frame rate | required |
Returns:
| Name | Type | Description |
|---|---|---|
float | second value |
Source code in client/ayon_core/pipeline/editorial.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
is_clip_from_media_sequence(otio_clip)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
otio_clip | Clip | The OTIO clip to check. | required |
Returns:
| Type | Description |
|---|---|
| bool. Is the provided clip from an input media sequence ? |
Source code in client/ayon_core/pipeline/editorial.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | |
make_sequence_collection(path, otio_range, metadata)
Make collection from path otio range and otio metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | path to image sequence with | required |
otio_range | TimeRange | range to be used | required |
metadata | dict | data where padding value can be found | required |
Returns:
| Name | Type | Description |
|---|---|---|
list | dir_path (str): path to sequence, collection object |
Source code in client/ayon_core/pipeline/editorial.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
range_from_frames(start, duration, fps)
Returns otio time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start | int | frame start | required |
duration | int | frame duration | required |
fps | float | frame range | required |
Returns:
| Type | Description |
|---|---|
| otio._ot._ot.TimeRange: created range |
Source code in client/ayon_core/pipeline/editorial.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
remap_range_on_file_sequence(otio_clip, otio_range)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
otio_clip | Clip | The OTIO clip to check. | required |
otio_range | TimeRange | The trim range to apply. | required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple | (int, int) | The remapped range as discrete frame number. |
Source code in client/ayon_core/pipeline/editorial.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |
trim_media_range(media_range, source_range)
Trim input media range with clip source range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
media_range | TimeRange | available range of media | required |
source_range | TimeRange | clip required range | required |
Returns:
| Type | Description |
|---|---|
| otio._ot._ot.TimeRange: trimmed media range |
Source code in client/ayon_core/pipeline/editorial.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |