How to create hierarchy path attribute for kinefx joint?

   1211   2   0
User Avatar
Member
631 posts
Joined: 11月 2013
Offline
Hi,

I want to create a path attribute for kinefx joints to match the hierarchy such as joint1, joint1/joint2/...
How to do it?

Thanks
User Avatar
Member
8647 posts
Joined: 7月 2007
Offline
this should work
#include "kinefx.h"

int pts[];
string names[];
getancestors(0, @ptnum, -1, pts);
foreach(int pt; pts){
    string name = point(0, "name", pt);
    append(names, name);
}
names = reverse(names);
append(names, s@name);
s@path = "/" + join(names, "/");
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
631 posts
Joined: 11月 2013
Offline
Thanks a lot!
  • Quick Links