setting the position of a named bone of a kinefx skeleton

   1319   3   0
User Avatar
Member
98 posts
Joined: July 2005
Offline
Risking redundancy, I posted this same topic on odforce. Hopefully someone on this forum can give me a some help.

I've managed to create a kinefx skeleton rig for a quadruped character.
Each bone is uniquely named as is recommended

I'm trying to set the position of one of the kinefx skeleton bones to the centroid of a group of points in the mesh geometry being deformed

I'm using the "getbbox_center(0)" vex function to acquire the centroid but I cant figure out how to set the bone position to that vector position value.

I was hoping to use a rigattributewrangle sop node to set the position of the bone but the syntax to accomplish that is not easy to find.

Help would be appreciated.
User Avatar
Member
8582 posts
Joined: July 2007
Online
WillA
I was hoping to use a rigattributewrangle sop node to set the position of the bone but the syntax to accomplish that is not easy to find.
maybe you can start by using Rig Attribute VOP
you can use Set Point Transform VOP to set transform of any particular joint by index or name
then you can observe it's code if you want

in wrangle it would be something like
vector P = {0,1,0};
string name = "myjointname";

matrix xform = ident();
translate(xform, P);
int pt = nametopoint(0, name);
setpointtransform(0, pt, xform);
Edited by tamte - Oct. 6, 2021 11:39:07
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
98 posts
Joined: July 2005
Offline
Hi Tomas,

Thank you so much ... the wrangle code worked perfectly.

I searched all over the internet for this syntax.

I hope you don't mind my asking.

Where did you find this kind of detail on accessing the kinefx skeleton?

(I will explore the Rig Attribute VOP for personal growth)
User Avatar
Member
134 posts
Joined: Dec. 2006
Offline
as Thomas was saying, you first create the nodes in a rig vop, then right click the rig vop and vew as vex code.
  • Quick Links