diff --git a/code/glTF2Exporter.cpp b/code/glTF2Exporter.cpp index 1001a2d94..0a7f5c415 100644 --- a/code/glTF2Exporter.cpp +++ b/code/glTF2Exporter.cpp @@ -94,19 +94,7 @@ glTF2Exporter::glTF2Exporter(const char* filename, IOSystem* pIOSystem, const ai , mIOSystem(pIOSystem) , mProperties(pProperties) { - aiScene* sceneCopy_tmp; - SceneCombiner::CopyScene(&sceneCopy_tmp, pScene); - std::unique_ptr sceneCopy(sceneCopy_tmp); - - SplitLargeMeshesProcess_Triangle tri_splitter; - tri_splitter.SetLimit(0xffff); - tri_splitter.Execute(sceneCopy.get()); - - SplitLargeMeshesProcess_Vertex vert_splitter; - vert_splitter.SetLimit(0xffff); - vert_splitter.Execute(sceneCopy.get()); - - mScene = sceneCopy.get(); + mScene = pScene; mAsset.reset( new Asset( pIOSystem ) ); @@ -681,12 +669,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref& meshRef, RefmNumFaces * nIndicesPerFace); for (size_t i = 0; i < aim->mNumFaces; ++i) { for (size_t j = 0; j < nIndicesPerFace; ++j) { - indices[i*nIndicesPerFace + j] = uint16_t(aim->mFaces[i].mIndices[j]); + indices[i*nIndicesPerFace + j] = IndicesType(aim->mFaces[i].mIndices[j]); } } - p.indices = ExportData(*mAsset, meshId, b, unsigned(indices.size()), &indices[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_UNSIGNED_SHORT, true); + p.indices = ExportData(*mAsset, meshId, b, unsigned(indices.size()), &indices[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_UNSIGNED_INT, true); } switch (aim->mPrimitiveTypes) {