Skip to content

Commit

Permalink
Merge pull request #6 from BigRoy/enhancement/register_host_specific_…
Browse files Browse the repository at this point in the history
…plugins

Register host-specific Deadline plugins only on install of the host
  • Loading branch information
iLLiCiTiT authored Jul 12, 2024
2 parents d11b188 + 35fd981 commit 4f02e8b
Show file tree
Hide file tree
Showing 22 changed files with 18 additions and 5 deletions.
19 changes: 15 additions & 4 deletions client/ayon_deadline/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from .version import __version__


DEADLINE_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))


class DeadlineWebserviceError(Exception):
"""
Exception to throw when connection to Deadline server fails.
Expand Down Expand Up @@ -37,10 +40,18 @@ def initialize(self, studio_settings):

def get_plugin_paths(self):
"""Deadline plugin paths."""
current_dir = os.path.dirname(os.path.abspath(__file__))
return {
"publish": [os.path.join(current_dir, "plugins", "publish")]
}
# Note: We are not returning `publish` key because we have overridden
# `get_publish_plugin_paths` to return paths host-specific. However,
# `get_plugin_paths` still needs to be implemented because it's
# abstract on the parent class
return {}

def get_publish_plugin_paths(self, host_name=None):
publish_dir = os.path.join(DEADLINE_ADDON_ROOT, "plugins", "publish")
paths = [os.path.join(publish_dir, "global")]
if host_name:
paths.append(os.path.join(publish_dir, host_name))
return paths

@staticmethod
def get_deadline_pools(webservice, auth=None, log=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,10 @@ def _get_husk_standalone_plugin_info(self, instance, hou_major_minor):


class HoudiniSubmitDeadlineUsdRender(HoudiniSubmitDeadline):
label = "Submit Render to Deadline (USD)"
families = ["usdrender"]

# Do not use published workfile paths for USD Render ROP because the
# Export Job doesn't seem to occur using the published path either, so
# output paths then do not match the actual rendered paths
use_published = False
families = ["usdrender"]

0 comments on commit 4f02e8b

Please sign in to comment.