kfbxtakenodecontainer.h

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 - 2007 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 class KFbxTakeNodeContainer_internal;
00069 
00084 class KFBX_DLL KFbxTakeNodeContainer : public KFbxObject
00085 {
00086     KFBXOBJECT_DECLARE(KFbxTakeNodeContainer);
00087 public:
00088 
00093 
00098     KFbxTakeNode* GetDefaultTakeNode();
00099 
00104     KFbxTakeNode const* GetDefaultTakeNode() const;
00105 
00113     KFbxTakeNode* CreateTakeNode(char* pName);
00114 
00122     bool RemoveTakeNode(int pIndex);
00123 
00131     bool RemoveTakeNode(char* pName);
00132 
00136     int GetTakeNodeCount() const;
00137 
00144     KFbxTakeNode* GetTakeNode(int pIndex) const;
00145 
00152     char* GetTakeNodeName(int pIndex);
00153 
00160     virtual bool SetCurrentTakeNode(int pIndex);
00161 
00168     virtual bool SetCurrentTakeNode(char* pName);
00169 
00176     KFbxTakeNode* GetCurrentTakeNode(); 
00177 
00181     char* GetCurrentTakeNodeName();
00182 
00183 
00187     int GetCurrentTakeNodeIndex();
00188 
00194     virtual bool GetAnimationInterval(KTime& pStart, KTime& pStop);
00195 
00197 
00199 //
00200 //  WARNING!
00201 //
00202 //  Anything beyond these lines may not be documented accurately and is 
00203 //  subject to change without notice.
00204 //
00206 
00207 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00208 
00209     void PropertyDefaultValueChanged(KFbxProperty* pProperty);
00210 
00211     bool IsChannelAnimated(char* pGroup, char* pSubGroup, char* pName);
00212     bool IsChannelAnimated(char* pGroup, char* pSubGroup, KDataType* pDataType);
00213 
00214     void RegisterDefaultTakeCallback(KProperty* pProperty, int pComponentIndex, HKFCurve pFCurve);
00215 protected:
00216         
00221     void CreateKFCurveNodeProperty(KFbxProperty* pProperty, const char* pTakeName=NULL);
00222     friend class KFbxProperty;
00223 protected:
00224     virtual ~KFbxTakeNodeContainer();
00225     KFbxTakeNodeContainer(KFbxSdkManager& pManager, char const* pName, KError* pError=0);
00226 
00227     virtual void Construct();
00228     virtual void Destruct(bool pRecursive, bool pDependents);
00229 
00230     virtual KFbxTakeNodeContainer* GetTakeNodeContainer();
00231     KFbxTakeNodeContainer& operator=(KFbxTakeNodeContainer const& pTakeNodeContainer);
00232 
00233 public:
00234     virtual KObject*        GetFbxObject_internal();
00235     virtual KObject const*  GetFbxObject_internal() const;
00236 
00237     void Init();
00238     void Reset();
00239     virtual void AddChannels(KFbxTakeNode *pTakeNode) {};
00240 
00241     virtual void              PropertyAdded(KFbxProperty* pProperty);
00242     virtual void              PropertyRemoved(KFbxProperty* pProperty);             
00243 
00244     void UpdateFCurveFromProperty(KFbxProperty &pProperty,KFbxTakeNode *pTakeNode=NULL);
00245 //  void UpdateFCurveFromProperty(KFbxProperty &pProperty,char *pTakeName=NULL);
00246 //  void UpdatePropertyFromFCurve(KFbxProperty &pProperty,char *pTakeName=NULL);
00247 //  void UpdatePropertyFromFCurve(KFbxProperty &pProperty,KFbxTakeNode *pTakeNode);
00248 
00249 
00250     void CreateChannelsForProperty(KProperty* pProperty, KFbxTakeNode *pTakeNode);
00251     void UnregisterDefaultTakeCallback(KFbxDefaultTakeCallback*& pTC);
00252     void UnregisterAllDefaultTakeCallback();
00253     friend void DefaultTakeValueChangedCallback(KFCurve *pFCurve, KFCurveEvent *pFCurveEvent, void* pObject);
00254     
00255 private:
00256     KFbxTakeNodeContainer_internal*          mTNInternal;
00257     KArrayTemplate<KFbxTakeNode*>            mTakeNodeArray;
00258     KArrayTemplate<KFbxDefaultTakeCallback*> mCallbackInfo;
00259     int mCurrentTakeNodeIndex;
00260     mutable KError* mError;
00261 
00262 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00263 
00264 };
00265 
00266 typedef KFbxTakeNodeContainer* HKFbxTakeNodeContainer;
00267 
00268 #include <fbxfilesdk_nsend.h>
00269 
00270 #endif // #ifndef _FBXSDK_TAKE_NODE_CONTAINER_H_
00271 
00272