mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Code cosmetics
This commit is contained in:
parent
239995f715
commit
efb7d42a7f
2 changed files with 8 additions and 8 deletions
|
|
@ -13,20 +13,20 @@ class CollectXgen(pyblish.api.InstancePlugin):
|
|||
|
||||
def process(self, instance):
|
||||
data = {
|
||||
"xgenPalettes": cmds.ls(instance, type="xgmPalette", long=True),
|
||||
"xgmPalettes": cmds.ls(instance, type="xgmPalette", long=True),
|
||||
"xgmDescriptions": cmds.ls(
|
||||
instance, type="xgmDescription", long=True
|
||||
),
|
||||
"xgmSubdPatches": cmds.ls(instance, type="xgmSubdPatch", long=True)
|
||||
}
|
||||
data["xgenNodes"] = (
|
||||
data["xgenPalettes"] +
|
||||
data["xgmPalettes"] +
|
||||
data["xgmDescriptions"] +
|
||||
data["xgmSubdPatches"]
|
||||
)
|
||||
|
||||
if data["xgenPalettes"]:
|
||||
data["xgenPalette"] = data["xgenPalettes"][0]
|
||||
if data["xgmPalettes"]:
|
||||
data["xgmPalette"] = data["xgmPalettes"][0]
|
||||
|
||||
data["xgenConnections"] = {}
|
||||
for node in data["xgmSubdPatches"]:
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ class ExtractXgenCache(publish.Extractor):
|
|||
template_data.update({"ext": "xgen"})
|
||||
templates = instance.context.data["anatomy"].templates["publish"]
|
||||
xgen_filename = StringTemplate(templates["file"]).format(template_data)
|
||||
name = instance.data["xgenPalette"].replace(":", "__").replace("|", "")
|
||||
name = instance.data["xgmPalette"].replace(":", "__").replace("|", "")
|
||||
xgen_filename = xgen_filename.replace(".xgen", "__" + name + ".xgen")
|
||||
|
||||
# Export xgen palette files.
|
||||
xgen_path = os.path.join(staging_dir, xgen_filename).replace("\\", "/")
|
||||
xgenm.exportPalette(
|
||||
instance.data["xgenPalette"].replace("|", ""), xgen_path
|
||||
instance.data["xgmPalette"].replace("|", ""), xgen_path
|
||||
)
|
||||
self.log.info("Extracted to {}".format(xgen_path))
|
||||
|
||||
|
|
@ -132,12 +132,12 @@ class ExtractXgenCache(publish.Extractor):
|
|||
|
||||
# Collect all files under palette root as resources.
|
||||
data_path = xgenm.getAttr(
|
||||
"xgDataPath", instance.data["xgenPalette"].replace("|", "")
|
||||
"xgDataPath", instance.data["xgmPalette"].replace("|", "")
|
||||
).split(os.pathsep)[0]
|
||||
data_path = data_path.replace(
|
||||
"${PROJECT}",
|
||||
xgenm.getAttr(
|
||||
"xgProjectPath", instance.data["xgenPalette"].replace("|", "")
|
||||
"xgProjectPath", instance.data["xgmPalette"].replace("|", "")
|
||||
)
|
||||
)
|
||||
transfers = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue