🚧 wip on skeleton instance

This commit is contained in:
Ondrej Samohel 2023-04-17 12:24:42 +02:00
parent 547fe50ffc
commit 23f90ec355
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -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