From 9746cb4eb87c459c0975e57e2c6b14ef6a325220 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Jan 2022 15:18:06 +0100 Subject: [PATCH] nuke: load clip internal method moved to the end of class methods --- openpype/hosts/nuke/plugins/load/load_clip.py | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/openpype/hosts/nuke/plugins/load/load_clip.py b/openpype/hosts/nuke/plugins/load/load_clip.py index 621a464c69..c94fbd59b5 100644 --- a/openpype/hosts/nuke/plugins/load/load_clip.py +++ b/openpype/hosts/nuke/plugins/load/load_clip.py @@ -66,31 +66,6 @@ class LoadClip(plugin.NukeLoader): + plugin.get_review_presets_config() ) - def _set_colorspace(self, node, version_data, repre_data, path=None): - output_color = None - path = path or self.fname.replace("\\", "/") - # get colorspace - colorspace = repre_data.get("colorspace") - colorspace = colorspace or version_data.get("colorspace") - - # colorspace from `project_anatomy/imageio/nuke/regexInputs` - iio_colorspace = get_imageio_input_colorspace(path) - - # Set colorspace defined in version data - if ( - colorspace is not None - and colorspace_exists_on_node( - node, str(colorspace)) is not False - ): - node["colorspace"].setValue(str(colorspace)) - output_color = str(colorspace) - elif iio_colorspace is not None: - node["colorspace"].setValue(iio_colorspace) - output_color = iio_colorspace - - return output_color - - def load(self, context, name, namespace, options): repres = context["representation"] # reste container id so it is always unique for each instance @@ -406,3 +381,27 @@ class LoadClip(plugin.NukeLoader): } return self.node_name_template.format(**name_data) + + def _set_colorspace(self, node, version_data, repre_data, path=None): + output_color = None + path = path or self.fname.replace("\\", "/") + # get colorspace + colorspace = repre_data.get("colorspace") + colorspace = colorspace or version_data.get("colorspace") + + # colorspace from `project_anatomy/imageio/nuke/regexInputs` + iio_colorspace = get_imageio_input_colorspace(path) + + # Set colorspace defined in version data + if ( + colorspace is not None + and colorspace_exists_on_node( + node, str(colorspace)) is not False + ): + node["colorspace"].setValue(str(colorspace)) + output_color = str(colorspace) + elif iio_colorspace is not None: + node["colorspace"].setValue(iio_colorspace) + output_color = iio_colorspace + + return output_color \ No newline at end of file