Search - User list
Full Version: Mimic Partition SOP in VEX
Root » Technical Discussion » Mimic Partition SOP in VEX
RonanCroyal
Hi,
I would like to know how to mimic the Partition SOP in VEX, because it's currently not compilable.
I use it mainly like that, to put each point in his own group.

Thank you
animatrix_
Hi you can do something like this in a Point Wrangle:

setpointgroup(0, sprintf("pt%s", @ptnum), @ptnum, 1);
RonanCroyal
Fantastic, thanks a lot !
RonanCroyal
Just an other one I need.
I also often use the Partition SOP to group from my “name” attribute, like in the screenshot.
How would you do that in VEX ?

Thanks !
animatrix_
You can do it like this:

setprimgroup(0, s@name, @primnum, 1);
tamte
maybe it's worth mentioning that using many groups can be very inefficient especially if there is no need for them
I can't imagine many scenarios when you'd need to partition geometry into groups instead of attributes (maybe just for export purposes for formats that rely on groups like obj, or for hengine hosts that require groups for various purposes)
so just keep that in mind
RonanCroyal
animatrix_: Perfect, thank you !

tamte: Thanks for the heads up, I will definitively keep that in mind
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