moved io install into host api

This commit is contained in:
Jakub Trllo 2022-02-21 19:00:50 +01:00
parent bed0a09e63
commit 70537ecfd4
2 changed files with 3 additions and 9 deletions

View file

@ -3,6 +3,7 @@ import json
import tempfile
import atexit
from avalon import io
import avalon.api
import pyblish.api
@ -172,10 +173,8 @@ def install():
def set_project_name(project_name):
# Deregister project specific plugins and register new project plugins
old_project_name = HostContext.get_project_name()
if old_project_name is not None and old_project_name != project_name:
pass
# TODO Deregister project specific plugins and register new project plugins
os.environ["AVALON_PROJECT"] = project_name
avalon.api.Session["AVALON_PROJECT"] = project_name
io.install()
HostContext.set_project_name(project_name)

View file

@ -6,11 +6,9 @@ Tray publisher can be considered as host implementeation with creators and
publishing plugins.
"""
import os
from Qt import QtWidgets, QtCore
import avalon.api
from avalon import io
from avalon.api import AvalonMongoDB
from openpype.hosts.traypublisher import (
api as traypublisher
@ -143,9 +141,6 @@ class TrayPublishWindow(PublisherWindow):
# TODO register project specific plugin paths
self.controller.save_changes()
self.controller.reset_project_data_cache()
os.environ["AVALON_PROJECT"] = project_name
io.Session["AVALON_PROJECT"] = project_name
io.install()
self.reset()
if not self.controller.instances: