Skip to content

Guideline related George functions

Guideline related George functions.

GuidelineType

Bases: enum.Enum

All guideline types.

Attributes:

Name Type Description
IMAGE
LINE
SEGMENT
CIRCLE
ELLIPSE
GRID
MARKS
FIELD_CHART
ANIMATOR_FIELD
SAFE_AREA
VANISH_POINT_1
VANISH_POINT_2
VANISH_POINT_3

IMAGE = 'image' class-attribute instance-attribute

LINE = 'line' class-attribute instance-attribute

SEGMENT = 'segment' class-attribute instance-attribute

CIRCLE = 'circle' class-attribute instance-attribute

ELLIPSE = 'ellipse' class-attribute instance-attribute

GRID = 'grid' class-attribute instance-attribute

MARKS = 'marks' class-attribute instance-attribute

FIELD_CHART = 'fieldchart' class-attribute instance-attribute

ANIMATOR_FIELD = 'animatorfield' class-attribute instance-attribute

SAFE_AREA = 'safearea' class-attribute instance-attribute

VANISH_POINT_1 = 'vanishpoint1' class-attribute instance-attribute

VANISH_POINT_2 = 'vanishpoint2' class-attribute instance-attribute

VANISH_POINT_3 = 'vanishpoint3' class-attribute instance-attribute

FlipDirection

Bases: enum.Enum

Filp Direction.

Attributes:

Name Type Description
X
Y
XY

X = 'x' class-attribute instance-attribute

Y = 'y' class-attribute instance-attribute

XY = 'xy' class-attribute instance-attribute

NONE = 'none' class-attribute instance-attribute

GuidelineAlphaMode

Bases: enum.Enum

The alpha load mode.

Attributes:

Name Type Description
PREMULTIPLY
NO_PREMULTIPLY

PREMULTIPLY = 'premultiply' class-attribute instance-attribute

NO_PREMULTIPLY = 'nopremultiply' class-attribute instance-attribute

TVPGuidelineImage(position: int, path: Path, x: float, y: float, rotation: float, scale: float, flip: FlipDirection) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

path: Path instance-attribute

x: float instance-attribute

y: float instance-attribute

rotation: float instance-attribute

scale: float instance-attribute

flip: FlipDirection instance-attribute

TVPGuidelineLine(position: int, x: float, y: float, angle: float) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x: float instance-attribute

y: float instance-attribute

angle: float instance-attribute

TVPGuidelineSegment(position: int, x1: float, y1: float, x2: float, y2: float) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x1: float instance-attribute

y1: float instance-attribute

x2: float instance-attribute

y2: float instance-attribute

TVPGuidelineCircle(position: int, x: float, y: float, radius: float) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x: float instance-attribute

y: float instance-attribute

radius: float instance-attribute

TVPGuidelineEllipse(position: int, x: float, y: float, radius_a: float, radius_b: float) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x: float instance-attribute

y: float instance-attribute

radius_a: float instance-attribute

radius_b: float instance-attribute

TVPGuidelineGrid(position: int, x: float, y: float, width: float, height: float) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x: float instance-attribute

y: float instance-attribute

width: float = field(metadata={'alt_name': 'w'}) class-attribute instance-attribute

height: float = field(metadata={'alt_name': 'h'}) class-attribute instance-attribute

TVPGuidelineMarks(position: int, count_x: int, count_y: int) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

count_x: int = field(metadata={'alt_name': 'countx'}) class-attribute instance-attribute

count_y: int = field(metadata={'alt_name': 'county'}) class-attribute instance-attribute

TVPGuidelineSafeArea(position: int, sf_out: float, sf_in: float) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

sf_out: float = field(metadata={'alt_name': 'out'}) class-attribute instance-attribute

sf_in: float = field(metadata={'alt_name': 'in'}) class-attribute instance-attribute

TVPGuidelineVanishPoint1(position: int, x: float, y: float, ray: int, grid: bool) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x: float instance-attribute

y: float instance-attribute

ray: int instance-attribute

grid: bool instance-attribute

TVPGuidelineVanishPoint2(position: int, x1: float, y1: float, x2: float, y2: float, ray: int) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x1: float instance-attribute

y1: float instance-attribute

x2: float instance-attribute

y2: float instance-attribute

ray: int instance-attribute

TVPGuidelineVanishPoint3(position: int, x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, ray: int) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

x1: float instance-attribute

y1: float instance-attribute

x2: float instance-attribute

