Merge branch 'master' into issue_2195_draco
This commit is contained in:
@@ -329,8 +329,8 @@ void AMFImporter::Postprocess_AddMetadata(const AMFMetaDataArray &metadataList,
|
||||
sceneNode.mMetaData = aiMetadata::Alloc(static_cast<unsigned int>(metadataList.size()));
|
||||
size_t meta_idx(0);
|
||||
|
||||
for (const AMFMetadata &metadata : metadataList) {
|
||||
sceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx++), metadata.Type, aiString(metadata.Value));
|
||||
for (const AMFMetadata *metadata : metadataList) {
|
||||
sceneNode.mMetaData->Set(static_cast<unsigned int>(meta_idx++), metadata->Type, aiString(metadata->Value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -557,7 +557,12 @@ void ColladaLoader::BuildMeshesForNode(const ColladaParser &pParser, const Colla
|
||||
faceStart += submesh.mNumFaces;
|
||||
|
||||
// assign the material index
|
||||
dstMesh->mMaterialIndex = matIdx;
|
||||
std::map<std::string, size_t>::const_iterator subMatIt = mMaterialIndexByName.find(submesh.mMaterial);
|
||||
if (subMatIt != mMaterialIndexByName.end()) {
|
||||
dstMesh->mMaterialIndex = static_cast<unsigned int>(subMatIt->second);
|
||||
} else {
|
||||
dstMesh->mMaterialIndex = matIdx;
|
||||
}
|
||||
if (dstMesh->mName.length == 0) {
|
||||
dstMesh->mName = mid.mMeshOrController;
|
||||
}
|
||||
|
||||
@@ -1229,7 +1229,7 @@ unsigned int glTF2Exporter::ExportNode(const aiNode* n, Ref<Node>& parent)
|
||||
node->name = name;
|
||||
|
||||
if (!n->mTransformation.IsIdentity()) {
|
||||
if (mScene->mNumAnimations > 0) {
|
||||
if (mScene->mNumAnimations > 0 || (mProperties && mProperties->HasPropertyBool("GLTF2_NODE_IN_TRS"))) {
|
||||
aiQuaternion quaternion;
|
||||
n->mTransformation.Decompose(*reinterpret_cast<aiVector3D *>(&node->scale.value), quaternion, *reinterpret_cast<aiVector3D *>(&node->translation.value));
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
# 3) Add libassimp using the file lists (eliminates duplication of file names between
|
||||
# source groups and library command)
|
||||
#
|
||||
cmake_minimum_required( VERSION 3.0 )
|
||||
cmake_minimum_required( VERSION 3.10 )
|
||||
SET( HEADER_PATH ../include/assimp )
|
||||
|
||||
if(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
|
||||
@@ -78,6 +78,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <assimp/Profiler.h>
|
||||
#include <assimp/commonMetaData.h>
|
||||
|
||||
#include <exception>
|
||||
#include <set>
|
||||
#include <memory>
|
||||
#include <cctype>
|
||||
|
||||
@@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef INCLUDED_AI_IMPORTER_H
|
||||
#define INCLUDED_AI_IMPORTER_H
|
||||
|
||||
#include <exception>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@@ -844,7 +844,8 @@ void ValidateDSProcess::Validate(const aiAnimation *pAnimation,
|
||||
Validate(&pMeshMorphAnim->mName);
|
||||
|
||||
if (!pMeshMorphAnim->mNumKeys) {
|
||||
ReportError("Empty mesh morph animation channel");
|
||||
ReportWarning("Empty mesh morph animation channel");
|
||||
return;
|
||||
}
|
||||
|
||||
// otherwise check whether one of the keys exceeds the total duration of the animation
|
||||
|
||||
Reference in New Issue
Block a user