pipeline
Pipeline tools for AYON Speedtree integration.
SpeedtreeHost
Bases: HostBase
, IWorkfileHost
, ILoadHost
, IPublishHost
Source code in client/ayon_speedtree/api/pipeline.py
34 35 36 37 38 39 40 41 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 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 124 125 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 |
|
application_exit()
Event action when the application exit
Source code in client/ayon_speedtree/api/pipeline.py
142 143 144 145 146 |
|
get_containers()
Get the data of the containers
Returns:
Name | Type | Description |
---|---|---|
list | the list which stores the data of the containers |
Source code in client/ayon_speedtree/api/pipeline.py
124 125 126 127 128 129 130 |
|
get_current_folder_path()
Returns:
Type | Description |
---|---|
Union[str, None]: Current folder path. |
Source code in client/ayon_speedtree/api/pipeline.py
67 68 69 70 71 72 73 |
|
get_current_project_name()
Returns:
Type | Description |
---|---|
Union[str, None]: Current project name. |
Source code in client/ayon_speedtree/api/pipeline.py
59 60 61 62 63 64 65 |
|
get_current_task_name()
Returns:
Type | Description |
---|---|
Union[str, None]: Current task name. |
Source code in client/ayon_speedtree/api/pipeline.py
75 76 77 78 79 80 81 |
|
initial_app_launch()
Triggers on launch of the communication server for Speedtree.
Usually this aligns roughly with the start of Speedtree.
Source code in client/ayon_speedtree/api/pipeline.py
132 133 134 135 136 137 138 139 140 |
|
list_instances()
Get all AYON instances.
Source code in client/ayon_speedtree/api/pipeline.py
115 116 117 118 |
|
show_tools_dialog()
staticmethod
Show tools dialog with actions leading to show other tools.
Source code in client/ayon_speedtree/api/pipeline.py
37 38 39 40 |
|
write_instances(data)
Write all AYON instances
Source code in client/ayon_speedtree/api/pipeline.py
120 121 122 |
|
copy_ayon_data(filepath)
Copy any ayon-related data( such as instances, create-context, cotnainers) from the previous workfile to the new one when incrementing and saving workfile.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath | str | the workfile path to be saved | required |
Source code in client/ayon_speedtree/api/pipeline.py
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
|
get_containers()
Function to get the container data
Returns:
Name | Type | Description |
---|---|---|
list | list of container data |
Source code in client/ayon_speedtree/api/pipeline.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
|
get_current_workfile_context()
Function to get the current context data from the related json file in .sptree_metadata/context folder
The current context data includes thing like project name, folder path and task name.
Returns:
Name | Type | Description |
---|---|---|
list | list of context data |
Source code in client/ayon_speedtree/api/pipeline.py
250 251 252 253 254 255 256 257 258 259 260 |
|
get_instance_workfile_metadata()
Get instance data from the related metadata json("instances.json") which stores in .sptree_metadata/{workfile}/instances folder in the project work directory.
Instance data includes the info like the workfile instance and any instances created by the users for publishing.
Returns:
Name | Type | Description |
---|---|---|
dict | instance data |
Source code in client/ayon_speedtree/api/pipeline.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
|
get_load_context_metadata()
Get the context data from the related json file ("context.json") which stores in .sptree_metadata/context folder in the project work directory.
The context data includes the project name, folder path and task name.
Returns:
Name | Type | Description |
---|---|---|
list | context data |
Source code in client/ayon_speedtree/api/pipeline.py
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
|
get_load_workfile_metadata(metadata_key)
Get to load the workfile json metadata(such as creator's context data and container data) which stores in .sptree_metadata/{workfile}/{metadata_key} folder in the project work directory. It mainly supports to the metadata_key below: SPTREE_METADATA_CREATE_CONTEXT: loading create_context.json where stores the data with publish_attributes(e.g. whether the optional validator is enabled.) SPTREE_SECTION_NAME_CONTAINERS: loading {subset_name}.json where includes all the loaded asset data to the zbrush scene.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata_key | str | name of the metadata key | required |
Returns:
Name | Type | Description |
---|---|---|
list | list of metadata(create-context data or container data) |
Source code in client/ayon_speedtree/api/pipeline.py
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
|
imprint(container, representation_id)
Function to update the container data from the related json file in .sptree_metadata/{workfile}/container when updating or switching asset(s)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
container | str | container | required |
representation_id | str | representation id | required |
Source code in client/ayon_speedtree/api/pipeline.py
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
|
remove_container_data(name)
Function to remove the specific container data from {subset_name}.json in .sptree_metadata/{workfile}/containers folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name | str | object name stored in the container | required |
Source code in client/ayon_speedtree/api/pipeline.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
|
remove_tmp_data()
Remove all temporary data which is created by AYON without saving changes when launching Speedtree without enabling skip opening last workfile
Source code in client/ayon_speedtree/api/pipeline.py
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
|
save_current_workfile_context(context)
Save current workfile context data to .sptree_metadata/{workfile}/key
This persists the current in-memory context to be set for a specific workfile on disk. Usually used on save to persist the local sessions' workfile context on save.
The context data includes things like the project name, folder path, etc.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
context | dict | context data | required |
Source code in client/ayon_speedtree/api/pipeline.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
show_tools_dialog()
Show dialog with tools.
Dialog will stay visible.
Source code in client/ayon_speedtree/api/pipeline.py
542 543 544 545 546 547 548 549 |
|
write_context_metadata(metadata_key, context)
Write context data into the related json which stores in .sptree_metadata/key folder in the project work directory.
The context data includes the project name, folder path and task name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata_key | str | metadata key | required |
context | dict | context data | required |
Source code in client/ayon_speedtree/api/pipeline.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|
write_load_metadata(data)
Write/Edit the container data into the related json file ("{subset_name}.json") which stores in .sptree_metadata/{workfile}/containers folder. This persists the current in-memory containers data to be set for updating and switching assets in scene inventory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata_key | str | metadata key for container | required |
data | list | list of container data | required |
Source code in client/ayon_speedtree/api/pipeline.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
|
write_workfile_metadata(metadata_key, data=None)
Function to write workfile metadata(such as creator's context data and instance data) in .sptree_metadata/{workfile}/{metadata_key} folder This persists the current in-memory instance/creator's context data to be set for a specific workfile on disk. Usually used on save to persist updating instance data and context data used in publisher.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata_key | str | metadata key | required |
data | list | metadata. Defaults to None. | None |
Source code in client/ayon_speedtree/api/pipeline.py
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 |
|