y2: float instance-attribute

x3: float instance-attribute

y3: float instance-attribute

ray: int instance-attribute

TVPGuideField(position: int) dataclass

TVPaint project info values.

position: int = field(metadata={'parsed': False}) class-attribute instance-attribute

tv_guideline_enum(position: int, guideline_type: GuidelineType) -> int

Check the existence of a guideline at the given position.

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_guideline.py
219
220
221
222
223
224
225
226
227
228
229
230
231
232
def tv_guideline_enum(position: int, guideline_type: GuidelineType) -> int:
    """Check the existence of a guideline at the given position.

    Raises:
        GeorgeError: if given an invalid scene id or clip position or elements have been removed
    """
    return int(
        send_cmd(
            "tv_GuidelineEnum",
            position,
            guideline_type.value,
            error_values=[-1, -2, GrgErrorValue.NONE],
        )
    )

tv_guideline_remove_all(guideline_type: GuidelineType) -> None

Removes all guidelines of the given type.

Source code in pytvpaint/george/grg_guideline.py
235
236
237
238
239
240
241
242
def tv_guideline_remove_all(guideline_type: GuidelineType) -> None:
    """Removes all guidelines of the given type."""
    send_cmd(
        "tv_GuidelineRemove",
        "all",
        guideline_type.value,
        error_values=[-1, -2],
    )

tv_guideline_remove(position: int, guideline_type: GuidelineType) -> None

Removes the guidelines at the given position and type.

Source code in pytvpaint/george/grg_guideline.py
245
246
247
248
249
250
251
252
def tv_guideline_remove(position: int, guideline_type: GuidelineType) -> None:
    """Removes the guidelines at the given position and type."""
    send_cmd(
        "tv_GuidelineRemove",
        guideline_type.value,
        position,
        error_values=[GrgErrorValue.NONE],
    )

tv_guideline_name_get(position: int) -> str

Get the name of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
255
256
257
258
259
260
261
262
263
def tv_guideline_name_get(position: int) -> str:
    """Get the name of the guideline at the given position."""
    return str(
        send_cmd(
            "tv_GuidelineName",
            position,
            error_values=[GrgErrorValue.ERROR],
        )
    ).strip()

tv_guideline_name_set(position: int, name: str) -> None

Set the name of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
266
267
268
269
270
271
272
273
def tv_guideline_name_set(position: int, name: str) -> None:
    """Set the name of the guideline at the given position."""
    send_cmd(
        "tv_GuidelineName",
        position,
        name,
        error_values=[GrgErrorValue.ERROR],
    )

tv_guideline_visibility_get(position: int, on_global: bool = False) -> bool

Get the visibility of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
276
277
278
279
280
281
282
283
284
285
286
def tv_guideline_visibility_get(position: int, on_global: bool = False) -> bool:
    """Get the visibility of the guideline at the given position."""
    return bool(
        int(
            send_cmd(
                "tv_GuidelineVisible",
                position if not on_global else "global",
                error_values=[-1, -2],
            )
        )
    )

tv_guideline_visibility_set(position: int, is_visible: bool, on_global: bool = False) -> None

Set the visibility of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
289
290
291
292
293
294
295
296
def tv_guideline_visibility_set(position: int, is_visible: bool, on_global: bool = False) -> None:
    """Set the visibility of the guideline at the given position."""
    send_cmd(
        "tv_GuidelineVisible",
        position if not on_global else "global",
        int(is_visible),
        error_values=[-1, -2],
    )

tv_guideline_visibility_set_all(guideline_type: GuidelineType | None, is_visible: bool, apply_all: bool = False) -> None

Set the visibility of the guideline of the given type or all of them regardless of type.

Parameters:

Name Type Description Default
guideline_type pytvpaint.george.grg_guideline.GuidelineType | None

the guideline type or None if apply_all is used.

required
is_visible bool

True to set as visible, False otherwise.

required
apply_all bool

True to apply to all guidelines regardless of type.

False
Source code in pytvpaint/george/grg_guideline.py
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
def tv_guideline_visibility_set_all(
    guideline_type: GuidelineType | None, is_visible: bool, apply_all: bool = False
) -> None:
    """Set the visibility of the guideline of the given type or all of them regardless of type.

    Args:
        guideline_type: the guideline type or None if `apply_all` is used.
        is_visible: True to set as visible, False otherwise.
        apply_all: True to apply to all guidelines regardless of type.
    """
    apply_to = "all" if apply_all or guideline_type is None else guideline_type.value

    send_cmd(
        "tv_GuidelineVisible",
        apply_to,
        int(is_visible),
        error_values=[-1, -2],
    )

tv_guideline_margin_get(position: int, on_global: bool = False) -> int

Get the margin of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
319
320
321
322
323
324
325
326
327
def tv_guideline_margin_get(position: int, on_global: bool = False) -> int:
    """Get the margin of the guideline at the given position."""
    return int(
        send_cmd(
            "tv_GuidelineMarge",
            position if not on_global else "global",
            error_values=[-1, -2],
        )
    )

tv_guideline_margin_set(position: int, margin: int) -> None

Set the margin of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
330
331
332
333
334
335
336
337
def tv_guideline_margin_set(position: int, margin: int) -> None:
    """Set the margin of the guideline at the given position."""
    send_cmd(
        "tv_GuidelineMarge",
        position,
        margin,
        error_values=[-1, -2],
    )

tv_guideline_margin_set_all(guideline_type: GuidelineType | None, margin: int, apply_all: bool = False) -> None

Set the margin of the guideline of the given type or all of them regardless of type.

Parameters:

Name Type Description Default
guideline_type pytvpaint.george.grg_guideline.GuidelineType | None

the guideline type or None if apply_all is used.

required
margin int

the margin to apply.

required
apply_all bool

True to apply to all guidelines regardless of type.

False
Source code in pytvpaint/george/grg_guideline.py
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
def tv_guideline_margin_set_all(guideline_type: GuidelineType | None, margin: int, apply_all: bool = False) -> None:
    """Set the margin of the guideline of the given type or all of them regardless of type.

    Args:
        guideline_type: the guideline type or None if `apply_all` is used.
        margin: the margin to apply.
        apply_all: True to apply to all guidelines regardless of type.
    """
    apply_to = "all" if apply_all or guideline_type is None else guideline_type.value

    send_cmd(
        "tv_GuidelineMarge",
        apply_to,
        margin,
        error_values=[-1, -2],
    )

tv_guideline_color_get(position: int, on_global: bool = False) -> RGBAColor

Get the color of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
358
359
360
361
362
363
364
365
366
def tv_guideline_color_get(position: int, on_global: bool = False) -> RGBAColor:
    """Get the color of the guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineColor",
        position if not on_global else "global",
        error_values=[-1, -2],
    )
    r, g, b, a = result.split()
    return RGBAColor(*[int(c) for c in (r, g, b, a)])

tv_guideline_color_set(position: int, color: RGBAColor) -> None

Set the color of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
369
370
371
372
373
374
375
376
377
378
379
def tv_guideline_color_set(position: int, color: RGBAColor) -> None:
    """Set the color of the guideline at the given position."""
    send_cmd(
        "tv_GuidelineColor",
        position,
        color.r,
        color.g,
        color.b,
        color.a,
        error_values=[-1, -2],
    )

tv_guideline_color_set_all(guideline_type: GuidelineType | None, color: RGBAColor, apply_all: bool = False) -> None

Set the color of the guideline of the given type or all of them regardless of type.

Parameters:

Name Type Description Default
guideline_type pytvpaint.george.grg_guideline.GuidelineType | None

the guideline type or None if apply_all is used.

required
color pytvpaint.george.grg_base.RGBAColor

the color to apply.

required
apply_all bool

True to apply to all guidelines regardless of type.

False
Source code in pytvpaint/george/grg_guideline.py
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
def tv_guideline_color_set_all(guideline_type: GuidelineType | None, color: RGBAColor, apply_all: bool = False) -> None:
    """Set the color of the guideline of the given type or all of them regardless of type.

    Args:
        guideline_type: the guideline type or None if `apply_all` is used.
        color: the color to apply.
        apply_all: True to apply to all guidelines regardless of type.
    """
    apply_to = "all" if apply_all or guideline_type is None else guideline_type.value

    send_cmd(
        "tv_GuidelineColor",
        apply_to,
        color.r,
        color.g,
        color.b,
        color.a,
        error_values=[-1, -2],
    )

tv_guideline_snap_get(position: int, on_global: bool = False) -> bool

Get the snap status of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
403
404
405
406
407
408
409
410
411
412
413
def tv_guideline_snap_get(position: int, on_global: bool = False) -> bool:
    """Get the snap status of the guideline at the given position."""
    return bool(
        int(
            send_cmd(
                "tv_GuidelineSnap",
                position if not on_global else "global",
                error_values=[-1, -2],
            )
        )
    )

tv_guideline_snap_set(position: int, snap: bool, on_global: bool = False) -> None

Set the guideline snap at the given position.

Source code in pytvpaint/george/grg_guideline.py
416
417
418
419
420
421
422
423
def tv_guideline_snap_set(position: int, snap: bool, on_global: bool = False) -> None:
    """Set the guideline snap at the given position."""
    send_cmd(
        "tv_GuidelineSnap",
        position if not on_global else "global",
        int(snap),
        error_values=[-1, -2],
    )

tv_guideline_snap_set_all(guideline_type: GuidelineType | None, snap: bool, apply_all: bool = False) -> None

Set the guideline snap for the given type or all of them regardless of type.

Parameters:

Name Type Description Default
guideline_type pytvpaint.george.grg_guideline.GuidelineType | None

the guideline type or None if apply_all is used.

required
snap bool

True to snap, False otherwise.

required
apply_all bool

True to apply to all guidelines regardless of type.

False
Source code in pytvpaint/george/grg_guideline.py
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
def tv_guideline_snap_set_all(guideline_type: GuidelineType | None, snap: bool, apply_all: bool = False) -> None:
    """Set the guideline snap for the given type or all of them regardless of type.

    Args:
        guideline_type: the guideline type or None if `apply_all` is used.
        snap: True to snap, False otherwise.
        apply_all: True to apply to all guidelines regardless of type.
    """
    apply_to = "all" if apply_all or guideline_type is None else guideline_type.value

    send_cmd(
        "tv_GuidelineSnap",
        apply_to,
        int(snap),
        error_values=[-1, -2],
    )

tv_guideline_collapse_get(position: int) -> bool

Get the collapse status of the guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
444
445
446
447
448
449
450
451
452
453
454
def tv_guideline_collapse_get(position: int) -> bool:
    """Get the collapse status of the guideline at the given position."""
    return bool(
        int(
            send_cmd(
                "tv_guidelineCollapse",
                position,
                error_values=[-1, -2],
            )
        )
    )

tv_guideline_collapse_set(position: int, collapse: bool) -> None

Set the guideline collapse at the given position.

Source code in pytvpaint/george/grg_guideline.py
457
458
459
460
461
462
463
464
def tv_guideline_collapse_set(position: int, collapse: bool) -> None:
    """Set the guideline collapse at the given position."""
    send_cmd(
        "tv_guidelineCollapse",
        position,
        int(collapse),
        error_values=[-1, -2],
    )

tv_guideline_add_image(img_path: Path | str | None = None, x: float | None = None, y: float | None = None, rotation: float | None = None, scale: float | None = None, flip: FlipDirection | None = None, alpha_mode: GuidelineAlphaMode | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
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
496
def tv_guideline_add_image(
    img_path: Path | str | None = None,
    x: float | None = None,
    y: float | None = None,
    rotation: float | None = None,
    scale: float | None = None,
    flip: FlipDirection | None = None,
    alpha_mode: GuidelineAlphaMode | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "path": img_path,
            "x": x,
            "y": y,
            "rotation": rotation,
            "scale": scale,
            "flip": flip.value if flip is not None else None,
            "alphamode": alpha_mode.value if alpha_mode is not None else None,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "image",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_image_get(position: int) -> TVPGuidelineImage

Get info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
499
500
501
502
503
504
505
506
507
508
509
def tv_guideline_modify_image_get(position: int) -> TVPGuidelineImage:
    """Get info for the image guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineImage)
    guideline["position"] = position
    return TVPGuidelineImage(**guideline)

