KINEFX Hierarchy "Path" Attribute
1221 3 0-
- Hastur
- Member
- 6 posts
- Joined: 5月 2016
- Offline
-
- tamte
- Member
- 8723 posts
- Joined: 7月 2007
- Offline
since your "hierarchies" are a single primitive lines (no branching and no individual prim segments) you can possibly just do this in Primitive Wrangle:
be aware though that some of your curves are reversed so their hierarchy flows bottom to top
string path = ""; int pts[] = primpoints(0, @primnum); foreach(int pt; pts){ string name = point(0, "name", pt); path += "/" + name; setpointattrib(0, "path", pt, path); }
be aware though that some of your curves are reversed so their hierarchy flows bottom to top
Edited by tamte - 2023年1月16日 14:19:48
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- made-by-geoff
- Member
- 69 posts
- Joined: 7月 2018
- Online
I'm not in front of my workstation at the moment, but if you load up the kinefx modules in VEX (start your code with):
There's a command called getancestors() that lets you find the point numbers of all ancestors of the input pt number.
From there you can build your string by modifying Tomas' script above.
It's overkill in this case, but the benefit is that it will work in other setups where you have branching.
#include <kinefx.h>
There's a command called getancestors() that lets you find the point numbers of all ancestors of the input pt number.
int[] getancestors(int geo; int pt; int maxdepth)
From there you can build your string by modifying Tomas' script above.
It's overkill in this case, but the benefit is that it will work in other setups where you have branching.
-
- Hastur
- Member
- 6 posts
- Joined: 5月 2016
- Offline
-
- Quick Links