Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6166 from ynput/bugfix/OP-7514_Multiroot-folder-s…
Browse files Browse the repository at this point in the history
…tructure

Chore: Fix duplicated project name on create project structure
  • Loading branch information
iLLiCiTiT authored Jan 25, 2024
2 parents 6c87f3f + 8f6d78e commit 0e6b351
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions openpype/pipeline/project_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,20 @@ 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 or not os.path.exists(str(root_path)):
log.debug(
"Root {} path path {} not exist on computer!".format(
root, 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)))
Expand Down

0 comments on commit 0e6b351

Please sign in to comment.