Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.