Nicholas Yiallouris Posted April 21, 2016 Share Posted April 21, 2016 I currently have an array of points gathered at VOP level, and I'd like to group those points in to deferent group names. So for instance: [1, 34, 5] into group 1 [2, 12, 67] into group 2 I'm thinking I may need a for each... And as a matter of interest could one test if a point was part of a certain array? thanks Quote Link to comment Share on other sites More sharing options...
anim Posted April 21, 2016 Share Posted April 21, 2016 you can use find() function to test if an item is in an array or not http://www.sidefx.com/docs/houdini15.0/vex/functions/find you can use setpointgroup() function or VOP node to set group membership on non-current point http://www.sidefx.com/docs/houdini15.0/vex/functions/setpointgroup or i@group_groupname = 1; if you are doing it for current point Quote Link to comment Share on other sites More sharing options...
Nicholas Yiallouris Posted April 26, 2016 Author Share Posted April 26, 2016 Thanks anim but after a bit of tinkering it alludes me. I'm only getting my head into VEX, I add an inline VEX node into my VOP and type this: int [] find(arraytype array; type search), but now I'm stumped. I've basically got an array called "test_pcFind" that looks like this [1,169,513] and all I want to do is test if these three point's are part of the same array so I can group them. Any thoughts anyone? Quote Link to comment Share on other sites More sharing options...
anim Posted April 27, 2016 Share Posted April 27, 2016 here is example file with 4 ways to get group from array (Point VOP, Point Wrangle, Detail VOP, Detail Wrangle) ts_array_to_group.hip 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.