Typical handler for the referenced document events.
Register it like so: KFbxExternalDocRefListener lRefDocListener( sdkManager, fileName ); kfbxevents::KFbxEventHandler * lHandler = lRefDocListener.Bind(scene, &KFbxExternalDocRefListener::HandleEvent);
And later unregister it like so: lRefDocListener.Unbind(lHandler);
Definition at line 66 of file kfbxexternaldocreflistener.h.
#include <kfbxexternaldocreflistener.h>
Public Member Functions |
|
KFbxExternalDocRefListener (KFbxSdkManager &pManager, const KString &pDocFilePath) | |
Constructor. |
|
virtual | ~KFbxExternalDocRefListener () |
virtual void | SetDocumentFilePath (const KString &pDocFilePath) |
Set the document file path used to resolve
documents. |
|
virtual bool | AreAllExternalDocumentsStillValid () const |
Verify that all documents that were
previously loaded in a previous load session are still valid.
|
|
virtual bool | WereAllExternalDocumentsValid () const |
Verify that all documents that were referred
to didn't change. |
|
virtual void | UnloadExternalDocuments () |
Unload all documents that were loaded
through this event handler. |
|
virtual void | HandleEvent (const KFbxEventReferencedDocument *pEvent) |
External document reference event handler.
|
|
Protected Member Functions |
|
virtual KString | MakeFilenameAbsolute (const KString &pFilename) const |
Turn a relative path to an absolute path
using the file path of the original document being loaded. |
|
virtual KFbxDocument * | FindDocument (const KString &pPathToDoc) |
Locate a document by its document path.
|
|
virtual KFbxDocument * | LoadDocument (KFbxObject *pParent, const KString &pClassName, const KString &pFilename) |
Load a library, potentially under another
library. |
|
virtual bool | ConnectToParentLibrary (const KFbxExternalDocumentInfo &) |
Try to connect a library to its parent given
its document path. |
|
virtual void | TryConnectingDanglingLibraries () |
Try to reconnect dangling libraries that
didn't find their parent. |
KFbxExternalDocRefListener | ( | KFbxSdkManager & | pManager, |
const KString & | pDocFilePath | ||
) |
Constructor.
pManager | |
pDocFilePath |
virtual ~KFbxExternalDocRefListener | ( | ) | [virtual] |
virtual void SetDocumentFilePath | ( | const KString & | pDocFilePath | ) | [virtual] |
Set the document file path used to resolve documents.
pDocFilePath |
virtual bool AreAllExternalDocumentsStillValid | ( | ) | const [virtual] |
Verify that all documents that were previously loaded in a previous load session are still valid.
true
if all documents are still valid,
false
otherwise.virtual bool WereAllExternalDocumentsValid | ( | ) | const [virtual] |
Verify that all documents that were referred to didn't change.
true
if all documents didn't change,
false
otherwise.virtual void UnloadExternalDocuments | ( | ) | [virtual] |
Unload all documents that were loaded through this event handler.
virtual void HandleEvent | ( | const KFbxEventReferencedDocument * | pEvent | ) | [virtual] |
External document reference event handler.
pEvent |
Turn a relative path to an absolute path using the file path of the original document being loaded.
If the path is already is absolute, it is returned as is.
virtual KFbxDocument* FindDocument | ( | const KString & | pPathToDoc | ) | [protected, virtual] |
Locate a document by its document path.
virtual KFbxDocument* LoadDocument | ( | KFbxObject * | pParent, |
const KString & | pClassName, | ||
const KString & | pFilename | ||
) | [protected, virtual] |
Load a library, potentially under another library.
virtual bool ConnectToParentLibrary | ( | const KFbxExternalDocumentInfo & | ) | [protected, virtual] |
Try to connect a library to its parent given its document path.
virtual void TryConnectingDanglingLibraries | ( | ) | [protected, virtual] |
Try to reconnect dangling libraries that didn't find their parent.