how to create an attribute- the total number of points
13571 2 3-
- Andrew Graham
- Member
- 151 posts
- Joined: Feb. 2009
- Offline
i want to create a variable or detail attribute that equals the total number of points. i know i can get the total number of points with $NPT in a vertex attribute or something, but i dont know how to access that value from another node like an attribcreate node…
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
-
- phtj
- Member
- 224 posts
- Joined: June 2009
- Offline
You can create a new attribute using AttribCreate SOP. Set Class to Detail, and Type to Integer, and for Value, enter $NPT.
As long as the script language is set to HScript, the local variable $NPT will evaluate to the number of points. For the number of primitives, you can use $NPR.
If you prefer to use Python, then enter hou.lvar('NPT') or hou.lvar('NPR'). The lvar function returns the local variable. (The ‘hou’ bit is not strictly necessary, but I like to put it in anyway.)
As long as the script language is set to HScript, the local variable $NPT will evaluate to the number of points. For the number of primitives, you can use $NPR.
If you prefer to use Python, then enter hou.lvar('NPT') or hou.lvar('NPR'). The lvar function returns the local variable. (The ‘hou’ bit is not strictly necessary, but I like to put it in anyway.)
Patrick
-
- Andrew Graham
- Member
- 151 posts
- Joined: Feb. 2009
- Offline
hmm i must have been doing something silly. thanks!
https://openfirehawk.com/ [openfirehawk.com]
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
Support Open Firehawk - An open source cloud rendering project for Houdini on Patreon.
This project's goal is to provide an open source framework for cloud computing for heavy FX based workflows and allows end users to pay the lowest possible price for cloud resources.
-
- Quick Links

