pipeline
MayaHost
Bases: HostBase, IWorkfileHost, ILoadHost, IPublishHost
Source code in client/ayon_maya/api/pipeline.py
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 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 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 | |
before_file_open()
check lock file when the file changed
Source code in client/ayon_maya/api/pipeline.py
606 607 608 609 | |
check_lock_on_current_file()
Check if there is a user opening the file
Source code in client/ayon_maya/api/pipeline.py
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | |
containerise(name, namespace, nodes, context, loader=None, suffix='CON')
Bundle nodes into an assembly and imprint it with metadata
Containerisation enables a tracking of version, author and origin for loaded assets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Name of resulting assembly | required |
namespace | str | Namespace under which to host container | required |
nodes | list | Long names of nodes to containerise | required |
context | dict | Asset information | required |
loader | str | Name of loader used to produce this container. | None |
suffix | str | Suffix of container, defaults to | 'CON' |
Returns:
| Name | Type | Description |
|---|---|---|
container | str | Name of container assembly |
Source code in client/ayon_maya/api/pipeline.py
463 464 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 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | |
ls()
Yields containers from active Maya scene
This is the host-equivalent of api.ls(), but instead of listing assets on disk, it lists assets already loaded in Maya; once loaded they are called 'containers'
Yields:
| Type | Description |
|---|---|
| dict[str, Any]: container |
Source code in client/ayon_maya/api/pipeline.py
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
on_after_save()
Check if there is a lockfile after save
Source code in client/ayon_maya/api/pipeline.py
569 570 571 | |
on_before_close()
Delete the lock file after user quitting the Maya Scene
Source code in client/ayon_maya/api/pipeline.py
597 598 599 600 601 602 603 | |
on_before_save()
Run validation for scene's FPS prior to saving
Source code in client/ayon_maya/api/pipeline.py
564 565 566 | |
on_new()
Set project resolution and fps when create a new file
Source code in client/ayon_maya/api/pipeline.py
669 670 671 672 673 674 675 | |
on_open()
On scene open let's assume the containers have changed.
Source code in client/ayon_maya/api/pipeline.py
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | |
on_save()
Automatically add IDs to new nodes
Any transform of a mesh, without an existing ID, is given one automatically on file save.
Source code in client/ayon_maya/api/pipeline.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | |
on_task_changed()
Wrapped function of app initialize and maya's on task changed
Source code in client/ayon_maya/api/pipeline.py
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | |
parse_container(container)
Return the container node's full container data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
container | str | A container node name. | required |
Returns:
| Type | Description |
|---|---|
| Optional[dict[str, Any]]: The container schema data for this container if it meets all the required metadata. |
Source code in client/ayon_maya/api/pipeline.py
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | |
workfile_save_before_xgen(event)
Manage Xgen external files when switching context.
Xgen has various external files that needs to be unique and relative to the workfile, so we need to copy and potentially overwrite these files when switching context.
Source code in client/ayon_maya/api/pipeline.py
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | |