Project related George functions¶
Project related George functions and enums.
            TVPProject(id: str, path: Path, width: int, height: int, pixel_aspect_ratio: float, frame_rate: float, field_order: FieldOrder, start_frame: int)
  
  
      dataclass
  
¶
  TVPaint project info values.
          BackgroundMode
¶
  
          tv_background_get() -> tuple[BackgroundMode, tuple[RGBColor, RGBColor] | RGBColor | None]
¶
  Get the background mode of the project, and the color(s) if in color or check mode.
Returns:
| Name | Type | Description | 
|---|---|---|
mode |           
                pytvpaint.george.grg_project.BackgroundMode
           | 
          
             the background mode  | 
        
colors |           
                tuple[pytvpaint.george.grg_base.RGBColor, pytvpaint.george.grg_base.RGBColor] | pytvpaint.george.grg_base.RGBColor | None
           | 
          
             the background colors if any  | 
        
Source code in pytvpaint/george/grg_project.py
            54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76  |  | 
          tv_background_set(mode: BackgroundMode, color: tuple[RGBColor, RGBColor] | RGBColor | None = None) -> None
¶
  Set the background mode of the project.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
mode | 
          
                pytvpaint.george.grg_project.BackgroundMode
           | 
          
             color mode (None, checker or one color)  | 
          required | 
color | 
          
                tuple[pytvpaint.george.grg_base.RGBColor, pytvpaint.george.grg_base.RGBColor] | pytvpaint.george.grg_base.RGBColor | None
           | 
          
             None for None mode, RBGColor for one color, and tuple of RGBColors for checker  | 
          
                None
           | 
        
Source code in pytvpaint/george/grg_project.py
            79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97  |  | 
          tv_project_new(project_path: Path | str, width: int = 1920, height: int = 1080, pixel_aspect_ratio: float = 1.0, frame_rate: float = 24.0, field_order: FieldOrder = FieldOrder.NONE, start_frame: int = 1) -> str
¶
  Create a new project.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.GeorgeError
           | 
          
             if an error occurred during the project creation  | 
        
Source code in pytvpaint/george/grg_project.py
            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  |  | 
          tv_load_project(project_path: Path | str, silent: bool = False) -> str
¶
  Load a file as a project if possible or open Import panel.
Raises:
| Type | Description | 
|---|---|
                FileNotFoundError
           | 
          
             if the project file doesn't exist  | 
        
                pytvpaint.george.exceptions.GeorgeError
           | 
          
             if the provided file is in an invalid format  | 
        
Source code in pytvpaint/george/grg_project.py
            128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146  |  | 
          tv_save_project(project_path: Path | str) -> None
¶
  Save the current project as tvpp.
Source code in pytvpaint/george/grg_project.py
            149 150 151 152 153 154 155 156 157 158  |  | 
          tv_project_duplicate() -> None
¶
  Duplicate the current project.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.GeorgeError
           | 
          
             if an error occurred during the project creation.  | 
        
Source code in pytvpaint/george/grg_project.py
            161 162 163 164 165 166 167 168  |  | 
          tv_project_enum_id(position: int) -> str
¶
  Get the id of the project at the given position.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.GeorgeError
           | 
          
             if no project found at the provided position.  | 
        
Source code in pytvpaint/george/grg_project.py
            171 172 173 174 175 176 177 178  |  | 
          tv_project_current_id() -> str
¶
  Get the id of the current project.
Source code in pytvpaint/george/grg_project.py
            181 182 183  |  | 
          tv_project_info(project_id: str) -> TVPProject
¶
  Get info of the given project.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.NoObjectWithIdError
           | 
          
             if given an invalid project id  | 
        
Source code in pytvpaint/george/grg_project.py
            186 187 188 189 190 191 192 193 194 195 196 197 198 199  |  | 
          tv_get_project_name() -> str
¶
  Returns the save path of the current project.
Source code in pytvpaint/george/grg_project.py
            202 203 204  |  | 
          tv_project_select(project_id: str) -> str
¶
  Make the given project current.
Source code in pytvpaint/george/grg_project.py
            207 208 209  |  | 
          tv_project_close(project_id: str) -> None
¶
  Close the given project.
Source code in pytvpaint/george/grg_project.py
            212 213 214  |  | 
          tv_resize_project(width: int, height: int) -> None
¶
  Resize the current project.
Note
creates a resized copy of the project with a new id
Source code in pytvpaint/george/grg_project.py
            217 218 219 220 221 222 223  |  | 
          tv_resize_page(width: int, height: int, resize_opt: ResizeOption) -> None
¶
  Create a new resized project and close the current one.
Source code in pytvpaint/george/grg_project.py
            226 227 228  |  | 
          tv_get_width() -> int
¶
  Get the current project width.
Source code in pytvpaint/george/grg_project.py
            231 232 233  |  | 
          tv_get_height() -> int
¶
  Get the current project height.
Source code in pytvpaint/george/grg_project.py
            236 237 238  |  | 
          tv_ratio() -> float
¶
  Get the current project pixel aspect ratio.
Bug
Doesn't work and always returns an empty string
Source code in pytvpaint/george/grg_project.py
            241 242 243 244 245 246 247  |  | 
          tv_get_field() -> FieldOrder
¶
  Get the current project field mode.
Source code in pytvpaint/george/grg_project.py
            250 251 252  |  | 
          tv_project_save_sequence(export_path: Path | str, use_camera: bool = False, start: int | None = None, end: int | None = None) -> None
¶
  Save the current project.
Source code in pytvpaint/george/grg_project.py
            255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274  |  | 
          tv_project_render_camera(project_id: str) -> str
¶
  Render the given project's camera view to a new project.
Returns:
| Type | Description | 
|---|---|
                str
           | 
          
             the new project id  | 
        
Source code in pytvpaint/george/grg_project.py
            277 278 279 280 281 282 283 284 285 286 287  |  | 
          tv_frame_rate_get() -> tuple[float, float]
¶
  Get the framerate of the current project.
Source code in pytvpaint/george/grg_project.py
            290 291 292 293 294 295 296 297 298 299 300  |  | 
          tv_frame_rate_set(frame_rate: float, time_stretch: bool = False, preview: bool = False) -> None
¶
  Get the framerate of the current project.
Source code in pytvpaint/george/grg_project.py
            303 304 305 306 307 308 309 310 311 312 313  |  | 
          tv_frame_rate_project_set(frame_rate: float, time_stretch: bool = False) -> None
¶
  Set the framerate of the current project.
Source code in pytvpaint/george/grg_project.py
            316 317 318 319 320 321  |  | 
          tv_frame_rate_preview_set(frame_rate: float) -> None
¶
  Set the framerate of the preview (playback).
Source code in pytvpaint/george/grg_project.py
            324 325 326  |  | 
          tv_project_current_frame_get() -> int
¶
  Get the current frame of the current project.
Source code in pytvpaint/george/grg_project.py
            329 330 331  |  | 
          tv_project_current_frame_set(frame: int) -> int
¶
  Set the current frame of the current project.
Note
this is relative to the current clip markin
Source code in pytvpaint/george/grg_project.py
            334 335 336 337 338 339 340  |  | 
          tv_load_palette(palette_path: Path | str) -> None
¶
  Load a palette(s) from a file/directory.
Raises:
| Type | Description | 
|---|---|
                FileNotFoundError
           | 
          
             if palette was not found at the provided path  | 
        
Source code in pytvpaint/george/grg_project.py
            343 344 345 346 347 348 349 350 351 352  |  | 
          tv_save_palette(palette_path: Path | str) -> None
¶
  Save the current palette.
Raises:
| Type | Description | 
|---|---|
                FileNotFoundError
           | 
          
             if palette save directory doesn't exist  | 
        
Source code in pytvpaint/george/grg_project.py
            355 356 357 358 359 360 361 362 363 364 365 366 367 368 369  |  | 
          tv_project_save_video_dependencies(project_id: str, on_save: bool = True, now: bool = False) -> int
¶
  Saves current project video dependencies.
Source code in pytvpaint/george/grg_project.py
            372 373 374 375 376 377 378 379 380 381  |  | 
          tv_project_save_audio_dependencies(project_id: str, on_save: bool = True) -> int
¶
  Saves current project audio dependencies.
Source code in pytvpaint/george/grg_project.py
            384 385 386 387 388 389 390 391 392 393  |  | 
          tv_sound_project_info(project_id: str, track_index: int) -> TVPSound
¶
  Get information about a project soundtrack.
Source code in pytvpaint/george/grg_project.py
            396 397 398 399 400 401 402  |  | 
          tv_sound_project_new(sound_path: Path | str) -> None
¶
  Add a new soundtrack to the current project.
Source code in pytvpaint/george/grg_project.py
            405 406 407 408 409 410 411  |  | 
          tv_sound_project_remove(track_index: int) -> None
¶
  Remove a soundtrack from the current project.
Source code in pytvpaint/george/grg_project.py
            414 415 416  |  | 
          tv_sound_project_reload(project_id: str, track_index: int) -> None
¶
  Reload a project soundtracks file.
Source code in pytvpaint/george/grg_project.py
            419 420 421 422 423 424 425 426  |  | 
          tv_sound_project_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 the current project's soundtrack settings.
Source code in pytvpaint/george/grg_project.py
            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  |  | 
          tv_project_header_info_get(project_id: str) -> str
¶
  Get the project header info.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.NoObjectWithIdError
           | 
          
             if given an invalid project id  | 
        
Source code in pytvpaint/george/grg_project.py
            460 461 462 463 464 465 466 467 468 469 470 471 472 473 474  |  | 
          tv_project_header_info_set(project_id: str, text: str) -> None
¶
  Set the project header info.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.NoObjectWithIdError
           | 
          
             if given an invalid project id  | 
        
Source code in pytvpaint/george/grg_project.py
            477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492  |  | 
          tv_project_header_author_get(project_id: str) -> str
¶
  Get the project author info.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.NoObjectWithIdError
           | 
          
             if given an invalid project id  | 
        
Source code in pytvpaint/george/grg_project.py
            495 496 497 498 499 500 501 502 503 504 505 506 507 508 509  |  | 
          tv_project_header_author_set(project_id: str, text: str) -> None
¶
  Set the project author info.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.NoObjectWithIdError
           | 
          
             if given an invalid project id  | 
        
Source code in pytvpaint/george/grg_project.py
            512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527  |  | 
          tv_project_header_notes_get(project_id: str) -> str
¶
  Get the project notes.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.NoObjectWithIdError
           | 
          
             if given an invalid project id  | 
        
Source code in pytvpaint/george/grg_project.py
            530 531 532 533 534 535 536 537 538 539 540 541 542 543 544  |  | 
          tv_project_header_notes_set(project_id: str, text: str) -> None
¶
  Set the project notes.
Raises:
| Type | Description | 
|---|---|
                pytvpaint.george.exceptions.NoObjectWithIdError
           | 
          
             if given an invalid project id  | 
        
Source code in pytvpaint/george/grg_project.py
            547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562  |  | 
          tv_start_frame_get() -> int
¶
  Get the start frame of the current project.
Source code in pytvpaint/george/grg_project.py
            565 566 567  |  | 
          tv_start_frame_set(start_frame: int) -> int
¶
  Set the start frame of the current project.
Source code in pytvpaint/george/grg_project.py
            570 571 572  |  |