mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
moved settings and lib imports to top
This commit is contained in:
parent
58fb25d86f
commit
bd7ef7e652
1 changed files with 3 additions and 6 deletions
|
|
@ -4,8 +4,10 @@ import os
|
|||
import functools
|
||||
import logging
|
||||
|
||||
from .settings import get_project_settings
|
||||
from .lib import Anatomy, filter_pyblish_plugins
|
||||
|
||||
pyblish = avalon = filter_pyblish_plugins = None
|
||||
get_project_settings = Anatomy = None
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -28,15 +30,10 @@ def import_wrapper(func):
|
|||
def decorated(*args, **kwargs):
|
||||
global pyblish
|
||||
global avalon
|
||||
global get_project_settings
|
||||
global Anatomy
|
||||
global filter_pyblish_plugins
|
||||
global _original_discover
|
||||
if pyblish is None:
|
||||
from pyblish import api as pyblish
|
||||
from avalon import api as avalon
|
||||
from .api import Anatomy, get_project_settings
|
||||
from .lib import filter_pyblish_plugins
|
||||
|
||||
# we are monkey patching `avalon.api.discover()` to allow us to
|
||||
# load plugin presets on plugins being discovered by avalon.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue