mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +01:00
trigger event on removed instances
This commit is contained in:
parent
6af9c62d16
commit
d18079dc2b
1 changed files with 13 additions and 0 deletions
|
|
@ -1444,6 +1444,19 @@ class CreateContext:
|
|||
removed_instances = []
|
||||
for instance in instances:
|
||||
obj = self._instances_by_id.pop(instance.id, None)
|
||||
if obj is not None:
|
||||
removed_instances.append(instance)
|
||||
|
||||
if not removed_instances:
|
||||
return
|
||||
|
||||
self._emit_event(
|
||||
"instances.removed",
|
||||
{
|
||||
"instances": removed_instances,
|
||||
"create_context": self,
|
||||
}
|
||||
)
|
||||
|
||||
def _create_with_unified_error(
|
||||
self, identifier, creator, *args, **kwargs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue