diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
commit | cde1174345224d33d6b45b1e3243fa39043223e5 (patch) | |
tree | 6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/newview/lllocalgltfmaterials.cpp | |
parent | 6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff) | |
parent | 35efadf78315f9b351415930dca4fae251ef4dd0 (diff) |
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/newview/lllocalgltfmaterials.cpp')
-rw-r--r-- | indra/newview/lllocalgltfmaterials.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp index 8019be6f42..3af1433a40 100644 --- a/indra/newview/lllocalgltfmaterials.cpp +++ b/indra/newview/lllocalgltfmaterials.cpp @@ -177,6 +177,8 @@ bool LLLocalGLTFMaterial::updateSelf() } } + materialBegin(); + materialComplete(true); updated = true; } @@ -201,6 +203,8 @@ bool LLLocalGLTFMaterial::updateSelf() LLNotificationsUtil::add("LocalBitmapsUpdateFailedFinal", notif_args); mLinkStatus = LS_BROKEN; + materialBegin(); + materialComplete(false); } } } @@ -218,6 +222,8 @@ bool LLLocalGLTFMaterial::updateSelf() LLNotificationsUtil::add("LocalBitmapsUpdateFileNotFound", notif_args); mLinkStatus = LS_BROKEN; + materialBegin(); + materialComplete(false); } } @@ -335,19 +341,19 @@ S32 LLLocalGLTFMaterialMgr::addUnit(const std::string& filename) tinygltf::Model model; LLTinyGLTFHelper::loadModel(filename, model); - S32 materials_in_file = model.materials.size(); + auto materials_in_file = model.materials.size(); if (materials_in_file <= 0) { return 0; } S32 loaded_materials = 0; - for (S32 i = 0; i < materials_in_file; i++) + for (size_t i = 0; i < materials_in_file; i++) { // Todo: this is rather inefficient, files will be spammed with // separate loads and date checks, find a way to improve this. // May be doUpdates() should be checking individual files. - LLPointer<LLLocalGLTFMaterial> unit = new LLLocalGLTFMaterial(filename, i); + LLPointer<LLLocalGLTFMaterial> unit = new LLLocalGLTFMaterial(filename, static_cast<S32>(i)); // load material from file if (unit->updateSelf()) |