1 #ifndef __FBASSETMNG_H__
2 #define __FBASSETMNG_H__
48 #define FBSDK_DLL K_DLLIMPORT
53 #ifdef FBSDKUseNamespace
83 virtual FBString GetName()
const = 0;
88 virtual FBString GetLocalPath()
const = 0;
93 virtual FBString GetServerPath()
const = 0;
105 virtual bool GetLatest(
bool pReplaceCheckedOut =
false,
bool pSilent =
false ) = 0;
113 virtual bool CheckIn(
const FBString& pComment =
"",
bool pKeepCheckedOut =
false,
bool pSilent =
false ) = 0;
122 virtual bool CheckOut(
const FBString& pComment =
"",
bool pDontGetLocal =
false,
bool pSilent =
false ) = 0;
129 virtual bool UndoCheckOut(
bool pReplaceLocalFile =
true,
bool pSilent =
false ) = 0;
133 virtual void ShowHistory()
const = 0;
137 virtual void ShowProperties()
const = 0;
153 #define FBRegisterAssetFile( UniqueNameStr, ClassName, Label, Desc, IconFilename ) \
154 HIObject RegisterAssetFile##ClassName( HIObject ,const char* pName,void * ) \
156 ClassName *Class = new ClassName( Label ); \
157 Class->mAllocated = true; \
158 Class->Name = UniqueNameStr; \
159 if (Class->FBCreate()) { \
160 return Class->GetHIObject(); \
166 FBLibraryModule( ClassName ) \
168 FBRegisterObject( ClassName,"Asset/AssetItem/AssetFile",Label,Desc,RegisterAssetFile##ClassName, true, IconFilename ); \
175 #define FBAssetFileDeclare( ClassName, Parent ) \
176 FBClassDeclare( ClassName,Parent); \
178 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
184 #define FBAssetFileImplementation( ThisComponent ) \
185 FBClassImplementation( ThisComponent )
207 virtual bool FBCreate();
212 virtual bool IsCheckedOut()
const = 0;
217 virtual bool IsCheckedOutByMe()
const = 0;
222 virtual FBString GetCheckedOutBy()
const = 0;
236 #define FBRegisterAssetFolder( UniqueNameStr, ClassName, Label, Desc, IconFilename ) \
237 HIObject RegisterAssetFolder##ClassName( HIObject ,const char* pName,void * ) \
239 ClassName *Class = new ClassName( Label ); \
240 Class->mAllocated = true; \
241 Class->Name = UniqueNameStr; \
242 if (Class->FBCreate()) { \
243 return Class->GetHIObject(); \
249 FBLibraryModule( ClassName ) \
251 FBRegisterObject( ClassName,"Asset/AssetItem/AssetFolder",Label,Desc,RegisterAssetFolder##ClassName, true, IconFilename ); \
258 #define FBAssetFolderDeclare( ClassName, Parent ) \
259 FBClassDeclare( ClassName,Parent); \
261 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
267 #define FBAssetFolderImplementation( ThisComponent ) \
268 FBClassImplementation( ThisComponent )
290 virtual bool FBCreate();
295 virtual int GetChildCount()
const = 0;
319 virtual FBAssetFile* AddFile(
const FBString& pLocalPath,
const FBString& pComment =
"",
bool pCheckOut =
false,
bool pSilent =
false ) = 0;
341 #define FBRegisterAssetMng( UniqueNameStr, ClassName, Label, Desc, IconFilename ) \
342 HIObject RegisterAssetMng##ClassName( HIObject ,const char* pName,void * ) \
344 ClassName *Class = new ClassName( Label ); \
345 Class->mAllocated = true; \
346 Class->Name = UniqueNameStr; \
347 Class->Description = Desc; \
348 if (Class->FBCreate()) { \
349 return Class->GetHIObject(); \
355 FBLibraryModule( ClassName ) \
357 FBRegisterObject( ClassName,"Asset/AssetMng",Label,Desc,RegisterAssetMng##ClassName, false, IconFilename ); \
364 #define FBAssetMngDeclare( ClassName, Parent ) \
365 FBClassDeclare( ClassName,Parent); \
367 ClassName(const char* pName):Parent(pName) { FBClassInit; } \
373 #define FBAssetMngImplementation( ThisComponent ) \
374 FBClassImplementation( ThisComponent )
448 virtual bool Initialize() = 0;
470 virtual bool FileIsManaged(
const FBString& pFilename ) = 0;
476 virtual bool WithinManagedPath(
const FBString& pLocalPath ) = 0;
482 virtual FBString MapLocalPathToServerPath(
const FBString& pLocalPath ) = 0;
510 virtual void ShowSettings() = 0;
515 virtual int GetFileOptions() = 0;
519 virtual bool CheckAvailability()
const = 0;
527 #ifdef FBSDKUseNamespace
FBString LastError
Last error string.
Base class for all managed assets.
Version Control -> Disable Version Control Integration.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Support all elements from the File menu.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Property class: const char * (String).
File -> Open from database.
Used to access asset manager functionity to get files locally or from a server.
FBPropertyString Name
Read Write Property: Unique Name.
FBAssetMngMenuOptions
Show or hide version control menu items.
FBPropertyString Description
Read Write Property: Description of the manager.
Support only the basics functionalities.
Version Control -> Check In.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
#define IObject_Declare(IsPure)
Version Control -> Show Properties.
Support all elements from the Version Control menu.
FBAssetMngFileOptions
Behavior of the application when working with managed files.
Ask for check in file when closing it.
Version Control -> Get Latest.
Version Control -> Show Reference Manager.
Class representing a file stored in a version control database.
FBString LastError
Last error string.
Upload file automatically on save.
Check in file automatically when closing it.
Class representing a folder stored in a version control database.
Version Control -> Show Settings.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
#define FBSDKNamespace
FBSDKNamespace define.
Ask for checkout on load.
File -> Upload to database.
Version Control -> Show Explorer.
Version Control -> Check Out.
Add new file automatically on save.
Ask for adding new file on save.
Version Control -> Show History.
MotionBuilder SDK base class.
Version Control -> Undo Check Out.
Check out file automatically on load.
FBPropertyInt MenuFlags
Read Write Property: Flags specifing which menu items are added by the manager.