Jump to content

Feeding the coordinates to a curve sop node


Praveen Ilangovan

Recommended Posts

Hi everyone,

Can someone tel me how to feed the coordinates to a curve sop node from a python shell..?

I tried the following bit of code:

>>> geo = hou.node('obj').createNode('geo')

>>> curve = geo.createNode('curve')

>>> pt = curve.parmTuple('coords')

>>> pt = [(1,0,1),(2,0,2),(4,0,9),(6,0,12)]

>>> pt

[(1, 0, 1), (2, 0, 2), (4, 0, 9), (6, 0, 12)]

>>> curve.setDisplayFlag(True)

>>> curve.setRenderFlag(True)

>>> curve.setCurrent(True, clear_all_selected = True)

>>> curve.moveToGoodPosition()

<hou.Vector2 [0, 0]>

>>>

the 'coords' field is not takin these values and so it is not drawin a curve.

Please help me..

Thanks in advance.

-Praveen.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...