tv_guideline_modify_image_set(position: int, img_path: Path | str | None = None, x: float | None = None, y: float | None = None, rotation: float | None = None, scale: float | None = None, flip: FlipDirection | None = None) -> None

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
def tv_guideline_modify_image_set(
    position: int,
    img_path: Path | str | None = None,
    x: float | None = None,
    y: float | None = None,
    rotation: float | None = None,
    scale: float | None = None,
    flip: FlipDirection | None = None,
) -> None:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "path": Path(img_path).as_posix() if img_path is not None else None,
            "x": x,
            "y": y,
            "rotation": rotation,
            "scale": scale,
            "flip": flip.value if flip is not None else None,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_line(x: float | None = None, y: float | None = None, angle: float | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
def tv_guideline_add_line(
    x: float | None = None,
    y: float | None = None,
    angle: float | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "angle": angle,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "line",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_line_get(position: int) -> TVPGuidelineLine

Get info for the line guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
565
566
567
568
569
570
571
572
573
574
575
def tv_guideline_modify_line_get(position: int) -> TVPGuidelineLine:
    """Get info for the line guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineLine)
    guideline["position"] = position
    return TVPGuidelineLine(**guideline)

tv_guideline_modify_line_set(position: int, x: float | None = None, y: float | None = None, angle: float | None = None) -> None

Set info for the line guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
def tv_guideline_modify_line_set(
    position: int,
    x: float | None = None,
    y: float | None = None,
    angle: float | None = None,
) -> None:
    """Set info for the line guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "angle": angle,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_segment(x1: float | None = None, y1: float | None = None, x2: float | None = None, y2: float | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
def tv_guideline_add_segment(
    x1: float | None = None,
    y1: float | None = None,
    x2: float | None = None,
    y2: float | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x1": x1,
            "y1": y1,
            "x2": x2,
            "y2": y2,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "segment",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_segment_get(position: int) -> TVPGuidelineSegment

Get info for the segment guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
627
628
629
630
631
632
633
634
635
636
637
def tv_guideline_modify_segment_get(position: int) -> TVPGuidelineSegment:
    """Get info for the segment guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineSegment)
    guideline["position"] = position
    return TVPGuidelineSegment(**guideline)

tv_guideline_modify_segment_set(position: int, x1: float | None = None, y1: float | None = None, x2: float | None = None, y2: float | None = None) -> None

Set info for the segment guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
def tv_guideline_modify_segment_set(
    position: int,
    x1: float | None = None,
    y1: float | None = None,
    x2: float | None = None,
    y2: float | None = None,
) -> None:
    """Set info for the segment guideline at the given position."""
    args = args_dict_to_list(
        {
            "x1": x1,
            "y1": y1,
            "x2": x2,
            "y2": y2,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_circle(x: float | None = None, y: float | None = None, radius: float | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
def tv_guideline_add_circle(
    x: float | None = None,
    y: float | None = None,
    radius: float | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "radius": radius,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "circle",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_circle_get(position: int) -> TVPGuidelineCircle

Get info for the circle guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
689
690
691
692
693
694
695
696
697
698
699
def tv_guideline_modify_circle_get(position: int) -> TVPGuidelineCircle:
    """Get info for the circle guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineCircle)
    guideline["position"] = position
    return TVPGuidelineCircle(**guideline)

tv_guideline_modify_circle_set(position: int, x: float | None = None, y: float | None = None, radius: float | None = None) -> None

Set info for the circle guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
def tv_guideline_modify_circle_set(
    position: int,
    x: float | None = None,
    y: float | None = None,
    radius: float | None = None,
) -> None:
    """Set info for the circle guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "radius": radius,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_ellipse(x: float | None = None, y: float | None = None, radius_a: float | None = None, radius_b: float | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.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
def tv_guideline_add_ellipse(
    x: float | None = None,
    y: float | None = None,
    radius_a: float | None = None,
    radius_b: float | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "radiusa": radius_a,
            "radiusb": radius_b,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "ellipse",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_ellipse_get(position: int) -> TVPGuidelineEllipse

Get info for the ellipse guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
751
752
753
754
755
756
757
758
759
760
761
def tv_guideline_modify_ellipse_get(position: int) -> TVPGuidelineEllipse:
    """Get info for the ellipse guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineEllipse)
    guideline["position"] = position
    return TVPGuidelineEllipse(**guideline)

tv_guideline_modify_ellipse_set(position: int, x: float | None = None, y: float | None = None, radius_a: float | None = None, radius_b: float | None = None) -> None

Set info for the ellipse guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
def tv_guideline_modify_ellipse_set(
    position: int,
    x: float | None = None,
    y: float | None = None,
    radius_a: float | None = None,
    radius_b: float | None = None,
) -> None:
    """Set info for the ellipse guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "radiusa": radius_a,
            "radiusb": radius_b,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_grid(x: float | None = None, y: float | None = None, width: float | None = None, height: float | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
def tv_guideline_add_grid(
    x: float | None = None,
    y: float | None = None,
    width: float | None = None,
    height: float | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "w": width,
            "h": height,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "grid",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_grid_get(position: int) -> TVPGuidelineGrid

Get info for the grid guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
815
816
817
818
819
820
821
822
823
824
825
def tv_guideline_modify_grid_get(position: int) -> TVPGuidelineGrid:
    """Get info for the grid guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineGrid)
    guideline["position"] = position
    return TVPGuidelineGrid(**guideline)

tv_guideline_modify_grid_set(position: int, x: float | None = None, y: float | None = None, width: float | None = None, height: float | None = None) -> None

Set info for the grid guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
def tv_guideline_modify_grid_set(
    position: int,
    x: float | None = None,
    y: float | None = None,
    width: float | None = None,
    height: float | None = None,
) -> None:
    """Set info for the grid guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "w": width,
            "h": height,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_marks(count_x: int | None = None, count_y: int | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
def tv_guideline_add_marks(
    count_x: int | None = None,
    count_y: int | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "countx": count_x,
            "county": count_y,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "marks",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_marks_get(position: int) -> TVPGuidelineMarks

Get info for the marks guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
875
876
877
878
879
880
881
882
883
884
885
def tv_guideline_modify_marks_get(position: int) -> TVPGuidelineMarks:
    """Get info for the marks guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineMarks)
    guideline["position"] = position
    return TVPGuidelineMarks(**guideline)

