diff --git a/openpype/hosts/nuke/plugins/publish/precollect_writes.py b/openpype/hosts/nuke/plugins/publish/precollect_writes.py index a267652f11d..049958bd07d 100644 --- a/openpype/hosts/nuke/plugins/publish/precollect_writes.py +++ b/openpype/hosts/nuke/plugins/publish/precollect_writes.py @@ -68,8 +68,8 @@ def process(self, instance): os.path.basename(filepath) for filepath in expected_paths ] - - output_dir = os.path.dirname(expected_paths[0]) + path = nuke.filename(node) + output_dir = os.path.dirname(path) self.log.debug('output dir: {}'.format(output_dir))