Hi
How can I determine minimum or maximum value of any sop attribute?
For example I have connectivity sop that creates some attributes on the primitives. I would like to figure out the min-maximum values of particular attribute.
I also would like to find out how many unique attributes there are in given Sop
thanks
Max, min value and number of unique values of an attribute?
6640 3 1- kursad
- Member
- 88 posts
- Joined: March 2010
- Offline
- graham
- Member
- 1912 posts
- Joined: Nov. 2006
- Offline
You can use the Attribute Promote SOP to get the min/max values of any attribute.
Getting the number of individual attribute values is trickier. Personally I'd do it using Python with the result of hou.Geometry.pointFloatAttribValues(). This gives you a list of all the attribute values, which you could then convert to a Python set and get the count of individual elements.
Getting the number of individual attribute values is trickier. Personally I'd do it using Python with the result of hou.Geometry.pointFloatAttribValues(). This gives you a list of all the attribute values, which you could then convert to a Python set and get the count of individual elements.
Graham Thompson, Technical Artist @ Rockstar Games
- kursad
- Member
- 88 posts
- Joined: March 2010
- Offline
- kursad
- Member
- 88 posts
- Joined: March 2010
- Offline
-
- Quick Links