Jump to content

Vex create group


davidyannick

Recommended Posts

I wrote these lines to create a group frm my selection

Quote

int pointNum=chi("Ppointnum");
setpointattrib(geoself(),"Cd",pointNum,{0,1,0},"set");

int neighs[]=neighbours(0,pointNum);
for(int i=0;i<len(neighs);i++){
    setpointattrib(geoself(),"Cd",neighs,{1,0,0},"set");
    setpointgroup(0,"truc",neighs,1,"set");
}

 BBut the selection is ok but no group is created ??  I add a group sop and  the group "truc" is not listed ?

Can you help me please ? Thx

Capture d’écran 2019-01-17 à 23.13.07.png

untitled.hipnc

Capture d’écran 2019-01-17 à 23.15.05.png

Edited by davidyannick
Link to comment
Share on other sites

your pasted code snipped is broken (missing  [] when calling member from neighs array ), but the code in the screenshot is ok, and in the viewport it looks like it works

 

so I assume your problem is that your Group SOP is set to Primitives instead of Points and that's why you don't see the group in the menu

same in the viewport, you probably have Prim selection instead of point selection

also you can MMB on the node to see if your group is created and how many points it has

Edited by anim
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...