Skip to content

publishers

ExtractMayaSceneRawModel

Bases: BaseSettingsModel

Add loaded instances to those published families:

Source code in server/settings/publishers.py
553
554
555
556
557
558
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
73
74
75
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
78
79
80
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
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
186
187
188
189
190
191
192
193
194
195
196
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"
    )

up_axis_enum()

Get Up Axis enumerator.

Source code in server/settings/publishers.py
15
16
17
18
19
20
def up_axis_enum():
    """Get Up Axis enumerator."""
    return [
        {"label": "y", "value": "y"},
        {"label": "z", "value": "z"},
    ]