Search - User list
Full Version: trying to count number of points in group using pop wrangle.
Root » Houdini Lounge » trying to count number of points in group using pop wrangle.
jean_marc
hi,
I have setup a simple popnet as a test and using a pop wrangle I'm setting all points as they spawn to a group called test. I then try and read the number of points from this group using npointsgroup. I can see there are 1000's of points in the “test” group by getting info on the wrangle node but npointgroup always return a big fat 0.

its something simple, just not seeing it.

cheers marc.

setpointgroup(0, "test", @ptnum, 1, "set");
int j = npointsgroup(0,"test");
printf("%i", j);
Andr
I don't have much experience with particles, but this is probably happening because you are setting and reading back in the same wrangle.

If you use two wrangles, one for setting the group and the following to read the group back, you should be able to read the correct value
Andr
npointsgroup(0,"test");

The ‘0’ is the input 0. So you are trying to read from input 0, which in your case doesn't have any group set.
jean_marc
ok thanks , that seems to work, if i setup a wrangle after the popnet, i can read it .
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB