diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-01-12 19:03:36 +0200 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-01-12 19:03:36 +0200 | 
| commit | 10a4319c303a30789ff02f89e3e59028573f5b46 (patch) | |
| tree | 31766f8e17c317b809590b964c34589900a4963c | |
| parent | 887b4818751c84609ee5e8f9636be41391e444fd (diff) | |
SL-18962 PBR Materials should be viewable even if they are no-copy
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 21 | 
1 files changed, 9 insertions, 12 deletions
| diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index dbbd6edb7d..9efe5dc1f1 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -2899,19 +2899,14 @@ void LLMaterialEditor::loadAsset()                  setEnableEditing(false); // wait for it to load -                // request the asset. -                gAssetStorage->getInvItemAsset(source_sim, -                    gAgent.getID(), -                    gAgent.getSessionID(), -                    item->getPermissions().getOwner(), -                    mObjectUUID, -                    item->getUUID(), -                    item->getAssetUUID(), -                    item->getType(), +                mAssetStatus = PREVIEW_ASSET_LOADING; + +                // May callback immediately +                gAssetStorage->getAssetData(item->getAssetUUID(), +                    LLAssetType::AT_MATERIAL,                      &onLoadComplete,                      (void*)user_data,                      TRUE); -                mAssetStatus = PREVIEW_ASSET_LOADING;              }          }      } @@ -2962,7 +2957,7 @@ void LLMaterialEditor::onLoadComplete(const LLUUID& asset_uuid,      {          if (asset_uuid != editor->mAssetID)          { -            LL_WARNS() << "Asset id mismatch, expected: " << editor->mAssetID << " got: " << asset_uuid << LL_ENDL; +            LL_WARNS("MaterialEditor") << "Asset id mismatch, expected: " << editor->mAssetID << " got: " << asset_uuid << LL_ENDL;          }          if (0 == status)          { @@ -2991,6 +2986,8 @@ void LLMaterialEditor::onLoadComplete(const LLUUID& asset_uuid,              }              else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)              { +                // Not supposed to happen? +                LL_WARNS("MaterialEditor") << "No permission to view material " << asset_uuid << LL_ENDL;                  LLNotificationsUtil::add("MaterialNoPermissions");              }              else @@ -2999,7 +2996,7 @@ void LLMaterialEditor::onLoadComplete(const LLUUID& asset_uuid,              }              editor->setEnableEditing(false); -            LL_WARNS() << "Problem loading material: " << status << LL_ENDL; +            LL_WARNS("MaterialEditor") << "Problem loading material: " << status << LL_ENDL;              editor->mAssetStatus = PREVIEW_ASSET_ERROR;          }      } | 
