mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #5974 from ynput/enhancement/AYON-resolve-menu-rename
Resolve: renaming menu to AYON
This commit is contained in:
commit
768cb2ac0c
3 changed files with 36 additions and 2 deletions
|
|
@ -7,6 +7,9 @@ from openpype.tools.utils import host_tools
|
|||
from openpype.pipeline import registered_host
|
||||
|
||||
|
||||
MENU_LABEL = os.environ["AVALON_LABEL"]
|
||||
|
||||
|
||||
def load_stylesheet():
|
||||
path = os.path.join(os.path.dirname(__file__), "menu_style.qss")
|
||||
if not os.path.exists(path):
|
||||
|
|
@ -39,7 +42,7 @@ class OpenPypeMenu(QtWidgets.QWidget):
|
|||
def __init__(self, *args, **kwargs):
|
||||
super(OpenPypeMenu, self).__init__(*args, **kwargs)
|
||||
|
||||
self.setObjectName("OpenPypeMenu")
|
||||
self.setObjectName(f"{MENU_LABEL}Menu")
|
||||
|
||||
self.setWindowFlags(
|
||||
QtCore.Qt.Window
|
||||
|
|
@ -49,7 +52,7 @@ class OpenPypeMenu(QtWidgets.QWidget):
|
|||
| QtCore.Qt.WindowStaysOnTopHint
|
||||
)
|
||||
|
||||
self.setWindowTitle("OpenPype")
|
||||
self.setWindowTitle(f"{MENU_LABEL}")
|
||||
save_current_btn = QtWidgets.QPushButton("Save current file", self)
|
||||
workfiles_btn = QtWidgets.QPushButton("Workfiles ...", self)
|
||||
create_btn = QtWidgets.QPushButton("Create ...", self)
|
||||
|
|
|
|||
22
openpype/hosts/resolve/utility_scripts/AYON__Menu.py
Normal file
22
openpype/hosts/resolve/utility_scripts/AYON__Menu.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from openpype.pipeline import install_host
|
||||
from openpype.lib import Logger
|
||||
|
||||
log = Logger.get_logger(__name__)
|
||||
|
||||
|
||||
def main(env):
|
||||
from openpype.hosts.resolve.api import ResolveHost, launch_pype_menu
|
||||
|
||||
# activate resolve from openpype
|
||||
host = ResolveHost()
|
||||
install_host(host)
|
||||
|
||||
launch_pype_menu()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
result = main(os.environ)
|
||||
sys.exit(not bool(result))
|
||||
|
|
@ -2,6 +2,7 @@ import os
|
|||
import shutil
|
||||
from openpype.lib import Logger, is_running_from_build
|
||||
|
||||
from openpype import AYON_SERVER_ENABLED
|
||||
RESOLVE_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
|
|
@ -54,6 +55,14 @@ def setup(env):
|
|||
src = os.path.join(directory, script)
|
||||
dst = os.path.join(util_scripts_dir, script)
|
||||
|
||||
# TODO: remove this once we have a proper solution
|
||||
if AYON_SERVER_ENABLED:
|
||||
if "OpenPype__Menu.py" == script:
|
||||
continue
|
||||
else:
|
||||
if "AYON__Menu.py" == script:
|
||||
continue
|
||||
|
||||
# TODO: Make this a less hacky workaround
|
||||
if script == "openpype_startup.scriptlib":
|
||||
# Handle special case for scriptlib that needs to be a folder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue