mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
replace avalon imports in pipeline
This commit is contained in:
parent
e75170d5c6
commit
3772e1d68c
5 changed files with 36 additions and 40 deletions
|
|
@ -6,13 +6,13 @@ import inspect
|
|||
from uuid import uuid4
|
||||
from contextlib import contextmanager
|
||||
|
||||
from openpype.pipeline import legacy_io
|
||||
from openpype.pipeline.mongodb import (
|
||||
AvalonMongoDB,
|
||||
session_data_from_environment,
|
||||
)
|
||||
|
||||
from .creator_plugins import (
|
||||
BaseCreator,
|
||||
Creator,
|
||||
AutoCreator,
|
||||
discover_creator_plugins,
|
||||
|
|
@ -773,12 +773,11 @@ class CreateContext:
|
|||
"""Give ability to reset avalon context.
|
||||
|
||||
Reset is based on optional host implementation of `get_current_context`
|
||||
function or using `avalon.api.Session`.
|
||||
function or using `legacy_io.Session`.
|
||||
|
||||
Some hosts have ability to change context file without using workfiles
|
||||
tool but that change is not propagated to
|
||||
"""
|
||||
import avalon.api
|
||||
|
||||
project_name = asset_name = task_name = None
|
||||
if hasattr(self.host, "get_current_context"):
|
||||
|
|
@ -789,11 +788,11 @@ class CreateContext:
|
|||
task_name = host_context.get("task_name")
|
||||
|
||||
if not project_name:
|
||||
project_name = avalon.api.Session.get("AVALON_PROJECT")
|
||||
project_name = legacy_io.Session.get("AVALON_PROJECT")
|
||||
if not asset_name:
|
||||
asset_name = avalon.api.Session.get("AVALON_ASSET")
|
||||
asset_name = legacy_io.Session.get("AVALON_ASSET")
|
||||
if not task_name:
|
||||
task_name = avalon.api.Session.get("AVALON_TASK")
|
||||
task_name = legacy_io.Session.get("AVALON_TASK")
|
||||
|
||||
if project_name:
|
||||
self.dbcon.Session["AVALON_PROJECT"] = project_name
|
||||
|
|
@ -808,7 +807,6 @@ class CreateContext:
|
|||
Reloads creators from preregistered paths and can load publish plugins
|
||||
if it's enabled on context.
|
||||
"""
|
||||
import avalon.api
|
||||
import pyblish.logic
|
||||
|
||||
from openpype.pipeline import OpenPypePyblishPluginMixin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue