Skip to content

Instantly share code, notes, and snippets.

@PeterDrakeNichols
Created July 4, 2017 18:16
Show Gist options
  • Save PeterDrakeNichols/3d8a2297e9d2c2ff44b3fe7be5b7920b to your computer and use it in GitHub Desktop.
Save PeterDrakeNichols/3d8a2297e9d2c2ff44b3fe7be5b7920b to your computer and use it in GitHub Desktop.
"""
curves @ utils
parses paths to curve.mb's from assets/crvSrc folder
EXAMPLES:
#imports the first curve in crvSrc folder
mc.file(rigLib.utils.curves.curvesList[0], i=1)
#prints a list of curves in crvSrc folder
print rigLib.utils.curves.curvesList
"""
import maya.cmds as mc
import glob
from rigLib.config import projectPath
fp = projectPath + '/assets/curveSrc/%s'
curvesValueList = [ f.replace('\\','/') for f in glob.glob(fp %'*.mb')]
curvesKeyList = [f.split('/')[-1].replace('_crv.mb', '') for f in curvesValueList]
curvesDict = dict(zip(curvesKeyList,curvesValueList))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment