SHARE
TWEET

Untitled

a guest Aug 17th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Save
  2. fileName=hou.ui.selectFile(title='Save As Code', pattern="*.py",default_value='code.py',chooser_mode=hou.fileChooserMode.Write)
  3. file=open(hou.expandString(fileName),'w')
  4. file.write('import hou')
  5. file.write(hou.node('/').asCode(brief=True, recurse=True, save_creation_commands=True))
  6. file.close()
  7.  
  8. # import
  9. import imp
  10. fileName=hou.ui.selectFile(title='Load Code', pattern="*.py",default_value='code.py',chooser_mode=hou.fileChooserMode.Read)
  11. imp.load_source('code',hou.expandString(fileName))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top