Skip to content

publishers

ExtractMayaSceneRawModel

Bases: BaseSettingsModel

Add loaded instances to those published families:

Source code in server/settings/publishers.py
546
547
548
549
550
551
class ExtractMayaSceneRawModel(BaseSettingsModel):
    """Add loaded instances to those published families:"""
    enabled: bool = SettingsField(title="ExtractMayaSceneRaw")
    add_for_families: list[str] = SettingsField(
        default_factory=list, title="Families"
    )

ValidateMeshUVSetMap1Model

Bases: BasicValidateModel

Validate model's default uv set exists and is named 'map1'.

Source code in server/settings/publishers.py
87
88
89
class ValidateMeshUVSetMap1Model(BasicValidateModel):
    """Validate model's default uv set exists and is named 'map1'."""
    pass

ValidateNoAnimationModel

Bases: BasicValidateModel

Ensure no keyframes on nodes in the Instance.

Source code in server/settings/publishers.py
92
93
94
class ValidateNoAnimationModel(BasicValidateModel):
    """Ensure no keyframes on nodes in the Instance."""
    pass

ValidatePluginPathAttributesModel

Bases: BaseSettingsModel

Fill in the node types and attributes you want to validate.

e.g. AlembicNode.abc_file, the node type is AlembicNode and the node attribute is abc_file

Source code in server/settings/publishers.py
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
class ValidatePluginPathAttributesModel(BaseSettingsModel):
    """Fill in the node types and attributes you want to validate.

    <p>e.g. <b>AlembicNode.abc_file</b>, the node type is <b>AlembicNode</b>
    and the node attribute is <b>abc_file</b>
    """

    enabled: bool = SettingsField(title="Enabled")
    optional: bool = SettingsField(title="Optional")
    active: bool = SettingsField(title="Active")
    attribute: list[ValidatePluginPathAttributesAttrModel] = SettingsField(
        default_factory=list,
        title="File Attribute"
    )

    @validator("attribute")
    def validate_unique_outputs(cls, value):
        ensure_unique_names(value)
        return value

ValidateShaderNameModel

Bases: BaseSettingsModel

Shader name regex can use named capture group asset to validate against current asset name.

Source code in server/settings/publishers.py
188
189
190
191
192
193
194
195
196
197
198
class ValidateShaderNameModel(BaseSettingsModel):
    """
    Shader name regex can use named capture group asset to validate against current asset name.
    """
    enabled: bool = SettingsField(title="ValidateShaderName")
    optional: bool = SettingsField(title="Optional")
    active: bool = SettingsField(title="Active")
    regex: str = SettingsField(
        "(?P<asset>.*)_(.*)_SHD",
        title="Validation regex"
    )

angular_unit_enum()

Get angular units enumerator.

Source code in server/settings/publishers.py
29
30
31
32
33
34
def angular_unit_enum():
    """Get angular units enumerator."""
    return [
        {"label": "degree", "value": "deg"},
        {"label": "radian", "value": "rad"},
    ]

linear_unit_enum()

Get linear units enumerator.

Source code in server/settings/publishers.py
15
16
17
18
19
20
21
22
23
24
25
26
def linear_unit_enum():
    """Get linear units enumerator."""
    return [
        {"label": "millimeter", "value": "mm"},
        {"label": "centimeter", "value": "cm"},
        {"label": "meter", "value": "m"},
        {"label": "kilometer", "value": "km"},
        {"label": "inch", "value": "in"},
        {"label": "foot", "value": "ft"},
        {"label": "yard", "value": "yd"},
        {"label": "mile", "value": "mi"}
    ]