mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix the bug of removing an instance
This commit is contained in:
parent
fd0b0eb69f
commit
3f9f9bc6d1
1 changed files with 6 additions and 1 deletions
|
|
@ -101,7 +101,12 @@ class MaxCreator(Creator, MaxCreatorBase):
|
|||
instance_node = rt.getNodeByName(
|
||||
instance.data.get("instance_node"))
|
||||
if instance_node:
|
||||
rt.delete(rt.getNodeByName(instance_node))
|
||||
rt.select(instance_node)
|
||||
unparent_cmd = f"""
|
||||
for o in selection do for c in o.children do c.parent = undefined
|
||||
"""
|
||||
rt.execute(unparent_cmd)
|
||||
rt.delete(instance_node)
|
||||
|
||||
self._remove_instance_from_context(instance)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue