From cda7a0f8cf03b7a99e077043daa2d99ac16ace81 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 9 Feb 2011 23:32:46 -0800 Subject: STORM-987 : Create initial files for llimage_libtest (doesn't build) --- indra/integration_tests/CMakeLists.txt | 1 + .../llimage_libtest/CMakeLists.txt | 114 +++++++++++++++++++++ .../llimage_libtest/llimage_libtest.cpp | 47 +++++++++ .../llimage_libtest/llimage_libtest.h | 29 ++++++ 4 files changed, 191 insertions(+) create mode 100644 indra/integration_tests/llimage_libtest/CMakeLists.txt create mode 100644 indra/integration_tests/llimage_libtest/llimage_libtest.cpp create mode 100644 indra/integration_tests/llimage_libtest/llimage_libtest.h (limited to 'indra') diff --git a/indra/integration_tests/CMakeLists.txt b/indra/integration_tests/CMakeLists.txt index 67e8fbf1f2..5935f23fe9 100644 --- a/indra/integration_tests/CMakeLists.txt +++ b/indra/integration_tests/CMakeLists.txt @@ -1,3 +1,4 @@ # -*- cmake -*- add_subdirectory(llui_libtest) +add_subdirectory(llimage_libtest) diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt new file mode 100644 index 0000000000..e3c508659b --- /dev/null +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -0,0 +1,114 @@ +# -*- cmake -*- + +# Integration tests of the llimage library (JPEG2000 images reading and writing) + +if (VIEWER) + +project (llimage_libtest) + +include(00-Common) +include(LLCommon) +include(LLImage) +include(LLImageJ2COJ) +include(LLKDU) +include(LLMath) +#include(LLVFS) # ugh, needed for LLDir +#include(LLXML) +#include(LLXUIXML) +include(Linking) +# include(Tut) + +include_directories( + ${LLCOMMON_INCLUDE_DIRS} + ${LLIMAGE_INCLUDE_DIRS} + ${LLMATH_INCLUDE_DIRS} + ) + +set(llimage_libtest_SOURCE_FILES + llimage_libtest.cpp + ) + +set(llimage_libtest_HEADER_FILES + CMakeLists.txt + llimage_libtest.h + ) + +set_source_files_properties(${llimage_libtest_HEADER_FILES} + PROPERTIES HEADER_FILE_ONLY TRUE) + +list(APPEND llimage_libtest_SOURCE_FILES ${llimage_libtest_HEADER_FILES}) + +add_executable(llimage_libtest ${llimage_libtest_SOURCE_FILES}) + +# Link with OS-specific libraries +if (DARWIN) + find_library(COCOA_LIBRARY Cocoa) + set(OS_LIBRARIES ${COCOA_LIBRARY}) +elseif (WINDOWS) + #ll_stack_trace needs this now... + list(APPEND WINDOWS_LIBRARIES dbghelp) + set(OS_LIBRARIES ${WINDOWS_LIBRARIES}) +elseif (LINUX) + set(OS_LIBRARIES) +else (DARWIN) + message(FATAL_ERROR "unknown platform") +endif (DARWIN) + +# Libraries on which this library depends, needed for Linux builds +# Sort by high-level to low-level +target_link_libraries(llimage_libtest + ${LLIMAGE_LIBRARIES} + ${LLKDU_LIBRARIES} + ${KDU_LIBRARY} + ${LLIMAGEJ2COJ_LIBRARIES} + ${OS_LIBRARIES} + ${GOOGLE_PERFTOOLS_LIBRARIES} + ) + +if (DARWIN) + set_target_properties(llimage_libtest + PROPERTIES + OUTPUT_NAME "llimage_libtest" + MACOSX_BUNDLE_INFO_STRING "llimage test utility" + MACOSX_BUNDLE_GUI_IDENTIFIER "llimage_libtest" + MACOSX_BUNDLE_LONG_VERSION_STRING "0.5" + MACOSX_BUNDLE_BUNDLE_NAME "llimage_libtest" + MACOSX_BUNDLE_SHORT_VERSION_STRING "v0.5" + MACOSX_BUNDLE_BUNDLE_VERSION "v0.5" + MACOSX_BUNDLE_COPYRIGHT "Copyright Linden Lab 2011" + ) + # TODO : Copy over libs in the bundle +elseif (WINDOWS) + set_target_properties(llimage_libtest + PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:LIBCMT" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT /NODEFAULTLIB:LIBCMTD" + ) + + # Copy over OpenJPEG.dll + # *NOTE: On Windows with VS2005, only the first comment prints + set(OPENJPEG_RELEASE + "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/openjpeg.dll") + add_custom_command( TARGET llimage_libtest POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${OPENJPEG_RELEASE} ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Copying OpenJPEG DLLs to binary directory" + ) + set(OPENJPEG_DEBUG + "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/openjpegd.dll") + add_custom_command( TARGET llimage_libtest POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${OPENJPEG_DEBUG} ${CMAKE_CURRENT_BINARY_DIR} + ) +elseif (LINUX) + # TODO : please help me get this to build and run for Linux! +else (DARWIN) + message(FATAL_ERROR "unknown platform") +endif (DARWIN) + +# Ensure people working on the viewer don't break this library +# *NOTE: This could be removed, or only built by TeamCity, if the build +# and link times become too long. +add_dependencies(viewer llimage_libtest) + +endif (VIEWER) diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp new file mode 100644 index 0000000000..a4a4d10bcb --- /dev/null +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -0,0 +1,47 @@ +/** + * @file llimage_libtest.cpp + * @author Merov Linden + * @brief Integration test for the llimage library + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, 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 "linden_common.h" + +#include "llimage_libtest.h" + +// linden library includes + +#include + +// *TODO: switch to using TUT +// *TODO: teach TeamCity about this program, run automatically after full builds + +void init_llimage() +{ +} + +int main(int argc, char** argv) +{ + init_llimage(); + + return 0; +} diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.h b/indra/integration_tests/llimage_libtest/llimage_libtest.h new file mode 100644 index 0000000000..63f3d46b50 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.h @@ -0,0 +1,29 @@ +/** + * @file llimage_libtest.h + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, 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 LLIMAGE_LIBTEST_H +#define LLIMAGE_LIBTEST_H + + +#endif -- cgit v1.2.3 From b430cf7524d91e27aadcf8a37b03af9b6b4d3e42 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 15 Feb 2011 18:13:44 -0800 Subject: STORM-987 : Clean-up very silly cmake issues prior to making Windows build --- indra/integration_tests/llimage_libtest/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index 0733e5e283..f59440be6b 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -53,11 +53,9 @@ if (DARWIN) find_library(COREFOUNDATION_LIBRARY CoreFoundation) set(OS_LIBRARIES ${COREFOUNDATION_LIBRARY}) elseif (WINDOWS) - #ll_stack_trace needs this now... - list(APPEND WINDOWS_LIBRARIES dbghelp) - set(OS_LIBRARIES ${WINDOWS_LIBRARIES}) +# set(OS_LIBRARIES) elseif (LINUX) - set(OS_LIBRARIES) +# set(OS_LIBRARIES) else (DARWIN) message(FATAL_ERROR "Unknown platform") endif (DARWIN) @@ -106,12 +104,15 @@ if (DARWIN) add_custom_command(TARGET llimage_libtest POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libapr-1.0.3.7.dylib ${LLIMAGE_LIBTEST_DESTINATION_DIR} DEPENDS ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libapr-1.0.3.7.dylib - add_custom_command(TARGET llimage_libtest POST_BUILD + ) + add_custom_command(TARGET llimage_libtest POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libaprutil-1.0.3.8.dylib ${LLIMAGE_LIBTEST_DESTINATION_DIR} DEPENDS ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libaprutil-1.0.3.8.dylib + ) add_custom_command(TARGET llimage_libtest POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libexception_handler.dylib ${LLIMAGE_LIBTEST_DESTINATION_DIR} DEPENDS ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libexception_handler.dylib + ) add_custom_command(TARGET llimage_libtest POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libexpat.0.5.0.dylib ${LLIMAGE_LIBTEST_DESTINATION_DIR} DEPENDS ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release/libexpat.0.5.0.dylib -- cgit v1.2.3 From 0ca7011b3154fd5db0a125f7d90de1c1e460105f Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 15 Feb 2011 22:43:54 -0800 Subject: STORM-987 : Add in and out command line arguments, builds and runs on Windows and Mac --- .../llimage_libtest/llimage_libtest.cpp | 123 +++++++++++++-------- 1 file changed, 78 insertions(+), 45 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index e8fe4864fb..6549aa0207 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -41,15 +41,19 @@ // system libraries #include +// doc string provided when invoking the program with --help static const char USAGE[] = "\n" "usage:\tllimage_libtest [options]\n" "\n" " --help print this help\n" +" --in ... list of image files to load and convert\n" +" --out ... list of image files to create (assumes same order as --in files)\n" "\n"; -LLPointer load_image(const std::string &src_filename) +// Create an empty formatted image instance of the correct type from the filename +LLPointer create_image(const std::string &filename) { - std::string exten = gDirUtilp->getExtension(src_filename); + std::string exten = gDirUtilp->getExtension(filename); U32 codec = LLImageBase::getCodecFromExtension(exten); LLPointer image; @@ -73,6 +77,14 @@ LLPointer load_image(const std::string &src_filename) default: return NULL; } + + return image; +} + +// Load an image from file and return a raw (decompressed) instance of its data +LLPointer load_image(const std::string &src_filename) +{ + LLPointer image = create_image(src_filename); if (!image->load(src_filename)) { @@ -94,79 +106,100 @@ LLPointer load_image(const std::string &src_filename) return raw_image; } -bool save_image(const std::string &filepath, LLPointer raw_image) +// Save a raw image instance into a file +bool save_image(const std::string &dest_filename, LLPointer raw_image) { - std::string exten = gDirUtilp->getExtension(filepath); - U32 codec = LLImageBase::getCodecFromExtension(exten); - - LLPointer image; - switch (codec) - { - case IMG_CODEC_BMP: - image = new LLImageBMP(); - break; - case IMG_CODEC_TGA: - image = new LLImageTGA(); - break; - case IMG_CODEC_JPEG: - image = new LLImageJPEG(); - break; - case IMG_CODEC_J2C: - image = new LLImageJ2C(); - break; - case IMG_CODEC_PNG: - image = new LLImagePNG(); - break; - default: - return NULL; - } + LLPointer image = create_image(dest_filename); if (!image->encode(raw_image, 0.0f)) { return false; } - return image->save(filepath); + return image->save(dest_filename); } int main(int argc, char** argv) { + // List of input and output files + std::list input_filenames; + std::list output_filenames; + // Init whatever is necessary ll_init_apr(); LLImage::initClass(); // Analyze command line arguments - for (int arg=1; arg raw_image = load_image("lolcat-monorail.jpg"); - if (raw_image) + // Analyze the list of (input,output) files + if (input_filenames.size() == 0) { - std::cout << "Image loaded\n" << std::endl; + std::cout << "No input file, nothing to do -> exit" << std::endl; + return 0; } - else + // TODO: For the moment, we simply convert each input file to something. This needs to evolve... + if (input_filenames.size() != output_filenames.size()) { - std::cout << "Image not found\n" << std::endl; + std::cout << "Number of output and input files different -> exit" << std::endl; + return 0; } - - // Save file - if (raw_image) + + std::list::iterator in_file = input_filenames.begin(); + std::list::iterator out_file = output_filenames.begin(); + std::list::iterator end = input_filenames.end(); + for (; in_file != end; ++in_file, ++out_file) { - save_image("monorail.png",raw_image); + // Load file + LLPointer raw_image = load_image(*in_file); + if (!raw_image) + { + std::cout << "Error: Image " << *in_file << " could not be loaded" << std::endl; + continue; + } + + // Save file + if (!save_image(*out_file, raw_image)) + { + std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl; + continue; + } + std::cout << *in_file << " -> " << *out_file << std::endl; + + // Output stats on each file } - - // Output stats on each file // Cleanup and exit LLImage::cleanupClass(); -- cgit v1.2.3 From 0dbc5a40cb83919187fed961de835726e044906d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 16 Feb 2011 17:29:32 -0800 Subject: STORM-987 : Implement in and out list of files and pattern matching --- .../llimage_libtest/llimage_libtest.cpp | 117 ++++++++++++++++++--- 1 file changed, 105 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 6549aa0207..37e979b260 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -45,9 +45,10 @@ static const char USAGE[] = "\n" "usage:\tllimage_libtest [options]\n" "\n" -" --help print this help\n" -" --in ... list of image files to load and convert\n" -" --out ... list of image files to create (assumes same order as --in files)\n" +" --help print this help\n" +" --in list of image files to load and convert, patterns can be used\n" +" --out OR list of image files to create (assumes same order as --in files)\n" +" OR 3 letters file type extension to convert each input file into\n" "\n"; // Create an empty formatted image instance of the correct type from the filename @@ -119,6 +120,88 @@ bool save_image(const std::string &dest_filename, LLPointer raw_imag return image->save(dest_filename); } +void store_input_file(std::list &input_filenames, const std::string &path) +{ + // Break the incoming path in its components + std::string dir = gDirUtilp->getDirName(path); + std::string name = gDirUtilp->getBaseFileName(path); + std::string exten = gDirUtilp->getExtension(path); + + // std::cout << "store_input_file : " << path << ", dir : " << dir << ", name : " << name << ", exten : " << exten << std::endl; + + // If extension is not an image type or "*", exit + // Note: we don't support complex patterns for the extension like "j??" + // Note: on most shells, the pattern expansion is done by the shell so that pattern matching limitation is actually not a problem + if ((exten.compare("*") != 0) && (LLImageBase::getCodecFromExtension(exten) == IMG_CODEC_INVALID)) + { + return; + } + + if ((name.find('*') != -1) || ((name.find('?') != -1))) + { + // If file name is a pattern, iterate to get each file name and store + std::string next_name; + while (gDirUtilp->getNextFileInDir(dir,name,next_name)) + { + std::string file_name = dir + gDirUtilp->getDirDelimiter() + next_name; + input_filenames.push_back(file_name); + } + } + else + { + // Verify that the file does exist before storing + if (gDirUtilp->fileExists(path)) + { + input_filenames.push_back(path); + } + else + { + std::cout << "store_input_file : the file " << path << " could not be found" << std::endl; + } + } +} + +void store_output_file(std::list &output_filenames, std::list &input_filenames, const std::string &path) +{ + // Break the incoming path in its components + std::string dir = gDirUtilp->getDirName(path); + std::string name = gDirUtilp->getBaseFileName(path); + std::string exten = gDirUtilp->getExtension(path); + + // std::cout << "store_output_file : " << path << ", dir : " << dir << ", name : " << name << ", exten : " << exten << std::endl; + + if (dir.empty() && exten.empty()) + { + // If dir and exten are empty, we interpret the name as a file extension type name and will iterate through input list to populate the output list + exten = name; + // Make sure the extension is an image type + if (LLImageBase::getCodecFromExtension(exten) == IMG_CODEC_INVALID) + { + return; + } + std::string delim = gDirUtilp->getDirDelimiter(); + std::list::iterator in_file = input_filenames.begin(); + std::list::iterator end = input_filenames.end(); + for (; in_file != end; ++in_file) + { + dir = gDirUtilp->getDirName(*in_file); + name = gDirUtilp->getBaseFileName(*in_file,true); + std::string file_name = dir + delim + name + "." + exten; + output_filenames.push_back(file_name); + } + } + else + { + // Make sure the extension is an image type + if (LLImageBase::getCodecFromExtension(exten) == IMG_CODEC_INVALID) + { + return; + } + // Store the path + output_filenames.push_back(path); + } +} + int main(int argc, char** argv) { // List of input and output files @@ -143,24 +226,40 @@ int main(int argc, char** argv) std::string file_name = argv[arg+1]; while (file_name[0] != '-') // if arg starts with '-', we consider it's not a file name but some other argument { - input_filenames.push_back(file_name); // Add file name to the list + // std::cout << "input file name : " << file_name << std::endl; + store_input_file(input_filenames, file_name); arg += 1; // Skip that arg now we know it's a file name if ((arg + 1) == argc) // Break out of the loop if we reach the end of the arg list break; file_name = argv[arg+1]; // Next argument and loop over } - } + // DEBUG output + std::list::iterator in_file = input_filenames.begin(); + std::list::iterator end = input_filenames.end(); + for (; in_file != end; ++in_file) + { + std::cout << "input file : " << *in_file << std::endl; + } + } else if (!strcmp(argv[arg], "--out") && arg < argc-1) { std::string file_name = argv[arg+1]; while (file_name[0] != '-') // if arg starts with '-', we consider it's not a file name but some other argument { - output_filenames.push_back(file_name); // Add file name to the list + // std::cout << "output file name : " << file_name << std::endl; + store_output_file(output_filenames, input_filenames, file_name); arg += 1; // Skip that arg now we know it's a file name if ((arg + 1) == argc) // Break out of the loop if we reach the end of the arg list break; file_name = argv[arg+1]; // Next argument and loop over } + // DEBUG output + std::list::iterator out_file = output_filenames.begin(); + std::list::iterator end = output_filenames.end(); + for (; out_file != end; ++out_file) + { + std::cout << "output file : " << *out_file << std::endl; + } } } @@ -170,12 +269,6 @@ int main(int argc, char** argv) std::cout << "No input file, nothing to do -> exit" << std::endl; return 0; } - // TODO: For the moment, we simply convert each input file to something. This needs to evolve... - if (input_filenames.size() != output_filenames.size()) - { - std::cout << "Number of output and input files different -> exit" << std::endl; - return 0; - } std::list::iterator in_file = input_filenames.begin(); std::list::iterator out_file = output_filenames.begin(); -- cgit v1.2.3 From 7d47ea1ab254e13cbff476fee317042f81d84b25 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 16 Feb 2011 21:50:32 -0800 Subject: STORM-987 : Allow more flexibility around input and output lists --- .../llimage_libtest/llimage_libtest.cpp | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 37e979b260..4104527f83 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -233,13 +233,6 @@ int main(int argc, char** argv) break; file_name = argv[arg+1]; // Next argument and loop over } - // DEBUG output - std::list::iterator in_file = input_filenames.begin(); - std::list::iterator end = input_filenames.end(); - for (; in_file != end; ++in_file) - { - std::cout << "input file : " << *in_file << std::endl; - } } else if (!strcmp(argv[arg], "--out") && arg < argc-1) { @@ -253,13 +246,6 @@ int main(int argc, char** argv) break; file_name = argv[arg+1]; // Next argument and loop over } - // DEBUG output - std::list::iterator out_file = output_filenames.begin(); - std::list::iterator end = output_filenames.end(); - for (; out_file != end; ++out_file) - { - std::cout << "output file : " << *out_file << std::endl; - } } } @@ -270,10 +256,12 @@ int main(int argc, char** argv) return 0; } + // Perform action on each input file std::list::iterator in_file = input_filenames.begin(); std::list::iterator out_file = output_filenames.begin(); - std::list::iterator end = input_filenames.end(); - for (; in_file != end; ++in_file, ++out_file) + std::list::iterator in_end = input_filenames.end(); + std::list::iterator out_end = output_filenames.end(); + for (; in_file != in_end; ++in_file) { // Load file LLPointer raw_image = load_image(*in_file); @@ -284,16 +272,24 @@ int main(int argc, char** argv) } // Save file - if (!save_image(*out_file, raw_image)) + if (out_file != out_end) { - std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl; - continue; + if (!save_image(*out_file, raw_image)) + { + std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl; + } + else + { + std::cout << *in_file << " -> " << *out_file << std::endl; + } + ++out_file; } - std::cout << *in_file << " -> " << *out_file << std::endl; // Output stats on each file } + // Output perf data if required by user + // Cleanup and exit LLImage::cleanupClass(); -- cgit v1.2.3 From 668307e4e3b59ac4f4f955aa0d36183c361352b8 Mon Sep 17 00:00:00 2001 From: Robin Cornelius Date: Wed, 23 Feb 2011 15:50:55 -0500 Subject: STORM-1019 Add ability to display beacons for Media on a Prim objects Changes merged into viewer 2 by Jonathan Yap --- indra/newview/app_settings/settings.xml | 11 ++++ indra/newview/llfloaterbeacons.cpp | 2 + indra/newview/llviewermenu.cpp | 10 ++++ indra/newview/llviewerwindow.cpp | 5 ++ indra/newview/pipeline.cpp | 60 ++++++++++++++++++++++ indra/newview/pipeline.h | 5 ++ .../skins/default/xui/en/floater_beacons.xml | 14 ++++- 7 files changed, 105 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a010524091..d8b23d9d88 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12069,6 +12069,17 @@ Value 0.40000000596 + moapbeacon + + Comment + Beacon / Highlight media on a prim sources + Persist + 1 + Type + Boolean + Value + 0 + particlesbeacon Comment diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index e24df948c4..316294a477 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -48,6 +48,7 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) LLPipeline::setRenderParticleBeacons( gSavedSettings.getBOOL("particlesbeacon")); LLPipeline::setRenderHighlights( gSavedSettings.getBOOL("renderhighlights")); LLPipeline::setRenderBeacons( gSavedSettings.getBOOL("renderbeacons")); + LLPipeline::setRenderMOAPBeacons( gSavedSettings.getBOOL("moapbeacon")); mCommitCallbackRegistrar.add("Beacons.UICheck", boost::bind(&LLFloaterBeacons::onClickUICheck, this,_1)); } @@ -96,6 +97,7 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get()); else if(name == "sounds") LLPipeline::setRenderSoundBeacons(check->get()); else if(name == "particles") LLPipeline::setRenderParticleBeacons(check->get()); + else if(name == "moapbeacon") LLPipeline::setRenderMOAPBeacons(check->get()); else if(name == "highlights") { LLPipeline::toggleRenderHighlights(NULL); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7cc04e0338..82bfe9ec64 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7356,6 +7356,11 @@ class LLViewToggleBeacon : public view_listener_t LLPipeline::toggleRenderPhysicalBeacons(NULL); gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) ); } + else if (beacon == "moapbeacon") + { + LLPipeline::toggleRenderMOAPBeacons(NULL); + gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons(NULL) ); + } else if (beacon == "soundsbeacon") { LLPipeline::toggleRenderSoundBeacons(NULL); @@ -7415,6 +7420,11 @@ class LLViewCheckBeaconEnabled : public view_listener_t new_value = gSavedSettings.getBOOL( "scriptsbeacon"); LLPipeline::setRenderScriptedBeacons(new_value); } + else if (beacon == "moapbeacon") + { + new_value = gSavedSettings.getBOOL( "moapbeacon"); + LLPipeline::setRenderMOAPBeacons(new_value); + } else if (beacon == "physicalbeacon") { new_value = gSavedSettings.getBOOL( "physicalbeacon"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0028ced6c8..b5cdd733ff 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -584,6 +584,11 @@ public: addText(xpos, ypos, "Viewing scripted object beacons (red)"); ypos += y_inc; } + if (LLPipeline::getRenderMOAPBeacons(NULL)) + { + addText(xpos, ypos, "Viewing MOAP beacons (white)"); + ypos += y_inc; + } else if (LLPipeline::getRenderScriptedTouchBeacons(NULL)) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 13e537fae5..911961777b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -253,6 +253,7 @@ S32 LLPipeline::sCompiles = 0; BOOL LLPipeline::sPickAvatar = TRUE; BOOL LLPipeline::sDynamicLOD = TRUE; BOOL LLPipeline::sShowHUDAttachments = TRUE; +BOOL LLPipeline::sRenderMOAPBeacons = FALSE; BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; BOOL LLPipeline::sRenderScriptedBeacons = FALSE; BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE; @@ -2510,6 +2511,42 @@ void renderPhysicalBeacons(LLDrawable* drawablep) } } +void renderMOAPBeacons(LLDrawable* drawablep) +{ + LLViewerObject *vobj = drawablep->getVObj(); + + if(!vobj || vobj->isAvatar()) + return; + + BOOL beacon=FALSE; + U8 tecount=vobj->getNumTEs(); + for(int x=0;xgetTE(x)->hasMedia()) + { + beacon=TRUE; + break; + } + } + if(beacon==TRUE) + { + if (gPipeline.sRenderBeacons) + { + gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth")); + } + + if (gPipeline.sRenderHighlight) + { + S32 face_id; + S32 count = drawablep->getNumFaces(); + for (face_id = 0; face_id < count; face_id++) + { + gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) ); + } + } + } +} + void renderParticleBeacons(LLDrawable* drawablep) { // Look for attachments, objects, etc. @@ -2715,6 +2752,11 @@ void LLPipeline::postSort(LLCamera& camera) forAllVisibleDrawables(renderPhysicalBeacons); } + if(sRenderMOAPBeacons) + { + forAllVisibleDrawables(renderMOAPBeacons); + } + if (sRenderParticleBeacons) { forAllVisibleDrawables(renderParticleBeacons); @@ -4937,6 +4979,24 @@ BOOL LLPipeline::getRenderScriptedTouchBeacons(void*) return sRenderScriptedTouchBeacons; } +// static +void LLPipeline::setRenderMOAPBeacons(BOOL val) +{ + sRenderMOAPBeacons = val; +} + +// static +void LLPipeline::toggleRenderMOAPBeacons(void*) +{ + sRenderMOAPBeacons = !sRenderMOAPBeacons; +} + +// static +BOOL LLPipeline::getRenderMOAPBeacons(void*) +{ + return sRenderMOAPBeacons; +} + // static void LLPipeline::setRenderPhysicalBeacons(BOOL val) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index e99b0d71e3..92ae40ebb0 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -312,6 +312,10 @@ public: static void toggleRenderSoundBeacons(void* data); static BOOL getRenderSoundBeacons(void* data); + static void setRenderMOAPBeacons(BOOL val); + static void toggleRenderMOAPBeacons(void * data); + static BOOL getRenderMOAPBeacons(void * data); + static void setRenderPhysicalBeacons(BOOL val); static void toggleRenderPhysicalBeacons(void* data); static BOOL getRenderPhysicalBeacons(void* data); @@ -698,6 +702,7 @@ protected: S32 mLightingDetail; static BOOL sRenderPhysicalBeacons; + static BOOL sRenderMOAPBeacons; static BOOL sRenderScriptedTouchBeacons; static BOOL sRenderScriptedBeacons; static BOOL sRenderParticleBeacons; diff --git a/indra/newview/skins/default/xui/en/floater_beacons.xml b/indra/newview/skins/default/xui/en/floater_beacons.xml index 4fc2b698d8..3d29356b22 100644 --- a/indra/newview/skins/default/xui/en/floater_beacons.xml +++ b/indra/newview/skins/default/xui/en/floater_beacons.xml @@ -1,7 +1,7 @@ + + + -- cgit v1.2.3 From 5ef27b9f3f6e672ccc8126d7bed4c904f12d1186 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 24 Feb 2011 14:16:03 -0500 Subject: STORM-1019 Minor adjustment to media beacon name --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b5cdd733ff..031fc05619 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -586,7 +586,7 @@ public: } if (LLPipeline::getRenderMOAPBeacons(NULL)) { - addText(xpos, ypos, "Viewing MOAP beacons (white)"); + addText(xpos, ypos, "Viewing media beacons (white)"); ypos += y_inc; } else -- cgit v1.2.3 From f5b3d13b7f3a0aafb0848e76fda190698fe0815b Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 3 Mar 2011 19:06:39 +0200 Subject: STORM-1036 FIXED The unused "How to create a new Classified ad" notification removed from XUI ("en" locale only). --- indra/newview/skins/default/xui/en/notifications.xml | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f008042a81..44bfff81f4 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -751,21 +751,6 @@ You need to enter either the Username or both the First and Last name of your av - -Classified ads appear in the 'Classified' section of the Search directory and on [http://secondlife.com/community/classifieds secondlife.com] for one week. -Fill out your ad, then click 'Publish...' to add it to the directory. -You'll be asked for a price to pay when clicking Publish. -Paying more makes your ad appear higher in the list, and also appear higher when people search for keywords. - - - Date: Tue, 8 Mar 2011 23:44:00 -0800 Subject: STORM-987 : Add --logmetrics and --analyzeperformance arguments, moved analyzeMetricPerformanceLog() and doAnalysisMetrics() from LLFastTimerView to LLMetricPerformanceTesterBasic --- .../llimage_libtest/llimage_libtest.cpp | 89 +++++++++++++++++++++- indra/llcommon/llmetricperformancetester.cpp | 71 +++++++++++++++++ indra/llcommon/llmetricperformancetester.h | 3 + indra/newview/llfasttimerview.cpp | 74 +----------------- indra/newview/llfasttimerview.h | 2 - 5 files changed, 162 insertions(+), 77 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 4104527f83..2442313ef2 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -26,6 +26,7 @@ */ #include "linden_common.h" #include "llpointer.h" +#include "lltimer.h" #include "llimage_libtest.h" @@ -49,8 +50,13 @@ static const char USAGE[] = "\n" " --in list of image files to load and convert, patterns can be used\n" " --out OR list of image files to create (assumes same order as --in files)\n" " OR 3 letters file type extension to convert each input file into\n" +" --logmetrics log performance metric and data for \n" +" --analyzeperformance create report comparing baseline with current for provided in --logmetrics\n" "\n"; +// true when all image loading is done. Used by metric logging thread to know when to stop the thread. +static bool sAllDone = false; + // Create an empty formatted image instance of the correct type from the filename LLPointer create_image(const std::string &filename) { @@ -202,15 +208,43 @@ void store_output_file(std::list &output_filenames, std::list input_filenames; std::list output_filenames; + bool analyze_performance = false; // Init whatever is necessary ll_init_apr(); LLImage::initClass(); + LogThread* fast_timer_log_thread = NULL; // For performance and metric gathering // Analyze command line arguments for (int arg = 1; arg < argc; ++arg) @@ -246,7 +280,34 @@ int main(int argc, char** argv) break; file_name = argv[arg+1]; // Next argument and loop over } - } + } + else if (!strcmp(argv[arg], "--logmetrics")) + { + // '--logmetrics' needs to be specified with a named test metric argument + // Note: for the moment, only ImageCompressionTester has been tested + std::string test_name; + if ((arg + 1) < argc) + { + test_name = argv[arg+1]; + } + if (((arg + 1) >= argc) || (test_name[0] == '-')) + { + // We don't have an argument left in the arg list or the next argument is another option + std::cout << "No --logmetrics argument given, no perf data will be gathered" << std::endl; + } + else + { + LLFastTimer::sMetricLog = TRUE; + LLFastTimer::sLogName = test_name; + arg += 1; // Skip that arg now we know it's a valid test name + if ((arg + 1) == argc) // Break out of the loop if we reach the end of the arg list + break; + } + } + else if (!strcmp(argv[arg], "--analyzeperformance")) + { + analyze_performance = true; + } } // Analyze the list of (input,output) files @@ -256,6 +317,14 @@ int main(int argc, char** argv) return 0; } + // Create the logging thread if required + if (LLFastTimer::sMetricLog) + { + LLFastTimer::sLogLock = new LLMutex(NULL); + fast_timer_log_thread = new LogThread(LLFastTimer::sLogName); + fast_timer_log_thread->start(); + } + // Perform action on each input file std::list::iterator in_file = input_filenames.begin(); std::list::iterator out_file = output_filenames.begin(); @@ -288,10 +357,26 @@ int main(int argc, char** argv) // Output stats on each file } - // Output perf data if required by user + sAllDone = true; + + // Output perf data if requested by user + if (analyze_performance) + { + std::cout << "Analyzing performance" << std::endl; + + std::string baseline_name = LLFastTimer::sLogName + "_baseline.slp"; + std::string current_name = LLFastTimer::sLogName + ".slp"; + std::string report_name = LLFastTimer::sLogName + "_report.csv"; + + LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline_name, current_name, report_name); + } // Cleanup and exit LLImage::cleanupClass(); + if (fast_timer_log_thread) + { + fast_timer_log_thread->shutdown(); + } return 0; } diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp index 5fa3a5ea07..1f1c633909 100644 --- a/indra/llcommon/llmetricperformancetester.cpp +++ b/indra/llcommon/llmetricperformancetester.cpp @@ -83,7 +83,78 @@ BOOL LLMetricPerformanceTesterBasic::isMetricLogRequested(std::string name) return (LLFastTimer::sMetricLog && ((LLFastTimer::sLogName == name) || (LLFastTimer::sLogName == DEFAULT_METRIC_NAME))); } +/*static*/ +LLSD LLMetricPerformanceTesterBasic::analyzeMetricPerformanceLog(std::istream& is) +{ + LLSD ret; + LLSD cur; + + while (!is.eof() && LLSDSerialize::fromXML(cur, is)) + { + for (LLSD::map_iterator iter = cur.beginMap(); iter != cur.endMap(); ++iter) + { + std::string label = iter->first; + + LLMetricPerformanceTesterBasic* tester = LLMetricPerformanceTesterBasic::getTester(iter->second["Name"].asString()) ; + if(tester) + { + ret[label]["Name"] = iter->second["Name"] ; + + S32 num_of_metrics = tester->getNumberOfMetrics() ; + for(S32 index = 0 ; index < num_of_metrics ; index++) + { + ret[label][ tester->getMetricName(index) ] = iter->second[ tester->getMetricName(index) ] ; + } + } + } + } + + return ret; +} + +/*static*/ +void LLMetricPerformanceTesterBasic::doAnalysisMetrics(std::string baseline, std::string target, std::string output) +{ + if(!LLMetricPerformanceTesterBasic::hasMetricPerformanceTesters()) + { + return ; + } + + // Open baseline and current target, exit if one is inexistent + std::ifstream base_is(baseline.c_str()); + std::ifstream target_is(target.c_str()); + if (!base_is.is_open() || !target_is.is_open()) + { + llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl; + base_is.close(); + target_is.close(); + return; + } + + //analyze baseline + LLSD base = analyzeMetricPerformanceLog(base_is); + base_is.close(); + + //analyze current + LLSD current = analyzeMetricPerformanceLog(target_is); + target_is.close(); + //output comparision + std::ofstream os(output.c_str()); + + os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n"; + for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ; + iter != LLMetricPerformanceTesterBasic::sTesterMap.end() ; ++iter) + { + LLMetricPerformanceTesterBasic* tester = ((LLMetricPerformanceTesterBasic*)iter->second) ; + tester->analyzePerformance(&os, &base, ¤t) ; + } + + os.flush(); + os.close(); +} + + //---------------------------------------------------------------------------------------------- // LLMetricPerformanceTesterBasic : Tester instance methods //---------------------------------------------------------------------------------------------- diff --git a/indra/llcommon/llmetricperformancetester.h b/indra/llcommon/llmetricperformancetester.h index 1372f48dcf..b790b636a7 100644 --- a/indra/llcommon/llmetricperformancetester.h +++ b/indra/llcommon/llmetricperformancetester.h @@ -62,6 +62,8 @@ public: */ virtual void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ; + static void doAnalysisMetrics(std::string baseline, std::string target, std::string output) ; + /** * @return Returns the number of the test metrics in this tester instance. */ @@ -116,6 +118,7 @@ protected: private: void preOutputTestResults(LLSD* sd) ; void postOutputTestResults(LLSD* sd) ; + static LLSD analyzeMetricPerformanceLog(std::istream& is) ; std::string mName ; // Name of this tester instance S32 mCount ; // Current record count diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 92a3b9b2f5..279904b740 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1149,36 +1149,6 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target os.close(); } -//------------------------- -//static -LLSD LLFastTimerView::analyzeMetricPerformanceLog(std::istream& is) -{ - LLSD ret; - LLSD cur; - - while (!is.eof() && LLSDSerialize::fromXML(cur, is)) - { - for (LLSD::map_iterator iter = cur.beginMap(); iter != cur.endMap(); ++iter) - { - std::string label = iter->first; - - LLMetricPerformanceTesterBasic* tester = LLMetricPerformanceTesterBasic::getTester(iter->second["Name"].asString()) ; - if(tester) - { - ret[label]["Name"] = iter->second["Name"] ; - - S32 num_of_metrics = tester->getNumberOfMetrics() ; - for(S32 index = 0 ; index < num_of_metrics ; index++) - { - ret[label][ tester->getMetricName(index) ] = iter->second[ tester->getMetricName(index) ] ; - } - } - } - } - - return ret; -} - //static void LLFastTimerView::outputAllMetrics() { @@ -1193,48 +1163,6 @@ void LLFastTimerView::outputAllMetrics() } } -//static -void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target, std::string output) -{ - if(!LLMetricPerformanceTesterBasic::hasMetricPerformanceTesters()) - { - return ; - } - - // Open baseline and current target, exit if one is inexistent - std::ifstream base_is(baseline.c_str()); - std::ifstream target_is(target.c_str()); - if (!base_is.is_open() || !target_is.is_open()) - { - llwarns << "'-analyzeperformance' error : baseline or current target file inexistent" << llendl; - base_is.close(); - target_is.close(); - return; - } - - //analyze baseline - LLSD base = analyzeMetricPerformanceLog(base_is); - base_is.close(); - - //analyze current - LLSD current = analyzeMetricPerformanceLog(target_is); - target_is.close(); - - //output comparision - std::ofstream os(output.c_str()); - - os << "Label, Metric, Base(B), Target(T), Diff(T-B), Percentage(100*T/B)\n"; - for(LLMetricPerformanceTesterBasic::name_tester_map_t::iterator iter = LLMetricPerformanceTesterBasic::sTesterMap.begin() ; - iter != LLMetricPerformanceTesterBasic::sTesterMap.end() ; ++iter) - { - LLMetricPerformanceTesterBasic* tester = ((LLMetricPerformanceTesterBasic*)iter->second) ; - tester->analyzePerformance(&os, &base, ¤t) ; - } - - os.flush(); - os.close(); -} - //static void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output) { @@ -1246,7 +1174,7 @@ void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std:: if(LLFastTimer::sMetricLog) { - doAnalysisMetrics(baseline, target, output) ; + LLMetricPerformanceTesterBasic::doAnalysisMetrics(baseline, target, output) ; return ; } } diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 1a54a53f09..b40d7ffc1a 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -42,8 +42,6 @@ public: private: static void doAnalysisDefault(std::string baseline, std::string target, std::string output) ; - static void doAnalysisMetrics(std::string baseline, std::string target, std::string output) ; - static LLSD analyzeMetricPerformanceLog(std::istream& is) ; static LLSD analyzePerformanceLogDefault(std::istream& is) ; public: -- cgit v1.2.3 From 7f42c02cad9dbd068bc49bed4b6cd18fd8fff606 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 9 Mar 2011 20:54:59 -0800 Subject: STORM-987 : Add the --image-stats argument, make argument passing more consistent, fix typos in comments in llimage header --- .../llimage_libtest/llimage_libtest.cpp | 66 ++++++++++++++++------ indra/llimage/llimage.h | 4 +- 2 files changed, 51 insertions(+), 19 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 2442313ef2..e4376dd745 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -46,12 +46,19 @@ static const char USAGE[] = "\n" "usage:\tllimage_libtest [options]\n" "\n" -" --help print this help\n" -" --in list of image files to load and convert, patterns can be used\n" -" --out OR list of image files to create (assumes same order as --in files)\n" -" OR 3 letters file type extension to convert each input file into\n" -" --logmetrics log performance metric and data for \n" -" --analyzeperformance create report comparing baseline with current for provided in --logmetrics\n" +" -h, --help\n" +" Print this help\n" +" -i, --input \n" +" List of image files to load and convert, patterns can be used\n" +" -o, --output OR \n" +" List of image files to create (assumes same order as for input files)\n" +" OR 3 letters file type extension to convert each input file into\n" +" -log, --logmetrics \n" +" Log performance metric and data for \n" +" -r, --analyzeperformance\n" +" Create report comparing baseline with current for provided in --logmetrics\n" +" -s, --image-stats\n" +" Output stats for each input and output image\n" "\n"; // true when all image loading is done. Used by metric logging thread to know when to stop the thread. @@ -88,8 +95,20 @@ LLPointer create_image(const std::string &filename) return image; } +void output_image_stats(LLPointer image, const std::string &filename) +{ + // Print out some statistical data on the image + std::cout << "Image stats for : " << filename << ", extension : " << image->getExtension() << std::endl; + + std::cout << " with : " << (int)(image->getWidth()) << ", height : " << (int)(image->getHeight()) << std::endl; + std::cout << " comp : " << (int)(image->getComponents()) << ", levels : " << (int)(image->getDiscardLevel()) << std::endl; + std::cout << " head : " << (int)(image->calcHeaderSize()) << ", data : " << (int)(image->getDataSize()) << std::endl; + + return; +} + // Load an image from file and return a raw (decompressed) instance of its data -LLPointer load_image(const std::string &src_filename) +LLPointer load_image(const std::string &src_filename, bool output_stats) { LLPointer image = create_image(src_filename); @@ -104,6 +123,11 @@ LLPointer load_image(const std::string &src_filename) return NULL; } + if (output_stats) + { + output_image_stats(image, src_filename); + } + LLPointer raw_image = new LLImageRaw; if (!image->decode(raw_image, 0.0f)) { @@ -114,7 +138,7 @@ LLPointer load_image(const std::string &src_filename) } // Save a raw image instance into a file -bool save_image(const std::string &dest_filename, LLPointer raw_image) +bool save_image(const std::string &dest_filename, LLPointer raw_image, bool output_stats) { LLPointer image = create_image(dest_filename); @@ -123,6 +147,11 @@ bool save_image(const std::string &dest_filename, LLPointer raw_imag return false; } + if (output_stats) + { + output_image_stats(image, dest_filename); + } + return image->save(dest_filename); } @@ -240,6 +269,7 @@ int main(int argc, char** argv) std::list input_filenames; std::list output_filenames; bool analyze_performance = false; + bool image_stats = false; // Init whatever is necessary ll_init_apr(); @@ -249,13 +279,13 @@ int main(int argc, char** argv) // Analyze command line arguments for (int arg = 1; arg < argc; ++arg) { - if (!strcmp(argv[arg], "--help")) + if (!strcmp(argv[arg], "--help") || !strcmp(argv[arg], "-h")) { // Send the usage to standard out std::cout << USAGE << std::endl; return 0; } - else if (!strcmp(argv[arg], "--in") && arg < argc-1) + else if ((!strcmp(argv[arg], "--input") || !strcmp(argv[arg], "-i")) && arg < argc-1) { std::string file_name = argv[arg+1]; while (file_name[0] != '-') // if arg starts with '-', we consider it's not a file name but some other argument @@ -268,7 +298,7 @@ int main(int argc, char** argv) file_name = argv[arg+1]; // Next argument and loop over } } - else if (!strcmp(argv[arg], "--out") && arg < argc-1) + else if ((!strcmp(argv[arg], "--output") || !strcmp(argv[arg], "-o")) && arg < argc-1) { std::string file_name = argv[arg+1]; while (file_name[0] != '-') // if arg starts with '-', we consider it's not a file name but some other argument @@ -281,7 +311,7 @@ int main(int argc, char** argv) file_name = argv[arg+1]; // Next argument and loop over } } - else if (!strcmp(argv[arg], "--logmetrics")) + else if (!strcmp(argv[arg], "--logmetrics") || !strcmp(argv[arg], "-log")) { // '--logmetrics' needs to be specified with a named test metric argument // Note: for the moment, only ImageCompressionTester has been tested @@ -304,10 +334,14 @@ int main(int argc, char** argv) break; } } - else if (!strcmp(argv[arg], "--analyzeperformance")) + else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-r")) { analyze_performance = true; } + else if (!strcmp(argv[arg], "--image-stats") || !strcmp(argv[arg], "-s")) + { + image_stats = true; + } } // Analyze the list of (input,output) files @@ -333,7 +367,7 @@ int main(int argc, char** argv) for (; in_file != in_end; ++in_file) { // Load file - LLPointer raw_image = load_image(*in_file); + LLPointer raw_image = load_image(*in_file, image_stats); if (!raw_image) { std::cout << "Error: Image " << *in_file << " could not be loaded" << std::endl; @@ -343,7 +377,7 @@ int main(int argc, char** argv) // Save file if (out_file != out_end) { - if (!save_image(*out_file, raw_image)) + if (!save_image(*out_file, raw_image, image_stats)) { std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl; } @@ -353,8 +387,6 @@ int main(int argc, char** argv) } ++out_file; } - - // Output stats on each file } sAllDone = true; diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 825b9aab1a..18444f3934 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -266,13 +266,13 @@ public: // subclasses must return a prefered file extension (lowercase without a leading dot) virtual std::string getExtension() = 0; // calcHeaderSize() returns the maximum size of header; - // 0 indicates we don't know have a header and have to lead the entire file + // 0 indicates we don't have a header and have to read the entire file virtual S32 calcHeaderSize() { return 0; }; // calcDataSize() returns how many bytes to read to load discard_level (including header) virtual S32 calcDataSize(S32 discard_level); // calcDiscardLevelBytes() returns the smallest valid discard level based on the number of input bytes virtual S32 calcDiscardLevelBytes(S32 bytes); - // getRawDiscardLevel()by default returns mDiscardLevel, but may be overridden (LLImageJ2C) + // getRawDiscardLevel() by default returns mDiscardLevel, but may be overridden (LLImageJ2C) virtual S8 getRawDiscardLevel() { return mDiscardLevel; } BOOL load(const std::string& filename); -- cgit v1.2.3 From c2e88db89a8ba111efd0c1b61cc8dec400a007cb Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 10 Mar 2011 22:02:49 -0800 Subject: STORM-987 : Took Vadim's comment into account: check arguments consistency, make sure remaining perf data are flushed on exit. --- .../llimage_libtest/llimage_libtest.cpp | 31 ++++++++++++++++------ indra/llcommon/llmetricperformancetester.cpp | 13 ++++++++- indra/llcommon/llmetricperformancetester.h | 6 +++++ indra/llimage/llimagej2c.cpp | 1 + 4 files changed, 42 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index e4376dd745..2a1a2ae843 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -49,16 +49,18 @@ static const char USAGE[] = "\n" " -h, --help\n" " Print this help\n" " -i, --input \n" -" List of image files to load and convert, patterns can be used\n" +" List of image files to load and convert. Patterns with wild cards can be used.\n" " -o, --output OR \n" " List of image files to create (assumes same order as for input files)\n" -" OR 3 letters file type extension to convert each input file into\n" +" OR 3 letters file type extension to convert each input file into.\n" " -log, --logmetrics \n" -" Log performance metric and data for \n" +" Log performance data for . Results in .slp\n" +" Note: so far, only ImageCompressionTester has been tested.\n" " -r, --analyzeperformance\n" -" Create report comparing baseline with current for provided in --logmetrics\n" +" Create a report comparing _baseline.slp with current .slp\n" +" Results in _report.csv" " -s, --image-stats\n" -" Output stats for each input and output image\n" +" Output stats for each input and output image.\n" "\n"; // true when all image loading is done. Used by metric logging thread to know when to stop the thread. @@ -259,6 +261,8 @@ public: os.flush(); ms_sleep(32); } + LLFastTimer::writeLog(os); + os.flush(); os.close(); } }; @@ -344,12 +348,18 @@ int main(int argc, char** argv) } } - // Analyze the list of (input,output) files + // Check arguments consistency. Exit with proper message if inconsistent. if (input_filenames.size() == 0) { std::cout << "No input file, nothing to do -> exit" << std::endl; return 0; } + if (analyze_performance && !LLFastTimer::sMetricLog) + { + std::cout << "Cannot create perf report if no perf gathered (i.e. use argument -log with -r) -> exit" << std::endl; + return 0; + } + // Create the logging thread if required if (LLFastTimer::sMetricLog) @@ -388,8 +398,13 @@ int main(int argc, char** argv) ++out_file; } } - - sAllDone = true; + + // Stop the perf gathering system if needed + if (LLFastTimer::sMetricLog) + { + LLMetricPerformanceTesterBasic::deleteTester(LLFastTimer::sLogName); + sAllDone = true; + } // Output perf data if requested by user if (analyze_performance) diff --git a/indra/llcommon/llmetricperformancetester.cpp b/indra/llcommon/llmetricperformancetester.cpp index 1f1c633909..41d3eb0bf3 100644 --- a/indra/llcommon/llmetricperformancetester.cpp +++ b/indra/llcommon/llmetricperformancetester.cpp @@ -63,7 +63,18 @@ BOOL LLMetricPerformanceTesterBasic::addTester(LLMetricPerformanceTesterBasic* t sTesterMap.insert(std::make_pair(name, tester)); return TRUE; } - + +/*static*/ +void LLMetricPerformanceTesterBasic::deleteTester(std::string name) +{ + name_tester_map_t::iterator tester = sTesterMap.find(name); + if (tester != sTesterMap.end()) + { + delete tester->second; + sTesterMap.erase(tester); + } +} + /*static*/ LLMetricPerformanceTesterBasic* LLMetricPerformanceTesterBasic::getTester(std::string name) { diff --git a/indra/llcommon/llmetricperformancetester.h b/indra/llcommon/llmetricperformancetester.h index b790b636a7..1a18cdf36f 100644 --- a/indra/llcommon/llmetricperformancetester.h +++ b/indra/llcommon/llmetricperformancetester.h @@ -137,6 +137,12 @@ public: */ static LLMetricPerformanceTesterBasic* getTester(std::string name) ; + /** + * @return Delete the named tester from the list + * @param[in] name - Name of the tester instance to delete. + */ + static void deleteTester(std::string name); + /** * @return Returns TRUE if that metric *or* the default catch all metric has been requested to be logged * @param[in] name - Name of the tester queried. diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index cb2a85fa91..80fec7f8a0 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -474,6 +474,7 @@ LLImageCompressionTester::LLImageCompressionTester() : LLMetricPerformanceTester LLImageCompressionTester::~LLImageCompressionTester() { + outputTestResults(); LLImageJ2C::sTesterp = NULL; } -- cgit v1.2.3 From 834d0f1ed612c8644e642103096daf7f0b0f44c9 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 12 Mar 2011 11:43:20 -0500 Subject: STORM-1019 Fixed problem with beacon message display and changed beacon message order to corresponed with menu order per Ardy Lay's suggestion --- indra/newview/llviewerwindow.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 031fc05619..37bdf4dd0b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -564,29 +564,33 @@ public: // only display these messages if we are actually rendering beacons at this moment if (LLPipeline::getRenderBeacons(NULL) && LLFloaterReg::instanceVisible("beacons")) { - if (LLPipeline::getRenderParticleBeacons(NULL)) + if (LLPipeline::getRenderMOAPBeacons(NULL)) { - addText(xpos, ypos, "Viewing particle beacons (blue)"); + addText(xpos, ypos, "Viewing media beacons (white)"); ypos += y_inc; } + if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES)) { addText(xpos, ypos, "Hiding particles"); ypos += y_inc; } - if (LLPipeline::getRenderPhysicalBeacons(NULL)) + + if (LLPipeline::getRenderParticleBeacons(NULL)) { - addText(xpos, ypos, "Viewing physical object beacons (green)"); + addText(xpos, ypos, "Viewing particle beacons (blue)"); ypos += y_inc; } - if (LLPipeline::getRenderScriptedBeacons(NULL)) + + if (LLPipeline::getRenderSoundBeacons(NULL)) { - addText(xpos, ypos, "Viewing scripted object beacons (red)"); + addText(xpos, ypos, "Viewing sound beacons (yellow)"); ypos += y_inc; } - if (LLPipeline::getRenderMOAPBeacons(NULL)) + + if (LLPipeline::getRenderScriptedBeacons(NULL)) { - addText(xpos, ypos, "Viewing media beacons (white)"); + addText(xpos, ypos, "Viewing scripted object beacons (red)"); ypos += y_inc; } else @@ -595,9 +599,10 @@ public: addText(xpos, ypos, "Viewing scripted object with touch function beacons (red)"); ypos += y_inc; } - if (LLPipeline::getRenderSoundBeacons(NULL)) + + if (LLPipeline::getRenderPhysicalBeacons(NULL)) { - addText(xpos, ypos, "Viewing sound beacons (yellow)"); + addText(xpos, ypos, "Viewing physical object beacons (green)"); ypos += y_inc; } } -- cgit v1.2.3 From d9015a836f59c228818dc85e37ef4807b2d1b181 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 16 Mar 2011 18:32:28 -0400 Subject: STORM-1077 Change "Voice Enabled/Disabled" to "Speak Button" --- indra/newview/app_settings/ignorable_dialogs.xml | 14 ++++++++++++-- indra/newview/llbottomtray.cpp | 9 ++++++++- indra/newview/llfirstuse.cpp | 6 ++++++ indra/newview/llfirstuse.h | 3 +++ indra/newview/skins/default/xui/en/menu_bottomtray.xml | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 14 ++++++++++++++ 6 files changed, 44 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml index 89fd4e5935..f6f4d5faa4 100644 --- a/indra/newview/app_settings/ignorable_dialogs.xml +++ b/indra/newview/app_settings/ignorable_dialogs.xml @@ -122,7 +122,17 @@ Value 1 - + FirstSpeak + + Comment + Shows hint for Speak button + Persist + 1 + Type + Boolean + Value + 1 + FirstSit Comment @@ -132,7 +142,7 @@ Type Boolean Value - 1 + 0 AboutDirectX9 diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d8ec4b605c..2dfd2ba492 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -52,6 +52,7 @@ #include "llviewerwindow.h" #include "llsdserialize.h" +#include "llfirstuse.h" // Distance from mouse down on which drag'n'drop should be started. #define DRAG_START_DISTANCE 3 @@ -378,7 +379,12 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b // skipped to avoid button blinking if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { - mSpeakBtn->setFlyoutBtnEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()); + bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); + mSpeakBtn->setFlyoutBtnEnabled(voice_status); + if (voice_status) + { + LLFirstUse::speak(true); + } } } @@ -562,6 +568,7 @@ BOOL LLBottomTray::postBuild() mSpeakPanel = getChild("speak_panel"); mSpeakBtn = getChild("talk"); + LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle()); // Both parts of speak button should be initially disabled because // it takes some time between logging in to world and connecting to voice channel. diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 4d252dc662..dd6d7f1b33 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -78,6 +78,12 @@ void LLFirstUse::otherAvatarChatFirst(bool enable) firstUseNotification("FirstOtherChatBeforeUser", enable, "HintChat", LLSD(), LLSD().with("target", "chat_bar").with("direction", "top_right").with("distance", 24)); } +// static +void LLFirstUse::speak(bool enable) +{ + firstUseNotification("FirstSpeak", enable, "HintSpeak", LLSD(), LLSD().with("target", "speak_btn").with("direction", "top")); +} + // static void LLFirstUse::sit(bool enable) { diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h index 489f58626a..dff5483354 100644 --- a/indra/newview/llfirstuse.h +++ b/indra/newview/llfirstuse.h @@ -68,6 +68,8 @@ object or from inventory. 13. First time you open the debug menus (ctrl-alt-shift D) 14. First time you create/edit a sculpted prim. + +15. Explanation of Speak&flyout buttons. */ class LLNotification; @@ -85,6 +87,7 @@ public: //static void resetFirstUse(); static void otherAvatarChatFirst(bool enable = true); + static void speak(bool enable = true); static void sit(bool enable = true); static void notUsingDestinationGuide(bool enable = true); static void notUsingAvatarPicker(bool enable = true); diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 1b55fa4fd3..63bfd39e29 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -9,7 +9,7 @@ visible="false" width="128"> + +Click the Speak button to turn your microphone off and on. + +Your microphone is on by default. + +Click on the up arrow to see the voice control panel. + +Hiding the Speak button will disable the voice feature. + + Date: Wed, 16 Mar 2011 18:34:59 -0400 Subject: STORM-1077 Fix setting for Sit hint, changed by accident during testing --- indra/newview/app_settings/ignorable_dialogs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml index f6f4d5faa4..17d3d3c9c5 100644 --- a/indra/newview/app_settings/ignorable_dialogs.xml +++ b/indra/newview/app_settings/ignorable_dialogs.xml @@ -142,7 +142,7 @@ Type Boolean Value - 0 + 1 AboutDirectX9 -- cgit v1.2.3 From 39d83cb74f5978e926ff02dcb20a64802429bc69 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 18 Mar 2011 00:28:48 +0200 Subject: STORM-1086 FIXED Agent's own calling card created on startup is placed into Calling Cards folder. If there is an agent's calling card found within Calling Cards and sub-folders no more copies of this calling card are created. --- indra/newview/llfriendcard.cpp | 52 +++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 70e789f490..11401d6c68 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -95,6 +95,36 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect return (cats_count >= 1) ? cats.get(0)->getUUID() : LLUUID::null; } +/** + * Class LLFindAgentCallingCard + * + * An inventory collector functor for checking that agent's own calling card + * exists within the Calling Cards category and its sub-folders. + */ +class LLFindAgentCallingCard : public LLInventoryCollectFunctor +{ +public: + LLFindAgentCallingCard() : mIsAgentCallingCardFound(false) {} + virtual ~LLFindAgentCallingCard() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); + bool isAgentCallingCardFound() { return mIsAgentCallingCardFound; } + +private: + bool mIsAgentCallingCardFound; +}; + +bool LLFindAgentCallingCard::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if (mIsAgentCallingCardFound) return true; + + if (item && item->getType() == LLAssetType::AT_CALLINGCARD && item->getCreatorUUID() == gAgentID) + { + mIsAgentCallingCardFound = true; + } + + return mIsAgentCallingCardFound; +} + /** * Class for fetching initial friend cards data * @@ -449,32 +479,22 @@ void LLFriendCardsManager::syncFriendsFolder() LLAvatarTracker::instance().copyBuddyList(all_buddies); // 1. Check if own calling card exists + const LLUUID calling_cards_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); + LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - - LLUUID friends_all_folder_id = findFriendAllSubfolderUUIDImpl(); - gInventory.collectDescendents(friends_all_folder_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); - - bool own_callingcard_found = false; - LLInventoryModel::item_array_t::const_iterator it; - for (it = items.begin(); it != items.end(); ++it) - { - if ((*it)->getCreatorUUID() == gAgentID) - { - own_callingcard_found = true; - break; - } - } + LLFindAgentCallingCard collector; + gInventory.collectDescendentsIf(calling_cards_folder_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, collector); // Create own calling card if it was not found in Friends/All folder - if (!own_callingcard_found) + if (!collector.isAgentCallingCardFound()) { LLAvatarName av_name; LLAvatarNameCache::get( gAgentID, &av_name ); create_inventory_item(gAgentID, gAgent.getSessionID(), - friends_all_folder_id, + calling_cards_folder_id, LLTransactionID::tnull, av_name.getCompleteName(), gAgentID.asString(), -- cgit v1.2.3 From 2de6061d55e1802cc2a9aa8b00d6b0d08771c9a9 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Tue, 22 Mar 2011 19:42:58 +0200 Subject: STORM-1030 FIXED Main menu change: 'Me->Change Outfit' to 'Me->My Appearance' Changed label in: - Main menu - Self avatar menu - Self avatar attachment menu --- indra/newview/skins/default/xui/en/menu_attachment_self.xml | 2 +- indra/newview/skins/default/xui/en/menu_avatar_self.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index 84e81397be..b8128da358 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -68,7 +68,7 @@ name="Stand Up"> function="Self.EnableStandUp" /> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index 2afa29ec10..d727294cc8 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -193,7 +193,7 @@ -- cgit v1.2.3 From c2f34934e85779616fe129970831f31e0fb99348 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Tue, 22 Mar 2011 23:07:33 +0200 Subject: STORM-1097 FIXED opening the floater containing a detached side bar tab. --- indra/newview/llsidetray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index a9bb01ac70..fcd200d24a 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -686,7 +686,7 @@ LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); if (!floater_tab) return NULL; - floater_tab->openFloater(panel_name); + floater_tab->openFloater(tab_name); } LLSideTrayPanelContainer* container = dynamic_cast(view->getParent()); -- cgit v1.2.3 From df450ff17b7a6bb27049f6f462e75fe0763644c3 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 23 Mar 2011 22:58:49 +0200 Subject: STORM-1021 ADDITIONAL_FIX Replaced usual object inspector with the remote one in nearby chat toasts. --- indra/newview/llchathistory.cpp | 16 +----------- indra/newview/llchatitemscontainerctrl.cpp | 13 +-------- indra/newview/llnearbychathandler.cpp | 5 ++++ indra/newview/llviewerchat.cpp | 42 ++++++++++++++++++++++++++++++ indra/newview/llviewerchat.h | 4 +++ 5 files changed, 53 insertions(+), 27 deletions(-) (limited to 'indra') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d4ec377e03..c0c9ea1451 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -793,21 +793,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp - std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); - url += "?name=" + chat.mFromName; - url += "&owner=" + chat.mOwnerID.asString(); - - std::string slurl = args["slurl"].asString(); - if (slurl.empty()) - { - LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if(region) - { - LLSLURL region_slurl(region->getName(), chat.mPosAgent); - slurl = region_slurl.getLocationString(); - } - } - url += "&slurl=" + LLURI::escape(slurl); + std::string url = LLViewerChat::getSenderSLURL(chat, args); // set the link for the object name to be the objectim SLapp // (don't let object names with hyperlinks override our objectim Url) diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 899e0431e7..8584885bc9 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -213,17 +213,6 @@ void LLNearbyChatToastPanel::init(LLSD& notification) { LLStyle::Params style_params_name; - std::string href; - - if (mSourceType == CHAT_SOURCE_AGENT) - { - href = LLSLURL("agent", mFromID, "about").getSLURLString(); - } - else - { - href = LLSLURL("object", mFromID, "inspect").getSLURLString(); - } - LLColor4 user_name_color = LLUIColorTable::instance().getColor("HTMLLinkColor"); style_params_name.color(user_name_color); @@ -232,7 +221,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification) style_params_name.font.name(font_name); style_params_name.font.size(font_style_size); - style_params_name.link_href = href; + style_params_name.link_href = notification["sender_slurl"].asString(); style_params_name.is_link = true; msg_text->appendText(str_sender, FALSE, style_params_name); diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index de5439e4e0..0d9daeb44e 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -558,6 +558,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) } */ + // Add a nearby chat toast. LLUUID id; id.generate(); @@ -583,6 +584,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) notification["text_color"] = r_color_name; notification["color_alpha"] = r_color_alpha; notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ; + + // Pass sender info so that it can be rendered properly (STORM-1021). + notification["sender_slurl"] = LLViewerChat::getSenderSLURL(chat_msg, args); + channel->addNotification(notification); } diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 0af850a46b..286b16bab2 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -31,6 +31,8 @@ #include "llagent.h" // gAgent #include "lluicolortable.h" #include "llviewercontrol.h" // gSavedSettings +#include "llviewerregion.h" +#include "llworld.h" #include "llinstantmessage.h" //SYSTEM_FROM // LLViewerChat @@ -214,3 +216,43 @@ void LLViewerChat::formatChatMsg(const LLChat& chat, std::string& formated_msg) } +//static +std::string LLViewerChat::getSenderSLURL(const LLChat& chat, const LLSD& args) +{ + switch (chat.mSourceType) + { + case CHAT_SOURCE_AGENT: + return LLSLURL("agent", chat.mFromID, "about").getSLURLString(); + + case CHAT_SOURCE_OBJECT: + return getObjectImSLURL(chat, args); + + default: + llwarns << "Getting SLURL for an unsupported sender type: " << chat.mSourceType << llendl; + } + + return LLStringUtil::null; +} + +//static +std::string LLViewerChat::getObjectImSLURL(const LLChat& chat, const LLSD& args) +{ + std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); + url += "?name=" + chat.mFromName; + url += "&owner=" + chat.mOwnerID.asString(); + + std::string slurl = args["slurl"].asString(); + if (slurl.empty()) + { + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if(region) + { + LLSLURL region_slurl(region->getName(), chat.mPosAgent); + slurl = region_slurl.getLocationString(); + } + } + + url += "&slurl=" + LLURI::escape(slurl); + + return url; +} diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h index a9f9a98960..0f15d29f04 100644 --- a/indra/newview/llviewerchat.h +++ b/indra/newview/llviewerchat.h @@ -40,6 +40,10 @@ public: static LLFontGL* getChatFont(); static S32 getChatFontSize(); static void formatChatMsg(const LLChat& chat, std::string& formated_msg); + static std::string getSenderSLURL(const LLChat& chat, const LLSD& args); + +private: + static std::string getObjectImSLURL(const LLChat& chat, const LLSD& args); }; -- cgit v1.2.3 From e711e8af3d5f560fd93334d44eb7be1e01f02bec Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 23 Mar 2011 17:33:53 -0400 Subject: SH-1168 WIP: Disable SLM save if MeshImportUseSLM not set --- indra/newview/llfloatermodelpreview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 6145c6c16d..10f53dab01 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2704,6 +2704,11 @@ void LLModelPreview::saveUploadData(bool save_skinweights, bool save_joint_posit void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinweights, bool save_joint_positions) { + if (!gSavedSettings.getBOOL("MeshImportUseSLM")) + { + return; + } + std::set > meshes; std::map mesh_binary; -- cgit v1.2.3 From f818d1a5a43d9dd5e580a798cf511c5052ac12db Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 23 Mar 2011 20:48:53 -0400 Subject: STORM-1077 Eliminated separator bar between Speak Button and other menu entries. --- indra/newview/skins/default/xui/en/menu_bottomtray.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 63bfd39e29..07dabe1909 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -19,7 +19,6 @@ function="CheckControl" parameter="EnableVoiceChat" /> - Date: Thu, 24 Mar 2011 12:07:47 -0400 Subject: STORM-1077 Change hint wording. Disable hint if speak or flyout button is pressed. --- indra/newview/llcallfloater.cpp | 3 ++- indra/newview/llspeakbutton.cpp | 3 +++ indra/newview/skins/default/xui/en/notifications.xml | 4 +--- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 328c326278..945a760d05 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -50,6 +50,7 @@ #include "llviewerwindow.h" #include "llvoicechannel.h" #include "llviewerparcelmgr.h" +#include "llfirstuse.h" static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids); void reshape_floater(LLCallFloater* floater, S32 delta_height); @@ -170,13 +171,13 @@ BOOL LLCallFloater::postBuild() updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) updateSession(); - return TRUE; } // virtual void LLCallFloater::onOpen(const LLSD& /*key*/) { + LLFirstUse::speak(false); } // virtual diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index c76ecae4a2..81beb0155f 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -38,6 +38,7 @@ #include "llspeakbutton.h" #include "llbottomtray.h" +#include "llfirstuse.h" static LLDefaultChildRegistry::Register t1("talk_button"); @@ -176,10 +177,12 @@ void LLSpeakButton::onMouseDown_SpeakBtn() { bool down = true; LLVoiceClient::getInstance()->inputUserControlState(down); // this method knows/care about whether this translates into a toggle-to-talk or down-to-talk + LLFirstUse::speak(false); } void LLSpeakButton::onMouseUp_SpeakBtn() { bool down = false; LLVoiceClient::getInstance()->inputUserControlState(down); + LLFirstUse::speak(false); } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 85b8cac944..b478cf869e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6611,9 +6611,7 @@ Mute everyone? label="Speak" type="hint" unique="true"> -Click the Speak button to turn your microphone off and on. - -Your microphone is on by default. +Click the Speak button to turn your microphone on and off. Click on the up arrow to see the voice control panel. -- cgit v1.2.3 From 32012f9fd4e9a5cb37f3a91d79873b79b9e6531e Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 24 Mar 2011 13:57:57 -0400 Subject: STORM-1077 Removed disabling speak hint on mouse up of speak button --- indra/newview/llspeakbutton.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 81beb0155f..d52e0a6c86 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -183,6 +183,5 @@ void LLSpeakButton::onMouseUp_SpeakBtn() { bool down = false; LLVoiceClient::getInstance()->inputUserControlState(down); - LLFirstUse::speak(false); } -- cgit v1.2.3 From 971eac1aa26fecaf6a8bbb7ca568ed400866c197 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 25 Mar 2011 14:04:52 -0600 Subject: fix for SH-838: Crash if exit during mesh upload --- indra/newview/llmeshrepository.cpp | 70 +++++++++++++++++++++++++++++++++----- indra/newview/llmeshrepository.h | 6 ++-- 2 files changed, 65 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 60cbdcc98b..a2792bcdc6 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -28,7 +28,7 @@ #include "apr_pools.h" #include "apr_dso.h" - +#include "llhttpstatuscodes.h" #include "llmeshrepository.h" #include "llagent.h" @@ -291,17 +291,21 @@ public: } else { - llwarns << status << ": " << reason << llendl; - llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl; + llwarns << status << ": " << reason << llendl; - if (status == 499) + if (status == HTTP_INTERNAL_ERROR) { + llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl; mThread->uploadModel(mData); } - else if (status == 400) + else if (status == HTTP_BAD_REQUEST) { llwarns << "Status 400 received from server, giving up." << llendl; } + else if (status == HTTP_NOT_FOUND) + { + llwarns <<"Status 404 received, server is disconnected, giving up." << llendl ; + } else { llerrs << "Unhandled status " << status << llendl; @@ -1381,7 +1385,8 @@ bool LLMeshRepoThread::physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32 LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, LLVector3& scale, bool upload_textures, bool upload_skin, bool upload_joints) -: LLThread("mesh upload") +: LLThread("mesh upload"), + mDiscarded(FALSE) { mInstanceList = data; mUploadTextures = upload_textures; @@ -1475,8 +1480,26 @@ void LLMeshUploadThread::preStart() } } +void LLMeshUploadThread::discard() +{ + LLMutexLock lock(mMutex) ; + mDiscarded = TRUE ; +} + +BOOL LLMeshUploadThread::isDiscarded() +{ + LLMutexLock lock(mMutex) ; + return mDiscarded ; +} + void LLMeshUploadThread::run() { + if(isDiscarded()) + { + mFinished = true; + return ; + } + mCurlRequest = new LLCurlRequest(); std::set textures; @@ -1605,7 +1628,7 @@ void LLMeshUploadThread::run() tcount = llmin(count+PUSH_PER_PROCESS, 100); - while (!mInstanceQ.empty() && count < tcount) + while (!mInstanceQ.empty() && count < tcount && !isDiscarded()) { //create any objects waiting for upload count++; object_asset["objects"].append(createObject(mInstanceQ.front())); @@ -1614,7 +1637,7 @@ void LLMeshUploadThread::run() mCurlRequest->process(); - done = mInstanceQ.empty() && mConfirmedQ.empty() && mUploadQ.empty(); + done = isDiscarded() || (mInstanceQ.empty() && mConfirmedQ.empty() && mUploadQ.empty()); } while (!done || mCurlRequest->getQueued() > 0); @@ -1629,7 +1652,10 @@ void LLMeshUploadThread::run() object_asset["permissions"] = object_asset["objects"][0]["permissions"]; } - LLHTTPClient::post(url, object_asset, new LLHTTPClient::Responder()); + if(!isDiscarded()) + { + LLHTTPClient::post(url, object_asset, new LLHTTPClient::Responder()); + } mFinished = true; } @@ -2132,6 +2158,12 @@ void LLMeshRepository::shutdown() { llinfos << "Shutting down mesh repository." << llendl; + for (U32 i = 0; i < mUploads.size(); ++i) + { + llinfos << "Discard the pending mesh uploads " << llendl; + mUploads[i]->discard() ; //discard the uploading requests. + } + mThread->mSignal->signal(); while (!mThread->isStopped()) @@ -2750,6 +2782,11 @@ S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod) void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data) { + if(isDiscarded()) + { + return ; + } + //write model file to memory buffer std::stringstream ostr; @@ -2808,6 +2845,11 @@ void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data) void LLMeshUploadThread::sendCostRequest(LLTextureUploadData& data) { + if(isDiscarded()) + { + return ; + } + if (data.mTexture && data.mTexture->getDiscardLevel() >= 0) { LLSD asset_resources = LLSD::emptyMap(); @@ -2840,6 +2882,11 @@ void LLMeshUploadThread::sendCostRequest(LLTextureUploadData& data) void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data) { + if(isDiscarded()) + { + return ; + } + if (!data.mRSVP.empty()) { std::stringstream ostr; @@ -2872,6 +2919,11 @@ void LLMeshUploadThread::doUploadModel(LLMeshUploadData& data) void LLMeshUploadThread::doUploadTexture(LLTextureUploadData& data) { + if(isDiscarded()) + { + return ; + } + if (!data.mRSVP.empty()) { std::stringstream ostr; diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index f0c0f308d5..4e349a1270 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -405,11 +405,12 @@ public: S32 mPendingConfirmations; S32 mPendingUploads; S32 mPendingCost; - bool mFinished; LLVector3 mOrigin; + bool mFinished; bool mUploadTextures; bool mUploadSkin; bool mUploadJoints; + BOOL mDiscarded ; LLHost mHost; std::string mUploadObjectAssetCapability; @@ -445,7 +446,8 @@ public: bool finished() { return mFinished; } virtual void run(); void preStart(); - + void discard() ; + BOOL isDiscarded(); }; class LLMeshRepository -- cgit v1.2.3 From 3528753a3a5e2f569872c49cdf6154833f483245 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 25 Mar 2011 14:10:35 -0700 Subject: SH-1104 Add additional panel before review step. --- indra/newview/llfloatermodelpreview.cpp | 5 +- indra/newview/llfloatermodelwizard.cpp | 33 ++++- indra/newview/llfloatermodelwizard.h | 1 + .../skins/default/xui/en/floater_model_wizard.xml | 150 ++++++++++++++++++++- 4 files changed, 183 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 2587ab69c3..254f9f8a5e 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -4518,9 +4518,12 @@ void LLModelPreview::setPreviewLOD(S32 lod) mFMP->childSetTextArg("lod_table_footer", "[DETAIL]", mFMP->getString(lod_name[mPreviewLOD])); mFMP->childSetText("lod_file", mLODFile[mPreviewLOD]); - // the wizard has two lod drop downs + // the wizard has three lod drop downs LLComboBox* combo_box2 = mFMP->getChild("preview_lod_combo2"); combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order + + LLComboBox* combo_box3 = mFMP->getChild("preview_lod_combo3"); + combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order LLColor4 highlight_color = LLUIColorTable::instance().getColor("MeshImportTableHighlightColor"); LLColor4 normal_color = LLUIColorTable::instance().getColor("MeshImportTableNormalColor"); diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index eafea1fe03..ad6e4ebe9c 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -46,6 +46,7 @@ static const std::string stateNames[]={ "choose_file", "optimize", "physics", + "physics2", "review", "upload"}; @@ -58,6 +59,7 @@ LLFloaterModelWizard::LLFloaterModelWizard(const LLSD& key) mCommitCallbackRegistrar.add("Wizard.Choose", boost::bind(&LLFloaterModelWizard::setState, this, CHOOSE_FILE)); mCommitCallbackRegistrar.add("Wizard.Optimize", boost::bind(&LLFloaterModelWizard::setState, this, OPTIMIZE)); mCommitCallbackRegistrar.add("Wizard.Physics", boost::bind(&LLFloaterModelWizard::setState, this, PHYSICS)); + mCommitCallbackRegistrar.add("Wizard.Physics2", boost::bind(&LLFloaterModelWizard::setState, this, PHYSICS2)); mCommitCallbackRegistrar.add("Wizard.Review", boost::bind(&LLFloaterModelWizard::setState, this, REVIEW)); mCommitCallbackRegistrar.add("Wizard.Upload", boost::bind(&LLFloaterModelWizard::setState, this, UPLOAD)); } @@ -125,15 +127,29 @@ void LLFloaterModelWizard::setState(int state) getChildView("cancel")->setVisible(true); } - if (state == REVIEW) + if (state == PHYSICS2) { if (mLastEnabledState < state) { executePhysicsStage("Decompose"); } - + mModelPreview->mViewOption["show_physics"] = true; + getChildView("next")->setVisible(true); + getChildView("next")->setEnabled(true); + getChildView("upload")->setVisible(false); + getChildView("close")->setVisible(false); + getChildView("back")->setVisible(true); + getChildView("back")->setEnabled(true); + getChildView("cancel")->setVisible(true); + } + + if (state == REVIEW) + { + + mModelPreview->mViewOption["show_physics"] = false; + getChildView("close")->setVisible(false); getChildView("next")->setVisible(false); getChildView("back")->setVisible(true); @@ -182,6 +198,18 @@ void LLFloaterModelWizard::updateButtons() button->setEnabled(FALSE); } } + + LLButton *physics_button = getChild(stateNames[PHYSICS]+"_btn"); + + if (mState == PHYSICS2) + { + physics_button->setVisible(false); + } + else + { + physics_button->setVisible(true); + } + } void LLFloaterModelWizard::loadModel() @@ -486,6 +514,7 @@ BOOL LLFloaterModelWizard::postBuild() getChild("next")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickNext, this)); getChild("preview_lod_combo")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); getChild("preview_lod_combo2")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); + getChild("preview_lod_combo3")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); getChild("accuracy_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onAccuracyPerformance, this, _2)); getChild("upload")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onUpload, this)); getChild("physics_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPhysicsChanged, this)); diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index 50e4ab1a96..b166d26295 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -80,6 +80,7 @@ private: CHOOSE_FILE = 0, OPTIMIZE, PHYSICS, + PHYSICS2, REVIEW, UPLOAD }; diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index f133d75eee..a6dd6c099d 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -45,6 +45,24 @@ +