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