FBX SDK Reference Guide: kfbxtakenodecontainer.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_TAKE_NODE_CONTAINER_H_
00005 #define _FBXSDK_TAKE_NODE_CONTAINER_H_
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2008 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <kaydaradef.h>
00043 #ifndef KFBX_DLL 
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kaydara.h>
00048 
00049 #include <kfbxplugins/kfbxobject.h>
00050 
00051 #include <klib/karrayul.h>
00052 
00053 #ifndef MB_FBXSDK
00054 #include <kbaselib_nsuse.h>
00055 #endif
00056 #include <kbaselib_forward.h>
00057 
00058 #include <kfcurve/kfcurve_forward.h>
00059 #ifndef MB_FBXSDK
00060 #include <kfcurve/kfcurve_nsuse.h>
00061 #endif
00062 
00063 #include <fbxfilesdk_nsbegin.h>
00064 
00065 class KFbxSdkManager;
00066 class KFbxTakeNode;
00067 class KFbxDefaultTakeCallback;
00068 
00083     class KFBX_DLL KFbxTakeNodeContainer : public KFbxObject
00084     {
00085         KFBXOBJECT_DECLARE(KFbxTakeNodeContainer,KFbxObject);
00086 
00091         protected:
00092             virtual bool PropertyNotify(eFbxPropertyNotify pType, KFbxProperty* pProperty);
00094 
00099         public:
00100 
00108             KFbxTakeNode* CreateTakeNode(char* pName);
00109 
00117             bool RemoveTakeNode(int pIndex);
00118 
00126             bool RemoveTakeNode(char* pName);
00127 
00131             int GetTakeNodeCount() const;
00132 
00139             K_DEPRECATED KFbxTakeNode* GetTakeNode(int pIndex) const;
00140 
00147             char* GetTakeNodeName(int pIndex);
00148 
00155             virtual bool SetCurrentTakeNode(int pIndex);
00156 
00163             virtual bool SetCurrentTakeNode(char* pName);
00164 
00171             K_DEPRECATED KFbxTakeNode* GetDefaultTakeNode();    
00172 
00179             K_DEPRECATED KFbxTakeNode* GetCurrentTakeNode();    
00180 
00184             char* GetCurrentTakeNodeName();
00185 
00186 
00190             int GetCurrentTakeNodeIndex();
00191 
00197             virtual bool GetAnimationInterval(KTime& pStart, KTime& pStop);
00198 
00200 
00201         #ifndef DOXYGEN_SHOULD_SKIP_THIS
00203         //  WARNING!
00204         //  Anything beyond these lines may not be documented accurately and is 
00205         //  subject to change without notice.
00207             bool IsAnimated();
00208             bool IsChannelAnimated(char* pGroup, char* pSubGroup, char* pName);
00209             bool IsChannelAnimated(char* pGroup, char* pSubGroup, KDataType* pDataType);
00210 
00211             void RegisterDefaultTakeCallback(KFbxProperty& pProperty, int pComponentIndex, HKFCurve pFCurve);
00212         protected:
00213             
00218             void CreateKFCurveNodeProperty(KFbxProperty* pProperty, const char* pTakeName=NULL);
00219             void CreateKFCurveNodeProperty(KFbxProperty* pProperty, KFbxTakeNode* pTakeNode);
00220             friend class KFbxProperty;
00221         protected:
00222             virtual ~KFbxTakeNodeContainer();
00223             KFbxTakeNodeContainer(KFbxSdkManager& pManager, char const* pName, KError* pError=0);
00224 
00225             virtual void Construct(const KFbxTakeNodeContainer* pFrom);
00226             virtual void Destruct(bool pRecursive, bool pDependents);
00227 
00228             virtual KFbxTakeNodeContainer* GetTakeNodeContainer();
00229             KFbxTakeNodeContainer& operator=(KFbxTakeNodeContainer const& pTakeNodeContainer);
00230 
00231         public:
00232             void Init();
00233             void Reset();
00234 
00235             virtual void              PropertyAdded(KFbxProperty* pProperty);
00236             virtual void              PropertyRemoved(KFbxProperty* pProperty);             
00237 
00238             void UpdateFCurveFromProperty(KFbxProperty &pProperty,KFbxTakeNode *pTakeNode=NULL);
00239             void CreateChannelsForProperty(KFbxProperty* pProperty, KFbxTakeNode *pTakeNode);
00240 
00241             // -------------------------------------------------------------------------------------------------------------
00242             // Just while kfbxcharacter and kfbxcontrolset are still using the KProperty instead of KFbxProperty
00243             K_DEPRECATED void CreateChannelsForKProperty(KProperty* lProperty, KFbxTakeNode *pTakeNode, KFbxProperty* pProperty=NULL);
00244             // -------------------------------------------------------------------------------------------------------------
00245 
00246             void UnregisterDefaultTakeCallback(KFbxDefaultTakeCallback*& pTC);
00247             void UnregisterAllDefaultTakeCallback();
00248             friend void DefaultTakeValueChangedCallback(KFCurve *pFCurve, KFCurveEvent *pFCurveEvent, void* pObject);
00249 
00250         private:
00251             KArrayTemplate<KFbxTakeNode*>            mTakeNodeArray;
00252             KArrayTemplate<KFbxDefaultTakeCallback*> mCallbackInfo;
00253             int                                      mCurrentTakeNodeIndex;
00254             mutable KError*                          mError;
00255 
00256         #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00257         friend class KFbxObject;
00258 
00259     };
00260 
00261     typedef KFbxTakeNodeContainer* HKFbxTakeNodeContainer;
00262 
00263 #include <fbxfilesdk_nsend.h>
00264 
00265 #endif // #ifndef _FBXSDK_TAKE_NODE_CONTAINER_H_
00266 
00267