diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-04 18:57:48 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-04 18:57:48 +0200 |
| commit | 11c87378be68d9102d7dcf94d714b3c5c1923952 (patch) | |
| tree | d7a3cd05c69172c328233166c2ad0c0b6fc9b555 /indra/newview/lltinygltfhelper.cpp | |
| parent | d26f545c5aa22d8267a2284c787bc9503e8b6cc9 (diff) | |
SL-18560 Make local materials save correctly from right-click menu
Diffstat (limited to 'indra/newview/lltinygltfhelper.cpp')
| -rw-r--r-- | indra/newview/lltinygltfhelper.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/lltinygltfhelper.cpp b/indra/newview/lltinygltfhelper.cpp index cff26ea51f..58031d4204 100644 --- a/indra/newview/lltinygltfhelper.cpp +++ b/indra/newview/lltinygltfhelper.cpp @@ -186,11 +186,7 @@ bool LLTinyGLTFHelper::getMaterialFromFile( const std::string& filename, S32 mat_index, LLPointer < LLFetchedGLTFMaterial> material, - std::string& material_name, - LLPointer<LLViewerFetchedTexture>& base_color_tex, - LLPointer<LLViewerFetchedTexture>& normal_tex, - LLPointer<LLViewerFetchedTexture>& mr_tex, - LLPointer<LLViewerFetchedTexture>& emissive_tex) + std::string& material_name) { tinygltf::TinyGLTF loader; std::string error_msg; @@ -249,6 +245,11 @@ bool LLTinyGLTFHelper::getMaterialFromFile( occlusion_img = LLTinyGLTFHelper::getTexture(folder, model_in, material_in.occlusionTexture.index); } + LLPointer<LLViewerFetchedTexture> base_color_tex; + LLPointer<LLViewerFetchedTexture> normal_tex; + LLPointer<LLViewerFetchedTexture> mr_tex; + LLPointer<LLViewerFetchedTexture> emissive_tex; + // todo: pass it into local bitmaps? LLTinyGLTFHelper::initFetchedTextures(material_in, base_img, normal_img, mr_img, emissive_img, occlusion_img, @@ -258,7 +259,7 @@ bool LLTinyGLTFHelper::getMaterialFromFile( { base_color_tex->addTextureStats(64.f * 64.f, TRUE); material->mBaseColorId = base_color_tex->getID(); - material->mBaseColorTexture = base_color_tex; + material->mBaseColorTexture; } else { |
