From b980efd014ddb56650fffeb7968901b8e6bc2837 Mon Sep 17 00:00:00 2001 From: dolphin Date: Mon, 19 Aug 2013 09:24:04 -0700 Subject: Added experience association info llsidepaneliteminfo for scripts. Changed the cap which looks up a script association to take a object/item id pair instead of a asset id. Updated llpreviewscript to use the new cap (which also improves loading time since it can be done in parallel with the lsltext retrieval). --- indra/newview/llpreviewscript.cpp | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 09152ac060..f5a6ec3dd3 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1966,8 +1966,8 @@ void LLLiveLSLEditor::loadAsset() || gAgent.isGodlike())) { mItem = new LLViewerInventoryItem(item); - //llinfos << "asset id " << mItem->getAssetUUID() << llendl; } + ExperienceAssociationResponder::fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), boost::bind(&LLLiveLSLEditor::setAssociatedExperience, getDerivedHandle(), _1)); if(!gAgent.isGodlike() && (item @@ -2069,9 +2069,6 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, if(instance ) { - instance->fetchAssociatedExperience(asset_id); - - if( LL_ERR_NOERR == status ) { instance->loadScriptText(vfs, asset_id, type); @@ -2518,29 +2515,6 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use delete data; } -void LLLiveLSLEditor::fetchAssociatedExperience(const LLUUID& asset_id) -{ - LLViewerRegion* region = gAgent.getRegion(); - if (region) - { - std::string lookup_url=region->getCapability("GetMetadata"); - if(!lookup_url.empty()) - { - LLSD request; - request["asset-id"]=asset_id; - LLSD fields; - fields.append("experience"); - request["fields"] = fields; - - ExperienceAssociationResponder::callback_t f = boost::bind(&LLLiveLSLEditor::setAssociatedExperience, getDerivedHandle(), _1); - LLHTTPClient::post(lookup_url, request, new ExperienceAssociationResponder(f)); - - //test me pls - } - } -} - - BOOL LLLiveLSLEditor::canClose() { return (mScriptEd->canClose()); -- cgit v1.2.3