mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fitting Pyblish-qml to half screen width and 3/4 height, plus clean up.
This commit is contained in:
parent
f5e5e407d3
commit
5661d9e0fb
1 changed files with 14 additions and 3 deletions
|
|
@ -2,9 +2,7 @@ import os
|
|||
|
||||
from pyblish import api as pyblish
|
||||
from avalon import api as avalon
|
||||
|
||||
from .launcher_actions import register_launcher_actions
|
||||
from .lib import collect_container_metadata
|
||||
from Qt import QtWidgets
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
@ -27,6 +25,19 @@ def install():
|
|||
pyblish.register_plugin_path(PUBLISH_PATH)
|
||||
avalon.register_plugin_path(avalon.Loader, LOAD_PATH)
|
||||
|
||||
# pyblish-qml settings.
|
||||
try:
|
||||
__import__("pyblish_qml")
|
||||
except ImportError as e:
|
||||
log.error("Could not load pyblish-qml: %s " % e)
|
||||
else:
|
||||
from pyblish_qml import settings
|
||||
app = QtWidgets.QApplication.instance()
|
||||
screen_resolution = app.desktop().screenGeometry()
|
||||
width, height = screen_resolution.width(), screen_resolution.height()
|
||||
settings.WindowSize = (width / 2, height * 0.75)
|
||||
settings.WindowPosition = (0, 0)
|
||||
|
||||
|
||||
def uninstall():
|
||||
log.info("Deregistering global plug-ins..")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue