mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Avoid making placeholder xgd file
This commit is contained in:
parent
55e3ae2729
commit
87e7249189
1 changed files with 8 additions and 21 deletions
|
|
@ -81,27 +81,6 @@ class XgenLoader(openpype.hosts.maya.api.plugin.ReferenceLoader):
|
|||
)
|
||||
xgd_file = xgen_file.replace(".xgen", ".xgd")
|
||||
|
||||
# Create a placeholder xgen delta file. This create an expression
|
||||
# attribute of float. If we did not add any changes to the delta file,
|
||||
# then Xgen deletes the xgd file on save to clean up (?). This gives
|
||||
# errors when launching the workfile again due to trying to find the
|
||||
# xgd file.
|
||||
#change author, date and version path
|
||||
xgd_template = """
|
||||
# XGen Delta File
|
||||
#
|
||||
# Version: C:/Program Files/Autodesk/Maya2022/plug-ins/xgen/
|
||||
# Author: tokejepsen
|
||||
# Date: Tue Dec 20 09:03:29 2022
|
||||
|
||||
FileVersion 18
|
||||
|
||||
Palette custom_float_ignore 0
|
||||
|
||||
"""
|
||||
with open(xgd_file, "w") as f:
|
||||
f.write(xgd_template)
|
||||
|
||||
# Reference xgen. Xgen does not like being referenced in under a group.
|
||||
new_nodes = []
|
||||
|
||||
|
|
@ -127,6 +106,14 @@ Palette custom_float_ignore 0
|
|||
)
|
||||
cmds.setAttr("{}.xgExportAsDelta".format(xgen_palette), True)
|
||||
|
||||
# This create an expression attribute of float. If we did not add
|
||||
# any changes to collection, then Xgen does not create an xgd file
|
||||
# on save. This gives errors when launching the workfile again due
|
||||
# to trying to find the xgd file.
|
||||
xgenm.addCustomAttr(
|
||||
"custom_float_ignore", xgen_palette.replace("|", "")
|
||||
)
|
||||
|
||||
shapes = cmds.ls(nodes, shapes=True, long=True)
|
||||
|
||||
new_nodes = (list(set(nodes) - set(shapes)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue