mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #508 from tokejepsen/2.x/bugfix/nukestudio_comment
NukeStudio: Fix comment tag collection and integration.
This commit is contained in:
commit
c18d3a89e7
4 changed files with 26 additions and 5 deletions
|
|
@ -167,6 +167,27 @@ class IntegrateHierarchyToFtrack(pyblish.api.ContextPlugin):
|
|||
self.session.rollback()
|
||||
six.reraise(tp, value, tb)
|
||||
|
||||
# Create notes.
|
||||
user = self.session.query(
|
||||
"User where username is \"{}\"".format(self.session.api_user)
|
||||
).first()
|
||||
if user:
|
||||
for comment in entity_data.get("comments", []):
|
||||
entity.create_note(comment, user)
|
||||
else:
|
||||
self.log.warning(
|
||||
"Was not able to query current User {}".format(
|
||||
self.session.api_user
|
||||
)
|
||||
)
|
||||
try:
|
||||
self.session.commit()
|
||||
except Exception:
|
||||
tp, value, tb = sys.exc_info()
|
||||
self.session.rollback()
|
||||
six.reraise(tp, value, tb)
|
||||
|
||||
# Import children.
|
||||
if 'childs' in entity_data:
|
||||
self.import_to_ftrack(
|
||||
entity_data['childs'], entity)
|
||||
|
|
|
|||
|
|
@ -273,8 +273,6 @@ class CollectHierarchyContext(pyblish.api.ContextPlugin):
|
|||
instance.data["clipOut"] -
|
||||
instance.data["clipIn"])
|
||||
|
||||
|
||||
|
||||
self.log.debug(
|
||||
"__ instance.data[parents]: {}".format(
|
||||
instance.data["parents"]
|
||||
|
|
@ -319,6 +317,7 @@ class CollectHierarchyContext(pyblish.api.ContextPlugin):
|
|||
})
|
||||
|
||||
in_info['tasks'] = instance.data['tasks']
|
||||
in_info["comments"] = instance.data.get("comments", [])
|
||||
|
||||
parents = instance.data.get('parents', [])
|
||||
self.log.debug("__ in_info: {}".format(in_info))
|
||||
|
|
|
|||
|
|
@ -40,11 +40,12 @@ class CollectShots(api.InstancePlugin):
|
|||
data["name"] = data["subset"] + "_" + data["asset"]
|
||||
|
||||
data["label"] = (
|
||||
"{} - {} - tasks:{} - assetbuilds:{}".format(
|
||||
"{} - {} - tasks: {} - assetbuilds: {} - comments: {}".format(
|
||||
data["asset"],
|
||||
data["subset"],
|
||||
data["tasks"],
|
||||
[x["name"] for x in data.get("assetbuilds", [])]
|
||||
[x["name"] for x in data.get("assetbuilds", [])],
|
||||
len(data.get("comments", []))
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class CollectClipTagComments(api.InstancePlugin):
|
|||
for tag in instance.data["tags"]:
|
||||
if tag["name"].lower() == "comment":
|
||||
instance.data["comments"].append(
|
||||
tag.metadata().dict()["tag.note"]
|
||||
tag["metadata"]["tag.note"]
|
||||
)
|
||||
|
||||
# Find tags on the source clip.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue