mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
replaced api.Session with io.Session
This commit is contained in:
parent
1fcb4e836f
commit
62160ab368
3 changed files with 7 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ import sys
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
from avalon.vendor.Qt import QtWidgets, QtCore, QtGui
|
from avalon.vendor.Qt import QtWidgets, QtCore, QtGui
|
||||||
from avalon import io, api, style
|
from avalon import io, style
|
||||||
|
|
||||||
from avalon.tools import lib as tools_lib
|
from avalon.tools import lib as tools_lib
|
||||||
from avalon.tools.widgets import AssetWidget
|
from avalon.tools.widgets import AssetWidget
|
||||||
|
|
@ -197,7 +197,7 @@ class AssetsPanel(QtWidgets.QWidget):
|
||||||
|
|
||||||
def on_project_changed(self):
|
def on_project_changed(self):
|
||||||
project_name = self.project_bar.get_current_project()
|
project_name = self.project_bar.get_current_project()
|
||||||
api.Session["AVALON_PROJECT"] = project_name
|
io.Session["AVALON_PROJECT"] = project_name
|
||||||
self.assets_widget.refresh()
|
self.assets_widget.refresh()
|
||||||
|
|
||||||
# Force asset change callback to ensure tasks are correctly reset
|
# Force asset change callback to ensure tasks are correctly reset
|
||||||
|
|
@ -220,7 +220,7 @@ class AssetsPanel(QtWidgets.QWidget):
|
||||||
|
|
||||||
def get_current_session(self):
|
def get_current_session(self):
|
||||||
asset_doc = self.assets_widget.get_active_asset_document()
|
asset_doc = self.assets_widget.get_active_asset_document()
|
||||||
session = copy.deepcopy(api.Session)
|
session = copy.deepcopy(io.Session)
|
||||||
|
|
||||||
# Clear some values that we are about to collect if available
|
# Clear some values that we are about to collect if available
|
||||||
session.pop("AVALON_SILO", None)
|
session.pop("AVALON_SILO", None)
|
||||||
|
|
@ -407,7 +407,7 @@ class Window(QtWidgets.QDialog):
|
||||||
# Assets page
|
# Assets page
|
||||||
return self.asset_panel.get_current_session()
|
return self.asset_panel.get_current_session()
|
||||||
|
|
||||||
session = copy.deepcopy(api.Session)
|
session = copy.deepcopy(io.Session)
|
||||||
|
|
||||||
# Remove some potential invalid session values
|
# Remove some potential invalid session values
|
||||||
# that we know are not set when not browsing in
|
# that we know are not set when not browsing in
|
||||||
|
|
@ -664,7 +664,7 @@ def cli(args):
|
||||||
actions.register_environment_actions()
|
actions.register_environment_actions()
|
||||||
io.install()
|
io.install()
|
||||||
|
|
||||||
#api.Session["AVALON_PROJECT"] = project
|
#io.Session["AVALON_PROJECT"] = project
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
sys.excepthook = lambda typ, val, tb: traceback.print_last()
|
sys.excepthook = lambda typ, val, tb: traceback.print_last()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import os
|
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
import collections
|
import collections
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import copy
|
import copy
|
||||||
from Qt import QtWidgets, QtCore, QtGui
|
from Qt import QtWidgets, QtCore, QtGui
|
||||||
from avalon.vendor import qtawesome
|
from avalon.vendor import qtawesome
|
||||||
from avalon import api
|
from avalon import io
|
||||||
|
|
||||||
from .delegates import ActionDelegate
|
from .delegates import ActionDelegate
|
||||||
from .models import TaskModel, ActionModel, ProjectModel
|
from .models import TaskModel, ActionModel, ProjectModel
|
||||||
|
|
@ -37,7 +37,7 @@ class ProjectBar(QtWidgets.QWidget):
|
||||||
self.project_combobox.currentIndexChanged.connect(self.project_changed)
|
self.project_combobox.currentIndexChanged.connect(self.project_changed)
|
||||||
|
|
||||||
# Set current project by default if it's set.
|
# Set current project by default if it's set.
|
||||||
project_name = api.Session.get("AVALON_PROJECT")
|
project_name = io.Session.get("AVALON_PROJECT")
|
||||||
if project_name:
|
if project_name:
|
||||||
self.set_project(project_name)
|
self.set_project(project_name)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue