Hi guys/gals
I'm having some issues trying to figure our how to connect prims together, but only to connect from one prim to another based off an levels attribute, so, connect level0 > level1, level1 > level2 and so on. At the moment I still get connections between say level0 and level3.
Prob missing something simple here..
thx
J
vex help: connect prims based off attribute?
1323 4 0- JasonSlab
- Member
- 1533 posts
- Joined: 3月 2020
- Offline
- tamte
- Member
- 8579 posts
- Joined: 7月 2007
- Offline
run your point wrangle only on roots group
with this code:
with this code:
float searchrad = chf("Searchrad"); string grp = sprintf("\@level=" + itoa(i@level-1)); int nearpt = nearpoint(0, grp, @P, searchrad); if (nearpt != -1){ int myprim = addprim(0, "polyline", nearpt, @ptnum); }
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- JasonSlab
- Member
- 1533 posts
- Joined: 3月 2020
- Offline
- tamte
- Member
- 8579 posts
- Joined: 7月 2007
- Offline
- JasonSlab
- Member
- 1533 posts
- Joined: 3月 2020
- Offline
-
- Quick Links