From dd197fee9acb93d8b89fd5bbe0ad95600ce8b013 Mon Sep 17 00:00:00 2001 From: aardschok Date: Tue, 26 Sep 2017 16:50:17 +0200 Subject: [PATCH] added logging, force load specific plugins at install --- colorbleed/maya/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/colorbleed/maya/__init__.py b/colorbleed/maya/__init__.py index 9cdf6e7d14..a1afac47ac 100644 --- a/colorbleed/maya/__init__.py +++ b/colorbleed/maya/__init__.py @@ -1,4 +1,5 @@ import os +import logging from maya import cmds @@ -9,6 +10,8 @@ from pyblish import api as pyblish from . import menu from . import lib +log = logging.getLogger("colorbleed.maya") + PARENT_DIR = os.path.dirname(__file__) PACKAGE_DIR = os.path.dirname(PARENT_DIR) PLUGINS_DIR = os.path.join(PACKAGE_DIR, "plugins") @@ -17,7 +20,7 @@ PUBLISH_PATH = os.path.join(PLUGINS_DIR, "maya", "publish") LOAD_PATH = os.path.join(PLUGINS_DIR, "maya", "load") CREATE_PATH = os.path.join(PLUGINS_DIR, "maya", "create") -LOAD_AT_START = ["AbcImport", "AbcExport"] +LOAD_AT_START = ["AbcImport", "AbcExport", "mtoa"] # This is a temporary solution with the http.py clash with six.py # Maya has added paths to the PYTHONPATH which are redundant as @@ -75,12 +78,12 @@ def install(): # Add any needed plugins for plugin in LOAD_AT_START: - print "Loading %s" % plugin + log.info("Loading %s" % plugin) if cmds.pluginInfo(plugin, query=True, loaded=True): continue cmds.loadPlugin(plugin, quiet=True) - print("Installing callbacks ... ") + log.info("Installing callbacks ... ") avalon.on("init", on_init) avalon.on("new", on_new) avalon.on("save", on_save)