mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
black
This commit is contained in:
parent
20f819c1dd
commit
330d4340cc
2 changed files with 19 additions and 7 deletions
|
|
@ -19,7 +19,9 @@ class CollectKitsuEntities(pyblish.api.ContextPlugin):
|
|||
raise AssertionError("Zou asset data not found in OpenPype!")
|
||||
self.log.debug("Collected zou asset data: {}".format(zou_asset_data))
|
||||
|
||||
zou_task_data = asset_data["tasks"][os.environ["AVALON_TASK"]].get("zou")
|
||||
zou_task_data = asset_data["tasks"][os.environ["AVALON_TASK"]].get(
|
||||
"zou"
|
||||
)
|
||||
if not zou_task_data:
|
||||
self.log.warning("Zou task data not found in OpenPype!")
|
||||
self.log.debug("Collected zou task data: {}".format(zou_task_data))
|
||||
|
|
@ -44,13 +46,19 @@ class CollectKitsuEntities(pyblish.api.ContextPlugin):
|
|||
self.log.debug("Collect kitsu task: {}".format(kitsu_task))
|
||||
|
||||
else:
|
||||
kitsu_task_type = gazu.task.get_task_type_by_name(os.environ["AVALON_TASK"])
|
||||
kitsu_task_type = gazu.task.get_task_type_by_name(
|
||||
os.environ["AVALON_TASK"]
|
||||
)
|
||||
if not kitsu_task_type:
|
||||
raise AssertionError(
|
||||
"Task type {} not found in Kitsu!".format(os.environ["AVALON_TASK"])
|
||||
"Task type {} not found in Kitsu!".format(
|
||||
os.environ["AVALON_TASK"]
|
||||
)
|
||||
)
|
||||
|
||||
kitsu_task = gazu.task.get_task_by_name(kitsu_asset, kitsu_task_type)
|
||||
kitsu_task = gazu.task.get_task_by_name(
|
||||
kitsu_asset, kitsu_task_type
|
||||
)
|
||||
if not kitsu_task:
|
||||
raise AssertionError("Task not found in kitsu!")
|
||||
context.data["kitsu_task"] = kitsu_task
|
||||
|
|
|
|||
|
|
@ -19,19 +19,23 @@ class IntegrateKitsuReview(pyblish.api.InstancePlugin):
|
|||
|
||||
# Check comment has been created
|
||||
if not comment:
|
||||
self.log.debug("Comment not created, review not pushed to preview.")
|
||||
self.log.debug(
|
||||
"Comment not created, review not pushed to preview."
|
||||
)
|
||||
return
|
||||
|
||||
# Add review representations as preview of comment
|
||||
for representation in [
|
||||
r
|
||||
for r in instance.data.get("representations", [])
|
||||
if "review" in representation.get("tags", [])
|
||||
if "review" in r.get("tags", [])
|
||||
]:
|
||||
|
||||
review_path = representation.get("published_path")
|
||||
|
||||
self.log.debug("Found review at: {}".format(review_path))
|
||||
|
||||
gazu.task.add_preview(task, comment, review_path, normalize_movie=True)
|
||||
gazu.task.add_preview(
|
||||
task, comment, review_path, normalize_movie=True
|
||||
)
|
||||
self.log.info("Review upload on comment")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue