Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Kitsu Review Preview: Add ability to disable the resize (normalize)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSouchet committed Sep 11, 2024
1 parent d9731d0 commit e1b6c88
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class IntegrateKitsuReview(pyblish.api.InstancePlugin):
optional = True

def process(self, instance):
if not getattr(self, 'enabled', True):
return

# Check comment has been created
comment_id = instance.data.get("kitsu_comment", {}).get("id")
if not comment_id:
Expand All @@ -30,6 +33,7 @@ def process(self, instance):
self.log.debug("Found review at: {}".format(review_path))

gazu.task.add_preview(
task_id, comment_id, review_path, normalize_movie=True
task_id, comment_id, review_path,
normalize_movie=getattr(self, 'normalize', True)
)
self.log.info("Review upload on comment")
4 changes: 4 additions & 0 deletions openpype/settings/defaults/project_settings/kitsu.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"enabled": false,
"comment_template": "{comment}\n\n| | |\n|--|--|\n| version| `{version}` |\n| family | `{family}` |\n| name | `{name}` |"
}
},
"IntegrateKitsuReview": {
"enabled": true,
"normalize": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,24 @@
]
}
]
},
{
"type": "dict",
"collapsible": true,
"key": "IntegrateKitsuReview",
"label": "Integrate Kitsu Review",
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
},
{
"type": "boolean",
"key": "normalize",
"label": "Normalize"
}
]
}
]
}
Expand Down

0 comments on commit e1b6c88

Please sign in to comment.