From 02526f156d7b3e2bf10a669736d980ced29b53fc Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 31 Jul 2019 01:05:14 +0200 Subject: [PATCH] fix(nuke): fixing update function in loader to better work with avalon.nuke.lib:ls_img_sequence --- pype/plugins/nuke/load/load_mov.py | 6 ++---- pype/plugins/nuke/load/load_sequence.py | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pype/plugins/nuke/load/load_mov.py b/pype/plugins/nuke/load/load_mov.py index f74c31d232..cd45c77906 100644 --- a/pype/plugins/nuke/load/load_mov.py +++ b/pype/plugins/nuke/load/load_mov.py @@ -182,7 +182,6 @@ class LoadMov(api.Loader): """ from avalon.nuke import ( - ls_img_sequence, update_container ) @@ -190,8 +189,7 @@ class LoadMov(api.Loader): # TODO: prepare also for other Read img/geo/camera assert node.Class() == "Read", "Must be Read" - root = api.get_representation_path(representation) - file = ls_img_sequence(os.path.dirname(root), one=True) + file = api.get_representation_path(representation) # Get start frame from version data version = io.find_one({ @@ -238,7 +236,7 @@ class LoadMov(api.Loader): # Update the loader's path whilst preserving some values with preserve_trim(node): node["file"].setValue(file["path"]) - log.info("__ node['file']: {}".format(node["file"])) + log.info("__ node['file']: {}".format(node["file"].value())) # Set the global in to the start frame of the sequence loader_shift(node, first, relative=True) diff --git a/pype/plugins/nuke/load/load_sequence.py b/pype/plugins/nuke/load/load_sequence.py index fd733f7c87..b2affb3563 100644 --- a/pype/plugins/nuke/load/load_sequence.py +++ b/pype/plugins/nuke/load/load_sequence.py @@ -179,8 +179,8 @@ class LoadSequence(api.Loader): # TODO: prepare also for other Read img/geo/camera assert node.Class() == "Read", "Must be Read" - root = api.get_representation_path(representation) - file = ls_img_sequence(os.path.dirname(root), one=True) + path = api.get_representation_path(representation) + file = ls_img_sequence(path) # Get start frame from version data version = io.find_one({ @@ -222,7 +222,7 @@ class LoadSequence(api.Loader): # Update the loader's path whilst preserving some values with preserve_trim(node): node["file"].setValue(file["path"]) - log.info("__ node['file']: {}".format(node["file"])) + log.info("__ node['file']: {}".format(node["file"].value())) # Set the global in to the start frame of the sequence loader_shift(node, first, relative=True)