示例#1
0
 def get_anim_shelf_path():
     """ Using the anim_shelfUtils, obtains the dynamic file path for the animation tool shelf
     Returns (str): path to the anim shelf
     """
     try:
         from mpc.maya.animationTools.utils import anim_shelfUtils
         reload(anim_shelfUtils)
         shelf_path = os.path.join(anim_shelfUtils.getShelfDir(), "shelf_mpcAnim.mel")
         return shelf_path if os.path.isfile(shelf_path) else None
     except:
         return ""
示例#2
0
def reload_animShelf():
	show = os.environ[ "JOB" ]
	shelfName = "%sAnim" %show
	shelfFileName = "shelf_mpcAnim.mel"
	shelfDir = anim_shelfUtils.getShelfDir ()

	if shelfDir:
		checkJobShelf = os.path.isfile ( os.path.join (shelfDir,shelfFileName))
		if checkJobShelf:
			shelfPath = os.path.join ( shelfDir, shelfFileName)
		elif os.path.isfile ( os.path.join (shelfDir, "shelf_mpcAnim.mel")):
			shelfName = "mpcAnim"
			shelfFileName = "shelf_mpcAnim.mel"
			shelfPath = os.path.join ( shelfDir, shelfFileName)    
			
		print 'loading shelf: %s' % shelfPath
		shelf_reloader(customShelf=shelfPath)