summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp26
-rw-r--r--indra/newview/llfloatermodelpreview.h4
-rwxr-xr-xindra/newview/llmeshrepository.cpp11
-rw-r--r--indra/newview/llviewerobjectlist.cpp16
-rwxr-xr-x[-rw-r--r--]indra/newview/skins/default/xui/en/floater_model_preview.xml12
5 files changed, 50 insertions, 19 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 80a9b8f781..0748ed8039 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -101,7 +101,9 @@
#include "llcallbacklist.h"
#include "llviewerobjectlist.h"
#include "llanimationstates.h"
+#include "llviewernetwork.h"
#include "glod/glod.h"
+#include <boost/algorithm/string.hpp>
const S32 SLM_SUPPORTED_VERSION = 2;
@@ -476,6 +478,18 @@ BOOL LLFloaterModelPreview::postBuild()
text->setMouseDownCallback(boost::bind(&LLModelPreview::setPreviewLOD, mModelPreview, i));
}
}
+ std::string current_grid = LLGridManager::getInstance()->getGridLabel();
+ std::transform(current_grid.begin(),current_grid.end(),current_grid.begin(),::tolower);
+ std::string validate_url;
+ if (current_grid == "agni")
+ {
+ validate_url = "http://secondlife.com/my/account/mesh.php";
+ }
+ else
+ {
+ validate_url = llformat("http://secondlife.%s.lindenlab.com/my/account/mesh.php",current_grid.c_str());
+ }
+ getChild<LLTextBox>("warning_message")->setTextArg("[VURL]", validate_url);
mUploadBtn = getChild<LLButton>("ok_btn");
mCalculateBtn = getChild<LLButton>("calculate_btn");
@@ -5482,7 +5496,17 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
void LLFloaterModelPreview::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url)
{
- mUploadModelUrl = upload_url;
+ mModelPhysicsFee = result;
+ mModelPhysicsFee["url"] = upload_url;
+
+ doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::handleModelPhysicsFeeReceived,this));
+}
+
+void LLFloaterModelPreview::handleModelPhysicsFeeReceived()
+{
+ const LLSD& result = mModelPhysicsFee;
+ mUploadModelUrl = result["url"].asString();
+
childSetTextArg("weights", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal()));
childSetTextArg("weights", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal()));
childSetTextArg("weights", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal()));
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 29a61d6ed3..3a5f7602fe 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -201,7 +201,7 @@ public:
/*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason);
/*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url);
-
+ void handleModelPhysicsFeeReceived();
/*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason);
/*virtual*/ void onModelUploadSuccess();
@@ -273,6 +273,8 @@ protected:
LLToggleableMenu* mViewOptionMenu;
LLMutex* mStatusLock;
+ LLSD mModelPhysicsFee;
+
private:
void onClickCalculateBtn();
void toggleCalculateButton();
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 1b3ae27066..93a6a2a078 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -34,6 +34,7 @@
#include "llagent.h"
#include "llappviewer.h"
#include "llbufferstream.h"
+#include "llcallbacklist.h"
#include "llcurl.h"
#include "lldatapacker.h"
#include "llfloatermodelpreview.h"
@@ -355,7 +356,6 @@ public:
cc = llsd_from_file("fake_upload_error.xml");
}
- llinfos << "completed" << llendl;
mThread->mPendingUploads--;
dump_llsd_to_file(cc,make_dump_name("whole_model_fee_response_",dump_num));
@@ -364,7 +364,6 @@ public:
if (isGoodStatus(status) &&
cc["state"].asString() == "upload")
{
- llinfos << "fee request succeeded" << llendl;
mThread->mWholeModelUploadURL = cc["uploader"].asString();
if (observer)
@@ -414,8 +413,7 @@ public:
//assert_main_thread();
mThread->mPendingUploads--;
dump_llsd_to_file(cc,make_dump_name("whole_model_upload_response_",dump_num));
- llinfos << "LLWholeModelUploadResponder content: " << cc << llendl;
-
+
LLWholeModelUploadObserver* observer = mObserverHandle.get();
// requested "mesh" asset type isn't actually the type
@@ -423,13 +421,12 @@ public:
if (isGoodStatus(status) &&
cc["state"].asString() == "complete")
{
- llinfos << "upload succeeded" << llendl;
mModelData["asset_type"] = "object";
gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mModelData,cc));
if (observer)
{
- observer->onModelUploadSuccess();
+ doOnIdleOneTime(boost::bind(&LLWholeModelUploadObserver::onModelUploadSuccess, observer));
}
}
else
@@ -440,7 +437,7 @@ public:
if (observer)
{
- observer->onModelUploadFailure();
+ doOnIdleOneTime(boost::bind(&LLWholeModelUploadObserver::onModelUploadFailure, observer));
}
}
}
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index f418a6137a..9d38954d8b 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1071,10 +1071,12 @@ void LLViewerObjectList::fetchObjectCosts()
LLSD id_list;
U32 object_index = 0;
+ U32 count = 0;
+
for (
std::set<LLUUID>::iterator iter = mStaleObjectCost.begin();
iter != mStaleObjectCost.end();
- ++iter)
+ )
{
// Check to see if a request for this object
// has already been made.
@@ -1084,13 +1086,15 @@ void LLViewerObjectList::fetchObjectCosts()
mPendingObjectCost.insert(*iter);
id_list[object_index++] = *iter;
}
- }
- // id_list should now contain all
- // requests in mStaleObjectCost before, so clear
- // it now
- mStaleObjectCost.clear();
+ mStaleObjectCost.erase(iter++);
+ if (count++ >= 450)
+ {
+ break;
+ }
+ }
+
if ( id_list.size() > 0 )
{
LLSD post_data = LLSD::emptyMap();
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 060ddec1f4..e75511e2b3 100644..100755
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -92,7 +92,7 @@
parse_urls="true"
wrap="true"
visible="false">
- You will not be able to complete the final upload of this model to the Second Life servers. [secondlife:///app/floater/learn_more Find out how] to get enabled for mesh model uploads.</text>
+ You will not be able to complete the final upload of this model to the Second Life servers. [[VURL] Find out how] to get enabled for mesh model uploads.</text>
<text
height="65"
@@ -168,7 +168,8 @@ L$ [MODEL]
<panel
border="true"
label="Level of Detail"
- name="lod_panel">
+ name="lod_panel"
+ help_topic="upload_model_lod">
<text left="10" width="240" bottom="20" height="15" follows="left|top" name="lod_table_header">
Select Level of Detail:
@@ -291,7 +292,8 @@ L$ [MODEL]
<panel
border="true"
label="Physics"
- name="physics_panel">
+ name="physics_panel"
+ help_topic="upload_model_physics">
<!-- PHYSICS GEOMETRY-->
<panel
@@ -432,7 +434,9 @@ L$ [MODEL]
<panel
border="true"
label="Modifiers"
- name="modifiers_panel">
+ name="modifiers_panel"
+ help_topic="upload_model_modifiers">
+
<text left="10" width="90" bottom="30" follows="top|left" height="15">
Scale:
</text>