Skip to content

publish_plugins

CollectColorCodedInstancesPlugin

Bases: BaseSettingsModel

Set color for publishable layers, set its resulting product type and template for product name. Can create flatten image from published instances. (Applicable only for remote publishing!)

Source code in server/settings/publish_plugins.py
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
class CollectColorCodedInstancesPlugin(BaseSettingsModel):
    """Set color for publishable layers, set its resulting product type
    and template for product name. \n Can create flatten image from published
    instances.
    (Applicable only for remote publishing!)"""

    enabled: bool = SettingsField(True, title="Enabled")
    create_flatten_image: str = SettingsField(
        "",
        title="Create flatten image",
        enum_resolver=lambda: create_flatten_image_enum,
    )

    flatten_product_name_template: str = SettingsField(
        "",
        title="Product name template for flatten image"
    )

    color_code_mapping: list[ColorCodeMappings] = SettingsField(
        title="Color code mappings",
        default_factory=ColorCodeMappings,
    )

CollectReviewPlugin

Bases: BaseSettingsModel

Should review product be created

Source code in server/settings/publish_plugins.py
76
77
78
class CollectReviewPlugin(BaseSettingsModel):
    """Should review product be created"""
    enabled: bool = SettingsField(True, title="Enabled")

CollectVersionPlugin

Bases: BaseSettingsModel

Synchronize version for image and review instances by workfile version

Source code in server/settings/publish_plugins.py
81
82
83
class CollectVersionPlugin(BaseSettingsModel):
    """Synchronize version for image and review instances by workfile version"""  # noqa
    enabled: bool = SettingsField(True, title="Enabled")

ExtractImagePlugin

Bases: BaseSettingsModel

Currently only jpg and png are supported

Source code in server/settings/publish_plugins.py
 99
100
101
102
103
104
class ExtractImagePlugin(BaseSettingsModel):
    """Currently only jpg and png are supported"""
    formats: list[str] = SettingsField(
        title="Extract Formats",
        default_factory=list,
    )

ValidateNamingPlugin

Bases: BaseSettingsModel

Validate naming of products and layers

Source code in server/settings/publish_plugins.py
86
87
88
89
90
91
92
93
94
95
96
class ValidateNamingPlugin(BaseSettingsModel):
    """Validate naming of products and layers"""  # noqa
    invalid_chars: str = SettingsField(
        '',
        title="Regex pattern of invalid characters"
    )

    replace_char: str = SettingsField(
        '',
        title="Replacement character"
    )