mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
removed "default actions" and it's registration function
This commit is contained in:
parent
ef208e715d
commit
db0f6dcefe
2 changed files with 1 additions and 63 deletions
|
|
@ -22,7 +22,6 @@ class LauncherAction(PypeModule, ITrayAction):
|
|||
# Register actions
|
||||
if self.tray_initialized:
|
||||
from openpype.tools.launcher import actions
|
||||
# actions.register_default_actions()
|
||||
actions.register_config_actions()
|
||||
actions_paths = self.manager.collect_plugin_paths()["actions"]
|
||||
actions.register_actions_from_paths(actions_paths)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import os
|
||||
import importlib
|
||||
|
||||
from avalon import api, lib, style
|
||||
from avalon import api, style
|
||||
from openpype import PLUGINS_DIR
|
||||
from openpype.api import Logger, resources
|
||||
from openpype.lib import (
|
||||
|
|
@ -11,66 +10,6 @@ from openpype.lib import (
|
|||
from Qt import QtWidgets, QtGui
|
||||
|
||||
|
||||
class ProjectManagerAction(api.Action):
|
||||
name = "projectmanager"
|
||||
label = "Project Manager"
|
||||
icon = "gear"
|
||||
order = 999 # at the end
|
||||
|
||||
def is_compatible(self, session):
|
||||
return "AVALON_PROJECT" in session
|
||||
|
||||
def process(self, session, **kwargs):
|
||||
return lib.launch(
|
||||
executable="python",
|
||||
args=[
|
||||
"-u", "-m", "avalon.tools.projectmanager",
|
||||
session['AVALON_PROJECT']
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class LoaderAction(api.Action):
|
||||
name = "loader"
|
||||
label = "Loader"
|
||||
icon = "cloud-download"
|
||||
order = 998
|
||||
|
||||
def is_compatible(self, session):
|
||||
return "AVALON_PROJECT" in session
|
||||
|
||||
def process(self, session, **kwargs):
|
||||
return lib.launch(
|
||||
executable="python",
|
||||
args=[
|
||||
"-u", "-m", "avalon.tools.loader", session['AVALON_PROJECT']
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class LoaderLibrary(api.Action):
|
||||
name = "loader_os"
|
||||
label = "Library Loader"
|
||||
icon = "book"
|
||||
order = 997 # at the end
|
||||
|
||||
def is_compatible(self, session):
|
||||
return True
|
||||
|
||||
def process(self, session, **kwargs):
|
||||
return lib.launch(
|
||||
executable="python",
|
||||
args=["-u", "-m", "avalon.tools.libraryloader"]
|
||||
)
|
||||
|
||||
|
||||
def register_default_actions():
|
||||
"""Register default actions for Launcher"""
|
||||
api.register_plugin(api.Action, ProjectManagerAction)
|
||||
api.register_plugin(api.Action, LoaderAction)
|
||||
api.register_plugin(api.Action, LoaderLibrary)
|
||||
|
||||
|
||||
def register_actions_from_paths(paths):
|
||||
if not paths:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue