The programming interface below allows you to directly manage your project library, adding and removing Asset and directories as well as external files etc...
Name | Description |
Clean | Manually force a library clean up wich will causes Asset that does not have any links to be unloaded from memory. |
Declaration
|
Fix | Force the library to be rebuilt and fix Asset path. |
Declaration Return Value
true on success; false if the library is read-only or if it is precompiled.
- Note
- If you are migrating Asset from one project to another using an external file explorer you should call this function to ensure that the new Asset are discovered and properly inserted into the current library architecture.
- Warning
- Precompiled Asset cannot be migrated from one project to another.
|
AddAsset | Add a new Asset to the active library architecture. |
Declaration Asset *AddAsset( const char *name, const AssetType type ) Parameters
scene : The filename of the Asset.
type : Specify the AssetType to be created.
Return Value
Reference of the new Asset.
|
GetAsset | Retrieve an Asset reference using its name and AssetType. |
Declaration Asset *GetAsset( const char *name, const AssetType type ) Parameters
Return Value
nil if the Asset does not exists; else return its reference.
- Note
- This operation will not load the Asset simply retrieve its internal reference from the library.
|
GetAssetAt | Return an Asset usings its index and AssetType as key. |
Declaration Asset *GetAssetAt( const AssetType type, unsigned int index ) Parameters
type : The AssetType to retrieve.
index : Internal index of the Asset (by type).
Return Value
nil if the index is invalid; else return the Asset reference.
|
GetAssetCount | Helper that return the available amount of Asset for an AssetType. |
Declaration unsigned int GetAssetCount( const AssetType type ) Parameters
Return Value
The amount of Asset availabe for the type specified.
|
GetAssetIndex | Retrieve the internal index of a specific Asset reference. |
Declaration int GetAssetIndex( const Asset *asset ) Parameters
|
GetAssetIndexByType | Retrieve the Asset index in its AssetType list. |
Declaration int GetAssetIndexByType( const Asset *asset, const AssetType type ) Parameters
|
RemoveAsset | Remove an existing Asset from the library. |
Declaration bool RemoveAsset( const char *name, const AssetType type ) Parameters
|
RenameDir | Rename a library directory and update the paths of all Asset contain in it. |
Declaration bool RenameDir( const char *old_name, const char *new_name ) Parameters
old_name : Old directory name.
new_name : New directory name.
Return Value
true on success else return false if either the source or destination directory is invalid or outside of the library root path.
- Warning
- You cannot rename paths if the library is read-only or it is marked to precompiled Asset files.
|
RemoveDir | Remove an existing directory. |
Declaration bool RemoveDir( const char *name ) Parameters
name : Filepath to remove.
Return Value
true on success; false if the directory does not exists or if there is still connected Asset in it.
- Warning
- If the directory is not empty all Asset in that directory cannot be linked to any other resource(s) in order to remove it.
|
GetScene | Retrieve an existing Scene from the library. |
Declaration Scene *GetScene( const char *name ) Parameters
name : Name of the Scene to retrieve.
Return Value
nil if no existing Scene match the name received as parameter; else return the Scene reference.
|
GetTexture | Retrieve an existing Texture from the library. |
Declaration Texture *GetTexture( const char *name ) Parameters
name : Name of the Texture to retrieve.
Return Value
nil if no existing Texture match the name received as parameter; else return the Texture reference.
|
GetCubemap | Retrieve an existing Cubemap from the library. |
Declaration Cubemap *GetCubemap( const char *name ) Parameters
name : Name of the Cubemap to retrieve.
Return Value
nil if no existing Cubemap match the name received as parameter; else return the Cubemap reference.
|
GetMaterial | Retrieve an existing Material from the library. |
Declaration Material *GetMaterial( const char *name ) Parameters
Return Value
nil if no existing Material match the name received as parameter; else return the Material reference.
|
GetPhysicMaterial | Retrieve an existing PhysicMaterial from the library. |
Declaration PhysicMaterial *GetPhysicMaterial( const char *name ) Parameters
Return Value
nil if no existing PhysicMaterial match the name received as parameter; else return the PhysicMaterial reference.
|
GetSoundBuffer | Retrieve an existing SoundBuffer from the library. |
Declaration SoundBuffer *GetSoundBuffer( const char *name ) Parameters
Return Value
nil if no existing SoundBuffer match the name received as parameter; else return the SoundBuffer reference.
|
GetVideoBuffer | Retrieve an existing VideoBuffer from the library. |
Declaration VideoBuffer *GetVideoBuffer( const char *name ) Parameters
Return Value
nil if no existing VideoBuffer match the name received as parameter; else return the VideoBuffer reference.
|
GetMesh | Retrieve an existing Mesh from the library. |
Declaration Mesh *GetMesh( const char *name ) Parameters
name : Name of the Mesh to retrieve.
Return Value
nil if no existing Mesh match the name received as parameter; else return the Mesh reference.
|
GetSkeleton | Retrieve an existing Skeleton from the library. |
Declaration Skeleton *GetSkeleton( const char *name ) Parameters
Return Value
nil if no existing Skeleton match the name received as parameter; else return the Skeleton reference.
|
GetScript | Retrieve an existing Script from the library. |
Declaration Script *GetScript( const char *name ) Parameters
name : Name of the Script to retrieve.
Return Value
nil if no existing Script match the name received as parameter; else return the Script reference.
|
GetUtility | Retrieve an existing Utility from the library. |
Declaration Utility *GetUtility( const char *name ) Parameters
name : Name of the Utility to retrieve.
Return Value
nil if no existing Utility match the name received as parameter; else return the Utility reference.
|
GetShader | Retrieve an existing Shader from the library. |
Declaration Shader *GetShader( const char *name ) Parameters
name : Name of the Shader to retrieve.
Return Value
nil if no existing Shader match the name received as parameter; else return the Shader reference.
|
GetTrack | Retrieve an existing Track from the library. |
Declaration Track *GetTrack( const char *name ) Parameters
name : Name of the Track to retrieve.
Return Value
nil if no existing Track match the name received as parameter; else return the Track reference.
|
GetEntity | Retrieve an existing Entity from the library. |
Declaration Entity *GetEntity( const char *name ) Parameters
name : Name of the Entity to retrieve.
Return Value
nil if no existing Entity match the name received as parameter; else return the Entity reference.
|
GetFracture | Retrieve an existing Fracture from the library. |
Declaration Fracture *GetFracture( const char *name ) Parameters
Return Value
nil if no existing Fracture match the name received as parameter; else return the Fracture reference.
|
GetParticleNetwork | Retrieve an existing ParticleNetwork from the library. |
Declaration ParticleNetwork *GetParticleNetwork( const char *name ) Parameters
Return Value
nil if no existing ParticleNetwork match the name received as parameter; else return the ParticleNetwork reference.
|
GetPath | Retrieve an existing Path from the library. |
Declaration Path *GetPath( const char *name ) Parameters
name : Name of the Path to retrieve.
Return Value
nil if no existing Path match the name received as parameter; else return the Path reference.
|
GetAudioEffect | Retrieve an existing AudioEffect from the library. |
Declaration AudioEffect *GetAudioEffect( const char *name ) Parameters
Return Value
nil if no existing AudioEffect match the name received as parameter; else return the AudioEffect reference.
|
GetAudioFilter | Retrieve an existing AudioFilter from the library. |
Declaration AudioFilter *GetAudioFilter( const char *name ) Parameters
Return Value
nil if no existing AudioFilter match the name received as parameter; else return the AudioFilter reference.
|
GetArmature | Retrieve an existing Armature from the library. |
Declaration Armature *GetArmature( const char *name ) Parameters
Return Value
nil if no existing Armature match the name received as parameter; else return the Armature reference.
|
GetController | Retrieve an existing Controller from the library. |
Declaration Controller *GetController( const char *name ) Parameters
Return Value
nil if no existing Controller match the name received as parameter; else return the Controller reference.
|
Save | Save all Asset marked as dirty. |
Declaration Return Value
true on success; false if the project is read-only.
|
AddBookmark | Add a bookmark to the library. |
Declaration void AddBookmark( const char *bookmark ) Parameters
bookmark : The path to bookmark.
|
GetBookmark | Retrieve an existing bookmark by index. |
Declaration char *GetBookmark( unsigned char index ) Parameters
index : Index of the bookmark to retrieve.
Return Value
nil if the index provided is invalid; else return the bookmark pointed by index.
|
RemoveBookmark | Remove an existing bookmark by index. |
Declaration bool RemoveBookmark( int index ) Parameters
index : Index of the bookmark to remove.
Return Value
true on success; false if the bookmark index is invalid.
|
AddExternalFile | Add an external file to the project. |
Declaration int AddExternalFile( const int platform_id, const char *filename ) Parameters
platform_id : Specify on which platform the file should be used/published.
filename : The filename to import to the current project.
Return Value
-1 if the filename specified does not exists; else return the index of the new external file.
|
PublishExternalFile | Specify if an external file should be published or not with the project. |
Declaration bool PublishExternalFile( const int index, const bool publish ) Parameters
index : Index of the external file.
publish : Specify if the file should be published.
Return Value
false if the external file index provided is invalid; else return true .
|
RemoveExternalFile | Remove an external file by index. |
Declaration bool RemoveExternalFile( int index ) Parameters
index : Index of the external file to remove.
Return Value
false if the index is invalid; else return true if the external file have been removed.
|
ExcludeFolder | Exlude a folder from beeing published/packed on a specific platform. |
Declaration int ExcludeFolder( int platform_id, const char *folder ) Parameters
platform_id : The platform the folder should not be published on.
folder : Specify the folder to exclude.
Return Value
-1 if either the folder or platform is invalid; else return the list index of the folder added for exclusion
|
RemoveExcludeFolder | Remove excluded folder by index. |
Declaration bool RemoveExcludeFolder( int index ) Parameters
index : Index of the external folder to remove.
Return Value
false if the index is invalid; else return true if the excluded folder have been removed.
|
ExcludeFolderEnabled | Set the inclusion or exclusion state of a specific folder. |
Declaration bool ExcludeFolderEnabled( const int index, bool enabled ) Parameters
index : Index of the external folder to include or exclude.
enabled : Include of exclude the folder associated to a specific platform.
Return Value
false if the exclude folder index does not exists, else return true .
|
LibGetUsage | Retrieve approximated size of the project on disk. |
Declaration uint64_t LibGetUsage( bool uncompress ) Parameters
uncompress : Specify wether or not the project is compressed.
Return Value
Usage of the project size in bytes.
|