What's the variable of the 'Point Num' attribute?

   7776   5   2
User Avatar
Member
67 posts
Joined: Jan. 2009
Offline
Hey all, I wonder how to read out the ‘Point Num’ variable on vertices. Couldn't find the keyword.
Thanks.
IMHO
Lorenz
User Avatar
Member
9376 posts
Joined: July 2007
Offline
in SOPs that support it, it's accessible as local variable $PT, or total count as $NPT
in SOPs that don't you can still get number of points by npoints() expression

do you have in mind some certain situation?
by vertices you mean vertices or points?
or are you refering to python scripting or hscript?
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
67 posts
Joined: Jan. 2009
Offline
Yes, I'm talking about:
vertex(“.”, 1, 0, “Point Num”, 0)
Or is there another way to get the corresponding points of a primitive?
Edit:
Looked up the attribs with python and find that it's indeed not listed as an attribute. So I have to keep adding my own.
IMHO
Lorenz
User Avatar
Member
9376 posts
Joined: July 2007
Offline
yes, it will be the fastest solution

you can also use hou.Vertex.point to get point which belongs to certain vertex
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
321 posts
Joined: July 2005
Offline
LFX
Yes, I'm talking about:
vertex(“.”, 1, 0, “Point Num”, 0)
This should give you an infinite recursion error. To evaluate the vertex() function, vertex() has to make sure that the requested SOP (“.”) is cooked. But to cook that sop (which is us!) the SOP has to evaluate its parameters, one of which contains the vertex() function, hence an infinite loop. $PT will evaluate properly even in SOPs that iterate on vertices.
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
User Avatar
Member
9376 posts
Joined: July 2007
Offline
Antoine Durr
This should give you an infinite recursion error. …

this is actually right
so if you are using vertex() expression
use it in this form for example:
vertex( opinputpath(“.”,0) , 1, 0, “Point Num”, 0)
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links