Add Work Files app as icon in toolbar in Maya

This commit is contained in:
Roy Nieterau 2018-12-31 12:03:08 +01:00
parent 75a032733e
commit a6c6b1ee2d
2 changed files with 13 additions and 0 deletions

View file

@ -77,6 +77,7 @@ def override_toolbox_ui():
import avalon.tools.cbsceneinventory as inventory import avalon.tools.cbsceneinventory as inventory
import avalon.tools.cbloader as loader import avalon.tools.cbloader as loader
from avalon.maya.pipeline import launch_workfiles_app
# Ensure the maya web icon on toolbox exists # Ensure the maya web icon on toolbox exists
web_button = "ToolBox|MainToolboxLayout|mayaWebButton" web_button = "ToolBox|MainToolboxLayout|mayaWebButton"
@ -97,6 +98,18 @@ def override_toolbox_ui():
background_color = (0.267, 0.267, 0.267) background_color = (0.267, 0.267, 0.267)
controls = [] controls = []
control = mc.iconTextButton(
"colorbleed_toolbox_workfiles",
annotation="Work Files",
label="Work Files",
image=os.path.join(icons, "workfiles.png"),
command=lambda: launch_workfiles_app(),
bgc=background_color,
width=icon_size,
height=icon_size,
parent=parent)
controls.append(control)
control = mc.iconTextButton( control = mc.iconTextButton(
"colorbleed_toolbox_loader", "colorbleed_toolbox_loader",
annotation="Loader", annotation="Loader",

BIN
res/icons/workfiles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B