utils
ensure_addons_are_process_context_ready(process_context, addons_manager=None, exit_on_failure=True)
Ensure all enabled addons are ready to be used in the given context.
Call this method only in AYON launcher process and as first thing to avoid possible clashes with preparation. For example 'QApplication' should not be created.
Todos
Run all preparations and allow to "ignore" failed preparations. Right now single addon can block using certain actions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
process_context | ProcessContext | The context in which the addons should be prepared. | required |
addons_manager | Optional[AddonsManager] | The addons manager to use. If not provided, a new one will be created. | None |
exit_on_failure | bool | If True, the process will exit if an error occurs. Defaults to True. | True |
Returns:
Name | Type | Description |
---|---|---|
bool | bool | True if all addons are ready, False otherwise. |
Source code in client/ayon_core/addon/utils.py
71 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 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 145 146 147 148 149 150 151 152 153 154 155 |
|
ensure_addons_are_process_ready(addon_name, addon_version, project_name=None, headless=None, *, addons_manager=None, exit_on_failure=True, **kwargs)
Ensure all enabled addons are ready to be used in the given context.
Call this method only in AYON launcher process and as first thing to avoid possible clashes with preparation. For example 'QApplication' should not be created.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
addon_name | str | Addon name which triggered process. | required |
addon_version | str | Addon version which triggered process. | required |
project_name | Optional[str] | Project name. Can be filled in case process is triggered for specific project. Some addons can have different behavior based on project. Value is NOT autofilled. | None |
headless | Optional[bool] | Is process running in headless mode. Value is filled with value based on state set in AYON launcher. | None |
addons_manager | Optional[AddonsManager] | The addons manager to use. If not provided, a new one will be created. | None |
exit_on_failure | bool | If True, the process will exit if an error occurs. Defaults to True. | True |
kwargs | The keyword arguments to pass to the ProcessContext. | {} |
Returns:
Name | Type | Description |
---|---|---|
bool | bool | True if all addons are ready, False otherwise. |
Source code in client/ayon_core/addon/utils.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|