KINEFX Hierarchy "Path" Attribute
1413 3 0- Hastur
- Member
- 6 posts
- Joined: May 2016
- Offline
- tamte
- Member
- 8832 posts
- Joined: July 2007
- Online
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 - Jan. 16, 2023 14:19:48
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- made-by-geoff
- Member
- 84 posts
- Joined: July 2018
- Offline
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: May 2016
- Offline
-
- Quick Links