00001
00004 #ifndef _FBXSDK_TAKE_NODE_CONTAINER_H_
00005 #define _FBXSDK_TAKE_NODE_CONTAINER_H_
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
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
00205
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
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