diff --git a/libraries/fbx/src/GLTFReader.cpp b/libraries/fbx/src/GLTFReader.cpp index 198d9c2566..c8501688ac 100644 --- a/libraries/fbx/src/GLTFReader.cpp +++ b/libraries/fbx/src/GLTFReader.cpp @@ -660,7 +660,7 @@ bool GLTFReader::parseGLTF(const QByteArray& model) { return true; } -const glm::mat4& GLTFReader::getModelTransform(const GLTFNode& node) { +glm::mat4 GLTFReader::getModelTransform(const GLTFNode& node) { glm::mat4 tmat = glm::mat4(1.0); if (node.defined["matrix"] && node.matrix.size() == 16) { @@ -962,7 +962,7 @@ QNetworkReply* GLTFReader::request(QUrl& url, bool isTest) { return netReply; // trying to sync later on. } -const FBXTexture& GLTFReader::getFBXTexture(const GLTFTexture& texture) { +FBXTexture GLTFReader::getFBXTexture(const GLTFTexture& texture) { FBXTexture fbxtex = FBXTexture(); fbxtex.texcoordSet = 0; diff --git a/libraries/fbx/src/GLTFReader.h b/libraries/fbx/src/GLTFReader.h index e8ff590d04..3554594768 100644 --- a/libraries/fbx/src/GLTFReader.h +++ b/libraries/fbx/src/GLTFReader.h @@ -712,7 +712,7 @@ private: GLTFFile _file; QUrl _url; - const glm::mat4& getModelTransform(const GLTFNode& node); + glm::mat4 getModelTransform(const GLTFNode& node); bool buildGeometry(FBXGeometry& geometry, const QUrl& url); bool parseGLTF(const QByteArray& model); @@ -779,7 +779,7 @@ private: void setFBXMaterial(FBXMaterial& fbxmat, const GLTFMaterial& material); - const FBXTexture& getFBXTexture(const GLTFTexture& texture); + FBXTexture getFBXTexture(const GLTFTexture& texture); void fbxDebugDump(const FBXGeometry& fbxgeo); };