Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
importExpression
def importExpression(exp_path):
if os.path.exists(exp_path) == True:
expName = os.path.splitext(os.path.basename(exp_path))[0]
if pm.objExists(expName) == True:
expObj = pm.PyNode(expName)
else:
expObj = pm.nodetypes.Expression(n=expName)
exp_io = fileIO.fileIO(exp_path)
flag,lists = exp_io.readLines()
expObj.setString("\n".join(lists))
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.