diff options
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 26 |
1 files changed, 25 insertions, 1 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())); |