Hi,
Although the docs don't say explicitly that you can set ‘value’ to any specific value other than 0 or 1,
It seems that it might be possible but I am not able to do so.
http://www.sidefx.com/docs/houdini/vex/functions/setprimgroup [www.sidefx.com]
The behaviour seems to be that you can actually give it any value you want, it's just that it will convert that value to 1 ( so long as the value is not 0).
Like it's just a ‘true or false’ inclusion - the function giving you the flexibility of not having to convert your values if they are something other than 1 and not 0.
I am wondering though if it is possible to make those values something other than 0 or 1?
I have a function that loops over large number of primitives and have an algorithm that catagorizes their groupings.
What I have done is some string concatenation with a base name and my loop indexing value converted with itoa to get my specific group names that will scale with the number of primitives and/or variations of the algorithm so I don't have to manually changed my groupings.
It works with no problems - but I thought I might be able to simplify my code with something like(simplified for brevity):
for(Count = 1; Count < Main_Loop; Count++)
{
if( (@primnum >= 0) && (@primnum <= 10) )
{
setprimgroup(geoself(), “Group_Intensity”, @primnum, 1, “set”);
}
if( (@primnum >= 11) && (@primnum <= 20) )
{
setprimgroup(geoself(), “Group_Intensity”, @primnum, 2, “set”);
}
if( (@primnum >= 21) && (@primnum <= 30) )
{
setprimgroup(geoself(), “Group_Intensity”, @primnum, 3, “set”);
}
}