mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'feature/PYPE-338-publish-representations-for-sho' of bitbucket.org:pypeclub/pype into feature/PYPE-338-publish-representations-for-sho
# Conflicts: # pype/plugins/nukestudio/publish/collect_current_file.py
This commit is contained in:
commit
b54bf9962a
22 changed files with 335 additions and 95 deletions
|
|
@ -9,7 +9,7 @@ class CollectAssumedDestination(pyblish.api.ContextPlugin):
|
|||
|
||||
label = "Collect Assumed Destination"
|
||||
order = pyblish.api.CollectorOrder + 0.498
|
||||
exclude_families = ["clip"]
|
||||
exclude_families = ["plate"]
|
||||
|
||||
def process(self, context):
|
||||
|
||||
|
|
|
|||
|
|
@ -18,12 +18,14 @@ class CollectPresets(api.ContextPlugin):
|
|||
presets["colorspace"] = presets["colorspace"][p_init["colorspace"]]
|
||||
presets["dataflow"] = presets["dataflow"][p_init["dataflow"]]
|
||||
except KeyError:
|
||||
log.warning("No projects custom preset available...")
|
||||
self.log.warning("No projects custom preset available...")
|
||||
presets["colorspace"] = presets["colorspace"]["default"]
|
||||
presets["dataflow"] = presets["dataflow"]["default"]
|
||||
log.info("Presets `colorspace` and `dataflow` loaded from `default`...")
|
||||
self.log.info(
|
||||
"Presets `colorspace` and `dataflow` loaded from `default`..."
|
||||
)
|
||||
|
||||
context.data["presets"] = presets
|
||||
|
||||
|
||||
self.log.info(context.data["presets"])
|
||||
return
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
"nukescript",
|
||||
"render",
|
||||
"write",
|
||||
"plates"
|
||||
"rig",
|
||||
"plate"
|
||||
]
|
||||
exclude_families = ["clip"]
|
||||
|
||||
|
|
@ -217,7 +218,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
if 'transfers' not in instance.data:
|
||||
instance.data['transfers'] = []
|
||||
|
||||
for idx, repre in enumerate(repres):
|
||||
for idx, repre in enumerate(instance.data["representations"]):
|
||||
|
||||
# Collection
|
||||
# _______
|
||||
|
|
@ -237,7 +238,6 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
template = os.path.normpath(
|
||||
anatomy.templates[template_name]["path"])
|
||||
|
||||
|
||||
if isinstance(files, list):
|
||||
src_collections, remainder = clique.assemble(files)
|
||||
self.log.debug(
|
||||
|
|
@ -265,7 +265,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
dst_head = dst_collection.format("{head}")
|
||||
dst_tail = dst_collection.format("{tail}")
|
||||
|
||||
repres[idx]['published_path'] = dst_collection.format()
|
||||
repre['published_path'] = dst_collection.format()
|
||||
|
||||
for i in src_collection.indexes:
|
||||
src_padding = src_collection.format("{padding}") % i
|
||||
|
|
@ -283,7 +283,6 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
hashes = '#' * len(dst_padding)
|
||||
dst = "{0}{1}{2}".format(dst_head, hashes, dst_tail)
|
||||
|
||||
|
||||
else:
|
||||
# Single file
|
||||
# _______
|
||||
|
|
@ -308,7 +307,9 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
dst = anatomy_filled[template_name]["path"]
|
||||
|
||||
instance.data["transfers"].append([src, dst])
|
||||
repres[idx]['published_path'] = dst
|
||||
|
||||
repre['published_path'] = dst
|
||||
self.log.debug("__ dst: {}".format(dst))
|
||||
|
||||
representation = {
|
||||
"schema": "pype:representation-2.0",
|
||||
|
|
@ -339,8 +340,11 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
instance.data['destination_list'] = destination_list
|
||||
representations.append(representation)
|
||||
|
||||
for rep in instance.data["representations"]:
|
||||
self.log.debug("__ represNAME: {}".format(rep['name']))
|
||||
self.log.debug("__ represPATH: {}".format(rep['published_path']))
|
||||
io.insert_many(representations)
|
||||
self.log.debug("Representation: {}".format(representations))
|
||||
# self.log.debug("Representation: {}".format(representations))
|
||||
self.log.info("Registered {} items".format(len(representations)))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue