mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Move -noAutoLoadPlugins flag to separate hook.
This commit is contained in:
parent
4bfb4aa757
commit
6d2a45e951
2 changed files with 16 additions and 6 deletions
|
|
@ -44,15 +44,10 @@ class AddLastWorkfileToLaunchArgs(PreLaunchHook):
|
|||
|
||||
# Determine whether to open workfile post initialization.
|
||||
if self.host_name == "maya":
|
||||
maya_settings = self.data["project_settings"]["maya"]
|
||||
|
||||
if maya_settings["explicit_plugins_loading"]["enabled"]:
|
||||
self.log.debug("Explicit plugins loading.")
|
||||
self.launch_context.launch_args.append("-noAutoloadPlugins")
|
||||
|
||||
keys = [
|
||||
"open_workfile_post_initialization", "explicit_plugins_loading"
|
||||
]
|
||||
maya_settings = self.data["project_settings"]["maya"]
|
||||
values = [maya_settings[k] for k in keys]
|
||||
if any(values):
|
||||
self.log.debug("Opening workfile post initialization.")
|
||||
|
|
|
|||
15
openpype/hosts/maya/hooks/pre_auto_load_plugins.py
Normal file
15
openpype/hosts/maya/hooks/pre_auto_load_plugins.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from openpype.lib import PreLaunchHook
|
||||
|
||||
|
||||
class PreAutoLoadPlugins(PreLaunchHook):
|
||||
"""Define -noAutoloadPlugins command flag."""
|
||||
|
||||
# Execute before workfile argument.
|
||||
order = 0
|
||||
app_groups = ["maya"]
|
||||
|
||||
def execute(self):
|
||||
maya_settings = self.data["project_settings"]["maya"]
|
||||
if maya_settings["explicit_plugins_loading"]["enabled"]:
|
||||
self.log.debug("Explicit plugins loading.")
|
||||
self.launch_context.launch_args.append("-noAutoloadPlugins")
|
||||
Loading…
Add table
Add a link
Reference in a new issue