Layer related George functions¶
Layer related George functions and enums.
LayerColorAction
¶
LayerColorDisplayOpt
¶
InstanceNamingMode
¶
InstanceNamingProcess
¶
LayerType
¶
StencilMode
¶
LayerBehavior
¶
LayerTransparency
¶
InsertDirection
¶
TVPClipLayerColor(clip_id: int, color_index: int, color_r: int, color_g: int, color_b: int, name: str)
dataclass
¶
Clip layer color values.
TVPLayer(id: int, visibility: bool, position: int, density: int, name: str, type: LayerType, first_frame: int, last_frame: int, selected: bool, editable: bool, stencil_state: StencilMode)
dataclass
¶
TVPaint layer info values.
tv_layer_current_id() -> int
¶
Get the id of the current layer.
Source code in pytvpaint/george/grg_layer.py
198 199 200 |
|
tv_layer_get_id(position: int) -> int
¶
Get the id of the layer at the given position.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.GeorgeError
|
if no layer found at the provided position |
Source code in pytvpaint/george/grg_layer.py
203 204 205 206 207 208 209 210 211 |
|
tv_layer_get_pos(layer_id: int) -> int
¶
Get the position of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
214 215 216 217 218 219 220 221 222 223 224 |
|
tv_layer_info(layer_id: int) -> TVPLayer
¶
Get information of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
|
tv_layer_move(position: int) -> None
¶
Move the current layer to a new position in the layer stack.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.GeorgeError
|
if layer could not be moved |
Source code in pytvpaint/george/grg_layer.py
243 244 245 246 247 248 249 250 |
|
tv_layer_set(layer_id: int) -> None
¶
Make the given layer the current one.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
253 254 255 256 257 258 259 260 261 262 263 |
|
tv_layer_selection_get(layer_id: int) -> bool
¶
Get the selection state of a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
266 267 268 269 270 271 272 273 274 |
|
tv_layer_selection_set(layer_id: int, new_state: bool) -> None
¶
Set the selection state of a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
277 278 279 280 281 282 283 284 |
|
tv_layer_select(start_frame: int, frame_count: int) -> int
¶
Select frames in the current layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_frame |
int
|
selection start |
required |
frame_count |
int
|
number of frames to select |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
number of frames selected |
Note
If the start position is before the beginning of the layer, the selection will only start at the beginning of the layer, but its length will be measured from the start position. This means that if you ask for a selection of 15 frames starting from position 0 in a layer that actually starts at position 5, only the first 10 frames in the layer will be selected. If the selection goes beyond the end of the layer, it will only include the frames between the start and end of the layer. No frames will be selected if the start position is beyond the end of the layer
Source code in pytvpaint/george/grg_layer.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
|
tv_layer_select_info(full: bool = False) -> tuple[int, int]
¶
Get Selected frames in a layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
full |
bool
|
Always get the selection range, even on a non anim/ctg layer |
False
|
Returns:
Name | Type | Description |
---|---|---|
frame |
int
|
the start frame of the selection |
count |
int
|
the number of frames in the selection |
Bug
The official documentation states that this functions selects the layer frames, it does not, it simply
returns the frames selected. This will also return all frames in the layer even if they are not selected if the
argument full
is set to True. We advise using tv_layer_select
to select your frames and only using this
function to get the selected frames.
Source code in pytvpaint/george/grg_layer.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
|
tv_layer_create(name: str) -> int
¶
Create a new image layer with the given name.
Source code in pytvpaint/george/grg_layer.py
330 331 332 |
|
tv_layer_duplicate(name: str) -> int
¶
Duplicate the current layer and make it the current one.
Source code in pytvpaint/george/grg_layer.py
335 336 337 |
|
tv_layer_rename(layer_id: int, name: str) -> None
¶
Rename a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
340 341 342 343 344 345 346 347 348 349 350 |
|
tv_layer_kill(layer_id: int) -> None
¶
Delete the layer with provided id.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
353 354 355 356 357 358 359 360 361 362 363 |
|
tv_layer_density_get() -> int
¶
Get the current layer density (opacity).
Source code in pytvpaint/george/grg_layer.py
366 367 368 |
|
tv_layer_density_set(new_density: int) -> None
¶
Set the current layer density (opacity ranging from 0 to 100).
Source code in pytvpaint/george/grg_layer.py
371 372 373 |
|
tv_layer_display_get(layer_id: int) -> bool
¶
Get the visibility of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
376 377 378 379 380 381 382 383 384 385 386 387 |
|
tv_layer_display_set(layer_id: int, new_state: bool, light_table: bool = False) -> None
¶
Set the visibility of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
|
tv_layer_lock_get(layer_id: int) -> bool
¶
Get the lock state of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
408 409 410 411 412 413 414 415 416 417 418 419 |
|
tv_layer_lock_set(layer_id: int, new_state: bool) -> None
¶
Set the lock state of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
|
tv_layer_collapse_get(layer_id: int) -> bool
¶
Get the collapse mode of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
440 441 442 443 444 445 446 447 448 449 450 |
|
tv_layer_collapse_set(layer_id: int, new_state: bool) -> None
¶
Set the collapse mode of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
453 454 455 456 457 458 459 460 461 462 463 |
|
tv_layer_blending_mode_get(layer_id: int) -> BlendingMode
¶
Get the blending mode of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
466 467 468 469 470 471 472 473 474 475 476 477 |
|
tv_layer_blending_mode_set(layer_id: int, mode: BlendingMode) -> None
¶
Set the blending mode of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
480 481 482 483 484 485 486 487 488 489 490 |
|
tv_layer_stencil_get(layer_id: int) -> StencilMode
¶
Get the stencil state and mode of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
|
tv_layer_stencil_set(layer_id: int, mode: StencilMode) -> None
¶
Set the stencil state and mode of the given layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
|
tv_layer_show_thumbnails_get(layer_id: int) -> bool
¶
Get the show thumbnails state for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
|
tv_layer_show_thumbnails_set(layer_id: int, state: bool) -> None
¶
Set the show thumbnail state for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 |
|
tv_layer_auto_break_instance_get(layer_id: int) -> bool
¶
Get the layer auto break instance value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
571 572 573 574 575 576 577 578 579 580 581 582 |
|
tv_layer_auto_break_instance_set(layer_id: int, state: bool) -> None
¶
Set the layer auto break instance value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
|
tv_layer_auto_create_instance_get(layer_id: int) -> bool
¶
Get the layer auto create instance value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
|
tv_layer_auto_create_instance_set(layer_id: int, state: bool) -> None
¶
Set the layer auto create instance value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 |
|
tv_layer_pre_behavior_get(layer_id: int) -> LayerBehavior
¶
Get the pre-behavior value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
640 641 642 643 644 645 646 647 648 649 650 651 |
|
tv_layer_pre_behavior_set(layer_id: int, behavior: LayerBehavior) -> None
¶
Set the pre-behavior value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
654 655 656 657 658 659 660 661 662 663 664 |
|
tv_layer_post_behavior_get(layer_id: int) -> LayerBehavior
¶
Get the post-behavior value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
667 668 669 670 671 672 673 674 675 676 677 678 |
|
tv_layer_post_behavior_set(layer_id: int, behavior: LayerBehavior) -> None
¶
Set the post-behavior value for a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
681 682 683 684 685 686 687 688 689 690 691 |
|
tv_layer_lock_position_get(layer_id: int) -> bool
¶
Get the lock position state of a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
694 695 696 697 698 699 700 701 702 703 704 705 |
|
tv_layer_lock_position_set(layer_id: int, state: bool) -> None
¶
Set the lock position state of a layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
708 709 710 711 712 713 714 715 716 717 718 |
|
tv_preserve_get() -> LayerTransparency
¶
Get the preserve transparency state of the current layer.
Source code in pytvpaint/george/grg_layer.py
721 722 723 724 725 |
|
tv_preserve_set(state: LayerTransparency) -> None
¶
Set the preserve transparency state of the current layer.
Source code in pytvpaint/george/grg_layer.py
728 729 730 |
|
tv_layer_mark_get(layer_id: int, frame: int) -> int
¶
Get the mark color of a layer at a frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer_id |
int
|
the layer id |
required |
frame |
int
|
the frame with a mark |
required |
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
the mark color index |
Source code in pytvpaint/george/grg_layer.py
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
|
tv_layer_mark_set(layer_id: int, frame: int, color_index: int) -> None
¶
Set the mark of the layer's frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer_id |
int
|
the layer id |
required |
frame |
int
|
the frame to set the mark (use 0 to remove it). |
required |
color_index |
int
|
the mark color |
required |
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 |
|
tv_layer_anim(layer_id: int) -> None
¶
Convert the layer to an anim layer.
Source code in pytvpaint/george/grg_layer.py
771 772 773 |
|
tv_layer_copy() -> None
¶
Copy the current image or the selected ones.
Source code in pytvpaint/george/grg_layer.py
776 777 778 |
|
tv_layer_cut() -> None
¶
Cut the current image or the selected ones.
Source code in pytvpaint/george/grg_layer.py
781 782 783 |
|
tv_layer_paste() -> None
¶
Paste the previously copied/cut images to the current layer.
Source code in pytvpaint/george/grg_layer.py
786 787 788 |
|
tv_layer_insert_image(count: int = 1, direction: InsertDirection | None = None, duplicate: bool | None = None) -> None
¶
Add new image(s) before/after the current one and make it current.
Source code in pytvpaint/george/grg_layer.py
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 |
|
tv_layer_merge(layer_id: int, blending_mode: BlendingMode, stamp: bool = False, erase: bool = False, keep_color_grp: bool = True, keep_img_mark: bool = True, keep_instance_name: bool = True) -> None
¶
Merge the given layer with the current one.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer_id |
int
|
the layer id |
required |
blending_mode |
pytvpaint.george.grg_base.BlendingMode
|
the blending mode to use |
required |
stamp |
bool
|
Use stamp mode |
False
|
erase |
bool
|
Remove the source layer |
False
|
keep_color_grp |
bool
|
Keep the color group |
True
|
keep_img_mark |
bool
|
Keep the image mark |
True
|
keep_instance_name |
bool
|
Keep the instance name |
True
|
Source code in pytvpaint/george/grg_layer.py
809 810 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 |
|
tv_layer_merge_all(keep_color_grp: bool = True, keep_img_mark: bool = True, keep_instance_name: bool = True) -> None
¶
Merge all layers.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
keep_color_grp |
bool
|
Keep the color group |
True
|
keep_img_mark |
bool
|
Keep the image mark |
True
|
keep_instance_name |
bool
|
Keep the instance name |
True
|
Source code in pytvpaint/george/grg_layer.py
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 |
|
tv_layer_shift(layer_id: int, start: int) -> None
¶
Move the layer to a new frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer_id |
int
|
layer id |
required |
start |
int
|
frame to shift layer to |
required |
Source code in pytvpaint/george/grg_layer.py
869 870 871 872 873 874 875 876 |
|
tv_layer_load_dependencies(layer_id: int) -> None
¶
Load all dependencies of the given layer in memory.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
879 880 881 882 883 884 885 886 887 888 889 |
|
tv_layer_color_get_color(clip_id: int, color_index: int) -> TVPClipLayerColor
¶
Get a specific colors information in the clips color list.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 |
|
tv_layer_color_set_color(clip_id: int, color_index: int, color: RGBColor, name: str | None = None) -> None
¶
Set a specific colors information in the clips color list.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Note
The color with index 0 is the "Default" color, and it can't be changed
Source code in pytvpaint/george/grg_layer.py
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 |
|
tv_layer_color_get(layer_id: int) -> int
¶
Get the layer's color index from the clips color list.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 |
|
tv_layer_color_set(layer_id: int, color_index: int) -> None
¶
Set the layer's color index from the clips color list.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
965 966 967 968 969 970 971 972 973 974 975 976 977 978 |
|
tv_layer_color_lock(color_index: int) -> int
¶
Lock all layers that use the given color index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_index |
int
|
the layer color index |
required |
Returns:
Type | Description |
---|---|
int
|
the number of layers locked |
Source code in pytvpaint/george/grg_layer.py
981 982 983 984 985 986 987 988 989 990 |
|
tv_layer_color_unlock(color_index: int) -> int
¶
Unlock all layers that use the given color index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color_index |
int
|
the layer color index |
required |
Returns:
Type | Description |
---|---|
int
|
the number of unlocked layers |
Source code in pytvpaint/george/grg_layer.py
993 994 995 996 997 998 999 1000 1001 1002 |
|
tv_layer_color_show(mode: LayerColorDisplayOpt, color_index: int) -> int
¶
Show all layers that use the given color index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
pytvpaint.george.grg_layer.LayerColorDisplayOpt
|
the display mode |
required |
color_index |
int
|
the layer color index |
required |
Returns:
Type | Description |
---|---|
int
|
the number of unlocked layers |
Source code in pytvpaint/george/grg_layer.py
1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 |
|
tv_layer_color_hide(mode: LayerColorDisplayOpt, color_index: int) -> int
¶
Hide all layers that use the given color index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
pytvpaint.george.grg_layer.LayerColorDisplayOpt
|
the display mode |
required |
color_index |
int
|
the layer color index |
required |
Returns:
Type | Description |
---|---|
int
|
the number of unlocked layers |
Source code in pytvpaint/george/grg_layer.py
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 |
|
tv_layer_color_visible(color_index: int) -> bool
¶
Get the visibility of the color index (2px height) in the timeline.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
|
tv_layer_color_select(color_index: int) -> int
¶
Select all layers that use the given color index.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 |
|
tv_layer_color_unselect(color_index: int) -> int
¶
Unselect all layers that use the given color index.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id |
Source code in pytvpaint/george/grg_layer.py
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 |
|
tv_instance_name(layer_id: int, mode: InstanceNamingMode, prefix: str | None = None, suffix: str | None = None, process: InstanceNamingProcess | None = None) -> None
¶
Rename all instances.
Note
The suffix can only be added when using mode InstanceNamingMode.SMART
Bug
Using a wrong layer_id causes a crash
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer_id |
int
|
the layer id |
required |
mode |
pytvpaint.george.grg_layer.InstanceNamingMode
|
the instance renaming mode |
required |
prefix |
str | None
|
the prefix to add to each name |
None
|
suffix |
str | None
|
the suffix to add to each name |
None
|
process |
pytvpaint.george.grg_layer.InstanceNamingProcess | None
|
the instance naming process |
None
|
Source code in pytvpaint/george/grg_layer.py
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 |
|
tv_instance_get_name(layer_id: int, frame: int) -> str
¶
Get the name of an instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer_id |
int
|
the layer id |
required |
frame |
int
|
the frame of the instance |
required |
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid layer id or an invalid instance frame |
Returns:
Type | Description |
---|---|
str
|
the instance name |
Source code in pytvpaint/george/grg_layer.py
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 |
|
tv_instance_set_name(layer_id: int, frame: int, name: str) -> str
¶
Set the name of an instance.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.GeorgeError
|
if an invalid layer id was provided or no instance was found at the given frame |
Source code in pytvpaint/george/grg_layer.py
1147 1148 1149 1150 1151 1152 1153 1154 |
|
tv_exposure_next() -> int
¶
Go to the next layer instance head.
Returns:
Type | Description |
---|---|
int
|
The next instances start frame |
Source code in pytvpaint/george/grg_layer.py
1157 1158 1159 1160 1161 1162 1163 |
|
tv_exposure_break(frame: int) -> None
¶
Break a layer instance/exposure at the given frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame |
int
|
the split frame |
required |
Source code in pytvpaint/george/grg_layer.py
1166 1167 1168 1169 1170 1171 1172 |
|
tv_exposure_add(frame: int, count: int) -> None
¶
Add new frames to an existing layer instance/exposure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame |
int
|
the split frame |
required |
count |
int
|
the number of frames to add |
required |
Source code in pytvpaint/george/grg_layer.py
1175 1176 1177 1178 1179 1180 1181 1182 |
|
tv_exposure_set(frame: int, count: int) -> None
¶
Set the number frames of an existing layer instance/exposure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame |
int
|
the split frame |
required |
count |
int
|
the number of frames to add |
required |
Source code in pytvpaint/george/grg_layer.py
1185 1186 1187 1188 1189 1190 1191 1192 |
|
tv_exposure_prev() -> int
¶
Go to the previous layer instance head (before the current instance).
Returns:
Type | Description |
---|---|
int
|
The previous instances start frame |
Source code in pytvpaint/george/grg_layer.py
1195 1196 1197 1198 1199 1200 1201 |
|
tv_save_image(export_path: Path | str) -> None
¶
Save the current image of the current layer.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.GeorgeError
|
if the file couldn't be saved or an invalid format was provided |
Source code in pytvpaint/george/grg_layer.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 |
|
tv_load_image(img_path: Path | str, stretch: bool = False) -> None
¶
Load an image in the current image layer.
Raises:
Type | Description |
---|---|
FileNotFoundError
|
if the input file doesn't exist |
pytvpaint.george.exceptions.GeorgeError
|
if the provided file is in an invalid format |
Source code in pytvpaint/george/grg_layer.py
1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 |
|
tv_clear(fill_b_pen: bool = False) -> None
¶
Clear (or fill with BPen) the current image (selection) of the current layer.
Source code in pytvpaint/george/grg_layer.py
1235 1236 1237 |
|