Remove group in VEX

   10856   6   1
User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
Hi folks - is there any way to remove a point or prim group in VEX?

My use case is that I create a temp point group at the beginning of my network, do some things, then move some points with a PointWrangle. I then delete the temp point group with a group node. Would be great to just do that in VEX though and spare the node. Any way to do that? Can't find anything in the docs.
www.kmcnamara.com
User Avatar
Member
129 posts
Joined: Jan. 2013
Offline
U can use addgroup() and removegroup() in vex (pointwrangle);
U can use setpointgroup( geoself(), string name, int pt, int addOrRemoveFromGroup ) in cvex (attribwrangle);
if addOrRemoveFromGroup == 1 , the point will be add into group;
if addOrRemoveFromGroup == 0 , the point will be remove from group;
The help document not correct.
User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
Thanks for the reply - unfortunately those functions look like they remove a point or particle from a group. What I want to do is actually delete the group itself from the geometry while leaving the points. Much like the “Edit > Delete” tab in the Group SOP. Does that make sense?
www.kmcnamara.com
User Avatar
Member
129 posts
Joined: Jan. 2013
Offline
AFAIK no such function in VEX.
User Avatar
Member
14 posts
Joined: Aug. 2015
Offline
Is this still not possible?
I found the function "removepointgroup"... but its not working in my wrangle.
It says "call to undefined function".

Perhaps its a 19.5 function only?
User Avatar
Member
26 posts
Joined: Dec. 2019
Offline
try Python

node = hou.pwd()
geo = node.geometry()
myPointGroup = geo.findPointGroup('group1')
myPointGroup.destroy()
User Avatar
Member
8045 posts
Joined: Sept. 2011
Offline
Red-Juice
Is this still not possible?
I found the function "removepointgroup"... but its not working in my wrangle.
It says "call to undefined function".

Perhaps its a 19.5 function only?

Yes, added in 19.5
Edited by jsmack - Aug. 15, 2022 00:06:11
  • Quick Links