mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
nuke: write node validator check __legacy__ type
This commit is contained in:
parent
e1f040c9ea
commit
47a31b4491
2 changed files with 16 additions and 23 deletions
|
|
@ -2371,8 +2371,8 @@ def get_write_node_template_attr(node):
|
|||
''' Gets all defined data from presets
|
||||
|
||||
'''
|
||||
# TODO: remove this backward compatibility for old settings
|
||||
# TASK: add identifiers to settings and rename settings key
|
||||
|
||||
# TODO: add identifiers to settings and rename settings key
|
||||
plugin_names_mapping = {
|
||||
"create_write_image": "CreateWriteImage",
|
||||
"create_write_prerender": "CreateWritePrerender",
|
||||
|
|
@ -2381,25 +2381,14 @@ def get_write_node_template_attr(node):
|
|||
# get avalon data from node
|
||||
node_data = get_node_data(node, INSTANCE_DATA_KNOB)
|
||||
identifier = node_data["creator_identifier"]
|
||||
# get template data
|
||||
nuke_imageio_writes = get_imageio_node_setting(
|
||||
|
||||
# return template data
|
||||
return get_imageio_node_setting(
|
||||
node_class="Write",
|
||||
plugin_name=plugin_names_mapping[identifier],
|
||||
subset=node_data["subset"]
|
||||
)
|
||||
|
||||
# collecting solved data
|
||||
return_data = OrderedDict()
|
||||
|
||||
for knob in nuke_imageio_writes["knobs"]:
|
||||
knob_type = knob["type"]
|
||||
knob_value = knob["value"]
|
||||
new_knob_value = convert_knob_value_to_correct_type(
|
||||
knob_type, knob_value)
|
||||
return_data[knob["name"]] = new_knob_value
|
||||
|
||||
return return_data
|
||||
|
||||
|
||||
def get_dependent_nodes(nodes):
|
||||
"""Get all dependent nodes connected to the list of nodes.
|
||||
|
|
|
|||
|
|
@ -77,22 +77,26 @@ class ValidateNukeWriteNode(
|
|||
if write_node is None:
|
||||
return
|
||||
|
||||
check_knobs = get_write_node_template_attr(write_group_node)
|
||||
correct_data = get_write_node_template_attr(write_group_node)
|
||||
|
||||
check = []
|
||||
self.log.debug("__ write_node: {}".format(
|
||||
write_node
|
||||
))
|
||||
self.log.debug("__ check_knobs: {}".format(
|
||||
check_knobs
|
||||
self.log.debug("__ correct_data: {}".format(
|
||||
correct_data
|
||||
))
|
||||
|
||||
for knob_data in check_knobs:
|
||||
for knob_data in correct_data["knobs"]:
|
||||
knob_type = knob_data["type"]
|
||||
self.log.debug("__ knob_type: {}".format(
|
||||
knob_type
|
||||
))
|
||||
|
||||
if (
|
||||
"type" not in knob_data
|
||||
or knob_data["type"] == "__legacy__"
|
||||
knob_type == "__legacy__"
|
||||
):
|
||||
PublishXmlValidationError(
|
||||
raise PublishXmlValidationError(
|
||||
self, (
|
||||
"Please update data in settings 'project_settings"
|
||||
"/nuke/imageio/nodes/requiredNodes'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue