Learning VOPS, connect points by id attribute

   660   3   1
User Avatar
Member
15 posts
Joined: 2月 2022
Offline
Hi, I have this vex code that connects points which have the same id attribute. As an exercise to get more comfortable in vops I'd like to know how to translate this, any thoughts? I've attached a file to demonstrate this.

int points = findattribval(0, "point", "id", @id);
foreach(int pt; points)
{
if(pt != @ptnum)
{
addprim(0, "polyline", @ptnum, pt);
}
}

Attachments:
connect_points_experiments.hiplc (162.6 KB)

User Avatar
Member
250 posts
Joined: 5月 2017
Offline


this should help?
Edited by osong - 2024年6月26日 07:37:43
https://twitter.com/oossoonngg [twitter.com]
User Avatar
Member
15 posts
Joined: 2月 2022
Offline
osong


this should help?
Ah thanks, very simple. I'll have to find a harder vops experiment!
User Avatar
Member
4693 posts
Joined: 2月 2012
Offline
bashorton
osong


this should help?
Ah thanks, very simple. I'll have to find a harder vops experiment!

Maybe try to do this in VOPs

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
  • Quick Links