diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 26 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 4 | ||||
-rw-r--r-- | indra/newview/llfloatertools.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 46 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/skins/default/xui/en/floater_model_preview.xml | 20 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory_add.xml | 12 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 12 | ||||
-rw-r--r--[-rwxr-xr-x] | scripts/gpu_table_tester | 0 |
11 files changed, 111 insertions, 41 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b57657540c..6ddcec6232 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1968,6 +1968,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>DebugShowUploadCost</key> + <map> + <key>Comment</key> + <string>Show mesh upload cost</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>DebugShowXUINames</key> <map> <key>Comment</key> 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/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index dc71ade621..84fb8bd9e7 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -422,7 +422,7 @@ void LLFloaterTools::refresh() // Refresh object and prim count labels LLLocale locale(LLLocale::USER_LOCALE); - +#if 0 if (!gMeshRepo.meshRezEnabled()) { std::string obj_count_string; @@ -447,6 +447,7 @@ void LLFloaterTools::refresh() getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost); } else +#endif { F32 link_phys_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetPhysicsCost(); F32 link_cost = LLSelectMgr::getInstance()->getSelection()->getSelectedLinksetCost(); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 1b3ae27066..78e2716be2 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" @@ -48,6 +49,7 @@ #include "llthread.h" #include "llvfile.h" #include "llviewercontrol.h" +#include "llviewerinventory.h" #include "llviewermenufile.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" @@ -355,7 +357,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 +365,6 @@ public: if (isGoodStatus(status) && cc["state"].asString() == "upload") { - llinfos << "fee request succeeded" << llendl; mThread->mWholeModelUploadURL = cc["uploader"].asString(); if (observer) @@ -414,8 +414,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 +422,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 +438,7 @@ public: if (observer) { - observer->onModelUploadFailure(); + doOnIdleOneTime(boost::bind(&LLWholeModelUploadObserver::onModelUploadFailure, observer)); } } } @@ -1304,6 +1302,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) LLSD res; result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); + result["texture_folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE); result["asset_type"] = "mesh"; result["inventory_type"] = "object"; result["description"] = "(No Description)"; @@ -2223,6 +2222,38 @@ void LLMeshRepository::notifyLoadedMeshes() LLAssetType::EType asset_type = LLAssetType::lookup(data.mPostData["asset_type"].asString()); LLInventoryType::EType inventory_type = LLInventoryType::lookup(data.mPostData["inventory_type"].asString()); + // Handle addition of texture, if any. + if ( data.mResponse.has("new_texture_folder_id") ) + { + const LLUUID& folder_id = data.mResponse["new_texture_folder_id"].asUUID(); + + if ( folder_id.notNull() ) + { + LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE); + + std::string name; + // Check if the server built a different name for the texture folder + if ( data.mResponse.has("new_texture_folder_name") ) + { + name = data.mResponse["new_texture_folder_name"].asString(); + } + else + { + name = data.mPostData["name"].asString(); + } + + // Add the category to the internal representation + LLPointer<LLViewerInventoryCategory> cat = + new LLViewerInventoryCategory(folder_id, parent_id, + LLFolderType::FT_NONE, name, gAgent.getID()); + cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN); + + LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1); + gInventory.accountForUpdate(update); + gInventory.updateCategory(cat); + } + } + on_new_single_inventory_upload_complete( asset_type, inventory_type, @@ -2232,6 +2263,7 @@ void LLMeshRepository::notifyLoadedMeshes() data.mPostData["description"], data.mResponse, data.mResponse["upload_price"]); + //} mInventoryQ.pop(); } 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..1d4a1d4827 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" @@ -102,9 +102,9 @@ width="80" word_wrap="true" > -Streaming: +Download: Physics: -Simulation: +Server: Prim equivs: </text> @@ -123,7 +123,8 @@ Prim equivs: [EQ] </text> - + +<!-- <text height="65" top_delta="0" @@ -153,6 +154,7 @@ L$ [INSTANCES] L$ [TEXTURES] L$ [MODEL] </text> + --> <tab_container follows="right|top|bottom" @@ -168,7 +170,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 +294,8 @@ L$ [MODEL] <panel border="true" label="Physics" - name="physics_panel"> + name="physics_panel" + help_topic="upload_model_physics"> <!-- PHYSICS GEOMETRY--> <panel @@ -432,7 +436,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> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 2169b5ccc3..8901583799 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -267,7 +267,7 @@ layout="topleft" left_pad="2" name="unlink_btn" - width="105"> + width="90"> <button.commit_callback function="BuildTool.UnlinkObjects"/> </button> diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index e0ccb18c08..0f42000ae7 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -54,18 +54,6 @@ <menu_item_call.on_visible function="File.VisibleUploadModel"/> </menu_item_call> - <menu_item_call - label="Model Wizard..." - layout="topleft" - name="Upload Model Wizard"> - <menu_item_call.on_click - function="Floater.Show" - parameter="upload_model_wizard" /> - <menu_item_call.on_enable - function="File.EnableUploadModel" /> - <menu_item_call.on_visible - function="File.VisibleUploadModel"/> - </menu_item_call> <menu_item_call label="Bulk (L$[COST] per file)..." layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 499cf47b6c..0fe6c09684 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2076,12 +2076,14 @@ </menu_item_check> <menu_item_check label="Show Upload Cost" - layout="topleft" name="Show Upload Cost"> - <menu_item_check.on_click - function="ToggleControl" + <menu_item_check.on_check + function="CheckControl" parameter="DebugShowUploadCost" /> - </menu_item_check> + <menu_item_check.on_click + function="ToggleControl" + parameter="DebugShowUploadCost" /> + </menu_item_check> <menu_item_check label="Show Render Info" name="Show Render Info"> @@ -2092,7 +2094,7 @@ function="ToggleControl" parameter="DebugShowRenderInfo" /> </menu_item_check> - <menu_item_check + <menu_item_check label="Show Texture Info" name="Show Texture Info"> <menu_item_check.on_check diff --git a/scripts/gpu_table_tester b/scripts/gpu_table_tester index 52b1c8f31d..52b1c8f31d 100755..100644 --- a/scripts/gpu_table_tester +++ b/scripts/gpu_table_tester |