setCurPoint how?

   3683   3   1
User Avatar
Member
67 posts
Joined: 1月 2009
Offline
Which argument is needed for the setCurPoint-function?
I have looked in the help, and there is this example:
for point in points:
hou.pwd().setCurPoint(point)
But I get this:

add_pt = 1
hou.pwd().setCurPoint(add_pt)
return _hou.SopNode_setCurPoint(*args)
TypeError: in method ‘SopNode_setCurPoint’, argument 2 of type ‘HOM_Point *’
IMHO
Lorenz
User Avatar
Member
8583 posts
Joined: 7月 2007
Offline
setCurPoint() expects argument that has hou.Point class, not just an index of the point
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
67 posts
Joined: 1月 2009
Offline
OK, thanks.
Than I have another question. Is it possible to access one specific point if I know it's number?
IMHO
Lorenz
User Avatar
Member
8583 posts
Joined: 7月 2007
Offline
yes,
hou.Geometry.iterPoints()
and
hou.Geometry.points()

advantages of one over another are in help
http://www.sidefx.com/docs/houdini10.0/hom/hou/Geometry#iterPoints [sidefx.com]

it all depends on what you want to do, i cannot imagine the usage of setting certain point as current(other than in looping through all points), but maybe you have the reasons for it
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links