lib
Host specific functions where host api is connected
PublishAction
Bases: QAction
Action with is showing as menu item
Source code in client/ayon_hiero/api/lib.py
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 | |
apply_colorspace_project()
Apply colorspaces from settings.
Due to not being able to set the project settings through the Python API, we need to do use some dubious code to find the widgets and set them. It is possible to set the project settings without traversing through the widgets but it involves reading the hrox files from disk with XML, so no in-memory support. See https://community.foundry.com/discuss/topic/137771/change-a-project-s-default-color-transform-with-python # noqa for more details.
Source code in client/ayon_hiero/api/lib.py
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 | |
check_inventory_versions(track_items=None)
Actual version color identifier of Loaded containers
Check all track items and filter only Loader nodes for its version. It will get all versions from database and check if the node is having actual version. If not then it will color it to red.
Source code in client/ayon_hiero/api/lib.py
1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 | |
create_bin(path=None, project=None)
Create bin in project. If the path is "bin1/bin2/bin3" it will create whole depth and return bin3
Source code in client/ayon_hiero/api/lib.py
894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 | |
create_nuke_workfile_clips(nuke_workfiles, seq=None)
nuke_workfiles is list of dictionaries like: [{ 'path': 'P:/Jakub_testy_pipeline/test_v01.nk', 'name': 'test', 'handleStart': 15, # added asymmetrically to handles 'handleEnd': 10, # added asymmetrically to handles "clipIn": 16, "frameStart": 991, "frameEnd": 1023, 'task': 'Comp-tracking', 'work_dir': 'VFX_PR', 'shot': '00010' }]
Source code in client/ayon_hiero/api/lib.py
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 | |
deprecated(new_destination)
Mark functions as deprecated.
It will result in a warning being emitted when the function is used.
Source code in client/ayon_hiero/api/lib.py
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 | |
get_current_sequence(name=None, new=False)
Get current sequence in context of active project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name (str)[optional] | name of sequence we want to return | required | |
new (bool)[optional] | if we want to create new one | required |
Returns:
| Type | Description |
|---|---|
| hiero.core.Sequence: the sequence object |
Source code in client/ayon_hiero/api/lib.py
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 | |
get_current_track(sequence, name, audio=False)
Get current track in context of active project.
Creates new if none is found.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sequence | Sequence | hiero sequence object | required |
name | str | name of track we want to return | required |
audio (bool)[optional] | switch to AudioTrack | required |
Returns:
| Type | Description |
|---|---|
| hiero.core.Track: the track object |
Source code in client/ayon_hiero/api/lib.py
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 | |
get_main_window()
Acquire Nuke's main window
Source code in client/ayon_hiero/api/lib.py
1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 | |
get_sequence_pattern_and_padding(file)
Return sequence pattern and padding from file
Attributes:
| Name | Type | Description |
|---|---|---|
file | string | basename form path |
Example
Can find file.0001.ext, file.%02d.ext, file.####.ext
Return
string: any matching sequence pattern int: padding of sequence numbering
Source code in client/ayon_hiero/api/lib.py
1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 | |
get_track_ayon_data(track, container_name=None)
Get track's AYON tag data.
Attributes:
| Name | Type | Description |
|---|---|---|
trackItem | VideoTrack | hiero object |
Returns:
| Name | Type | Description |
|---|---|---|
dict | data found on the AYON tag |
Source code in client/ayon_hiero/api/lib.py
423 424 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 | |
get_track_ayon_tag(track)
Get AYON track item tag created by creator or loader plugin.
Attributes:
| Name | Type | Description |
|---|---|---|
trackItem | TrackItem | hiero object |
Returns:
| Type | Description |
|---|---|
| hiero.core.Tag: hierarchy, orig clip attributes |
Source code in client/ayon_hiero/api/lib.py
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | |
get_track_item_tags(track_item)
Get track item tags excluding AYON tag
Attributes:
| Name | Type | Description |
|---|---|---|
trackItem | TrackItem | hiero object |
Returns:
| Type | Description |
|---|---|
| hiero.core.Tag: hierarchy, orig clip attributes |
Source code in client/ayon_hiero/api/lib.py
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
get_track_items(selection=False, sequence_name=None, track_item_name=None, track_name=None, track_type=None, check_enabled=True, check_locked=True, check_tagged=False)
Get all available current timeline track items.
Attribute
selection (list)[optional]: list of selected track items sequence_name (str)[optional]: return only clips from input sequence track_item_name (str)[optional]: return only item with input name track_name (str)[optional]: return only items from track name track_type (str)[optional]: return only items of given type (audio or video) default is video check_enabled (bool)[optional]: ignore disabled if True check_locked (bool)[optional]: ignore locked if True
Return
list or hiero.core.TrackItem: list of track items or single track item
Source code in client/ayon_hiero/api/lib.py
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 | |
get_trackitem_ayon_data(track_item)
Get track item's AYON tag data.
Attributes:
| Name | Type | Description |
|---|---|---|
trackItem | TrackItem | hiero object |
Returns:
| Name | Type | Description |
|---|---|---|
dict | data found on pype tag |
Source code in client/ayon_hiero/api/lib.py
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |
get_trackitem_ayon_tag(track_item, tag_name=AYON_TAG_NAME)
Get pype track item tag created by creator or loader plugin.
Attributes:
| Name | Type | Description |
|---|---|---|
trackItem | TrackItem | hiero object |
tag_name | str | The tag name. |
Returns:
| Type | Description |
|---|---|
| hiero.core.Tag: hierarchy, orig clip attributes |
Source code in client/ayon_hiero/api/lib.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | |
imprint(track_item, data=None)
Adding Avalon data into a hiero track item tag.
Also including publish attribute into tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
track_item | TrackItem | hiero track item object | required |
data | dict | Any data which needs to be imprinted | None |
Examples:
data = { 'folderPath': '/shots/sq020sh0280', 'productType': 'render', 'productName': 'productMain' }
Source code in client/ayon_hiero/api/lib.py
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 | |
launch_workfiles_app(event)
Event for launching workfiles after hiero start
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event | obj | required but unused | required |
Source code in client/ayon_hiero/api/lib.py
645 646 647 648 649 650 651 652 653 | |
selection_changed_timeline(event)
Callback on timeline to check if asset in data is the same as clip name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event | Event | timeline event | required |
Source code in client/ayon_hiero/api/lib.py
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 | |
set_track_ayon_tag(track, data=None)
Set AYON track tag to input track object.
Attributes:
| Name | Type | Description |
|---|---|---|
track | VideoTrack | hiero object |
Returns:
| Type | Description |
|---|---|
| hiero.core.Tag |
Source code in client/ayon_hiero/api/lib.py
363 364 365 366 367 368 369 370 371 372 373 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 | |
set_trackitem_ayon_tag(track_item, data=None)
Set AYON track tag to input track object.
Attributes:
| Name | Type | Description |
|---|---|---|
track | VideoTrack | hiero object |
Returns:
| Type | Description |
|---|---|
| hiero.core.Tag |
Source code in client/ayon_hiero/api/lib.py
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 | |
setup(console=False, port=None, menu=True)
Setup integration
Registers Pyblish for Hiero plug-ins and appends an item to the File-menu
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
console | bool | Display console with GUI | False |
port | int | Port from which to start looking for an available port to connect with Pyblish QML, default provided by Pyblish Integration. | None |
menu | bool | Display file menu in Hiero. | True |
Source code in client/ayon_hiero/api/lib.py
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | |
teardown()
Remove integration
Source code in client/ayon_hiero/api/lib.py
682 683 684 685 686 687 688 689 690 691 692 | |