commit
b9f83c8db8
|
@ -137,11 +137,13 @@ ColladaParser::ColladaParser(IOSystem *pIOHandler, const std::string &pFile) :
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Destructor, private as well
|
// Destructor, private as well
|
||||||
ColladaParser::~ColladaParser() {
|
ColladaParser::~ColladaParser() {
|
||||||
for (NodeLibrary::iterator it = mNodeLibrary.begin(); it != mNodeLibrary.end(); ++it)
|
for (NodeLibrary::iterator it = mNodeLibrary.begin(); it != mNodeLibrary.end(); ++it) {
|
||||||
delete it->second;
|
delete it->second;
|
||||||
for (MeshLibrary::iterator it = mMeshLibrary.begin(); it != mMeshLibrary.end(); ++it)
|
}
|
||||||
|
for (MeshLibrary::iterator it = mMeshLibrary.begin(); it != mMeshLibrary.end(); ++it) {
|
||||||
delete it->second;
|
delete it->second;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Read a ZAE manifest and return the filename to attempt to open
|
// Read a ZAE manifest and return the filename to attempt to open
|
||||||
|
@ -1284,10 +1286,10 @@ void ColladaParser::ReadEffectParam(XmlNode &node, Collada::EffectParam &pParam)
|
||||||
if (node.empty()) {
|
if (node.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlNodeIterator xmlIt(node);
|
XmlNodeIterator xmlIt(node);
|
||||||
xmlIt.collectChildrenPreOrder(node);
|
xmlIt.collectChildrenPreOrder(node);
|
||||||
XmlNode currentNode;
|
XmlNode currentNode;
|
||||||
|
|
||||||
while (xmlIt.getNext(currentNode)) {
|
while (xmlIt.getNext(currentNode)) {
|
||||||
const std::string ¤tName = currentNode.name();
|
const std::string ¤tName = currentNode.name();
|
||||||
if (currentName == "surface") {
|
if (currentName == "surface") {
|
||||||
|
@ -1313,6 +1315,11 @@ void ColladaParser::ReadEffectParam(XmlNode &node, Collada::EffectParam &pParam)
|
||||||
}
|
}
|
||||||
pParam.mType = Param_Sampler;
|
pParam.mType = Param_Sampler;
|
||||||
pParam.mReference = url.c_str() + 1;
|
pParam.mReference = url.c_str() + 1;
|
||||||
|
} else if (currentName == "source") {
|
||||||
|
const char *source = currentNode.child_value();
|
||||||
|
if (nullptr != source) {
|
||||||
|
pParam.mReference = source;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
||||||
|
|
||||||
Copyright (c) 2006-2020, assimp team
|
Copyright (c) 2006-2020, assimp team
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use of this software in source and binary forms,
|
Redistribution and use of this software in source and binary forms,
|
||||||
|
|
Loading…
Reference in New Issue