tv_guideline_modify_marks_set(position: int, count_x: int | None = None, count_y: int | None = None) -> None

Set info for the marks guideline at the given position.

Warning

function tv_GuidelineModify doesn't seem to work in tvpaint, values are never changed.

Source code in pytvpaint/george/grg_guideline.py
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
def tv_guideline_modify_marks_set(
    position: int,
    count_x: int | None = None,
    count_y: int | None = None,
) -> None:
    """Set info for the marks guideline at the given position.

    Warning:
        function `tv_GuidelineModify` doesn't seem to work in tvpaint, values are never changed.

    """
    log.warning("function `tv_GuidelineModify` doesn't seem to work in tvpaint, values are never changed.")
    args = args_dict_to_list(
        {
            "countx": count_x,
            "county": count_y,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_safe_area(sf_out: int | None = None, sf_in: int | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
def tv_guideline_add_safe_area(
    sf_out: int | None = None,
    sf_in: int | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "out": sf_out,
            "in": sf_in,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "safearea",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_safe_area_get(position: int) -> TVPGuidelineSafeArea

Get info for the safe area guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
937
938
939
940
941
942
943
944
945
946
947
def tv_guideline_modify_safe_area_get(position: int) -> TVPGuidelineSafeArea:
    """Get info for the safe area guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineSafeArea)
    guideline["position"] = position
    return TVPGuidelineSafeArea(**guideline)

tv_guideline_modify_safe_area_set(position: int, sf_out: float | None = None, sf_in: float | None = None) -> None

Set info for the safe area guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
def tv_guideline_modify_safe_area_set(
    position: int,
    sf_out: float | None = None,
    sf_in: float | None = None,
) -> None:
    """Set info for the safe area guideline at the given position."""
    args = args_dict_to_list(
        {
            "out": sf_out,
            "in": sf_in,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_vanish_point_1(x: float | None = None, y: float | None = None, grid: bool | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
def tv_guideline_add_vanish_point_1(
    x: float | None = None,
    y: float | None = None,
    grid: bool | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "grid": int(grid) if grid is not None else None,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "vanishpoint1",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_vanish_point_1_get(position: int) -> TVPGuidelineVanishPoint1

Get info for the vanish point 1 guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
def tv_guideline_modify_vanish_point_1_get(position: int) -> TVPGuidelineVanishPoint1:
    """Get info for the vanish point 1 guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineVanishPoint1)
    guideline["position"] = position
    return TVPGuidelineVanishPoint1(**guideline)

tv_guideline_modify_vanish_point_1_set(position: int, x: float | None = None, y: float | None = None, ray: int | None = None, grid: bool | None = None) -> None

Set info for the vanish point 1 guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
def tv_guideline_modify_vanish_point_1_set(
    position: int,
    x: float | None = None,
    y: float | None = None,
    ray: int | None = None,
    grid: bool | None = None,
) -> None:
    """Set info for the vanish point 1 guideline at the given position."""
    args = args_dict_to_list(
        {
            "x": x,
            "y": y,
            "ray": ray,
            "grid": int(grid) if grid is not None else None,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_vanish_point_2(x1: float | None = None, y1: float | None = None, x2: float | None = None, y2: float | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
def tv_guideline_add_vanish_point_2(
    x1: float | None = None,
    y1: float | None = None,
    x2: float | None = None,
    y2: float | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x1": x1,
            "y1": y1,
            "x2": x2,
            "y2": y2,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "vanishpoint2",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_vanish_point_2_get(position: int) -> TVPGuidelineVanishPoint2

Get info for the vanish point 2 guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
def tv_guideline_modify_vanish_point_2_get(position: int) -> TVPGuidelineVanishPoint2:
    """Get info for the vanish point 2 guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineVanishPoint2)
    guideline["position"] = position
    return TVPGuidelineVanishPoint2(**guideline)

tv_guideline_modify_vanish_point_2_set(position: int, x1: float | None = None, y1: float | None = None, x2: float | None = None, y2: float | None = None, ray: int | None = None) -> None

Set info for the vanish point 2 guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
def tv_guideline_modify_vanish_point_2_set(
    position: int,
    x1: float | None = None,
    y1: float | None = None,
    x2: float | None = None,
    y2: float | None = None,
    ray: int | None = None,
) -> None:
    """Set info for the vanish point 2 guideline at the given position."""
    args = args_dict_to_list(
        {
            "x1": x1,
            "y1": y1,
            "x2": x2,
            "y2": y2,
            "ray": ray,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_vanish_point_3(x1: float | None = None, y1: float | None = None, x2: float | None = None, y2: float | None = None, x3: float | None = None, y3: float | None = None) -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
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
1125
1126
def tv_guideline_add_vanish_point_3(
    x1: float | None = None,
    y1: float | None = None,
    x2: float | None = None,
    y2: float | None = None,
    x3: float | None = None,
    y3: float | None = None,
) -> int:
    """Set info for the image guideline at the given position."""
    args = args_dict_to_list(
        {
            "x1": x1,
            "y1": y1,
            "x2": x2,
            "y2": y2,
            "x3": x3,
            "y3": y3,
        }
    )

    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "vanishpoint3",
            *args,
            error_values=[-1, -2],
        )
    )

tv_guideline_modify_vanish_point_3_get(position: int) -> TVPGuidelineVanishPoint3

Get info for the vanish point 3 guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
def tv_guideline_modify_vanish_point_3_get(position: int) -> TVPGuidelineVanishPoint3:
    """Get info for the vanish point 3 guideline at the given position."""
    result = send_cmd(
        "tv_GuidelineModify",
        position,
        error_values=[-1, -2],
    )

    guideline: dict[str, Any] = tv_parse_dict(result, with_fields=TVPGuidelineVanishPoint3)
    guideline["position"] = position
    return TVPGuidelineVanishPoint3(**guideline)

tv_guideline_modify_vanish_point_3_set(position: int, x1: float | None = None, y1: float | None = None, x2: float | None = None, y2: float | None = None, x3: float | None = None, y3: float | None = None, ray: int | None = None) -> None

Set info for the vanish point 3 guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
def tv_guideline_modify_vanish_point_3_set(
    position: int,
    x1: float | None = None,
    y1: float | None = None,
    x2: float | None = None,
    y2: float | None = None,
    x3: float | None = None,
    y3: float | None = None,
    ray: int | None = None,
) -> None:
    """Set info for the vanish point 3 guideline at the given position."""
    args = args_dict_to_list(
        {
            "x1": x1,
            "y1": y1,
            "x2": x2,
            "y2": y2,
            "x3": x3,
            "y3": y3,
            "ray": ray,
        }
    )

    send_cmd(
        "tv_GuidelineModify",
        position,
        *args,
        error_values=[-1, -2],
    )

tv_guideline_add_field_chart() -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1173
1174
1175
1176
1177
1178
1179
1180
1181
def tv_guideline_add_field_chart() -> int:
    """Set info for the image guideline at the given position."""
    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "fieldchart",
            error_values=[-1, -2],
        )
    )

tv_guideline_add_animator_chart() -> int

Set info for the image guideline at the given position.

Source code in pytvpaint/george/grg_guideline.py
1184
1185
1186
1187
1188
1189
1190
1191
1192
def tv_guideline_add_animator_chart() -> int:
    """Set info for the image guideline at the given position."""
    return int(
        send_cmd(
            "tv_GuidelineAdd",
            "animatorfield",
            error_values=[-1, -2],
        )
    )