Hey guys,
I have a curve which was defined as such:
curve = hou.node('/obj').createNode('geo', ‘curve’)
curve.node('file1').destroy()
curve.createNode('curve')
And I am accessing the data in the curve as follows:
curve = hou.node('/obj/curve/curve1').geometry()
How do I add points to this curve procedurally using Python? I looked into createPoint(), but that just confused me further. :?
Adding points to a curve using Python?
12050 6 0- Array
- Member
- 10 posts
- Joined: 1月 2007
- Offline
- edward
- Member
- 7899 posts
- Joined: 7月 2005
- Offline
- Array
- Member
- 10 posts
- Joined: 1月 2007
- Offline
- edward
- Member
- 7899 posts
- Joined: 7月 2005
- Offline
- Array
- Member
- 10 posts
- Joined: 1月 2007
- Offline
edward
Setting point positions on the Curve SOP's parameters (in python) should be ok, no?
I'm not quite sure what you mean. Can you elaborate please?
I think I should have been more specific in the outset of this thread…what I'm trying to do is to make a curve which follows the geometry of a polygonal object. That is to say, given that I have an object in the scene, I want to make a curve whose set of points is a superset of the verticies of a polygonal object.
- edward
- Member
- 7899 posts
- Joined: 7月 2005
- Offline
- Array
- Member
- 10 posts
- Joined: 1月 2007
- Offline
edward
Here's how to do it using the Curve SOP. If you want to do it in python, then it's just a matter of setting the Curve SOP's parameter to the appropriate point numbers.
Cool, thanks for taking the time to upload that file. I guess what I'm really having trouble with is figuring out just how to set the parameters using Python.
-
- Quick Links