utils
Use xstudio to open images and movies in the browser / loader UI.
XStudioExecutableCache
Simple cache for app paths.
Source code in client/ayon_xstudio/utils.py
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 | |
__init__()
Initialize instance.
Source code in client/ayon_xstudio/utils.py
86 87 88 89 90 | |
get_path()
Get path to xStudio executable.
Returns:
| Type | Description |
|---|---|
Optional[str] | Union[str, None]: Path to xStudio executable or None. |
Source code in client/ayon_xstudio/utils.py
115 116 117 118 119 120 121 122 123 | |
get_paths()
Get all paths to xStudio executable from settings.
Returns:
| Type | Description |
|---|---|
Optional[List[str]] | list[str]: Path to xStudio executables. |
Source code in client/ayon_xstudio/utils.py
104 105 106 107 108 109 110 111 112 113 | |
is_cache_valid()
Cache is valid.
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if cache is valid, False otherwise. |
Source code in client/ayon_xstudio/utils.py
92 93 94 95 96 97 98 99 100 101 102 | |
get_base_xstudio_icon_url()
Get the base URL for the xStudio icon.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | The base URL for the xStudio icon. |
Source code in client/ayon_xstudio/utils.py
16 17 18 19 20 21 22 | |
get_xstudio_executable_path(paths=None, addon_settings=None)
Get the xStudio executable path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
paths | Optional[List[str]] | Optional list of paths to check. | None |
addon_settings | Optional[Dict[str, Any]] | Optional addon settings dictionary. | None |
Returns:
| Type | Description |
|---|---|
Optional[str] | Optional[str]: Path to xStudio executable or None if not found. |
Source code in client/ayon_xstudio/utils.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
get_xstudio_icon_url(server_url=None)
Get the full URL for the xStudio icon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
server_url | Optional[str] | Optional server URL. If not provided, uses the default. | None |
Returns:
| Name | Type | Description |
|---|---|---|
str | str | The full URL for the xStudio icon. |
Source code in client/ayon_xstudio/utils.py
25 26 27 28 29 30 31 32 33 34 35 | |
get_xstudio_paths_from_settings(addon_settings=None)
Get xStudio paths from addon settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
addon_settings | Optional[Dict[str, Any]] | Optional addon settings dictionary. | None |
Returns:
| Type | Description |
|---|---|
List[str] | List[str]: List of xStudio paths. |
Source code in client/ayon_xstudio/utils.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |