mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
use AvalonMongoDB from openpype pipeline
This commit is contained in:
parent
b2c4210920
commit
e91d84546e
44 changed files with 77 additions and 115 deletions
|
|
@ -5,8 +5,7 @@ from openpype.lib import (
|
|||
prepare_app_environments,
|
||||
prepare_context_environments
|
||||
)
|
||||
|
||||
import avalon.api
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
|
||||
class GlobalHostDataHook(PreLaunchHook):
|
||||
|
|
@ -64,7 +63,7 @@ class GlobalHostDataHook(PreLaunchHook):
|
|||
self.data["anatomy"] = Anatomy(project_name)
|
||||
|
||||
# Mongo connection
|
||||
dbcon = avalon.api.AvalonMongoDB()
|
||||
dbcon = AvalonMongoDB()
|
||||
dbcon.Session["AVALON_PROJECT"] = project_name
|
||||
dbcon.install()
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ self.pype_tag_name = "openpypeData"
|
|||
self.default_sequence_name = "openpypeSequence"
|
||||
self.default_bin_name = "openpypeBin"
|
||||
|
||||
AVALON_CONFIG = os.getenv("AVALON_CONFIG", "pype")
|
||||
|
||||
|
||||
def flatten(_list):
|
||||
for item in _list:
|
||||
|
|
@ -49,6 +47,7 @@ def flatten(_list):
|
|||
else:
|
||||
yield item
|
||||
|
||||
|
||||
def get_current_project(remove_untitled=False):
|
||||
projects = flatten(hiero.core.projects())
|
||||
if not remove_untitled:
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ from . import lib, menu, events
|
|||
|
||||
log = Logger().get_logger(__name__)
|
||||
|
||||
AVALON_CONFIG = os.getenv("AVALON_CONFIG", "pype")
|
||||
|
||||
# plugin paths
|
||||
API_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
HOST_DIR = os.path.dirname(API_DIR)
|
||||
|
|
@ -247,15 +245,10 @@ def reload_config():
|
|||
import importlib
|
||||
|
||||
for module in (
|
||||
"avalon",
|
||||
"avalon.lib",
|
||||
"avalon.pipeline",
|
||||
"pyblish",
|
||||
"pypeapp",
|
||||
"{}.api".format(AVALON_CONFIG),
|
||||
"{}.hosts.hiero.lib".format(AVALON_CONFIG),
|
||||
"{}.hosts.hiero.menu".format(AVALON_CONFIG),
|
||||
"{}.hosts.hiero.tags".format(AVALON_CONFIG)
|
||||
"openpype.api",
|
||||
"openpype.hosts.hiero.lib",
|
||||
"openpype.hosts.hiero.menu",
|
||||
"openpype.hosts.hiero.tags"
|
||||
):
|
||||
log.info("Reloading module: {}...".format(module))
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1,23 +1,16 @@
|
|||
from maya import cmds
|
||||
import pymel.core as pm
|
||||
|
||||
import pyblish.api
|
||||
import avalon.api
|
||||
|
||||
|
||||
class CollectAssData(pyblish.api.InstancePlugin):
|
||||
"""Collect Ass data
|
||||
|
||||
"""
|
||||
"""Collect Ass data."""
|
||||
|
||||
order = pyblish.api.CollectorOrder + 0.2
|
||||
label = 'Collect Ass'
|
||||
families = ["ass"]
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
||||
context = instance.context
|
||||
|
||||
objsets = instance.data['setMembers']
|
||||
|
||||
for objset in objsets:
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ from .lib import (
|
|||
|
||||
log = Logger.get_logger(__name__)
|
||||
|
||||
AVALON_CONFIG = os.getenv("AVALON_CONFIG", "pype")
|
||||
HOST_DIR = os.path.dirname(os.path.abspath(openpype.hosts.nuke.__file__))
|
||||
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins")
|
||||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish")
|
||||
|
|
@ -79,11 +78,11 @@ def reload_config():
|
|||
"""
|
||||
|
||||
for module in (
|
||||
"{}.api".format(AVALON_CONFIG),
|
||||
"{}.hosts.nuke.api.actions".format(AVALON_CONFIG),
|
||||
"{}.hosts.nuke.api.menu".format(AVALON_CONFIG),
|
||||
"{}.hosts.nuke.api.plugin".format(AVALON_CONFIG),
|
||||
"{}.hosts.nuke.api.lib".format(AVALON_CONFIG),
|
||||
"openpype.api",
|
||||
"openpype.hosts.nuke.api.actions",
|
||||
"openpype.hosts.nuke.api.menu",
|
||||
"openpype.hosts.nuke.api.plugin",
|
||||
"openpype.hosts.nuke.api.lib",
|
||||
):
|
||||
log.info("Reloading module: {}...".format(module))
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ from collections import OrderedDict
|
|||
|
||||
import nuke
|
||||
|
||||
import avalon.api
|
||||
from openpype import api as pype
|
||||
from openpype.hosts.nuke.api import plugin
|
||||
from openpype.hosts.nuke.api.lib import (
|
||||
set_avalon_knob_data
|
||||
|
|
|
|||
|
|
@ -22,13 +22,11 @@ openpype_dir = multi_dirname(current_file, 4)
|
|||
|
||||
os.environ["OPENPYPE_MONGO"] = mongo_url
|
||||
os.environ["OPENPYPE_ROOT"] = openpype_dir
|
||||
os.environ["AVALON_MONGO"] = mongo_url
|
||||
os.environ["AVALON_PROJECT"] = project_name
|
||||
os.environ["AVALON_ASSET"] = asset_name
|
||||
os.environ["AVALON_TASK"] = task_name
|
||||
os.environ["AVALON_APP"] = host_name
|
||||
os.environ["OPENPYPE_DATABASE_NAME"] = "openpype"
|
||||
os.environ["AVALON_CONFIG"] = "openpype"
|
||||
os.environ["AVALON_TIMEOUT"] = "1000"
|
||||
os.environ["AVALON_DB"] = "avalon"
|
||||
os.environ["FTRACK_SERVER"] = ftrack_url
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import logging
|
|||
import requests
|
||||
|
||||
import pyblish.api
|
||||
import avalon.api
|
||||
|
||||
from avalon import io
|
||||
|
||||
|
|
|
|||
|
|
@ -7,18 +7,20 @@ import collections
|
|||
from aiohttp.web_response import Response
|
||||
import subprocess
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype.lib import OpenPypeMongoConnection
|
||||
from openpype_modules.avalon_apps.rest_api import _RestApiEndpoint
|
||||
from openpype.settings import get_project_settings
|
||||
|
||||
from openpype.lib import PypeLogger
|
||||
from openpype.lib import (
|
||||
OpenPypeMongoConnection,
|
||||
PypeLogger,
|
||||
)
|
||||
from openpype.lib.remote_publish import (
|
||||
get_task_data,
|
||||
ERROR_STATUS,
|
||||
REPROCESS_STATUS
|
||||
)
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype_modules.avalon_apps.rest_api import _RestApiEndpoint
|
||||
from openpype.settings import get_project_settings
|
||||
|
||||
|
||||
|
||||
log = PypeLogger.get_logger("WebServer")
|
||||
|
||||
|
|
|
|||
|
|
@ -1295,7 +1295,7 @@ def get_app_environments_for_context(
|
|||
Returns:
|
||||
dict: Environments for passed context and application.
|
||||
"""
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
# Avalon database connection
|
||||
dbcon = AvalonMongoDB()
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ def create_project(
|
|||
"""
|
||||
|
||||
from openpype.settings import ProjectSettings, SaveWarningExc
|
||||
from avalon.api import AvalonMongoDB
|
||||
from avalon.schema import validate
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.pipeline.schema import validate
|
||||
|
||||
if dbcon is None:
|
||||
dbcon = AvalonMongoDB()
|
||||
|
|
@ -333,8 +333,7 @@ def get_latest_version(asset_name, subset_name, dbcon=None, project_name=None):
|
|||
Args:
|
||||
asset_name (str): Name of asset.
|
||||
subset_name (str): Name of subset.
|
||||
dbcon (avalon.mongodb.AvalonMongoDB, optional): Avalon Mongo connection
|
||||
with Session.
|
||||
dbcon (AvalonMongoDB, optional): Avalon Mongo connection with Session.
|
||||
project_name (str, optional): Find latest version in specific project.
|
||||
|
||||
Returns:
|
||||
|
|
@ -429,7 +428,7 @@ def get_workfile_template_key_from_context(
|
|||
"`get_workfile_template_key_from_context` requires to pass"
|
||||
" one of 'dbcon' or 'project_name' arguments."
|
||||
))
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
dbcon = AvalonMongoDB()
|
||||
dbcon.Session["AVALON_PROJECT"] = project_name
|
||||
|
|
@ -1794,7 +1793,7 @@ def get_custom_workfile_template_by_string_context(
|
|||
"""
|
||||
|
||||
if dbcon is None:
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
dbcon = AvalonMongoDB()
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ def get_subset_name(
|
|||
`get_subset_name_with_asset_doc` where asset document is expected.
|
||||
"""
|
||||
if dbcon is None:
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
dbcon = AvalonMongoDB()
|
||||
dbcon.Session["AVALON_PROJECT"] = project_name
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ from bson.json_util import (
|
|||
CANONICAL_JSON_OPTIONS
|
||||
)
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
DOCUMENTS_FILE_NAME = "database"
|
||||
METADATA_FILE_NAME = "metadata"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import os
|
||||
import json
|
||||
import datetime
|
||||
|
||||
|
|
@ -6,7 +5,7 @@ from bson.objectid import ObjectId
|
|||
|
||||
from aiohttp.web_response import Response
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype_modules.webserver.base_routes import RestApiEndpoint
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import json
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.api import ProjectSettings
|
||||
from openpype.lib import create_project
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.settings import SaveWarningExc
|
||||
|
||||
from openpype_modules.ftrack.lib import (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from pymongo import UpdateOne
|
||||
from bson.objectid import ObjectId
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
from openpype_modules.ftrack.lib import (
|
||||
CUST_ATTR_ID_KEY,
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@ from pymongo import UpdateOne
|
|||
import arrow
|
||||
import ftrack_api
|
||||
|
||||
from avalon import schema
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB, schema
|
||||
|
||||
from openpype_modules.ftrack.lib import (
|
||||
get_openpype_attr,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
from openpype_modules.ftrack.lib import BaseEvent
|
||||
from openpype_modules.ftrack.lib.avalon_sync import CUST_ATTR_ID_KEY
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
from bson.objectid import ObjectId
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os
|
||||
from uuid import uuid4
|
||||
|
||||
from openpype_modules.ftrack.lib import BaseAction
|
||||
from openpype.lib.applications import (
|
||||
|
|
@ -8,7 +7,7 @@ from openpype.lib.applications import (
|
|||
ApplictionExecutableNotFound,
|
||||
CUSTOM_LAUNCH_APP_GROUPS
|
||||
)
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
|
||||
class AppplicationsAction(BaseAction):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ import uuid
|
|||
from datetime import datetime
|
||||
|
||||
from bson.objectid import ObjectId
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype_modules.ftrack.lib import BaseAction, statics_icon
|
||||
from openpype_modules.ftrack.lib.avalon_sync import create_chunks
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import uuid
|
|||
import clique
|
||||
from pymongo import UpdateOne
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype.api import Anatomy
|
||||
from openpype.lib import StringTemplate, TemplateUnsolved
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype_modules.ftrack.lib import BaseAction, statics_icon
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from openpype.lib.delivery import (
|
|||
process_single_file,
|
||||
process_sequence
|
||||
)
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
|
||||
class Delivery(BaseAction):
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import datetime
|
|||
|
||||
import ftrack_api
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.api import get_project_settings
|
||||
from openpype.lib import (
|
||||
get_workfile_template_key,
|
||||
|
|
@ -15,6 +14,7 @@ from openpype.lib import (
|
|||
Anatomy,
|
||||
StringTemplate,
|
||||
)
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype_modules.ftrack.lib import BaseAction, statics_icon
|
||||
from openpype_modules.ftrack.lib.avalon_sync import create_chunks
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import json
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.api import ProjectSettings
|
||||
from openpype.lib import create_project
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.settings import SaveWarningExc
|
||||
|
||||
from openpype_modules.ftrack.lib import (
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ import json
|
|||
import requests
|
||||
|
||||
from bson.objectid import ObjectId
|
||||
|
||||
from openpype_modules.ftrack.lib import BaseAction, statics_icon
|
||||
from openpype.api import Anatomy
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
from openpype_modules.ftrack.lib.avalon_sync import CUST_ATTR_ID_KEY
|
||||
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ class ProcessEventHub(SocketBaseEventHub):
|
|||
except pymongo.errors.AutoReconnect:
|
||||
self.pypelog.error((
|
||||
"Mongo server \"{}\" is not responding, exiting."
|
||||
).format(os.environ["AVALON_MONGO"]))
|
||||
).format(os.environ["OPENPYPE_MONGO"]))
|
||||
sys.exit(0)
|
||||
# Additional special processing of events.
|
||||
if event['topic'] == 'ftrack.meta.disconnected':
|
||||
|
|
|
|||
|
|
@ -6,16 +6,12 @@ import numbers
|
|||
|
||||
import six
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
import avalon
|
||||
|
||||
from openpype.api import (
|
||||
Logger,
|
||||
Anatomy,
|
||||
get_anatomy_settings
|
||||
)
|
||||
from openpype.lib import ApplicationManager
|
||||
from openpype.pipeline import AvalonMongoDB, schema
|
||||
|
||||
from .constants import CUST_ATTR_ID_KEY, FPS_KEYS
|
||||
from .custom_attributes import get_openpype_attr, query_custom_attributes
|
||||
|
|
@ -175,7 +171,7 @@ def check_regex(name, entity_type, in_schema=None, schema_patterns=None):
|
|||
|
||||
if not name_pattern:
|
||||
default_pattern = "^[a-zA-Z0-9_.]*$"
|
||||
schema_obj = avalon.schema._cache.get(schema_name + ".json")
|
||||
schema_obj = schema._cache.get(schema_name + ".json")
|
||||
if not schema_obj:
|
||||
name_pattern = default_pattern
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ def launch(event):
|
|||
|
||||
except pymongo.errors.AutoReconnect:
|
||||
log.error("Mongo server \"{}\" is not responding, exiting.".format(
|
||||
os.environ["AVALON_MONGO"]
|
||||
os.environ["OPENPYPE_MONGO"]
|
||||
))
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import platform
|
|||
import copy
|
||||
from collections import deque
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype_interfaces import ITrayModule
|
||||
|
|
@ -14,11 +13,14 @@ from openpype.api import (
|
|||
Anatomy,
|
||||
get_project_settings,
|
||||
get_system_settings,
|
||||
get_local_site_id)
|
||||
get_local_site_id
|
||||
)
|
||||
from openpype.lib import PypeLogger
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.settings.lib import (
|
||||
get_default_anatomy_settings,
|
||||
get_anatomy_settings)
|
||||
get_anatomy_settings
|
||||
)
|
||||
|
||||
from .providers.local_drive import LocalDriveHandler
|
||||
from .providers import lib
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
import os
|
||||
import platform
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype.modules import OpenPypeModule
|
||||
from openpype_interfaces import (
|
||||
ITrayService,
|
||||
ILaunchHookPaths
|
||||
)
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
from .exceptions import InvalidContextError
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,11 @@ import inspect
|
|||
from uuid import uuid4
|
||||
from contextlib import contextmanager
|
||||
|
||||
from openpype.pipeline.mongodb import (
|
||||
AvalonMongoDB,
|
||||
session_data_from_environment,
|
||||
)
|
||||
|
||||
from .creator_plugins import (
|
||||
BaseCreator,
|
||||
Creator,
|
||||
|
|
@ -659,10 +664,8 @@ class CreateContext:
|
|||
):
|
||||
# Create conncetion if is not passed
|
||||
if dbcon is None:
|
||||
import avalon.api
|
||||
|
||||
session = avalon.api.session_data_from_environment(True)
|
||||
dbcon = avalon.api.AvalonMongoDB(session)
|
||||
session = session_data_from_environment(True)
|
||||
dbcon = AvalonMongoDB(session)
|
||||
dbcon.install()
|
||||
|
||||
self.dbcon = dbcon
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import tempfile
|
||||
import os
|
||||
import pyblish.api
|
||||
import avalon.api
|
||||
|
||||
ValidatePipelineOrder = pyblish.api.ValidatorOrder + 0.05
|
||||
ValidateContentsOrder = pyblish.api.ValidatorOrder + 0.1
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@ import ftrack_api
|
|||
import qargparse
|
||||
from Qt import QtWidgets, QtCore
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype import style
|
||||
from openpype.pipeline import load
|
||||
from openpype.pipeline import load, AvalonMongoDB
|
||||
from openpype.lib import StringTemplate
|
||||
from openpype.api import Anatomy
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ from collections import defaultdict
|
|||
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype.pipeline import load
|
||||
from openpype.pipeline import load, AvalonMongoDB
|
||||
from openpype.api import Anatomy, config
|
||||
from openpype import resources, style
|
||||
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ class MongoSettingsHandler(SettingsHandler):
|
|||
def __init__(self):
|
||||
# Get mongo connection
|
||||
from openpype.lib import OpenPypeMongoConnection
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
settings_collection = OpenPypeMongoConnection.get_mongo_client()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import os
|
|||
import json
|
||||
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype import style
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.tools.utils.lib import center_window
|
||||
from openpype.tools.utils.assets_widget import SingleSelectAssetsWidget
|
||||
from openpype.tools.utils.constants import (
|
||||
|
|
|
|||
|
|
@ -3,10 +3,9 @@ import logging
|
|||
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from openpype import style
|
||||
from openpype.api import resources
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
import qtawesome
|
||||
from .models import (
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import sys
|
|||
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype import style
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.tools.utils import lib as tools_lib
|
||||
from openpype.tools.loader.widgets import (
|
||||
ThumbnailWidget,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ if __name__ == '__main__':
|
|||
os.environ["AVALON_DB"] = "avalon"
|
||||
os.environ["AVALON_TIMEOUT"] = "1000"
|
||||
os.environ["OPENPYPE_DEBUG"] = "1"
|
||||
os.environ["AVALON_CONFIG"] = "pype"
|
||||
os.environ["AVALON_ASSET"] = "Jungle"
|
||||
|
||||
# Set the exception hook to our wrapping function
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ from openpype.lib import (
|
|||
PROJECT_NAME_REGEX
|
||||
)
|
||||
from openpype.style import load_stylesheet
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.tools.utils import (
|
||||
PlaceholderLineEdit,
|
||||
get_warning_pixmap
|
||||
)
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ from .style import ResourceCache
|
|||
from openpype.style import load_stylesheet
|
||||
from openpype.lib import is_admin_password_required
|
||||
from openpype.widgets import PasswordDialog
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
|
||||
from openpype import resources
|
||||
from openpype.api import (
|
||||
|
|
@ -23,7 +24,6 @@ from openpype.api import (
|
|||
create_project_folders,
|
||||
Logger
|
||||
)
|
||||
from avalon.api import AvalonMongoDB
|
||||
|
||||
|
||||
class ProjectManagerWindow(QtWidgets.QWidget):
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
import os
|
||||
import copy
|
||||
import uuid
|
||||
from Qt import QtWidgets, QtCore, QtGui
|
||||
import qtawesome
|
||||
from avalon.mongodb import (
|
||||
AvalonMongoConnection,
|
||||
AvalonMongoDB
|
||||
)
|
||||
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.style import get_objected_colors
|
||||
from openpype.tools.utils.widgets import ImageButton
|
||||
from openpype.tools.utils.lib import paint_image_with_color
|
||||
|
|
@ -1209,15 +1205,6 @@ class ProjectListWidget(QtWidgets.QWidget):
|
|||
selected_project = index.data(PROJECT_NAME_ROLE)
|
||||
break
|
||||
|
||||
mongo_url = os.environ["OPENPYPE_MONGO"]
|
||||
|
||||
# Force uninstall of whole avalon connection if url does not match
|
||||
# to current environment and set it as environment
|
||||
if mongo_url != os.environ["AVALON_MONGO"]:
|
||||
AvalonMongoConnection.uninstall(self.dbcon, force=True)
|
||||
os.environ["AVALON_MONGO"] = mongo_url
|
||||
self.dbcon = None
|
||||
|
||||
if not self.dbcon:
|
||||
try:
|
||||
self.dbcon = AvalonMongoDB()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from .widgets import (
|
|||
from .widgets.constants import HOST_NAME
|
||||
from openpype import style
|
||||
from openpype.api import resources
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import AvalonMongoDB
|
||||
from openpype.modules import ModulesManager
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ publishing plugins.
|
|||
|
||||
from Qt import QtWidgets, QtCore
|
||||
|
||||
from avalon.api import AvalonMongoDB
|
||||
from openpype.pipeline import install_host
|
||||
from openpype.pipeline import (
|
||||
install_host,
|
||||
AvalonMongoDB,
|
||||
)
|
||||
from openpype.hosts.traypublisher import (
|
||||
api as traypublisher
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue