Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import hou
- node = hou.pwd()
- geo = node.geometry()
- # Add code to modify contents of geo.
- # Use drop down menu to select examples.
- fileParm = node.parm("txt").evalAsString()
- attrName = node.parm("attr").evalAsString()
- with open(fileParm, 'r') as f:
- lines = f.read().splitlines() # Read lines
- f.close()
- Attrib = geo.addAttrib(hou.attribType.Point, attrName, "")
- for line in lines:
- pt=geo.createPoint()
- pt.setAttribValue(Attrib, line)
Advertisement
Add Comment
Please, Sign In to add comment