Notifications
Clear all

[Closed] about animation controller

here is my code sinnept:


Control *c = node.mNode->GetTMController(); 
  IKeyControl *ikeys = GetKeyControlInterface(c);
  int numKeys = 0;
  if (ikeys)
  {
   numKeys = ikeys->GetNumKeys();
  }
 

I set autokey mode in my 3ds max,and design some keyframe through moving my box,however why the ikeys is NULL,so how to really get the keyframes of a node,and
how to know what the interpolate method of the controller???

2 Replies

because the standard max transform controller has sub controllers for position, rotation and scale for the keys.


Control* c = node->GetTMController()->GetPositionController();
IKeyControl* iKeys = GetKeyControlInterface(c);

if(iKeys != NULL) int num = ikeys->GetNumKeys();
 

No,this doesnt work either