Go to the
documentation of this file.
00001 #ifndef __FBUSEROBJECT_H__
00002 #define __FBUSEROBJECT_H__
00003
00004
00005
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 #include <kaydaradef.h>
00040 #ifndef FBSDK_DLL
00041
00044 #define FBSDK_DLL K_DLLIMPORT
00045 #endif
00046
00047 #include <fbsdk/fbcomponent.h>
00048 #include <fbsdk/fbcore.h>
00049
00050 #ifdef FBSDKUseNamespace
00051 namespace FBSDKNamespace {
00052 #endif
00053
00054 __FB_FORWARD(FBUserObject);
00055 FB_DEFINE_COMPONENT(FBSDK_DLL, UserObject);
00056
00058
00060 #define FBUserObjectImplement(ClassName, Description, IconFilename)\
00061 HIObject RegisterUserObject##ClassName##Create(HIObject , char* pName, void* ){\
00062 ClassName* Class = new ClassName(pName);\
00063 Class->mAllocated = true;\
00064 if( Class->FBCreate() ){\
00065 return Class->GetHIObject();\
00066 } else {\
00067 delete Class;\
00068 return NULL;}}\
00069 FBLibraryModule(ClassName){\
00070 FBRegisterObject(ClassName##R2, "FbxStorable/User", #ClassName, Description, RegisterUserObject##ClassName##Create, true, IconFilename);}\
00071 FB_FORWARD(ClassName);\
00072 int ClassName::ClassId = FBRegister_ClassId(#ClassName);\
00073 int ClassName::GetUserClassId(){\
00074 return ClassId; }\
00075 char* ClassName::FbxGetObjectSubType(){\
00076 return #ClassName;}
00077
00079
00081 class FBSDK_DLL FBUserObject : public FBBox
00082 {
00083
00084 __FBClassDeclare(FBUserObject, FBBox);
00085 FBDeclareUserObject(FBUserObject);
00086
00087 public:
00092 FBUserObject(char* pName, HIObject pObject=NULL);
00093
00098 virtual bool FbxStore(HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat);
00099 virtual bool FbxRetrieve(HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat);
00100 };
00101
00103
00105
00109 class FBSDK_DLL FBPropertyListUserObject : public FBPropertyListComponent
00110 {
00111 public:
00112 FBPropertyListUserObject();
00117 FBUserObject* operator[](int pIndex);
00118 };
00119
00120 #ifdef FBSDKUseNamespace
00121 }
00122 #endif
00123
00124 #endif