mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge branch 'release/2.8' into develop
This commit is contained in:
commit
c3c659bf21
6 changed files with 49 additions and 44 deletions
|
|
@ -806,12 +806,12 @@ class SyncEntitiesFactory:
|
|||
def set_hierarchical_attribute(self, hier_attrs, sync_ids):
|
||||
# collect all hierarchical attribute keys
|
||||
# and prepare default values to project
|
||||
attribute_names = []
|
||||
attribute_ids = []
|
||||
attributes_by_key = {}
|
||||
attribute_key_by_id = {}
|
||||
for attr in hier_attrs:
|
||||
key = attr["key"]
|
||||
attribute_ids.append(attr["id"])
|
||||
attribute_names.append(key)
|
||||
attribute_key_by_id[attr["id"]] = key
|
||||
attributes_by_key[key] = attr
|
||||
|
||||
store_key = "hier_attrs"
|
||||
if key.startswith("avalon_"):
|
||||
|
|
@ -824,11 +824,11 @@ class SyncEntitiesFactory:
|
|||
# Prepare dict with all hier keys and None values
|
||||
prepare_dict = {}
|
||||
prepare_dict_avalon = {}
|
||||
for attr in attribute_names:
|
||||
if attr.startswith("avalon_"):
|
||||
prepare_dict_avalon[attr] = None
|
||||
for key in attributes_by_key.keys():
|
||||
if key.startswith("avalon_"):
|
||||
prepare_dict_avalon[key] = None
|
||||
else:
|
||||
prepare_dict[attr] = None
|
||||
prepare_dict[key] = None
|
||||
|
||||
for id, entity_dict in self.entities_dict.items():
|
||||
# Skip project because has stored defaults at the moment
|
||||
|
|
@ -842,32 +842,32 @@ class SyncEntitiesFactory:
|
|||
entity_ids_joined = ", ".join([
|
||||
"\"{}\"".format(id) for id in sync_ids
|
||||
])
|
||||
attributes_joined = ", ".join([
|
||||
"\"{}\"".format(name) for name in attribute_ids
|
||||
])
|
||||
call_expr = [{
|
||||
"action": "query",
|
||||
"expression": (
|
||||
"select value, entity_id from CustomAttributeValue "
|
||||
"where entity_id in ({}) and configuration_id in ({})"
|
||||
).format(entity_ids_joined, attributes_joined)
|
||||
}]
|
||||
if hasattr(self.session, "call"):
|
||||
[values] = self.session.call(call_expr)
|
||||
else:
|
||||
[values] = self.session._call(call_expr)
|
||||
|
||||
avalon_hier = []
|
||||
for value in values["data"]:
|
||||
if value["value"] is None:
|
||||
continue
|
||||
entity_id = value["entity_id"]
|
||||
key = value["configuration"]["key"]
|
||||
store_key = "hier_attrs"
|
||||
if key.startswith("avalon_"):
|
||||
store_key = "avalon_attrs"
|
||||
avalon_hier.append(key)
|
||||
self.entities_dict[entity_id][store_key][key] = value["value"]
|
||||
for configuration_id in attribute_key_by_id.keys():
|
||||
call_expr = [{
|
||||
"action": "query",
|
||||
"expression": (
|
||||
"select value, entity_id from CustomAttributeValue "
|
||||
"where entity_id in ({}) and configuration_id is \"{}\""
|
||||
).format(entity_ids_joined, configuration_id)
|
||||
}]
|
||||
if hasattr(self.session, "call"):
|
||||
[values] = self.session.call(call_expr)
|
||||
else:
|
||||
[values] = self.session._call(call_expr)
|
||||
|
||||
for value in values["data"]:
|
||||
if value["value"] is None:
|
||||
continue
|
||||
entity_id = value["entity_id"]
|
||||
key = attribute_key_by_id[value["configuration_id"]]
|
||||
if key.startswith("avalon_"):
|
||||
store_key = "avalon_attrs"
|
||||
avalon_hier.append(key)
|
||||
else:
|
||||
store_key = "hier_attrs"
|
||||
self.entities_dict[entity_id][store_key][key] = value["value"]
|
||||
|
||||
# Get dictionary with not None hierarchical values to pull to childs
|
||||
top_id = self.ft_project_id
|
||||
|
|
@ -888,13 +888,14 @@ class SyncEntitiesFactory:
|
|||
hier_values, parent_id = hier_down_queue.get()
|
||||
for child_id in self.entities_dict[parent_id]["children"]:
|
||||
_hier_values = hier_values.copy()
|
||||
for name in attribute_names:
|
||||
store_key = "hier_attrs"
|
||||
if name.startswith("avalon_"):
|
||||
for key in attributes_by_key.keys():
|
||||
if key.startswith("avalon_"):
|
||||
store_key = "avalon_attrs"
|
||||
value = self.entities_dict[child_id][store_key][name]
|
||||
else:
|
||||
store_key = "hier_attrs"
|
||||
value = self.entities_dict[child_id][store_key][key]
|
||||
if value is not None:
|
||||
_hier_values[name] = value
|
||||
_hier_values[key] = value
|
||||
|
||||
self.entities_dict[child_id]["hier_attrs"].update(_hier_values)
|
||||
hier_down_queue.put((_hier_values, child_id))
|
||||
|
|
|
|||
|
|
@ -132,13 +132,14 @@ class ExtractBurnin(pype.api.Extractor):
|
|||
slate_duration = duration_cp
|
||||
|
||||
# exception for slate workflow
|
||||
if ("slate" in instance.data["families"]):
|
||||
if "slate" in instance.data["families"]:
|
||||
if "slate-frame" in repre.get("tags", []):
|
||||
slate_frame_start = frame_start_cp - 1
|
||||
slate_frame_end = frame_end_cp
|
||||
slate_duration = duration_cp + 1
|
||||
|
||||
self.log.debug("__1 slate_frame_start: {}".format(slate_frame_start))
|
||||
self.log.debug("__1 slate_frame_start: {}".format(
|
||||
slate_frame_start))
|
||||
|
||||
_prep_data.update({
|
||||
"slate_frame_start": slate_frame_start,
|
||||
|
|
@ -192,7 +193,6 @@ class ExtractBurnin(pype.api.Extractor):
|
|||
self.log.debug("Output: {}".format(output))
|
||||
|
||||
repre_update = {
|
||||
"anatomy_template": "render",
|
||||
"files": movieFileBurnin,
|
||||
"name": repre["name"],
|
||||
"tags": [x for x in repre["tags"] if x != "delete"]
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
"PYPE_METADATA_FILE",
|
||||
"PYPE_STUDIO_PROJECTS_PATH",
|
||||
"PYPE_STUDIO_PROJECTS_MOUNT",
|
||||
"AVALON_PROJECT"
|
||||
]
|
||||
|
||||
# pool used to do the publishing job
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class AssProxyLoader(pype.maya.plugin.ReferenceLoader):
|
|||
icon = "code-fork"
|
||||
color = "orange"
|
||||
|
||||
def process_reference(self, context, name, namespace, data):
|
||||
def process_reference(self, context, name, namespace, options):
|
||||
|
||||
import maya.cmds as cmds
|
||||
from avalon import maya
|
||||
|
|
@ -164,7 +164,7 @@ class AssStandinLoader(api.Loader):
|
|||
icon = "code-fork"
|
||||
color = "orange"
|
||||
|
||||
def load(self, context, name, namespace, data):
|
||||
def load(self, context, name, namespace, options):
|
||||
|
||||
import maya.cmds as cmds
|
||||
import avalon.maya.lib as lib
|
||||
|
|
|
|||
|
|
@ -151,13 +151,16 @@ class CollectReviews(api.InstancePlugin):
|
|||
"handleStart", "handleEnd", "sourceIn", "sourceOut",
|
||||
"frameStart", "frameEnd", "sourceInH", "sourceOutH",
|
||||
"clipIn", "clipOut", "clipInH", "clipOutH", "asset",
|
||||
"track", "version"
|
||||
"track"
|
||||
]
|
||||
|
||||
version_data = dict()
|
||||
# pass data to version
|
||||
version_data.update({k: instance.data[k] for k in transfer_data})
|
||||
|
||||
if 'version' in instance.data:
|
||||
version_data["version"] = instance.data[version]
|
||||
|
||||
# add to data of representation
|
||||
version_data.update({
|
||||
"colorspace": item.sourceMediaColourTransform(),
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "2.7.0"
|
||||
__version__ = "2.8.0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue