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 line58of 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.
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(const KFbxImplementationFilter&pCriteria) const
 Get the number of sub libraries that contains shading node according to their implementations.
KFbxLibraryGetSubLibrary(int pIndex, const KFbxImplementationFilter&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.
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(const KFbxImplementationFilter&pCriteria) const
 Get the number of shading nodes according to their implementations.
KFbxObjectGetShadingObject(int pIndex, const KFbxImplementationFilter&pCriteria) const
 Get a handle on the (pIndex)th sub-library that corresponds to the given filtering parameters.

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.

bool AddSubLibrary(KFbxLibrarypSubLibrary ) 

Adds a sub Library.

bool RemoveSubLibrary(KFbxLibrarypSubLibrary ) 

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(const KFbxImplementationFilter& pCriteria ) 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,
const KFbxImplementationFilter& pCriteria 
)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

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.

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 line275of 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.

bool RemoveShadingObject(KFbxObjectpShadingObject ) 

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(const KFbxImplementationFilter& pCriteria ) 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,
const KFbxImplementationFilter& pCriteria 
)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