pipeline
NukeHost
Bases: HostBase, IWorkfileHost, ILoadHost, IPublishHost
Source code in client/ayon_nuke/api/pipeline.py
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 | |
install()
Installing all requirements for Nuke host
Source code in client/ayon_nuke/api/pipeline.py
131 132 133 134 135 136 137 138 139 140 141 | |
setup_ui_callbacks_and_menu()
Setup AYON menus.
Source code in client/ayon_nuke/api/pipeline.py
143 144 145 146 147 148 149 150 151 152 153 154 155 | |
add_nuke_callbacks(project_settings=None)
Adding all available nuke callbacks
Source code in client/ayon_nuke/api/pipeline.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | |
containerise(node, name, namespace, context, loader=None, data=None)
Bundle node 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 |
|---|---|---|---|
node | Node | Nuke's node object to imprint as container | required |
name | str | Name of resulting assembly | required |
namespace | str | Namespace under which to host container | required |
context | dict | Asset information | required |
loader | str | Name of node used to produce this container. | None |
Returns:
| Name | Type | Description |
|---|---|---|
node | Node | containerised nuke's node object |
Source code in client/ayon_nuke/api/pipeline.py
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | |
list_instances(creator_id=None)
List all created instances to publish from current workfile.
For SubsetManager
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
creator_id | Optional[str] | creator identifier | None |
Returns:
| Type | Description |
|---|---|
| (list) of dictionaries matching instances format |
Source code in client/ayon_nuke/api/pipeline.py
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 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 | |
ls()
List available containers.
This function is used by the Container Manager in Nuke. You'll need to implement a for-loop that then yields one Container at a time.
Source code in client/ayon_nuke/api/pipeline.py
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | |
on_root_create()
Callback function for on root node create.
Source code in client/ayon_nuke/api/pipeline.py
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 | |
on_script_load()
Callback function for on script load.
Source code in client/ayon_nuke/api/pipeline.py
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 313 314 315 316 317 | |
parse_container(node)
Returns containerised data of a node
Reads the imprinted data from containerise.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node | Node | Nuke's node object to read imprinted data | required |
Returns:
| Name | Type | Description |
|---|---|---|
dict | The container schema data for this container node. |
Source code in client/ayon_nuke/api/pipeline.py
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | |
reload_config()
Attempt to reload pipeline at run-time.
CAUTION: This is primarily for development and debugging purposes.
Source code in client/ayon_nuke/api/pipeline.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
remove_instance(instance)
Remove instance from current workfile metadata.
For SubsetManager
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance | dict | instance representation from subsetmanager model | required |
Source code in client/ayon_nuke/api/pipeline.py
776 777 778 779 780 781 782 783 784 785 786 787 | |
select_instance(instance)
Select instance in Node View
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance | dict | instance representation from subsetmanager model | required |
Source code in client/ayon_nuke/api/pipeline.py
790 791 792 793 794 795 796 797 798 | |
start_workfile_template_builder()
Trigger workfile template builder when a new file is created.
Source code in client/ayon_nuke/api/pipeline.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
update_container(node, keys=None)
Returns node with updateted containder data
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node | Node | The node in Nuke to imprint as container, | required |
keys | dict | data which should be updated | None |
Returns:
| Name | Type | Description |
|---|---|---|
node | Node | nuke node with updated container data |
Source code in client/ayon_nuke/api/pipeline.py
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | |