Remove pyblish callback which does nothing in new publisher

This commit is contained in:
Roy Nieterau 2023-03-07 17:41:03 +01:00
parent 2254414613
commit 5c8bbe2871

View file

@ -102,9 +102,6 @@ class FusionHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost):
register_creator_plugin_path(CREATE_PATH)
register_inventory_action_path(INVENTORY_PATH)
pyblish.api.register_callback(
"instanceToggled", on_pyblish_instance_toggled)
# Register events
register_event_callback("open", on_after_open)
register_event_callback("save", on_save)
@ -163,29 +160,6 @@ class FusionHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost):
return comp.GetData("openpype") or {}
def on_pyblish_instance_toggled(instance, old_value, new_value):
"""Toggle saver tool passthrough states on instance toggles."""
comp = instance.context.data.get("currentComp")
if not comp:
return
savers = [tool for tool in instance if
getattr(tool, "ID", None) == "Saver"]
if not savers:
return
# Whether instances should be passthrough based on new value
passthrough = not new_value
with comp_lock_and_undo_chunk(comp,
undo_queue_name="Change instance "
"active state"):
for tool in savers:
attrs = tool.GetAttrs()
current = attrs["TOOLB_PassThrough"]
if current != passthrough:
tool.SetAttrs({"TOOLB_PassThrough": passthrough})
def on_new(event):
comp = event["Rets"]["comp"]
validate_comp_prefs(comp, force_repair=True)