mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
use AddonsManager over ModulesManager
This commit is contained in:
parent
40dee231ec
commit
fd684010a8
24 changed files with 163 additions and 117 deletions
|
|
@ -25,7 +25,7 @@ class CollectDefaultDeadlineServer(pyblish.api.ContextPlugin):
|
|||
|
||||
def process(self, context):
|
||||
try:
|
||||
deadline_module = context.data.get("openPypeModules")["deadline"]
|
||||
deadline_module = context.data["ayonAddonsManger"]["deadline"]
|
||||
except AttributeError:
|
||||
self.log.error("Cannot get OpenPype Deadline module.")
|
||||
raise AssertionError("OpenPype Deadline module not found.")
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class RoyalRenderModule(OpenPypeModule, IPluginPaths):
|
|||
return self._api
|
||||
|
||||
def __init__(self, manager, settings):
|
||||
# type: (ayon_core.modules.base.ModulesManager, dict) -> None
|
||||
# type: (ayon_core.addon.AddonsManager, dict) -> None
|
||||
self.rr_paths = {}
|
||||
self._api = None
|
||||
self.settings = settings
|
||||
|
|
|
|||
|
|
@ -31,9 +31,7 @@ class PostStartTimerHook(PostLaunchHook):
|
|||
))
|
||||
return
|
||||
|
||||
timers_manager = self.modules_manager.modules_by_name.get(
|
||||
"timers_manager"
|
||||
)
|
||||
timers_manager = self.addons_manager.get("timers_manager")
|
||||
if not timers_manager or not timers_manager.enabled:
|
||||
self.log.info((
|
||||
"Skipping starting timer because"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
Requires:
|
||||
context -> system_settings
|
||||
context -> openPypeModules
|
||||
context -> ayonAddonsManger
|
||||
"""
|
||||
|
||||
import pyblish.api
|
||||
|
|
@ -13,7 +13,7 @@ class StartTimer(pyblish.api.ContextPlugin):
|
|||
hosts = ["*"]
|
||||
|
||||
def process(self, context):
|
||||
timers_manager = context.data["openPypeModules"]["timers_manager"]
|
||||
timers_manager = context.data["ayonAddonsManger"]["timers_manager"]
|
||||
if not timers_manager.enabled:
|
||||
self.log.debug("TimersManager is disabled")
|
||||
return
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
Requires:
|
||||
context -> system_settings
|
||||
context -> openPypeModules
|
||||
context -> ayonAddonsManger
|
||||
"""
|
||||
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ class StopTimer(pyblish.api.ContextPlugin):
|
|||
hosts = ["*"]
|
||||
|
||||
def process(self, context):
|
||||
timers_manager = context.data["openPypeModules"]["timers_manager"]
|
||||
timers_manager = context.data["ayonAddonsManger"]["timers_manager"]
|
||||
if not timers_manager.enabled:
|
||||
self.log.debug("TimersManager is disabled")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue