mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
changed usage of registered root
This commit is contained in:
parent
c49791258a
commit
eabe2fe569
3 changed files with 7 additions and 3 deletions
|
|
@ -134,6 +134,7 @@ class AvalonURIOutputProcessor(base.OutputProcessorBase):
|
|||
"""
|
||||
|
||||
from avalon import api, io
|
||||
from openpype.pipeline import registered_root
|
||||
|
||||
PROJECT = api.Session["AVALON_PROJECT"]
|
||||
asset_doc = io.find_one({"name": asset,
|
||||
|
|
@ -141,7 +142,7 @@ class AvalonURIOutputProcessor(base.OutputProcessorBase):
|
|||
if not asset_doc:
|
||||
raise RuntimeError("Invalid asset name: '%s'" % asset)
|
||||
|
||||
root = api.registered_root()
|
||||
root = registered_root()
|
||||
path = self._template.format(**{
|
||||
"root": root,
|
||||
"project": PROJECT,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ except ImportError:
|
|||
from mvpxr import Usd, UsdGeom, Sdf, Kind
|
||||
|
||||
from avalon import io, api
|
||||
from openpype.pipeline import registered_root
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -323,7 +324,7 @@ def get_usd_master_path(asset, subset, representation):
|
|||
|
||||
path = template.format(
|
||||
**{
|
||||
"root": api.registered_root(),
|
||||
"root": registered_root(),
|
||||
"project": api.Session["AVALON_PROJECT"],
|
||||
"asset": asset_doc["name"],
|
||||
"subset": subset,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import six
|
|||
from bson.objectid import ObjectId
|
||||
|
||||
from avalon import io, schema
|
||||
from avalon.api import Session, registered_root
|
||||
from avalon.api import Session
|
||||
|
||||
from openpype.lib import Anatomy
|
||||
|
||||
|
|
@ -532,6 +532,8 @@ def get_representation_path(representation, root=None, dbcon=None):
|
|||
dbcon = io
|
||||
|
||||
if root is None:
|
||||
from openpype.pipeline import registered_root
|
||||
|
||||
root = registered_root()
|
||||
|
||||
def path_from_represenation():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue