pipeline
Pipeline tools for Ayon Substance Designer integration.
MarvelousDesignerHost
Bases: HostBase, IWorkfileHost, ILoadHost, IPublishHost
Host class for Marvelous Designer integration with AYON pipeline.
This class provides the main interface between AYON and Marvelous Designer, implementing workfile operations, loading, and publishing functionality.
Attributes:
| Name | Type | Description |
|---|---|---|
name | str | The host name identifier. |
_has_been_setup | bool | Flag indicating if the host has been |
callbacks | list | List of registered callbacks. |
shelves | list | List of UI shelves. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
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 | |
__init__()
Initialize the Marvelous Designer host with default settings.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
58 59 60 61 62 63 | |
get_containers()
Get the list of containers in the current scene.
Returns:
| Name | Type | Description |
|---|---|---|
list | list | List of container metadata dictionaries. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
123 124 125 126 127 128 129 | |
get_context_data()
Get the context data from the current file metadata.
Returns:
| Name | Type | Description |
|---|---|---|
dict | dict | Context data dictionary. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
137 138 139 140 141 142 143 144 | |
get_current_workfile()
Get the current workfile path from the host.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | The current workfile path. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
115 116 117 118 119 120 121 | |
get_workfile_extensions()
Get the list of supported workfile extensions.
Returns:
| Type | Description |
|---|---|
list[str] | list[str]: List of supported workfile extensions. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
89 90 91 92 93 94 95 | |
install()
Install and register the MD host with Ayon pipeline.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
70 71 72 73 74 75 76 77 78 | |
open_workfile(filepath)
Open a workfile from the specified file path.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
111 112 113 | |
save_workfile(dst_path=None)
Save the current workfile to the specified destination path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dst_path | str | None | Destination path to save the workfile. Defaults to None. | None |
Returns:
| Type | Description |
|---|---|
str | None | str | None: The path where the workfile was saved, or None |
str | None | if saving failed. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
97 98 99 100 101 102 103 104 105 106 107 108 109 | |
show_tools_dialog() staticmethod
Show tools dialog with actions leading to show other tools.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
65 66 67 68 | |
update_context_data(data, changes)
Update the context data in the current file metadata.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
131 132 133 134 135 | |
workfile_has_unsaved_changes()
Check if the current workfile has unsaved changes.
Returns:
| Name | Type | Description |
|---|---|---|
bool | bool | True if there are unsaved changes, False otherwise. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
80 81 82 83 84 85 86 87 | |
containerise(name, namespace, context, loader, options=None)
Imprint a loaded container with metadata.
Containerisation enables a tracking of version, author and origin for loaded assets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name | str | Name of resulting assembly | required |
namespace | str | Namespace under which to host container | required |
context | dict | Asset information | required |
loader | LoaderPlugin | loader instance used to produce container. | required |
options | dict | options | None |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
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 | |
get_ayon_metadata()
Get AYON relevant metadata from current file.
Returns:
| Name | Type | Description |
|---|---|---|
dict | dict | AYON metadata as a dictionary. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
236 237 238 239 240 241 242 243 244 | |
get_current_workfile()
Get the current file path from the host.
Returns:
| Name | Type | Description |
|---|---|---|
str | str | The current workfile path. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
226 227 228 229 230 231 232 233 | |
get_instances()
Retrieve all stored instances from the project settings.
Returns:
| Name | Type | Description |
|---|---|---|
dict | dict | Dictionary of stored instances from the project settings. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
247 248 249 250 251 252 253 254 | |
get_instances_values()
Retrieve all stored instances from the project settings.
Returns:
| Name | Type | Description |
|---|---|---|
list | list | List of all instance values from the project settings. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
257 258 259 260 261 262 263 264 | |
imprint(object_name, data)
Imprint metadata onto an object in the scene.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_name | str | Name of the object to imprint metadata on. | required |
data | dict | Metadata to imprint. | required |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
ls()
List all AYON containers in the current file metadata.
Returns:
| Name | Type | Description |
|---|---|---|
list | list | List of AYON container metadata dictionaries. |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
267 268 269 270 271 272 273 274 | |
open_workfile(filepath)
Open a workfile from the specified file path.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
324 325 326 327 | |
remove_container_data(object_name)
Remove container data for a specific object in the scene.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
object_name | str | Name of the object whose container data is to be removed. | required |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
remove_instance(instance_id)
Helper method to remove the data for a specific container.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
311 312 313 314 315 | |
save_workfile(filepath)
Save the current workfile to the specified file path.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
318 319 320 321 | |
set_instance(instance_id, instance_data, *, update=False)
Set a single instance into the current file metadata.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
286 287 288 289 | |
set_instances(instance_data_by_id, *, update=False)
Set multiple instances into the current file metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance_data_by_id | dict | instance data mapped by their IDs | required |
update | bool | Whether to update existing instances. | False |
Source code in client/ayon_marvelousdesigner/api/pipeline.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
set_metadata(data_type, data)
Set instance data into the current file metadata.
Source code in client/ayon_marvelousdesigner/api/pipeline.py
277 278 279 280 281 282 283 | |