KFbxTakeNodeContainer Class Reference

#include <kfbxtakenodecontainer.h>

Inherits KFbxObject.

Inherited by KFbxConstraint, KFbxControlSetPlug, KFbxDeformer, KFbxGenericNode, KFbxNode, KFbxSubDeformer, KFbxSurfaceMaterial, KFbxTexture, and KFbxVideo.

Inheritance diagram for KFbxTakeNodeContainer:

Inheritance graph
List of all members.

Detailed Description

This class is a container for take nodes which contain animation data.

A take node contains the animation keys of the container for a given take.

A default take node is always created. This take is used to store default animation values. This take is at index 0, and should not contain animation keys or be removed in any situation.

Be careful when processing take animation. If the current take does not exist for a container, KFbxTakeNodeContainer::GetCurrentTakeNode() and KFbxTakeNodeContainer::GetDefaultTakeNode() will return the same KFbxTakeNode object. If both the default and the current take node are processed without appropriate testing, the same data will be processed twice.

Definition at line 84 of file kfbxtakenodecontainer.h.

Take Node Management

KFbxTakeNodeGetDefaultTakeNode ()
 Get default take node.
KFbxTakeNode const * GetDefaultTakeNode () const
 Get default take node.
KFbxTakeNodeCreateTakeNode (char *pName)
 Create a take node.
bool RemoveTakeNode (int pIndex)
 Remove take node by index.
bool RemoveTakeNode (char *pName)
 Remove take node by name.
int GetTakeNodeCount () const
 Get take node count.
KFbxTakeNodeGetTakeNode (int pIndex) const
 Get take node by index.
char * GetTakeNodeName (int pIndex)
 Get name of take node at a given index.
virtual bool SetCurrentTakeNode (int pIndex)
 Set current take node by index.
virtual bool SetCurrentTakeNode (char *pName)
 Set current take node by name.
KFbxTakeNodeGetCurrentTakeNode ()
 GetCurrentTakeNode.
char * GetCurrentTakeNodeName ()
 Get the name of the current take node.
int GetCurrentTakeNodeIndex ()
 Get index of the current take node.
virtual bool GetAnimationInterval (KTime &pStart, KTime &pStop)
 Find the start and end time of the current take.


Member Function Documentation

KFbxTakeNode* GetDefaultTakeNode (  ) 

Get default take node.

Returns:
Pointer to default take node.
Remarks:
See remarks in group header.

KFbxTakeNode const* GetDefaultTakeNode (  )  const

Get default take node.

Returns:
Pointer to default take node.
Remarks:
See remarks in group header.

KFbxTakeNode* CreateTakeNode ( char *  pName  ) 

Create a take node.

Parameters:
pName New take node name.
Returns:
Pointer to the created take node or, if a take node with the same name already exists in the node, NULL. In this case, KFbxNode::GetLastErrorID() returns eTAKE_NODE_ERROR and KFbxNode::GetLastErrorString() returns "Take node already exists".

bool RemoveTakeNode ( int  pIndex  ) 

Remove take node by index.

Parameters:
pIndex Index of take node to remove.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() can return one of the following:
  • eCANNOT_REMOVE_DEFAULT_TAKE_NODE: The default take node can't be removed.
  • eINDEX_OUT_OF_RANGE: The index is out of range.

bool RemoveTakeNode ( char *  pName  ) 

Remove take node by name.

Parameters:
pName Take node name.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() can return one of the following:
  • eCANNOT_REMOVE_DEFAULT_TAKE_NODE: The default take node can't be removed.
  • eUNKNOWN_TAKE_NODE_NAME: No take node with this name exists in the current node.

int GetTakeNodeCount (  )  const

Get take node count.

Returns:
The number of take nodes including the default take node.

KFbxTakeNode* GetTakeNode ( int  pIndex  )  const

Get take node by index.

Parameters:
pIndex Take node index.
Returns:
Pointer to the indexed take node or NULL if the index is out of range. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.
Remarks:
Index 0 returns the default take.

char* GetTakeNodeName ( int  pIndex  ) 

Get name of take node at a given index.

Parameters:
pIndex Take node index.
Returns:
Name of take node or NULL if the index is out of range. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.
Remarks:
Index 0 returns the name of the default take.

virtual bool SetCurrentTakeNode ( int  pIndex  )  [virtual]

Set current take node by index.

Parameters:
pIndex Index of the current take node.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE and the current take node is set to index 0, the default take node.

Reimplemented in KFbxNode.

virtual bool SetCurrentTakeNode ( char *  pName  )  [virtual]

Set current take node by name.

Parameters:
pName Name of the current take node.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() returns eUNKNOWN_TAKE_NODE_NAME and the current take node is set to index 0, the default take node.

Reimplemented in KFbxNode.

KFbxTakeNode* GetCurrentTakeNode (  ) 

GetCurrentTakeNode.

Returns:
Pointer to the current take node.
Remarks:
If the current take node is set to index 0, it refers to the default take node. Is this case, KFbxNode::GetCurrentTakeNode() and KFbxNode::GetDefaultTakeNode return the same pointer.

char* GetCurrentTakeNodeName (  ) 

Get the name of the current take node.

Returns:
Name of the current take node.

int GetCurrentTakeNodeIndex (  ) 

Get index of the current take node.

Returns:
Index of the current take node.

virtual bool GetAnimationInterval ( KTime pStart,
KTime pStop 
) [virtual]

Find the start and end time of the current take.

Parameters:
pStart Reference to store start time.
pStop Reference to store end time.
Returns:
true on success, false otherwise.

Reimplemented in KFbxNode.