From 6d9f81532cbe6260e054c6721306506549a6d3c7 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 28 Aug 2019 18:34:17 +0200 Subject: [PATCH] fix(nk): loading mov with better name and improving filter of nodes --- pype/plugins/nuke/load/load_luts.py | 2 +- pype/plugins/nuke/load/load_mov.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pype/plugins/nuke/load/load_luts.py b/pype/plugins/nuke/load/load_luts.py index d1c6c71057..7e1302fffe 100644 --- a/pype/plugins/nuke/load/load_luts.py +++ b/pype/plugins/nuke/load/load_luts.py @@ -251,7 +251,7 @@ class LoadLuts(api.Loader): if len(node) > 0: rn = node[0] else: - None + rn = None # Parent read node has been found # solving connections diff --git a/pype/plugins/nuke/load/load_mov.py b/pype/plugins/nuke/load/load_mov.py index 58aee315a6..e6daaaff8a 100644 --- a/pype/plugins/nuke/load/load_mov.py +++ b/pype/plugins/nuke/load/load_mov.py @@ -101,7 +101,8 @@ class LoadMov(api.Loader): handles = version_data.get("handles", None) handle_start = version_data.get("handleStart", None) handle_end = version_data.get("handleEnd", None) - + repr_cont = context["representation"]["context"] + # fix handle start and end if none are available if not handle_start and not handle_end: handle_start = handles @@ -119,9 +120,11 @@ class LoadMov(api.Loader): file = self.fname.replace("\\", "/") log.info("file: {}\n".format(self.fname)) - read_name = "Read" - read_name += '_' + context["representation"]["context"]["subset"] - read_name += '_' + context["representation"]["name"] + read_name = "Read_{0}_{1}_{2}".format( + repr_cont["asset"], + repr_cont["subset"], + repr_cont["representation"]) + # Create the Loader with the filename path set with viewer_update_and_undo_stop():