#include<kfbxlibrary.h>
Definition at line53of filekfbxlibrary.h.
Public Member Functions | |
KFbxLibrary* | GetParentLibrary(void) const |
Get a handle on the parent library if exists. | |
void | LocalizationBaseNamePrefix(const char *pPrefix) |
The prefix must not include the dash and language code, nor must it contain the extension. | |
KString | LocalizationBaseNamePrefix() const |
Retrieve the localization prefix. | |
bool | AddSubLibrary(KFbxLibrary*pSubLibrary) |
Adds a sub Library. | |
bool | RemoveSubLibrary(KFbxLibrary*pSubLibrary) |
Removes a sub Library. | |
int | GetSubLibraryCount(void) const |
Gets the total number of sub libraries. | |
KFbxLibrary* | GetSubLibrary(int pIndex) const |
Sub library accessor. | |
int | GetSubLibraryCount(constKFbxImplementationFilter&pCriteria) const |
Get the number of sub libraries that contains shading node according to their implementations. | |
KFbxLibrary* | GetSubLibrary(int pIndex, constKFbxImplementationFilter&pCriteria) const |
Get a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters. | |
bool | ImportAssets(KFbxLibrary*pSrcLibrary) |
Transfer ownership from the src library to us for all assets meeting the filter. | |
bool | ImportAssets(KFbxLibrary*pSrcLibrary, constKFbxCriteria&pAssetFilter) |
Transfer ownership from the src library to us for all assets meeting the filter. | |
template<class T> | |
T * | InstantiateMember(T const *pFBX_TYPE, constKFbxObjectFilter&pFilter, bool pRecurse=true,KFbxObject*pOptContainer=NULL) |
Return a new instance of a member of the library. | |
KFbxLocalizationManager& | GetLocalizationManager() const |
Get the localization manager for the library. | |
virtual const char * | Localize(const char *pID, const char *pDefault=NULL) const |
Localization helper function. | |
bool | AddShadingObject(KFbxObject*pShadingObject) |
Adds a shading node. | |
bool | RemoveShadingObject(KFbxObject*pShadingObject) |
Removes a shading node. | |
int | GetShadingObjectCount(void) const |
Gets the total number of shading nodes. | |
KFbxObject* | GetShadingObject(int pIndex) const |
Shading node accessor. | |
int | GetShadingObjectCount(constKFbxImplementationFilter&pCriteria) const |
Get the number of shading nodes according to their implementations. | |
KFbxObject* | GetShadingObject(int pIndex, constKFbxImplementationFilter&pCriteria) const |
Get a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters. | |
Static Public Member Functions | |
staticKFbxCriteria | GetAssetCriteriaFilter() |
Returns a criteria filter which can be used to . | |
staticKFbxCriteria | GetAssetDependentsFilter() |
Returns a filter which should be used when cloning / exporting objects -- this filters out objects that should stay in the asset library. |
KFbxLibrary* GetParentLibrary | ( | void | ) | const |
Get a handle on the parent library if exists.
Reimplemented fromKFbxObject.
void LocalizationBaseNamePrefix | ( | const char * | pPrefix | ) |
The prefix must not include the dash and language code, nor must it contain the extension.
But it can contain a folder, or sub-folder, if you want, such as:
locales/mydocloc
This will be resolved using the XRef Manager, with priority given to the library's .fbm folder, if it has one.
pPrefix | New prefix to be set. |
KStringLocalizationBaseNamePrefix | ( | ) | const |
Retrieve the localization prefix.
bool AddSubLibrary | ( | KFbxLibrary* | pSubLibrary | ) |
Adds a sub Library.
pSubLibrary | The sub library to be added. |
True
if success,false
otherwise.bool RemoveSubLibrary | ( | KFbxLibrary* | pSubLibrary | ) |
Removes a sub Library.
pSubLibrary | The sub library to be removed. |
True
if success,false
otherwise.int GetSubLibraryCount | ( | void | ) | const |
Gets the total number of sub libraries.
KFbxLibrary* GetSubLibrary | ( | int | pIndex | ) | const |
Sub library accessor.
pIndex | The sub library index. |
int GetSubLibraryCount | ( | constKFbxImplementationFilter& | pCriteria | ) | const |
Get the number of sub libraries that contains shading node according to their implementations.
pCriteria | filtering criteria that identifies the kind of implementations to take into account. |
KFbxLibrary* GetSubLibrary | ( | int | pIndex, | |
constKFbxImplementationFilter& | pCriteria | |||
) | const |
Get a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters.
pIndex | ||
pCriteria | filtering criteria that identifies the kind of implementations to take into account. |
staticKFbxCriteriaGetAssetCriteriaFilter | ( | ) | [static] |
Returns a criteria filter which can be used to .
.. filter ... objects when iterating items in the library; only real 'assets' will be returned, rather than FBX support objects. This includes, at this time, lights, environments, materials and textures (maps) This is typically used to IMPORT from a library.
staticKFbxCriteriaGetAssetDependentsFilter | ( | ) | [static] |
Returns a filter which should be used when cloning / exporting objects -- this filters out objects that should stay in the asset library.
This is typically used to EXPORT from a library (or CLONE from a library, although CloneAsset does all the nitty gritty for you)
bool ImportAssets | ( | KFbxLibrary* | pSrcLibrary | ) |
Transfer ownership from the src library to us for all assets meeting the filter.
Name clashing and other details are assumed to have been resolved beforehand.
External asset files required by the assets are copied over -- not moved. It's up to the owner of pSrcLibrary to clean up (maybe they can't; the files may be on a read-only transport). If this document hasn't been commited yet, then the assets WON'T be copied.
Returns true if no assets meeting the filter were skipped. If there are no assets meeting the filter, then true would be returned, as nothing was skipped.
This may leave the source library in an invalid state, if for instance you decide to transfer texture objects to our library, but you keep materials in the source library.
To safeguard against this, the transfer will disconnect objects, and you'd thus be left with materials without textures.
When transfering an object, all its dependents come with it. If you move a material, it WILL grab its textures. Just not the other way around.
pSrcLibrary | The source library. |
bool ImportAssets | ( | KFbxLibrary* | pSrcLibrary, | |
constKFbxCriteria& | pAssetFilter | |||
) |
Transfer ownership from the src library to us for all assets meeting the filter.
Name clashing and other details are assumed to have been resolved beforehand.
External asset files required by the assets are copied over -- not moved. It's up to the owner of pSrcLibrary to clean up (maybe they can't; the files may be on a read-only transport). If this document hasn't been commited yet, then the assets WON'T be copied.
Returns true if no assets meeting the filter were skipped. If there are no assets meeting the filter, then true would be returned, as nothing was skipped.
This may leave the source library in an invalid state, if for instance you decide to transfer texture objects to our library, but you keep materials in the source library.
To safeguard against this, the transfer will disconnect objects, and you'd thus be left with materials without textures.
When transfering an object, all its dependents come with it. If you move a material, it WILL grab its textures. Just not the other way around.
pSrcLibrary | The source library. | |
pAssetFilter | The asset filter. |
T * InstantiateMember | ( | T const * | pFBX_TYPE, | |
constKFbxObjectFilter& | pFilter, | |||
bool | pRecurse=true , | |||
KFbxObject* | pOptContainer=NULL | |||
) | [inline] |
Return a new instance of a member of the library.
This instantiates the first object found that matches the filter.
pFBX_TYPE | The type of member | |
pFilter | A user specified filter | |
pRecurse | Check sublibraries | |
pOptContainer | Optional container for the cloned asset |
Definition at line310of filekfbxlibrary.h.
ReferencesKFbxCollection::GetMember(),KFbxCollection::GetMemberCount(),InstantiateMember(), andKFbxObjectFilter::Match().
Referenced byInstantiateMember().
KFbxLocalizationManager&GetLocalizationManager | ( | ) | const |
Get the localization manager for the library.
virtual const char* Localize | ( | const char * | pID, | |
const char * | pDefault=NULL | |||
) | const[virtual] |
Localization helper function.
Calls the FBX SDK manager implementation. sub-classes which manage their own localization could over-ride this.
pID | the identifier for the text to localize. | |
pDefault | the default text. Uses pID if NULL. |
Reimplemented fromKFbxObject.
bool AddShadingObject | ( | KFbxObject* | pShadingObject | ) |
Adds a shading node.
pShadingObject | The shading node to be added. |
bool RemoveShadingObject | ( | KFbxObject* | pShadingObject | ) |
Removes a shading node.
pShadingObject | The shading node to be removed. |
int GetShadingObjectCount | ( | void | ) | const |
Gets the total number of shading nodes.
KFbxObject* GetShadingObject | ( | int | pIndex | ) | const |
Shading node accessor.
pIndex | Shading node index. |
int GetShadingObjectCount | ( | constKFbxImplementationFilter& | pCriteria | ) | const |
Get the number of shading nodes according to their implementations.
pCriteria | filtering criteria that identifies the kind of implementations to take into account. |
KFbxObject* GetShadingObject | ( | int | pIndex, | |
constKFbxImplementationFilter& | pCriteria | |||
) | const |
Get a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters.
pIndex | ||
pCriteria | filtering criteria that identifies the kind of implementations to take into account. |