mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
added settings for slate templates
This commit is contained in:
parent
aa0176aeb7
commit
5bc3516baf
3 changed files with 70 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import nuke
|
||||
import six
|
||||
import copy
|
||||
|
||||
import pyblish.api
|
||||
|
||||
import openpype
|
||||
|
|
@ -20,9 +21,12 @@ class ExtractSlateFrame(openpype.api.Extractor):
|
|||
families = ["slate"]
|
||||
hosts = ["nuke"]
|
||||
|
||||
# Settings values
|
||||
# - can be extended by other attributes from node in the future
|
||||
key_value_mapping = {
|
||||
"f_submission_note": [True, "{comment}"],
|
||||
"f_submitting_for": [True, "{intent[value]}"]
|
||||
"f_submitting_for": [True, "{intent[value]}"],
|
||||
"f_vfx_scope_of_work": [False, ""]
|
||||
}
|
||||
|
||||
def process(self, instance):
|
||||
|
|
@ -173,10 +177,11 @@ class ExtractSlateFrame(openpype.api.Extractor):
|
|||
"value": intent
|
||||
}
|
||||
|
||||
fill_data = {
|
||||
fill_data = copy.deepcopy(instance.data["anatomyData"])
|
||||
fill_data.update({
|
||||
"comment": comment,
|
||||
"intent": intent
|
||||
}
|
||||
})
|
||||
|
||||
for key, value in self.key_value_mapping.items():
|
||||
enabled, template = value
|
||||
|
|
@ -205,6 +210,6 @@ class ExtractSlateFrame(openpype.api.Extractor):
|
|||
try:
|
||||
node[key].setValue(value)
|
||||
except NameError:
|
||||
self.log.warning(
|
||||
self.log.warning((
|
||||
"Failed to set value \"{}\" on node attribute \"{}\""
|
||||
).format(value))
|
||||
|
|
|
|||
|
|
@ -160,7 +160,19 @@
|
|||
}
|
||||
},
|
||||
"ExtractSlateFrame": {
|
||||
"viewer_lut_raw": false
|
||||
"viewer_lut_raw": false,
|
||||
"f_submission_note": [
|
||||
true,
|
||||
"{comment}"
|
||||
],
|
||||
"f_submitting_for": [
|
||||
true,
|
||||
"{intent[value]}"
|
||||
],
|
||||
"f_vfx_scope_of_work": [
|
||||
false,
|
||||
""
|
||||
]
|
||||
},
|
||||
"IncrementScriptVersion": {
|
||||
"enabled": true,
|
||||
|
|
|
|||
|
|
@ -389,6 +389,53 @@
|
|||
"type": "boolean",
|
||||
"key": "viewer_lut_raw",
|
||||
"label": "Viewer LUT raw"
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Fill specific slate node values with templates. Uncheck the checkbox to not change the value.",
|
||||
"word_wrap": true
|
||||
},
|
||||
{
|
||||
"type": "list-strict",
|
||||
"key": "f_submission_note",
|
||||
"label": "Submission Note",
|
||||
"object_types": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "list-strict",
|
||||
"key": "f_submitting_for",
|
||||
"label": "Submission For",
|
||||
"object_types": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "list-strict",
|
||||
"key": "f_vfx_scope_of_work",
|
||||
"label": "VFX Scope Of Work",
|
||||
"object_types": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue