blender extra parameter animation import ( on hold );
This commit is contained in:
@@ -116,7 +116,7 @@ bool DocumentImporter::import()
|
||||
/** TODO Add error handler (implement COLLADASaxFWL::IErrorHandler */
|
||||
COLLADASaxFWL::Loader loader;
|
||||
COLLADAFW::Root root(&loader, this);
|
||||
ExtraHandler *ehandler = new ExtraHandler(this);
|
||||
ExtraHandler *ehandler = new ExtraHandler(this, &(this->anim_importer));
|
||||
|
||||
loader.registerExtraDataCallbackHandler(ehandler);
|
||||
|
||||
|
||||
@@ -31,9 +31,10 @@
|
||||
|
||||
#include "ExtraHandler.h"
|
||||
|
||||
ExtraHandler::ExtraHandler(DocumentImporter *dimp) : currentExtraTags(0)
|
||||
ExtraHandler::ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp) : currentExtraTags(0)
|
||||
{
|
||||
this->dimp = dimp;
|
||||
this->aimp = aimp;
|
||||
}
|
||||
|
||||
ExtraHandler::~ExtraHandler() {}
|
||||
@@ -42,6 +43,7 @@ bool ExtraHandler::elementBegin( const char* elementName, const char** attribute
|
||||
{
|
||||
// \todo attribute handling for profile tags
|
||||
currentElement = std::string(elementName);
|
||||
//addToSidTree(attributes[0], attributes[1]);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,10 @@
|
||||
#include <algorithm> // sort()
|
||||
|
||||
#include "COLLADASaxFWLIExtraDataCallbackHandler.h"
|
||||
#include "COLLADASaxFWLFilePartLoader.h"
|
||||
|
||||
#include "DocumentImporter.h"
|
||||
#include "AnimationImporter.h"
|
||||
|
||||
/** \brief Handler class for <extra> data, through which different
|
||||
* profiles can be handled
|
||||
@@ -42,7 +44,7 @@ class ExtraHandler : public COLLADASaxFWL::IExtraDataCallbackHandler
|
||||
{
|
||||
public:
|
||||
/** Constructor. */
|
||||
ExtraHandler(DocumentImporter *dimp);
|
||||
ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp);
|
||||
|
||||
/** Destructor. */
|
||||
virtual ~ExtraHandler();
|
||||
@@ -69,6 +71,7 @@ private:
|
||||
|
||||
/** Handle to DocumentImporter for interface to extra element data saving. */
|
||||
DocumentImporter* dimp;
|
||||
AnimationImporter* aimp;
|
||||
/** Holds Id of element for which <extra> XML elements are handled. */
|
||||
COLLADAFW::UniqueId currentUid;
|
||||
ExtraTags* currentExtraTags;
|
||||
|
||||
Reference in New Issue
Block a user