[Sidefx-houdini-list] Point promotte per class ?

Julian Johnson julianjohnson1962 at gmail.com
Mon Jan 2 14:45:18 EST 2017

On 02/01/2017 11:49, Olivier Jeannel wrote:
> Hi Julian,
> Sorry for the late reply (beeing on and off during new year)
> First thing first, a big thank you !
> This is what I was after.
> The loop inside the loop is way above my vex skills, and I'm still trying
> to understand the uniqueval command.
> I'm getting slightly different results with the 2 methods. No big deal. I
> guess this might be because of the way attributes are promoted internaly in
> polysoup and in your wrangle.
> And I think the wrangle method is faster, thought I don't know how to
> measure performance.

Hi Olivier,

I'm sure I could have done something wrong which might explain the 
different results :-)  I did try Ben's method and I got the same results 
but maybe I'm not quite matching your set up.

The uniqueval() function returns a list of all the unique values (int, 
string, float etc.) in an attribute e.g.  if you had 10 points with an 
attribute 'foo' and the values in 'foo' were: (1.2, 0.2, 0.3, 0.2, 1.2, 
0.3, 0.4, 0.5, 1.2, 0.3) then uniqueval() returns a list like this: 
(1.2, 0.2 ,0.3, 0.4, 0.5).

Like you, I'm not entirely sure how to compare the speed but it seems 
faster (certainly looking at cook times). Ben's cool polysoup method is 
much more readable for fellow artists, though...


More information about the Sidefx-houdini-list mailing list