Learning VOPS, connect points by id attribute

   1319   3   1
User Avatar
Member
17 posts
Joined: 2月 2022
オンライン
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
251 posts
Joined: 5月 2017
オフライン


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


this should help?
Ah thanks, very simple. I'll have to find a harder vops experiment!
User Avatar
Member
5047 posts
Joined: 2月 2012
オフライン
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] https://lnk.bio/animatrix [lnk.bio]
  • Quick Links