Skip to content

Instantly share code, notes, and snippets.

@fereria
Created March 11, 2014 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fereria/9486934 to your computer and use it in GitHub Desktop.
Save fereria/9486934 to your computer and use it in GitHub Desktop.
exportExpression
def exportExpression(exp_path):
selectNode = pm.ls(sl=True,type="expression")
exportFileList = []
for exp_node in selectNode:
nodeName = exp_node.name()
nodeName = re.sub(":","_",nodeName)
savePath = os.path.join(exp_path,nodeName+".txt")
IO = fileIO.fileIO(savePath)
IO.writeLines([exp_node.getString()])
exportFileList.append(savePath)
return exportFileList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment