summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterdebugmaterials.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2012-12-12 20:39:47 +0100
committerKitty Barnett <develop@catznip.com>2012-12-12 20:39:47 +0100
commit3cd04749128f3daa185bca477552a566bc287a8e (patch)
tree2bc7a2c70c5a396e06cfe96858a58cd0d9dd1a61 /indra/newview/llfloaterdebugmaterials.cpp
parenta17f3e41ff960b7b486c5dd94860d484b4ceb177 (diff)
Refactor material retrieval to always invoke the region's GET material cap first
Diffstat (limited to 'indra/newview/llfloaterdebugmaterials.cpp')
-rw-r--r--indra/newview/llfloaterdebugmaterials.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llfloaterdebugmaterials.cpp b/indra/newview/llfloaterdebugmaterials.cpp
index e62b08d2b4..c9f15a9c35 100644
--- a/indra/newview/llfloaterdebugmaterials.cpp
+++ b/indra/newview/llfloaterdebugmaterials.cpp
@@ -386,12 +386,17 @@ void LLFloaterDebugMaterials::onPostClicked()
{
const LLScrollListItem* selectedItem = *selectedItemIter;
const LLSD& selectedItemValue = selectedItem->getValue();
+ llassert(selectedItemValue.isMap());
+
+ llassert(selectedItemValue.has(VIEWABLE_OBJECTS_REGION_ID_FIELD));
+ llassert(selectedItemValue.get(VIEWABLE_OBJECTS_REGION_ID_FIELD).isUUID());
+ const LLUUID& region_id = selectedItemValue.get(VIEWABLE_OBJECTS_REGION_ID_FIELD).asUUID();
llassert(selectedItemValue.has(VIEWABLE_OBJECTS_MATERIAL_ID_FIELD));
llassert(selectedItemValue.get(VIEWABLE_OBJECTS_MATERIAL_ID_FIELD).isBinary());
const LLMaterialID material_id(selectedItemValue.get(VIEWABLE_OBJECTS_MATERIAL_ID_FIELD).asBinary());
- LLMaterialMgr::instance().get(material_id, boost::bind(&LLFloaterDebugMaterials::onPostMaterial, _1, _2));
+ LLMaterialMgr::instance().get(region_id, material_id, boost::bind(&LLFloaterDebugMaterials::onPostMaterial, _1, _2));
}
}
}