all tools are tried to import

This commit is contained in:
iLLiCiTiT 2020-07-22 18:56:20 +02:00
parent f7740839b7
commit f7aa0a83da

View file

@ -69,11 +69,30 @@ def override_component_mask_commands():
def override_toolbox_ui():
"""Add custom buttons in Toolbox as replacement for Maya web help icon."""
inventory = None
loader = None
launch_workfiles_app = None
mayalookassigner = None
try:
import avalon.tools.sceneinventory as inventory
except Exception:
log.warning("Could not import SceneInventory tool")
try:
import avalon.tools.loader as loader
except Exception:
log.warning("Could not import Loader tool")
try:
from avalon.maya.pipeline import launch_workfiles_app
except Exception:
log.warning("Could not import Workfiles tool")
try:
import mayalookassigner
except Exception:
log.warning("Could not import Maya Look assigner tool")
import avalon.tools.sceneinventory as inventory
import avalon.tools.loader as loader
from avalon.maya.pipeline import launch_workfiles_app
import mayalookassigner
from pype.api import resources
icons = resources.get_resource("icons")