Skip to content

main

FtrackServiceSettings

Bases: BaseSettingsModel

ftrack service cares about handling ftrack event and synchronization.

To be able do that work it is required to listen and process events as one of ftrack users. It is recommended to use special user for that purposes so you can see which changes happened from service.

Source code in server/settings/main.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class FtrackServiceSettings(BaseSettingsModel):
    """ftrack service cares about handling ftrack event and synchronization.

    To be able do that work it is required to listen and process events as one
    of ftrack users. It is recommended to use special user for that purposes
    so you can see which changes happened from service.
    """

    username: str = SettingsField(
        enum_resolver=secrets_enum,
        title="ftrack user name"
    )
    api_key: str = SettingsField(
        enum_resolver=secrets_enum,
        title="ftrack API key"
    )

FtrackSettings

Bases: BaseSettingsModel

ftrack addon settings.

Source code in server/settings/main.py
 72
 73
 74
 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
class FtrackSettings(BaseSettingsModel):
    """ftrack addon settings."""

    enabled: bool = SettingsField(True)
    ftrack_server: str = SettingsField(
        "",
        title="ftrack server url",
        scope=["studio"],
    )
    service_settings: FtrackServiceSettings = SettingsField(
        default_factory=FtrackServiceSettings,
        title="Service settings",
        scope=["studio"],
    )

    service_event_handlers: FtrackServiceHandlers = SettingsField(
        default_factory=FtrackServiceHandlers,
        title="Server Actions/Events",
    )
    post_launch_hook: PostLaunchHookSettings = SettingsField(
        default_factory=PostLaunchHookSettings,
        title="Status change on application launch"
    )
    user_handlers: FtrackDesktopAppHandlers = SettingsField(
        default_factory=FtrackDesktopAppHandlers,
        title="User Actions/Events",
    )
    publish: FtrackPublishPlugins = SettingsField(
        default_factory=FtrackPublishPlugins,
        title="Publish plugins"
    )
    custom_attributes: CustomAttributesModel = SettingsField(
        title="Custom Attributes",
        default_factory=CustomAttributesModel,
        scope=["studio"],
    )

PostLaunchHookSettings

Bases: BaseSettingsModel

Change task status on application launch.

Change of status is based on mapping. Each item in mapping defines new status which is used based on current status(es). Special value for current statuses is __any__, in that case the new status is always used. And if new status name is __ignore__, the change of status is skipped if current status is in current statuses list.

Source code in server/settings/main.py
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class PostLaunchHookSettings(BaseSettingsModel):
    """Change task status on application launch.

    Change of status is based on mapping. Each item in mapping defines new
    status which is used based on current status(es). Special value for current
    statuses is `__any__`, in that case the new status is always used. And if
    new status name is `__ignore__`, the change of status is skipped if current
    status is in current statuses list.
    """

    enabled: bool = True
    mapping: list[PostLaunchHookMapping] = SettingsField(default_factory=list)

    @validator("mapping")
    def ensure_unique_names(cls, value):
        """Ensure name fields within the lists have unique names."""

        ensure_unique_names(value)
        return value

ensure_unique_names(value)

Ensure name fields within the lists have unique names.

Source code in server/settings/main.py
64
65
66
67
68
69
@validator("mapping")
def ensure_unique_names(cls, value):
    """Ensure name fields within the lists have unique names."""

    ensure_unique_names(value)
    return value