utils
get_addons_dir()
Directory where addon packages are stored.
Path to addons is defined using python module 'appdirs' which
The path is stored into environment variable 'AYON_ADDONS_DIR'. Value of environment variable can be overriden, but we highly recommended to use that option only for development purposes.
Returns:
| Name | Type | Description |
|---|---|---|
str | Path to directory where addons should be downloaded. |
Source code in common/ayon_common/distribution/utils.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
get_dependencies_dir()
Directory where dependency packages are stored.
Path to addons is defined using python module 'appdirs' which
The path is stored into environment variable 'AYON_DEPENDENCIES_DIR'. Value of environment variable can be overriden, but we highly recommended to use that option only for development purposes.
Returns:
| Name | Type | Description |
|---|---|---|
str | Path to directory where dependency packages should be downloaded. |
Source code in common/ayon_common/distribution/utils.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
show_installer_issue_information(message, installer_path=None)
Show a message that something went wrong during installer distribution.
This will trigger a subprocess with UI message dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message | str | Error message with description of an issue. | required |
installer_path | Optional[str] | Path to installer file so user can try to install it manually. | None |
Source code in common/ayon_common/distribution/utils.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
show_missing_bundle_information(url, bundle_name, username, is_project_bundle)
Show missing bundle information window.
This function should be called when server does not have set bundle for production or staging, or when bundle that should be used is not available on server.
Using subprocess to show the dialog. Is blocking and is waiting until dialog is closed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url | str | Server url where bundle is not set. | required |
bundle_name | Optional[str] | Name of bundle that was not found. Or 'None' if is missing bundle. | required |
username | Optional[str] | Username. Is used only when dev mode is enabled. | required |
is_project_bundle | bool | Missing bundle is project bundle. | required |
Source code in common/ayon_common/distribution/utils.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |