From c71fc217da17da5e93b7129240ffc6e418d7cd12 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 1 Feb 2023 15:05:15 +0000 Subject: [PATCH] BigRoy feedback --- .../maya/plugins/publish/extract_workfile_xgen.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py b/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py index 49d724960f..b95add3306 100644 --- a/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py +++ b/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py @@ -104,7 +104,7 @@ class ExtractWorkfileXgen(publish.Extractor): end_frame += 1 # Extract patches alembic. - basename, _ = os.path.splitext(instance.context.data["currentFile"]) + path_no_ext, _ = os.path.splitext(instance.context.data["currentFile"]) dirname = os.path.dirname(instance.context.data["currentFile"]) kwargs = {"attrPrefix": ["xgen"], "stripNamespaces": True} alembic_files = [] @@ -116,7 +116,9 @@ class ExtractWorkfileXgen(publish.Extractor): alembic_file = os.path.join( dirname, - "{}__{}.abc".format(basename, palette.replace(":", "__ns__")) + "{}__{}.abc".format( + path_no_ext, palette.replace(":", "__ns__") + ) ) extract_alembic( alembic_file, @@ -138,7 +140,9 @@ class ExtractWorkfileXgen(publish.Extractor): for source in alembic_files: destination = os.path.join( os.path.dirname(instance.data["resourcesDir"]), - os.path.basename(source.replace(basename, published_basename)) + os.path.basename( + source.replace(path_no_ext, published_basename) + ) ) transfers.append((source, destination))