CinnamonMetal Posted October 3, 2017 Share Posted October 3, 2017 (edited) I want to set the position of the points of a object in python. I've looked in the HOM Python cookbook although I don't understand the error; SopNode is not iterable, when I attempt to iterate over them and setPosition() ? Edited October 3, 2017 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
bonsak Posted October 4, 2017 Share Posted October 4, 2017 After adding the PythonSOP, click the little down arrow in the upper right-hand corner of the code window. There you should find "Move Points Up": node = hou.pwd() geo = node.geometry() # Add code to modify contents of geo. for point in geo.points(): pos = point.position() pos += hou.Vector3(0, 1, 0) point.setPosition(pos) This should give you an idea of how to move points in python. -b 1 1 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 4, 2017 Author Share Posted October 4, 2017 (edited) This is helpful. Edited October 5, 2017 by CinnamonMetal Mistake on my part Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 7, 2017 Author Share Posted October 7, 2017 (edited) del Edited October 8, 2017 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.