Skip to content

UniversesBeyondClassTemplate

src.templates.classes.UniversesBeyondClassTemplate

Bases: ClassVectorTemplate

Saga Vector template with Universes Beyond frame treatment.

Source code in src\templates\classes.py
399
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
class UniversesBeyondClassTemplate(ClassVectorTemplate):
    """Saga Vector template with Universes Beyond frame treatment."""
    template_suffix = 'Universes Beyond'

    # Color Maps
    pinlines_color_map = {
        **pinlines_color_map.copy(),
        'W': [246, 247, 241],
        'U': [0, 131, 193],
        'B': [44, 40, 33],
        'R': [237, 66, 31],
        'G': [5, 129, 64],
        'Gold': [239, 209, 107],
        'Land': [165, 150, 132],
        'Artifact': [227, 228, 230],
        'Colorless': [227, 228, 230]
    }

    """
    * Colors
    """

    @auto_prop_cached
    def textbox_colors(self) -> list[str]:
        """list[str]: Support identity by color limit, fallback to pinline colors."""
        if self.is_within_color_limit:
            return [n for n in self.identity]
        return [self.pinlines]

    @auto_prop_cached
    def twins_colors(self) -> str:
        """str: Universes Beyond variant texture name."""
        return f'{self.twins} Beyond'

    """
    * Groups
    """

    @auto_prop_cached
    def background_group(self) -> LayerSet:
        """LayerSet: Universes Beyond variant group."""
        return psd.getLayerSet(f'{LAYERS.BACKGROUND} Beyond')

    @auto_prop_cached
    def textbox_group(self) -> LayerSet:
        """LayerSet: Universes Beyond variant group. Must be enabled."""
        group = psd.getLayerSet(f"{LAYERS.TEXTBOX} Beyond")
        group.visible = True
        return group

Attributes

pinlines_color_map = {None: pinlines_color_map.copy(), 'W': [246, 247, 241], 'U': [0, 131, 193], 'B': [44, 40, 33], 'R': [237, 66, 31], 'G': [5, 129, 64], 'Gold': [239, 209, 107], 'Land': [165, 150, 132], 'Artifact': [227, 228, 230], 'Colorless': [227, 228, 230]}

  • Colors

Functions

background_group() -> LayerSet

Source code in src\templates\classes.py
437
438
439
440
@auto_prop_cached
def background_group(self) -> LayerSet:
    """LayerSet: Universes Beyond variant group."""
    return psd.getLayerSet(f'{LAYERS.BACKGROUND} Beyond')

textbox_colors() -> list[str]

list[str]: Support identity by color limit, fallback to pinline colors.

Source code in src\templates\classes.py
421
422
423
424
425
426
@auto_prop_cached
def textbox_colors(self) -> list[str]:
    """list[str]: Support identity by color limit, fallback to pinline colors."""
    if self.is_within_color_limit:
        return [n for n in self.identity]
    return [self.pinlines]

textbox_group() -> LayerSet

Source code in src\templates\classes.py
442
443
444
445
446
447
@auto_prop_cached
def textbox_group(self) -> LayerSet:
    """LayerSet: Universes Beyond variant group. Must be enabled."""
    group = psd.getLayerSet(f"{LAYERS.TEXTBOX} Beyond")
    group.visible = True
    return group

twins_colors() -> str

Source code in src\templates\classes.py
428
429
430
431
@auto_prop_cached
def twins_colors(self) -> str:
    """str: Universes Beyond variant texture name."""
    return f'{self.twins} Beyond'