#### If you'd like to add a shelf button, you can add it to #### shelf.json. Follow the example of the other buttons in there. #### Remember, the icon must be a 33X33 .xpm, and the pythonFile key #### must be the name of the file where your python script is #### stored. (Careful, it's not an absolute path!) #### import pymel.core as pm import os import sys import json from byuam.environment import Environment byuEnv = Environment() #### CONSTANTS, Edit these for customization. PROJ = byuEnv.get_project_name() SHELF_DIR = os.environ.get('MAYA_SHELF_DIR') ICON_DIR = os.path.join(SHELF_DIR, "icons") ICON_DIR = os.path.join(os.environ.get('BYU_TOOLS_DIR'), "assets", "images", "icons", "tool-icons") SCRIPT_DIR = os.path.join(SHELF_DIR, "scripts") #### #### Shelf building code. You shouldn't have to edit anything #### below these lines. If you want to add a new shelf item, #### follow the instructions in shelf.json. sys.path.append(SCRIPT_DIR) def BYU_load_shelf(): BYU_delete_shelf()
#### If you'd like to add a shelf button, you can add it to #### shelf.json. Follow the example of the other buttons in there. #### Remember, the icon must be a 33X33 .xpm, and the python_file key #### must be the name of the file where your python script is #### stored. (Careful, it's not an absolute path!) #### from pymel.core import * import os import sys import json from byuam.environment import Environment env = Environment() #### CONSTANTS, Edit these for customization. PROJ = env.get_project_name() SHELF_DIR = os.environ.get('MAYA_SHELF_DIR') ICON_DIR = os.path.join(SHELF_DIR, "icons") SCRIPT_DIR = os.path.join(SHELF_DIR, "scripts") #### #### Shelf building code. You shouldn't have to edit anything #### below these lines. If you want to add a new shelf item, #### follow the instructions in shelf.json. sys.path.append(SCRIPT_DIR) def BYU_load_shelf(): BYU_delete_shelf() gShelfTopLevel = mel.eval(
#### If you'd like to add a shelf button, you can add it to #### shelf.json. Follow the example of the other buttons in there. #### Remember, the icon must be a 33X33 .xpm, and the python_file key #### must be the name of the file where your python script is #### stored. (Careful, it's not an absolute path!) #### from pymel.core import * import os import sys import json from byuam.environment import Environment env = Environment() #### CONSTANTS, Edit these for customization. PROJ = env.get_project_name() SHELF_DIR = os.environ.get('MAYA_SHELF_DIR') ICON_DIR = os.path.join(SHELF_DIR, "icons") SCRIPT_DIR = os.path.join(SHELF_DIR, "scripts") #### #### Shelf building code. You shouldn't have to edit anything #### below these lines. If you want to add a new shelf item, #### follow the instructions in shelf.json. sys.path.append(SCRIPT_DIR) def BYU_load_shelf(): BYU_delete_shelf() gShelfTopLevel = mel.eval('global string $gShelfTopLevel; string $temp=$gShelfTopLevel') shelfLayout(PROJ, cellWidth=33, cellHeight=33, p=gShelfTopLevel)