KFbxLibrary
#include<kfbxlibrary.h>

Inheritance diagram for KFbxLibrary:

Inheritance graph
[legend]

List of all members.

Detailed Description

This object represents a shading node library.

Definition at line53of filekfbxlibrary.h.


Public Member Functions

KFbxLibraryGetParentLibrary(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.
KFbxLibraryGetSubLibrary(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.
KFbxLibraryGetSubLibrary(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.
KFbxObjectGetShadingObject(int pIndex) const
 Shading node accessor.
int GetShadingObjectCount(constKFbxImplementationFilter&pCriteria) const
 Get the number of shading nodes according to their implementations.
KFbxObjectGetShadingObject(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.

Member Function Documentation

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.

Parameters:
pPrefix New prefix to be set.

KStringLocalizationBaseNamePrefix( ) const

Retrieve the localization prefix.

bool AddSubLibrary(KFbxLibrarypSubLibrary ) 

Adds a sub Library.

Parameters:
pSubLibrary The sub library to be added.
Returns:
Trueif success,falseotherwise.

bool RemoveSubLibrary(KFbxLibrarypSubLibrary ) 

Removes a sub Library.

Parameters:
pSubLibrary The sub library to be removed.
Returns:
Trueif success,falseotherwise.

int GetSubLibraryCount(void  ) const

Gets the total number of sub libraries.

KFbxLibrary* GetSubLibrary(int pIndex ) const

Sub library accessor.

Parameters:
pIndex The sub library index.

int GetSubLibraryCount(constKFbxImplementationFilterpCriteria ) const

Get the number of sub libraries that contains shading node according to their implementations.

Parameters:
pCriteria filtering criteria that identifies the kind of implementations to take into account.
Returns:
the number of sub-libraries corresponding to the filtering parameters

KFbxLibrary* GetSubLibrary(int pIndex,
constKFbxImplementationFilterpCriteria 
)const

Get a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters.

Parameters:
pIndex 
pCriteria filtering criteria that identifies the kind of implementations to take into account.
Returns:
a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters

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(KFbxLibrarypSrcLibrary ) 

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.

Parameters:
pSrcLibrary The source library.

bool ImportAssets(KFbxLibrarypSrcLibrary,
constKFbxCriteriapAssetFilter 
)

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.

Parameters:
pSrcLibrary The source library.
pAssetFilter The asset filter.

T * InstantiateMember(T const * pFBX_TYPE,
constKFbxObjectFilterpFilter,
bool pRecurse=true,
KFbxObjectpOptContainer=NULL 
)[inline]

Return a new instance of a member of the library.

This instantiates the first object found that matches the filter.

Parameters:
pFBX_TYPE The type of member
pFilter A user specified filter
pRecurse Check sublibraries
pOptContainer Optional container for the cloned asset
Returns:
A new instance of the member. Note that the new member is not inserted into this library.

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.

Parameters:
pID the identifier for the text to localize.
pDefault the default text. Uses pID if NULL.
Returns:
the potentially localized text. May return the parameter passed in.

Reimplemented fromKFbxObject.

bool AddShadingObject(KFbxObjectpShadingObject ) 

Adds a shading node.

Parameters:
pShadingObject The shading node to be added.

bool RemoveShadingObject(KFbxObjectpShadingObject ) 

Removes a shading node.

Parameters:
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.

Parameters:
pIndex Shading node index.
Returns:
The (pIndex)th shading node.

int GetShadingObjectCount(constKFbxImplementationFilterpCriteria ) const

Get the number of shading nodes according to their implementations.

Parameters:
pCriteria filtering criteria that identifies the kind of implementations to take into account.
Returns:
the number of shading nodes corresponding to the filtering parameters

KFbxObject* GetShadingObject(int pIndex,
constKFbxImplementationFilterpCriteria 
)const

Get a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters.

Parameters:
pIndex 
pCriteria filtering criteria that identifies the kind of implementations to take into account.
Returns:
a handle on the (pIndex)th shading node that corresponds to the given filtering parameters