standalone publisher has defined host name in constants and is set on startup

This commit is contained in:
iLLiCiTiT 2021-03-01 11:30:37 +01:00
parent 86912ee713
commit 770f62e6fa
3 changed files with 7 additions and 2 deletions

View file

@ -9,6 +9,7 @@ from Qt import QtWidgets, QtCore, QtGui
from .widgets import (
AssetWidget, FamilyWidget, ComponentsWidget, ShadowWidget
)
from .widgets.constants import HOST_NAME
from avalon import style
from pype.api import resources
from avalon.api import AvalonMongoDB
@ -208,6 +209,8 @@ class Window(QtWidgets.QDialog):
def main():
os.environ["AVALON_APP"] = HOST_NAME
# Allow to change icon of running process in windows taskbar
if os.name == "nt":
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(

View file

@ -0,0 +1 @@
HOST_NAME = "standalonepublisher"

View file

@ -7,6 +7,7 @@ import string
from Qt import QtWidgets, QtCore
from . import DropDataFrame
from .constants import HOST_NAME
from avalon import io
from pype.api import execute, Logger
from pype.lib import get_pype_execute_args
@ -178,8 +179,8 @@ def set_context(project, asset, task):
io.Session["current_dir"] = os.path.normpath(os.getcwd())
os.environ["AVALON_APP"] = "standalonepublish"
io.Session["AVALON_APP"] = "standalonepublish"
os.environ["AVALON_APP"] = HOST_NAME
io.Session["AVALON_APP"] = HOST_NAME
io.uninstall()