blender extra parameter animation import ( on hold );

This commit is contained in:
Sukhitha Prabhath Jayathilake
2011-08-14 16:15:41 +00:00
parent e93444f816
commit cc3b9aa467
3 changed files with 8 additions and 3 deletions

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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;