scripts
ScriptItem dataclass
Resolved After Effects script item.
Attributes:
| Name | Type | Description |
|---|---|---|
script_id | str | Stable identifier for the configured script. |
name | str | Display name shown to the user. |
path | str | Resolved absolute path or unresolved raw path. |
auto | bool | Whether the script should run automatically on launch. |
exists | bool | Whether the script can be executed. |
error | str | None | Validation error when the script is not executable. |
Source code in client/ayon_aftereffects/api/scripts.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
ScriptRunResult dataclass
Execution result for a configured script.
Attributes:
| Name | Type | Description |
|---|---|---|
script_id | str | Stable identifier for the configured script. |
success | bool | Whether the script execution succeeded. |
message | str | User-facing execution status. |
Source code in client/ayon_aftereffects/api/scripts.py
41 42 43 44 45 46 47 48 49 50 51 52 53 | |
ScriptService
Resolve and execute configured After Effects scripts.
Source code in client/ayon_aftereffects/api/scripts.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 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 156 157 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 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
list_items(auto=None)
Return resolved script items from project settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auto | bool | None | Optional auto/manual filter. When | None |
Returns:
| Type | Description |
|---|---|
list[ScriptItem] | Resolved script items in settings order. |
Source code in client/ayon_aftereffects/api/scripts.py
59 60 61 62 63 64 65 66 67 68 69 70 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 | |
list_manual_items()
Return scripts configured for manual execution.
Returns:
| Type | Description |
|---|---|
list[ScriptItem] | Manual script items. |
Source code in client/ayon_aftereffects/api/scripts.py
115 116 117 118 119 120 121 | |
resolve_path(path)
Resolve a templated script path against current AYON context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | Raw configured path. | required |
Returns:
| Type | Description |
|---|---|
tuple | Tuple of (TemplateResult, resolved path string). When the template |
tuple | is not fully solved, the second element is the original raw path. |
Source code in client/ayon_aftereffects/api/scripts.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
resolve_scripts(auto=True)
Resolve executable script paths.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auto | bool | Auto/manual filter. | True |
Returns:
| Type | Description |
|---|---|
list[str] | Ordered list of executable script paths. |
Source code in client/ayon_aftereffects/api/scripts.py
123 124 125 126 127 128 129 130 131 132 133 134 | |
run_item(item)
Run a resolved script item directly. Args: item: Already-resolved script item (e.g. from list_manual_items). Returns: Script execution result.
Source code in client/ayon_aftereffects/api/scripts.py
173 174 175 176 177 178 179 180 | |
run_scripts(auto=True)
Run all valid scripts for the requested mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auto | bool | Auto/manual filter. | True |
Source code in client/ayon_aftereffects/api/scripts.py
160 161 162 163 164 165 166 167 168 169 170 171 | |
get_script_service()
Return the singleton script service.
Returns:
| Type | Description |
|---|---|
ScriptService | Shared script service instance. |
Source code in client/ayon_aftereffects/api/scripts.py
258 259 260 261 262 263 264 | |
resolve_path(path)
Resolve a templated script path against current AYON context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | str | Raw configured path. | required |
Returns:
| Type | Description |
|---|---|
str | Resolved path, or the original path if resolution failed. |
Source code in client/ayon_aftereffects/api/scripts.py
279 280 281 282 283 284 285 286 287 288 289 | |
resolve_scripts(auto=True)
Resolve active script paths from project settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auto | bool | Auto/manual filter. | True |
Returns:
| Type | Description |
|---|---|
list[str] | Ordered list of executable script paths. |
Source code in client/ayon_aftereffects/api/scripts.py
267 268 269 270 271 272 273 274 275 276 | |
run_scripts(auto=True)
Run configured After Effects scripts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auto | bool | Auto/manual filter. | True |
Source code in client/ayon_aftereffects/api/scripts.py
292 293 294 295 296 297 298 | |