lib
get_background_layers(file_url)
Pulls file name from background json file, enrich with folder url for AE to be able import files.
Order is important, follows order in json.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_url | str | abs url of background json | required |
Returns:
| Type | Description |
|---|---|
list | of abs paths to images |
Source code in client/ayon_aftereffects/api/lib.py
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 | |
get_entity_attributes(entity)
Get attributes of folder or task entity.
Returns:
| Name | Type | Description |
|---|---|---|
dict | dict[str, Union[float, int]] | Scene data. |
Source code in client/ayon_aftereffects/api/lib.py
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 | |
get_unique_item_name(items, name)
Creates unique name for 'item'.
Gets all item names (compositions|containers) and if 'name' is present in them, increases suffix by 1 (eg. creates unique item name - for Loader)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items | list | of strings, names only | required |
name | string | checked value | required |
Returns:
| Type | Description |
|---|---|
string | name_00X (without version) |
Source code in client/ayon_aftereffects/api/lib.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
maintained_selection()
Maintain selection during context.
Source code in client/ayon_aftereffects/api/lib.py
48 49 50 51 52 53 54 55 | |
publish_in_test(log, close_plugin_name=None)
Loops through all plugins, logs to console. Used for tests.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
close_plugin_name | Optional[str] | Name of plugin with responsibility to close application. | None |
Source code in client/ayon_aftereffects/api/lib.py
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 | |
raise_window_to_front(window)
Raise a Qt window to the foreground. On Windows, activateWindow() is silently ignored when the calling process does not own the foreground (e.g. when triggered via the CEP panel). AttachThreadInput temporarily borrows the foreground thread's input state so SetForegroundWindow succeeds even on the first call, before Python has ever received focus. Args: window (QtWidgets.QWidget): Window to bring to the front.
Source code in client/ayon_aftereffects/api/lib.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
set_settings(frames, resolution, comp_ids=None, print_msg=True, entity=None)
Sets number of frames and resolution to selected comps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frames | bool | True if set frame info | required |
resolution | bool | True if set resolution | required |
comp_ids | list[int] | specific composition ids, if empty it tries to look for currently selected | None |
print_msg | bool | True throw JS alert with msg | True |
entity | Optional[dict] | Entity to use attributes from to define the frame range, fps and resolution from. If not provided, current task entity is used. | None |
Source code in client/ayon_aftereffects/api/lib.py
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 | |