Get Keyframe information from HDK [Solved]

   2308   1   0
User Avatar
Member
26 posts
Joined: March 2008
Offline
So I am playing around with animation using keyframing. And I want to be able to access this information (translation, rotation information) from each keyframe from the HDK.

Is there a simple way in HDK, and on SOP level, to access keyframe information (how many keyframes there are etc) and depending on which frame it is, the transform information for a object?

I noticed that you can save the keyframe(s) into a char file inside the Channel editor. This is basicly what I want to access, but I want to be able to access this information from inside HDK instead of a external file.
Edited by - April 21, 2008 03:30:51
You cant recycle wasted time
User Avatar
Member
26 posts
Joined: March 2008
Offline
I have managed to find the result. And I post the info here below, aswell as in the wiki.

You will find the channel (if it exists) by this function:

OP_Node::findChannel(const char *path)


The channels are called:

(translate) tx, ty, tz
(rotate) rx, ry, rz
(Scale) sx, sy, sz


Then to get the keyframe value, you need to do it like this:

CH_Channel::getSegment(unsigned int idx)->getInValue();


This returns a float. And the float value is the current keyframe (unsigned int idx)
You cant recycle wasted time
  • Quick Links