Merge branch 'master' into rbsheth_hunter_hotfix

pull/3456/head
Kim Kulling 2020-10-14 21:14:42 +02:00 committed by GitHub
commit 828068d224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -137,10 +137,12 @@ ColladaParser::ColladaParser(IOSystem *pIOHandler, const std::string &pFile) :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
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;
for (MeshLibrary::iterator it = mMeshLibrary.begin(); it != mMeshLibrary.end(); ++it)
}
for (MeshLibrary::iterator it = mMeshLibrary.begin(); it != mMeshLibrary.end(); ++it) {
delete it->second;
}
}
// ------------------------------------------------------------------------------------------------
@ -1284,10 +1286,10 @@ void ColladaParser::ReadEffectParam(XmlNode &node, Collada::EffectParam &pParam)
if (node.empty()) {
return;
}
XmlNodeIterator xmlIt(node);
xmlIt.collectChildrenPreOrder(node);
XmlNode currentNode;
while (xmlIt.getNext(currentNode)) {
const std::string &currentName = currentNode.name();
if (currentName == "surface") {
@ -1313,6 +1315,11 @@ void ColladaParser::ReadEffectParam(XmlNode &node, Collada::EffectParam &pParam)
}
pParam.mType = Param_Sampler;
pParam.mReference = url.c_str() + 1;
} else if (currentName == "source") {
const char *source = currentNode.child_value();
if (nullptr != source) {
pParam.mReference = source;
}
}
}
}

View File

@ -598,7 +598,7 @@ bool XGLImporter::ReadMesh(XmlNode &node, TempScope &scope) {
}
// finally extract output meshes and add them to the scope
typedef std::pair<unsigned int, TempMaterialMesh> pairt;
typedef std::pair<const unsigned int, TempMaterialMesh> pairt;
for (const pairt &p : bymat) {
aiMesh *const m = ToOutputMesh(p.second);
scope.meshes_linear.push_back(m);

View File

@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2020, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,