legacy_create
Create workflow moved from avalon-core repository.
Renamed classes and functions - 'Creator' -> 'LegacyCreator' - 'create' -> 'legacy_create'
LegacyCreator
Determine how assets are created
Source code in client/ayon_core/pipeline/create/legacy_create.py
17 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 46 47 48 49 50 51 52 53 54 55 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 |
|
apply_settings(project_settings)
classmethod
Apply AYON settings to a plugin class.
Source code in client/ayon_core/pipeline/create/legacy_create.py
45 46 47 48 49 50 51 52 53 54 55 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 |
|
get_dynamic_data(project_name, folder_entity, task_entity, variant, host_name)
classmethod
Return dynamic data for current Creator plugin.
By default return keys from dynamic_product_name_keys
attribute as mapping to keep formatted template unchanged.
dynamic_product_name_keys = ["my_key"]
---
output = {
"my_key": "{my_key}"
}
Dynamic keys may override default Creator keys (productType, task, folderPath, ...) but do it wisely if you need.
All of keys will be converted into 3 variants unchanged, capitalized and all upper letters. Because of that are all keys lowered.
This method can be modified to prefill some values just keep in mind it is class method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_name | str | Context's project name. | required |
folder_entity | dict[str, Any] | Folder entity. | required |
task_entity | dict[str, Any] | Task entity. | required |
variant | str | What is entered by user in creator tool. | required |
host_name | str | Name of host. | required |
Returns:
Name | Type | Description |
---|---|---|
dict | Fill data for product name template. |
Source code in client/ayon_core/pipeline/create/legacy_create.py
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 |
|
get_product_name(project_name, folder_entity, task_entity, variant, host_name=None)
classmethod
Return product name created with entered arguments.
Logic extracted from Creator tool. This method should give ability to get product name without the tool.
TODO: Maybe change variant
variable.
By default is output concatenated product type with variant.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_name | str | Context's project name. | required |
folder_entity | dict[str, Any] | Folder entity. | required |
task_entity | dict[str, Any] | Task entity. | required |
variant | str | What is entered by user in creator tool. | required |
host_name | str | Name of host. | None |
Returns:
Name | Type | Description |
---|---|---|
str | Formatted product name with entered arguments. Should match config's logic. |
Source code in client/ayon_core/pipeline/create/legacy_create.py
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 |
|
legacy_create(Creator, product_name, folder_path, options=None, data=None)
Create a new instance
Associate nodes with a product name and type. These nodes are later validated, according to their product type
, and integrated into the shared environment, relative their productName
.
Data relative each product type, along with default data, are imprinted into the resulting objectSet. This data is later used by extractors and finally asset browsers to help identify the origin of the asset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Creator | Creator | Class of creator. | required |
product_name | str | Name of product. | required |
folder_path | str | Folder path. | required |
options | dict | Additional options from GUI. | None |
data | dict | Additional data from GUI. | None |
Returns:
Type | Description |
---|---|
Name of instance |
Source code in client/ayon_core/pipeline/create/legacy_create.py
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 |
|