summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2013-08-19 09:24:04 -0700
committerdolphin <dolphin@lindenlab.com>2013-08-19 09:24:04 -0700
commitb980efd014ddb56650fffeb7968901b8e6bc2837 (patch)
tree6c21ef82c540379030833af5e1a1aeae999526fd /indra/newview/llpreviewscript.cpp
parent02b501e4dc9a389878cd323e4f781bc752fec737 (diff)
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).
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rwxr-xr-xindra/newview/llpreviewscript.cpp28
1 files changed, 1 insertions, 27 deletions
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<LLLiveLSLEditor>(), _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<LLLiveLSLEditor>(), _1);
- LLHTTPClient::post(lookup_url, request, new ExperienceAssociationResponder(f));
-
- //test me pls
- }
- }
-}
-
-
BOOL LLLiveLSLEditor::canClose()
{
return (mScriptEd->canClose());