Fix file paths.

This commit is contained in:
Toke Stuart Jepsen 2023-02-01 20:57:47 +00:00
parent 7a7102337b
commit e0f18363cd
2 changed files with 3 additions and 5 deletions

View file

@ -73,9 +73,8 @@ class XgenLoader(openpype.hosts.maya.api.plugin.ReferenceLoader):
# to ensure paths are setup correctly.
project_path = os.path.dirname(current_file()).replace("\\", "/")
xgenm.setAttr("xgProjectPath", project_path, xgen_palette)
data_path = "${{PROJECT}}xgen/collections/{}{}{}".format(
data_path = "${{PROJECT}}xgen/collections/{};{}".format(
xgen_palette.replace(":", "__ns__"),
os.pathsep,
xgenm.getAttr("xgDataPath", xgen_palette)
)
xgenm.setAttr("xgDataPath", data_path, xgen_palette)
@ -156,9 +155,8 @@ class XgenLoader(openpype.hosts.maya.api.plugin.ReferenceLoader):
break
project_path = os.path.dirname(current_file()).replace("\\", "/")
data_path = "${{PROJECT}}xgen/collections/{}{}{}".format(
data_path = "${{PROJECT}}xgen/collections/{};{}".format(
xgen_palette.replace(":", "__ns__"),
os.pathsep,
data_path
)
data = {"xgProjectPath": project_path, "xgDataPath": data_path}

View file

@ -208,7 +208,7 @@ class ExtractWorkfileXgen(publish.Extractor):
project_path = xgenm.getAttr("xgProjectPath", palette)
data_path = xgenm.getAttr("xgDataPath", palette)
data_path = data_path.replace("${PROJECT}", project_path)
for path in data_path.split(os.pathsep):
for path in data_path.split(";"):
for root, _, files in os.walk(path):
for f in files:
source = os.path.join(root, f)