pipeline
Pipeline tools for OpenPype Substance Painter integration.
get_instances()
Return all instances stored in the project instances as a list
Source code in client/ayon_substancepainter/api/pipeline.py
424 425 426 |
|
get_instances_by_id()
Return all instances stored in the project instances metadata
Source code in client/ayon_substancepainter/api/pipeline.py
415 416 417 418 419 420 421 |
|
imprint_container(container, name, namespace, context, loader)
Imprint a loaded container with metadata.
Containerisation enables a tracking of version, author and origin for loaded assets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
container | dict | The (substance metadata) dictionary to imprint into. | required |
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 |
Returns:
Type | Description |
---|---|
None |
Source code in client/ayon_substancepainter/api/pipeline.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
|
remove_container_metadata(object_name)
Helper method to remove the data for a specific container
Source code in client/ayon_substancepainter/api/pipeline.py
369 370 371 372 373 374 375 |
|
remove_instance(instance_id)
Helper method to remove the data for a specific container
Source code in client/ayon_substancepainter/api/pipeline.py
407 408 409 410 411 412 |
|
set_container_metadata(object_name, container_data, update=False)
Helper method to directly set the data for a specific container
Parameters:
Name | Type | Description | Default |
---|---|---|---|
object_name | str | The unique object name identifier for the container | required |
container_data | dict | The data for the container. Note 'objectName' data is derived from | required |
update | bool | Whether to only update the dict data. | False |
Source code in client/ayon_substancepainter/api/pipeline.py
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
|
set_instance(instance_id, instance_data, update=False)
Helper method to directly set the data for a specific container
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance_id | str | Unique identifier for the instance | required |
instance_data | dict | The instance data to store in the metaadata. | required |
Source code in client/ayon_substancepainter/api/pipeline.py
378 379 380 381 382 383 384 385 |
|
set_instances(instance_data_by_id, update=False)
Store data for multiple instances at the same time.
This is more optimal than querying and setting them in the metadata one by one.
Source code in client/ayon_substancepainter/api/pipeline.py
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
|