global: add _before_instance_create function for storing created nodes

This commit is contained in:
Jakub Jezek 2022-12-23 14:26:28 +01:00
parent 81de2cf0c9
commit 4f7e4fcac3
No known key found for this signature in database
GPG key ID: 41E2707486B7A40F

View file

@ -1594,6 +1594,8 @@ class PlaceholderCreateMixin(object):
"creator_plugin": creator_plugin
}
self._before_instance_create(placeholder)
# compile subset name from variant
try:
creator_instance = creator_plugin(
@ -1633,6 +1635,11 @@ class PlaceholderCreateMixin(object):
pass
def _before_instance_create(self, placeholder):
"""Can be overriden. Is called before instance is created."""
pass
class LoadPlaceholderItem(PlaceholderItem):
"""PlaceholderItem for plugin which is loading representations.