mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Do not store in placeholder data - it's up to the registering code itself to persist or use the weakref_partial implementation from the event system
This commit is contained in:
parent
d7b20dff37
commit
edee279f15
1 changed files with 0 additions and 6 deletions
|
|
@ -1161,16 +1161,10 @@ class PlaceholderPlugin(object):
|
|||
# Match placeholder order by default
|
||||
order = placeholder.order
|
||||
|
||||
# We must persist the callback over time otherwise it will be removed
|
||||
# by the event system as a valid function reference. We do that here
|
||||
# always just so it's easier to develop plugins where callbacks might
|
||||
# be partials or lambdas
|
||||
placeholder.data.setdefault("callbacks", []).append(callback)
|
||||
self.log.debug("Registering '%s' callback: %s", topic, callback)
|
||||
self.builder.event_system.add_callback(topic, callback, order=order)
|
||||
|
||||
|
||||
|
||||
class PlaceholderItem(object):
|
||||
"""Item representing single item in scene that is a placeholder to process.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue