mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Sanitize nodes_to_parent
This commit is contained in:
parent
9c3448604a
commit
605d59f7c7
1 changed files with 8 additions and 1 deletions
|
|
@ -10,7 +10,8 @@ from ayon_core.pipeline.workfile.workfile_template_builder import (
|
|||
from ayon_core.hosts.maya.api.lib import (
|
||||
read,
|
||||
imprint,
|
||||
get_reference_node
|
||||
get_reference_node,
|
||||
get_highest_in_hierarchy
|
||||
)
|
||||
from ayon_core.hosts.maya.api.workfile_template_builder import PLACEHOLDER_SET
|
||||
|
||||
|
|
@ -243,6 +244,12 @@ class MayaPlaceholderLoadPlugin(PlaceholderPlugin, PlaceholderLoadMixin):
|
|||
elif not cmds.sets(root, q=True):
|
||||
return
|
||||
|
||||
# Some containers like GPU cache does not contain a reference node and
|
||||
# all the nodes created are part of the container set, but the GPU
|
||||
# cache cannot be reparented but its parent group can, so we ensure to
|
||||
# grab top-most parent.
|
||||
nodes_to_parent = get_highest_in_hierarchy(nodes_to_parent)
|
||||
|
||||
# Move loaded nodes to correct index in outliner hierarchy
|
||||
placeholder_form = cmds.xform(
|
||||
placeholder.scene_identifier,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue