mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
added possiblity to set note with intent template through presets
This commit is contained in:
parent
cc6d70f849
commit
a3ad40e34a
1 changed files with 6 additions and 1 deletions
|
|
@ -10,6 +10,8 @@ class IntegrateFtrackNote(pyblish.api.InstancePlugin):
|
|||
order = pyblish.api.IntegratorOrder + 0.4999
|
||||
label = "Integrate Ftrack note"
|
||||
families = ["ftrack"]
|
||||
# Can be set in presets (Allows only `intent` and `comment` keys)
|
||||
note_with_intent_template = "{intent}: {comment}"
|
||||
optional = True
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -25,7 +27,10 @@ class IntegrateFtrackNote(pyblish.api.InstancePlugin):
|
|||
msg = "Intent is set to `{}` and was added to comment.".format(
|
||||
intent
|
||||
)
|
||||
comment = "{}: {}".format(intent, comment)
|
||||
comment = note_with_intent_template.format(**{
|
||||
"intent": intent,
|
||||
"comment": comment
|
||||
})
|
||||
else:
|
||||
msg = "Intent is not set."
|
||||
self.log.debug(msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue