Skip to content

Commit

Permalink
Fix #4: Register host-specific Deadline plugins only on install of th…
Browse files Browse the repository at this point in the history
…e host
  • Loading branch information
BigRoy committed Jul 8, 2024
1 parent bcbf25b commit c386aeb
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 0 deletions.
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):
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

0 comments on commit c386aeb

Please sign in to comment.