diff --git a/code/FBXDocument.h b/code/FBXDocument.h index d6c502846..1843064b9 100644 --- a/code/FBXDocument.h +++ b/code/FBXDocument.h @@ -149,8 +149,8 @@ protected: -/** DOM class for generic FBX NoteAttribute blocks. NoteAttributes just hold a property table, - * actualy members are added by deriving classes. */ +/** DOM class for generic FBX NoteAttribute blocks. NoteAttribute's just hold a property table, + * fixed members are added by deriving classes. */ class NodeAttribute : public Object { public: @@ -236,6 +236,12 @@ public: return geometry; } + + /** Get node attachments */ + const std::vector& GetAttributes() const { + return attributes; + } + private: void ResolveLinks(const Element& element, const Document& doc); @@ -244,6 +250,7 @@ private: std::vector materials; std::vector geometry; + std::vector attributes; std::string shading; std::string culling; diff --git a/code/FBXModel.cpp b/code/FBXModel.cpp index d370630a4..69e2ee48c 100644 --- a/code/FBXModel.cpp +++ b/code/FBXModel.cpp @@ -89,7 +89,7 @@ Model::~Model() // ------------------------------------------------------------------------------------------------ void Model::ResolveLinks(const Element& element, const Document& doc) { - const char* const arr[] = {"Geometry","Material"}; + const char* const arr[] = {"Geometry","Material","NodeAttribute"}; // resolve material const std::vector& conns = doc.GetConnectionsByDestinationSequenced(ID(),arr, 2); @@ -121,6 +121,11 @@ void Model::ResolveLinks(const Element& element, const Document& doc) continue; } + const NodeAttribute* const att = dynamic_cast(ob); + if(att) { + attributes.push_back(att); + continue; + } DOMWarning("source object for model link is neither Material or Geometry, ignoring",&element); continue;