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 272 273 274 275 276 277 278 279 | |
before_file_open()
check lock file when the file changed
Source code in client/ayon_maya/api/pipeline.py
622 623 624 625 | |
check_lock_on_current_file()
Check if there is a user opening the file
Source code in client/ayon_maya/api/pipeline.py
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
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
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 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | |
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
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | |
on_after_save()
Check if there is a lockfile after save
Source code in client/ayon_maya/api/pipeline.py
585 586 587 | |
on_before_close()
Delete the lock file after user quitting the Maya Scene
Source code in client/ayon_maya/api/pipeline.py
613 614 615 616 617 618 619 | |
on_before_save()
Run validation for scene's FPS prior to saving
Source code in client/ayon_maya/api/pipeline.py
580 581 582 | |
on_new()
Set project resolution and fps when create a new file
Source code in client/ayon_maya/api/pipeline.py
685 686 687 688 689 690 691 | |
on_open()
On scene open let's assume the containers have changed.
Source code in client/ayon_maya/api/pipeline.py
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | |
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
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | |
on_task_changed()
Wrapped function of app initialize and maya's on task changed
Source code in client/ayon_maya/api/pipeline.py
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 | |
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
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 | |
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
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 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | |