mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
🚧 wip on skeleton instance
This commit is contained in:
parent
547fe50ffc
commit
23f90ec355
1 changed files with 21 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from openpype.lib import Logger
|
||||
import attr
|
||||
import pyblish.api
|
||||
|
||||
|
||||
@attr.s
|
||||
|
|
@ -23,10 +24,27 @@ def remap_source(source, anatomy):
|
|||
return source
|
||||
|
||||
|
||||
def get_skeleton_instance():
|
||||
def create_skeleton_instance(instance):
|
||||
# type: (pyblish.api.Instance) -> dict
|
||||
"""Create skelenton instance from original instance data.
|
||||
|
||||
This will create dictionary containing skeleton
|
||||
- common - data used for publishing rendered instances.
|
||||
This skeleton instance is then extended with additional data
|
||||
and serialized to be processed by farm job.
|
||||
|
||||
Args:
|
||||
instance (pyblish.api.Instance): Original instance to
|
||||
be used as a source of data.
|
||||
|
||||
Returns:
|
||||
dict: Dictionary with skeleton instance data.
|
||||
|
||||
"""
|
||||
instance_skeleton_data = {
|
||||
"family": family,
|
||||
context = instance.context
|
||||
|
||||
return {
|
||||
"family": "render" if "prerender" not in instance.data["families"] else "prerender", # noqa: E401
|
||||
"subset": subset,
|
||||
"families": families,
|
||||
"asset": asset,
|
||||
|
|
@ -50,5 +68,3 @@ def get_skeleton_instance():
|
|||
# map inputVersions `ObjectId` -> `str` so json supports it
|
||||
"inputVersions": list(map(str, data.get("inputVersions", [])))
|
||||
}
|
||||
"""
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue