mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix incorrectly making containers when reusing a loaded lookdev upon assignments
This commit is contained in:
parent
e6ff0e2dc0
commit
37b5603cd9
1 changed files with 10 additions and 9 deletions
|
|
@ -804,20 +804,21 @@ def assign_look_by_version(nodes, version_id):
|
|||
namespace=namespace,
|
||||
reference=True,
|
||||
returnNewNodes=True)
|
||||
|
||||
# containerise like avalon (for manager)
|
||||
# give along a fake "context" with only `representation`
|
||||
# because `maya.containerise` only used that key anyway
|
||||
context = {"representation": shader_file}
|
||||
subset_name = shader_file["context"]["subset"]
|
||||
maya.containerise(name=subset_name,
|
||||
namespace=namespace,
|
||||
nodes=shader_nodes,
|
||||
context=context)
|
||||
else:
|
||||
log.info("Reusing existing lookdev '{}'".format(reference_node))
|
||||
shader_nodes = cmds.referenceQuery(reference_node, nodes=True)
|
||||
namespace = cmds.referenceQuery(reference_node, namespace=True)
|
||||
|
||||
# containerise like avalon (for manager)
|
||||
# give re
|
||||
context = {"representation": shader_file}
|
||||
subset_name = shader_file["context"]["subset"]
|
||||
maya.containerise(name=subset_name,
|
||||
namespace=namespace,
|
||||
nodes=shader_nodes,
|
||||
context=context)
|
||||
|
||||
# Assign relationships
|
||||
with open(shader_relation, "r") as f:
|
||||
relationships = json.load(f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue