1#ifndef __FBASSETMNG_H__
2#define __FBASSETMNG_H__
43#include <kaydaradef.h>
48 #define FBSDK_DLL K_DLLIMPORT
53#ifdef FBSDKUseNamespace
54 namespace FBSDKNamespace {
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;
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 )
202 IObject_Declare(
override);
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 )
285 IObject_Declare(
override);
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 )
426 kFileOptionsAll = 0xFFFFFFFF
443 IObject_Declare(
override);
527#ifdef FBSDKUseNamespace
Class representing a file stored in a version control database.
virtual bool IsCheckedOut() const =0
Returns a boolean value indicating if this file is checked out by any user.
FBAssetFile(const char *pName, HIObject pObject=NULL)
Constructor.
virtual bool FBCreate() override
Open Reality Creation function.
virtual FBString GetCheckedOutBy() const =0
Returns the name of the user who currently has this file checked out.
virtual bool IsCheckedOutByMe() const =0
Returns a boolean value indicating if this file is checked out by the current user.
Class representing a folder stored in a version control database.
virtual FBAssetFolder * AddFolder(const FBString &pName, const FBString &pComment="", bool pSilent=false)=0
Add a folder in the database.
virtual FBAssetItem * GetChild(int pIndex)=0
Get the child at index pIndex.
virtual FBAssetFile * AddFile(const FBString &pLocalPath, const FBString &pComment="", bool pCheckOut=false, bool pSilent=false)=0
Add a specified file into the database.
virtual int GetChildCount() const =0
Get the number of items in this folder.
virtual FBAssetFolder * GetFolder(const FBString &pName)=0
Get a folder present in this folder by using it's name.
virtual FBAssetFile * GetFile(const FBString &pName)=0
Get a file present in this folder by using it's name.
virtual bool FBCreate() override
Open Reality Creation function.
FBAssetFolder(const char *pName, HIObject pObject=NULL)
Constructor.
Base class for all managed assets.
virtual FBString GetLocalPath() const =0
Get the path to this item on the local hard disk.
virtual bool UndoCheckOut(bool pReplaceLocalFile=true, bool pSilent=false)=0
Cancel the last check out operation.
virtual void ShowProperties() const =0
Display a dialog showing the properties of this item.
virtual FBString GetServerPath() const =0
Get the path to this item on the database.
FBAssetItem(const char *pName, HIObject pObject=NULL)
Constructor.
virtual bool GetLatest(bool pReplaceCheckedOut=false, bool pSilent=false)=0
Obtain the latest version of the item from the server.
virtual void ShowHistory() const =0
Display a dialog with this item history.
virtual bool CheckOut(const FBString &pComment="", bool pDontGetLocal=false, bool pSilent=false)=0
Checks out this item and it's childs (if this is a folder item) and makes them writeable on the local...
virtual FBAssetFolder * GetParent() const =0
Get the parent folder of this item.
virtual bool CheckIn(const FBString &pComment="", bool pKeepCheckedOut=false, bool pSilent=false)=0
Checks in this item and all its children (if this is a folder item).
virtual FBString GetName() const =0
Get the name of this item (file name or folder name).
FBString LastError
Last error string.
Used to access asset manager functionity to get files locally or from a server.
virtual bool CheckAvailability() const =0
Check if this manager can be used on the computer.
FBAssetMng(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyString Name
Read Write Property: Unique Name.
virtual FBAssetFile * GetAssetFileFromLocalPath(const FBString &pLocalFilename)=0
Get a file object using it's local path.
virtual FBString MapLocalPathToServerPath(const FBString &pLocalPath)=0
Convert the local path to a server path by using managed paths mapping.
virtual void ShowSettings()=0
Display a dialog that let the user changes settings.
virtual int GetFileOptions()=0
Get the file options (i.e.
virtual FBAssetFile * GetAssetFile(const FBString &pServerFilename)=0
Get a file object using it's server path.
FBPropertyString Description
Read Write Property: Description of the manager.
virtual FBAssetFolder * CreateServerPath(const FBString &pServerPath)=0
Create a folder path on the server side by adding each missing folders.
virtual bool WithinManagedPath(const FBString &pLocalPath)=0
Is the specified local path below a managed path.
virtual bool FileIsManaged(const FBString &pFilename)=0
Is the specified local file managed (ie.
virtual FBAssetFile * BrowseForFile()=0
Let the user browse the asset database to select a file.
virtual FBAssetFolder * GetAssetFolderFromLocalPath(const FBString &pLocalPath)=0
Get a folder object using it's local path.
virtual bool Initialize()=0
Initialize the connection to the server.
virtual FBAssetFolder * GetAssetFolder(const FBString &pServerPath)=0
Get a folder object using it's server path.
FBPropertyInt MenuFlags
Read Write Property: Flags specifing which menu items are added by the manager.
FBString LastError
Last error string.
virtual FBAssetFolder * BrowseForFolder()=0
Let the user browse the asset database to select a folder.
MotionBuilder SDK base class.
Property class: const char * (String).
FBAssetMngMenuOptions
Show or hide version control menu items.
@ kMenuUndoCheckOut
Version Control -> Undo Check Out.
@ kMenuShowExplorer
Version Control -> Show Explorer.
@ kMenuSourceControlAll
Support all elements from the Version Control menu.
@ kMenuAddToDatabase
File -> Add to database.
@ kMenuCheckOut
Version Control -> Check Out.
@ kMenuGetLatest
Version Control -> Get Latest.
@ kMenuSourceControlMin
Support only the basics functionalities.
@ kMenuShowReferenceMng
Version Control -> Show Reference Manager.
@ kMenuFileAll
Support all elements from the File menu.
@ kMenuShowHistory
Version Control -> Show History.
@ kMenuCheckIn
Version Control -> Check In.
@ kMenuEnable
Version Control -> Disable Version Control Integration.
@ kMenuShowSettings
Version Control -> Show Settings.
@ kMenuAll
Support everything.
@ kMenuUploadToDatabase
File -> Upload to database.
@ kMenuShowProperties
Version Control -> Show Properties.
@ kMenuOpenFromDatabase
File -> Open from database.
FBAssetMngFileOptions
Behavior of the application when working with managed files.
@ kFileUploadOnSave
Upload file automatically on save.
@ kFileCheckOutOnLoad
Check out file automatically on load.
@ kFileCheckInOnClose_Ask
Ask for check in file when closing it.
@ kFileCheckOutOnLoad_Ask
Ask for checkout on load.
@ kFileAddOnNewSave_Ask
Ask for adding new file on save.
@ kFileCheckInOnClose
Check in file automatically when closing it.
@ kFileAddOnNewSave
Add new file automatically on save.
@ kFileUploadOnSave_Ask
Ask for upload on save.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.