Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register host-specific Deadline plugins only on install of the host #6

Merged
9 changes: 9 additions & 0 deletions client/ayon_deadline/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from ayon_core.lib import Logger
from ayon_core.addon import AYONAddon, IPluginPaths

import pyblish.api

from .version import __version__


Expand Down Expand Up @@ -42,6 +44,13 @@ def get_plugin_paths(self):
"publish": [os.path.join(current_dir, "plugins", "publish")]
}

def on_host_install(self, host, host_name, project_name):
BigRoy marked this conversation as resolved.
Show resolved Hide resolved
print(f"Registering deadline publish plug-ins for host {host_name}..")
# Register host-specific publish plugins
current_dir = os.path.dirname(os.path.abspath(__file__))
path = os.path.join(current_dir, "plugins", "publish", host_name)
pyblish.api.register_plugin_path(path)

@staticmethod
def get_deadline_pools(webservice, auth=None, log=None):
"""Get pools from Deadline.
Expand Down