diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-07-02 20:39:39 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-07-02 21:53:43 +0300 |
commit | 1adb94a89c106176e01d950170b9c4d623dd2250 (patch) | |
tree | a53224485a5d9fa36ebfe2827562a12c2872b907 | |
parent | b276936ef336a17e4c124da40c1c63b2829fc680 (diff) |
viewer#1666 Allow switching 2k textures off in bulk uploads
-rw-r--r-- | indra/newview/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterbulkupload.cpp | 139 | ||||
-rw-r--r-- | indra/newview/llfloaterbulkupload.h | 66 | ||||
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewerassetupload.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewerassetupload.h | 4 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 122 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.h | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_bulk_upload.xml | 144 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 11 |
12 files changed, 468 insertions, 66 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index cbcc85cc1c..d4c2875c6c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -189,6 +189,7 @@ set(viewer_SOURCE_FILES llfloaterbigpreview.cpp llfloaterbuildoptions.cpp llfloaterbulkpermission.cpp + llfloaterbulkupload.cpp llfloaterbump.cpp llfloaterbuy.cpp llfloaterbuycontents.cpp @@ -852,6 +853,7 @@ set(viewer_HEADER_FILES llfloaterbigpreview.h llfloaterbuildoptions.h llfloaterbulkpermission.h + llfloaterbulkupload.h llfloaterbump.h llfloaterbuy.h llfloaterbuycontents.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e56facd615..09909aa9c4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1094,6 +1094,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>BulkUpload2KTextures</key> + <map> + <key>Comment</key> + <string>Bulk upload scales textures to 2K if true, to 1K if false</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>EnableButtonFlashing</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloaterbulkupload.cpp b/indra/newview/llfloaterbulkupload.cpp new file mode 100644 index 0000000000..98875ee84d --- /dev/null +++ b/indra/newview/llfloaterbulkupload.cpp @@ -0,0 +1,139 @@ +/** + * @file llfloaterbulkupload.cpp + * @author Andrey Kleshchev + * @brief LLFloaterBulkUpload class implementation + * + * $LicenseInfo:firstyear=2024&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2024, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterbulkupload.h" + +#include "lltextbox.h" +#include "llviewercontrol.h" +#include "llviewermenufile.h" + +constexpr S32 MAX_HEIGH = 211; + +LLFloaterBulkUpload::LLFloaterBulkUpload(const LLSD& key) +: LLModalDialog(key, true) +{ + mUploadCost = key["upload_cost"].asInteger(); + mUploadCount = key["upload_count"].asInteger(); + mHas2kTextures = key["has_2k_textures"].asBoolean(); + if (key["files"].isArray()) + { + const LLSD& files = key["files"]; + for (LLSD::array_const_iterator it = files.beginArray(); + it != files.endArray(); + ++it) + { + mFiles.push_back(it->asString()); + } + } +} + +LLFloaterBulkUpload::~LLFloaterBulkUpload() +{ +} + +bool LLFloaterBulkUpload::postBuild() +{ + childSetAction("upload_btn", [this](void*) { onClickUpload(); }, this); + childSetAction("cancel_btn", [this](void*) { onClickCancel(); }, this); + + mCountLabel = getChild<LLTextBox>("number_of_items", true); + mCostLabel = getChild<LLTextBox>("upload_cost", true); + + mCheckboxPanel = getChild<LLPanel>("checkbox_panel", true); + mLinkPanel = getChild<LLPanel>("link_panel", true); + mWarningPanel = getChild<LLPanel>("warning_panel", true); + + mCheckboxUpload2K = getChild<LLUICtrl>("upload_2k"); + mCheckboxUpload2K->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& data) { onUpload2KCheckBox(); }); + + mAllow2kTextures = gSavedSettings.getBOOL("BulkUpload2KTextures"); + mCheckboxUpload2K->setValue(!mAllow2kTextures); + + if (!mAllow2kTextures && mHas2kTextures) + { + // provided cost is for 2K textures, recalculate cost + S32 bvh_count; + S32 textures_2k_count; + get_bulk_upload_expected_cost(mFiles, mAllow2kTextures, mUploadCost, mUploadCount, bvh_count, textures_2k_count); + + update(); + } + + + update(); + + return LLModalDialog::postBuild(); +} + +void LLFloaterBulkUpload::update() +{ + mCountLabel->setTextArg("[COUNT]", llformat("%d", mUploadCount)); + mCostLabel->setTextArg("[COST]", llformat("%d", mUploadCost)); + + mCheckboxPanel->setVisible(mHas2kTextures); + mLinkPanel->setVisible(mHas2kTextures); + mWarningPanel->setVisible(mAllow2kTextures); + + S32 new_height = MAX_HEIGH; + if (!mHas2kTextures) + { + new_height -= mCheckboxPanel->getRect().getHeight(); + new_height -= mLinkPanel->getRect().getHeight(); + } + if (!mAllow2kTextures) + { + new_height -= mWarningPanel->getRect().getHeight(); + } + reshape(getRect().getWidth(), new_height, false); +} + +void LLFloaterBulkUpload::onUpload2KCheckBox() +{ + mAllow2kTextures = !mCheckboxUpload2K->getValue().asBoolean(); + gSavedSettings.setBOOL("BulkUpload2KTextures", mAllow2kTextures); + + S32 bvh_count; + S32 textures_2k_count; + get_bulk_upload_expected_cost(mFiles, mAllow2kTextures, mUploadCost, mUploadCount, bvh_count, textures_2k_count); + // keep old value of mHas2kTextures to show checkbox + + update(); +} + +void LLFloaterBulkUpload::onClickUpload() +{ + do_bulk_upload(mFiles, mAllow2kTextures); + closeFloater(); +} + + +void LLFloaterBulkUpload::onClickCancel() +{ + closeFloater(); +} diff --git a/indra/newview/llfloaterbulkupload.h b/indra/newview/llfloaterbulkupload.h new file mode 100644 index 0000000000..d07dc8eabe --- /dev/null +++ b/indra/newview/llfloaterbulkupload.h @@ -0,0 +1,66 @@ +/** + * @file llfloaterbulkupload.h + * @author Andrey Kleshchev + * @brief LLFloaterBulkUpload class definition + * + * $LicenseInfo:firstyear=2024&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2024, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERBULKUPLOAD_H +#define LL_LLFLOATERBULKUPLOAD_H + +#include "llmodaldialog.h" + +class LLTextBox; + +class LLFloaterBulkUpload : public LLModalDialog +{ +public: + LLFloaterBulkUpload(const LLSD& key); + ~LLFloaterBulkUpload(); + + bool postBuild() override; + + void update(); + +protected: + void onUpload2KCheckBox(); + + void onClickUpload(); + void onClickCancel(); + +private: + LLUICtrl* mCheckboxUpload2K = nullptr; + LLTextBox* mCountLabel = nullptr; + LLTextBox* mCostLabel = nullptr; + LLPanel* mCheckboxPanel = nullptr; + LLPanel* mLinkPanel = nullptr; + LLPanel* mWarningPanel = nullptr; + + std::vector<std::string> mFiles; + bool mAllow2kTextures = true; + bool mHas2kTextures = false; + S32 mUploadCost = 0; + S32 mUploadCount = 0; +}; + +#endif diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 92f8ed949e..3987c6d9a3 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -2430,14 +2430,14 @@ void LLMaterialEditor::onSaveObjectsMaterialAsMsgCallback(const LLSD& notificati createInventoryItem(str.str(), new_name, std::string(), permissions); } -const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type); +const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k); void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::string &filename, S32 index, bool open_floater) { if (index == model_in.materials.size()) { // bulk upload all the things - upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL); + upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true); return; } diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 337c18f218..3c70d46d36 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -370,7 +370,8 @@ LLNewFileResourceUploadInfo::LLNewFileResourceUploadInfo( LLResourceUploadInfo(name, description, compressionInfo, destinationType, inventoryType, nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory), - mFileName(fileName) + mFileName(fileName), + mMaxImageSize(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT) { } @@ -422,7 +423,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() else if (assetType == LLAssetType::AT_TEXTURE) { // It's an image file, the upload procedure is the same for all - if (!LLViewerTextureList::createUploadFile(getFileName(), filename, codec)) + if (!LLViewerTextureList::createUploadFile(getFileName(), filename, codec, mMaxImageSize)) { errorMessage = llformat("Problem with file %s:\n\n%s\n", getFileName().c_str(), LLImage::getLastThreadError().c_str()); diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index 5a07fbf802..365436ede0 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -161,13 +161,15 @@ public: std::string getFileName() const { return mFileName; }; + void setMaxImageSize(U32 maxUploadSize) { mMaxImageSize = maxUploadSize; } + protected: virtual LLSD exportTempFile(); private: std::string mFileName; - + S32 mMaxImageSize; }; //------------------------------------------------------------------------- diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 3e1705b8a1..c97a512a57 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -47,6 +47,7 @@ #include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbulkpermission.h" +#include "llfloaterbulkupload.h" #include "llfloaterbump.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" @@ -207,6 +208,7 @@ public: "camera_presets", "delete_pref_preset", "forget_username", + "gltf_asset_editor", "god_tools", "group_picker", "hud", @@ -223,7 +225,8 @@ public: "upload_image", "upload_model", "upload_script", - "upload_sound" + "upload_sound", + "bulk_upload" }; return std::find(blacklist_clicked.begin(), blacklist_clicked.end(), fl_name) == blacklist_clicked.end(); } @@ -247,6 +250,7 @@ public: "env_edit_extdaycycle", "font_test", "forget_username", + "gltf_asset_editor", "god_tools", "group_picker", "hud", @@ -272,7 +276,8 @@ public: "upload_image", "upload_model", "upload_script", - "upload_sound" + "upload_sound", + "bulk_upload" }; return std::find(blacklist_untrusted.begin(), blacklist_untrusted.end(), fl_name) == blacklist_untrusted.end(); } @@ -337,6 +342,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("buy_object_contents", "floater_buy_contents.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuyContents>); LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTools>); LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuildOptions>); + LLFloaterReg::add("bulk_upload", "floater_bulk_upload.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBulkUpload>); LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index e3da52fc78..c4fecf8dff 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -523,15 +523,8 @@ const void upload_single_file(const std::vector<std::string>& filenames, LLFileP return; } -void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification, const LLSD& response) +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k) { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option != 0) - { - // Cancel upload - return; - } - for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) { std::string filename = (*in_iter); @@ -551,7 +544,7 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec)) { bool resource_upload = false; - if (asset_type == LLAssetType::AT_TEXTURE) + if (asset_type == LLAssetType::AT_TEXTURE && allow_2k) { LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec); if (gDirUtilp->fileExists(filename) && image_frmted->load(filename)) @@ -567,7 +560,7 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification if (resource_upload) { - LLResourceUploadInfo::ptr_t uploadInfo(new LLNewFileResourceUploadInfo( + LLNewFileResourceUploadInfo* info_p = new LLNewFileResourceUploadInfo( filename, asset_name, asset_name, 0, @@ -575,7 +568,13 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost)); + expected_upload_cost); + + if (!allow_2k) + { + info_p->setMaxImageSize(1024); + } + LLResourceUploadInfo::ptr_t uploadInfo(info_p); upload_new_resource(uploadInfo); } @@ -601,11 +600,30 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification } } -bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S32& total_cost, S32& file_count, S32& bvh_count) +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) + { + // Cancel upload + return; + } + + do_bulk_upload(filenames, allow_2k); +} + +bool get_bulk_upload_expected_cost( + const std::vector<std::string>& filenames, + bool allow_2k, + S32& total_cost, + S32& file_count, + S32& bvh_count, + S32& textures_2k_count) { total_cost = 0; file_count = 0; bvh_count = 0; + textures_2k_count = 0; for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) { std::string filename = (*in_iter); @@ -622,12 +640,20 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3 if (LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(ext, asset_type, codec)) { - if (asset_type == LLAssetType::AT_TEXTURE) + if (asset_type == LLAssetType::AT_TEXTURE && allow_2k) { LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec); if (gDirUtilp->fileExists(filename) && image_frmted->load(filename)) { total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted); + if (image_frmted) + { + S32 area = image_frmted->getHeight() * image_frmted->getWidth(); + if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA) + { + textures_2k_count++; + } + } file_count++; } } @@ -682,38 +708,27 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3 return file_count > 0; } -const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type) +const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool allow_2k) { - // TODO: - // Check user balance for entire cost - // Charge user entire cost - // Loop, uploading - // If an upload fails, refund the user for that one - // - // Also fix single upload to charge first, then refund - - // FIXME PREMIUM what about known types that can't be bulk uploaded - // (bvh)? These will fail in the item by item upload but won't be - // mentioned in the notification. - std::vector<std::string> filtered_filenames; - for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) - { - const std::string& filename = *in_iter; - if (check_file_extension(filename, type)) - { - filtered_filenames.push_back(filename); - } - } - S32 expected_upload_cost; S32 expected_upload_count; S32 bvh_count; - if (get_bulk_upload_expected_cost(filtered_filenames, expected_upload_cost, expected_upload_count, bvh_count)) + S32 textures_2k_count; + if (get_bulk_upload_expected_cost(filtered_filenames, allow_2k, expected_upload_cost, expected_upload_count, bvh_count, textures_2k_count)) { - LLSD args; - args["COST"] = expected_upload_cost; - args["COUNT"] = expected_upload_count; - LLNotificationsUtil::add("BulkUploadCostConfirmation", args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2)); + LLSD key; + key["upload_cost"] = expected_upload_cost; + key["upload_count"] = expected_upload_count; + key["has_2k_textures"] = (textures_2k_count > 0); + + LLSD array; + for (const std::string& str : filtered_filenames) + { + array.append(str); + } + key["files"] = array; + + LLFloaterReg::showInstance("bulk_upload", key); if (filtered_filenames.size() > expected_upload_count) { @@ -738,6 +753,31 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker:: } +const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k) +{ + // TODO: + // Check user balance for entire cost + // Charge user entire cost + // Loop, uploading + // If an upload fails, refund the user for that one + // + // Also fix single upload to charge first, then refund + + // FIXME PREMIUM what about known types that can't be bulk uploaded + // (bvh)? These will fail in the item by item upload but won't be + // mentioned in the notification. + std::vector<std::string> filtered_filenames; + for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter) + { + const std::string& filename = *in_iter; + if (check_file_extension(filename, type)) + { + filtered_filenames.push_back(filename); + } + } + upload_bulk(filtered_filenames, allow_2k); +} + class LLFileUploadImage : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -803,7 +843,7 @@ class LLFileUploadBulk : public view_listener_t { gAgentCamera.changeCameraToDefault(); } - LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2), LLFilePicker::FFLOAD_ALL, true); + LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true), LLFilePicker::FFLOAD_ALL, true); return true; } }; diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 1acb701d50..d99f9dc4c6 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -64,13 +64,15 @@ void upload_new_resource( LLAssetStorage::LLStoreAssetCallback callback = LLAssetStorage::LLStoreAssetCallback(), void *userdata = NULL); - -void assign_defaults_and_show_upload_message( - LLAssetType::EType asset_type, - LLInventoryType::EType& inventory_type, - std::string& name, - const std::string& display_name, - std::string& description); +bool get_bulk_upload_expected_cost( + const std::vector<std::string>& filenames, + bool allow_2k, + S32& total_cost, + S32& file_count, + S32& bvh_count, + S32& textures_2k_count); + +void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k); //consider moving all file pickers below to more suitable place class LLFilePickerThread : public LLThread diff --git a/indra/newview/skins/default/xui/en/floater_bulk_upload.xml b/indra/newview/skins/default/xui/en/floater_bulk_upload.xml new file mode 100644 index 0000000000..4c639a7c65 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_bulk_upload.xml @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater + can_resize="false" + show_title="false" + can_minimize="false" + can_close="false" + header_height="10" + bg_opaque_image="Window_NoTitle_Foreground" + bg_alpha_image="Window_NoTitle_Background" + height="207" + layout="topleft" + name="bulk_upload" + width="430"> + <layout_stack + follows="all" + height="203" + layout="topleft" + left="8" + animate="false" + top="1" + orientation="vertical" + name="maint_layout" + width="421"> + <layout_panel + follows="all" + height="27" + layout="topleft" + auto_resize="false" + visible="true" + name="count_panel"> + <text + follows="left|top" + layout="topleft" + top="6" + left="20" + name="number_of_items" + height="20" + wrap="true"> + Number of items to upload: [COUNT] + </text> + </layout_panel> + <layout_panel + follows="all" + height="37" + layout="topleft" + auto_resize="false" + visible="true" + name="warning_panel"> + <text + name="textures_2k_warning" + follows="left|top" + layout="topleft" + top="6" + left="20" + height="30" + right="-20" + wrap="true"> + Because of their dimentions one or more selected textures will be scaled to 2048px. + </text> + </layout_panel> + <layout_panel + follows="all" + height="23" + layout="topleft" + auto_resize="false" + visible="true" + name="checkbox_panel"> + <check_box + height="16" + left="20" + label="Scale textures to a maximum of 1024px" + layout="topleft" + name="upload_2k" /> + </layout_panel> + <layout_panel + follows="all" + height="27" + layout="topleft" + auto_resize="false" + visible="true" + name="cost_panel"> + <text + name="upload_cost" + follows="left|top" + layout="topleft" + font.style="BOLD" + top="6" + left="20" + height="20" + wrap="true"> + Upload cost: L$[COST] + </text> + </layout_panel> + <layout_panel + follows="all" + height="29" + layout="topleft" + auto_resize="false" + visible="true" + name="buttoms_panel"> + <button + follows="bottom|left|right" + height="23" + label="Upload" + layout="topleft" + mouse_opaque="false" + name="upload_btn" + top="1" + left="84" + width="120" /> + <button + follows="bottom|left|right" + height="23" + label="Cancel" + layout="topleft" + left_pad="12" + top_delta="0" + mouse_opaque="false" + name="cancel_btn" + width="120" /> + </layout_panel> + <layout_panel + follows="all" + height="40" + layout="topleft" + auto_resize="false" + visible="true" + name="link_panel"> + <text + follows="left|top" + layout="topleft" + top="6" + left="20" + name="new_folder_textbox" + height="39" + parse_urls="true" + skip_link_underline="true" + wrap="true"> +How textures are scaled during upload: +https://wiki.secondlife.com/wiki/Limits#All_Viewers + </text> + </layout_panel> + </layout_stack> +</floater> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f86b297395..a1e25f48ed 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9060,17 +9060,6 @@ Your voice has been muted by moderator. name="okbutton" yestext="OK"/> </notification> - - <notification - icon="alertmodal.tga" - name="BulkUploadCostConfirmation" - type="alertmodal"> -This will upload [COUNT] items at a total cost of L$[COST]. Do you wish to continue with the upload? - <usetemplate - name="okcancelbuttons" - notext="Cancel" - yestext="Upload"/> - </notification> <notification icon="alertmodal.tga" |