Hey all, I wonder how to read out the ‘Point Num’ variable on vertices. Couldn't find the keyword.
Thanks.
What's the variable of the 'Point Num' attribute?
7776 5 2-
- LFX
- Member
- 67 posts
- Joined: Jan. 2009
- Offline
-
- tamte
- 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?
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
CG Supervisor
Framestore, NY
-
- LFX
- Member
- 67 posts
- Joined: Jan. 2009
- Offline
-
- tamte
- Member
- 9376 posts
- Joined: July 2007
- Offline
-
- Antoine Durr
- Member
- 321 posts
- Joined: July 2005
- Offline
LFXThis 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.
Yes, I'm talking about:vertex(“.”, 1, 0, “Point Num”, 0)
-
- tamte
- Member
- 9376 posts
- Joined: July 2007
- Offline
-
- Quick Links


