Skip to content

publish_plugins

CollectUSDLayerContributionsProfileModel

Bases: BaseSettingsModel

Profiles to define instance attribute defaults for USD contribution.

Source code in server/settings/publish_plugins.py
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
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
126
127
128
129
130
131
132
133
class CollectUSDLayerContributionsProfileModel(BaseSettingsModel):
    """Profiles to define instance attribute defaults for USD contribution."""
    _layout = "expanded"
    product_types: list[str] = SettingsField(
        default_factory=list,
        title="Product types",
        description=(
            "The product types to match this profile to. When matched, the"
            " settings below would apply to the instance as default"
            " attributes."
        ),
        section="Filter"
    )
    task_types: list[str] = SettingsField(
        default_factory=list,
        title="Task Types",
        enum_resolver=task_types_enum,
        description=(
            "The current create context task type to filter against. This"
            " allows to filter the profile to only be valid if currently "
            " creating from within that task type."
        ),
    )
    contribution_enabled: bool = SettingsField(
        True,
        title="Contribution Enabled (default)",
        description=(
            "The default state for USD Contribution being marked enabled or"
            " disabled for this profile."
        ),
        section="Instance attribute defaults",
    )
    contribution_layer: str = SettingsField(
        "",
        title="Contribution Department Layer",
        description=(
            "The default contribution layer to apply the contribution to when"
            " matching this profile. The layer name should be in the"
            " 'Department Layer Orders' list to get a sensible order."
        ),
    )
    contribution_apply_as_variant: bool = SettingsField(
        True,
        title="Apply as variant",
        description=(
            "The default 'Apply as variant' state for instances matching this"
            " profile. Usually enabled for asset contributions and disabled"
            " for shot contributions."
        ),
    )
    contribution_target_product: str = SettingsField(
        "usdAsset",
        title="Target Product",
        description=(
            "The default destination product name to apply the contribution to"
            " when matching this profile."
            " Usually e.g. 'usdAsset' or 'usdShot'."
        ),
    )

ExtractBurninDef

Bases: BaseSettingsModel

Source code in server/settings/publish_plugins.py
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
class ExtractBurninDef(BaseSettingsModel):
    _isGroup = True
    _layout = "expanded"
    name: str = SettingsField("")
    TOP_LEFT: str = SettingsField("", title="Top Left")
    TOP_CENTERED: str = SettingsField("", title="Top Centered")
    TOP_RIGHT: str = SettingsField("", title="Top Right")
    BOTTOM_LEFT: str = SettingsField("", title="Bottom Left")
    BOTTOM_CENTERED: str = SettingsField("", title="Bottom Centered")
    BOTTOM_RIGHT: str = SettingsField("", title="Bottom Right")
    filter: ExtractBurninDefFilter = SettingsField(
        default_factory=ExtractBurninDefFilter,
        title="Additional filtering"
    )

    @validator("name")
    def validate_name(cls, value):
        """Ensure name does not contain weird characters"""
        return normalize_name(value)

validate_name(value)

Ensure name does not contain weird characters

Source code in server/settings/publish_plugins.py
727
728
729
730
@validator("name")
def validate_name(cls, value):
    """Ensure name does not contain weird characters"""
    return normalize_name(value)

ExtractReviewOutputDefModel

Bases: BaseSettingsModel

Source code in server/settings/publish_plugins.py
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
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
class ExtractReviewOutputDefModel(BaseSettingsModel):
    _layout = "expanded"
    name: str = SettingsField("", title="Name")
    ext: str = SettingsField("", title="Output extension")
    # TODO use some different source of tags
    tags: list[str] = SettingsField(default_factory=list, title="Tags")
    burnins: list[str] = SettingsField(
        default_factory=list, title="Link to a burnin by name"
    )
    ffmpeg_args: ExtractReviewFFmpegModel = SettingsField(
        default_factory=ExtractReviewFFmpegModel,
        title="FFmpeg arguments"
    )
    filter: ExtractReviewFilterModel = SettingsField(
        default_factory=ExtractReviewFilterModel,
        title="Additional output filtering"
    )
    overscan_crop: str = SettingsField(
        "",
        title="Overscan crop",
        description=(
            "Crop input overscan. See the documentation for more information."
        )
    )
    overscan_color: ColorRGBA_uint8 = SettingsField(
        (0, 0, 0, 0.0),
        title="Overscan color",
        description=(
            "Overscan color is used when input aspect ratio is not"
            " same as output aspect ratio."
        )
    )
    # overscan_color: ColorRGB_uint8 = SettingsField(
    #     (0, 0, 0),
    #     title="Overscan color",
    #     description=(
    #         "Overscan color is used when input aspect ratio is not"
    #         " same as output aspect ratio."
    #     )
    # )
    width: int = SettingsField(
        0,
        ge=0,
        le=100000,
        title="Output width",
        description=(
            "Width and Height must be both set to higher"
            " value than 0 else source resolution is used."
        )
    )
    height: int = SettingsField(
        0,
        title="Output height",
        ge=0,
        le=100000,
    )
    scale_pixel_aspect: bool = SettingsField(
        True,
        title="Scale pixel aspect",
        description=(
            "Rescale input when it's pixel aspect ratio is not 1."
            " Useful for anamorphic reviews."
        )
    )
    bg_color: ColorRGBA_uint8 = SettingsField(
        (0, 0, 0, 0.0),
        description=(
            "Background color is used only when input have transparency"
            " and Alpha is higher than 0."
        ),
        title="Background color",
    )
    letter_box: ExtractReviewLetterBox = SettingsField(
        default_factory=ExtractReviewLetterBox,
        title="Letter Box"
    )

    @validator("name")
    def validate_name(cls, value):
        """Ensure name does not contain weird characters"""
        return normalize_name(value)

validate_name(value)

Ensure name does not contain weird characters

Source code in server/settings/publish_plugins.py
646
647
648
649
@validator("name")
def validate_name(cls, value):
    """Ensure name does not contain weird characters"""
    return normalize_name(value)

IntegrateProductGroupModel

Bases: BaseSettingsModel

Group published products by filtering logic.

Set all published instances as a part of specific group named according to 'Template'.

Implemented all variants of placeholders '{task}', '{product[type]}', '{host}', '{product[name]}', '{renderlayer}'.

Source code in server/settings/publish_plugins.py
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
class IntegrateProductGroupModel(BaseSettingsModel):
    """Group published products by filtering logic.

    Set all published instances as a part of specific group named according
     to 'Template'.

    Implemented all variants of placeholders '{task}', '{product[type]}',
    '{host}', '{product[name]}', '{renderlayer}'.
    """

    _isGroup = True
    product_grouping_profiles: list[IntegrateProductGroupProfile] = (
        SettingsField(
            default_factory=list,
            title="Product group profiles"
        )
    )

PreIntegrateThumbnailsModel

Bases: BaseSettingsModel

Explicitly set if Thumbnail representation should be integrated.

If no matching profile set, existing state from Host implementation is kept.

Source code in server/settings/publish_plugins.py
804
805
806
807
808
809
810
811
812
813
814
815
816
class PreIntegrateThumbnailsModel(BaseSettingsModel):
    """Explicitly set if Thumbnail representation should be integrated.

    If no matching profile set, existing state from Host implementation
    is kept.
    """

    _isGroup = True
    enabled: bool = SettingsField(True)
    integrate_profiles: list[PreIntegrateThumbnailsProfile] = SettingsField(
        default_factory=list,
        title="Integrate profiles"
    )

ValidateIntentModel

Bases: BaseSettingsModel

Validate if Publishing intent was selected.

It is possible to disable validation for specific publishing context with profiles.

Source code in server/settings/publish_plugins.py
206
207
208
209
210
211
212
213
214
215
class ValidateIntentModel(BaseSettingsModel):
    """Validate if Publishing intent was selected.

    It is possible to disable validation for specific publishing context
    with profiles.
    """

    _isGroup = True
    enabled: bool = SettingsField(False)
    profiles: list[ValidateIntentProfile] = SettingsField(default_factory=list)