Clip related George functions¶
Clip related George functions.
TVPClip(id: int, name: str, is_current: bool, is_hidden: bool, is_selected: bool, storyboard_start_frame: int, first_frame: int, last_frame: int, frame_count: int, mark_in: int, mark_out: int, color_idx: int)
dataclass
¶
TVPaint clip info values.
tv_clip_info(clip_id: int) -> TVPClip
¶
Get the information of the given clip.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid clip id |
Source code in pytvpaint/george/grg_clip.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
tv_clip_enum_id(scene_id: int, clip_position: int) -> int
¶
Get the id of the clip at the given position inside the given scene.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.GeorgeError
|
if given an invalid scene id or clip position or elements have been removed |
Source code in pytvpaint/george/grg_clip.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
tv_clip_current_id() -> int
¶
Get the id of the current clip.
Source code in pytvpaint/george/grg_clip.py
94 95 96 |
|
tv_clip_new(name: str) -> None
¶
Create a new clip.
Source code in pytvpaint/george/grg_clip.py
99 100 101 |
|
tv_clip_duplicate(clip_id: int) -> None
¶
Duplicate the given clip.
Source code in pytvpaint/george/grg_clip.py
104 105 106 |
|
tv_clip_close(clip_id: int) -> None
¶
Remove the given clip.
Source code in pytvpaint/george/grg_clip.py
109 110 111 |
|
tv_clip_name_get(clip_id: int) -> str
¶
Get the clip name.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid clip id |
Source code in pytvpaint/george/grg_clip.py
114 115 116 117 118 119 120 121 122 123 124 |
|
tv_clip_name_set(clip_id: int, name: str) -> None
¶
Set the clip name.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid clip id |
Source code in pytvpaint/george/grg_clip.py
127 128 129 130 131 132 133 134 135 136 137 |
|
tv_clip_move(clip_id: int, scene_id: int, position: int) -> None
¶
Manage clip position.
Source code in pytvpaint/george/grg_clip.py
140 141 142 |
|
tv_clip_hidden_get(clip_id: int) -> bool
¶
Get clip visibility.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid clip id |
Source code in pytvpaint/george/grg_clip.py
145 146 147 148 149 150 151 152 153 154 155 156 |
|
tv_clip_hidden_set(clip_id: int, new_state: bool) -> None
¶
Set clip visibility.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid clip id |
Source code in pytvpaint/george/grg_clip.py
159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
tv_clip_select(clip_id: int) -> None
¶
Activate/Make current the given clip.
Source code in pytvpaint/george/grg_clip.py
174 175 176 |
|
tv_clip_selection_get(clip_id: int) -> bool
¶
Get the clip's selection state.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid clip id |
Source code in pytvpaint/george/grg_clip.py
179 180 181 182 183 184 185 186 187 188 189 190 |
|
tv_clip_selection_set(clip_id: int, new_state: bool) -> None
¶
Set the clip's selection state.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.NoObjectWithIdError
|
if given an invalid clip id |
Source code in pytvpaint/george/grg_clip.py
193 194 195 196 197 198 199 200 201 202 203 |
|
tv_first_image() -> int
¶
Get the first image of the clip.
Source code in pytvpaint/george/grg_clip.py
206 207 208 |
|
tv_last_image() -> int
¶
Get the last image of the clip.
Source code in pytvpaint/george/grg_clip.py
211 212 213 |
|
tv_load_sequence(seq_path: Path | str, offset_count: tuple[int, int] | None = None, field_order: FieldOrder | None = None, stretch: bool = False, time_stretch: bool = False, preload: bool = False) -> int
¶
Load a sequence of images or movie in a new layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seq_path |
pathlib.Path | str
|
the first file of the sequence to load |
required |
offset_count |
tuple[int, int] | None
|
the start and number of images in the sequence to load. Defaults to None. |
None
|
field_order |
pytvpaint.george.grg_base.FieldOrder | None
|
the field order. Defaults to None. |
None
|
stretch |
bool
|
Stretch each image to the size of the layer. Defaults to None. |
False
|
time_stretch |
bool
|
Once loaded, the layer will have a new number of images corresponding to the project framerate. Defaults to None. |
False
|
preload |
bool
|
Load all the images in memory, no more reference on the files. Defaults to None. |
False
|
Raises:
Type | Description |
---|---|
FileNotFoundError
|
if the sequence file doesn't exist |
pytvpaint.george.exceptions.GeorgeError
|
if the input file is in an invalid format |
Returns:
Type | Description |
---|---|
int
|
the number of images of the new layer |
Source code in pytvpaint/george/grg_clip.py
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 |
|
tv_save_sequence(export_path: Path | str, mark_in: int | None = None, mark_out: int | None = None) -> None
¶
Save the current clip.
Raises:
Type | Description |
---|---|
NotADirectoryError
|
if the export directory doesn't exist |
Source code in pytvpaint/george/grg_clip.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
|
tv_bookmarks_enum(position: int) -> int
¶
Get the frame (in the clip) corresponding to the bookmark at the given position.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.GeorgeError
|
if no bookmark found at provided position |
Source code in pytvpaint/george/grg_clip.py
298 299 300 301 302 303 304 305 306 307 |
|
tv_bookmark_set(frame: int) -> None
¶
Set a bookmark at the given frame.
Source code in pytvpaint/george/grg_clip.py
310 311 312 |
|
tv_bookmark_clear(frame: int) -> None
¶
Remove a bookmark at the given frame.
Source code in pytvpaint/george/grg_clip.py
315 316 317 |
|
tv_bookmark_next() -> None
¶
Go to the next bookmarked frame.
Source code in pytvpaint/george/grg_clip.py
320 321 322 |
|
tv_bookmark_prev() -> None
¶
Go to the previous bookmarked frame.
Source code in pytvpaint/george/grg_clip.py
325 326 327 |
|
tv_clip_color_get(clip_id: int) -> int
¶
Get the clip color.
Source code in pytvpaint/george/grg_clip.py
330 331 332 |
|
tv_clip_color_set(clip_id: int, color_index: int) -> None
¶
Set the clip color.
Source code in pytvpaint/george/grg_clip.py
335 336 337 |
|
tv_clip_action_get(clip_id: int) -> str
¶
Get the action text of the clip.
Source code in pytvpaint/george/grg_clip.py
340 341 342 343 344 345 |
|
tv_clip_action_set(clip_id: int, text: str) -> None
¶
Set the action text of the clip.
Source code in pytvpaint/george/grg_clip.py
348 349 350 351 352 |
|
tv_clip_dialog_get(clip_id: int) -> str
¶
Get the dialog text of the clip.
Source code in pytvpaint/george/grg_clip.py
355 356 357 358 359 |
|
tv_clip_dialog_set(clip_id: int, dialog: str) -> None
¶
Set the dialog text of the clip.
Source code in pytvpaint/george/grg_clip.py
362 363 364 365 366 |
|
tv_clip_note_get(clip_id: int) -> str
¶
Get the note text of the clip.
Source code in pytvpaint/george/grg_clip.py
369 370 371 372 373 |
|
tv_clip_note_set(clip_id: int, note: str) -> None
¶
Set the note text of the clip.
Source code in pytvpaint/george/grg_clip.py
376 377 378 379 380 |
|
tv_save_clip(export_path: Path | str) -> None
¶
Save the current clip in .tvp format.
Raises:
Type | Description |
---|---|
pytvpaint.george.exceptions.GeorgeError
|
if file couldn't be saved |
Source code in pytvpaint/george/grg_clip.py
383 384 385 386 387 388 389 390 391 |
|
tv_save_display(export_path: Path | str) -> None
¶
Save the display.
Source code in pytvpaint/george/grg_clip.py
394 395 396 397 |
|
tv_clip_save_structure_json(export_path: Path | str, file_format: SaveFormat, fill_background: bool = False, folder_pattern: str | None = None, file_pattern: str | None = None, visible_layers_only: bool = True, all_images: bool = False, ignore_duplicates: bool = False, exclude_names: list[str] | None = None) -> None
¶
Save the current clip structure in json.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
export_path |
pathlib.Path | str
|
the JSON export path |
required |
file_format |
pytvpaint.george.grg_base.SaveFormat
|
file format to use for rendering |
required |
fill_background |
bool
|
add a background. Defaults to None. |
False
|
folder_pattern |
str | None
|
the folder name pattern (%li: layer index, %ln: layer name, %fi: file index (added in 11.0.8)). Defaults to None. |
None
|
file_pattern |
str | None
|
the file name pattern (%li: layer index, %ln: layer name, %ii: image index, %in: image name, %fi: file index (added in 11.0.8)). Defaults to None. |
None
|
visible_layers_only |
bool
|
export only visible layers. Defaults to None. |
True
|
all_images |
bool
|
export all images. Defaults to None. |
False
|
ignore_duplicates |
bool
|
Ignore duplicates images. Defaults to None. |
False
|
exclude_names |
list[str] | None
|
the instances names which won't be processed/exported. Defaults to None. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
the parent folder doesn't exist |
Source code in pytvpaint/george/grg_clip.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 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 |
|
tv_clip_save_structure_psd(export_path: Path | str, mode: PSDSaveMode, image: int | None = None, mark_in: int | None = None, mark_out: int | None = None) -> None
¶
Save the current clip as a PSD.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
export_path |
pathlib.Path | str
|
description |
required |
mode |
pytvpaint.george.grg_clip.PSDSaveMode
|
all will export all layers to a single PSD |
required |
image |
int | None
|
will only export the given image. Defaults to None. |
None
|
mark_in |
int | None
|
start frame to render. Defaults to None. |
None
|
mark_out |
int | None
|
end frame to render. Defaults to None. |
None
|
Source code in pytvpaint/george/grg_clip.py
451 452 453 454 455 456 457 458 459 460 461 462 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 |
|
tv_clip_save_structure_csv(export_path: Path | str, all_images: bool | None = None, exposure_label: str | None = None) -> None
¶
Save the current clip as a CSV.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
export_path |
pathlib.Path | str
|
the .csv export path |
required |
all_images |
bool | None
|
export all images or only instances. Defaults to None. |
None
|
exposure_label |
str | None
|
give a label when the image is an exposure. Defaults to None. |
None
|
Source code in pytvpaint/george/grg_clip.py
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 |
|
tv_clip_save_structure_sprite(export_path: Path | str, layout: SpriteLayout | None = None, space: int | None = None) -> None
¶
Save the current clip as sprites in one image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
export_path |
pathlib.Path | str
|
the export path of the sprite image |
required |
layout |
pytvpaint.george.grg_base.SpriteLayout | None
|
the sprite layout. Defaults to None. |
None
|
space |
int | None
|
the space between each sprite in the image. Defaults to None. |
None
|
Source code in pytvpaint/george/grg_clip.py
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 |
|
tv_clip_save_structure_flix(export_path: Path | str, mark_in: int | None = None, mark_out: int | None = None, parameters_import: str | None = None, parameters_file: str | None = None, send: bool | None = None, original_file: str | Path | None = None) -> None
¶
Save the current clip for Flix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
export_path |
pathlib.Path | str
|
the .xml export path |
required |
mark_in |
int | None
|
the start frame to render. Defaults to None. |
None
|
mark_out |
int | None
|
the end frame to render. Defaults to None. |
None
|
parameters_import |
str | None
|
the attribute(s) of the global |
None
|
parameters_file |
str | None
|
the attribute(s) of each |
None
|
send |
bool | None
|
open a browser with the prefilled url. Defaults to None. |
None
|
original_file |
str | pathlib.Path | None
|
the original reference tvpp file path. Defaults to None. |
None
|
Source code in pytvpaint/george/grg_clip.py
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 596 597 |
|
tv_sound_clip_info(clip_id: int, track_index: int) -> TVPSound
¶
Get information about a soundtrack.
Source code in pytvpaint/george/grg_clip.py
600 601 602 603 604 |
|
tv_sound_clip_new(sound_path: Path | str) -> None
¶
Add a new soundtrack.
Source code in pytvpaint/george/grg_clip.py
607 608 609 610 611 612 |
|
tv_sound_clip_remove(track_index: int) -> None
¶
Remove a soundtrack.
Source code in pytvpaint/george/grg_clip.py
615 616 617 |
|
tv_sound_clip_reload(clip_id: int, track_index: int) -> None
¶
Reload a soundtrack from its file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clip_id |
int
|
the clip id (only works with |
required |
track_index |
int
|
the sound clip track index |
required |
Warning
this doesn't accept a proper clip id, only 0
seem to work for the current clip
Source code in pytvpaint/george/grg_clip.py
620 621 622 623 624 625 626 627 628 629 630 |
|
tv_sound_clip_adjust(track_index: int, mute: bool | None = None, volume: float | None = None, offset: float | None = None, fade_in_start: float | None = None, fade_in_stop: float | None = None, fade_out_start: float | None = None, fade_out_stop: float | None = None, color_index: int | None = None) -> None
¶
Change a soundtracks settings.
Source code in pytvpaint/george/grg_clip.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 |
|
tv_layer_image_get() -> int
¶
Get the current frame of the current clip.
Source code in pytvpaint/george/grg_clip.py
664 665 666 |
|
tv_layer_image(frame: int) -> None
¶
Set the current frame of the current clip.
Source code in pytvpaint/george/grg_clip.py
669 670 671 |
|