mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Clean up of placeholder.
This commit is contained in:
parent
f6c32300c2
commit
f4117a7a5c
2 changed files with 17 additions and 0 deletions
|
|
@ -1555,6 +1555,15 @@ class PlaceholderLoadMixin(object):
|
|||
self.load_succeed(placeholder, container)
|
||||
self.cleanup_placeholder(placeholder, failed)
|
||||
|
||||
if failed:
|
||||
self.log.debug(
|
||||
"Placeholder cleanup skipped due to failed placeholder "
|
||||
"population."
|
||||
)
|
||||
return
|
||||
if not placeholder.data["keep_placeholder"]:
|
||||
self.delete_placeholder(placeholder)
|
||||
|
||||
def load_failed(self, placeholder, representation):
|
||||
if hasattr(placeholder, "load_failed"):
|
||||
placeholder.load_failed(representation)
|
||||
|
|
@ -1577,6 +1586,10 @@ class PlaceholderLoadMixin(object):
|
|||
|
||||
pass
|
||||
|
||||
def delete_placeholder(self, placeholder, failed):
|
||||
"""Called when all item population is done."""
|
||||
self.log.debug("Clean up of placeholder is not implemented.")
|
||||
|
||||
|
||||
class PlaceholderCreateMixin(object):
|
||||
"""Mixin prepared for creating placeholder plugins.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue