From 3cd04749128f3daa185bca477552a566bc287a8e Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 12 Dec 2012 20:39:47 +0100 Subject: Refactor material retrieval to always invoke the region's GET material cap first --- indra/newview/llfloaterdebugmaterials.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterdebugmaterials.cpp') 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)); } } } -- cgit v1.3