From 77a12f49f8ad91b2771908b1dcfb9f7f4721fafd Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Thu, 25 Jan 2024 12:34:35 +0100 Subject: [PATCH] fix project name duplication in project folders --- openpype/pipeline/project_folders.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openpype/pipeline/project_folders.py b/openpype/pipeline/project_folders.py index 1bcba5c320..ecdb5cf6d3 100644 --- a/openpype/pipeline/project_folders.py +++ b/openpype/pipeline/project_folders.py @@ -28,13 +28,14 @@ def concatenate_splitted_paths(split_paths, anatomy): # backward compatibility if "__project_root__" in path_items: for root, root_path in anatomy.roots.items(): - if not os.path.exists(str(root_path)): - log.debug("Root {} path path {} not exist on \ - computer!".format(root, root_path)) + if not root_path: continue - clean_items = ["{{root[{}]}}".format(root), - r"{project[name]}"] + clean_items[1:] - output.append(os.path.normpath(os.path.sep.join(clean_items))) + root_items = [ + "{{root[{}]}}".format(root), + "{project[name]}" + ] + root_items.extend(clean_items[1:]) + output.append(os.path.normpath(os.path.sep.join(root_items))) continue output.append(os.path.normpath(os.path.sep.join(clean_items)))