diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index d5708ac45..f80c1a15e 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -70,10 +70,6 @@ if(STANDALONE) add_subdirectory(${LIBS_OPEN_PREFIX}llqtwebkit) endif(STANDALONE) -if (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE) - add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu) -endif (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE) - #add_subdirectory(${LIBS_OPEN_PREFIX}lscript) if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) @@ -81,73 +77,43 @@ if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) add_custom_target(viewer) -if (VIEWER) - add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger) - add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) - add_subdirectory(${LIBS_OPEN_PREFIX}llui) +add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger) +add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) +add_subdirectory(${LIBS_OPEN_PREFIX}llui) - # viewer plugins directory - add_subdirectory(${LIBS_OPEN_PREFIX}plugins) +# viewer plugins directory +add_subdirectory(${LIBS_OPEN_PREFIX}plugins) - # llplugin testbed code (is this the right way to include it?) - #if (NOT LINUX) - # add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest) - #endif (NOT LINUX) +# llplugin testbed code (is this the right way to include it?) +#if (NOT LINUX) +# add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest) +#endif (NOT LINUX) - if (LINUX) - add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) - add_dependencies(viewer linux-crash-logger-strip-target) - elseif (DARWIN) - #add_subdirectory(${VIEWER_PREFIX}mac_crash_logger) - #add_subdirectory(${VIEWER_PREFIX}mac_updater) - add_dependencies(viewer mac-crash-logger) - #add_dependencies(viewer mac-updater) - elseif (WINDOWS) - add_subdirectory(${VIEWER_PREFIX}win_crash_logger) - # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake - if (EXISTS ${VIEWER_DIR}win_setup) - add_subdirectory(${VIEWER_DIR}win_setup) - endif (EXISTS ${VIEWER_DIR}win_setup) - add_subdirectory(${VIEWER_PREFIX}win_updater) - add_dependencies(viewer windows-updater) - add_dependencies(viewer windows-crash-logger) - elseif (SOLARIS) - add_subdirectory(solaris_crash_logger) - add_dependencies(viewer solaris-crash-logger) - endif (LINUX) - - add_subdirectory(${VIEWER_PREFIX}newview/statemachine) - add_subdirectory(${VIEWER_PREFIX}newview) - add_dependencies(viewer secondlife-bin) -endif (VIEWER) - -# Linux builds the viewer and server in 2 separate projects -# In order for ./develop.py build server to work on linux, -# the viewer project needs a server target. -# This is not true for mac and windows. -if (LINUX) - add_custom_target(server) +if (LINUX) + add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) + add_dependencies(viewer linux-crash-logger-strip-target) +elseif (DARWIN) + #add_subdirectory(${VIEWER_PREFIX}mac_crash_logger) + #add_subdirectory(${VIEWER_PREFIX}mac_updater) + add_dependencies(viewer mac-crash-logger) + #add_dependencies(viewer mac-updater) +elseif (WINDOWS) + add_subdirectory(${VIEWER_PREFIX}win_crash_logger) + # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake + if (EXISTS ${VIEWER_DIR}win_setup) + add_subdirectory(${VIEWER_DIR}win_setup) + endif (EXISTS ${VIEWER_DIR}win_setup) + add_subdirectory(${VIEWER_PREFIX}win_updater) + add_dependencies(viewer windows-updater) + add_dependencies(viewer windows-crash-logger) +elseif (SOLARIS) + add_subdirectory(solaris_crash_logger) + add_dependencies(viewer solaris-crash-logger) endif (LINUX) -if (SERVER) - if (NOT LINUX) - add_custom_target(server) - endif (NOT LINUX) - include(${SERVER_PREFIX}Server.cmake) -endif (SERVER) -# Windows builds include tools like VFS tool -if (SERVER) - if (WINDOWS) - add_subdirectory(${SERVER_PREFIX}tools) - endif (WINDOWS) -endif (SERVER) - -# Configure prebuilt binary download. This must be done last so that -# all subdirectories have a chance to list the packages they need. -# We need scp for proprietary downloads. -if(INSTALL_PROPRIETARY) - include(FindSCP) -endif(INSTALL_PROPRIETARY) +add_subdirectory(${VIEWER_PREFIX}newview/statemachine) +add_subdirectory(${VIEWER_PREFIX}newview) +add_dependencies(viewer secondlife-bin) # The use_prebuilt_binary macro in cmake/Prebuilt.cmake records # packages in the PREBUILT property of the 'prepare' target. diff --git a/indra/aistatemachine/aistatemachine.cpp b/indra/aistatemachine/aistatemachine.cpp index 5352435d2..dedec3bd7 100644 --- a/indra/aistatemachine/aistatemachine.cpp +++ b/indra/aistatemachine/aistatemachine.cpp @@ -2,7 +2,7 @@ * @file aistatemachine.cpp * @brief Implementation of AIStateMachine * - * Copyright (c) 2010, Aleric Inglewood. + * Copyright (c) 2010 - 2013, Aleric Inglewood. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,68 +26,785 @@ * * 01/03/2010 * Initial version, written by Aleric Inglewood @ SL + * + * 28/02/2013 + * Rewritten from scratch to fully support threading. */ #include "linden_common.h" - -#include - -#include "llcontrol.h" -#include "llfasttimer.h" -#include "aithreadsafe.h" #include "aistatemachine.h" +#include "lltimer.h" -// Local variables. -namespace { - struct QueueElementComp; +//================================================================== +// Overview - class QueueElement { - private: - AIStateMachine* mStateMachine; - U64 mRuntime; +// A AIStateMachine is a base class that allows derived classes to +// go through asynchronous states, while the code still appears to +// be more or less sequential. +// +// These state machine objects can be reused to build more complex +// objects. +// +// It is important to note that each state has a duality: the object +// can have a state that will cause a corresponding function to be +// called; and often that function will end with changing the state +// again, to signal that it was handled. It is easy to confuse the +// function of a state with the state at the end of the function. +// For example, the state "initialize" could cause the member +// function 'init()' to be called, and at the end one would be +// inclined to set the state to "initialized". However, this is the +// wrong approach: the correct use of state names does reflect the +// functions that will be called, never the function that just was +// called. +// +// Each (derived) class goes through a series of states as follows: +// +// Creation +// | +// v +// (idle) <----. Idle until run() is called. +// | | +// Initialize | Calls initialize_impl(). +// | | +// | (idle) | Idle until cont() or advance_state() is called. +// | | ^ | +// v v | | +// .-----------. | +// | Multiplex | | Call multiplex_impl() until idle(), abort() or finish() is called. +// '-----------' | +// | | | +// v | | +// Abort | | Calls abort_impl(). +// | | | +// v v | +// Finish | Calls finish_impl(), which may call run(). +// | | | +// | v | +// | Callback | which may call kill() and/or run(). +// | | | | +// | | `-----' +// v v +// Killed Delete the statemachine (all statemachines must be allocated with new). +// +// Each state causes corresponding code to be called. +// Finish cleans up whatever is done by Initialize. +// Abort should clean up additional things done while running. +// +// The running state is entered by calling run(). +// +// While the base class is in the bs_multiplex state, it is the derived class +// that goes through different states. The state variable of the derived +// class is only valid while the base class is in the bs_multiplex state. +// +// A derived class can exit the bs_multiplex state by calling one of two methods: +// abort() in case of failure, or finish() in case of success. +// Respectively these set the state to bs_abort and bs_finish. +// +// The methods of the derived class call set_state() to change their +// own state within the bs_multiplex state, or by calling either abort() +// or finish(). +// +// Restarting a finished state machine can be done by calling run(), +// which will cause a re-initialize. The default is to destruct the +// state machine once the last LLPointer to it is deleted. +// - public: - QueueElement(AIStateMachine* statemachine) : mStateMachine(statemachine), mRuntime(0) { } - friend bool operator==(QueueElement const& e1, QueueElement const& e2) { return e1.mStateMachine == e2.mStateMachine; } - friend struct QueueElementComp; - AIStateMachine& statemachine(void) const { return *mStateMachine; } - void add(U64 count) { mRuntime += count; } - }; +//================================================================== +// Declaration - struct QueueElementComp { - bool operator()(QueueElement const& e1, QueueElement const& e2) const { return e1.mRuntime < e2.mRuntime; } - }; +// Every state machine is (indirectly) derived from AIStateMachine. +// For example: - typedef std::vector active_statemachines_type; - active_statemachines_type active_statemachines; +#ifdef EXAMPLE_CODE // undefined + +class HelloWorld : public AIStateMachine { + protected: + // The base class of this state machine. + typedef AIStateMachine direct_base_type; + + // The different states of the state machine. + enum hello_world_state_type { + HelloWorld_start = direct_base_type::max_state, + HelloWorld_done, + }; + public: + static state_type const max_state = HelloWorld_done + 1; // One beyond the largest state. + + public: + // The derived class must have a default constructor. + HelloWorld(); + + protected: + // The destructor must be protected. + /*virtual*/ ~HelloWorld(); + + protected: + // The following virtual functions must be implemented: + + // Handle initializing the object. + /*virtual*/ void initialize_impl(void); + + // Handle mRunState. + /*virtual*/ void multiplex_impl(state_type run_state); + + // Handle aborting from current bs_multiplex state (the default AIStateMachine::abort_impl() does nothing). + /*virtual*/ void abort_impl(void); + + // Handle cleaning up from initialization (or post abort) state (the default AIStateMachine::finish_impl() does nothing). + /*virtual*/ void finish_impl(void); + + // Return human readable string for run_state. + /*virtual*/ char const* state_str_impl(state_type run_state) const; +}; + +// In the .cpp file: + +char const* HelloWorld::state_str_impl(state_type run_state) const +{ + switch(run_state) + { + // A complete listing of hello_world_state_type. + AI_CASE_RETURN(HelloWorld_start); + AI_CASE_RETURN(HelloWorld_done); + } +#if directly_derived_from_AIStateMachine + llassert(false); + return "UNKNOWN STATE"; +#else + llassert(run_state < direct_base_type::max_state); + return direct_base_type::state_str_impl(run_state); +#endif +} + +#endif // EXAMPLE_CODE + + +//================================================================== +// Life cycle: creation, initialization, running and destruction + +// Any thread may create a state machine object, initialize it by calling +// it's initializing member function and call one of the 'run' methods, +// which might or might not immediately start to execute the state machine. + +#ifdef EXAMPLE_CODE + HelloWorld* hello_world = new HelloWorld; + hello_world->init(...); // A custom initialization function. + hello_world->run(...); // One of the run() functions. + // hello_world might be destructed here. + // You can avoid possible destruction by using an LLPointer + // instead of HelloWorld*. +#endif // EXAMPLE_CODE + +// The call to run() causes a call to initialize_impl(), which MUST call +// set_state() at least once (only the last call is used). +// Upon return from initialize_impl(), multiplex_impl() will be called +// with that state. +// multiplex_impl() may never reentrant (cause itself to be called). +// multiplex_impl() should end by callling either one of: +// idle(current_state), yield*(), finish() [or abort()]. +// Leaving multiplex_impl() without calling any of those might result in an +// immediate reentry, which could lead to 100% CPU usage unless the state +// is changed with set_state(). +// If multiplex_impl() calls finish() then finish_impl() will be called [if it +// calls abort() then abort_impl() will called, followed by finish_impl()]. +// Upon return from multiplex_impl(), and if finish() [or abort()] was called, +// the call back passed to run() will be called. +// Upon return from the call back, the state machine object might be destructed +// (see below). +// If idle(current_state) was called, and the state was (still) current_state, +// then multiplex_impl() will not be called again until the state is +// advanced, or cont() is called. +// +// If the call back function does not call run(), then the state machine is +// deleted when the last LLPointer<> reference is deleted. +// If kill() is called after run() was called, then the call to run() is ignored. + + +//================================================================== +// Aborting + +// If abort() is called before initialize_impl() is entered, then the state +// machine is destructed after the last LLPointer<> reference to it is +// deleted (if any). Note that this is only possible when a child state +// machine is aborted before the parent even runs. +// +// If abort() is called inside its initialize_impl() that initialize_impl() +// should return immediately after. +// if idle(), abort() or finish() are called inside its multiplex_impl() then +// that multiplex_impl() should return immediately after. +// + + +//================================================================== +// Thread safety + +// Only one thread can "run" a state machine at a time; can call 'multiplex_impl'. +// +// Only from inside multiplex_impl (set_state also from initialize_impl), any of the +// following functions can be called: +// +// - set_state(new_state) --> Force the state to new_state. This voids any previous call to set_state() or idle(). +// - idle(current_state) --> If the current state is still current_state (if there was no call to advance_state() +// since the last call to set_state(current_state)) then go idle (do nothing until +// cont() or advance_state() is called). If the current state is not current_state, +// then multiplex_impl shall be reentered immediately upon return. +// - finish() --> Disables any scheduled runs. +// --> finish_impl --> [optional] kill() +// --> call back +// --> [optional] delete +// --> [optional] reset, upon return from multiplex_impl, call initialize_impl and start again at the top of multiplex. +// - yield([engine]) --> give CPU to other state machines before running again, run next from a state machine engine. +// If no engine is passed, the state machine will run in it's default engine (as set during construction). +// - yield_frame()/yield_ms() --> yield(&gMainThreadEngine) +// +// the following function may be called from multiplex_impl() of any state machine (and thus by any thread): +// +// - abort() --> abort_impl +// --> finish() +// +// while the following functions may be called from anywhere (and any thread): +// +// - cont() --> schedules a run if there was no call to set_state() or advance_state() since the last call to idle(). +// - advance_state(new_state) --> sets the state to new_state, if the new_state > current_state, and schedules a run (and voids the last call to idle()). +// +// In the above "scheduling a run" means calling multiplex_impl(), but the same holds for any *_impl() +// and the call back: Whenever one of those have to be called, thread_safe_impl() is called to +// determine if the current state machine allows that function to be called by the current thread, +// and if not - by which thread it should be called then (either main thread, or a special state machine +// thread). If thread switching is necessary, the call is literally scheduled in a queue of one +// of those two, otherwise it is run immediately. +// +// However, since only one thread at a time may be calling any *_impl function (except thread_safe_impl()) +// or the call back function, it is possible that at the moment scheduling is necessary another thread +// is already running one of those functions. In that case thread_safe_impl() does not consider the +// current thread, but rather the running thread and does not do any scheduling if the running thread +// is ok, rather marks the need to continue running which should be picked up upon return from +// whatever the running thread is calling. + +void AIEngine::add(AIStateMachine* state_machine) +{ + Dout(dc::statemachine, "Adding state machine [" << (void*)state_machine << "] to " << mName); + engine_state_type_wat engine_state_w(mEngineState); + engine_state_w->list.push_back(QueueElement(state_machine)); + if (engine_state_w->waiting) + { + engine_state_w.signal(); + } +} + +extern void print_statemachine_diagnostics(U64 total_clocks, U64 max_delta, AIEngine::queued_type::const_reference slowest_state_machine); + +// MAIN-THREAD +void AIEngine::mainloop(void) +{ + queued_type::iterator queued_element, end; + { + engine_state_type_wat engine_state_w(mEngineState); + end = engine_state_w->list.end(); + queued_element = engine_state_w->list.begin(); + } + U64 total_clocks = 0; +#ifndef LL_RELEASE_FOR_DOWNLOAD + U64 max_delta = 0; + queued_type::value_type slowest_element(NULL); +#endif + while (queued_element != end) + { + AIStateMachine& state_machine(queued_element->statemachine()); + U64 start = get_clock_count(); + if (!state_machine.sleep(start)) + { + state_machine.multiplex(AIStateMachine::normal_run); + } + U64 delta = get_clock_count() - start; + state_machine.add(delta); + total_clocks += delta; +#ifndef LL_RELEASE_FOR_DOWNLOAD + if (delta > max_delta) + { + max_delta = delta; + slowest_element = *queued_element; + } +#endif + bool active = state_machine.active(this); // This locks mState shortly, so it must be called before locking mEngineState because add() locks mEngineState while holding mState. + engine_state_type_wat engine_state_w(mEngineState); + if (!active) + { + Dout(dc::statemachine, "Erasing state machine [" << (void*)&state_machine << "] from " << mName); + engine_state_w->list.erase(queued_element++); + } + else + { + ++queued_element; + } + if (total_clocks >= sMaxCount) + { +#ifndef LL_RELEASE_FOR_DOWNLOAD + print_statemachine_diagnostics(total_clocks, max_delta, slowest_element); +#endif + Dout(dc::statemachine, "Sorting " << engine_state_w->list.size() << " state machines."); + engine_state_w->list.sort(QueueElementComp()); + break; + } + } +} + +void AIEngine::flush(void) +{ + DoutEntering(dc::statemachine, "AIEngine::flush [" << mName << "]"); + engine_state_type_wat engine_state_w(mEngineState); + engine_state_w->list.clear(); } // static -U64 AIStateMachine::sMaxCount; -AIThreadSafeDC AIStateMachine::sContinuedStateMachinesAndMainloopEnabled; +U64 AIEngine::sMaxCount; // static -void AIStateMachine::setMaxCount(F32 StateMachineMaxTime) +void AIEngine::setMaxCount(F32 StateMachineMaxTime) { - llassert(is_main_thread()); + llassert(AIThreadID::in_main_thread()); Dout(dc::statemachine, "(Re)calculating AIStateMachine::sMaxCount"); sMaxCount = calc_clock_frequency() * StateMachineMaxTime / 1000; } -//---------------------------------------------------------------------------- -// -// Public methods -// - -void AIStateMachine::run(AIStateMachine* parent, state_type new_parent_state, bool abort_parent, bool on_abort_signal_parent) +#ifdef CWDEBUG +char const* AIStateMachine::event_str(event_type event) { - DoutEntering(dc::statemachine, "AIStateMachine::run(" << (void*)parent << ", " << (parent ? parent->state_str(new_parent_state) : "NA") << ", " << abort_parent << ") [" << (void*)this << "]"); - // Must be the first time we're being run, or we must be called from a callback function. - llassert(!mParent || mState == bs_callback); - llassert(!mCallback || mState == bs_callback); - // Can only be run when in this state. - llassert(mState == bs_initialize || mState == bs_callback); + switch(event) + { + AI_CASE_RETURN(initial_run); + AI_CASE_RETURN(schedule_run); + AI_CASE_RETURN(normal_run); + AI_CASE_RETURN(insert_abort); + } + llassert(false); + return "UNKNOWN EVENT"; +} +#endif + +void AIStateMachine::multiplex(event_type event) +{ + // If this fails then you are using a pointer to a state machine instead of an LLPointer. + llassert(event == initial_run || getNumRefs() > 0); + + DoutEntering(dc::statemachine, "AIStateMachine::multiplex(" << event_str(event) << ") [" << (void*)this << "]"); + + base_state_type state; + state_type run_state; + + // Critical area of mState. + { + multiplex_state_type_rat state_r(mState); + + // If another thread is already running multiplex() then it will pick up + // our need to run (by us having set need_run), so there is no need to run + // ourselves. + llassert(!mMultiplexMutex.isSelfLocked()); // We may never enter recursively! + if (!mMultiplexMutex.tryLock()) + { + Dout(dc::statemachine, "Leaving because it is already being run [" << (void*)this << "]"); + return; + } + + //=========================================== + // Start of critical area of mMultiplexMutex. + + // If another thread already called begin_loop() since we needed a run, + // then we must not schedule a run because that could lead to running + // the same state twice. Note that if need_run was reset in the mean + // time and then set again, then it can't hurt to schedule a run since + // we should indeed run, again. + if (event == schedule_run && !sub_state_type_rat(mSubState)->need_run) + { + Dout(dc::statemachine, "Leaving because it was already being run [" << (void*)this << "]"); + return; + } + + // We're at the beginning of multiplex, about to actually run it. + // Make a copy of the states. + run_state = begin_loop((state = state_r->base_state)); + } + // End of critical area of mState. + + bool keep_looping; + bool destruct = false; + do + { + + if (event == normal_run) + { +#ifdef CWDEBUG + if (state == bs_multiplex) + Dout(dc::statemachine, "Running state bs_multiplex / " << state_str_impl(run_state) << " [" << (void*)this << "]"); + else + Dout(dc::statemachine, "Running state " << state_str(state) << " [" << (void*)this << "]"); +#endif + +#ifdef SHOW_ASSERT + // This debug code checks that each state machine steps precisely through each of it's states correctly. + if (state != bs_reset) + { + switch(mDebugLastState) + { + case bs_reset: + llassert(state == bs_initialize || state == bs_killed); + break; + case bs_initialize: + llassert(state == bs_multiplex || state == bs_abort); + break; + case bs_multiplex: + llassert(state == bs_multiplex || state == bs_finish || state == bs_abort); + break; + case bs_abort: + llassert(state == bs_finish); + break; + case bs_finish: + llassert(state == bs_callback); + break; + case bs_callback: + llassert(state == bs_killed || state == bs_reset); + break; + case bs_killed: + llassert(state == bs_killed); + break; + } + } + // More sanity checks. + if (state == bs_multiplex) + { + // set_state is only called from multiplex_impl and therefore synced with mMultiplexMutex. + mDebugShouldRun |= mDebugSetStatePending; + // Should we run at all? + llassert(mDebugShouldRun); + } + // Any previous reason to run is voided by actually running. + mDebugShouldRun = false; +#endif + + mRunMutex.lock(); + // Now we are actually running a single state. + // If abort() was called at any moment before, we execute that state instead. + bool const late_abort = (state == bs_multiplex || state == bs_initialize) && sub_state_type_rat(mSubState)->aborted; + if (LL_UNLIKELY(late_abort)) + { + // abort() was called from a child state machine, from another thread, while we were already scheduled to run normally from an engine. + // What we want to do here is pretend we detected the abort at the end of the *previous* run. + // If the state is bs_multiplex then the previous state was either bs_initialize or bs_multiplex, + // both of which would have switched to bs_abort: we set the state to bs_abort instead and just + // continue this run. + // However, if the state is bs_initialize we can't switch to bs_killed because that state isn't + // handled in the switch below; it's only handled when exiting multiplex() directly after it is set. + // Therefore, in that case we have to set the state BACK to bs_reset and run it again. This duplicated + // run of bs_reset is not a problem because it happens to be a NoOp. + state = (state == bs_initialize) ? bs_reset : bs_abort; +#ifdef CWDEBUG + Dout(dc::statemachine, "Late abort detected! Running state " << state_str(state) << " instead [" << (void*)this << "]"); +#endif + } +#ifdef SHOW_ASSERT + mDebugLastState = state; + // Make sure we only call ref() once and in balance with unref(). + if (state == bs_initialize) + { + // This -- and call to ref() (and the test when we're about to call unref()) -- is all done in the critical area of mMultiplexMutex. + llassert(!mDebugRefCalled); + mDebugRefCalled = true; + } +#endif + switch(state) + { + case bs_reset: + // We're just being kick started to get into the right thread + // (possibly for the second time when a late abort was detected, but that's ok: we do nothing here). + break; + case bs_initialize: + ref(); + initialize_impl(); + break; + case bs_multiplex: + llassert(!mDebugAborted); + multiplex_impl(run_state); + break; + case bs_abort: + abort_impl(); + break; + case bs_finish: + sub_state_type_wat(mSubState)->reset = false; // By default, halt state machines when finished. + finish_impl(); // Call run() from finish_impl() or the call back to restart from the beginning. + break; + case bs_callback: + callback(); + break; + case bs_killed: + mRunMutex.unlock(); + // bs_killed is handled when it is set. So, this must be a re-entry. + // We can only get here when being called by an engine that we were added to before we were killed. + // This should already be have been set to NULL to indicate that we want to be removed from that engine. + llassert(!multiplex_state_type_rat(mState)->current_engine); + // Do not call unref() twice. + return; + } + mRunMutex.unlock(); + } + + { + multiplex_state_type_wat state_w(mState); + + //================================= + // Start of critical area of mState + + // Unless the state is bs_multiplex or bs_killed, the state machine needs to keep calling multiplex(). + bool need_new_run = true; + if (event == normal_run || event == insert_abort) + { + sub_state_type_rat sub_state_r(mSubState); + + if (event == normal_run) + { + // Switch base state as function of sub state. + switch(state) + { + case bs_reset: + if (sub_state_r->aborted) + { + // We have been aborted before we could even initialize, no de-initialization is possible. + state_w->base_state = bs_killed; + // Stop running. + need_new_run = false; + } + else + { + // run() was called: call initialize_impl() next. + state_w->base_state = bs_initialize; + } + break; + case bs_initialize: + if (sub_state_r->aborted) + { + // initialize_impl() called abort. + state_w->base_state = bs_abort; + } + else + { + // Start actually running. + state_w->base_state = bs_multiplex; + // If the state is bs_multiplex we only need to run again when need_run was set again in the meantime or when this state machine isn't idle. + need_new_run = sub_state_r->need_run || !sub_state_r->idle; + } + break; + case bs_multiplex: + if (sub_state_r->aborted) + { + // abort() was called. + state_w->base_state = bs_abort; + } + else if (sub_state_r->finished) + { + // finish() was called. + state_w->base_state = bs_finish; + } + else + { + // Continue in bs_multiplex. + // If the state is bs_multiplex we only need to run again when need_run was set again in the meantime or when this state machine isn't idle. + need_new_run = sub_state_r->need_run || !sub_state_r->idle; + } + break; + case bs_abort: + // After calling abort_impl(), call finish_impl(). + state_w->base_state = bs_finish; + break; + case bs_finish: + // After finish_impl(), call the call back function. + state_w->base_state = bs_callback; + break; + case bs_callback: + if (sub_state_r->reset) + { + // run() was called (not followed by kill()). + state_w->base_state = bs_reset; + } + else + { + // After the call back, we're done. + state_w->base_state = bs_killed; + // Call unref(). + destruct = true; + // Stop running. + need_new_run = false; + } + break; + default: // bs_killed + // We never get here. + break; + } + } + else // event == insert_abort + { + // We have been aborted, but we're idle. If we'd just schedule a new run below, it would re-run + // the last state before the abort is handled. What we really need is to pick up as if the abort + // was handled directly after returning from the last run. If we're not running anymore, then + // do nothing as the state machine already ran and things should be processed normally + // (in that case this is just a normal schedule which can't harm because we're can't accidently + // re-run an old run_state). + if (state_w->base_state == bs_multiplex) // Still running? + { + // See the switch above for case bs_multiplex. + llassert(sub_state_r->aborted); + // abort() was called. + state_w->base_state = bs_abort; + } + } + +#ifdef CWDEBUG + if (state != state_w->base_state) + Dout(dc::statemachine, "Base state changed from " << state_str(state) << " to " << state_str(state_w->base_state) << + "; need_new_run = " << (need_new_run ? "true" : "false") << " [" << (void*)this << "]"); +#endif + } + + // Figure out in which engine we should run. + AIEngine* engine = mYieldEngine ? mYieldEngine : (state_w->current_engine ? state_w->current_engine : mDefaultEngine); + // And the current engine we're running in. + AIEngine* current_engine = (event == normal_run) ? state_w->current_engine : NULL; + + // Immediately run again if yield() wasn't called and it's OK to run in this thread. + // Note that when it's OK to run in any engine (mDefaultEngine is NULL) then the last + // compare is also true when current_engine == NULL. + keep_looping = need_new_run && !mYieldEngine && engine == current_engine; + mYieldEngine = NULL; + + if (keep_looping) + { + // Start a new loop. + run_state = begin_loop((state = state_w->base_state)); + event = normal_run; + } + else + { + if (need_new_run) + { + // Add us to an engine if necessary. + if (engine != state_w->current_engine) + { + // engine can't be NULL here: it can only be NULL if mDefaultEngine is NULL. + engine->add(this); + // Mark that we're added to this engine, and at the same time, that we're not added to the previous one. + state_w->current_engine = engine; + } + } + else + { + // Remove this state machine from any engine. + // Cause the engine to remove us. + state_w->current_engine = NULL; + } + +#ifdef SHOW_ASSERT + // Mark that we stop running the loop. + mThreadId.clear(); + + if (destruct) + { + // We're about to call unref(). Make sure we call that in balance with ref()! + llassert(mDebugRefCalled); + mDebugRefCalled = false; + } +#endif + + // End of critical area of mMultiplexMutex. + //========================================= + + // Release the lock on mMultiplexMutex *first*, before releasing the lock on mState, + // to avoid to ever call the tryLock() and fail, while this thread isn't still + // BEFORE the critical area of mState! + + mMultiplexMutex.unlock(); + } + + // Now it is safe to leave the critical area of mState as the tryLock won't fail anymore. + // (Or, if we didn't release mMultiplexMutex because keep_looping is true, then this + // end of the critical area of mState is equivalent to the first critical area in this + // function. + + // End of critical area of mState. + //================================ + } + + } + while (keep_looping); + + if (destruct) + { + unref(); + } +} + +AIStateMachine::state_type AIStateMachine::begin_loop(base_state_type base_state) +{ + DoutEntering(dc::statemachine, "AIStateMachine::begin_loop(" << state_str(base_state) << ") [" << (void*)this << "]"); + + sub_state_type_wat sub_state_w(mSubState); + // Honor a subsequent call to idle() (only necessary in bs_multiplex, but it doesn't hurt to reset this flag in other states too). + sub_state_w->skip_idle = false; + // Mark that we're about to honor all previous run requests. + sub_state_w->need_run = false; + // Honor previous calls to advance_state() (once run_state is initialized). + if (base_state == bs_multiplex && sub_state_w->advance_state > sub_state_w->run_state) + { + Dout(dc::statemachine, "Copying advance_state to run_state, because it is larger [" << state_str_impl(sub_state_w->advance_state) << " > " << state_str_impl(sub_state_w->run_state) << "]"); + sub_state_w->run_state = sub_state_w->advance_state; + } +#ifdef SHOW_ASSERT + else + { + // If advance_state wasn't honored then it isn't a reason to run. + // We're running anyway, but that should be because set_state() was called. + mDebugAdvanceStatePending = false; + } +#endif + sub_state_w->advance_state = 0; + +#ifdef SHOW_ASSERT + // Mark that we're running the loop. + mThreadId.reset(); + // This point marks handling cont(). + mDebugShouldRun |= mDebugContPending; + mDebugContPending = false; + // This point also marks handling advance_state(). + mDebugShouldRun |= mDebugAdvanceStatePending; + mDebugAdvanceStatePending = false; +#endif + + // Make a copy of the state that we're about to run. + return sub_state_w->run_state; +} + +void AIStateMachine::run(LLPointer parent, state_type new_parent_state, bool abort_parent, bool on_abort_signal_parent, AIEngine* default_engine) +{ + DoutEntering(dc::statemachine, "AIStateMachine::run(" << + (void*)parent.get() << ", " << + (parent ? parent->state_str_impl(new_parent_state) : "NA") << + ", abort_parent = " << (abort_parent ? "true" : "false") << + ", on_abort_signal_parent = " << (on_abort_signal_parent ? "true" : "false") << + ", default_engine = " << (default_engine ? default_engine->name() : "NULL") << ") [" << (void*)this << "]"); + +#ifdef SHOW_ASSERT + { + multiplex_state_type_rat state_r(mState); + // Can only be run when in one of these states. + llassert(state_r->base_state == bs_reset || state_r->base_state == bs_finish || state_r->base_state == bs_callback); + // Must be the first time we're being run, or we must be called from finish_impl or a callback function. + llassert(!(state_r->base_state == bs_reset && (mParent || mCallback))); + } +#endif + + // Store the requested default engine. + mDefaultEngine = default_engine; + + // Initialize sleep timer. + mSleep = 0; // Allow NULL to be passed as parent to signal that we want to reuse the old one. if (parent) @@ -108,24 +825,31 @@ void AIStateMachine::run(AIStateMachine* parent, state_type new_parent_state, bo // If abort_parent is requested then a parent must be provided. llassert(!abort_parent || mParent); // If a parent is provided, it must be running. - llassert(!mParent || mParent->mState == bs_run); + llassert(!mParent || mParent->running()); - // Mark that run() has been called, in case we're being called from a callback function. - mState = bs_initialize; - - // Set mIdle to false and add statemachine to continued_statemachines. - mSetStateLock.lock(); - locked_cont(); + // Start from the beginning. + reset(); } -void AIStateMachine::run(callback_type::signal_type::slot_type const& slot) +void AIStateMachine::run(callback_type::signal_type::slot_type const& slot, AIEngine* default_engine) { - DoutEntering(dc::statemachine, "AIStateMachine::run() [" << (void*)this << "]"); - // Must be the first time we're being run, or we must be called from a callback function. - llassert(!mParent || mState == bs_callback); - llassert(!mCallback || mState == bs_callback); - // Can only be run when in this state. - llassert(mState == bs_initialize || mState == bs_callback); + DoutEntering(dc::statemachine, "AIStateMachine::run(, default_engine = " << default_engine->name() << ") [" << (void*)this << "]"); + +#ifdef SHOW_ASSERT + { + multiplex_state_type_rat state_r(mState); + // Can only be run when in one of these states. + llassert(state_r->base_state == bs_reset || state_r->base_state == bs_finish || state_r->base_state == bs_callback); + // Must be the first time we're being run, or we must be called from finish_impl or a callback function. + llassert(!(state_r->base_state == bs_reset && (mParent || mCallback))); + } +#endif + + // Store the requested default engine. + mDefaultEngine = default_engine; + + // Initialize sleep timer. + mSleep = 0; // Clean up any old callbacks. mParent = NULL; @@ -135,229 +859,18 @@ void AIStateMachine::run(callback_type::signal_type::slot_type const& slot) mCallback = NULL; } + // Create new call back. mCallback = new callback_type(slot); - // Mark that run() has been called, in case we're being called from a callback function. - mState = bs_initialize; - - // Set mIdle to false and add statemachine to continued_statemachines. - mSetStateLock.lock(); - locked_cont(); + // Start from the beginning. + reset(); } -void AIStateMachine::idle(void) +void AIStateMachine::callback(void) { - DoutEntering(dc::statemachine, "AIStateMachine::idle() [" << (void*)this << "]"); - llassert(is_main_thread()); - llassert(!mIdle); - mIdle = true; - mSleep = 0; -#ifdef SHOW_ASSERT - mCalledThreadUnsafeIdle = true; -#endif -} + DoutEntering(dc::statemachine, "AIStateMachine::callback() [" << (void*)this << "]"); -void AIStateMachine::idle(state_type current_run_state) -{ - DoutEntering(dc::statemachine, "AIStateMachine::idle(" << state_str(current_run_state) << ") [" << (void*)this << "]"); - llassert(is_main_thread()); - llassert(!mIdle); - mSetStateLock.lock(); - // Only go idle if the run state is (still) what we expect it to be. - // Otherwise assume that another thread called set_state() and continue running. - if (current_run_state == mRunState) - { - mIdle = true; - mSleep = 0; - } - mSetStateLock.unlock(); -} - -// About thread safeness: -// -// The main thread initializes a statemachine and calls run, so a statemachine -// runs in the main thread. However, it is allowed that a state calls idle(current_state) -// and then allows one or more other threads to call cont() upon some -// event (only once, of course, as idle() has to be called before cont() -// can be called again-- and a non-main thread is not allowed to call idle()). -// Instead of cont() one may also call set_state(). -// Of course, this may give rise to a race condition; if that happens then -// the thread that calls cont() (set_state()) first is serviced, and the other -// thread(s) are ignored, as if they never called cont(). -void AIStateMachine::locked_cont(void) -{ - DoutEntering(dc::statemachine, "AIStateMachine::locked_cont() [" << (void*)this << "]"); - llassert(mIdle); - // Atomic test mActive and change mIdle. - mIdleActive.lock(); -#ifdef SHOW_ASSERT - mContThread.reset(); -#endif - mIdle = false; - bool not_active = mActive == as_idle; - mIdleActive.unlock(); - // mActive is only changed in AIStateMachine::mainloop, by the main-thread, and - // here, possibly by any thread. However, after setting mIdle to false above, it - // is impossible for any thread to come here, until after the main-thread called - // idle(). So, if this is the main thread then that certainly isn't going to - // happen until we left this function, while if this is another thread and the - // state machine is already running in the main thread then not_active is false - // and we're already at the end of this function. - // If not_active is true then main-thread is not running this statemachine. - // It might call cont() (or set_state()) but never locked_cont(), and will never - // start actually running until we are done here and release the lock on - // sContinuedStateMachinesAndMainloopEnabled again. It is therefore safe - // to release mSetStateLock here, with as advantage that if we're not the main- - // thread and not_active is true, then the main-thread won't block when it has - // a timer running that times out and calls set_state(). - mSetStateLock.unlock(); - if (not_active) - { - AIWriteAccess csme_w(sContinuedStateMachinesAndMainloopEnabled); - // See above: it is not possible that mActive was changed since not_active - // was set to true above. - llassert_always(mActive == as_idle); - Dout(dc::statemachine, "Adding " << (void*)this << " to continued_statemachines"); - csme_w->continued_statemachines.push_back(this); - if (!csme_w->mainloop_enabled) - { - Dout(dc::statemachine, "Activating AIStateMachine::mainloop."); - csme_w->mainloop_enabled = true; - } - mActive = as_queued; - llassert_always(!mIdle); // It should never happen that the main thread calls idle(), while another thread calls cont() concurrently. - } -} - -void AIStateMachine::set_state(state_type state) -{ - DoutEntering(dc::statemachine, "AIStateMachine::set_state(" << state_str(state) << ") [" << (void*)this << "]"); - - // Stop race condition of multiple threads calling cont() or set_state() here. - mSetStateLock.lock(); - - // Do not call set_state() unless running. - llassert(mState == bs_run || !is_main_thread()); - - // If this function is called from another thread than the main thread, then we have to ignore - // it if we're not idle and the state is less than the current state. The main thread must - // be able to change the state to anything (also smaller values). Note that that only can work - // if the main thread itself at all times cancels thread callbacks that call set_state() - // before calling idle() again! - // - // Thus: main thead calls idle(), and tells one or more threads to do callbacks on events, - // which (might) call set_state(). If the main thread calls set_state first (currently only - // possible as a result of the use of a timer) it will set mIdle to false (here) then cancel - // the call backs from the other threads and only then call idle() again. - // Thus if you want other threads get here while mIdle is false to be ignored then the - // main thread should use a large value for the new run state. - // - // If a non-main thread calls set_state first, then the state is changed but the main thread - // can still override it if it calls set_state before handling the new state; in the latter - // case it would still be as if the call from the non-main thread was ignored. - // - // Concurrent calls from non-main threads however, always result in the largest state - // to prevail. - - // If the state machine is already running, and we are not the main-thread and the new - // state is less than the current state, ignore it. - // Also, if abort() or finish() was called, then we should just ignore it. - if (mState != bs_run || - (!mIdle && state <= mRunState && !AIThreadID::in_main_thread())) - { -#ifdef SHOW_ASSERT - // It's a bit weird if the same thread does two calls on a row where the second call - // has a smaller value: warn about that. - if (mState == bs_run && mContThread.equals_current_thread()) - { - llwarns << "Ignoring call to set_state(" << state_str(state) << - ") by non-main thread before main-thread could react on previous call, " - "because new state is smaller than old state (" << state_str(mRunState) << ")." << llendl; - } -#endif - mSetStateLock.unlock(); - return; // Ignore. - } - - // Do not call idle() when set_state is called from another thread; use idle(state_type) instead. - llassert(!mCalledThreadUnsafeIdle || is_main_thread()); - - // Change mRunState to the requested value. - if (mRunState != state) - { - mRunState = state; - Dout(dc::statemachine, "mRunState set to " << state_str(mRunState)); - } - - // Continue the state machine if appropriate. - if (mIdle) - locked_cont(); // This unlocks mSetStateLock. - else - mSetStateLock.unlock(); - - // If we get here then mIdle is false, so only mRunState can still be changed but we won't - // call locked_cont() anymore. When the main thread finally picks up on the state change, - // it will cancel any possible callbacks from other threads and process the largest state - // that this function was called with in the meantime. -} - -void AIStateMachine::abort(void) -{ - DoutEntering(dc::statemachine, "AIStateMachine::abort() [" << (void*)this << "]"); - // It's possible that abort() is called before calling AIStateMachine::multiplex. - // In that case the statemachine wasn't initialized yet and we should just kill() it. - if (LL_UNLIKELY(mState == bs_initialize)) - { - // It's ok to use the thread-unsafe idle() here, because if the statemachine - // wasn't started yet, then other threads won't call set_state() on it. - if (!mIdle) - idle(); - // run() calls locked_cont() after which the top of the mainloop adds this - // state machine to active_statemachines. Therefore, if the following fails - // then either the same statemachine called run() immediately followed by abort(), - // which is not allowed; or there were two active statemachines running, - // the first created a new statemachine and called run() on it, and then - // the other (before reaching the top of the mainloop) called abort() on - // that freshly created statemachine. Obviously, this is highly unlikely, - // but if that is the case then here we bump the statemachine into - // continued_statemachines to prevent kill() to delete this statemachine: - // the caller of abort() does not expect that. - if (LL_UNLIKELY(mActive == as_idle)) - { - mSetStateLock.lock(); - locked_cont(); - idle(); - } - kill(); - } - else - { - llassert(mState == bs_run); - mSetStateLock.lock(); - mState = bs_abort; // Causes additional calls to set_state to be ignored. - mSetStateLock.unlock(); - abort_impl(); - mAborted = true; - finish(); - } -} - -void AIStateMachine::finish(void) -{ - DoutEntering(dc::statemachine, "AIStateMachine::finish() [" << (void*)this << "]"); - mSetStateLock.lock(); - llassert(mState == bs_run || mState == bs_abort); - // It is possible that mIdle is true when abort or finish was called from - // outside multiplex_impl. However, that only may be done by the main thread. - llassert(!mIdle || is_main_thread()); - if (!mIdle) - idle(); // After calling this, we don't want other threads to call set_state() anymore. - mState = bs_finish; // Causes additional calls to set_state to be ignored. - mSetStateLock.unlock(); - finish_impl(); - // Did finish_impl call kill()? Then that is only the default. Remember it. - bool default_delete = (mState == bs_killed); - mState = bs_finish; + bool aborted = sub_state_type_rat(mSubState)->aborted; if (mParent) { // It is possible that the parent is not running when the parent is in fact aborting and called @@ -365,26 +878,21 @@ void AIStateMachine::finish(void) // call abort again (or change it's state). if (mParent->running()) { - if (mAborted && mAbortParent) + if (aborted && mAbortParent) { mParent->abort(); mParent = NULL; } - else if (!mAborted || mOnAbortSignalParent) + else if (!aborted || mOnAbortSignalParent) { - mParent->set_state(mNewParentState); + mParent->advance_state(mNewParentState); } } } - // After this (bool)*this evaluates to true and we can call the callback, which then is allowed to call run(). - mState = bs_callback; if (mCallback) { - // This can/may call kill() that sets mState to bs_kill and in which case the whole AIStateMachine - // will be deleted from the mainloop, or it may call run() that sets mState is set to bs_initialize - // and might change or reuse mCallback or mParent. - mCallback->callback(!mAborted); - if (mState != bs_initialize) + mCallback->callback(!aborted); + if (multiplex_state_type_rat(mState)->base_state != bs_reset) { delete mCallback; mCallback = NULL; @@ -396,233 +904,376 @@ void AIStateMachine::finish(void) // Not restarted by callback. Allow run() to be called later on. mParent = NULL; } - // Fix the final state. - if (mState == bs_callback) - mState = default_delete ? bs_killed : bs_initialize; - if (mState == bs_killed && mActive == as_idle) - { - // Bump the statemachine onto the active statemachine list, or else it won't be deleted. - mSetStateLock.lock(); - locked_cont(); - idle(); - } } void AIStateMachine::kill(void) { DoutEntering(dc::statemachine, "AIStateMachine::kill() [" << (void*)this << "]"); - // Should only be called from finish() (or when not running (bs_initialize)). - // However, also allow multiple calls to kill() on a row (bs_killed) (which effectively don't do anything). - llassert(mIdle && (mState == bs_callback || mState == bs_finish || mState == bs_initialize || mState == bs_killed)); - base_state_type prev_state = mState; - mState = bs_killed; - if (prev_state == bs_initialize && mActive == as_idle) +#ifdef SHOW_ASSERT { - // We're not running (ie being deleted by a parent statemachine), delete it immediately. - delete this; + multiplex_state_type_rat state_r(mState); + // kill() may only be called from the call back function. + llassert(state_r->base_state == bs_callback); + // May only be called by the thread that is holding mMultiplexMutex. + llassert(mThreadId.equals_current_thread()); + } +#endif + sub_state_type_wat sub_state_w(mSubState); + // Void last call to run() (ie from finish_impl()), if any. + sub_state_w->reset = false; +} + +void AIStateMachine::reset() +{ + DoutEntering(dc::statemachine, "AIStateMachine::reset() [" << (void*)this << "]"); +#ifdef SHOW_ASSERT + mDebugAborted = false; + mDebugContPending = false; + mDebugSetStatePending = false; + mDebugRefCalled = false; +#endif + mRuntime = 0; + bool inside_multiplex; + { + multiplex_state_type_rat state_r(mState); + // reset() is only called from run(), which may only be called when just created, from finish_impl() or from the call back function. + llassert(state_r->base_state == bs_reset || state_r->base_state == bs_finish || state_r->base_state == bs_callback); + inside_multiplex = state_r->base_state != bs_reset; + } + { + sub_state_type_wat sub_state_w(mSubState); + // Reset. + sub_state_w->aborted = sub_state_w->finished = false; + // Signal that we want to start running from the beginning. + sub_state_w->reset = true; + // Start running. + sub_state_w->idle = false; + // Keep running till we reach at least bs_multiplex. + sub_state_w->need_run = true; + } + if (!inside_multiplex) + { + // Kick start the state machine. + multiplex(initial_run); } } -// Return stringified 'state'. -char const* AIStateMachine::state_str(state_type state) +void AIStateMachine::set_state(state_type new_state) { - if (state >= min_state && state < max_state) + DoutEntering(dc::statemachine, "AIStateMachine::set_state(" << state_str_impl(new_state) << ") [" << (void*)this << "]"); +#ifdef SHOW_ASSERT { - switch (state) + multiplex_state_type_rat state_r(mState); + // set_state() may only be called from initialize_impl() or multiplex_impl(). + llassert(state_r->base_state == bs_initialize || state_r->base_state == bs_multiplex); + // May only be called by the thread that is holding mMultiplexMutex. If this fails, you probably called set_state() by accident instead of advance_state(). + llassert(mThreadId.equals_current_thread()); + } +#endif + sub_state_type_wat sub_state_w(mSubState); + // Force current state to the requested state. + sub_state_w->run_state = new_state; + // Void last call to advance_state. + sub_state_w->advance_state = 0; + // Void last call to idle(), if any. + sub_state_w->idle = false; + // Honor a subsequent call to idle(). + sub_state_w->skip_idle = false; +#ifdef SHOW_ASSERT + // We should run. This can only be cancelled by a call to idle(). + mDebugSetStatePending = true; +#endif +} + +void AIStateMachine::advance_state(state_type new_state) +{ + DoutEntering(dc::statemachine, "AIStateMachine::advance_state(" << state_str_impl(new_state) << ") [" << (void*)this << "]"); + { + sub_state_type_wat sub_state_w(mSubState); + // Ignore call to advance_state when the currently queued state is already greater or equal to the requested state. + if (sub_state_w->advance_state >= new_state) { - AI_CASE_RETURN(bs_initialize); - AI_CASE_RETURN(bs_run); - AI_CASE_RETURN(bs_abort); - AI_CASE_RETURN(bs_finish); - AI_CASE_RETURN(bs_callback); - AI_CASE_RETURN(bs_killed); + Dout(dc::statemachine, "Ignored, because " << state_str_impl(sub_state_w->advance_state) << " >= " << state_str_impl(new_state) << "."); + return; + } + // Increment state. + sub_state_w->advance_state = new_state; + // Void last call to idle(), if any. + sub_state_w->idle = false; + // Ignore a call to idle if it occurs before we leave multiplex_impl(). + sub_state_w->skip_idle = true; + // Mark that a re-entry of multiplex() is necessary. + sub_state_w->need_run = true; +#ifdef SHOW_ASSERT + // From this moment on. + mDebugAdvanceStatePending = true; +#endif + } + if (!mMultiplexMutex.isSelfLocked()) + { + multiplex(schedule_run); + } +} + +void AIStateMachine::idle(void) +{ + DoutEntering(dc::statemachine, "AIStateMachine::idle() [" << (void*)this << "]"); +#ifdef SHOW_ASSERT + { + multiplex_state_type_rat state_r(mState); + // idle() may only be called from initialize_impl() or multiplex_impl(). + llassert(state_r->base_state == bs_multiplex || state_r->base_state == bs_initialize); + // May only be called by the thread that is holding mMultiplexMutex. + llassert(mThreadId.equals_current_thread()); + } + // idle() following set_state() cancels the reason to run because of the call to set_state. + mDebugSetStatePending = false; +#endif + sub_state_type_wat sub_state_w(mSubState); + // As idle may only be called from within the state machine, it should never happen that the state machine is already idle. + llassert(!sub_state_w->idle); + // Ignore call to idle() when advance_state() was called since last call to set_state(). + if (sub_state_w->skip_idle) + { + Dout(dc::statemachine, "Ignored, because skip_idle is true (advance_state() was called last)."); + return; + } + // Mark that we are idle. + sub_state_w->idle = true; + // Not sleeping (anymore). + mSleep = 0; +} + +void AIStateMachine::cont(void) +{ + DoutEntering(dc::statemachine, "AIStateMachine::cont() [" << (void*)this << "]"); + { + sub_state_type_wat sub_state_w(mSubState); + // Void last call to idle(), if any. + sub_state_w->idle = false; + // Mark that a re-entry of multiplex() is necessary. + sub_state_w->need_run = true; +#ifdef SHOW_ASSERT + // From this moment. + mDebugContPending = true; +#endif + } + if (!mMultiplexMutex.isSelfLocked()) + { + multiplex(schedule_run); + } +} + +void AIStateMachine::abort(void) +{ + DoutEntering(dc::statemachine, "AIStateMachine::abort() [" << (void*)this << "]"); + bool is_waiting = false; + { + multiplex_state_type_rat state_r(mState); + sub_state_type_wat sub_state_w(mSubState); + // Mark that we are aborted, iff we didn't already finish. + sub_state_w->aborted = !sub_state_w->finished; + // Mark that a re-entry of multiplex() is necessary. + sub_state_w->need_run = true; + // Schedule a new run when this state machine is waiting. + is_waiting = state_r->base_state == bs_multiplex && sub_state_w->idle; + } + if (is_waiting && !mMultiplexMutex.isSelfLocked()) + { + multiplex(insert_abort); + } + // Block until the current run finished. + if (!mRunMutex.tryLock()) + { + llwarns << "AIStateMachine::abort() blocks because the statemachine is still executing code in another thread." << llendl; + mRunMutex.lock(); + } + mRunMutex.unlock(); +#ifdef SHOW_ASSERT + // When abort() returns, it may never run again. + mDebugAborted = true; +#endif +} + +void AIStateMachine::finish(void) +{ + DoutEntering(dc::statemachine, "AIStateMachine::finish() [" << (void*)this << "]"); +#ifdef SHOW_ASSERT + { + multiplex_state_type_rat state_r(mState); + // finish() may only be called from multiplex_impl(). + llassert(state_r->base_state == bs_multiplex); + // May only be called by the thread that is holding mMultiplexMutex. + llassert(mThreadId.equals_current_thread()); + } +#endif + sub_state_type_wat sub_state_w(mSubState); + // finish() should not be called when idle. + llassert(!sub_state_w->idle); + // Mark that we are finished. + sub_state_w->finished = true; +} + +void AIStateMachine::yield(void) +{ + DoutEntering(dc::statemachine, "AIStateMachine::yield() [" << (void*)this << "]"); + multiplex_state_type_rat state_r(mState); + // yield() may only be called from multiplex_impl(). + llassert(state_r->base_state == bs_multiplex); + // May only be called by the thread that is holding mMultiplexMutex. + llassert(mThreadId.equals_current_thread()); + // Set mYieldEngine to the best non-NUL value. + mYieldEngine = state_r->current_engine ? state_r->current_engine : (mDefaultEngine ? mDefaultEngine : &gStateMachineThreadEngine); +} + +void AIStateMachine::yield(AIEngine* engine) +{ + llassert(engine); + DoutEntering(dc::statemachine, "AIStateMachine::yield(" << engine->name() << ") [" << (void*)this << "]"); +#ifdef SHOW_ASSERT + { + multiplex_state_type_rat state_r(mState); + // yield() may only be called from multiplex_impl(). + llassert(state_r->base_state == bs_multiplex); + // May only be called by the thread that is holding mMultiplexMutex. + llassert(mThreadId.equals_current_thread()); + } +#endif + mYieldEngine = engine; +} + +void AIStateMachine::yield_frame(unsigned int frames) +{ + DoutEntering(dc::statemachine, "AIStateMachine::yield_frame(" << frames << ") [" << (void*)this << "]"); + mSleep = -(S64)frames; + // Sleeping is always done from the main thread. + yield(&gMainThreadEngine); +} + +void AIStateMachine::yield_ms(unsigned int ms) +{ + DoutEntering(dc::statemachine, "AIStateMachine::yield_ms(" << ms << ") [" << (void*)this << "]"); + mSleep = get_clock_count() + calc_clock_frequency() * ms / 1000; + // Sleeping is always done from the main thread. + yield(&gMainThreadEngine); +} + +char const* AIStateMachine::state_str(base_state_type state) +{ + switch(state) + { + AI_CASE_RETURN(bs_reset); + AI_CASE_RETURN(bs_initialize); + AI_CASE_RETURN(bs_multiplex); + AI_CASE_RETURN(bs_abort); + AI_CASE_RETURN(bs_finish); + AI_CASE_RETURN(bs_callback); + AI_CASE_RETURN(bs_killed); + } + llassert(false); + return "UNKNOWN BASE STATE"; +} + +AIEngine gMainThreadEngine("gMainThreadEngine"); +AIEngine gStateMachineThreadEngine("gStateMachineThreadEngine"); + +// State Machine Thread main loop. +void AIEngine::threadloop(void) +{ + queued_type::iterator queued_element, end; + { + engine_state_type_wat engine_state_w(mEngineState); + end = engine_state_w->list.end(); + queued_element = engine_state_w->list.begin(); + if (queued_element == end) + { + // Nothing to do. Wait till something is added to the queue again. + engine_state_w->waiting = true; + engine_state_w.wait(); + engine_state_w->waiting = false; + return; } } - return state_str_impl(state); -} - -//---------------------------------------------------------------------------- -// -// Private methods -// - -void AIStateMachine::multiplex(U64 current_time) -{ - // Return immediately when this state machine is sleeping. - // A negative value of mSleep means we're counting frames, - // a positive value means we're waiting till a certain - // amount of time has passed. - if (mSleep != 0) + do { - if (mSleep < 0) + AIStateMachine& state_machine(queued_element->statemachine()); + state_machine.multiplex(AIStateMachine::normal_run); + bool active = state_machine.active(this); // This locks mState shortly, so it must be called before locking mEngineState because add() locks mEngineState while holding mState. + engine_state_type_wat engine_state_w(mEngineState); + if (!active) { - if (++mSleep) - return; + Dout(dc::statemachine, "Erasing state machine [" << (void*)&state_machine << "] from " << mName); + engine_state_w->list.erase(queued_element++); } else { - if (current_time < (U64)mSleep) - return; - mSleep = 0; + ++queued_element; } } - - DoutEntering(dc::statemachine, "AIStateMachine::multiplex() [" << (void*)this << "] [with state: " << state_str(mState == bs_run ? mRunState : mState) << "]"); - llassert(mState == bs_initialize || mState == bs_run); - - // Real state machine starts here. - if (mState == bs_initialize) - { - mAborted = false; - mState = bs_run; - initialize_impl(); - if (mAborted || mState != bs_run) - return; - } - multiplex_impl(); + while (queued_element != end); } +void AIEngine::wake_up(void) +{ + engine_state_type_wat engine_state_w(mEngineState); + if (engine_state_w->waiting) + { + engine_state_w.signal(); + } +} + +//----------------------------------------------------------------------------- +// AIEngineThread + +class AIEngineThread : public LLThread +{ + public: + static AIEngineThread* sInstance; + bool volatile mRunning; + + public: + // MAIN-THREAD + AIEngineThread(void); + virtual ~AIEngineThread(); + + protected: + virtual void run(void); +}; + //static -void AIStateMachine::add_continued_statemachines(AIReadAccess& csme_r) +AIEngineThread* AIEngineThread::sInstance; + +AIEngineThread::AIEngineThread(void) : LLThread("AIEngineThread"), mRunning(true) { - bool nonempty = false; - for (continued_statemachines_type::const_iterator iter = csme_r->continued_statemachines.begin(); iter != csme_r->continued_statemachines.end(); ++iter) - { - nonempty = true; - active_statemachines.push_back(QueueElement(*iter)); - Dout(dc::statemachine, "Adding " << (void*)*iter << " to active_statemachines"); - (*iter)->mActive = as_active; - } - if (nonempty) - AIWriteAccess(csme_r)->continued_statemachines.clear(); } -// static -void AIStateMachine::dowork(void) +AIEngineThread::~AIEngineThread(void) { - llassert(!active_statemachines.empty()); - // Run one or more state machines. - U64 total_clocks = 0; - for (active_statemachines_type::iterator iter = active_statemachines.begin(); iter != active_statemachines.end(); ++iter) +} + +void AIEngineThread::run(void) +{ + while(mRunning) { - AIStateMachine& statemachine(iter->statemachine()); - if (!statemachine.mIdle) - { - U64 start = get_clock_count(); - // This might call idle() and then pass the statemachine to another thread who then may call cont(). - // Hence, after this isn't not sure what mIdle is, and it can change from true to false at any moment, - // if it is true after this function returns. - statemachine.multiplex(start); - U64 delta = get_clock_count() - start; - iter->add(delta); - total_clocks += delta; - if (total_clocks >= sMaxCount) - { -#ifndef LL_RELEASE_FOR_DOWNLOAD - llwarns << "AIStateMachine::mainloop did run for " << (total_clocks * 1000 / calc_clock_frequency()) << " ms." << llendl; -#endif - std::sort(active_statemachines.begin(), active_statemachines.end(), QueueElementComp()); - break; - } - } - } - // Remove idle state machines from the loop. - active_statemachines_type::iterator iter = active_statemachines.begin(); - while (iter != active_statemachines.end()) - { - AIStateMachine& statemachine(iter->statemachine()); - // Atomic test mIdle and change mActive. - bool locked = statemachine.mIdleActive.tryLock(); - // If the lock failed, then another thread is in the middle of calling cont(), - // thus mIdle will end up false. So, there is no reason to block here; just - // treat mIdle as false already. - if (locked && statemachine.mIdle) - { - // Without the lock, it would be possible that another thread called cont() right here, - // changing mIdle to false again but NOT adding the statemachine to continued_statemachines, - // thinking it is in active_statemachines (and it is), while immediately below it is - // erased from active_statemachines. - statemachine.mActive = as_idle; - // Now, calling cont() is ok -- as that will cause the statemachine to be added to - // continued_statemachines, so it's fine in that case-- even necessary-- to remove it from - // active_statemachines regardless, and we can release the lock here. - statemachine.mIdleActive.unlock(); - Dout(dc::statemachine, "Erasing " << (void*)&statemachine << " from active_statemachines"); - iter = active_statemachines.erase(iter); - if (statemachine.mState == bs_killed) - { - Dout(dc::statemachine, "Deleting " << (void*)&statemachine); - delete &statemachine; - } - } - else - { - if (locked) - { - statemachine.mIdleActive.unlock(); - } - llassert(statemachine.mActive == as_active); // It should not be possible that another thread called cont() and changed this when we are we are not idle. - llassert(statemachine.mState == bs_run || statemachine.mState == bs_initialize); - ++iter; - } - } - if (active_statemachines.empty()) - { - // If this was the last state machine, remove mainloop from the IdleCallbacks. - AIReadAccess csme_r(sContinuedStateMachinesAndMainloopEnabled, true); - if (csme_r->continued_statemachines.empty() && csme_r->mainloop_enabled) - { - Dout(dc::statemachine, "Deactivating AIStateMachine::mainloop: no active state machines left."); - AIWriteAccess(csme_r)->mainloop_enabled = false; - } + gStateMachineThreadEngine.threadloop(); } } -// static -void AIStateMachine::flush(void) +void startEngineThread(void) { - DoutEntering(dc::curl, "AIStateMachine::flush(void)"); - { - AIReadAccess csme_r(sContinuedStateMachinesAndMainloopEnabled); - add_continued_statemachines(csme_r); - } - // Abort all state machines. - for (active_statemachines_type::iterator iter = active_statemachines.begin(); iter != active_statemachines.end(); ++iter) - { - AIStateMachine& statemachine(iter->statemachine()); - if (statemachine.abortable()) - { - // We can't safely call abort() here for non-running (run() was called, but they weren't initialized yet) statemachines, - // because that might call kill() which in some cases is undesirable (ie, when it is owned by a partent that will - // also call abort() on it when it is aborted itself). - if (statemachine.running()) - statemachine.abort(); - else - statemachine.idle(); // Stop the statemachine from starting, in the next loop with batch == 0. - } - } - for (int batch = 0;; ++batch) - { - // Run mainloop until all state machines are idle (batch == 0) or deleted (batch == 1). - for(;;) - { - { - AIReadAccess csme_r(sContinuedStateMachinesAndMainloopEnabled); - if (!csme_r->mainloop_enabled) - break; - } - mainloop(); - } - if (batch == 1) - break; - { - AIReadAccess csme_r(sContinuedStateMachinesAndMainloopEnabled); - add_continued_statemachines(csme_r); - } - } - // At this point all statemachines should be idle. - AIReadAccess csme_r(sContinuedStateMachinesAndMainloopEnabled); - llinfos << "Current number of continued statemachines: " << csme_r->continued_statemachines.size() << llendl; - llinfos << "Current number of active statemachines: " << active_statemachines.size() << llendl; - llassert(csme_r->continued_statemachines.empty() && active_statemachines.empty()); + AIEngineThread::sInstance = new AIEngineThread; + AIEngineThread::sInstance->start(); } + +void stopEngineThread(void) +{ + AIEngineThread::sInstance->mRunning = false; + gStateMachineThreadEngine.wake_up(); + int count = 401; + while(--count && !AIEngineThread::sInstance->isStopped()) + { + ms_sleep(10); + } + llinfos << "State machine thread" << (!AIEngineThread::sInstance->isStopped() ? " not" : "") << " stopped after " << ((400 - count) * 10) << "ms." << llendl; +} + diff --git a/indra/aistatemachine/aistatemachine.h b/indra/aistatemachine/aistatemachine.h index 9048260ba..dffd93c7d 100644 --- a/indra/aistatemachine/aistatemachine.h +++ b/indra/aistatemachine/aistatemachine.h @@ -2,7 +2,7 @@ * @file aistatemachine.h * @brief State machine base class * - * Copyright (c) 2010, Aleric Inglewood. + * Copyright (c) 2010 - 2013, Aleric Inglewood. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,397 +26,290 @@ * * 01/03/2010 * Initial version, written by Aleric Inglewood @ SL + * + * 28/02/2013 + * Rewritten from scratch to fully support threading. */ #ifndef AISTATEMACHINE_H #define AISTATEMACHINE_H #include "aithreadsafe.h" -#include "lltimer.h" +#include +#include #include -//! -// A AIStateMachine is a base class that allows derived classes to -// go through asynchronous states, while the code still appears to -// be more or less sequential. -// -// These state machine objects can be reused to build more complex -// objects. -// -// It is important to note that each state has a duality: the object -// can have a state that will cause a corresponding function to be -// called; and often that function will end with changing the state -// again, to signal that it was handled. It is easy to confuse the -// function of a state with the state at the end of the function. -// For example, the state "initialize" could cause the member -// function 'init()' to be called, and at the end one would be -// inclined to set the state to "initialized". However, this is the -// wrong approach: the correct use of state names does reflect the -// functions that will be called, never the function that just was -// called. -// -// Each (derived) class goes through a series of states as follows: -// -// Creation -// | -// v -// (idle) <----. Idle until run() is called. -// | | -// Initialize | Calls initialize_impl(). -// | | -// | (idle) | Idle until cont() or set_state() is called. -// | | ^ | -// v v | | -// .-------. | | -// | Run |_, | Call multiplex_impl() until idle(), abort() or finish() is called. -// '-------' | -// | | | -// v | | -// Abort | | Calls abort_impl(). -// | | | -// v v | -// Finish | Calls finish_impl() (which may call kill()) or -// | | | the callback function passed to run(), if any, -// | v | -// | Callback | which may call kill() and/or run(). -// | | | | -// | | `-----' -// v v -// Killed Delete the statemachine (all statemachines must be allocated with new). -// -// Each state causes corresponding code to be called. -// Finish cleans up whatever is done by Initialize. -// Abort should clean up additional things done by Run. -// -// The Run state is entered by calling run(). -// -// While the base class is in the Run state, it is the derived class -// that goes through different states. The state variable of the derived -// class is only valid while the base class is in the state Run. -// -// A derived class can exit the Run state by calling one of two methods: -// abort() in case of failure, or finish() in case of success. -// Respectively these set the state to Abort and Finish. -// -// finish_impl may call kill() for a (default) destruction upon finish. -// Even in that case the callback (passed to run()) may call run() again, -// which overrides the request for a default kill. Or, if finish_impl -// doesn't call kill() the callback may call kill() to request the -// destruction of the state machine object. -// -// State machines are run from the "idle" part of the viewer main loop. -// Often a state machine has nothing to do however. In that case it can -// call the method idle(). This will stop the state machine until -// external code changes it's state (by calling set_state()), or calls -// cont() to continue with the last state. -// -// The methods of the derived class call set_state() to change their -// own state within the bs_run state, or by calling either abort() -// or finish(). -// -// Restarting a finished state machine can also be done by calling run(), -// which will cause a re-initialize. -// -// Derived classes should implement the following constants: -// -// static state_type const min_state = first_state; -// static state_type const max_state = last_state + 1; -// -// Where first_state should be equal to BaseClass::max_state. -// These should represent the minimum and (one past) the maximum -// values of mRunState. -// -// virtual void initialize_impl(void) -// -// Initializes the derived class. -// -// virtual void multiplex_impl(void); -// -// This method should handle mRunState in a switch. -// For example: -// -// switch(mRunState) -// { -// case foo: -// handle_foo(); -// break; -// case wait_state: -// if (still_waiting()) -// { -// idle(); -// break; -// } -// set_state(working); -// /*fall-through*/ -// case working: -// do_work(); -// if (failure()) -// abort(); -// break; -// case etc: -// etc(); -// finish(); -// break; -// } -// -// virtual void abort_impl(void); -// -// A call to this method should bring the object to a state -// where finish_impl() can be called. -// -// virtual void finish_impl(void); -// -// Should cleanup whatever init_impl() did, or any of the -// states of the object where multiplex_impl() calls finish(). -// Call kill() from here to make that the default behavior -// (state machine is deleted unless the callback calls run()). -// -// virtual char const* state_str_impl(state_type run_state); -// -// Should return a stringified value of run_state. -// -class AIStateMachine { - //! The type of mState +class AIStateMachine; + +class AIEngine +{ + private: + struct QueueElementComp; + class QueueElement { + private: + LLPointer mStateMachine; + + public: + QueueElement(AIStateMachine* statemachine) : mStateMachine(statemachine) { } + friend bool operator==(QueueElement const& e1, QueueElement const& e2) { return e1.mStateMachine == e2.mStateMachine; } + friend bool operator!=(QueueElement const& e1, QueueElement const& e2) { return e1.mStateMachine != e2.mStateMachine; } + friend struct QueueElementComp; + + AIStateMachine const& statemachine(void) const { return *mStateMachine; } + AIStateMachine& statemachine(void) { return *mStateMachine; } + }; + struct QueueElementComp { + inline bool operator()(QueueElement const& e1, QueueElement const& e2) const; + }; + + public: + typedef std::list queued_type; + struct engine_state_type { + queued_type list; + bool waiting; + engine_state_type(void) : waiting(false) { } + }; + + private: + AIThreadSafeSimpleDC mEngineState; + typedef AIAccessConst engine_state_type_crat; + typedef AIAccess engine_state_type_rat; + typedef AIAccess engine_state_type_wat; + char const* mName; + + static U64 sMaxCount; + + public: + AIEngine(char const* name) : mName(name) { } + + void add(AIStateMachine* state_machine); + + void mainloop(void); + void threadloop(void); + void wake_up(void); + void flush(void); + + char const* name(void) const { return mName; } + + static void setMaxCount(F32 StateMachineMaxTime); +}; + +extern AIEngine gMainThreadEngine; +extern AIEngine gStateMachineThreadEngine; + +class AIStateMachine : public LLThreadSafeRefCount +{ + public: + typedef U32 state_type; //!< The type of run_state + + protected: + // The type of event that causes multiplex() to be called. + enum event_type { + initial_run, + schedule_run, + normal_run, + insert_abort + }; + // The type of mState enum base_state_type { - bs_initialize, - bs_run, + bs_reset, // Idle state before run() is called. Reference count is zero (except for a possible external LLPointer). + bs_initialize, // State after run() and before/during initialize_impl(). + bs_multiplex, // State after initialize_impl() before finish() or abort(). bs_abort, bs_finish, bs_callback, bs_killed }; - //! The type of mActive - enum active_type { - as_idle, // State machine is on neither list. - as_queued, // State machine is on continued_statemachines list. - as_active // State machine is on active_statemachines list. - }; - - //! Type of continued_statemachines. - typedef std::vector continued_statemachines_type; - //! Type of sContinuedStateMachinesAndMainloopEnabled. - struct csme_type - { - continued_statemachines_type continued_statemachines; - bool mainloop_enabled; - }; - public: - typedef U32 state_type; //!< The type of mRunState - - //! Integral value equal to the state with the lowest value. - static state_type const min_state = bs_initialize; - //! Integral value one more than the state with the highest value. static state_type const max_state = bs_killed + 1; + protected: + struct multiplex_state_type { + base_state_type base_state; + AIEngine* current_engine; // Current engine. + multiplex_state_type(void) : base_state(bs_reset), current_engine(NULL) { } + }; + struct sub_state_type { + state_type run_state; + state_type advance_state; + bool reset; + bool need_run; + bool idle; + bool skip_idle; + bool aborted; + bool finished; + }; + private: - base_state_type mState; //!< State of the base class. - bool mIdle; //!< True if this state machine is not running. - bool mAborted; //!< True after calling abort() and before calling run(). - active_type mActive; //!< Whether statemachine is idle, queued to be added to the active list, or already on the active list. - S64 mSleep; //!< Non-zero while the state machine is sleeping. - LLMutex mIdleActive; //!< Used for atomic operations on the pair mIdle / mActive. -#ifdef SHOW_ASSERT - AIThreadID mContThread; //!< Thread that last called locked_cont(). - bool mCalledThreadUnsafeIdle; //!< Set to true when idle() is called. -#endif + // Base state. + AIThreadSafeSimpleDC mState; + typedef AIAccessConst multiplex_state_type_crat; + typedef AIAccess multiplex_state_type_rat; + typedef AIAccess multiplex_state_type_wat; + // Sub state. + AIThreadSafeSimpleDC mSubState; + typedef AIAccessConst sub_state_type_crat; + typedef AIAccess sub_state_type_rat; + typedef AIAccess sub_state_type_wat; + + // Mutex protecting everything below and making sure only one thread runs the state machine at a time. + LLMutex mMultiplexMutex; + // Mutex that is locked while calling *_impl() functions and the call back. + LLMutex mRunMutex; + + S64 mSleep; //!< Non-zero while the state machine is sleeping. // Callback facilities. // From within an other state machine: - AIStateMachine* mParent; //!< The parent object that started this state machine, or NULL if there isn't any. - state_type mNewParentState; //!< The state at which the parent should continue upon a successful finish. - bool mAbortParent; //!< If true, abort parent on abort(). Otherwise continue as normal. - bool mOnAbortSignalParent; //!< If true and mAbortParent is false, change state of parent even on abort. + LLPointer mParent; // The parent object that started this state machine, or NULL if there isn't any. + state_type mNewParentState; // The state at which the parent should continue upon a successful finish. + bool mAbortParent; // If true, abort parent on abort(). Otherwise continue as normal. + bool mOnAbortSignalParent; // If true and mAbortParent is false, change state of parent even on abort. // From outside a state machine: struct callback_type { - typedef boost::signals2::signal signal_type; - callback_type(signal_type::slot_type const& slot) { connection = signal.connect(slot); } - ~callback_type() { connection.disconnect(); } - void callback(bool success) const { signal(success); } - private: - boost::signals2::connection connection; - signal_type signal; + typedef boost::signals2::signal signal_type; + callback_type(signal_type::slot_type const& slot) { connection = signal.connect(slot); } + ~callback_type() { connection.disconnect(); } + void callback(bool success) const { signal(success); } + private: + boost::signals2::connection connection; + signal_type signal; }; - callback_type* mCallback; //!< Pointer to signal/connection, or NULL when not connected. + callback_type* mCallback; // Pointer to signal/connection, or NULL when not connected. - static U64 sMaxCount; //!< Number of cpu clocks below which we start a new state machine within the same frame. - static AIThreadSafeDC sContinuedStateMachinesAndMainloopEnabled; //!< Read/write locked variable pair. + // Engine stuff. + AIEngine* mDefaultEngine; // Default engine. + AIEngine* mYieldEngine; // Requested engine. - protected: - LLMutex mSetStateLock; //!< For critical areas in set_state() and locked_cont(). - - //! State of the derived class. Only valid if mState == bs_run. Call set_state to change. - volatile state_type mRunState; - - public: - //! Create a non-running state machine. - AIStateMachine(void) : mState(bs_initialize), mIdle(true), mAborted(true), mActive(as_idle), mSleep(0), mParent(NULL), mCallback(NULL) #ifdef SHOW_ASSERT - , mContThread(AIThreadID::none), mCalledThreadUnsafeIdle(false) + // Debug stuff. + AIThreadID mThreadId; // The thread currently running multiplex(). + base_state_type mDebugLastState; // The previous state that multiplex() had a normal run with. + bool mDebugShouldRun; // Set if we found evidence that we should indeed call multiplex_impl(). + bool mDebugAborted; // True when abort() was called. + bool mDebugContPending; // True while cont() was called by not handled yet. + bool mDebugSetStatePending; // True while set_state() was called by not handled yet. + bool mDebugAdvanceStatePending; // True while advance_state() was called by not handled yet. + bool mDebugRefCalled; // True when ref() is called (or will be called within the critial area of mMultiplexMutex). #endif - { } + U64 mRuntime; // Total time spent running in the main thread (in clocks). + + public: + AIStateMachine(void) : mCallback(NULL), mDefaultEngine(NULL), mYieldEngine(NULL), +#ifdef SHOW_ASSERT + mThreadId(AIThreadID::none), mDebugLastState(bs_killed), mDebugShouldRun(false), mDebugAborted(false), mDebugContPending(false), + mDebugSetStatePending(false), mDebugAdvanceStatePending(false), mDebugRefCalled(false), +#endif + mRuntime(0) + { } protected: - //! The user should call 'kill()', not delete a AIStateMachine (derived) directly. - virtual ~AIStateMachine() { llassert((mState == bs_killed && mActive == as_idle) || mState == bs_initialize); } - + // The user should call finish() (or abort(), or kill() from the call back when finish_impl() calls run()), not delete a class derived from AIStateMachine directly. + virtual ~AIStateMachine() { llassert(multiplex_state_type_rat(mState)->base_state == bs_killed); } + public: - //! Halt the state machine until cont() is called (not thread-safe). - void idle(void); + // These functions may be called directly after creation, or from within finish_impl(), or from the call back function. + void run(LLPointer parent, state_type new_parent_state, bool abort_parent = true, bool on_abort_signal_parent = true, AIEngine* default_engine = &gMainThreadEngine); + void run(callback_type::signal_type::slot_type const& slot, AIEngine* default_engine = &gMainThreadEngine); + void run(void) { run(NULL, 0, false, true, mDefaultEngine); } - //! Halt the state machine until cont() is called, provided it is still in 'current_run_state'. - void idle(state_type current_run_state); - - //! Temporarily halt the state machine. - void yield_frame(unsigned int frames) { mSleep = -(S64)frames; } - - //! Temporarily halt the state machine. - void yield_ms(unsigned int ms) { mSleep = get_clock_count() + calc_clock_frequency() * ms / 1000; } - - //! Continue running after calling idle. - void cont(void) - { - mSetStateLock.lock(); - // Ignore calls to cont() if the statemachine isn't idle. See comments in set_state(). - // Calling cont() twice or after calling set_state(), without first calling idle(), is an error. - if (mState != bs_run || !mIdle) { llassert(mState != bs_run || !mContThread.equals_current_thread()); mSetStateLock.unlock(); return; } - locked_cont(); - } - private: - void locked_cont(void); - - public: - //--------------------------------------- - // Changing the state. - - //! Change state to bs_run. May only be called after creation or after returning from finish(). - // If parent is non-NULL, change the parent state machine's state to new_parent_state - // upon finish, or in the case of an abort and when abort_parent is true, call parent->abort() instead. - void run(AIStateMachine* parent, state_type new_parent_state, bool abort_parent = true, bool on_abort_signal_parent = true); - - //! Change state to 'bs_run'. May only be called after creation or after returning from finish(). - // Does not cause a callback. - void run(void) { run(NULL, 0, false); } - - //! The same as above, but pass the result of a boost::bind with _1. - // - // Here _1, if present, will be replaced with a bool indicating success. - // - // For example: - // - // - // struct Foo { void callback(AIStateMachineDerived* ptr, bool success); }; - // ... - // AIStateMachineDerived* magic = new AIStateMachineDerived; // Deleted by callback - // // Call foo_ptr->callback(magic, _1) on finish. - // state_machine->run(boost::bind(&Foo::callback, foo_ptr, magic, _1)); - // - // - // or - // - // - // struct Foo { void callback(bool success, AIStateMachineDerived const& magic); }; - // ... - // AIStateMachineDerived magic; - // // Call foo_ptr->callback(_1, magic) on finish. - // magic.run(boost::bind(&Foo::callback, foo_ptr, _1, magic)); - // - // - // or - // - // - // static void callback(void* userdata); - // ... - // AIStateMachineDerived magic; - // // Call callback(userdata) on finish. - // magic.run(boost::bind(&callback, userdata)); - // - void run(callback_type::signal_type::slot_type const& slot); - - //! Change state to 'bs_abort'. May only be called while in the bs_run state. - void abort(void); - - //! Change state to 'bs_finish'. May only be called while in the bs_run state. - void finish(void); - - //! Refine state while in the bs_run state. May only be called while in the bs_run state. - void set_state(state_type run_state); - - //! Change state to 'bs_killed'. May only be called while in the bs_finish state. + // This function may only be called from the call back function (and cancels a call to run() from finish_impl()). void kill(void); - //--------------------------------------- - // Other. - - //! Called whenever the StateMachineMaxTime setting is changed. - static void setMaxCount(F32 StateMachineMaxTime); - - //--------------------------------------- - // Accessors. - - //! Return true if state machine was aborted (can be used in finish_impl). - bool aborted(void) const { return mAborted; } - - //! Return true if the derived class is running (also when we are idle). - bool running(void) const { return mState == bs_run; } - - //! Return true if it's safe to call abort. - bool abortable(void) const { return mState == bs_run || mState == bs_initialize; } - - //! Return true if the derived class is running but idle. - bool waiting(void) const { return mState == bs_run && mIdle; } - - // Use some safebool idiom (http://www.artima.com/cppsource/safebool.html) rather than operator bool. - typedef volatile state_type AIStateMachine::* const bool_type; - //! Return true if state machine successfully finished. - operator bool_type() const { return ((mState == bs_initialize || mState == bs_callback) && !mAborted) ? &AIStateMachine::mRunState : 0; } - - //! Return a stringified state, for debugging purposes. - char const* state_str(state_type state); - - private: - static void add_continued_statemachines(AIReadAccess& csme_r); - static void dowork(void); - void multiplex(U64 current_time); + protected: + // This function can be called from initialize_impl() and multiplex_impl() (both called from within multiplex()). + void set_state(state_type new_state); // Run this state the NEXT loop. + // These functions can only be called from within multiplex_impl(). + void idle(void); // Go idle unless cont() or advance_state() were called since the start of the current loop, or until they are called. + void finish(void); // Mark that the state machine finished and schedule the call back. + void yield(void); // Yield to give CPU to other state machines, but do not go idle. + void yield(AIEngine* engine); // Yield to give CPU to other state machines, but do not go idle. Continue running from engine 'engine'. + void yield_frame(unsigned int frames); // Run from the main-thread engine after at least 'frames' frames have passed. + void yield_ms(unsigned int ms); // Run from the main-thread engine after roughly 'ms' miliseconds have passed. public: - //! Call this once per frame to give the statemachines CPU cycles. - static void mainloop(void) + // This function can be called from multiplex_imp(), but also by a child state machine and + // therefore by any thread. The child state machine should use an LLPointer + // to access this state machine. + void abort(void); // Abort the state machine (unsuccessful finish). + + // These are the only two functions that can be called by any thread at any moment. + // Those threads should use an LLPointer to access this state machine. + void cont(void); // Guarantee at least one full run of multiplex() after this function is called. Cancels the last call to idle(). + void advance_state(state_type new_state); // Guarantee at least one full run of multiplex() after this function is called + // iff new_state is larger than the last state that was processed. + + public: + // Accessors. + + // Return true if the derived class is running (also when we are idle). + bool running(void) const { return multiplex_state_type_crat(mState)->base_state == bs_multiplex; } + // Return true if the derived class is running and idle. + bool waiting(void) const { - { - AIReadAccess csme_r(sContinuedStateMachinesAndMainloopEnabled, true); - if (!csme_r->mainloop_enabled) - return; - if (!csme_r->continued_statemachines.empty()) - add_continued_statemachines(csme_r); - } - dowork(); + multiplex_state_type_crat state_r(mState); + return state_r->base_state == bs_multiplex && sub_state_type_crat(mSubState)->idle; + } + // Return true if the derived class is running and idle or already being aborted. + bool waiting_or_aborting(void) const + { + multiplex_state_type_crat state_r(mState); + return state_r->base_state == bs_abort || ( state_r->base_state == bs_multiplex && sub_state_type_crat(mSubState)->idle); + } + // Return true if are added to the engine. + bool active(AIEngine const* engine) const { return multiplex_state_type_crat(mState)->current_engine == engine; } + bool aborted(void) const { return sub_state_type_crat(mSubState)->aborted; } + + // Use some safebool idiom (http://www.artima.com/cppsource/safebool.html) rather than operator bool. + typedef state_type AIStateMachine::* const bool_type; + // Return true if state machine successfully finished. + operator bool_type() const + { + sub_state_type_crat sub_state_r(mSubState); + return (sub_state_r->finished && !sub_state_r->aborted) ? &AIStateMachine::mNewParentState : 0; } - //! Abort all running state machines and then run mainloop until all state machines are idle (called when application is exiting). - static void flush(void); + // Return stringified state, for debugging purposes. + char const* state_str(base_state_type state); +#ifdef CWDEBUG + char const* event_str(event_type event); +#endif + + void add(U64 count) { mRuntime += count; } + U64 getRuntime(void) const { return mRuntime; } protected: - //--------------------------------------- - // Derived class implementations. - - // Handle initializing the object. virtual void initialize_impl(void) = 0; - - // Handle mRunState. - virtual void multiplex_impl(void) = 0; - - // Handle aborting from current bs_run state. - virtual void abort_impl(void) = 0; - - // Handle cleaning up from initialization (or post abort) state. - virtual void finish_impl(void) = 0; - - // Implemenation of state_str for run states. + virtual void multiplex_impl(state_type run_state) = 0; + virtual void abort_impl(void) { } + virtual void finish_impl(void) { } virtual char const* state_str_impl(state_type run_state) const = 0; + + private: + void reset(void); // Called from run() to (re)initialize a (re)start. + void multiplex(event_type event); // Called from AIEngine to step through the states (and from reset() to kick start the state machine). + state_type begin_loop(base_state_type base_state); // Called from multiplex() at the start of a loop. + void callback(void); // Called when the state machine finished. + bool sleep(U64 current_time) // Count frames if necessary and return true when the state machine is still sleeping. + { + if (mSleep == 0) + return false; + else if (mSleep < 0) + ++mSleep; + else if ((U64)mSleep >= current_time) + mSleep = 0; + return mSleep != 0; + } + + friend class AIEngine; // Calls multiplex(). }; -// This case be used in state_str_impl. +bool AIEngine::QueueElementComp::operator()(QueueElement const& e1, QueueElement const& e2) const +{ + return e1.mStateMachine->getRuntime() < e2.mStateMachine->getRuntime(); +} + +// This can be used in state_str_impl. #define AI_CASE_RETURN(x) do { case x: return #x; } while(0) #endif diff --git a/indra/aistatemachine/aistatemachinethread.cpp b/indra/aistatemachine/aistatemachinethread.cpp index 97391eb81..030bd0a5a 100644 --- a/indra/aistatemachine/aistatemachinethread.cpp +++ b/indra/aistatemachine/aistatemachinethread.cpp @@ -88,15 +88,15 @@ void AIStateMachineThreadBase::initialize_impl(void) set_state(start_thread); } -void AIStateMachineThreadBase::multiplex_impl(void) +void AIStateMachineThreadBase::multiplex_impl(state_type run_state) { - switch(mRunState) + switch(run_state) { case start_thread: mThread = Thread::allocate(mImpl); // Set next state. set_state(wait_stopped); - idle(wait_stopped); // Wait till the thread returns. + idle(); // Wait till the thread returns. mThread->start(); break; case wait_stopped: @@ -179,12 +179,8 @@ bool AIThreadImpl::thread_done(bool result) { // If state_machine_thread is non-NULL then AIThreadImpl::abort_impl wasn't called, // which means the state machine still exists. In fact, it should be in the waiting() state. - // It can also happen that the state machine is being aborted right now (but it will still exist). - // (Note that waiting() and running() aren't strictly thread-safe (we should really lock - // mSetStateLock here) but by first calling waiting() and then running(), and assuming that - // changing an int from the value 1 to the value 2 is atomic, this will work since the - // only possible transition is from waiting to not running). - llassert(state_machine_thread->waiting() || !state_machine_thread->running()); + // It can also happen that the state machine is being aborted right now. + llassert(state_machine_thread->waiting_or_aborting()); state_machine_thread->schedule_abort(!result); // Note that if the state machine is not running (being aborted, ie - hanging in abort_impl // waiting for the lock on mStateMachineThread) then this is simply ignored. diff --git a/indra/aistatemachine/aistatemachinethread.h b/indra/aistatemachine/aistatemachinethread.h index 9eefd4dca..85b2ff108 100644 --- a/indra/aistatemachine/aistatemachinethread.h +++ b/indra/aistatemachine/aistatemachinethread.h @@ -89,19 +89,8 @@ class HelloWorld : public AIStateMachine { // Handle initializing the object. /*virtual*/ void initialize_impl(void); - // Handle mRunState. - /*virtual*/ void multiplex_impl(void); - - // Handle aborting from current bs_run state. - /*virtual*/ void abort_impl(void) { } - - // Handle cleaning up from initialization (or post abort) state. - /*virtual*/ void finish_impl(void) - { - // Kill object by default. - // This can be overridden by calling run() from the callback function. - kill(); - } + // Handle run_state. + /*virtual*/ void multiplex_impl(state_type run_state); // Implemenation of state_str for run states. /*virtual*/ char const* state_str_impl(state_type run_state) const @@ -123,9 +112,9 @@ void HelloWorld::initialize_impl(void) set_state(HelloWorld_start); } -void HelloWorld::multiplex_impl(void) +void HelloWorld::multiplex_impl(state_type run_state) { - switch (mRunState) + switch (run_state) { case HelloWorld_start: { @@ -177,28 +166,30 @@ class AIStateMachineThreadBase : public AIStateMachine { // The actual thread (derived from LLThread). class Thread; + protected: + typedef AIStateMachine direct_base_type; + // The states of this state machine. enum thread_state_type { - start_thread = AIStateMachine::max_state, // Start the thread (if necessary create it first). + start_thread = direct_base_type::max_state, // Start the thread (if necessary create it first). wait_stopped // Wait till the thread is stopped. }; + public: + static state_type const max_state = wait_stopped + 1; protected: - AIStateMachineThreadBase(AIThreadImpl* impl) : mImpl(impl) { } + AIStateMachineThreadBase(AIThreadImpl* impl) : mImpl(impl) { ref(); /* Never call delete */ } private: // Handle initializing the object. /*virtual*/ void initialize_impl(void); // Handle mRunState. - /*virtual*/ void multiplex_impl(void); + /*virtual*/ void multiplex_impl(state_type run_state); // Handle aborting from current bs_run state. /*virtual*/ void abort_impl(void); - // Handle cleaning up from initialization (or post abort) state. - /*virtual*/ void finish_impl(void) { } - // Implemenation of state_str for run states. /*virtual*/ char const* state_str_impl(state_type run_state) const; diff --git a/indra/aistatemachine/aitimer.cpp b/indra/aistatemachine/aitimer.cpp index 5a37a6991..1c51b6178 100644 --- a/indra/aistatemachine/aitimer.cpp +++ b/indra/aistatemachine/aitimer.cpp @@ -31,11 +31,6 @@ #include "linden_common.h" #include "aitimer.h" -enum timer_state_type { - AITimer_start = AIStateMachine::max_state, - AITimer_expired -}; - char const* AITimer::state_str_impl(state_type run_state) const { switch(run_state) @@ -43,6 +38,7 @@ char const* AITimer::state_str_impl(state_type run_state) const AI_CASE_RETURN(AITimer_start); AI_CASE_RETURN(AITimer_expired); } + llassert(false); return "UNKNOWN STATE"; } @@ -54,12 +50,12 @@ void AITimer::initialize_impl(void) void AITimer::expired(void) { - set_state(AITimer_expired); + advance_state(AITimer_expired); } -void AITimer::multiplex_impl(void) +void AITimer::multiplex_impl(state_type run_state) { - switch (mRunState) + switch (run_state) { case AITimer_start: { @@ -79,18 +75,3 @@ void AITimer::abort_impl(void) { mFrameTimer.cancel(); } - -void AITimer::finish_impl(void) -{ - // Kill object by default. - // This can be overridden by calling run() from the callback function. - kill(); -} - -void AIPersistentTimer::finish_impl(void) -{ - // Don't kill object by default. - if (aborted()) - kill(); - // Callback function should always call kill() or run(). -} diff --git a/indra/aistatemachine/aitimer.h b/indra/aistatemachine/aitimer.h index c10559429..5b028c6e0 100644 --- a/indra/aistatemachine/aitimer.h +++ b/indra/aistatemachine/aitimer.h @@ -59,6 +59,18 @@ // just reuse the old ones (call the same callback). // class AITimer : public AIStateMachine { + protected: + // The base class of this state machine. + typedef AIStateMachine direct_base_type; + + // The different states of the state machine. + enum timer_state_type { + AITimer_start = direct_base_type::max_state, + AITimer_expired + }; + public: + static state_type const max_state = AITimer_expired + 1; + private: AIFrameTimer mFrameTimer; //!< The actual timer that this object wraps. F64 mInterval; //!< Input variable: interval after which the event will be generated, in seconds. @@ -90,14 +102,11 @@ class AITimer : public AIStateMachine { /*virtual*/ void initialize_impl(void); // Handle mRunState. - /*virtual*/ void multiplex_impl(void); + /*virtual*/ void multiplex_impl(state_type run_state); // Handle aborting from current bs_run state. /*virtual*/ void abort_impl(void); - // Handle cleaning up from initialization (or post abort) state. - /*virtual*/ void finish_impl(void); - // Implemenation of state_str for run states. /*virtual*/ char const* state_str_impl(state_type run_state) const; @@ -106,12 +115,4 @@ class AITimer : public AIStateMachine { void expired(void); }; -// Same as above but does not delete itself automatically by default after use. -// Call kill() on it yourself (from the callback function) when you're done with it! -class AIPersistentTimer : public AITimer { - protected: - // Handle cleaning up from initialization (or post abort) state. - /*virtual*/ void finish_impl(void); -}; - #endif diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index e5232abe4..6bfa9f9f6 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -2,6 +2,9 @@ # # Compilation options shared by all Second Life components. +if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) +set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") + include(Variables) @@ -309,8 +312,6 @@ else (STANDALONE) endif (STANDALONE) if(1 EQUAL 1) - add_definitions(-DOPENSIM_RULES=1) - add_definitions(-DMESH_ENABLED=1) add_definitions(-DENABLE_CLASSIC_CLOUDS=1) if (NOT "$ENV{SHY_MOD}" STREQUAL "") add_definitions(-DSHY_MOD=1) @@ -331,3 +332,5 @@ MARK_AS_ADVANCED( CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE ) + +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 4acdc6426..cdc9c32a8 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -21,8 +21,6 @@ else (STANDALONE) debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib ) - # Doesn't need to link with iconv.dll - set(APRICONV_LIBRARIES "") set(APRUTIL_LIBRARIES debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES} optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES} @@ -44,7 +42,7 @@ else (STANDALONE) endif (WINDOWS) set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1) - if (LINUX AND VIEWER) + if (LINUX) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES}) - endif (LINUX AND VIEWER) + endif (LINUX) endif (STANDALONE) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 434dbff44..6bc9e6117 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -15,20 +15,8 @@ else (STANDALONE) if (WINDOWS) set(BOOST_VERSION 1_45) - - # SNOW-788 - # 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc - # The precompiled boost libs for VC71 use a different suffix to VS80 and VS90 - # This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate - # boost libs are avaiable - RC. - - if (MSVC71) - set(BOOST_OPTIM_SUFFIX mt-s) - set(BOOST_DEBUG_SUFFIX mt-sgd) - else (MSVC71) - set(BOOST_OPTIM_SUFFIX mt) - set(BOOST_DEBUG_SUFFIX mt-gd) - endif (MSVC71) + set(BOOST_OPTIM_SUFFIX mt) + set(BOOST_DEBUG_SUFFIX mt-gd) set(Boost_PROGRAM_OPTIONS_LIBRARY optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION} diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 20ffa15cd..9eacfcada 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -8,79 +8,97 @@ set(cmake_SOURCE_FILES CMakeLists.txt 00-Common.cmake + AIStateMachine.cmake APR.cmake Audio.cmake + BasicPluginBase.cmake BerkeleyDB.cmake Boost.cmake BuildVersion.cmake CARes.cmake - CURL.cmake CMakeCopyIfDifferent.cmake + CURL.cmake + Colladadom.cmake + ConfigurePkgConfig.cmake + CopyBackToSource.cmake CopyWinLibs.cmake - CSharpMacros.cmake + Cwdebug.cmake DBusGlib.cmake DirectX.cmake DownloadPrebuilt.cmake.in ELFIO.cmake EXPAT.cmake + ExamplePlugin.cmake + FMOD.cmake + FMODEX.cmake FindAPR.cmake FindBerkeleyDB.cmake FindCARes.cmake + FindColladadom.cmake FindELFIO.cmake + FindGLOD.cmake FindGooglePerfTools.cmake FindHunSpell.cmake - FindMT.cmake + FindJsonCpp.cmake + FindLLQtWebkit.cmake FindNDOF.cmake FindOpenJPEG.cmake + FindTut.cmake FindXmlRpcEpi.cmake - FMOD.cmake - FMODEX.cmake FreeType.cmake GLOD.cmake GStreamer010Plugin.cmake + Glui.cmake + Glut.cmake GooglePerfTools.cmake Hunspell.cmake JPEG.cmake + JsonCpp.cmake LLAddBuildTest.cmake LLAppearance.cmake LLAudio.cmake LLCharacter.cmake LLCommon.cmake LLCrashLogger.cmake - LLDatabase.cmake LLImage.cmake LLImageJ2COJ.cmake LLInventory.cmake - LLKDU.cmake LLMath.cmake LLMessage.cmake + LLPhysicsExtensions.cmake LLPlugin.cmake LLPrimitive.cmake LLPhysicsExtensions.cmake LLQtWebkit.cmake LLRender.cmake - LLScene.cmake LLUI.cmake LLVFS.cmake LLWindow.cmake LLXML.cmake -# LScript.cmake + LScript.cmake Linking.cmake + MediaPluginBase.cmake NDOF.cmake OPENAL.cmake OpenGL.cmake OpenJPEG.cmake OpenSSL.cmake PNG.cmake - Python.cmake + PluginAPI.cmake Prebuilt.cmake + PulseAudio.cmake + Python.cmake Qt4.cmake + QuickTimePlugin.cmake RunBuildTest.cmake + StateMachine.cmake TemplateCheck.cmake Tut.cmake UI.cmake UnixInstall.cmake Variables.cmake + ViewerMiscLibs.cmake + WebKitLibPlugin.cmake XmlRpcEpi.cmake ZLIB.cmake ) @@ -92,10 +110,6 @@ set(master_SOURCE_FILES ../develop.py ) -if (SERVER) - list(APPEND master_SOURCE_FILES ../Server.cmake) -endif (SERVER) - source_group("Master Rules" FILES ${master_SOURCE_FILES}) set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES} diff --git a/indra/cmake/CSharpMacros.cmake b/indra/cmake/CSharpMacros.cmake deleted file mode 100644 index a4dd81504..000000000 --- a/indra/cmake/CSharpMacros.cmake +++ /dev/null @@ -1,142 +0,0 @@ -# - This is a support module for easy Mono/C# handling with CMake -# It defines the following macros: -# -# ADD_CS_LIBRARY ( ) -# ADD_CS_EXECUTABLE ( ) -# INSTALL_GAC () -# -# Note that the order of the arguments is important. -# -# You can optionally set the variable CS_FLAGS to tell the macros whether -# to pass additional flags to the compiler. This is particularly useful to -# set assembly references, unsafe code, etc... These flags are always reset -# after the target was added so you don't have to care about that. -# -# copyright (c) 2007 Arno Rehn arno@arnorehn.de -# -# Redistribution and use is allowed according to the terms of the GPL license. - - -# ----- support macros ----- -MACRO(GET_CS_LIBRARY_TARGET_DIR) - IF (NOT LIBRARY_OUTPUT_PATH) - SET(CS_LIBRARY_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR}) - ELSE (NOT LIBRARY_OUTPUT_PATH) - SET(CS_LIBRARY_TARGET_DIR ${LIBRARY_OUTPUT_PATH}) - ENDIF (NOT LIBRARY_OUTPUT_PATH) -ENDMACRO(GET_CS_LIBRARY_TARGET_DIR) - -MACRO(GET_CS_EXECUTABLE_TARGET_DIR) - IF (NOT EXECUTABLE_OUTPUT_PATH) - SET(CS_EXECUTABLE_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR}) - ELSE (NOT EXECUTABLE_OUTPUT_PATH) - SET(CS_EXECUTABLE_TARGET_DIR ${EXECUTABLE_OUTPUT_PATH}) - ENDIF (NOT EXECUTABLE_OUTPUT_PATH) -ENDMACRO(GET_CS_EXECUTABLE_TARGET_DIR) - -MACRO(MAKE_PROPER_FILE_LIST) - FOREACH(file ${ARGN}) - # first assume it's a relative path - FILE(GLOB globbed ${CMAKE_CURRENT_SOURCE_DIR}/${file}) - IF(globbed) - FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${file} native) - ELSE(globbed) - FILE(TO_NATIVE_PATH ${file} native) - ENDIF(globbed) - SET(proper_file_list ${proper_file_list} ${native}) - SET(native "") - ENDFOREACH(file) -ENDMACRO(MAKE_PROPER_FILE_LIST) -# ----- end support macros ----- - -MACRO(ADD_CS_LIBRARY target) - GET_CS_LIBRARY_TARGET_DIR() - - SET(target_DLL "${CS_LIBRARY_TARGET_DIR}/${target}.dll") - MAKE_PROPER_FILE_LIST(${ARGN}) - FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_DLL}) - - SET(target_KEY "${CMAKE_CURRENT_SOURCE_DIR}/${target}.key") - SET(target_CS_FLAGS "${CS_FLAGS}") - IF(${target}_CS_FLAGS) - LIST(APPEND target_CS_FLAGS ${${target}_CS_FLAGS}) - ENDIF(${target}_CS_FLAGS) - IF(EXISTS ${target_KEY}) - LIST(APPEND target_CS_FLAGS -keyfile:${target_KEY}) - ENDIF(EXISTS ${target_KEY}) - - FOREACH(ref ${${target}_REFS}) - SET(ref_DLL ${CMAKE_CURRENT_BINARY_DIR}/${ref}.dll) - IF(EXISTS ${ref_DLL}) - LIST(APPEND target_CS_FLAGS -r:${ref_DLL}) - ELSE(EXISTS ${ref_DLL}) - LIST(APPEND target_CS_FLAGS -r:${ref}) - ENDIF(EXISTS ${ref_DLL}) - ENDFOREACH(ref ${${target}_REFS}) - - ADD_CUSTOM_COMMAND (OUTPUT ${target_DLL} - COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_DLL} -target:library ${proper_file_list} - MAIN_DEPENDENCY ${proper_file_list} - DEPENDS ${ARGN} - COMMENT "Building ${relative_path}") - ADD_CUSTOM_TARGET (${target} ALL DEPENDS ${target_DLL}) - - FOREACH(ref ${${target}_REFS}) - GET_TARGET_PROPERTY(is_target ${ref} TYPE) - IF(is_target) - ADD_DEPENDENCIES(${target} ${ref}) - ENDIF(is_target) - ENDFOREACH(ref ${${target}_REFS}) - - SET(relative_path "") - SET(proper_file_list "") -ENDMACRO(ADD_CS_LIBRARY) - -MACRO(ADD_CS_EXECUTABLE target) - GET_CS_EXECUTABLE_TARGET_DIR() - - # Seems like cmake doesn't like the ".exe" ending for custom commands. - # If we call it ${target}.exe, 'make' will later complain about a missing rule. - # Create a fake target instead. - SET(target_EXE "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe") - SET(target_TOUCH "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe-built") - GET_DIRECTORY_PROPERTY(clean ADDITIONAL_MAKE_CLEAN_FILES) - LIST(APPEND clean ${target}.exe) - SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${clean}") - MAKE_PROPER_FILE_LIST(${ARGN}) - FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_EXE}) - SET(target_CS_FLAGS "${CS_FLAGS}") - - FOREACH(ref ${${target}_REFS}) - SET(ref_DLL ${CMAKE_CURRENT_SOURCE_DIR}/${ref}.dll) - IF(EXISTS ${ref_DLL}) - LIST(APPEND target_CS_FLAGS -r:${ref_DLL}) - ELSE(EXISTS ${ref_DLL}) - LIST(APPEND target_CS_FLAGS -r:${ref}) - ENDIF(EXISTS ${ref_DLL}) - ENDFOREACH(ref ${${target}_REFS}) - - ADD_CUSTOM_COMMAND (OUTPUT "${target_TOUCH}" - COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_EXE} ${proper_file_list} - COMMAND ${CMAKE_COMMAND} -E touch ${target_TOUCH} - MAIN_DEPENDENCY ${ARGN} - DEPENDS ${ARGN} - COMMENT "Building ${relative_path}") - ADD_CUSTOM_TARGET ("${target}" ALL DEPENDS "${target_TOUCH}") - - FOREACH(ref ${${target}_REFS}) - GET_TARGET_PROPERTY(is_target ${ref} TYPE) - IF(is_target) - ADD_DEPENDENCIES(${target} ${ref}) - ENDIF(is_target) - ENDFOREACH(ref ${${target}_REFS}) - - SET(relative_path "") - SET(proper_file_list "") -ENDMACRO(ADD_CS_EXECUTABLE) - -MACRO(INSTALL_GAC target) - GET_CS_LIBRARY_TARGET_DIR() - - INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GACUTIL_EXECUTABLE} -i ${CS_LIBRARY_TARGET_DIR}/${target}.dll -package 2.0)") -ENDMACRO(INSTALL_GAC target) diff --git a/indra/cmake/ConfigurePkgConfig.cmake b/indra/cmake/ConfigurePkgConfig.cmake new file mode 100644 index 000000000..82ee3e7a5 --- /dev/null +++ b/indra/cmake/ConfigurePkgConfig.cmake @@ -0,0 +1,74 @@ +# -*- cmake -*- + +SET(DEBUG_PKG_CONFIG "YES") + +# Don't change this if manually set by user. +IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") + + # Guess at architecture-specific system library paths. + if (WORD_SIZE EQUAL 32) + SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib) + SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib) + SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu) + SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu) + else (WORD_SIZE EQUAL 32) + SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib) + SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib) + SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu) + SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu) + endif (WORD_SIZE EQUAL 32) + + # Use DPKG architecture, if available. + IF (${DPKG_ARCH}) + SET(PKG_CONFIG_MULTI_GUESS /usr/lib/${DPKG_ARCH}) + SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usrlocal/lib/${DPKG_ARCH}) + ENDIF (${DPKG_ARCH}) + + # Explicitly include anything listed in PKG_CONFIG_PATH + string(REPLACE ":" ";" PKG_CONFIG_PATH_LIST "$ENV{PKG_CONFIG_PATH}") + FOREACH(PKG_CONFIG_DIR ${PKG_CONFIG_PATH_LIST}) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_DIR}/pkgconfig") + ENDFOREACH(PKG_CONFIG_DIR) + + # Look for valid pkgconfig directories. + FIND_PATH(PKG_CONFIG_ENV pkgconfig ENV LD_LIBRARY_PATH) + FIND_PATH(PKG_CONFIG_MULTI pkgconfig HINT ${PKG_CONFIG_MULTI_GUESS}) + FIND_PATH(PKG_CONFIG_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_MULTI_LOCAL_GUESS}) + FIND_PATH(PKG_CONFIG_NO_MULTI pkgconfig HINT ${PKG_CONFIG_NO_MULTI_GUESS}) + FIND_PATH(PKG_CONFIG_NO_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_NO_MULTI_LOCAL_GUESS}) + + # Add anything we found to our list. + IF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_ENV}/pkgconfig") + ENDIF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND) + + IF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI}/pkgconfig") + ENDIF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND) + + IF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI_LOCAL}/pkgconfig") + ENDIF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND) + + IF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI}/pkgconfig") + ENDIF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND) + + IF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI_LOCAL}/pkgconfig") + ENDIF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND) + + # Also add some non-architecture specific package locations. + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:/usr/share/pkgconfig:/usr/local/share/pkgconfig") + + # Remove first unwanted ':' + string(SUBSTRING ${VALID_PKG_LIBDIRS} 1 -1 VALID_PKG_LIBDIRS) + + # Set PKG_CONFIG_LIBDIR environment. + SET(ENV{PKG_CONFIG_LIBDIR} ${VALID_PKG_LIBDIRS}) +ENDIF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") + +IF(DEBUG_PKG_CONFIG) + MESSAGE(STATUS "Using PKG_CONFIG_LIBDIR=$ENV{PKG_CONFIG_LIBDIR}") +ENDIF(DEBUG_PKG_CONFIG) + diff --git a/indra/cmake/CopyWinLibs.cmake b/indra/cmake/CopyWinLibs.cmake index 1a09a6de1..9d52499a1 100644 --- a/indra/cmake/CopyWinLibs.cmake +++ b/indra/cmake/CopyWinLibs.cmake @@ -285,53 +285,6 @@ copy_if_different( ) set(all_targets ${all_targets} ${out_targets}) -set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") -if(EXISTS ${internal_llkdu_path}) - set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll") - set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll") - ADD_CUSTOM_COMMAND( - OUTPUT ${llkdu_dst} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst} - DEPENDS ${internal_llkdu_src} - COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" - ) - set(all_targets ${all_targets} ${llkdu_dst}) -else(EXISTS ${internal_llkdu_path}) - if (EXISTS "${debug_src_dir}/llkdu.dll") - set(debug_llkdu_src "${debug_src_dir}/llkdu.dll") - set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll") - ADD_CUSTOM_COMMAND( - OUTPUT ${debug_llkdu_dst} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst} - DEPENDS ${debug_llkdu_src} - COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug" - ) - set(all_targets ${all_targets} ${debug_llkdu_dst}) - endif (EXISTS "${debug_src_dir}/llkdu.dll") - - if (EXISTS "${release_src_dir}/llkdu.dll") - set(release_llkdu_src "${release_src_dir}/llkdu.dll") - set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll") - ADD_CUSTOM_COMMAND( - OUTPUT ${release_llkdu_dst} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst} - DEPENDS ${release_llkdu_src} - COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release" - ) - set(all_targets ${all_targets} ${release_llkdu_dst}) - - set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll") - ADD_CUSTOM_COMMAND( - OUTPUT ${relwithdebinfo_llkdu_dst} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst} - DEPENDS ${release_llkdu_src} - COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo" - ) - set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst}) - endif (EXISTS "${release_src_dir}/llkdu.dll") - -endif (EXISTS ${internal_llkdu_path}) - # Copy MS C runtime dlls, required for packaging. # *TODO - Adapt this to support VC9 if (MSVC80) @@ -440,6 +393,3 @@ add_custom_target(copy_win_libs ALL ) add_dependencies(copy_win_libs prepare) -if(EXISTS ${internal_llkdu_path}) - add_dependencies(copy_win_libs llkdu) -endif(EXISTS ${internal_llkdu_path}) diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake index e45575595..c10e7e344 100644 --- a/indra/cmake/DirectX.cmake +++ b/indra/cmake/DirectX.cmake @@ -1,6 +1,6 @@ # -*- cmake -*- -if (VIEWER AND WINDOWS) +if (WINDOWS) find_path(DIRECTX_INCLUDE_DIR dxdiag.h "$ENV{DXSDK_DIR}/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include" @@ -43,4 +43,4 @@ if (VIEWER AND WINDOWS) message(FATAL_ERROR "Could not find DirectX SDK Libraries") endif (DIRECTX_LIBRARY_DIR) -endif (VIEWER AND WINDOWS) +endif (WINDOWS) diff --git a/indra/cmake/FindMT.cmake b/indra/cmake/FindMT.cmake deleted file mode 100644 index babc68db5..000000000 --- a/indra/cmake/FindMT.cmake +++ /dev/null @@ -1,17 +0,0 @@ -#Find the windows manifest tool. -if (MSVC80) - FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt - PATHS - "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin" - "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin" - "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin") - IF(HAVE_MANIFEST_TOOL) - MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.") - ELSE(HAVE_MANIFEST_TOOL) - MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.") - ENDIF(HAVE_MANIFEST_TOOL) - - STRING(REPLACE "/MANIFEST " "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS - ${CMAKE_EXE_LINKER_FLAGS}) - -endif (MSVC80) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 2d7c16939..499089843 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -18,5 +18,5 @@ else (STANDALONE) elseif (LINUX) set(JSONCPP_LIBRARIES jsoncpp) endif (WINDOWS) - set(JSONCPP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/jsoncpp) + set(JSONCPP_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/jsoncpp) endif (STANDALONE) diff --git a/indra/cmake/LLDatabase.cmake b/indra/cmake/LLDatabase.cmake deleted file mode 100644 index 652610138..000000000 --- a/indra/cmake/LLDatabase.cmake +++ /dev/null @@ -1,10 +0,0 @@ -# -*- cmake -*- - -include(MySQL) - -set(LLDATABASE_INCLUDE_DIRS - ${LIBS_SERVER_DIR}/lldatabase - ${MYSQL_INCLUDE_DIR} - ) - -set(LLDATABASE_LIBRARIES lldatabase) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake deleted file mode 100644 index f103dcf66..000000000 --- a/indra/cmake/LLKDU.cmake +++ /dev/null @@ -1,18 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) - -if (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu) - use_prebuilt_binary(kdu) - if (WINDOWS) - set(KDU_LIBRARY debug kdu_cored optimized kdu_core) - else (WINDOWS) - set(KDU_LIBRARY kdu) - endif (WINDOWS) - - set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) - - set(LLKDU_LIBRARY llkdu) - set(LLKDU_STATIC_LIBRARY llkdu_static) - set(LLKDU_LIBRARIES ${LLKDU_LIBRARY}) - set(LLKDU_STATIC_LIBRARIES ${LLKDU_STATIC_LIBRARY}) -endif (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 0e2d94316..919b0c343 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- set(LLPHYSICSEXTENSIONS_LIBRARIES nd_hacdConvexDecomposition hacd nd_Pathing ) -set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_OPEN_DIR}/libndhacd ) +set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_OPEN_DIR}/libndhacd ${LIBS_OPEN_DIR}/libpathing) diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake index c47e8878e..ab22e90ae 100644 --- a/indra/cmake/LLRender.cmake +++ b/indra/cmake/LLRender.cmake @@ -6,27 +6,7 @@ set(LLRENDER_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llrender ) -if (SERVER AND LINUX) - set(LLRENDER_LIBRARIES - llrenderheadless - ) -else (SERVER AND LINUX) set(LLRENDER_LIBRARIES llrender ) -endif (SERVER AND LINUX) -# mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set -# differently for different object files. -macro (copy_server_sources ) - foreach (PREFIX ${ARGV}) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp - COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp - ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp - ) - list(APPEND server_SOURCE_FILES ${PREFIX}_server.cpp) - endforeach (PREFIX ${_copied_SOURCES}) -endmacro (copy_server_sources _copied_SOURCES) diff --git a/indra/cmake/LLScene.cmake b/indra/cmake/LLScene.cmake deleted file mode 100644 index 96ad5085a..000000000 --- a/indra/cmake/LLScene.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# -*- cmake -*- - -set(LLSCENE_INCLUDE_DIRS - ${LIBS_SERVER_DIR}/llscene - ) - -set(LLSCENE_LIBRARIES llscene) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index d75068402..a46d9c592 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -36,17 +36,12 @@ set(LLWINDOW_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llwindow ) -if (SERVER AND LINUX) - set(LLWINDOW_LIBRARIES - llwindowheadless - ) -else (SERVER AND LINUX) - set(LLWINDOW_LIBRARIES - llwindow - ) - if (WINDOWS) - list(APPEND LLWINDOW_LIBRARIES - comdlg32 - ) - endif (WINDOWS) -endif (SERVER AND LINUX) +set(LLWINDOW_LIBRARIES + llwindow + ) + +if (WINDOWS) + list(APPEND LLWINDOW_LIBRARIES + comdlg32 + ) +endif (WINDOWS) diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake index 91d949409..0bfc1a359 100644 --- a/indra/cmake/OpenGL.cmake +++ b/indra/cmake/OpenGL.cmake @@ -3,8 +3,5 @@ include(Prebuilt) if (NOT (STANDALONE OR DARWIN)) use_prebuilt_binary(glext) - # possible glh_linear should have its own .cmake file instead - #use_prebuilt_binary(glh_linear) - # actually... not any longer, it's now in git -SG set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include) -endif () +endif (NOT (STANDALONE OR DARWIN)) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 9e7d411a2..8dfd70be3 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -8,41 +8,32 @@ # DARWIN - Mac OS X # LINUX - Linux # WINDOWS - Windows -# -# What to build: -# -# VIEWER - viewer and other viewer-side components -# SERVER - simulator and other server-side bits # Relative and absolute paths to subtrees. +if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) +set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") + +if(NOT DEFINED COMMON_CMAKE_DIR) + set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake") +endif(NOT DEFINED COMMON_CMAKE_DIR) + set(LIBS_CLOSED_PREFIX) set(LIBS_OPEN_PREFIX) -set(LIBS_SERVER_PREFIX) set(SCRIPTS_PREFIX ../scripts) -set(SERVER_PREFIX) set(VIEWER_PREFIX) set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX}) set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX}) -set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX}) set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX}) -set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX}) set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX}) set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)") set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)") -set(VISTA_ICON OFF CACHE BOOL "Allow vista icon with pre 2008 Visual Studio IDEs. (Assumes replacement old rcdll.dll with new rcdll.dll from win sdk 7.0 or later)") set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH "Location of prebuilt libraries.") -if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake) - # We use this as a marker that you can try to use the proprietary libraries. - set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries") -endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake) - - if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(WINDOWS ON BOOL FORCE) set(ARCH i686) @@ -69,6 +60,26 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(WORD_SIZE 64) endif(CMAKE_SIZEOF_VOID_P MATCHES 4) endif (WORD_SIZE EQUAL 32) + if (WORD_SIZE EQUAL 32) + set(DEB_ARCHITECTURE i386) + set(FIND_LIBRARY_USE_LIB64_PATHS OFF) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) + else (WORD_SIZE EQUAL 32) + set(DEB_ARCHITECTURE amd64) + set(FIND_LIBRARY_USE_LIB64_PATHS ON) + endif (WORD_SIZE EQUAL 32) + + execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH + RESULT_VARIABLE DPKG_RESULT + OUTPUT_VARIABLE DPKG_ARCH + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + #message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}") + if (DPKG_RESULT EQUAL 0) + set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH}) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH}) + endif (DPKG_RESULT EQUAL 0) + + include(ConfigurePkgConfig) set(LL_ARCH ${ARCH}_linux) set(LL_ARCH_DIR ${ARCH}-linux) @@ -77,39 +88,37 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(DARWIN 1) - if(${CMAKE_GENERATOR} MATCHES Xcode) - #SDK Compiler and Deployment targets for XCode - if (${XCODE_VERSION} VERSION_LESS 4.0.0) - set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) - set(CMAKE_XCODE_ATTIBUTE_GCC_VERSION "4.2") - else (${XCODE_VERSION} VERSION_LESS 4.0.0) - set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk) + if(${CMAKE_GENERATOR} MATCHES Xcode) + execute_process( + COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2" + OUTPUT_VARIABLE XCODE_VERSION ) + + # To support a different SDK update these Xcode settings: + if (XCODE_VERSION GREATER 4.2) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) - set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42") - endif (${XCODE_VERSION} VERSION_LESS 4.0.0) - else() - set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk) + else (XCODE_VERSION GREATER 4.2) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) + endif (XCODE_VERSION GREATER 4.2) + else(${CMAKE_GENERATOR} MATCHES Xcode) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6) - set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42") endif(${CMAKE_GENERATOR} MATCHES Xcode) - ## We currently support only 32-bit i386 builds, so use these: - set(CMAKE_OSX_ARCHITECTURES i386) + set(CMAKE_OSX_SYSROOT macosx10.6) + set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42") + + set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) + + # Build only for i386 by default, system default on MacOSX 10.6 is x86_64 + if (NOT CMAKE_OSX_ARCHITECTURES) + set(CMAKE_OSX_ARCHITECTURES i386) + endif (NOT CMAKE_OSX_ARCHITECTURES) set(ARCH i386) set(WORD_SIZE 32) - ## But if you want to compile for mixed 32/64 bit, try these: - # set(CMAKE_OSX_ARCHITECTURES i386;x86_64) - # set(ARCH universal) - # set(WORD_SIZE 64) - - ## Finally, set up the build output directories set(LL_ARCH ${ARCH}_darwin) set(LL_ARCH_DIR universal-darwin) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - if (WINDOWS) set(PREBUILT_TYPE windows) elseif(DARWIN) @@ -120,11 +129,9 @@ elseif(LINUX AND WORD_SIZE EQUAL 64) set(PREBUILT_TYPE linux64) endif(WINDOWS) - # Default deploy grid set(GRID agni CACHE STRING "Target Grid") -set(VIEWER ON CACHE BOOL "Build Second Life viewer.") set(VIEWER_CHANNEL "Singularity" CACHE STRING "Viewer Channel Name") set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing") set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id (currently secondlife|snowglobe)") @@ -135,17 +142,6 @@ set(VIEWER_BRANDING_NAME_CAMELCASE "Singularity") set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") -if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics) - set(SERVER ON CACHE BOOL "Build Second Life server software.") -endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics) - -if (LINUX AND SERVER AND VIEWER) - MESSAGE(FATAL_ERROR " -The indra source does not currently support building SERVER and VIEWER at the same time. -Please set one of these values to OFF in your CMake cache file. -(either by running ccmake or by editing CMakeCache.txt by hand) -For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both VIEWER and SERVER in one build environment - ") -endif (LINUX AND SERVER AND VIEWER) - source_group("CMake Rules" FILES CMakeLists.txt) + +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/develop.py b/indra/develop.py index 91db5cb97..a2215b3b0 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -81,7 +81,6 @@ class PlatformSetup(object): distcc = True cmake_opts = [] word_size = 32 - opensim_rules = 'OFF' #whether or not to use rules fit for opensim using_express = False def __init__(self): @@ -125,7 +124,6 @@ class PlatformSetup(object): standalone=self.standalone, unattended=self.unattended, word_size=self.word_size, - opensim_rules=self.opensim_rules, type=self.build_type.upper(), ) #if simple: @@ -134,7 +132,6 @@ class PlatformSetup(object): '-DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' '-DWORD_SIZE:STRING=%(word_size)s ' - '-DOPENSIM_RULES:BOOL=%(opensim_rules)s ' '-G %(generator)r %(opts)s %(dir)r' % args) def run_cmake(self, args=[]): @@ -296,7 +293,6 @@ class LinuxSetup(UnixSetup): type=self.build_type.upper(), project_name=self.project_name, word_size=self.word_size, - opensim_rules=self.opensim_rules, ) if not self.is_internal_tree(): args.update({'cxx':'g++', 'server':'OFF', 'viewer':'ON'}) @@ -323,7 +319,6 @@ class LinuxSetup(UnixSetup): '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' '-DWORD_SIZE:STRING=%(word_size)s ' - '-DOPENSIM_RULES:BOOL=%(opensim_rules)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(opts)s %(dir)r') % args) @@ -437,7 +432,6 @@ class DarwinSetup(UnixSetup): unattended=self.unattended, project_name=self.project_name, universal=self.universal, - opensim_rules=self.opensim_rules, type=self.build_type.upper(), ) if self.universal == 'ON': @@ -449,7 +443,6 @@ class DarwinSetup(UnixSetup): '-DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' '-DWORD_SIZE:STRING=%(word_size)s ' - '-DOPENSIM_RULES:BOOL=%(opensim_rules)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(universal)s ' '%(opts)s %(dir)r' % args) @@ -535,7 +528,6 @@ class WindowsSetup(PlatformSetup): unattended=self.unattended, project_name=self.project_name, word_size=self.word_size, - opensim_rules=self.opensim_rules, ) #if simple: # return 'cmake %(opts)s "%(dir)s"' % args @@ -543,7 +535,6 @@ class WindowsSetup(PlatformSetup): '-DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' '-DWORD_SIZE:STRING=%(word_size)s ' - '-DOPENSIM_RULES:BOOL=%(opensim_rules)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(opts)s "%(dir)s"' % args) @@ -719,7 +710,6 @@ class CygwinSetup(WindowsSetup): unattended=self.unattended, project_name=self.project_name, word_size=self.word_size, - opensim_rules=self.opensim_rules, ) #if simple: # return 'cmake %(opts)s "%(dir)s"' % args @@ -727,7 +717,6 @@ class CygwinSetup(WindowsSetup): '-DUNATTENDED:BOOl=%(unattended)s ' '-DSTANDALONE:BOOL=%(standalone)s ' '-DWORD_SIZE:STRING=%(word_size)s ' - '-DOPENSIM_RULES:BOOL=%(opensim_rules)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(opts)s "%(dir)s"' % args) @@ -766,21 +755,15 @@ Commands: Command-options for "configure": We use cmake variables to change the build configuration. - -DSERVER:BOOL=OFF Don't configure simulator/dataserver/etc - -DVIEWER:BOOL=OFF Don't configure the viewer -DPACKAGE:BOOL=ON Create "package" target to make installers -DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language -DLL_TESTS:BOOL=OFF Don't generate unit test projects -DEXAMPLEPLUGIN:BOOL=OFF Don't generate example plugin project -DDISABLE_TCMALLOC:BOOL=ON Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc) - -DVISTA_ICON:BOOL=ON Allow pre-2008 VS to use vista-optimized resource file. (Requires updated rcdll.dll!) Examples: - Set up a viewer-only project for your system: - develop.py configure -DSERVER:BOOL=OFF - - Set up a Visual Studio 2005 project with "package" target: - develop.py -G vc80 configure -DPACKAGE:BOOL=ON + Set up a Visual Studio 2010 project with "package" target: + develop.py -G vc100 configure -DPACKAGE:BOOL=ON ''' def main(arguments): diff --git a/indra/libhacd/hacdMeshDecimator.cpp b/indra/libhacd/hacdMeshDecimator.cpp index 3ca9ba87e..c487a4ef2 100644 --- a/indra/libhacd/hacdMeshDecimator.cpp +++ b/indra/libhacd/hacdMeshDecimator.cpp @@ -187,7 +187,7 @@ namespace HACD m_nTriangles--; } } - long idEdge; + long idEdge = 0; for(size_t itE = 0; itE < m_vertices[v2].m_edges.Size(); ++itE) { idEdge = m_vertices[v2].m_edges[itE]; @@ -529,7 +529,7 @@ namespace HACD long a, b; long idEdge1; long idEdge2; - long idEdgeV1V2; + long idEdgeV1V2 = 0; for(size_t itE1 = 0; itE1 < m_vertices[v1].m_edges.Size(); ++itE1) { idEdge1 = m_vertices[v1].m_edges[itE1]; diff --git a/indra/libhacd/hacdMicroAllocator.cpp b/indra/libhacd/hacdMicroAllocator.cpp index c49789842..47562f6a4 100644 --- a/indra/libhacd/hacdMicroAllocator.cpp +++ b/indra/libhacd/hacdMicroAllocator.cpp @@ -50,8 +50,9 @@ #include #endif - +#if defined(_WIN32) #pragma warning(disable:4100) +#endif namespace HACD { diff --git a/indra/libopenjpeg/CMakeLists.txt b/indra/libopenjpeg/CMakeLists.txt index 9ccc55126..da21fe8dc 100644 --- a/indra/libopenjpeg/CMakeLists.txt +++ b/indra/libopenjpeg/CMakeLists.txt @@ -14,8 +14,8 @@ set(OPENJPEG_VERSION set(openjpeg_SOURCE_FILES bio.c - cio.c cidx_manager.c + cio.c dwt.c event.c image.c @@ -26,8 +26,8 @@ set(openjpeg_SOURCE_FILES mct.c mqc.c openjpeg.c - pi.c phix_manager.c + pi.c ppix_manager.c raw.c t1.c @@ -40,8 +40,8 @@ set(openjpeg_SOURCE_FILES set(openjpeg_HEADER_FILES bio.h - cio.h cidx_manager.h + cio.h dwt.h event.h fix.h diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index d186ce79b..63c71990a 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -169,8 +169,6 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) : mRoot(NULL), mWearableData(wearable_data) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - llassert_always(mWearableData); mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES); for (U32 i = 0; i < mBakedTextureDatas.size(); i++ ) @@ -496,8 +494,6 @@ void LLAvatarAppearance::computeBodySize() //----------------------------------------------------------------------------- BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // parse the file //------------------------------------------------------------------------- @@ -539,8 +535,6 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename) //----------------------------------------------------------------------------- BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - LLJoint* joint = NULL; if (info->mIsJoint) @@ -628,9 +622,6 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num ) //----------------------------------------------------------------------------- BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - - if (!info) return FALSE; //------------------------------------------------------------------------- @@ -685,8 +676,6 @@ void LLAvatarAppearance::clearSkeleton() //----------------------------------------------------------------------------- void LLAvatarAppearance::buildCharacter() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // remove all references to our existing skeleton // so we can rebuild it @@ -1471,6 +1460,7 @@ LLColor4 LLAvatarAppearance::getClothesColor( ETextureIndex te ) } return color; } + // static LLColor4 LLAvatarAppearance::getDummyColor() { diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index 7ddfc874e..a6290d02a 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -749,8 +749,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index) //----------------------------------------------------------------------------- LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh) { - LLMemType mt(LLMemType::MTYPE_AVATAR_MESH); - llassert(shared_data); mSharedData = shared_data; diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index bd14fa548..22d814e03 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -40,9 +40,9 @@ include_directories( ) set(llaudio_SOURCE_FILES + llaudiodecodemgr.cpp llaudioengine.cpp lllistener.cpp - llaudiodecodemgr.cpp llvorbisdecode.cpp llvorbisencode.cpp ) @@ -50,9 +50,9 @@ set(llaudio_SOURCE_FILES set(llaudio_HEADER_FILES CMakeLists.txt + llaudiodecodemgr.h llaudioengine.h lllistener.h - llaudiodecodemgr.h llvorbisdecode.h llvorbisencode.h llwindgen.h diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp index 887c79179..17c5d860f 100644 --- a/indra/llaudio/llaudioengine_openal.cpp +++ b/indra/llaudio/llaudioengine_openal.cpp @@ -38,6 +38,8 @@ #include "lllistener_openal.h" +const float LLAudioEngine_OpenAL::WIND_BUFFER_SIZE_SEC = 0.05f; + LLAudioEngine_OpenAL::LLAudioEngine_OpenAL() : mWindGen(NULL), @@ -185,6 +187,8 @@ LLAudioChannelOpenAL::~LLAudioChannelOpenAL() void LLAudioChannelOpenAL::cleanup() { alSourceStop(mALSource); + alSourcei(mALSource, AL_BUFFER, AL_NONE); + mCurrentBufferp = NULL; } @@ -324,7 +328,14 @@ void LLAudioBufferOpenAL::cleanup() { if(mALBuffer != AL_NONE) { + alGetError(); // clear error alDeleteBuffers(1, &mALBuffer); + + ALenum error = alutGetError(); + if(ALC_NO_ERROR != error) + { + LL_WARNS("OpenAL") << "Error: " << alutGetErrorString( error ) << " when cleaning up a buffer" << LL_ENDL; + } mALBuffer = AL_NONE; } } @@ -441,6 +452,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) F64 pitch; F64 center_freq; ALenum error; + ALuint *buffers = NULL; if (!mEnableWind) return; @@ -484,58 +496,68 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl; - - while(processed--) // unqueue old buffers + + //delete the old wind buffers + buffers = new ALuint[processed]; + alGetError(); /* clear error */ + alSourceUnqueueBuffers(mWindSource, processed, &buffers[0]); + error = alGetError(); + if(error != AL_NO_ERROR) { - ALuint buffer; - ALenum error; - alGetError(); /* clear error */ - alSourceUnqueueBuffers(mWindSource, 1, &buffer); - error = alGetError(); - if(error != AL_NO_ERROR) - { - llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; - } - else - { - alDeleteBuffers(1, &buffer); - } + llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; + } + else + { + alDeleteBuffers(processed, &buffers[0]); + } + // We dont need to keep track of the buffers' id now. + delete[] buffers; + buffers = NULL; + + //create the buffers for the empty wind buffers + unprocessed += mNumEmptyWindALBuffers; + buffers = new ALuint[mNumEmptyWindALBuffers]; + alGetError(); /* clear error */ + alGenBuffers(mNumEmptyWindALBuffers,&buffers[0]); + if((error=alGetError()) != AL_NO_ERROR) + { + llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl; + //break; } - unprocessed += mNumEmptyWindALBuffers; - while (mNumEmptyWindALBuffers > 0) // fill+queue new buffers + //fill the buffers with generated wind. + int errors = 0; + for(int i = 0; i < mNumEmptyWindALBuffers; i++) { - ALuint buffer; - alGetError(); /* clear error */ - alGenBuffers(1,&buffer); - if((error=alGetError()) != AL_NO_ERROR) - { - llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl; - break; - } - - alBufferData(buffer, - AL_FORMAT_STEREO16, - mWindGen->windGenerate(mWindBuf, - mWindBufSamples), - mWindBufBytes, - mWindBufFreq); + alBufferData(buffers[i], + AL_FORMAT_STEREO16, + mWindGen->windGenerate(mWindBuf, + mWindBufSamples), + mWindBufBytes, + mWindBufFreq); error = alGetError(); if(error != AL_NO_ERROR) { llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl; + errors++; } - - alSourceQueueBuffers(mWindSource, 1, &buffer); - error = alGetError(); - if(error != AL_NO_ERROR) - { - llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; - } - - --mNumEmptyWindALBuffers; } + //queue the buffers + alSourceQueueBuffers(mWindSource, mNumEmptyWindALBuffers, &buffers[0]); + error = alGetError(); + if(error != AL_NO_ERROR) + { + llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; + } + + mNumEmptyWindALBuffers = errors; + // We dont need to keep track of the buffers' id now. + delete[] buffers; + buffers = NULL; + + + //restart playing if not playing ALint playing; alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing); if(playing != AL_PLAYING) diff --git a/indra/llaudio/llaudioengine_openal.h b/indra/llaudio/llaudioengine_openal.h index f274c2185..ecfdbfe77 100644 --- a/indra/llaudio/llaudioengine_openal.h +++ b/indra/llaudio/llaudioengine_openal.h @@ -72,8 +72,8 @@ class LLAudioEngine_OpenAL : public LLAudioEngine ALuint mWindSource; int mNumEmptyWindALBuffers; - static const int MAX_NUM_WIND_BUFFERS = 80; - static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec + static const int MAX_NUM_WIND_BUFFERS = 80; + static const float WIND_BUFFER_SIZE_SEC; // 1/20th sec }; class LLAudioChannelOpenAL : public LLAudioChannel diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index b73626509..6652333ef 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -32,8 +32,8 @@ set(llcharacter_SOURCE_FILES llkeyframemotionparam.cpp llkeyframestandmotion.cpp llkeyframewalkmotion.cpp - llmotioncontroller.cpp llmotion.cpp + llmotioncontroller.cpp llmultigesture.cpp llpose.cpp llstatemachine.cpp @@ -45,8 +45,8 @@ set(llcharacter_HEADER_FILES CMakeLists.txt llanimationstates.h - llbvhloader.h llbvhconsts.h + llbvhloader.h llcharacter.h lleditingmotion.h llgesture.h diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index c7cf2655c..39260582a 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -35,8 +35,6 @@ //----------------------------------------------------------------------------- #include "linden_common.h" -#include "llmemtype.h" - #include "llmotioncontroller.h" #include "llkeyframemotion.h" #include "llmath.h" @@ -342,7 +340,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp) //----------------------------------------------------------------------------- LLMotion* LLMotionController::createMotion( const LLUUID &id ) { - LLMemType mt(LLMemType::MTYPE_ANIMATION); // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 43e4f030a..a6da6f0c3 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -19,6 +19,7 @@ set(llcommon_SOURCE_FILES aithreadid.cpp imageids.cpp indra_constants.cpp + ll_template_cast.h llallocator.cpp llallocator_heap_profile.cpp llapp.cpp @@ -54,22 +55,21 @@ set(llcommon_SOURCE_FILES llformat.cpp llframetimer.cpp llheartbeat.cpp + llindraconfigfile.cpp llinitparam.cpp llinstancetracker.cpp - llindraconfigfile.cpp llliveappconfig.cpp lllivefile.cpp lllog.cpp llmd5.cpp llmemory.cpp llmemorystream.cpp - llmemtype.cpp llmetrics.cpp llmortician.cpp lloptioninterface.cpp - llptrto.cpp llprocesslauncher.cpp llprocessor.cpp + llptrto.cpp llqueuedthread.cpp llrand.cpp llrefcount.cpp @@ -81,8 +81,8 @@ set(llcommon_SOURCE_FILES llsdutil.cpp llsecondlifeurls.cpp llsingleton.cpp - llstat.cpp llstacktrace.cpp + llstat.cpp llstreamtools.cpp llstring.cpp llstringtable.cpp @@ -93,7 +93,6 @@ set(llcommon_SOURCE_FILES lluri.cpp lluuid.cpp llworkerthread.cpp - ll_template_cast.h metaclass.cpp metaproperty.cpp reflective.cpp @@ -116,10 +115,9 @@ set(llcommon_HEADER_FILES linden_common.h linked_lists.h llaccountingcost.h + llagentconstants.h llallocator.h llallocator_heap_profile.h - llagentconstants.h - llavatarname.h llapp.h llapr.h llaprpool.h @@ -127,6 +125,7 @@ set(llcommon_HEADER_FILES llassoclist.h llatomic.h llavatarconstants.h + llavatarname.h llbase32.h llbase64.h llboost.h @@ -142,8 +141,8 @@ set(llcommon_HEADER_FILES lldarrayptr.h lldate.h lldefs.h - lldependencies.h lldeleteutils.h + lldependencies.h lldepthstack.h lldictionary.h lldlinked.h @@ -158,11 +157,11 @@ set(llcommon_HEADER_FILES lleventapi.h lleventcoro.h lleventdispatcher.h + lleventemitter.h lleventfilter.h llevents.h - lleventemitter.h - llextendedstatus.h lleventtimer.h + llextendedstatus.h llfasttimer.h llfasttimer_class.h llfile.h @@ -176,9 +175,9 @@ set(llcommon_HEADER_FILES llheartbeat.h llhttpstatuscodes.h llindexedqueue.h + llindraconfigfile.h llinitparam.h llinstancetracker.h - llindraconfigfile.h llkeythrottle.h lllinkedqueue.h llliveappconfig.h @@ -190,7 +189,6 @@ set(llcommon_HEADER_FILES llmd5.h llmemory.h llmemorystream.h - llmemtype.h llmetrics.h llmortician.h llnametable.h @@ -206,8 +204,8 @@ set(llcommon_HEADER_FILES llqueuedthread.h llrand.h llrefcount.h - llrun.h llrefcount.h + llrun.h llsafehandle.h llsd.h llsdserialize.h diff --git a/indra/llcommon/aithreadid.cpp b/indra/llcommon/aithreadid.cpp index e8dd17097..5e8b58bf6 100644 --- a/indra/llcommon/aithreadid.cpp +++ b/indra/llcommon/aithreadid.cpp @@ -51,6 +51,11 @@ void AIThreadID::set_current_thread_id(void) } #ifndef LL_DARWIN +void AIThreadID::clear(void) +{ + mID = undefinedID; +} + void AIThreadID::reset(void) { mID = lCurrentThread; diff --git a/indra/llcommon/aithreadid.h b/indra/llcommon/aithreadid.h index 3b3b1500c..cc7197b21 100644 --- a/indra/llcommon/aithreadid.h +++ b/indra/llcommon/aithreadid.h @@ -63,6 +63,7 @@ public: static void set_main_thread_id(void); // Called once to set sMainThreadID. static void set_current_thread_id(void); // Called once for every thread to set lCurrentThread. #ifndef LL_DARWIN + LL_COMMON_API void clear(void); LL_COMMON_API void reset(void); LL_COMMON_API bool equals_current_thread(void) const; LL_COMMON_API static bool in_main_thread(void); @@ -74,6 +75,7 @@ public: static apr_os_thread_t getCurrentThread_inline(void) { return lCurrentThread; } #else // Both variants are inline on OS X. + void clear(void) { mID = undefinedID; } void reset(void) { mID = apr_os_thread_current(); } void reset_inline(void) { mID = apr_os_thread_current(); } bool equals_current_thread(void) const { return apr_os_thread_equal(mID, apr_os_thread_current()); } diff --git a/indra/llcommon/aithreadsafe.h b/indra/llcommon/aithreadsafe.h index 461bb4cc5..bb0ac7e05 100644 --- a/indra/llcommon/aithreadsafe.h +++ b/indra/llcommon/aithreadsafe.h @@ -479,9 +479,6 @@ public: // Only for use by AITHREADSAFESIMPLE, see below. AIThreadSafeSimple(T* object) { llassert(object == AIThreadSafeBits::ptr()); } - // If MUTEX is a LLCondition then this can be used to wake up the waiting thread. - void signal() { mMutex.signal(); } - #if LL_DEBUG // Can only be locked when there still exists an AIAccess object that // references this object and will access it upon destruction. @@ -622,6 +619,8 @@ struct AIAccessConst // If MUTEX is an LLCondition, then this can be used to wait for a signal. void wait() { this->mWrapper.mMutex.wait(); } + // If MUTEX is a LLCondition then this can be used to wake up the waiting thread. + void signal() { this->mWrapper.mMutex.signal(); } protected: AIThreadSafeSimple& mWrapper; //!< Reference to the object that we provide access to. diff --git a/indra/llcommon/llhttpstatuscodes.h b/indra/llcommon/llhttpstatuscodes.h index 83dde17d9..31beb9bb4 100644 --- a/indra/llcommon/llhttpstatuscodes.h +++ b/indra/llcommon/llhttpstatuscodes.h @@ -90,6 +90,16 @@ const S32 HTTP_VERSION_NOT_SUPPORTED = 505; // These status codes should not be sent over the wire // and indicate something went wrong internally. // If you get these they are not normal. -const S32 HTTP_INTERNAL_ERROR = 499; +// Note that these are only related to curl, not to webkit. +const S32 HTTP_INTERNAL_ERROR_LOW_SPEED = 494; // The transfer (receiving data) stalled or was too slow. +const S32 HTTP_INTERNAL_ERROR_CURL_LOCKUP = 495; // Curl never returned at all for 10 minutes!?! +const S32 HTTP_INTERNAL_ERROR_CURL_BADSOCKET = 496; // Curl was aborted because the socket went bad!?! +const S32 HTTP_INTERNAL_ERROR_CURL_TIMEOUT = 497; // Curl returned a timeout error. +const S32 HTTP_INTERNAL_ERROR_CURL_OTHER = 498; // Any other curl error. +const S32 HTTP_INTERNAL_ERROR_OTHER = 499; // Every other internal error. + +// Return true if status is an internal error (not received from a server but generated internally). +bool inline is_internal_http_error(S32 status) { return status >= HTTP_INTERNAL_ERROR_LOW_SPEED && status <= HTTP_INTERNAL_ERROR_OTHER; } +bool inline is_internal_http_error_that_warrants_a_retry(S32 status) { return status >= HTTP_INTERNAL_ERROR_LOW_SPEED && status <= HTTP_INTERNAL_ERROR_CURL_OTHER; } #endif diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 255358260..8a0e0e66d 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -26,6 +26,7 @@ #ifndef LLMEMORY_H #define LLMEMORY_H +#include "linden_common.h" #include #include @@ -33,7 +34,7 @@ #include // uintptr_t #endif -#include "llmemtype.h" +class LLMutex ; #if LL_WINDOWS && LL_DEBUG #define LL_CHECK_MEMORY llassert(_CrtCheckMemory()); @@ -173,8 +174,8 @@ private: }; //---------------------------------------------------------------------------- -class LLMutex ; #if MEM_TRACK_MEM +class LLMutex ; class LL_COMMON_API LLMemTracker { private: diff --git a/indra/llcommon/llmemtype.cpp b/indra/llcommon/llmemtype.cpp deleted file mode 100644 index 614dee323..000000000 --- a/indra/llcommon/llmemtype.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/** - * @file llmemtype.cpp - * @brief Simple memory allocation/deallocation tracking stuff here - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llmemtype.h" -#include "llallocator.h" - -#if MEM_TRACK_TYPE -std::vector LLMemType::DeclareMemType::mNameList; -#endif - -LLMemType::DeclareMemType LLMemType::MTYPE_INIT("Init"); -LLMemType::DeclareMemType LLMemType::MTYPE_STARTUP("Startup"); -LLMemType::DeclareMemType LLMemType::MTYPE_MAIN("Main"); -LLMemType::DeclareMemType LLMemType::MTYPE_FRAME("Frame"); - -LLMemType::DeclareMemType LLMemType::MTYPE_GATHER_INPUT("GatherInput"); -LLMemType::DeclareMemType LLMemType::MTYPE_JOY_KEY("JoyKey"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE("Idle"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_PUMP("IdlePump"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_NETWORK("IdleNetwork"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_REGIONS("IdleUpdateRegions"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION("IdleUpdateViewerRegion"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_SURFACE("IdleUpdateSurface"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY("IdleUpdateParcelOverlay"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_AUDIO("IdleAudio"); - -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING("CacheProcessPending"); -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS("CacheProcessPendingAsks"); -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES("CacheProcessPendingReplies"); - -LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_CHECK_ALL("MessageCheckAll"); -LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_PROCESS_ACKS("MessageProcessAcks"); - -LLMemType::DeclareMemType LLMemType::MTYPE_RENDER("Render"); -LLMemType::DeclareMemType LLMemType::MTYPE_SLEEP("Sleep"); - -LLMemType::DeclareMemType LLMemType::MTYPE_NETWORK("Network"); -LLMemType::DeclareMemType LLMemType::MTYPE_PHYSICS("Physics"); -LLMemType::DeclareMemType LLMemType::MTYPE_INTERESTLIST("InterestList"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEBASE("ImageBase"); -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGERAW("ImageRaw"); -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEFORMATTED("ImageFormatted"); - -LLMemType::DeclareMemType LLMemType::MTYPE_APPFMTIMAGE("AppFmtImage"); -LLMemType::DeclareMemType LLMemType::MTYPE_APPRAWIMAGE("AppRawImage"); -LLMemType::DeclareMemType LLMemType::MTYPE_APPAUXRAWIMAGE("AppAuxRawImage"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DRAWABLE("Drawable"); - -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT("Object"); -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE("ObjectProcessUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE("ObjectProcessUpdateCore"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY("Display"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE("DisplayUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA("DisplayUpdateCam"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_GEOM("DisplayUpdateGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SWAP("DisplaySwap"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_HUD("DisplayUpdateHud"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_GEN_REFLECTION("DisplayGenRefl"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE("DisplayImageUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_STATE_SORT("DisplayStateSort"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SKY("DisplaySky"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_GEOM("DisplayRenderGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_FLUSH("DisplayRenderFlush"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_UI("DisplayRenderUI"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS("DisplayRenderAttach"); - -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DATA("VertexData"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CONSTRUCTOR("VertexConstr"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTRUCTOR("VertexDestr"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_VERTICES("VertexCreateVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_INDICES("VertexCreateIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_BUFFER("VertexDestroyBuff"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_INDICES("VertexDestroyIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_VERTS("VertexUpdateVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_INDICES("VertexUpdateIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER("VertexAllocateBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_RESIZE_BUFFER("VertexResizeBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER("VertexMapBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES("VertexMapBufferVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES("VertexMapBufferIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UNMAP_BUFFER("VertexUnmapBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_STRIDE("VertexSetStride"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_BUFFER("VertexSetBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER("VertexSetupVertBuff"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CLEANUP_CLASS("VertexCleanupClass"); - -LLMemType::DeclareMemType LLMemType::MTYPE_SPACE_PARTITION("SpacePartition"); - -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE("Pipeline"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_INIT("PipelineInit"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS("PipelineCreateBuffs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RESTORE_GL("PipelineRestroGL"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS("PipelineUnloadShaders"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL("PipelineLightingDetail"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE("PipelineGetPoolType"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_POOL("PipelineAddPool"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE("PipelineAllocDrawable"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_OBJECT("PipelineAddObj"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS("PipelineCreateObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_MOVE("PipelineUpdateMove"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_GEOM("PipelineUpdateGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_VISIBLE("PipelineMarkVisible"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_MOVED("PipelineMarkMoved"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_SHIFT("PipelineMarkShift"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS("PipelineShiftObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_TEXTURED("PipelineMarkTextured"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_REBUILD("PipelineMarkRebuild"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_CULL("PipelineUpdateCull"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_STATE_SORT("PipelineStateSort"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_POST_SORT("PipelinePostSort"); - -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS("PipelineHudEls"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HL("PipelineRenderHL"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM("PipelineRenderGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED("PipelineRenderGeomDef"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF("PipelineRenderGeomPostDef"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW("PipelineRenderGeomShadow"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_SELECT("PipelineRenderSelect"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_REBUILD_POOLS("PipelineRebuildPools"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP("PipelineQuickLookup"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS("PipelineRenderObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR("PipelineGenImpostors"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_BLOOM("PipelineRenderBloom"); - -LLMemType::DeclareMemType LLMemType::MTYPE_UPKEEP_POOLS("UpkeepPools"); - -LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR("Avatar"); -LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR_MESH("AvatarMesh"); -LLMemType::DeclareMemType LLMemType::MTYPE_PARTICLES("Particles"); -LLMemType::DeclareMemType LLMemType::MTYPE_REGIONS("Regions"); - -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY("Inventory"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DRAW("InventoryDraw"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS("InventoryBuildNewViews"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DO_FOLDER("InventoryDoFolder"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_POST_BUILD("InventoryPostBuild"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_FROM_XML("InventoryFromXML"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_CREATE_NEW_ITEM("InventoryCreateNewItem"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_INIT("InventoryViewInit"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_SHOW("InventoryViewShow"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE("InventoryViewToggle"); - -LLMemType::DeclareMemType LLMemType::MTYPE_ANIMATION("Animation"); -LLMemType::DeclareMemType LLMemType::MTYPE_VOLUME("Volume"); -LLMemType::DeclareMemType LLMemType::MTYPE_PRIMITIVE("Primitive"); - -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT("Script"); -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_RUN("ScriptRun"); -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_BYTECODE("ScriptByteCode"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IO_PUMP("IoPump"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_TCP("IoTCP"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_BUFFER("IoBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_HTTP_SERVER("IoHttpServer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_SERVER("IoSDServer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_CLIENT("IoSDClient"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DIRECTX_INIT("DirectXInit"); - -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP1("Temp1"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP2("Temp2"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP3("Temp3"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP4("Temp4"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP5("Temp5"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP6("Temp6"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP7("Temp7"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP8("Temp8"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP9("Temp9"); - -LLMemType::DeclareMemType LLMemType::MTYPE_OTHER("Other"); - -#if MEM_TRACK_TYPE -LLMemType::DeclareMemType::DeclareMemType(char const * st) -{ - mID = (S32)mNameList.size(); - mName = st; - - mNameList.push_back(mName); -} - -LLMemType::DeclareMemType::~DeclareMemType() -{ -} - -LLMemType::LLMemType(LLMemType::DeclareMemType& dt) -{ - mTypeIndex = dt.mID; - LLAllocator::pushMemType(dt.mID); -} - -LLMemType::~LLMemType() -{ - LLAllocator::popMemType(); -} - -char const * LLMemType::getNameFromID(S32 id) -{ - if (id < 0 || id >= (S32)DeclareMemType::mNameList.size()) - { - return "INVALID"; - } - - return DeclareMemType::mNameList[id]; -} - -//-------------------------------------------------------------------------------------------------- -#endif //MEM_TRACK_TYPE \ No newline at end of file diff --git a/indra/llcommon/llmemtype.h b/indra/llcommon/llmemtype.h deleted file mode 100644 index 9c3c98937..000000000 --- a/indra/llcommon/llmemtype.h +++ /dev/null @@ -1,251 +0,0 @@ -/** - * @file llmemtype.h - * @brief Runtime memory usage debugging utilities. - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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_MEMTYPE_H -#define LL_MEMTYPE_H - -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- - -#include "linden_common.h" -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// WARNING: Never commit with MEM_TRACK_MEM == 1 -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#define MEM_TRACK_MEM (0 && LL_WINDOWS) - -#include - - -class LL_COMMON_API LLMemType -{ -public: - - // class we'll initialize all instances of as - // static members of MemType. Then use - // to construct any new mem type. - class LL_COMMON_API DeclareMemType - { - public: - -#if !MEM_TRACK_TYPE - DeclareMemType(char const * st) {}; //Do nothing -#else - DeclareMemType(char const * st); - ~DeclareMemType(); - - S32 mID; - char const * mName; - - // array so we can map an index ID to Name - static std::vector mNameList; -#endif - }; - -#if !MEM_TRACK_TYPE - LLMemType(DeclareMemType& dt){} //Do nothing -#else - LLMemType(DeclareMemType& dt); - ~LLMemType(); - - static char const * getNameFromID(S32 id); -#endif - - static DeclareMemType MTYPE_INIT; - static DeclareMemType MTYPE_STARTUP; - static DeclareMemType MTYPE_MAIN; - static DeclareMemType MTYPE_FRAME; - - static DeclareMemType MTYPE_GATHER_INPUT; - static DeclareMemType MTYPE_JOY_KEY; - - static DeclareMemType MTYPE_IDLE; - static DeclareMemType MTYPE_IDLE_PUMP; - static DeclareMemType MTYPE_IDLE_NETWORK; - static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS; - static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION; - static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE; - static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY; - static DeclareMemType MTYPE_IDLE_AUDIO; - - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING; - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS; - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES; - - static DeclareMemType MTYPE_MESSAGE_CHECK_ALL; - static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS; - - static DeclareMemType MTYPE_RENDER; - static DeclareMemType MTYPE_SLEEP; - - static DeclareMemType MTYPE_NETWORK; - static DeclareMemType MTYPE_PHYSICS; - static DeclareMemType MTYPE_INTERESTLIST; - - static DeclareMemType MTYPE_IMAGEBASE; - static DeclareMemType MTYPE_IMAGERAW; - static DeclareMemType MTYPE_IMAGEFORMATTED; - - static DeclareMemType MTYPE_APPFMTIMAGE; - static DeclareMemType MTYPE_APPRAWIMAGE; - static DeclareMemType MTYPE_APPAUXRAWIMAGE; - - static DeclareMemType MTYPE_DRAWABLE; - - static DeclareMemType MTYPE_OBJECT; - static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE; - static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE; - - static DeclareMemType MTYPE_DISPLAY; - static DeclareMemType MTYPE_DISPLAY_UPDATE; - static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA; - static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM; - static DeclareMemType MTYPE_DISPLAY_SWAP; - static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD; - static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION; - static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE; - static DeclareMemType MTYPE_DISPLAY_STATE_SORT; - static DeclareMemType MTYPE_DISPLAY_SKY; - static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM; - static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH; - static DeclareMemType MTYPE_DISPLAY_RENDER_UI; - static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS; - - static DeclareMemType MTYPE_VERTEX_DATA; - static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR; - static DeclareMemType MTYPE_VERTEX_DESTRUCTOR; - static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES; - static DeclareMemType MTYPE_VERTEX_CREATE_INDICES; - static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER; - static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES; - static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS; - static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES; - static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER; - static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES; - static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER; - static DeclareMemType MTYPE_VERTEX_SET_STRIDE; - static DeclareMemType MTYPE_VERTEX_SET_BUFFER; - static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER; - static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS; - - static DeclareMemType MTYPE_SPACE_PARTITION; - - static DeclareMemType MTYPE_PIPELINE; - static DeclareMemType MTYPE_PIPELINE_INIT; - static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS; - static DeclareMemType MTYPE_PIPELINE_RESTORE_GL; - static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS; - static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL; - static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE; - static DeclareMemType MTYPE_PIPELINE_ADD_POOL; - static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE; - static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT; - static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE; - static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM; - static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE; - static DeclareMemType MTYPE_PIPELINE_MARK_MOVED; - static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT; - static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED; - static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD; - static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL; - static DeclareMemType MTYPE_PIPELINE_STATE_SORT; - static DeclareMemType MTYPE_PIPELINE_POST_SORT; - - static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS; - static DeclareMemType MTYPE_PIPELINE_RENDER_HL; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW; - static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT; - static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS; - static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP; - static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR; - static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM; - - static DeclareMemType MTYPE_UPKEEP_POOLS; - - static DeclareMemType MTYPE_AVATAR; - static DeclareMemType MTYPE_AVATAR_MESH; - static DeclareMemType MTYPE_PARTICLES; - static DeclareMemType MTYPE_REGIONS; - - static DeclareMemType MTYPE_INVENTORY; - static DeclareMemType MTYPE_INVENTORY_DRAW; - static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS; - static DeclareMemType MTYPE_INVENTORY_DO_FOLDER; - static DeclareMemType MTYPE_INVENTORY_POST_BUILD; - static DeclareMemType MTYPE_INVENTORY_FROM_XML; - static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM; - static DeclareMemType MTYPE_INVENTORY_VIEW_INIT; - static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW; - static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE; - - static DeclareMemType MTYPE_ANIMATION; - static DeclareMemType MTYPE_VOLUME; - static DeclareMemType MTYPE_PRIMITIVE; - - static DeclareMemType MTYPE_SCRIPT; - static DeclareMemType MTYPE_SCRIPT_RUN; - static DeclareMemType MTYPE_SCRIPT_BYTECODE; - - static DeclareMemType MTYPE_IO_PUMP; - static DeclareMemType MTYPE_IO_TCP; - static DeclareMemType MTYPE_IO_BUFFER; - static DeclareMemType MTYPE_IO_HTTP_SERVER; - static DeclareMemType MTYPE_IO_SD_SERVER; - static DeclareMemType MTYPE_IO_SD_CLIENT; - - static DeclareMemType MTYPE_DIRECTX_INIT; - - static DeclareMemType MTYPE_TEMP1; - static DeclareMemType MTYPE_TEMP2; - static DeclareMemType MTYPE_TEMP3; - static DeclareMemType MTYPE_TEMP4; - static DeclareMemType MTYPE_TEMP5; - static DeclareMemType MTYPE_TEMP6; - static DeclareMemType MTYPE_TEMP7; - static DeclareMemType MTYPE_TEMP8; - static DeclareMemType MTYPE_TEMP9; - - static DeclareMemType MTYPE_OTHER; // Special; used by display code - -#if MEM_TRACK_TYPE - S32 mTypeIndex; -#endif -}; - -//---------------------------------------------------------------------------- - -#endif - diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 45aae60e8..78b8f95be 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -226,7 +226,7 @@ void LLSingleton::createInstance(SingletonInstanceData& data) if (data.mInitState == INITIALIZING) { - lldebugs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from initSingleton(), using half-initialized object" << llendl; + llerrs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from initSingleton(), using half-initialized object" << llendl; return; } diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index f64200c95..1f6765935 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -470,6 +470,7 @@ public: void unref() { + llassert(mRef > 0); if (!--mRef) delete this; } S32 getNumRefs() const diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index fa81302cb..7e5d648fa 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -48,7 +48,7 @@ // Locally used constants // const U32 SEC_PER_DAY = 86400; -const F64 SEC_TO_MICROSEC = 1000000.f; +const F64 SEC_TO_MICROSEC = 1000000.0; const U64 SEC_TO_MICROSEC_U64 = 1000000; const F64 USEC_TO_SEC_F64 = 0.000001; diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 7880271c3..c09361144 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -49,6 +49,7 @@ #include "llhttpclient.h" #include "llsdserialize.h" #include "llcurl.h" +#include "aistatemachine.h" LLPumpIO* gServicePump; BOOL gBreak = false; @@ -56,6 +57,7 @@ BOOL gSent = false; class AIHTTPTimeoutPolicy; extern AIHTTPTimeoutPolicy crashLoggerResponder_timeout; +extern void startEngineThread(void); class LLCrashLoggerResponder : public LLHTTPClient::ResponderWithResult { @@ -374,7 +376,7 @@ void LLCrashLogger::updateApplication(const std::string& message) { gServicePump->pump(); gServicePump->callback(); - //FIXME: AIStateMachine::mainloop(); needs CPU cycles. Can't call it from here though, because it uses gSavedSettings which is part of newview. + gMainThreadEngine.mainloop(); } bool LLCrashLogger::init() @@ -382,6 +384,17 @@ bool LLCrashLogger::init() // Initialize curl AICurlInterface::initCurl(); + // Initialize state machine engines. + AIEngine::setMaxCount(100); // StateMachineMaxTime + + // Start state machine thread. + startEngineThread(); + + // Start curl thread. + AICurlInterface::startCurlThread(64, // CurlMaxTotalConcurrentConnections + 8, // CurlConcurrentConnectionsPerHost + true); // NoVerifySSLCert + // We assume that all the logs we're looking for reside on the current drive gDirUtilp->initAppDirs("SecondLife"); diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index b292fad2a..431744c42 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -22,8 +22,8 @@ include_directories( ) set(llimage_SOURCE_FILES - llimagebmp.cpp llimage.cpp + llimagebmp.cpp llimagedxt.cpp llimagej2c.cpp llimagejpeg.cpp @@ -35,6 +35,7 @@ set(llimage_SOURCE_FILES set(llimage_HEADER_FILES CMakeLists.txt + llimage.h llimagebmp.h llimagedxt.h diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 1f7b47298..6f3deba0c 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -30,7 +30,6 @@ #include "llmath.h" #include "v4coloru.h" -#include "llmemtype.h" #include "llimagebmp.h" #include "llimagetga.h" @@ -93,8 +92,7 @@ LLImageBase::LLImageBase() mHeight(0), mComponents(0), mBadBufferAllocation(false), - mAllowOverSize(false), - mMemType(LLMemType::MTYPE_IMAGEBASE) + mAllowOverSize(false) { } @@ -164,8 +162,6 @@ void LLImageBase::deleteData() // virtual U8* LLImageBase::allocateData(S32 size) { - LLMemType mt1(mMemType); - if (size < 0) { size = mWidth * mHeight * mComponents; @@ -226,7 +222,6 @@ U8* LLImageBase::reallocateData(S32 size) if(mData && (mDataSize == size)) return mData; - LLMemType mt1(mMemType); U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size); if (!new_datap) { @@ -293,14 +288,12 @@ S32 LLImageRaw::sRawImageCachedCount = 0; LLImageRaw::LLImageRaw() : LLImageBase(), mCacheEntries(0) { - mMemType = LLMemType::MTYPE_IMAGERAW; ++sRawImageCount; } LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) : LLImageBase(), mCacheEntries(0) { - mMemType = LLMemType::MTYPE_IMAGERAW; llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE ); allocateDataSize(width, height, components); ++sRawImageCount; @@ -309,7 +302,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components) : LLImageBase(), mCacheEntries(0) { - mMemType = LLMemType::MTYPE_IMAGERAW; if(allocateDataSize(width, height, components) && data) { memcpy(getData(), data, width*height*components); @@ -319,7 +311,6 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components) LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_offset, bool crop_vertically) : mCacheEntries(0) { - mMemType = LLMemType::MTYPE_IMAGERAW; llassert_always(src); S8 const components = src->getComponents(); U8 const* const data = src->getData(); @@ -343,11 +334,11 @@ LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_of ++sRawImageCount; } -/*LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only) - : LLImageBase(), mCacheEntries(0) -{ - createFromFile(filename, j2c_lowest_mip_only); -}*/ +//LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only) +// : LLImageBase(), mCacheEntries(0) +//{ +// createFromFile(filename, j2c_lowest_mip_only); +//} LLImageRaw::~LLImageRaw() { @@ -416,7 +407,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components) #if 0 U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const { - LLMemType mt1(mMemType); U8 *data = new U8[width*height*getComponents()]; // Should do some simple bounds checking @@ -500,7 +490,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a) // Reverses the order of the rows in the image void LLImageRaw::verticalFlip() { - LLMemType mt1(mMemType); S32 row_bytes = getWidth() * getComponents(); llassert(row_bytes > 0); try @@ -640,7 +629,6 @@ void LLImageRaw::composite( LLImageRaw* src ) // Src and dst can be any size. Src has 4 components. Dst has 3 components. void LLImageRaw::compositeScaled4onto3(LLImageRaw* src) { - LLMemType mt1(mMemType); llinfos << "compositeScaled4onto3" << llendl; LLImageRaw* dst = this; // Just for clarity. @@ -915,7 +903,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src ) // Src and dst can be any size. Src and dst have same number of components. void LLImageRaw::copyScaled( LLImageRaw* src ) { - LLMemType mt1(mMemType); LLImageRaw* dst = this; // Just for clarity. llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) ); @@ -956,8 +943,6 @@ void LLImageRaw::copyScaled( LLImageRaw* src ) //scale down image by not blending a pixel with its neighbors. BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height) { - LLMemType mt1(mMemType); - S8 c = getComponents() ; llassert((1 == c) || (3 == c) || (4 == c) ); @@ -1002,7 +987,6 @@ BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height) BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data ) { - LLMemType mt1(mMemType); llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) ); S32 old_width = getWidth(); @@ -1439,7 +1423,6 @@ LLImageFormatted::LLImageFormatted(S8 codec) mDecoded(0), mDiscardLevel(-1) { - mMemType = LLMemType::MTYPE_IMAGEFORMATTED; } // virtual diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 6d6844e0e..012031338 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -36,7 +36,6 @@ #include "lluuid.h" #include "llstring.h" #include "llthread.h" -#include "llmemtype.h" #include "aithreadsafe.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 @@ -163,8 +162,6 @@ private: bool mAllowOverSize ; static LLPrivateMemoryPool* sPrivatePoolp ; -public: - LLMemType::DeclareMemType& mMemType; // debug }; // Raw representation of an image (used for textures, and other uncompressed formats diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 987c95f3f..06e4290ca 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -35,7 +35,6 @@ #include "lldir.h" #include "../llxml/llcontrol.h" #include "llimagej2c.h" -#include "llmemtype.h" typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)(); typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*); @@ -291,8 +290,6 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time) // Returns TRUE to mean done, whether successful or not. BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count ) { - LLMemType mt1(mMemType); - BOOL res = TRUE; resetLastError(); @@ -341,7 +338,6 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time) BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time) { - LLMemType mt1(mMemType); resetLastError(); BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible); if (!mLastError.empty()) @@ -518,8 +514,6 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename) BOOL LLImageJ2C::validate(U8 *data, U32 file_size) { - LLMemType mt1(mMemType); - resetLastError(); setData(data, file_size); diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index fd362a6a2..a88894da9 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -30,7 +30,6 @@ #include "lldarray.h" #include "llfoldertype.h" #include "llinventorytype.h" -#include "llmemtype.h" #include "llpermissions.h" #include "llrefcount.h" #include "llsaleinfo.h" diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index c168f7a89..1c43bb218 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -21,12 +21,12 @@ set(llmath_SOURCE_FILES llperlin.cpp llquaternion.cpp llrect.cpp + llsdutil_math.cpp llsphere.cpp llvector4a.cpp llvolume.cpp llvolumemgr.cpp llvolumeoctree.cpp - llsdutil_math.cpp m3math.cpp m4math.cpp raytrace.cpp @@ -66,6 +66,7 @@ set(llmath_HEADER_FILES llquaternion2.h llquaternion2.inl llrect.h + llsdutil_math.h llsimdmath.h llsimdtypes.h llsimdtypes.inl @@ -77,7 +78,6 @@ set(llmath_HEADER_FILES llvolume.h llvolumemgr.h llvolumeoctree.h - llsdutil_math.h m3math.h m4math.h raytrace.h diff --git a/indra/llmath/llcalcparser.cpp b/indra/llmath/llcalcparser.cpp deleted file mode 100644 index fd55376fa..000000000 --- a/indra/llmath/llcalcparser.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * LLCalcParser.cpp - * SecondLife - * - * Created by Aimee Walton on 28/09/2008. - * Copyright 2008 Aimee Walton. - * - */ - -#include "linden_common.h" - -#include "llcalcparser.h" -using namespace boost::spirit::classic; - -F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string::iterator& end) const -{ - LLCalc::calc_map_t::iterator iter; - - std::string name(start, end); - - if (mConstants) - { - iter = mConstants->find(name); - if (iter != mConstants->end()) - { - return (*iter).second; - } - } - else - { - // This should never happen! - throw_(end, std::string("Missing constants table")); - } - - if (mVariables) - { - iter = mVariables->find(name); - if (iter != mVariables->end()) - { - return (*iter).second; - } - } - - throw_(end, std::string("Unknown symbol " + name)); - return 0.f; -} diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 1d2b7c257..e3b39344d 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -507,7 +507,7 @@ public: //is it here? if (isInside(data->getPositionGroup())) { - if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) || + if (((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius())) || (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity))) { //it belongs here /*mElementCount++; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 1f7862ea8..fdba388b1 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -35,7 +35,6 @@ #include #include "llerror.h" -#include "llmemtype.h" #include "llvolumemgr.h" #include "v2math.h" @@ -378,8 +377,6 @@ public: LLProfile::Face* LLProfile::addCap(S16 faceID) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - Face *face = vector_append(mFaces, 1); face->mIndex = 0; @@ -392,8 +389,6 @@ LLProfile::Face* LLProfile::addCap(S16 faceID) LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - Face *face = vector_append(mFaces, 1); face->mIndex = i; @@ -409,7 +404,6 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO //static S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) { // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); S32 np = 0; // Generate an n-sided "circular" path. @@ -475,8 +469,6 @@ S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 of // filleted and chamfered corners void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - // Generate an n-sided "circular" path. // 0 is (1,0), and we go counter-clockwise along a circular path from there. const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f }; @@ -730,8 +722,6 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3 S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { // this is basically LLProfile::generate stripped down to only operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (detail < MIN_LOD) { detail = MIN_LOD; @@ -842,8 +832,6 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if ((!mDirty) && (!is_sculpted)) { return FALSE; @@ -1116,8 +1104,6 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai BOOL LLProfileParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1193,8 +1179,6 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1286,7 +1270,6 @@ bool LLProfileParams::fromLLSD(LLSD& sd) void LLProfileParams::copyParams(const LLProfileParams ¶ms) { - LLMemType m1(LLMemType::MTYPE_VOLUME); setCurveType(params.getCurveType()); setBegin(params.getBegin()); setEnd(params.getEnd()); @@ -1503,8 +1486,6 @@ const LLVector2 LLPathParams::getEndScale() const S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) { // this is basically LLPath::generate stripped down to only the operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (detail < MIN_LOD) { detail = MIN_LOD; @@ -1554,8 +1535,6 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if ((!mDirty) && (!is_sculpted)) { return FALSE; @@ -1683,8 +1662,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - mOpen = TRUE; // Draw end caps if (getPathLength() == 0) { @@ -1706,8 +1683,6 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLPathParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1852,8 +1827,6 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const BOOL LLPathParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -2061,8 +2034,6 @@ S32 LLVolume::sNumMeshPoints = 0; LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL generate_single_face, const BOOL is_unique) : mParams(params) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - mUnique = is_unique; mFaceMask = 0x0; mDetail = detail; @@ -2134,7 +2105,6 @@ LLVolume::~LLVolume() BOOL LLVolume::generate() { - LLMemType m1(LLMemType::MTYPE_VOLUME); llassert_always(mProfilep); //Added 10.03.05 Dave Parks @@ -2171,7 +2141,7 @@ BOOL LLVolume::generate() mLODScaleBias.setVec(0.6f, 0.6f, 0.6f); } - // ******************************************************************** + //******************************************************************** //debug info, to be removed if((U32)(mPathp->mPath.size() * mProfilep->mProfile.size()) > (1u << 20)) { @@ -2183,7 +2153,7 @@ BOOL LLVolume::generate() llerrs << "LLVolume corrupted!" << llendl ; } - // ******************************************************************** + //******************************************************************** BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); @@ -2193,7 +2163,7 @@ BOOL LLVolume::generate() S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); - // ******************************************************************** + //******************************************************************** //debug info, to be removed if((U32)(sizeS * sizeT) > (1u << 20)) { @@ -2206,7 +2176,7 @@ BOOL LLVolume::generate() llerrs << "LLVolume corrupted!" << llendl ; } - // ******************************************************************** + //******************************************************************** sNumMeshPoints -= mMesh.size(); mMesh.resize(sizeT * sizeS); @@ -2730,8 +2700,6 @@ S32 LLVolume::getNumFaces() const void LLVolume::createVolumeFaces() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (mGenerateSingleFace) { // do nothing @@ -2903,8 +2871,6 @@ F32 LLVolume::sculptGetSurfaceArea() // create placeholder shape void LLVolume::sculptGeneratePlaceholder() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); @@ -2940,10 +2906,7 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR - - - LLMemType m1(LLMemType::MTYPE_VOLUME); - + S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); @@ -3117,7 +3080,6 @@ bool sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32 // sculpt replaces generate() for sculpted surfaces void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level) { - LLMemType m1(LLMemType::MTYPE_VOLUME); U8 sculpt_type = mParams.getSculptType(); BOOL data_is_empty = FALSE; @@ -3268,7 +3230,6 @@ bool LLVolumeParams::operator<(const LLVolumeParams ¶ms) const void LLVolumeParams::copyParams(const LLVolumeParams ¶ms) { - LLMemType m1(LLMemType::MTYPE_VOLUME); mProfileParams.copyParams(params.mProfileParams); mPathParams.copyParams(params.mPathParams); mSculptID = params.getSculptID(); @@ -3640,8 +3601,6 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h S32 *LLVolume::getTriangleIndices(U32 &num_indices) const { - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 expected_num_triangle_indices = getNumTriangleIndices(); if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES) { @@ -4369,8 +4328,6 @@ void LLVolume::generateSilhouetteVertices(std::vector &vertices, const LLMatrix3& norm_mat_in, S32 face_mask) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - LLMatrix4a mat; mat.loadu(mat_in); @@ -4832,8 +4789,6 @@ BOOL equalTriangle(const S32 *a, const S32 *b) BOOL LLVolumeParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - //llinfos << "importing volume" << llendl; const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -4888,8 +4843,6 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - //llinfos << "importing volume" << llendl; const S32 BUFSIZE = 16384; // *NOTE: changing the size or type of this buffer will require @@ -4929,8 +4882,6 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const { - LLMemType m1(LLMemType::MTYPE_VOLUME); - output_stream <<"\tshape 0\n"; output_stream <<"\t{\n"; mPathParams.exportLegacyStream(output_stream); @@ -6146,8 +6097,6 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0, BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const std::vector& mesh = volume->getMesh(); const std::vector& profile = volume->getProfile().mProfile; S32 max_s = volume->getProfile().getTotal(); @@ -6293,8 +6242,6 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (!(mTypeMask & HOLLOW_MASK) && !(mTypeMask & OPEN_MASK) && ((volume->getParams().getPathParams().getBegin()==0.0f)&& @@ -6681,8 +6628,6 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) void LLVolumeFace::createBinormals() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (!mBinormals) { allocateBinormals(mNumVertices); @@ -6954,8 +6899,6 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - BOOL flat = mTypeMask & FLAT_MASK; U8 sculpt_type = volume->getParams().getSculptType(); diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp index 42180197f..dcc2d81cf 100644 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -26,7 +26,6 @@ #include "linden_common.h" #include "llvolumemgr.h" -#include "llmemtype.h" #include "llvolume.h" @@ -182,7 +181,6 @@ void LLVolumeMgr::insertGroup(LLVolumeLODGroup* volgroup) // protected LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params) { - LLMemType m1(LLMemType::MTYPE_VOLUME); LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params); insertGroup(volgroup); return volgroup; @@ -297,7 +295,6 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 detail) mRefs++; if (mVolumeLODs[detail].isNull()) { - LLMemType m1(LLMemType::MTYPE_VOLUME); mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]); } mLODRefs[detail]++; diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index f3e68b53b..ebee8c548 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -30,7 +30,6 @@ set(llmessage_SOURCE_FILES aihttptimeout.cpp aihttptimeoutpolicy.cpp debug_libcurl.cpp - llhttpclient.cpp llares.cpp llareslistener.cpp llassetstorage.cpp @@ -46,6 +45,7 @@ set(llmessage_SOURCE_FILES lldispatcher.cpp llfiltersd2xmlrpc.cpp llhost.cpp + llhttpclient.cpp llhttpnode.cpp llhttpsender.cpp llinstantmessage.cpp @@ -91,9 +91,9 @@ set(llmessage_SOURCE_FILES lluseroperation.cpp llxfer.cpp llxfer_file.cpp - llxfermanager.cpp llxfer_mem.cpp llxfer_vfile.cpp + llxfermanager.cpp llxorcipher.cpp machine.cpp message.cpp @@ -111,8 +111,8 @@ set(llmessage_HEADER_FILES aicurl.h aicurleasyrequeststatemachine.h - aicurlprivate.h aicurlperhost.h + aicurlprivate.h aicurlthread.h aihttpheaders.h aihttptimeout.h @@ -166,8 +166,8 @@ set(llmessage_HEADER_FILES llpacketbuffer.h llpacketring.h llpartdata.h - llpumpio.h llproxy.h + llpumpio.h llqueryflags.h llregionflags.h llregionhandle.h @@ -193,10 +193,10 @@ set(llmessage_HEADER_FILES lluseroperation.h llvehicleparams.h llxfer.h - llxfermanager.h llxfer_file.h llxfer_mem.h llxfer_vfile.h + llxfermanager.h llxorcipher.h machine.h mean_collision_data.h diff --git a/indra/llmessage/aicurl.cpp b/indra/llmessage/aicurl.cpp index 2bb76b5ab..6ea7528bc 100644 --- a/indra/llmessage/aicurl.cpp +++ b/indra/llmessage/aicurl.cpp @@ -418,7 +418,8 @@ void cleanupCurl(void) stopCurlThread(); if (CurlMultiHandle::getTotalMultiHandles() != 0) llwarns << "Not all CurlMultiHandle objects were destroyed!" << llendl; - AIStateMachine::flush(); + gMainThreadEngine.flush(); // Not really related to curl, but why not. + gStateMachineThreadEngine.flush(); clearCommandQueue(); Stats::print(); ssl_cleanup(); @@ -770,6 +771,22 @@ void CurlEasyRequest::setoptString(CURLoption option, std::string const& value) setopt(option, value.c_str()); } +void CurlEasyRequest::setPut(U32 size, bool keepalive) +{ + DoutCurl("PUT size is " << size << " bytes."); + mContentLength = size; + + // The server never replies with 100-continue, so suppress the "Expect: 100-continue" header that libcurl adds by default. + addHeader("Expect:"); + if (size > 0 && keepalive) + { + addHeader("Connection: keep-alive"); + addHeader("Keep-alive: 300"); + } + setopt(CURLOPT_UPLOAD, 1); + setopt(CURLOPT_INFILESIZE, size); +} + void CurlEasyRequest::setPost(AIPostFieldPtr const& postdata, U32 size, bool keepalive) { llassert_always(postdata->data()); @@ -787,6 +804,7 @@ void CurlEasyRequest::setPost_raw(U32 size, char const* data, bool keepalive) // data == NULL when we're going to read the data using CURLOPT_READFUNCTION. DoutCurl("POST size is " << size << " bytes."); } + mContentLength = size; // The server never replies with 100-continue, so suppress the "Expect: 100-continue" header that libcurl adds by default. addHeader("Expect:"); @@ -872,13 +890,13 @@ void CurlEasyRequest::setSSLCtxCallback(curl_ssl_ctx_callback callback, void* us static size_t noHeaderCallback(char* ptr, size_t size, size_t nmemb, void* userdata) { llmaybewarns << "Calling noHeaderCallback(); curl session aborted." << llendl; - return 0; // Cause a CURL_WRITE_ERROR + return 0; // Cause a CURLE_WRITE_ERROR } static size_t noWriteCallback(char* ptr, size_t size, size_t nmemb, void* userdata) { llmaybewarns << "Calling noWriteCallback(); curl session aborted." << llendl; - return 0; // Cause a CURL_WRITE_ERROR + return 0; // Cause a CURLE_WRITE_ERROR } static size_t noReadCallback(char* ptr, size_t size, size_t nmemb, void* userdata) @@ -1276,7 +1294,7 @@ static int const HTTP_REDIRECTS_DEFAULT = 10; LLChannelDescriptors const BufferedCurlEasyRequest::sChannels; -BufferedCurlEasyRequest::BufferedCurlEasyRequest() : mRequestTransferedBytes(0), mResponseTransferedBytes(0), mBufferEventsTarget(NULL), mStatus(HTTP_INTERNAL_ERROR) +BufferedCurlEasyRequest::BufferedCurlEasyRequest() : mRequestTransferedBytes(0), mResponseTransferedBytes(0), mBufferEventsTarget(NULL), mStatus(HTTP_INTERNAL_ERROR_OTHER) { AICurlInterface::Stats::BufferedCurlEasyRequest_count++; } @@ -1311,7 +1329,7 @@ BufferedCurlEasyRequest::~BufferedCurlEasyRequest() void BufferedCurlEasyRequest::timed_out(void) { - mResponder->finished(CURLE_OK, HTTP_INTERNAL_ERROR, "Request timeout, aborted.", sChannels, mOutput); + mResponder->finished(CURLE_OK, HTTP_INTERNAL_ERROR_CURL_LOCKUP, "Request timeout, aborted.", sChannels, mOutput); if (mResponder->needsHeaders()) { send_buffer_events_to(NULL); // Revoke buffer events: we send them to the responder. @@ -1321,7 +1339,7 @@ void BufferedCurlEasyRequest::timed_out(void) void BufferedCurlEasyRequest::bad_socket(void) { - mResponder->finished(CURLE_OK, HTTP_INTERNAL_ERROR, "File descriptor went bad! Aborted.", sChannels, mOutput); + mResponder->finished(CURLE_OK, HTTP_INTERNAL_ERROR_CURL_BADSOCKET, "File descriptor went bad! Aborted.", sChannels, mOutput); if (mResponder->needsHeaders()) { send_buffer_events_to(NULL); // Revoke buffer events: we send them to the responder. @@ -1342,7 +1360,7 @@ void BufferedCurlEasyRequest::resetState(void) mRequestTransferedBytes = 0; mResponseTransferedBytes = 0; mBufferEventsTarget = NULL; - mStatus = HTTP_INTERNAL_ERROR; + mStatus = HTTP_INTERNAL_ERROR_OTHER; } void BufferedCurlEasyRequest::print_diagnostics(CURLcode code) diff --git a/indra/llmessage/aicurl.h b/indra/llmessage/aicurl.h index 16d1b14fd..3113e7e18 100644 --- a/indra/llmessage/aicurl.h +++ b/indra/llmessage/aicurl.h @@ -52,8 +52,6 @@ #include "stdtypes.h" // U16, S32, U32, F64 #include "llatomic.h" // LLAtomicU32 #include "aithreadsafe.h" -#include "llhttpstatuscodes.h" -#include "llhttpclient.h" // Debug Settings. extern bool gNoVerifySSLCert; diff --git a/indra/llmessage/aicurleasyrequeststatemachine.cpp b/indra/llmessage/aicurleasyrequeststatemachine.cpp index b9f486d67..ed2bf820d 100644 --- a/indra/llmessage/aicurleasyrequeststatemachine.cpp +++ b/indra/llmessage/aicurleasyrequeststatemachine.cpp @@ -36,10 +36,8 @@ enum curleasyrequeststatemachine_state_type { AICurlEasyRequestStateMachine_addRequest = AIStateMachine::max_state, AICurlEasyRequestStateMachine_waitAdded, - AICurlEasyRequestStateMachine_added, - AICurlEasyRequestStateMachine_timedOut, // This must be smaller than the rest, so they always overrule. - AICurlEasyRequestStateMachine_finished, - AICurlEasyRequestStateMachine_removed, // The removed states must be largest two, so they are never ignored. + AICurlEasyRequestStateMachine_timedOut, // This must be smaller than the rest, so they always overrule. + AICurlEasyRequestStateMachine_removed, // The removed states must be largest two, so they are never ignored. AICurlEasyRequestStateMachine_removed_after_finished, AICurlEasyRequestStateMachine_bad_file_descriptor }; @@ -50,9 +48,7 @@ char const* AICurlEasyRequestStateMachine::state_str_impl(state_type run_state) { AI_CASE_RETURN(AICurlEasyRequestStateMachine_addRequest); AI_CASE_RETURN(AICurlEasyRequestStateMachine_waitAdded); - AI_CASE_RETURN(AICurlEasyRequestStateMachine_added); AI_CASE_RETURN(AICurlEasyRequestStateMachine_timedOut); - AI_CASE_RETURN(AICurlEasyRequestStateMachine_finished); AI_CASE_RETURN(AICurlEasyRequestStateMachine_removed); AI_CASE_RETURN(AICurlEasyRequestStateMachine_removed_after_finished); AI_CASE_RETURN(AICurlEasyRequestStateMachine_bad_file_descriptor); @@ -77,14 +73,12 @@ void AICurlEasyRequestStateMachine::initialize_impl(void) // CURL-THREAD void AICurlEasyRequestStateMachine::added_to_multi_handle(AICurlEasyRequest_wat&) { - set_state(AICurlEasyRequestStateMachine_added); } // CURL-THREAD void AICurlEasyRequestStateMachine::finished(AICurlEasyRequest_wat&) { mFinished = true; - set_state(AICurlEasyRequestStateMachine_finished); } // CURL-THREAD @@ -93,7 +87,7 @@ void AICurlEasyRequestStateMachine::removed_from_multi_handle(AICurlEasyRequest_ llassert(mFinished || mTimedOut); // If we neither finished nor timed out, then why is this being removed? // Note that allowing this would cause an assertion later on for removing // a BufferedCurlEasyRequest with a still active Responder. - set_state(mFinished ? AICurlEasyRequestStateMachine_removed_after_finished : AICurlEasyRequestStateMachine_removed); + advance_state(mFinished ? AICurlEasyRequestStateMachine_removed_after_finished : AICurlEasyRequestStateMachine_removed); } // CURL-THREAD @@ -102,7 +96,7 @@ void AICurlEasyRequestStateMachine::bad_file_descriptor(AICurlEasyRequest_wat&) if (!mFinished) { mFinished = true; - set_state(AICurlEasyRequestStateMachine_bad_file_descriptor); + advance_state(AICurlEasyRequestStateMachine_bad_file_descriptor); } } @@ -114,59 +108,46 @@ void AICurlEasyRequestStateMachine::queued_for_removal(AICurlEasyRequest_wat&) } #endif -void AICurlEasyRequestStateMachine::multiplex_impl(void) +void AICurlEasyRequestStateMachine::multiplex_impl(state_type run_state) { - mSetStateLock.lock(); - state_type current_state = mRunState; - mSetStateLock.unlock(); - switch (current_state) + switch (run_state) { case AICurlEasyRequestStateMachine_addRequest: { set_state(AICurlEasyRequestStateMachine_waitAdded); - idle(AICurlEasyRequestStateMachine_waitAdded); // Wait till AICurlEasyRequestStateMachine::added_to_multi_handle() is called. + idle(); // Wait till AICurlEasyRequestStateMachine::added_to_multi_handle() is called. // Only AFTER going idle, add request to curl thread; this is needed because calls to set_state() are // ignored when the statemachine is not idle, and theoretically the callbacks could be called // immediately after this call. mAdded = true; mCurlEasyRequest.addRequest(); // This causes the state to be changed, now or later, to - // AICurlEasyRequestStateMachine_added, then - // AICurlEasyRequestStateMachine_finished and then // AICurlEasyRequestStateMachine_removed_after_finished. - // The first two states might be skipped thus, and the state at this point is one of + // The state at this point is thus one of // 1) AICurlEasyRequestStateMachine_waitAdded (idle) - // 2) AICurlEasyRequestStateMachine_added (running) - // 3) AICurlEasyRequestStateMachine_finished (running) - // 4) AICurlEasyRequestStateMachine_removed_after_finished (running) + // 2) AICurlEasyRequestStateMachine_removed_after_finished (running) if (mTotalDelayTimeout > 0.f) { // Set an inactivity timer. // This shouldn't really be necessary, except in the case of a bug // in libcurl; but lets be sure and set a timer for inactivity. - mTimer = new AIPersistentTimer; // Do not delete timer upon expiration. + mTimer = new AITimer; mTimer->setInterval(mTotalDelayTimeout); mTimer->run(this, AICurlEasyRequestStateMachine_timedOut, false, false); } break; } - case AICurlEasyRequestStateMachine_added: + case AICurlEasyRequestStateMachine_waitAdded: { - // The request was added to the multi handle. This is a no-op, which is good cause - // this state might be skipped anyway ;). - idle(current_state); // Wait for the next event. - - // The state at this point is one of - // 1) AICurlEasyRequestStateMachine_added (idle) - // 2) AICurlEasyRequestStateMachine_finished (running) - // 3) AICurlEasyRequestStateMachine_removed_after_finished (running) + // Nothing to do. + idle(); break; } case AICurlEasyRequestStateMachine_timedOut: { // It is possible that exactly at this point the state changes into - // AICurlEasyRequestStateMachine_finished, with as result that mTimedOut + // AICurlEasyRequestStateMachine_removed_after_finished, with as result that mTimedOut // is set while we will continue with that state. Hence that mTimedOut // is explicitly reset in that state. @@ -176,10 +157,9 @@ void AICurlEasyRequestStateMachine::multiplex_impl(void) llassert(mAdded); mAdded = false; mCurlEasyRequest.removeRequest(); - idle(current_state); // Wait till AICurlEasyRequestStateMachine::removed_from_multi_handle() is called. + idle(); // Wait till AICurlEasyRequestStateMachine::removed_from_multi_handle() is called. break; } - case AICurlEasyRequestStateMachine_finished: case AICurlEasyRequestStateMachine_removed_after_finished: { if (!mHandled) @@ -199,12 +179,6 @@ void AICurlEasyRequestStateMachine::multiplex_impl(void) easy_request_w->processOutput(); } - if (current_state == AICurlEasyRequestStateMachine_finished) - { - idle(current_state); // Wait till AICurlEasyRequestStateMachine::removed_from_multi_handle() is called. - break; - } - // See above. mTimedOut = false; /* Fall-Through */ @@ -261,17 +235,14 @@ void AICurlEasyRequestStateMachine::finish_impl(void) } if (mTimer) { - // Note that even if the timer expired, it wasn't deleted because we used AIPersistentTimer; so mTimer is still valid. // Stop the timer, if it's still running. if (!mHandled) mTimer->abort(); } - // Auto clean up ourselves. - kill(); } AICurlEasyRequestStateMachine::AICurlEasyRequestStateMachine(void) : - mTimer(NULL), mTotalDelayTimeout(AIHTTPTimeoutPolicy::getDebugSettingsCurlTimeout().getTotalDelay()) + mTotalDelayTimeout(AIHTTPTimeoutPolicy::getDebugSettingsCurlTimeout().getTotalDelay()) { Dout(dc::statemachine, "Calling AICurlEasyRequestStateMachine(void) [" << (void*)this << "] [" << (void*)mCurlEasyRequest.get() << "]"); AICurlInterface::Stats::AICurlEasyRequestStateMachine_count++; diff --git a/indra/llmessage/aicurleasyrequeststatemachine.h b/indra/llmessage/aicurleasyrequeststatemachine.h index 8a6441874..662efbe20 100644 --- a/indra/llmessage/aicurleasyrequeststatemachine.h +++ b/indra/llmessage/aicurleasyrequeststatemachine.h @@ -62,7 +62,7 @@ class AICurlEasyRequestStateMachine : public AIStateMachine, public AICurlEasyHa bool mTimedOut; // Set if the expiration timer timed out. bool mFinished; // Set by the curl thread to signal it finished. bool mHandled; // Set when we processed the received data. - AITimer* mTimer; // Expiration timer. + LLPointer mTimer; // Expiration timer. F32 mTotalDelayTimeout; // The time out value for mTimer. public: @@ -99,7 +99,7 @@ class AICurlEasyRequestStateMachine : public AIStateMachine, public AICurlEasyHa /*virtual*/ void initialize_impl(void); // Handle mRunState. - /*virtual*/ void multiplex_impl(void); + /*virtual*/ void multiplex_impl(state_type run_state); // Handle aborting from current bs_run state. /*virtual*/ void abort_impl(void); diff --git a/indra/llmessage/aicurlprivate.h b/indra/llmessage/aicurlprivate.h index bb39bdddb..42912c240 100644 --- a/indra/llmessage/aicurlprivate.h +++ b/indra/llmessage/aicurlprivate.h @@ -36,9 +36,11 @@ #include "llrefcount.h" #include "aicurlperhost.h" #include "aihttptimeout.h" +#include "llhttpclient.h" class AIHTTPHeaders; class AICurlEasyRequestStateMachine; +struct AITransferInfo; namespace AICurlPrivate { @@ -212,6 +214,7 @@ class CurlEasyRequest : public CurlEasyHandle { private: void setPost_raw(U32 size, char const* data, bool keepalive); public: + void setPut(U32 size, bool keepalive = true); void setPost(U32 size, bool keepalive = true) { setPost_raw(size, NULL, keepalive); } void setPost(AIPostFieldPtr const& postdata, U32 size, bool keepalive = true); void setPost(char const* data, U32 size, bool keepalive = true) { setPost(new AIPostField(data), size, keepalive); } @@ -297,6 +300,7 @@ class CurlEasyRequest : public CurlEasyHandle { protected: curl_slist* mHeaders; AICurlEasyHandleEvents* mHandleEventsTarget; + U32 mContentLength; // Non-zero if known (only set for PUT and POST). CURLcode mResult; //AIFIXME: this does not belong in the request object, but belongs in the response object. AIHTTPTimeoutPolicy const* mTimeoutPolicy; @@ -319,12 +323,12 @@ class CurlEasyRequest : public CurlEasyHandle { // Accessor for mTimeout with optional creation of orphaned object (if lockobj != NULL). LLPointer& httptimeout(void) { if (!mTimeout) { create_timeout_object(); mTimeoutIsOrphan = true; } return mTimeout; } // Return true if no data has been received on the latest socket (if any) for too long. - bool has_stalled(void) const { return mTimeout && mTimeout->has_stalled(); } + bool has_stalled(void) { return mTimeout && mTimeout->has_stalled(); } protected: // This class may only be created as base class of BufferedCurlEasyRequest. // Throws AICurlNoEasyHandle. - CurlEasyRequest(void) : mHeaders(NULL), mHandleEventsTarget(NULL), mResult(CURLE_FAILED_INIT), mTimeoutPolicy(NULL), mTimeoutIsOrphan(false) + CurlEasyRequest(void) : mHeaders(NULL), mHandleEventsTarget(NULL), mContentLength(0), mResult(CURLE_FAILED_INIT), mTimeoutPolicy(NULL), mTimeoutIsOrphan(false) #if defined(CWDEBUG) || defined(DEBUG_CURLIO) , mDebugIsHeadOrGetMethod(false) #endif @@ -402,8 +406,8 @@ class BufferedCurlEasyRequest : public CurlEasyRequest { //U32 mBodyLimit; // From the old LLURLRequestDetail::mBodyLimit, but never used. U32 mStatus; // HTTP status, decoded from the first header line. std::string mReason; // The "reason" from the same header line. - S32 mRequestTransferedBytes; - S32 mResponseTransferedBytes; + U32 mRequestTransferedBytes; + U32 mResponseTransferedBytes; AIBufferedCurlEasyRequestEvents* mBufferEventsTarget; public: @@ -433,7 +437,7 @@ class BufferedCurlEasyRequest : public CurlEasyRequest { ThreadSafeBufferedCurlEasyRequest const* get_lockobj(void) const; // Return true when an error code was received that can occur before the upload finished. // So far the only such error I've seen is HTTP_BAD_REQUEST. - bool upload_error_status(void) const { return mStatus == HTTP_BAD_REQUEST /*&& mStatus != HTTP_INTERNAL_ERROR*/; } + bool upload_error_status(void) const { return mStatus == HTTP_BAD_REQUEST; } // Return true when prepRequest was already called and the object has not been // invalidated as a result of calling timed_out(). diff --git a/indra/llmessage/aicurlthread.cpp b/indra/llmessage/aicurlthread.cpp index c732c9226..85be547b2 100644 --- a/indra/llmessage/aicurlthread.cpp +++ b/indra/llmessage/aicurlthread.cpp @@ -832,8 +832,9 @@ class AICurlThread : public LLThread { public: static AICurlThread* sInstance; - LLMutex mWakeUpMutex; - bool mWakeUpFlag; // Protected by mWakeUpMutex. + LLMutex mWakeUpMutex; // Set while a thread is waking up the curl thread. + LLMutex mWakeUpFlagMutex; // Set when the curl thread is sleeping (in or about to enter select()). + bool mWakeUpFlag; // Protected by mWakeUpFlagMutex. public: // MAIN-THREAD @@ -1067,11 +1068,10 @@ void AICurlThread::cleanup_wakeup_fds(void) #endif } -// MAIN-THREAD +// OTHER THREADS void AICurlThread::wakeup_thread(bool stop_thread) { DoutEntering(dc::curl, "AICurlThread::wakeup_thread"); - llassert(is_main_thread()); // If we are already exiting the viewer then return immediately. if (!mRunning) @@ -1079,12 +1079,29 @@ void AICurlThread::wakeup_thread(bool stop_thread) // Last time we are run? if (stop_thread) - mRunning = false; + mRunning = false; // Thread-safe because all other threads were already stopped. + + // Note, we do not want this function to be blocking the calling thread; therefore we only use tryLock()s. + + // Stop two threads running the following code concurrently. + if (!mWakeUpMutex.tryLock()) + { + // If we failed to obtain mWakeUpMutex then another thread is (or was) in AICurlThread::wakeup_thread, + // or curl was holding the lock for a micro second at the start of process_commands. + // In the first case, curl might or might not yet have been woken up because of that, but if it was + // then it could not have started processing the commands yet, because it needs to obtain mWakeUpMutex + // between being woken up and processing the commands. + // Either way, the command that this thread called this function for was already in the queue (it's + // added before this function is called) but the command(s) that another thread called this function + // for were not processed yet. Hence, it's safe to exit here as our command(s) will be processed too. + return; + } // Try if curl thread is still awake and if so, pass the new commands directly. - if (mWakeUpMutex.tryLock()) + if (mWakeUpFlagMutex.tryLock()) { mWakeUpFlag = true; + mWakeUpFlagMutex.unlock(); mWakeUpMutex.unlock(); return; } @@ -1111,7 +1128,10 @@ void AICurlThread::wakeup_thread(bool stop_thread) { len = write(mWakeUpFd_in, "!", 1); if (len == -1 && errno == EAGAIN) + { + mWakeUpMutex.unlock(); return; // Unread characters are still in the pipe, so no need to add more. + } } while(len == -1 && errno == EINTR); if (len == -1) @@ -1120,6 +1140,12 @@ void AICurlThread::wakeup_thread(bool stop_thread) } llassert_always(len == 1); #endif + + // Release the lock here and not sooner, for the sole purpose of making sure + // that not two threads execute the above code concurrently. If the above code + // is thread-safe (maybe it is?) then we could release this lock arbitrarily + // sooner indeed - or even not lock it at all. + mWakeUpMutex.unlock(); } apr_status_t AICurlThread::join_thread(void) @@ -1239,6 +1265,16 @@ void AICurlThread::process_commands(AICurlMultiHandle_wat const& multi_handle_w) { DoutEntering(dc::curl, "AICurlThread::process_commands(void)"); + // Block here until the thread that woke us up released mWakeUpMutex. + // This is necessary to make sure that a third thread added commands + // too then either it will signal us later, or we process those commands + // now, too. + mWakeUpMutex.lock(); + // Note that if at THIS point another thread tries to obtain mWakeUpMutex in AICurlThread::wakeup_thread + // and fails, it is ok that it leaves that function without waking us up too: we're awake and + // about to process any commands! + mWakeUpMutex.unlock(); + // If we get here then the main thread called wakeup_thread() recently. for(;;) { @@ -1247,9 +1283,9 @@ void AICurlThread::process_commands(AICurlMultiHandle_wat const& multi_handle_w) command_queue_wat command_queue_w(command_queue); if (command_queue_w->empty()) { - mWakeUpMutex.lock(); + mWakeUpFlagMutex.lock(); mWakeUpFlag = false; - mWakeUpMutex.unlock(); + mWakeUpFlagMutex.unlock(); break; } // Move the next command from the queue into command_being_processed. @@ -1312,10 +1348,10 @@ void AICurlThread::run(void) // Process every command in command_queue before filling the fd_set passed to select(). for(;;) { - mWakeUpMutex.lock(); + mWakeUpFlagMutex.lock(); if (mWakeUpFlag) { - mWakeUpMutex.unlock(); + mWakeUpFlagMutex.unlock(); process_commands(multi_handle_w); continue; } @@ -1324,7 +1360,7 @@ void AICurlThread::run(void) // wakeup_thread() is also called after setting mRunning to false. if (!mRunning) { - mWakeUpMutex.unlock(); + mWakeUpFlagMutex.unlock(); break; } @@ -1400,7 +1436,7 @@ void AICurlThread::run(void) #endif #endif ready = select(nfds, read_fd_set, write_fd_set, NULL, &timeout); - mWakeUpMutex.unlock(); + mWakeUpFlagMutex.unlock(); #ifdef CWDEBUG #ifdef DEBUG_CURLIO Dout(dc::finish|cond_error_cf(ready == -1), ready); @@ -1901,7 +1937,7 @@ void BufferedCurlEasyRequest::setStatusAndReason(U32 status, std::string const& // Sanity check. If the server replies with a redirect status then we better have that option turned on! if ((status >= 300 && status < 400) && mResponder && !mResponder->redirect_status_ok()) { - llerrs << "Received " << status << " (" << reason << ") for responder \"" << mTimeoutPolicy->name() << "\" which has no followRedir()!" << llendl; + llerrs << "Received " << status << " (" << reason << ") for responder \"" << mResponder->getName() << "\" which has no followRedir()!" << llendl; } } @@ -1913,7 +1949,7 @@ void BufferedCurlEasyRequest::processOutput(void) CURLcode code; AITransferInfo info; getResult(&code, &info); - if (code == CURLE_OK && mStatus != HTTP_INTERNAL_ERROR) + if (code == CURLE_OK && !is_internal_http_error(mStatus)) { getinfo(CURLINFO_RESPONSE_CODE, &responseCode); // If getResult code is CURLE_OK then we should have decoded the first header line ourselves. @@ -1925,8 +1961,30 @@ void BufferedCurlEasyRequest::processOutput(void) } else { - responseCode = HTTP_INTERNAL_ERROR; responseReason = (code == CURLE_OK) ? mReason : std::string(curl_easy_strerror(code)); + switch (code) + { + case CURLE_FAILED_INIT: + responseCode = HTTP_INTERNAL_ERROR_OTHER; + break; + case CURLE_OPERATION_TIMEDOUT: + responseCode = HTTP_INTERNAL_ERROR_CURL_TIMEOUT; + break; + case CURLE_WRITE_ERROR: + responseCode = HTTP_INTERNAL_ERROR_LOW_SPEED; + break; + default: + responseCode = HTTP_INTERNAL_ERROR_CURL_OTHER; + break; + } + if (responseCode == HTTP_INTERNAL_ERROR_LOW_SPEED) + { + // Rewrite error to something understandable. + responseReason = llformat("Connection to \"%s\" stalled: download speed dropped below %u bytes/s for %u seconds (up till that point, %s received a total of %u bytes). " + "To change these values, go to Advanced --> Debug Settings and change CurlTimeoutLowSpeedLimit and CurlTimeoutLowSpeedTime respectively.", + mResponder->getURL().c_str(), mResponder->getHTTPTimeoutPolicy().getLowSpeedLimit(), mResponder->getHTTPTimeoutPolicy().getLowSpeedTime(), + mResponder->getName(), mResponseTransferedBytes); + } setopt(CURLOPT_FRESH_CONNECT, TRUE); } @@ -2000,8 +2058,9 @@ size_t BufferedCurlEasyRequest::curlReadCallback(char* data, size_t size, size_t S32 bytes = size * nmemb; // The maximum amount to read. self_w->mLastRead = self_w->getInput()->readAfter(sChannels.out(), self_w->mLastRead, (U8*)data, bytes); self_w->mRequestTransferedBytes += bytes; // Accumulate data sent to the server. + llassert(self_w->mRequestTransferedBytes <= self_w->mContentLength); // Content-Length should always be known, and we should never be sending more. // Timeout administration. - if (self_w->httptimeout()->data_sent(bytes)) + if (self_w->httptimeout()->data_sent(bytes, self_w->mRequestTransferedBytes >= self_w->mContentLength)) { // Transfer timed out. Return CURL_READFUNC_ABORT which will abort with error CURLE_ABORTED_BY_CALLBACK. return CURL_READFUNC_ABORT; @@ -2063,7 +2122,7 @@ size_t BufferedCurlEasyRequest::curlHeaderCallback(char* data, size_t size, size } // Either way, this status value is not understood (or taken into account). // Set it to internal error so that the rest of code treats it as an error. - status = HTTP_INTERNAL_ERROR; + status = HTTP_INTERNAL_ERROR_OTHER; } self_w->received_HTTP_header(); self_w->setStatusAndReason(status, reason); diff --git a/indra/llmessage/aihttptimeout.cpp b/indra/llmessage/aihttptimeout.cpp index 499921a2e..352862ca1 100644 --- a/indra/llmessage/aihttptimeout.cpp +++ b/indra/llmessage/aihttptimeout.cpp @@ -66,7 +66,7 @@ struct AIAccess { struct AIHTTPTimeoutPolicy { U16 getReplyDelay(void) const { return 60; } U16 getLowSpeedTime(void) const { return 30; } - U32 getLowSpeedLimit(void) const { return 56000; } + U32 getLowSpeedLimit(void) const { return 7000; } static bool connect_timed_out(std::string const&) { return false; } }; @@ -84,6 +84,11 @@ public: #include "aihttptimeout.h" +// If this is set, treat dc::curlio as off in the assertion below. +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) +bool gCurlIo; +#endif + namespace AICurlPrivate { namespace curlthread { @@ -100,7 +105,7 @@ U64 HTTPTimeout::sClockCount; // Clock count, set once per select() exi // queued--><--DNS lookup + connect + send headers-->[<--send body (if any)-->]<--replydelay--><--receive headers + body--><--done // ^ ^ ^ ^ ^ ^ // | | | | | | -bool HTTPTimeout::data_sent(size_t n) +bool HTTPTimeout::data_sent(size_t n, bool finished) { // Generate events. if (!mLowSpeedOn) @@ -109,7 +114,7 @@ bool HTTPTimeout::data_sent(size_t n) reset_lowspeed(); } // Detect low speed. - return lowspeed(n); + return lowspeed(n, finished); } // CURL-THREAD @@ -122,6 +127,7 @@ void HTTPTimeout::reset_lowspeed(void) { mLowSpeedClock = sClockCount; mLowSpeedOn = true; + mLastBytesSent = false; // We're just starting! mLastSecond = -1; // This causes lowspeed to initialize the rest. mStalled = (U64)-1; // Stop reply delay timer. DoutCurl("reset_lowspeed: mLowSpeedClock = " << mLowSpeedClock << "; mStalled = -1"); @@ -169,7 +175,7 @@ bool HTTPTimeout::data_received(size_t n/*,*/ // using CURLOPT_DEBUGFUNCTION. Note that mDebugIsHeadOrGetMethod is only valid when the debug channel 'curlio' is on, // because it is set in the debug callback function. // This is also normal if we received a HTTP header with an error status, since that can interrupt our upload. - Debug(llassert(upload_error_status || AICurlEasyRequest_wat(*mLockObj)->mDebugIsHeadOrGetMethod || !dc::curlio.is_on())); + Debug(llassert(upload_error_status || AICurlEasyRequest_wat(*mLockObj)->mDebugIsHeadOrGetMethod || !dc::curlio.is_on() || gCurlIo)); // 'Upload finished' detection failed, generate it now. upload_finished(); } @@ -193,9 +199,9 @@ bool HTTPTimeout::data_received(size_t n/*,*/ // queued--><--DNS lookup + connect + send headers-->[<--send body (if any)-->]<--replydelay--><--receive headers + body--><--done // ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ // | | | | | | | | | | | | | | -bool HTTPTimeout::lowspeed(size_t bytes) +bool HTTPTimeout::lowspeed(size_t bytes, bool finished) { - //DoutCurlEntering("HTTPTimeout::lowspeed(" << bytes << ")"); commented out... too spammy for normal use. + //DoutCurlEntering("HTTPTimeout::lowspeed(" << bytes << ", " << finished << ")"); commented out... too spammy for normal use. // The algorithm to determine if we timed out if different from how libcurls CURLOPT_LOW_SPEED_TIME works. // @@ -219,6 +225,9 @@ bool HTTPTimeout::lowspeed(size_t bytes) // and caused something so evil and hard to find that... NEVER AGAIN! llassert(second >= 0); + // finished should be false until the very last call to this function. + mLastBytesSent = finished; + // If this is the same second as last time, just add the number of bytes to the current bucket. if (second == mLastSecond) { @@ -274,21 +283,39 @@ bool HTTPTimeout::lowspeed(size_t bytes) mBuckets[mBucket] = bytes; // Check if we timed out. - U32 const low_speed_limit = mPolicy->getLowSpeedLimit(); - U32 mintotalbytes = low_speed_limit * low_speed_time; + U32 const low_speed_limit = mPolicy->getLowSpeedLimit(); // In bytes/s + U32 mintotalbytes = low_speed_limit * low_speed_time; // In bytes. DoutCurl("Transfered " << mTotalBytes << " bytes in " << llmin(second, (S32)low_speed_time) << " seconds after " << second << " second" << ((second == 1) ? "" : "s") << "."); if (second >= low_speed_time) { DoutCurl("Average transfer rate is " << (mTotalBytes / low_speed_time) << " bytes/s (low speed limit is " << low_speed_limit << " bytes/s)"); if (mTotalBytes < mintotalbytes) { + if (finished) + { + llwarns << +#ifdef CWDEBUG + (void*)get_lockobj() << ": " +#endif + "Transfer rate timeout (average transfer rate below " << low_speed_limit << + " bytes/s for more than " << low_speed_time << " second" << ((low_speed_time == 1) ? "" : "s") << + ") but we just sent the LAST bytes! Waiting an additional 4 seconds." << llendl; + // Lets hope these last bytes will make it and do not time out on transfer speed anymore. + // Just give these bytes 4 more seconds to be written to the socket (after which we'll + // assume that the 'upload finished' detection failed and we'll wait another ReplyDelay + // seconds before finally, actually timing out. + mStalled = sClockCount + 4 / sClockWidth; + DoutCurl("mStalled set to sClockCount (" << sClockCount << ") + " << (mStalled - sClockCount) << " (4 seconds)"); + return false; + } // The average transfer rate over the passed low_speed_time seconds is too low. Abort the transfer. llwarns << #ifdef CWDEBUG (void*)get_lockobj() << ": " #endif "aborting slow connection (average transfer rate below " << low_speed_limit << - " for more than " << low_speed_time << " second" << ((low_speed_time == 1) ? "" : "s") << ")." << llendl; + " bytes/s for more than " << low_speed_time << " second" << ((low_speed_time == 1) ? "" : "s") << ")." << llendl; + // This causes curl to exit with CURLE_WRITE_ERROR. return true; } } @@ -327,7 +354,7 @@ bool HTTPTimeout::lowspeed(size_t bytes) llassert_always(bucket < low_speed_time); total_bytes -= mBuckets[bucket]; // Empty this bucket. } - while(total_bytes >= 1); // Use 1 here instead of mintotalbytes, to test that total_bytes indeed always reaches zero. + while(total_bytes >= mintotalbytes); } // If this function isn't called again within max_stall_time seconds, we stalled. mStalled = sClockCount + max_stall_time / sClockWidth; @@ -377,6 +404,19 @@ void HTTPTimeout::done(AICurlEasyRequest_wat const& curlEasyRequest_w, CURLcode DoutCurl("done: mStalled set to -1"); } +bool HTTPTimeout::maybe_upload_finished(void) +{ + if (!mUploadFinished && mLastBytesSent) + { + // Assume that 'upload finished' detection failed and the server is slow with a reply. + // Switch to waiting for a reply. + upload_finished(); + return true; + } + // The upload certainly finished or certainly did not finish. + return false; +} + // Libcurl uses GetTickCount on windows, with a resolution of 10 to 16 ms. // As a result, we can not assume that namelookup_time == 0 has a special meaning. #define LOWRESTIMER LL_WINDOWS @@ -493,6 +533,10 @@ void HTTPTimeout::print_diagnostics(CurlEasyRequest const* curl_easy_request, ch { llinfos << "The request upload finished successfully." << llendl; } + else if (mLastBytesSent) + { + llinfos << "All bytes where sent to libcurl for upload." << llendl; + } if (mLastSecond > 0 && mLowSpeedOn) { llinfos << "The " << (mNothingReceivedYet ? "upload" : "download") << " did last " << mLastSecond << " second" << ((mLastSecond == 1) ? "" : "s") << ", before it timed out." << llendl; diff --git a/indra/llmessage/aihttptimeout.h b/indra/llmessage/aihttptimeout.h index ab7895a3b..aa5e6feef 100644 --- a/indra/llmessage/aihttptimeout.h +++ b/indra/llmessage/aihttptimeout.h @@ -79,6 +79,7 @@ class HTTPTimeout : public LLRefCount { U16 mBucket; // The bucket corresponding to mLastSecond. bool mNothingReceivedYet; // Set when created, reset when the HTML reply header from the server is received. bool mLowSpeedOn; // Set while uploading or downloading data. + bool mLastBytesSent; // Set when the last bytes were sent to libcurl to be uploaded. bool mUploadFinished; // Used to keep track of whether upload_finished was called yet. S32 mLastSecond; // The time at which lowspeed() was last called, in seconds since mLowSpeedClock. S32 mOverwriteSecond; // The second at which the first bucket of this transfer will be overwritten. @@ -94,7 +95,7 @@ class HTTPTimeout : public LLRefCount { public: HTTPTimeout(AIHTTPTimeoutPolicy const* policy, ThreadSafeBufferedCurlEasyRequest* lock_obj) : - mPolicy(policy), mNothingReceivedYet(true), mLowSpeedOn(false), mUploadFinished(false), mStalled((U64)-1) + mPolicy(policy), mNothingReceivedYet(true), mLowSpeedOn(false), mLastBytesSent(false), mUploadFinished(false), mStalled((U64)-1) #if defined(CWDEBUG) || defined(DEBUG_CURLIO) , mLockObj(lock_obj) #endif @@ -104,7 +105,7 @@ class HTTPTimeout : public LLRefCount { void upload_finished(void); // Called when data is sent. Returns true if transfer timed out. - bool data_sent(size_t n); + bool data_sent(size_t n, bool finished); // Called when data is received. Returns true if transfer timed out. bool data_received(size_t n/*,*/ ASSERT_ONLY_COMMA(bool upload_error_status = false)); @@ -112,8 +113,8 @@ class HTTPTimeout : public LLRefCount { // Called immediately before done() after curl finished, with code. void done(AICurlEasyRequest_wat const& curlEasyRequest_w, CURLcode code); - // Accessor. - bool has_stalled(void) const { return mStalled < sClockCount; } + // Returns true when we REALLY timed out. Might call upload_finished heuristically. + bool has_stalled(void) { return mStalled < sClockCount && !maybe_upload_finished(); } // Called from BufferedCurlEasyRequest::processOutput if a timeout occurred. void print_diagnostics(CurlEasyRequest const* curl_easy_request, char const* eff_url); @@ -127,11 +128,19 @@ class HTTPTimeout : public LLRefCount { void reset_lowspeed(void); // Common low speed detection, Called from data_sent or data_received. - bool lowspeed(size_t bytes); + bool lowspeed(size_t bytes, bool finished = false); + + // Return false when we timed out on reply delay, or didn't sent all bytes yet. + // Otherwise calls upload_finished() and return true; + bool maybe_upload_finished(void); }; } // namespace curlthread } // namespace AICurlPrivate +#if defined(CWDEBUG) || defined(DEBUG_CURLIO) +extern bool gCurlIo; +#endif + #endif diff --git a/indra/llmessage/aihttptimeoutpolicy.cpp b/indra/llmessage/aihttptimeoutpolicy.cpp index 1c4c1af81..d5e0dd3b6 100644 --- a/indra/llmessage/aihttptimeoutpolicy.cpp +++ b/indra/llmessage/aihttptimeoutpolicy.cpp @@ -88,7 +88,7 @@ U16 const AITP_default_DNS_lookup_grace = 60; // Allow for 60 seconds long DNS U16 const AITP_default_maximum_connect_time = 10; // Allow the SSL/TLS connection through a proxy, including handshakes, to take up to 10 seconds. U16 const AITP_default_maximum_reply_delay = 60; // Allow the server 60 seconds to do whatever it has to do before starting to send data. U16 const AITP_default_low_speed_time = 30; // If a transfer speed drops below AITP_default_low_speed_limit bytes/s for 30 seconds, terminate the transfer. -U32 const AITP_default_low_speed_limit = 56000; // In bytes per second (use for CURLOPT_LOW_SPEED_LIMIT). +U32 const AITP_default_low_speed_limit = 7000; // In bytes per second (use for CURLOPT_LOW_SPEED_LIMIT). U16 const AITP_default_maximum_curl_transaction = 300; // Allow large files to be transfered over slow connections. U16 const AITP_default_maximum_total_delay = 600; // Avoid "leaking" by terminating anything that wasn't completed after 10 minutes. @@ -105,6 +105,7 @@ AIHTTPTimeoutPolicy& AIHTTPTimeoutPolicy::operator=(AIHTTPTimeoutPolicy const& r mLowSpeedLimit = rhs.mLowSpeedLimit; mMaximumCurlTransaction = rhs.mMaximumCurlTransaction; mMaximumTotalDelay = rhs.mMaximumTotalDelay; + changed(); return *this; } @@ -136,19 +137,27 @@ struct PolicyOp { class AIHTTPTimeoutPolicyBase : public AIHTTPTimeoutPolicy { private: std::vector mDerived; // Policies derived from this one. + PolicyOp const* mOp; // Operator we applied to base to get ourselves. public: AIHTTPTimeoutPolicyBase(U16 dns_lookup_grace, U16 subsequent_connects, U16 reply_delay, U16 low_speed_time, U32 low_speed_limit, U16 curl_transaction, U16 total_delay) : - AIHTTPTimeoutPolicy(NULL, dns_lookup_grace, subsequent_connects, reply_delay, low_speed_time, low_speed_limit, curl_transaction, total_delay) { } + AIHTTPTimeoutPolicy(NULL, dns_lookup_grace, subsequent_connects, reply_delay, low_speed_time, low_speed_limit, curl_transaction, total_delay), + mOp(NULL) { } // Derive base from base. - AIHTTPTimeoutPolicyBase(AIHTTPTimeoutPolicyBase& rhs, PolicyOp const& op) : AIHTTPTimeoutPolicy(rhs) { op.perform(this); } + AIHTTPTimeoutPolicyBase(AIHTTPTimeoutPolicyBase& rhs, PolicyOp& op) : AIHTTPTimeoutPolicy(rhs), mOp(&op) { rhs.derived(this); mOp->perform(this); } // Called for every derived policy. void derived(AIHTTPTimeoutPolicy* derived) { mDerived.push_back(derived); } + // Called when our base changed. + /*virtual*/ void base_changed(void); + + // Called when we ourselves changed. + /*virtual*/ void changed(void); + // Provide public acces to sDebugSettingsCurlTimeout for this compilation unit. static AIHTTPTimeoutPolicyBase& getDebugSettingsCurlTimeout(void) { return sDebugSettingsCurlTimeout; } @@ -157,6 +166,27 @@ class AIHTTPTimeoutPolicyBase : public AIHTTPTimeoutPolicy { AIHTTPTimeoutPolicyBase& operator=(AIHTTPTimeoutPolicy const& rhs); }; +void AIHTTPTimeoutPolicyBase::base_changed(void) +{ + AIHTTPTimeoutPolicy::base_changed(); + if (mOp) + mOp->perform(this); + changed(); +} + +void AIHTTPTimeoutPolicyBase::changed(void) +{ + for (std::vector::iterator iter = mDerived.begin(); iter != mDerived.end(); ++iter) + (*iter)->base_changed(); +} + +void AIHTTPTimeoutPolicy::changed(void) +{ + Dout(dc::notice, "Policy \"" << mName << "\" changed into: DNSLookup: " << mDNSLookupGrace << "; Connect: " << mMaximumConnectTime << + "; ReplyDelay: " << mMaximumReplyDelay << "; LowSpeedTime: " << mLowSpeedTime << "; LowSpeedLimit: " << mLowSpeedLimit << + "; MaxTransaction: " << mMaximumCurlTransaction << "; MaxTotalDelay:" << mMaximumTotalDelay); +} + AIHTTPTimeoutPolicy::AIHTTPTimeoutPolicy(AIHTTPTimeoutPolicy& base) : mName(NULL), mBase(static_cast(&base)), @@ -192,6 +222,19 @@ AIHTTPTimeoutPolicy::AIHTTPTimeoutPolicy(char const* name, AIHTTPTimeoutPolicyBa mBase->derived(this); } +void AIHTTPTimeoutPolicy::base_changed(void) +{ + // The same as *this = *mBase; but can't use operator= because of an assert that checks that mBase is not set. + mDNSLookupGrace = mBase->mDNSLookupGrace; + mMaximumConnectTime = mBase->mMaximumConnectTime; + mMaximumReplyDelay = mBase->mMaximumReplyDelay; + mLowSpeedTime = mBase->mLowSpeedTime; + mLowSpeedLimit = mBase->mLowSpeedLimit; + mMaximumCurlTransaction = mBase->mMaximumCurlTransaction; + mMaximumTotalDelay = mBase->mMaximumTotalDelay; + changed(); +} + //static void AIHTTPTimeoutPolicy::setDefaultCurlTimeout(AIHTTPTimeoutPolicy const& timeout) { @@ -621,7 +664,7 @@ AIHTTPTimeoutPolicyBase HTTPTimeoutPolicy_default( AITP_default_maximum_curl_transaction, AITP_default_maximum_total_delay); -//static. Initialized here, but shortly overwritten by Debug Settings. +//static. Initialized here, but shortly overwritten by Debug Settings (except for the crash logger, in which case these are the actual values). AIHTTPTimeoutPolicyBase AIHTTPTimeoutPolicy::sDebugSettingsCurlTimeout( AITP_default_DNS_lookup_grace, AITP_default_maximum_connect_time, @@ -631,8 +674,8 @@ AIHTTPTimeoutPolicyBase AIHTTPTimeoutPolicy::sDebugSettingsCurlTimeout( AITP_default_maximum_curl_transaction, AITP_default_maximum_total_delay); -// Note: Broken compiler doesn't allow as to use temporaries for the Operator ojects, -// so they are instantiated separately. +// Note: All operator objects (Transaction, Connect, etc) must be globals (not temporaries)! +// To enforce this they are passes as reference to non-const (but will never be changed). // This used to be '5 seconds'. Transaction transactionOp5s(5); diff --git a/indra/llmessage/aihttptimeoutpolicy.h b/indra/llmessage/aihttptimeoutpolicy.h index 9d77ffd5c..6c8fa0683 100644 --- a/indra/llmessage/aihttptimeoutpolicy.h +++ b/indra/llmessage/aihttptimeoutpolicy.h @@ -89,6 +89,9 @@ class AIHTTPTimeoutPolicy { U16 curl_transaction, U16 total_delay); + // Destructor. + virtual ~AIHTTPTimeoutPolicy() { } + void sanity_checks(void) const; // Accessors. @@ -110,6 +113,12 @@ class AIHTTPTimeoutPolicy { // Called when a connect to a hostname timed out. static bool connect_timed_out(std::string const& hostname); + // Called when the base that this policy was based on changed. + virtual void base_changed(void); + + // Called when we ourselves changed. + virtual void changed(void); + protected: // Used by AIHTTPTimeoutPolicyBase::AIHTTPTimeoutPolicyBase(AIHTTPTimeoutPolicyBase&). AIHTTPTimeoutPolicy(AIHTTPTimeoutPolicy&); diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index b9ca7ceb6..41db8be23 100644 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -30,7 +30,6 @@ #include "llbuffer.h" #include "llmath.h" -#include "llmemtype.h" #include "llstl.h" #include "llthread.h" @@ -44,7 +43,6 @@ LLSegment::LLSegment() : mData(NULL), mSize(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : @@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : mData(data), mSize(data_len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::~LLSegment() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } bool LLSegment::isOnChannel(S32 channel) const @@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384; allocate(DEFAULT_HEAP_BUFFER_SIZE); } @@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); allocate(size); } @@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if((len > 0) && src) { allocate(len); @@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : // virtual LLHeapBuffer::~LLHeapBuffer() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); delete[] mBuffer; mBuffer = NULL; mSize = 0; @@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment( S32 size, LLSegment& segment) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // get actual size of the segment. S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer))); @@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const void LLHeapBuffer::allocate(S32 size) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); mReclaimedBytes = 0; mBuffer = new U8[size]; if(mBuffer) @@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() : mNextBaseChannel(0), mMutexp(NULL) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferArray::~LLBufferArray() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer()); delete mMutexp; @@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len) { LLMutexLock lock(mMutexp) ; - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter( const U8* src, S32 len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector segments; LLMutexLock lock(mMutexp) ; @@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t end = mSegments.end(); segment_iterator_t it = getSegment(address); if(it == end) @@ -428,7 +412,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter( LLSegment& segment) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t rv = mSegments.begin(); segment_iterator_t end = mSegments.end(); if(!address) @@ -592,7 +575,6 @@ U8* LLBufferArray::readAfter( U8* dest, S32& len) const { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); U8* rv = start; if(!dest || len <= 0) { @@ -652,7 +634,6 @@ U8* LLBufferArray::readAfter( void LLBufferArray::writeChannelTo(std::ostream& ostr, S32 channel) const { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); LLMutexLock lock(mMutexp) ; const_segment_iterator_t const end = mSegments.end(); for (const_segment_iterator_t it = mSegments.begin(); it != end; ++it) @@ -670,7 +651,6 @@ U8* LLBufferArray::seek( S32 delta) const { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const_segment_iterator_t it; const_segment_iterator_t end = mSegments.end(); U8* rv = start; @@ -814,8 +794,6 @@ U8* LLBufferArray::seek( //test use only bool LLBufferArray::takeContents(LLBufferArray& source) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); - LLMutexLock lock(mMutexp); source.lock(); @@ -841,7 +819,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); + // start at the end of the buffers, because it is the most likely // to have free space. LLSegment segment; @@ -880,7 +858,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // Find out which buffer contains the segment, and if it is found, // ask it to reclaim the memory. @@ -913,7 +890,6 @@ bool LLBufferArray::copyIntoBuffers( std::vector& segments) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!src || !len) return false; S32 copied = 0; LLSegment segment; diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index 8d8ad05ad..a51a48edc 100644 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -30,7 +30,6 @@ #include "llbufferstream.h" #include "llbuffer.h" -#include "llmemtype.h" #include "llthread.h" static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4; @@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf( mChannels(channels), mBuffer(buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStreamBuf::~LLBufferStreamBuf() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); sync(); } // virtual int LLBufferStreamBuf::underflow() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); //lldebugs << "LLBufferStreamBuf::underflow()" << llendl; if(!mBuffer) { @@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow() // virtual int LLBufferStreamBuf::overflow(int c) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer) { return EOF; @@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c) // virtual int LLBufferStreamBuf::sync() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); int return_value = -1; if(!mBuffer) { @@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff( std::ios::openmode which) #endif { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer || ((way == std::ios::beg) && (off < 0)) || ((way == std::ios::end) && (off > 0))) @@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream( std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStream::~LLBufferStream() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 4c972749f..59af2b244 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -36,7 +36,6 @@ #include "llsdserialize.h" #include "lluuid.h" #include "message.h" -#include "llmemtype.h" #include @@ -692,7 +691,6 @@ bool LLCacheName::getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_g void LLCacheName::processPending() { - LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING); const F32 SECS_BETWEEN_PROCESS = 0.1f; if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS)) { @@ -798,7 +796,6 @@ std::string LLCacheName::getDefaultLastName() void LLCacheName::Impl::processPendingAsks() { - LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS); sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue); sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue); mAskNameQueue.clear(); @@ -807,7 +804,6 @@ void LLCacheName::Impl::processPendingAsks() void LLCacheName::Impl::processPendingReplies() { - LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES); // First call all the callbacks, because they might send messages. for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it) { diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 554198299..881e7652d 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -195,18 +195,20 @@ public: LLAssetType::EType mAssetType; }; -static void request( - const std::string& url, +//static +void LLHTTPClient::request( + std::string const& url, LLURLRequest::ERequestAction method, Injector* body_injector, LLHTTPClient::ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug), - EKeepAlive keepalive = keep_alive, - bool is_auth = false, - bool no_compression = false, - AIStateMachine* parent = NULL, - AIStateMachine::state_type new_parent_state = 0) + EKeepAlive keepalive, + EDoesAuthentication does_auth, + EAllowCompressedReply allow_compression, + AIStateMachine* parent, + AIStateMachine::state_type new_parent_state, + AIEngine* default_engine) { llassert(responder); @@ -219,7 +221,7 @@ static void request( LLURLRequest* req; try { - req = new LLURLRequest(method, url, body_injector, responder, headers, keepalive, is_auth, no_compression); + req = new LLURLRequest(method, url, body_injector, responder, headers, keepalive, does_auth, allow_compression); #ifdef DEBUG_CURLIO req->mCurlEasyRequest.debug(debug); #endif @@ -231,7 +233,7 @@ static void request( return ; } - req->run(parent, new_parent_state, parent != NULL); + req->run(parent, new_parent_state, parent != NULL, true, default_engine); } void LLHTTPClient::getByteRange(std::string const& url, S32 offset, S32 bytes, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) @@ -240,22 +242,22 @@ void LLHTTPClient::getByteRange(std::string const& url, S32 offset, S32 bytes, R { headers.addHeader("Range", llformat("bytes=%d-%d", offset, offset + bytes - 1)); } - request(url, LLURLRequest::HTTP_GET, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); + request(url, HTTP_GET, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } void LLHTTPClient::head(std::string const& url, ResponderHeadersOnly* responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) { - request(url, LLURLRequest::HTTP_HEAD, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); + request(url, HTTP_HEAD, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } void LLHTTPClient::get(std::string const& url, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) { - request(url, LLURLRequest::HTTP_GET, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); + request(url, HTTP_GET, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } void LLHTTPClient::getHeaderOnly(std::string const& url, ResponderHeadersOnly* responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) { - request(url, LLURLRequest::HTTP_HEAD, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); + request(url, HTTP_HEAD, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } void LLHTTPClient::get(std::string const& url, LLSD const& query, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) @@ -302,7 +304,7 @@ AIHTTPTimeoutPolicy const& LLHTTPClient::ResponderBase::getHTTPTimeoutPolicy(voi void LLHTTPClient::ResponderBase::decode_llsd_body(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, LLSD& content) { AICurlInterface::Stats::llsd_body_count++; - if (status == HTTP_INTERNAL_ERROR) + if (is_internal_http_error(status)) { // In case of an internal error (ie, a curl error), a description of the (curl) error is the best we can do. // In any case, the body if anything was received at all, can not be relied upon. @@ -353,7 +355,7 @@ void LLHTTPClient::ResponderBase::decode_llsd_body(U32 status, std::string const void LLHTTPClient::ResponderBase::decode_raw_body(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, std::string& content) { AICurlInterface::Stats::raw_body_count++; - if (status == HTTP_INTERNAL_ERROR) + if (is_internal_http_error(status)) { // In case of an internal error (ie, a curl error), a description of the (curl) error is the best we can do. // In any case, the body if anything was received at all, can not be relied upon. @@ -487,7 +489,8 @@ void BlockingResponder::wait(void) // We're the main thread, so we have to give AIStateMachine CPU cycles. while (!mFinished) { - AIStateMachine::mainloop(); + // AIFIXME: this can probably be removed once curl is detached from the main thread. + gMainThreadEngine.mainloop(); ms_sleep(10); } } @@ -609,11 +612,10 @@ static LLSD blocking_request( responder->wait(); - S32 http_status = HTTP_INTERNAL_ERROR; LLSD response = LLSD::emptyMap(); CURLcode result = responder->result_code(); + S32 http_status = responder->http_status(); - http_status = responder->http_status(); bool http_success = http_status >= 200 && http_status < 300; if (result == CURLE_OK && http_success) { @@ -685,17 +687,17 @@ U32 LLHTTPClient::blockingGetRaw(const std::string& url, std::string& body/*,*/ void LLHTTPClient::put(std::string const& url, LLSD const& body, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) { - request(url, LLURLRequest::HTTP_PUT, new LLSDInjector(body), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); + request(url, HTTP_PUT, new LLSDInjector(body), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), no_keep_alive, no_does_authentication, no_allow_compressed_reply); } void LLHTTPClient::post(std::string const& url, LLSD const& body, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug), EKeepAlive keepalive, AIStateMachine* parent, AIStateMachine::state_type new_parent_state) { - request(url, LLURLRequest::HTTP_POST, new LLSDInjector(body), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive, false, false, parent, new_parent_state); + request(url, HTTP_POST, new LLSDInjector(body), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive, no_does_authentication, allow_compressed_reply, parent, new_parent_state); } void LLHTTPClient::postXMLRPC(std::string const& url, XMLRPC_REQUEST xmlrpc_request, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug), EKeepAlive keepalive) { - request(url, LLURLRequest::HTTP_POST, new XMLRPCInjector(xmlrpc_request), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive, true, false); // Does use compression. + request(url, HTTP_POST, new XMLRPCInjector(xmlrpc_request), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive, does_authentication, allow_compressed_reply); } void LLHTTPClient::postXMLRPC(std::string const& url, char const* method, XMLRPC_VALUE value, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug), EKeepAlive keepalive) @@ -706,33 +708,33 @@ void LLHTTPClient::postXMLRPC(std::string const& url, char const* method, XMLRPC XMLRPC_RequestSetData(xmlrpc_request, value); // XMLRPCInjector takes ownership of xmlrpc_request and will free it when done. // LLURLRequest takes ownership of the XMLRPCInjector object and will free it when done. - request(url, LLURLRequest::HTTP_POST, new XMLRPCInjector(xmlrpc_request), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive, true, true); // Does not use compression. + request(url, HTTP_POST, new XMLRPCInjector(xmlrpc_request), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive, does_authentication, no_allow_compressed_reply); } void LLHTTPClient::postRaw(std::string const& url, char const* data, S32 size, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug), EKeepAlive keepalive) { - request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive); + request(url, HTTP_POST, new RawInjector(data, size), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive); } void LLHTTPClient::postFile(std::string const& url, std::string const& filename, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug), EKeepAlive keepalive) { - request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive); + request(url, HTTP_POST, new FileInjector(filename), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive); } void LLHTTPClient::postFile(std::string const& url, LLUUID const& uuid, LLAssetType::EType asset_type, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug), EKeepAlive keepalive) { - request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive); + request(url, HTTP_POST, new VFileInjector(uuid, asset_type), responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug), keepalive); } // static void LLHTTPClient::del(std::string const& url, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) { - request(url, LLURLRequest::HTTP_DELETE, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); + request(url, HTTP_DELETE, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } // static void LLHTTPClient::move(std::string const& url, std::string const& destination, ResponderPtr responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug)) { headers.addHeader("Destination", destination); - request(url, LLURLRequest::HTTP_MOVE, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); + request(url, HTTP_MOVE, NULL, responder, headers/*,*/ DEBUG_CURLIO_PARAM(debug)); } diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h index 6142117b0..6dc10080c 100644 --- a/indra/llmessage/llhttpclient.h +++ b/indra/llmessage/llhttpclient.h @@ -46,10 +46,13 @@ class AIHTTPTimeoutPolicy; class LLBufferArray; class LLChannelDescriptors; class AIStateMachine; +class Injector; +class AIEngine; extern AIHTTPTimeoutPolicy responderIgnore_timeout; typedef struct _xmlrpc_request* XMLRPC_REQUEST; typedef struct _xmlrpc_value* XMLRPC_VALUE; +extern AIEngine gMainThreadEngine; // Output parameter of AICurlPrivate::CurlEasyRequest::getResult. // Used in XMLRPCResponder. @@ -72,6 +75,16 @@ enum EKeepAlive { keep_alive }; +enum EDoesAuthentication { + no_does_authentication = 0, + does_authentication +}; + +enum EAllowCompressedReply { + no_allow_compressed_reply = 0, + allow_compressed_reply +}; + #ifdef DEBUG_CURLIO enum EDebugCurl { debug_off = 0, @@ -84,6 +97,20 @@ enum EDebugCurl { class LLHTTPClient { public: + /** + * @brief This enumeration is for specifying the type of request. + */ + enum ERequestAction + { + INVALID, + HTTP_HEAD, + HTTP_GET, + HTTP_PUT, + HTTP_POST, + HTTP_DELETE, + HTTP_MOVE, // Caller will need to set 'Destination' header + REQUEST_ACTION_COUNT + }; /** @name Responder base classes */ //@{ @@ -363,7 +390,7 @@ public: } public: - LegacyPolledResponder(void) : mStatus(HTTP_INTERNAL_ERROR) { } + LegacyPolledResponder(void) : mStatus(HTTP_INTERNAL_ERROR_OTHER) { } // Accessors. U32 http_status(void) const { return mStatus; } @@ -393,6 +420,21 @@ public: //@} + /** General API to request a transfer. */ + static void request( + std::string const& url, + ERequestAction method, + Injector* body_injector, + ResponderPtr responder, + AIHTTPHeaders& headers/*,*/ + DEBUG_CURLIO_PARAM(EDebugCurl debug), + EKeepAlive keepalive = keep_alive, + EDoesAuthentication does_auth = no_does_authentication, + EAllowCompressedReply allow_compression = allow_compressed_reply, + AIStateMachine* parent = NULL, + /*AIStateMachine::state_type*/ U32 new_parent_state = 0, + AIEngine* default_engine = &gMainThreadEngine); + /** @name non-blocking API */ //@{ static void head(std::string const& url, ResponderHeadersOnly* responder, AIHTTPHeaders& headers/*,*/ DEBUG_CURLIO_PARAM(EDebugCurl debug = debug_off)); diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 9ce06f147..8037b005d 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -37,7 +37,6 @@ #include "lliopipe.h" #include "lliosocket.h" #include "llioutil.h" -#include "llmemtype.h" #include "llmemorystream.h" #include "llpumpio.h" #include "llsd.h" @@ -449,7 +448,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_HEADER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); if(eos) { PUMP_DEBUG; @@ -593,13 +591,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) : mContentLength(0), mRootNode(tree) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); } // virtual LLHTTPResponder::~LLHTTPResponder() { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); //lldebugs << "destroying LLHTTPResponder" << llendl; } @@ -609,7 +605,6 @@ bool LLHTTPResponder::readHeaderLine( U8* dest, S32& len) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); --len; U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len); dest[len] = '\0'; @@ -634,7 +629,6 @@ void LLHTTPResponder::markBad( const LLChannelDescriptors& channels, buffer_ptr_t buffer) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); mState = STATE_SHORT_CIRCUIT; LLBufferStream out(channels, buffer.get()); out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n\n" @@ -654,7 +648,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); LLIOPipe::EStatus status = STATUS_OK; // parsing headers diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index 0c815c681..065f457ee 100644 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -33,7 +33,6 @@ #include "llbuffer.h" #include "llhost.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llthread.h" @@ -101,7 +100,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock) // static LLSocket::ptr_t LLSocket::create(EType type, U16 port) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); apr_status_t status = APR_EGENERAL; LLSocket::ptr_t rv(new LLSocket); @@ -179,7 +177,6 @@ LLSocket::ptr_t LLSocket::create(EType type, U16 port) // static LLSocket::ptr_t LLSocket::create(apr_status_t& status, LLSocket::ptr_t& listen_socket) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); if (!listen_socket->getSocket()) { status = APR_ENOSOCKET; @@ -232,7 +229,6 @@ LLSocket::LLSocket() : LLSocket::~LLSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // *FIX: clean up memory we are holding. if(mSocket) { @@ -248,7 +244,6 @@ LLSocket::~LLSocket() void LLSocket::setBlocking(S32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0)); @@ -259,7 +254,6 @@ void LLSocket::setBlocking(S32 timeout) void LLSocket::setNonBlocking() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1)); @@ -276,12 +270,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) : mSource(socket), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketReader::~LLIOSocketReader() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketReader" << llendl; } @@ -297,7 +289,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_READER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mSource) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -379,12 +370,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) : mLastWritten(NULL), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketWriter::~LLIOSocketWriter() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketWriter" << llendl; } @@ -399,7 +388,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_WRITER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mDestination) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -531,12 +519,10 @@ LLIOServerSocket::LLIOServerSocket( mInitialized(false), mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOServerSocket::~LLIOServerSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOServerSocket" << llendl; } @@ -556,7 +542,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( { LLFastTimer t(FTM_PROCESS_SERVER_SOCKET); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!pump) { llwarns << "Need a pump for server socket." << llendl; diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index d4f6f59b1..588265f97 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -35,7 +35,6 @@ #include "llapr.h" #include "llfasttimer.h" -#include "llmemtype.h" #include "llstl.h" #include "llstat.h" #include "llthread.h" @@ -155,7 +154,6 @@ struct ll_delete_apr_pollset_fd_client_data typedef std::pair pipe_conditional_t; void operator()(const pipe_conditional_t& conditional) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); S32* client_id = (S32*)conditional.second.client_data; delete client_id; } @@ -177,13 +175,11 @@ LLPumpIO::LLPumpIO(void) : { mCurrentChain = mRunningChains.end(); - LLMemType m1(LLMemType::MTYPE_IO_PUMP); initialize(); } LLPumpIO::~LLPumpIO() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); #if LL_THREADS_APR if (mChainsMutex) apr_thread_mutex_destroy(mChainsMutex); if (mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex); @@ -200,8 +196,6 @@ LLPumpIO::~LLPumpIO() bool LLPumpIO::addChain(chain_t const& chain, F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); - chain_t::const_iterator it = chain.begin(); chain_t::const_iterator const end = chain.end(); if (it == end) return false; @@ -237,8 +231,6 @@ bool LLPumpIO::addChain( LLSD context, F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); - // remember that if the caller is providing a full link // description, we need to have that description matched to a // particular buffer. @@ -325,7 +317,6 @@ static std::string events_2_string(apr_int16_t events) bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(!pipe) return false; ll_debug_poll_fd("Set conditional", poll); @@ -436,7 +427,6 @@ bool LLPumpIO::sleepChain(F64 seconds) bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mRunningChains.end() == mCurrentChain) { return false; @@ -468,7 +458,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t //timeout is in microseconds void LLPumpIO::pump(const S32& poll_timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLFastTimer t1(FTM_PUMP_IO); //llinfos << "LLPumpIO::pump()" << llendl; @@ -761,7 +750,6 @@ void LLPumpIO::pump(const S32& poll_timeout) bool LLPumpIO::respond(LLIOPipe* pipe) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(NULL == pipe) return false; #if LL_THREADS_APR @@ -780,7 +768,6 @@ bool LLPumpIO::respond( LLIOPipe::buffer_ptr_t data, LLSD context) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // if the caller is providing a full link description, we need to // have that description matched to a particular buffer. if(!data) return false; @@ -803,7 +790,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain"); void LLPumpIO::callback() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); //llinfos << "LLPumpIO::callback()" << llendl; if(true) { @@ -854,7 +840,6 @@ void LLPumpIO::control(LLPumpIO::EControl op) void LLPumpIO::initialize(void) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); mPool.create(); #if LL_THREADS_APR // SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly. @@ -865,7 +850,6 @@ void LLPumpIO::initialize(void) void LLPumpIO::rebuildPollset() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // lldebugs << "LLPumpIO::rebuildPollset()" << llendl; if(mPollset) { @@ -916,7 +900,6 @@ void LLPumpIO::rebuildPollset() void LLPumpIO::processChain(LLChainInfo& chain) { PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLIOPipe::EStatus status = LLIOPipe::STATUS_OK; links_t::iterator it = chain.mHead; links_t::iterator end = chain.mChainLinks.end(); @@ -1120,7 +1103,6 @@ bool LLPumpIO::handleChainError( { DoutEntering(dc::notice, "LLPumpIO::handleChainError(" << (void*)&chain << ", " << LLIOPipe::lookupStatusString(error) << ")"); - LLMemType m1(LLMemType::MTYPE_IO_PUMP); links_t::reverse_iterator rit; if(chain.mHead == chain.mChainLinks.end()) { @@ -1185,13 +1167,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() : mHasExpiration(false), mDescriptorsPool(new LLAPRPool(LLThread::tldata().mRootPool)) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS); } void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(timeout > 0.0f) { mTimer.start(timeout); @@ -1204,7 +1184,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mTimer.getStarted()) { F64 expiry = mTimer.expiresAt(); diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 429a93627..c8be0939b 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -38,7 +38,6 @@ #include #include "aicurleasyrequeststatemachine.h" #include "llioutil.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llsd.h" #include "llstring.h" @@ -47,7 +46,6 @@ #include "llscopedvolatileaprpool.h" #include "llfasttimer.h" #include "message.h" -static const U32 HTTP_STATUS_PIPE_ERROR = 499; /** * String constants @@ -61,7 +59,7 @@ const std::string CONTEXT_TRANSFERED_BYTES("transfered_bytes"); // static std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action) { - static int const array_size = HTTP_MOVE + 1; // INVALID == 0 + static int const array_size = LLHTTPClient::REQUEST_ACTION_COUNT; // INVALID == 0 static char const* const VERBS[array_size] = { "(invalid)", @@ -72,14 +70,14 @@ std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action) "DELETE", "MOVE" }; - return VERBS[action >= array_size ? INVALID : action]; + return VERBS[action >= array_size ? LLHTTPClient::INVALID : action]; } // This might throw AICurlNoEasyHandle. LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action, std::string const& url, Injector* body, - LLHTTPClient::ResponderPtr responder, AIHTTPHeaders& headers, bool keepalive, bool is_auth, bool no_compression) : - mAction(action), mURL(url), mKeepAlive(keepalive), mIsAuth(is_auth), mNoCompression(no_compression), - mBody(body), mResponder(responder), mHeaders(headers) + LLHTTPClient::ResponderPtr responder, AIHTTPHeaders& headers, bool keepalive, bool is_auth, bool compression) : + mAction(action), mURL(url), mKeepAlive(keepalive), mIsAuth(is_auth), mNoCompression(!compression), + mBody(body), mResponder(responder), mHeaders(headers), mResponderNameCache(responder ? responder->getName() : "") { } @@ -94,13 +92,13 @@ void LLURLRequest::initialize_impl(void) useProxy(false); } - if (mAction == HTTP_PUT || mAction == HTTP_POST) + if (mAction == LLHTTPClient::HTTP_PUT || mAction == LLHTTPClient::HTTP_POST) { // If the Content-Type header was passed in we defer to the caller's wisdom, // but if they did not specify a Content-Type, then ask the injector. mHeaders.addHeader("Content-Type", mBody->contentType(), AIHTTPHeaders::keep_existing_header); } - else if (mAction != HTTP_HEAD) + else if (mAction != LLHTTPClient::HTTP_HEAD) { // Check to see if we have already set Accept or not. If no one // set it, set it to application/llsd+xml since that's what we @@ -108,7 +106,7 @@ void LLURLRequest::initialize_impl(void) mHeaders.addHeader("Accept", "application/llsd+xml", AIHTTPHeaders::keep_existing_header); } - if (mAction == HTTP_POST && gMessageSystem) + if (mAction == LLHTTPClient::HTTP_POST && gMessageSystem) { mHeaders.addHeader("X-SecondLife-UDP-Listen-Port", llformat("%d", gMessageSystem->mPort)); } @@ -200,12 +198,12 @@ bool LLURLRequest::configure(AICurlEasyRequest_wat const& curlEasyRequest_w) { switch(mAction) { - case HTTP_HEAD: + case LLHTTPClient::HTTP_HEAD: curlEasyRequest_w->setopt(CURLOPT_NOBODY, 1); rv = true; break; - case HTTP_GET: + case LLHTTPClient::HTTP_GET: curlEasyRequest_w->setopt(CURLOPT_HTTPGET, 1); // Set Accept-Encoding to allow response compression @@ -213,18 +211,18 @@ bool LLURLRequest::configure(AICurlEasyRequest_wat const& curlEasyRequest_w) rv = true; break; - case HTTP_PUT: - { - // Disable the expect http 1.1 extension. POST and PUT default - // to using this, causing the broken server to get confused. - curlEasyRequest_w->addHeader("Expect:"); - curlEasyRequest_w->setopt(CURLOPT_UPLOAD, 1); - curlEasyRequest_w->setopt(CURLOPT_INFILESIZE, mBodySize); + case LLHTTPClient::HTTP_PUT: + + // Set the handle for an http put + curlEasyRequest_w->setPut(mBodySize, mKeepAlive); + + // Set Accept-Encoding to allow response compression + curlEasyRequest_w->setoptString(CURLOPT_ENCODING, mNoCompression ? "identity" : ""); rv = true; break; - } - case HTTP_POST: - { + + case LLHTTPClient::HTTP_POST: + // Set the handle for an http post curlEasyRequest_w->setPost(mBodySize, mKeepAlive); @@ -232,14 +230,14 @@ bool LLURLRequest::configure(AICurlEasyRequest_wat const& curlEasyRequest_w) curlEasyRequest_w->setoptString(CURLOPT_ENCODING, mNoCompression ? "identity" : ""); rv = true; break; - } - case HTTP_DELETE: + + case LLHTTPClient::HTTP_DELETE: // Set the handle for an http post curlEasyRequest_w->setoptString(CURLOPT_CUSTOMREQUEST, "DELETE"); rv = true; break; - case HTTP_MOVE: + case LLHTTPClient::HTTP_MOVE: // Set the handle for an http post curlEasyRequest_w->setoptString(CURLOPT_CUSTOMREQUEST, "MOVE"); rv = true; @@ -260,3 +258,33 @@ bool LLURLRequest::configure(AICurlEasyRequest_wat const& curlEasyRequest_w) } return rv; } + +// Called from AIStateMachine::mainloop, but put here because we don't want to include llurlrequest.h there of course. +void print_statemachine_diagnostics(U64 total_clocks, U64 max_delta, AIEngine::queued_type::const_reference slowest_element) +{ + AIStateMachine const& slowest_state_machine = slowest_element.statemachine(); + LLURLRequest const* request = dynamic_cast(&slowest_state_machine); + F64 const tfactor = 1000 / calc_clock_frequency(); + std::ostringstream msg; + if (total_clocks > max_delta) + { + msg << "AIStateMachine::mainloop did run for " << (total_clocks * tfactor) << " ms. The slowest "; + } + else + { + msg << "AIStateMachine::mainloop: A "; + } + msg << "state machine "; + if (request) + { + msg << "(" << request->getResponderName() << ") "; + } + msg << "ran for " << (max_delta * tfactor) << " ms"; + if (slowest_state_machine.getRuntime() > max_delta) + { + msg << " (" << (slowest_state_machine.getRuntime() * tfactor) << " ms in total now)"; + } + msg << "."; + llwarns << msg.str() << llendl; +} + diff --git a/indra/llmessage/llurlrequest.h b/indra/llmessage/llurlrequest.h index 9cdb132bb..1f9c09914 100644 --- a/indra/llmessage/llurlrequest.h +++ b/indra/llmessage/llurlrequest.h @@ -51,20 +51,7 @@ class Injector class LLURLRequest : public AICurlEasyRequestStateMachine { public: - /** - * @brief This enumeration is for specifying the type of request. - */ - enum ERequestAction - { - INVALID, - HTTP_HEAD, - HTTP_GET, - HTTP_PUT, - HTTP_POST, - HTTP_DELETE, - HTTP_MOVE, // Caller will need to set 'Destination' header - REQUEST_ACTION_COUNT - }; + typedef LLHTTPClient::ERequestAction ERequestAction; /** * @brief Turn the request action into an http verb. @@ -79,6 +66,11 @@ class LLURLRequest : public AICurlEasyRequestStateMachine { */ LLURLRequest(ERequestAction action, std::string const& url, Injector* body, LLHTTPClient::ResponderPtr responder, AIHTTPHeaders& headers, bool keepalive, bool is_auth, bool no_compression); + /** + * @brief Cached value of responder->getName() as passed to the constructor. + */ + char const* getResponderName(void) const { return mResponderNameCache; } + protected: // Call abort(), not delete. /*virtual*/ ~LLURLRequest() { } @@ -118,6 +110,7 @@ class LLURLRequest : public AICurlEasyRequestStateMachine { U32 mBodySize; LLHTTPClient::ResponderPtr mResponder; AIHTTPHeaders mHeaders; + char const* mResponderNameCache; protected: // Handle initializing the object. diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 3f9c95dc8..8f60d2a7d 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -80,7 +80,6 @@ #include "v3math.h" #include "v4math.h" #include "lltransfertargetvfile.h" -#include "llmemtype.h" #include "llpacketring.h" class AIHTTPTimeoutPolicy; @@ -799,7 +798,6 @@ S32 LLMessageSystem::getReceiveBytes() const void LLMessageSystem::processAcks() { - LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS); F64 mt_sec = getMessageTimeSeconds(); { gTransferManager.updateTransfers(); @@ -4031,7 +4029,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds ) // TODO: babbage: move gServicePump in to LLMessageSystem? bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump) { - LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL); if(checkMessages(frame_count)) { return true; diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 6aa771cfb..0234c9e59 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -44,8 +44,8 @@ set(llprimitive_HEADER_FILES llprimtexturelist.h lltextureanim.h lltextureentry.h - lltreeparams.h lltree_common.h + lltreeparams.h llvolumemessage.h llvolumexml.h material_codes.h diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 6d7720117..e038a7a52 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -27,7 +27,6 @@ #include "linden_common.h" #include "material_codes.h" -#include "llmemtype.h" #include "llerror.h" #include "message.h" #include "llprimitive.h" @@ -188,7 +187,6 @@ void LLPrimitive::clearTextureList() // static LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); LLPrimitive *retval = new LLPrimitive(); if (retval) @@ -206,7 +204,6 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) //=============================================================== void LLPrimitive::init_primitive(LLPCode p_code) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); clearTextureList(); mPrimitiveCode = p_code; } @@ -698,7 +695,6 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector& fac BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume) { - LLMemType m1(LLMemType::MTYPE_VOLUME); LLVolume *volumep; if (unique_volume) { diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp index 36e04df7b..7ef87ed38 100644 --- a/indra/llprimitive/llprimtexturelist.cpp +++ b/indra/llprimitive/llprimtexturelist.cpp @@ -28,7 +28,6 @@ #include "llprimtexturelist.h" #include "lltextureentry.h" -#include "llmemtype.h" // static //int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++ @@ -367,7 +366,6 @@ S32 LLPrimTextureList::size() const // sets the size of the mEntryList container void LLPrimTextureList::setSize(S32 new_size) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); if (new_size < 0) { new_size = 0; diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 22d9d54f1..38adb7dd0 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -25,17 +25,20 @@ include_directories( set(llrender_SOURCE_FILES llcubemap.cpp - llfont.cpp - llfontgl.cpp llfontbitmapcache.cpp + llfontfreetype.cpp + llfontgl.cpp llfontregistry.cpp + llgl.cpp llgldbg.cpp llglslshader.cpp llgltexture.cpp llimagegl.cpp llpostprocess.cpp + llrender.cpp llrender2dutils.cpp llrendersphere.cpp + llrendertarget.cpp llshadermgr.cpp lltexture.cpp lluiimage.cpp @@ -46,9 +49,9 @@ set(llrender_HEADER_FILES CMakeLists.txt llcubemap.h - llfontgl.h - llfont.h llfontbitmapcache.h + llfontfreetype.h + llfontgl.h llfontregistry.h llgl.h llgldbg.h @@ -73,29 +76,5 @@ set_source_files_properties(${llrender_HEADER_FILES} list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES}) -if (SERVER AND NOT WINDOWS AND NOT DARWIN) - copy_server_sources( - llgl - llrender - ) - - - set_source_files_properties( - ${server_SOURCE_FILES} - PROPERTIES - COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1" - ) - add_library (llrenderheadless - ${llrender_SOURCE_FILES} - ${server_SOURCE_FILES} - ) - add_dependencies(llrenderheadless prepare) -else (SERVER AND NOT WINDOWS AND NOT DARWIN) - list(APPEND llrender_SOURCE_FILES - llgl.cpp - llrender.cpp - llrendertarget.cpp - ) -endif (SERVER AND NOT WINDOWS AND NOT DARWIN) add_library (llrender ${llrender_SOURCE_FILES}) add_dependencies(llrender prepare) diff --git a/indra/llrender/llfont.cpp b/indra/llrender/llfontfreetype.cpp similarity index 87% rename from indra/llrender/llfont.cpp rename to indra/llrender/llfontfreetype.cpp index fecdafe45..36515c48a 100644 --- a/indra/llrender/llfont.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -1,6 +1,6 @@ /** - * @file llfont.cpp - * @brief Font library wrapper + * @file llfontfreetype.cpp + * @brief Freetype font library wrapper * * $LicenseInfo:firstyear=2002&license=viewergpl$ * @@ -32,18 +32,10 @@ #include "linden_common.h" -#include "llfont.h" +#include "llfontfreetype.h" // Freetype stuff -#if !defined(LL_LINUX) || defined(LL_STANDALONE) -# include -#else -// I had to do some work to avoid the system-installed FreeType headers... --ryan. -//This path no longer exists. -//# include "llfreetype2/freetype/ft2build.h" -//This works fine. -# include "../include/ft2build.h" -#endif +#include // For some reason, this won't work if it's not wrapped in the ifdef #ifdef FT_FREETYPE_H @@ -65,12 +57,15 @@ LLFontManager *gFontManagerp = NULL; FT_Library gFTLibrary = NULL; -bool LLFont::sOpenGLcrashOnRestart = false; +bool LLFontFreetype::sOpenGLcrashOnRestart = false; //static void LLFontManager::initClass() { - gFontManagerp = new LLFontManager; + if (!gFontManagerp) + { + gFontManagerp = new LLFontManager; + } } //static @@ -92,7 +87,6 @@ LLFontManager::LLFontManager() } } - LLFontManager::~LLFontManager() { FT_Done_FreeType(gFTLibrary); @@ -101,14 +95,14 @@ LLFontManager::~LLFontManager() LLFontGlyphInfo::LLFontGlyphInfo(U32 index) : mGlyphIndex(index), - mXBitmapOffset(0), // Offset to the origin in the bitmap - mYBitmapOffset(0), // Offset to the origin in the bitmap - mXBearing(0), // Distance from baseline to left in pixels - mYBearing(0), // Distance from baseline to top in pixels mWidth(0), // In pixels mHeight(0), // In pixels mXAdvance(0.f), // In pixels mYAdvance(0.f), // In pixels + mXBitmapOffset(0), // Offset to the origin in the bitmap + mYBitmapOffset(0), // Offset to the origin in the bitmap + mXBearing(0), // Distance from baseline to left in pixels + mYBearing(0), // Distance from baseline to top in pixels mIsRendered(FALSE), mMetricsValid(FALSE) {} @@ -126,33 +120,29 @@ LLFontList::~LLFontList() // The (now dangling) pointers in the vector will be cleaned up when the vector is deleted by the superclass destructor. } } -void LLFontList::addAtEnd(LLFont *font) +void LLFontList::addAtEnd(LLFontFreetype *font) { // Purely a convenience function this->push_back(font); } -LLFont::LLFont() +LLFontFreetype::LLFontFreetype() +: mFontBitmapCachep(new LLFontBitmapCache), + mValid(FALSE), + mAscender(0.f), + mDescender(0.f), + mLineHeight(0.f), + mFallbackFontp(NULL), + mIsFallback(FALSE), + mFTFace(NULL), + mRenderGlyphCount(0), + mAddGlyphCount(0), + mPointSize(0) { - mFontBitmapCachep = new LLFontBitmapCache; - - mValid = FALSE; - mAscender = 0.f; - mDescender = 0.f; - mLineHeight = 0.f; - - mFallbackFontp = NULL; - mIsFallback = FALSE; - mFTFace = NULL; - - mRenderGlyphCount = 0; - mAddGlyphCount = 0; - - mPointSize = 0; } -LLFont::~LLFont() +LLFontFreetype::~LLFontFreetype() { // Clean up freetype libs. if (mFTFace) @@ -165,25 +155,7 @@ LLFont::~LLFont() // mFontBitmapCachep will be cleaned up by LLPointer destructor. } -// virtual -F32 LLFont::getLineHeight() const -{ - return mLineHeight; -} - -// virtual -F32 LLFont::getAscenderHeight() const -{ - return mAscender; -} - -// virtual -F32 LLFont::getDescenderHeight() const -{ - return mDescender; -} - -BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback) +BOOL LLFontFreetype::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback) { // Don't leak face objects. This is also needed to deal with // changed font file names. @@ -260,38 +232,115 @@ BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F return TRUE; } -void LLFont::resetBitmapCache() +//virtual +F32 LLFontFreetype::getLineHeight() const { - // Iterate through glyphs and clear the mIsRendered flag - for (char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.begin(); - iter != mCharGlyphInfoMap.end(); ++iter) - { - iter->second->mIsRendered = FALSE; - //FIXME: this is only strictly necessary when resetting the entire font, - //not just flushing the bitmap - iter->second->mMetricsValid = FALSE; - } - mFontBitmapCachep->reset(); - - if (!mIsFallback || !sOpenGLcrashOnRestart) // because this often crashes under Linux... - { - // Add the empty glyph`5 - addGlyph(0, 0); - } + return mLineHeight; } -LLFontGlyphInfo* LLFont::getGlyphInfo(const llwchar wch) const +//virtual +F32 LLFontFreetype::getAscenderHeight() const { - char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch); - if (iter != mCharGlyphInfoMap.end()) - { - return iter->second; - } - return NULL; + return mAscender; } +//virtual +F32 LLFontFreetype::getDescenderHeight() const +{ + return mDescender; +} -BOOL LLFont::hasGlyph(const llwchar wch) const +F32 LLFontFreetype::getXAdvance(const llwchar wch) const +{ + if (mFTFace == NULL) + return 0.0; + + llassert(!mIsFallback); + U32 glyph_index; + + // Return existing info only if it is current + LLFontGlyphInfo* gi = getGlyphInfo(wch); + if (gi && gi->mMetricsValid) + { + return gi->mXAdvance; + } + + const LLFontFreetype* fontp = this; + + // Initialize char to glyph map + glyph_index = FT_Get_Char_Index(mFTFace, wch); + if (glyph_index == 0 && mFallbackFontp) + { + LLFontList::iterator iter; + for(iter = mFallbackFontp->begin(); (iter != mFallbackFontp->end()) && (glyph_index == 0); iter++) + { + glyph_index = FT_Get_Char_Index((*iter)->mFTFace, wch); + if(glyph_index) + { + fontp = *iter; + } + } + } + + if (glyph_index) + { + // This font has this glyph + fontp->renderGlyph(glyph_index); + + // Create the entry if it's not there + char_glyph_info_map_t::iterator iter2 = mCharGlyphInfoMap.find(wch); + if (iter2 == mCharGlyphInfoMap.end()) + { + gi = new LLFontGlyphInfo(glyph_index); + insertGlyphInfo(wch, gi); + } + else + { + gi = iter2->second; + } + + gi->mWidth = fontp->mFTFace->glyph->bitmap.width; + gi->mHeight = fontp->mFTFace->glyph->bitmap.rows; + + // Convert these from 26.6 units to float pixels. + gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f; + gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f; + gi->mMetricsValid = TRUE; + return gi->mXAdvance; + } + else + { + gi = get_if_there(mCharGlyphInfoMap, (llwchar)0, (LLFontGlyphInfo*)NULL); + if (gi) + { + return gi->mXAdvance; + } + } + + // Last ditch fallback - no glyphs defined at all. + return (F32)mFontBitmapCachep->getMaxCharWidth(); +} + +F32 LLFontFreetype::getXKerning(const llwchar char_left, const llwchar char_right) const +{ + if (mFTFace == NULL) + return 0.0; + + llassert(!mIsFallback); + LLFontGlyphInfo* left_glyph_info = get_if_there(mCharGlyphInfoMap, char_left, (LLFontGlyphInfo*)NULL); + U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0; + // Kern this puppy. + LLFontGlyphInfo* right_glyph_info = get_if_there(mCharGlyphInfoMap, char_right, (LLFontGlyphInfo*)NULL); + U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0; + + FT_Vector delta; + + llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta)); + + return delta.x*(1.f/64.f); +} + +BOOL LLFontFreetype::hasGlyph(const llwchar wch) const { llassert(!mIsFallback); const LLFontGlyphInfo* gi = getGlyphInfo(wch); @@ -305,7 +354,7 @@ BOOL LLFont::hasGlyph(const llwchar wch) const } } -BOOL LLFont::addChar(const llwchar wch) const +BOOL LLFontFreetype::addChar(const llwchar wch) const { if (mFTFace == NULL) return FALSE; @@ -345,21 +394,7 @@ BOOL LLFont::addChar(const llwchar wch) const return FALSE; } -void LLFont::insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const -{ - char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch); - if (iter != mCharGlyphInfoMap.end()) - { - delete iter->second; - iter->second = gi; - } - else - { - mCharGlyphInfoMap[wch] = gi; - } -} - -BOOL LLFont::addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32 glyph_index) const +BOOL LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, const llwchar wch, const U32 glyph_index) const { if (mFTFace == NULL) return FALSE; @@ -460,120 +495,69 @@ BOOL LLFont::addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32 return TRUE; } -BOOL LLFont::addGlyph(const llwchar wch, const U32 glyph_index) const +LLFontGlyphInfo* LLFontFreetype::getGlyphInfo(const llwchar wch) const +{ + char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch); + if (iter != mCharGlyphInfoMap.end()) + { + return iter->second; + } + return NULL; +} + +void LLFontFreetype::insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const +{ + char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch); + if (iter != mCharGlyphInfoMap.end()) + { + delete iter->second; + iter->second = gi; + } + else + { + mCharGlyphInfoMap[wch] = gi; + } +} + +BOOL LLFontFreetype::addGlyph(const llwchar wch, const U32 glyph_index) const { return addGlyphFromFont(this, wch, glyph_index); } - -F32 LLFont::getXAdvance(const llwchar wch) const -{ - if (mFTFace == NULL) - return 0.0; - - llassert(!mIsFallback); - U32 glyph_index; - - // Return existing info only if it is current - LLFontGlyphInfo* gi = getGlyphInfo(wch); - if (gi && gi->mMetricsValid) - { - return gi->mXAdvance; - } - - const LLFont* fontp = this; - - // Initialize char to glyph map - glyph_index = FT_Get_Char_Index(mFTFace, wch); - if (glyph_index == 0 && mFallbackFontp) - { - LLFontList::iterator iter; - for(iter = mFallbackFontp->begin(); (iter != mFallbackFontp->end()) && (glyph_index == 0); iter++) - { - glyph_index = FT_Get_Char_Index((*iter)->mFTFace, wch); - if(glyph_index) - { - fontp = *iter; - } - } - } - - if (glyph_index) - { - // This font has this glyph - fontp->renderGlyph(glyph_index); - - // Create the entry if it's not there - char_glyph_info_map_t::iterator iter2 = mCharGlyphInfoMap.find(wch); - if (iter2 == mCharGlyphInfoMap.end()) - { - gi = new LLFontGlyphInfo(glyph_index); - insertGlyphInfo(wch, gi); - } - else - { - gi = iter2->second; - } - - gi->mWidth = fontp->mFTFace->glyph->bitmap.width; - gi->mHeight = fontp->mFTFace->glyph->bitmap.rows; - - // Convert these from 26.6 units to float pixels. - gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f; - gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f; - gi->mMetricsValid = TRUE; - return gi->mXAdvance; - } - else - { - gi = get_if_there(mCharGlyphInfoMap, (llwchar)0, (LLFontGlyphInfo*)NULL); - if (gi) - { - return gi->mXAdvance; - } - } - - // Last ditch fallback - no glyphs defined at all. - return (F32)mFontBitmapCachep->getMaxCharWidth(); -} - - -void LLFont::renderGlyph(const U32 glyph_index) const +void LLFontFreetype::renderGlyph(const U32 glyph_index) const { if (mFTFace == NULL) return; - int error = FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT ); - llassert(!error); + llassert_always(! FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT)); - error = FT_Render_Glyph(mFTFace->glyph, gFontRenderMode); + llassert_always(! FT_Render_Glyph(mFTFace->glyph, gFontRenderMode) ); mRenderGlyphCount++; - - llassert(!error); } - -F32 LLFont::getXKerning(const llwchar char_left, const llwchar char_right) const +void LLFontFreetype::resetBitmapCache() { - if (mFTFace == NULL) - return 0.0; + // Iterate through glyphs and clear the mIsRendered flag + for (char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.begin(); + iter != mCharGlyphInfoMap.end(); ++iter) + { + iter->second->mIsRendered = FALSE; + //FIXME: this is only strictly necessary when resetting the entire font, + //not just flushing the bitmap + iter->second->mMetricsValid = FALSE; + } + mFontBitmapCachep->reset(); - llassert(!mIsFallback); - LLFontGlyphInfo* left_glyph_info = get_if_there(mCharGlyphInfoMap, char_left, (LLFontGlyphInfo*)NULL); - U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0; - // Kern this puppy. - LLFontGlyphInfo* right_glyph_info = get_if_there(mCharGlyphInfoMap, char_right, (LLFontGlyphInfo*)NULL); - U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0; - - FT_Vector delta; - - llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta)); - - return delta.x*(1.f/64.f); + if (!mIsFallback || !sOpenGLcrashOnRestart) // because this often crashes under Linux... + { + // Add the empty glyph`5 + addGlyph(0, 0); + } } -void LLFont::setSubImageLuminanceAlpha(const U32 x, + +void LLFontFreetype::setSubImageLuminanceAlpha(const U32 x, const U32 y, const U32 bitmap_num, const U32 width, diff --git a/indra/llrender/llfont.h b/indra/llrender/llfontfreetype.h similarity index 92% rename from indra/llrender/llfont.h rename to indra/llrender/llfontfreetype.h index 68bfad641..1a7dfb9ad 100644 --- a/indra/llrender/llfont.h +++ b/indra/llrender/llfontfreetype.h @@ -30,11 +30,10 @@ * $/LicenseInfo$ */ -#ifndef LL_LLFONT_H -#define LL_LLFONT_H +#ifndef LL_LLFONTFREETYPE_H +#define LL_LLFONTFREETYPE_H #include -//#include "lllocalidhashmap.h" #include "llmemory.h" #include "llstl.h" @@ -43,7 +42,7 @@ class LLImageRaw; class LLFontManager; -class LLFont; +class LLFontFreetype; // Hack. FT_Face is just a typedef for a pointer to a struct, // but there's no simple forward declarations file for FreeType, @@ -59,7 +58,7 @@ class LLFontManager public: static void initClass(); static void cleanupClass(); - + public: LLFontManager(); virtual ~LLFontManager(); @@ -88,19 +87,19 @@ public: }; // Used for lists of fallback fonts -class LLFontList : public std::vector +class LLFontList : public std::vector { public: LLFontList(); ~LLFontList(); - void addAtEnd(LLFont *font); + void addAtEnd(LLFontFreetype *font); }; -class LLFont +class LLFontFreetype { public: - LLFont(); - virtual ~LLFont(); + LLFontFreetype(); + virtual ~LLFontFreetype(); // is_fallback should be true for fallback fonts that aren't used // to render directly (Unicode backup, primarily) @@ -157,7 +156,7 @@ protected: virtual BOOL hasGlyph(const llwchar wch) const; // Has a glyph for this character virtual BOOL addChar(const llwchar wch) const; // Add a new character to the font if necessary virtual BOOL addGlyph(const llwchar wch, const U32 glyph_index) const; // Add a new glyph to the existing font - virtual BOOL addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32 glyph_index) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found) + virtual BOOL addGlyphFromFont(const LLFontFreetype *fontp, const llwchar wch, const U32 glyph_index) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found) virtual LLFontGlyphInfo* getGlyphInfo(const llwchar wch) const; @@ -195,4 +194,4 @@ protected: mutable S32 mAddGlyphCount; }; -#endif // LL_FONT_ +#endif // LL_FONTFREETYPE_H diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 1e88768e9..14b9d0685 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -26,10 +26,12 @@ #include "linden_common.h" -#include -#include "llfont.h" + #include "llfontgl.h" + +// Linden library includes +#include "llfontfreetype.h" #include "llfontbitmapcache.h" #include "llfontregistry.h" #include "llgl.h" @@ -38,6 +40,9 @@ #include "llstl.h" #include "llfasttimer.h" +// Third party library includes +#include + const S32 BOLD_OFFSET = 1; // static class members @@ -79,7 +84,7 @@ F32 llfont_round_y(F32 y) } LLFontGL::LLFontGL() - : LLFont() + : LLFontFreetype() { clearEmbeddedChars(); } @@ -128,7 +133,7 @@ void LLFontGL::destroyGL() BOOL LLFontGL::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback) { - if (!LLFont::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback)) + if (!LLFontFreetype::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback)) { return FALSE; } @@ -138,7 +143,7 @@ BOOL LLFontGL::loadFace(const std::string& filename, const F32 point_size, const BOOL LLFontGL::addChar(const llwchar wch) const { - if (!LLFont::addChar(wch)) + if (!LLFontFreetype::addChar(wch)) { return FALSE; } @@ -288,7 +293,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons F32 inv_width = 1.f / mFontBitmapCachep->getBitmapWidth(); F32 inv_height = 1.f / mFontBitmapCachep->getBitmapHeight(); - const S32 LAST_CHARACTER = LLFont::LAST_CHAR_FULL; + const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL; BOOL draw_ellipses = FALSE; @@ -546,7 +551,7 @@ F32 LLFontGL::getWidthF32(const std::string& utf8text, const S32 begin_offset, c F32 LLFontGL::getWidthF32(const llwchar* wchars, const S32 begin_offset, const S32 max_chars, BOOL use_embedded) const { - const S32 LAST_CHARACTER = LLFont::LAST_CHAR_FULL; + const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL; F32 cur_x = 0; const S32 max_index = begin_offset + max_chars; @@ -981,7 +986,7 @@ void LLFontGL::destroyAllGL() { if (sFontRegistry) { - if (LLFont::sOpenGLcrashOnRestart) + if (LLFontFreetype::sOpenGLcrashOnRestart) { // This will leak memory but will prevent a crash... sFontRegistry = NULL; diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index abf1009ea..9476382eb 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -28,7 +28,7 @@ #ifndef LL_LLFONTGL_H #define LL_LLFONTGL_H -#include "llfont.h" +#include "llfontfreetype.h" #include "lltexture.h" #include "v2math.h" #include "llcoord.h" @@ -44,7 +44,7 @@ class LLFontDescriptor; // Structure used to store previously requested fonts. class LLFontRegistry; -class LLFontGL : public LLFont +class LLFontGL : public LLFontFreetype { public: enum HAlign @@ -66,12 +66,11 @@ public: enum StyleFlags { - // text style to render. May be combined (these are bit flags) // text style to render. May be combined (these are bit flags) NORMAL = 0x00, BOLD = 0x01, ITALIC = 0x02, - UNDERLINE = 0x04, + UNDERLINE = 0x04 }; enum ShadowType diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 3391862f6..fcfbc4c84 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -27,6 +27,7 @@ #include "linden_common.h" #include "llgl.h" +#include "llfontfreetype.h" #include "llfontgl.h" #include "llfontregistry.h" #include @@ -188,21 +189,20 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename) path_it != xml_paths.end(); ++path_it) { - LLXMLNodePtr root; std::string full_filename = gDirUtilp->findSkinnedFilename(*path_it, xml_filename); bool parsed_file = LLXMLNode::parseFile(full_filename, root, NULL); if (!parsed_file) continue; - + if ( root.isNull() || ! root->hasName( "fonts" ) ) { llwarns << "Bad font info file: " << full_filename << llendl; continue; } - + std::string root_name; root->getAttributeString("name",root_name); if (root->hasName("fonts")) @@ -214,7 +214,7 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename) } if (success) dump(); - + return success; } diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 7dba1e0b4..dcde319d2 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -44,7 +44,6 @@ #include "llmath.h" #include "m4math.h" #include "llstring.h" -#include "llmemtype.h" #include "llstacktrace.h" #include "llglheaders.h" @@ -603,11 +602,12 @@ bool LLGLManager::initGL() if (mGLVendor.substr(0,4) == "ATI ") { mGLVendorShort = "ATI"; - BOOL mobile = FALSE; - if (mGLRenderer.find("MOBILITY") != std::string::npos) - { - mobile = TRUE; - } + // "mobile" appears to be unused, and this code was causing warnings. + //BOOL mobile = FALSE; + //if (mGLRenderer.find("MOBILITY") != std::string::npos) + //{ + // mobile = TRUE; + //} mIsATI = TRUE; #if LL_WINDOWS && !LL_MESA_HEADLESS @@ -1444,8 +1444,7 @@ void assert_glerror() void clear_glerror() { // Create or update texture to be used with this data - GLenum error; - error = glGetError(); + glGetError(); } /////////////////////////////////////////////////////////////// @@ -2266,7 +2265,6 @@ void LLGLNamePool::release(GLuint name) //static void LLGLNamePool::upkeepPools() { - LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS); for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter) { LLGLNamePool & pool = *iter; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index f45892a5a..bdc31c9e4 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -65,9 +65,9 @@ bool LLImageGL::sCompressTextures = false; std::set LLImageGL::sImageList; -// **************************************************************************************************** +//**************************************************************************************************** //The below for texture auditing use only -// **************************************************************************************************** +//**************************************************************************************************** //----------------------- //debug use BOOL gAuditTexture = FALSE ; @@ -816,8 +816,9 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) S32 w = width, h = height; const U8* prev_mip_data = 0; const U8* cur_mip_data = 0; - S32 prev_mip_size = 0; +#ifdef SHOW_ASSERT S32 cur_mip_size = 0; +#endif mMipLevels = nummips; @@ -826,18 +827,24 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) if (m==0) { cur_mip_data = data_in; +#ifdef SHOW_ASSERT cur_mip_size = width * height * mComponents; +#endif } else { S32 bytes = w * h * mComponents; +#ifdef SHOW_ASSERT llassert(prev_mip_data); - llassert(prev_mip_size == bytes*4); + llassert(cur_mip_size == bytes*4); +#endif U8* new_data = new U8[bytes]; llassert_always(new_data); LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents); cur_mip_data = new_data; +#ifdef SHOW_ASSERT cur_mip_size = bytes; +#endif } llassert(w > 0 && h > 0 && cur_mip_data); { @@ -870,7 +877,6 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) delete[] prev_mip_data; } prev_mip_data = cur_mip_data; - prev_mip_size = cur_mip_size; w >>= 1; h >>= 1; } diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index d10a9c6bb..502d8a53c 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -31,7 +31,6 @@ #include "llvertexbuffer.h" // #include "llrender.h" #include "llglheaders.h" -#include "llmemtype.h" #include "llrender.h" #include "llvector4a.h" #include "llshadermgr.h" @@ -325,7 +324,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) { if (sLastMask != data_mask) { - bool error = false; if (gGLManager.mGLSLVersionMajor < 2 && gGLManager.mGLSLVersionMinor < 30) { @@ -392,7 +390,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) { if (gDebugSession) { - error = true; gFailLog << "Bad client state! " << array[i] << " disabled." << std::endl; } else @@ -412,7 +409,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) { //needs to be disabled, make sure it was (DEBUG TEMPORARY) if (gDebugSession) { - error = true; gFailLog << "Bad client state! " << array[i] << " enabled." << std::endl; } else @@ -779,7 +775,6 @@ void LLVertexBuffer::unbind() //static void LLVertexBuffer::cleanupClass() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS); unbind(); sStreamIBOPool.cleanup(); @@ -860,8 +855,6 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) : mMappable(false), mFence(NULL) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR); - mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping); //zero out offsets @@ -921,7 +914,6 @@ S32 LLVertexBuffer::getSize() const //virtual LLVertexBuffer::~LLVertexBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR); destroyGLBuffer(); destroyGLIndices(); @@ -1041,8 +1033,6 @@ void LLVertexBuffer::releaseIndices() void LLVertexBuffer::createGLBuffer(U32 size) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES); - if (mGLBuffer) { destroyGLBuffer(); @@ -1072,8 +1062,6 @@ void LLVertexBuffer::createGLBuffer(U32 size) void LLVertexBuffer::createGLIndices(U32 size) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES); - if (mGLIndices) { destroyGLIndices(); @@ -1108,7 +1096,6 @@ void LLVertexBuffer::createGLIndices(U32 size) void LLVertexBuffer::destroyGLBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_BUFFER); if (mGLBuffer) { if (mMappedDataUsingVBOs) @@ -1129,7 +1116,6 @@ void LLVertexBuffer::destroyGLBuffer() void LLVertexBuffer::destroyGLIndices() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_INDICES); if (mGLIndices) { if (mMappedIndexDataUsingVBOs) @@ -1150,8 +1136,6 @@ void LLVertexBuffer::destroyGLIndices() void LLVertexBuffer::updateNumVerts(S32 nverts) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_VERTS); - llassert(nverts >= 0); if (nverts > 65536) @@ -1174,8 +1158,6 @@ void LLVertexBuffer::updateNumVerts(S32 nverts) void LLVertexBuffer::updateNumIndices(S32 nindices) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_INDICES); - llassert(nindices >= 0); U32 needed_size = sizeof(U16) * (U32)nindices; @@ -1192,8 +1174,6 @@ void LLVertexBuffer::updateNumIndices(S32 nindices) void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER); - stop_glerror(); if (nverts < 0 || nindices < 0 || @@ -1344,8 +1324,6 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) llassert(newnverts >= 0); llassert(newnindices >= 0); - LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER); - updateNumVerts(newnverts); updateNumIndices(newnindices); @@ -1393,7 +1371,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map"); volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range) { bindGLBuffer(true); - LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); if (mFinal) { llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl; @@ -1442,7 +1419,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo if (!mVertexLocked) { - LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES); mVertexLocked = true; sMappedCount++; stop_glerror(); @@ -1573,7 +1549,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map"); volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); bindGLIndices(true); if (mFinal) { @@ -1620,8 +1595,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range if (!mIndexLocked) { - LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES); - mIndexLocked = true; sMappedCount++; stop_glerror(); @@ -1744,7 +1717,6 @@ static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range"); void LLVertexBuffer::unmapBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER); if (!useVBOs()) { return; //nothing to unmap @@ -2098,7 +2070,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { flush(); - LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER); //set up pointers if the data mask is different ... bool setup = (sLastMask != data_mask); @@ -2144,7 +2115,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) setup = setup || bindBuffer || bindIndices; } - bool error = false; if (gDebugGL && !mGLArray) { GLint buff; @@ -2153,7 +2123,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { if (gDebugSession) { - error = true; gFailLog << "Invalid GL vertex buffer bound: " << buff << std::endl; } else @@ -2169,7 +2138,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { if (gDebugSession) { - error = true; gFailLog << "Invalid GL index buffer bound: " << buff << std::endl; } else @@ -2240,7 +2208,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) // virtual (default) void LLVertexBuffer::setupVertexBuffer(U32 data_mask) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER); stop_glerror(); volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData; diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index e35d5b5dd..a13c0c3ca 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -30,7 +30,6 @@ set(llui_SOURCE_FILES llclipboard.cpp llcombobox.cpp llctrlselectioninterface.cpp - lldelayeduidelete.cpp lldraghandle.cpp lleditmenuhandler.cpp llfloater.cpp @@ -73,9 +72,9 @@ set(llui_SOURCE_FILES lluictrlfactory.cpp lluistring.cpp llundo.cpp + llview.cpp llviewborder.cpp llviewmodel.cpp - llview.cpp llviewquery.cpp ) @@ -90,7 +89,6 @@ set(llui_HEADER_FILES llclipboard.h llcombobox.h llctrlselectioninterface.h - lldelayeduidelete.h lldraghandle.h lleditmenuhandler.h llfloater.h @@ -105,8 +103,8 @@ set(llui_HEADER_FILES llmenugl.h llmodaldialog.h llmultifloater.h - llmultisliderctrl.h llmultislider.h + llmultisliderctrl.h llnotificationptr.h llnotifications.h llnotificationsutil.h @@ -122,8 +120,8 @@ set(llui_HEADER_FILES llscrollcontainer.h llscrollingpanellist.h llscrolllistctrl.h - llsliderctrl.h llslider.h + llsliderctrl.h llspinctrl.h llstyle.h lltabcontainer.h @@ -131,18 +129,18 @@ set(llui_HEADER_FILES lltexteditor.h lltextparser.h lltrans.h - lluiconstants.h - lluictrlfactory.h - lluictrl.h - lluifwd.h llui.h lluicolor.h + lluiconstants.h + lluictrl.h + lluictrlfactory.h + lluifwd.h lluistring.h lluixmltags.h llundo.h + llview.h llviewborder.h llviewmodel.h - llview.h llviewquery.h ) diff --git a/indra/llui/llalertdialog.cpp b/indra/llui/llalertdialog.cpp index 27700ca20..712683021 100644 --- a/indra/llui/llalertdialog.cpp +++ b/indra/llui/llalertdialog.cpp @@ -315,11 +315,11 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal) if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE) { - setCheckBox(LLNotifications::instance().getGlobalString("skipnexttime"), ignore_label); + setCheckBox(LLNotificationTemplates::instance().getGlobalString("skipnexttime"), ignore_label); } else if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE) { - setCheckBox(LLNotifications::instance().getGlobalString("alwayschoose"), ignore_label); + setCheckBox(LLNotificationTemplates::instance().getGlobalString("alwayschoose"), ignore_label); } } diff --git a/indra/llui/lldelayeduidelete.cpp b/indra/llui/lldelayeduidelete.cpp deleted file mode 100644 index 4f679c486..000000000 --- a/indra/llui/lldelayeduidelete.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// -#include "linden_common.h" -#include "lldelayeduidelete.h" -#define DELETE_DELAY 0.1f -#define DELETES_PER_DELAY 512 - -LLDeleteScheduler* gDeleteScheduler; - -std::list LLDeleteScheduler::sJobs; -LLDeleteScheduler::LLDeleteScheduler() : LLEventTimer(DELETE_DELAY) -{ -} -void LLDeleteScheduler::addViewDeleteJob(std::list views) -{ - if(!views.empty()) - { - LLViewDeleteJob* job = new LLViewDeleteJob(views); - sJobs.push_back(job); - } -} -BOOL LLDeleteScheduler::tick() // IMPORTANT: never return TRUE -{ - if(!sJobs.empty()) - { - U32 completed = 0; - do - { - LLDeleteJob* job = sJobs.front(); - if(job->work(completed)) - { - delete job; - sJobs.pop_front(); - } - } while((completed < DELETES_PER_DELAY) && !sJobs.empty()); - } - return FALSE; // EVER -} -BOOL LLDeleteJob::work(U32& completed) -{ - llwarns << "THIS IS SPOSED TO BE OVERRIDDEN" << llendl; - return TRUE; -} -LLViewDeleteJob::LLViewDeleteJob(std::list views) -: mList(views) -{ -} -LLViewDeleteJob::~LLViewDeleteJob() -{ -} -BOOL LLViewDeleteJob::work(U32& completed) -{ - do - { - if(!mList.empty()) - { - LLView* view = mList.front(); - delete view; - mList.pop_front(); - } - else - { - return TRUE; // job done - } - } while(++completed < DELETES_PER_DELAY); - return FALSE; -} -// diff --git a/indra/llui/lldelayeduidelete.h b/indra/llui/lldelayeduidelete.h deleted file mode 100644 index 131e43424..000000000 --- a/indra/llui/lldelayeduidelete.h +++ /dev/null @@ -1,32 +0,0 @@ -// -#ifndef LL_LLDELAYEDUIDELETE_H -#define LL_LLDELAYEDUIDELETE_H -#include "lleventtimer.h" -#include "llview.h" -class LLDeleteJob -{ -public: - virtual BOOL work(U32& completed); - virtual ~LLDeleteJob() {} -}; -class LLViewDeleteJob : public LLDeleteJob -{ -public: - LLViewDeleteJob(std::list views); - virtual ~LLViewDeleteJob(); - virtual BOOL work(U32& completed); -private: - std::list mList; -}; -class LLDeleteScheduler : public LLEventTimer -{ -public: - LLDeleteScheduler(); - void addViewDeleteJob(std::list views); - BOOL tick(); -private: - static std::list sJobs; -}; -extern LLDeleteScheduler* gDeleteScheduler; -#endif -// diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index b91b0df43..fde30fa6b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -277,30 +277,14 @@ void LLFloater::initFloater(const std::string& title, mMinimized = FALSE; mExpandedRect.set(0,0,0,0); - S32 close_pad; // space to the right of close box S32 close_box_size; // For layout purposes, how big is the close box? if (close_btn) { close_box_size = LLFLOATER_CLOSE_BOX_SIZE; - close_pad = 0; } else { close_box_size = 0; - close_pad = 0; - } - - S32 minimize_box_size; - S32 minimize_pad; - if (minimizable && !drag_on_left) - { - minimize_box_size = LLFLOATER_CLOSE_BOX_SIZE; - minimize_pad = 0; - } - else - { - minimize_box_size = 0; - minimize_pad = 0; } // Drag Handle diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 89b43f212..8c11a50b8 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -100,10 +100,10 @@ private: for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it) { - if (!LLNotifications::instance().templateExists((*it)->getName())) continue; + if (!LLNotificationTemplates::instance().templateExists((*it)->getName())) continue; // only store notifications flagged as persisting - LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate((*it)->getName()); + LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate((*it)->getName()); if (!templatep->mPersist) continue; data.append((*it)->asLLSD()); @@ -228,7 +228,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodeP LLXMLNodePtr child = xml_node->getFirstChild(); while(child) { - child = LLNotifications::instance().checkForXMLTemplate(child); + child = LLNotificationTemplates::instance().checkForXMLTemplate(child); LLSD item_entry; std::string element_name = child->getName()->mString; @@ -662,7 +662,7 @@ bool LLNotification::isEquivalentTo(LLNotificationPtr that) const void LLNotification::init(const std::string& template_name, const LLSD& form_elements) { - mTemplatep = LLNotifications::instance().getTemplate(template_name); + mTemplatep = LLNotificationTemplates::instance().getTemplate(template_name); if (!mTemplatep) return; const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs(); @@ -1098,12 +1098,19 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN return p->second; } +// this function is called once at construction time, after the object is constructed. +void LLNotificationTemplates::initSingleton() +{ + loadTemplates(); +} // this function is called once at construction time, after the object is constructed. void LLNotifications::initSingleton() { - loadTemplates(); - createDefaultChannels(); + loadNotifications(); + // Cannot create default channels here, since that recursively accesses the singleton. + // Instead we call createDefaultChannels() from LLAppViewer::init(). + //createDefaultChannels(); } void LLNotifications::createDefaultChannels() @@ -1142,7 +1149,7 @@ void LLNotifications::createDefaultChannels() static std::string sStringSkipNextTime("Skip this dialog next time"); static std::string sStringAlwaysChoose("Always choose this option"); -bool LLNotifications::addTemplate(const std::string &name, +bool LLNotificationTemplates::addTemplate(const std::string &name, LLNotificationTemplatePtr theTemplate) { if (mTemplates.count(name)) @@ -1154,7 +1161,7 @@ bool LLNotifications::addTemplate(const std::string &name, return true; } -LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name) +LLNotificationTemplatePtr LLNotificationTemplates::getTemplate(const std::string& name) { if (mTemplates.count(name)) { @@ -1166,12 +1173,12 @@ LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name) } } -bool LLNotifications::templateExists(const std::string& name) +bool LLNotificationTemplates::templateExists(const std::string& name) { return (mTemplates.count(name) != 0); } -void LLNotifications::clearTemplates() +void LLNotificationTemplates::clearTemplates() { mTemplates.clear(); } @@ -1192,7 +1199,7 @@ void LLNotifications::forceResponse(const LLNotification::Params& params, S32 op temp_notify->respond(response); } -LLNotifications::TemplateNames LLNotifications::getTemplateNames() const +LLNotificationTemplates::TemplateNames LLNotificationTemplates::getTemplateNames() const { TemplateNames names; for (TemplateMap::const_iterator it = mTemplates.begin(); it != mTemplates.end(); ++it) @@ -1242,7 +1249,7 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements) // returns true if the template request was invalid and there's nothing else we // can do with this node, false if you should keep processing (it may have // replaced the contents of the node referred to) -LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item) +LLXMLNodePtr LLNotificationTemplates::checkForXMLTemplate(LLXMLNodePtr item) { if (item->hasName("usetemplate")) { @@ -1271,7 +1278,7 @@ LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item) return item; } -bool LLNotifications::loadTemplates() +bool LLNotificationTemplates::loadTemplates() { const std::string xml_filename = "notifications.xml"; LLXMLNodePtr root; @@ -1289,11 +1296,6 @@ bool LLNotifications::loadTemplates() for (LLXMLNodePtr item = root->getFirstChild(); item.notNull(); item = item->getNextSibling()) { - // we do this FIRST so that item can be changed if we - // encounter a usetemplate -- we just replace the - // current xml node and keep processing - item = checkForXMLTemplate(item); - if (item->hasName("global")) { std::string global_name; @@ -1321,7 +1323,35 @@ bool LLNotifications::loadTemplates() " found in " << xml_filename << llendl; continue; } + } + + return true; +} +bool LLNotifications::loadNotifications() +{ + const std::string xml_filename = "notifications.xml"; + LLXMLNodePtr root; + + BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + + if (!success || root.isNull() || !root->hasName( "notifications" )) + { + llerrs << "Problem reading UI Notifications file: " << xml_filename << llendl; + return false; + } + + for (LLXMLNodePtr item = root->getFirstChild(); + item.notNull(); item = item->getNextSibling()) + { + // we do this FIRST so that item can be changed if we + // encounter a usetemplate -- we just replace the + // current xml node and keep processing + item = LLNotificationTemplates::instance().checkForXMLTemplate(item); + + if (!item->hasName("notification")) + continue; + // now we know we have a notification entry, so let's build it LLNotificationTemplatePtr pTemplate(new LLNotificationTemplate()); @@ -1369,7 +1399,7 @@ bool LLNotifications::loadTemplates() for (LLXMLNodePtr child = item->getFirstChild(); !child.isNull(); child = child->getNextSibling()) { - child = checkForXMLTemplate(child); + child = LLNotificationTemplates::instance().checkForXMLTemplate(child); // if (child->hasName("url")) @@ -1405,7 +1435,7 @@ bool LLNotifications::loadTemplates() pTemplate->mForm = LLNotificationFormPtr(new LLNotificationForm(pTemplate->mName, child)); } } - addTemplate(pTemplate->mName, pTemplate); + LLNotificationTemplates::instance().addTemplate(pTemplate->mName, pTemplate); } //std::ostringstream ostream; @@ -1485,7 +1515,7 @@ void LLNotifications::update(const LLNotificationPtr pNotif) } -LLNotificationPtr LLNotifications::find(LLUUID uuid) +LLNotificationPtr LLNotifications::find(LLUUID const& uuid) { LLNotificationPtr target = LLNotificationPtr(new LLNotification(uuid)); LLNotificationSet::iterator it=mItems.find(target); @@ -1505,7 +1535,7 @@ void LLNotifications::forEachNotification(NotificationProcess process) std::for_each(mItems.begin(), mItems.end(), process); } -std::string LLNotifications::getGlobalString(const std::string& key) const +std::string LLNotificationTemplates::getGlobalString(const std::string& key) const { GlobalStringMap::const_iterator it = mGlobalStrings.find(key); if (it != mGlobalStrings.end()) diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index b6ee760f3..1585f35f4 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -679,45 +679,20 @@ private: LLNotificationComparator mComparator; }; - - -class LLNotifications : - public LLSingleton, - public LLNotificationChannelBase +class LLNotificationTemplates : + public LLSingleton { - LOG_CLASS(LLNotifications); + LOG_CLASS(LLNotificationTemplates); + + friend class LLSingleton; + + // This class may not use LLNotifications. + typedef char LLNotifications; - friend class LLSingleton; public: - // load notification descriptions from file; - // OK to call more than once because it will reload bool loadTemplates(); LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item); - // we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line - LLNotificationPtr add(const std::string& name, - const LLSD& substitutions = LLSD(), - const LLSD& payload = LLSD()); - LLNotificationPtr add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload, - const std::string& functor_name); - LLNotificationPtr add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload, - LLNotificationFunctorRegistry::ResponseFunctor functor); - LLNotificationPtr add(const LLNotification::Params& p); - - void add(const LLNotificationPtr pNotif); - void cancel(LLNotificationPtr pNotif); - void update(const LLNotificationPtr pNotif); - - LLNotificationPtr find(LLUUID uuid); - - typedef boost::function NotificationProcess; - - void forEachNotification(NotificationProcess process); - // This is all stuff for managing the templates // take your template out LLNotificationTemplatePtr getTemplate(const std::string& name); @@ -736,17 +711,67 @@ public: // useful if you're reloading the file void clearTemplates(); // erase all templates - void forceResponse(const LLNotification::Params& params, S32 option); + // put your template in (should only be called from LLNotifications). + bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate); + std::string getGlobalString(const std::string& key) const; + +private: + // we're a singleton, so we don't have a public constructor + LLNotificationTemplates() { } + /*virtual*/ void initSingleton(); + + TemplateMap mTemplates; + + typedef std::map XMLTemplateMap; + XMLTemplateMap mXmlTemplates; + + typedef std::map GlobalStringMap; + GlobalStringMap mGlobalStrings; +}; + +class LLNotifications : + public LLSingleton, + public LLNotificationChannelBase +{ + LOG_CLASS(LLNotifications); + + friend class LLSingleton; +public: + // load notification descriptions from file; + // OK to call more than once because it will reload + bool loadNotifications(); void createDefaultChannels(); + // we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions = LLSD(), + const LLSD& payload = LLSD()); + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + const std::string& functor_name); + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + LLNotificationFunctorRegistry::ResponseFunctor functor); + LLNotificationPtr add(const LLNotification::Params& p); + + void forceResponse(const LLNotification::Params& params, S32 option); + typedef std::map ChannelMap; ChannelMap mChannels; void addChannel(LLNotificationChannelPtr pChan); LLNotificationChannelPtr getChannel(const std::string& channelName); + + void add(const LLNotificationPtr pNotif); + void cancel(LLNotificationPtr pNotif); + void update(const LLNotificationPtr pNotif); + LLNotificationPtr find(LLUUID const& uuid); - std::string getGlobalString(const std::string& key) const; + typedef boost::function NotificationProcess; + void forEachNotification(NotificationProcess process); private: // we're a singleton, so we don't have a public constructor @@ -760,22 +785,11 @@ private: bool uniqueFilter(LLNotificationPtr pNotification); bool uniqueHandler(const LLSD& payload); bool failedUniquenessTest(const LLSD& payload); + LLNotificationChannelPtr pHistoryChannel; LLNotificationChannelPtr pExpirationChannel; - - // put your template in - bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate); - TemplateMap mTemplates; - - std::string mFileName; - - typedef std::map XMLTemplateMap; - XMLTemplateMap mXmlTemplates; LLNotificationMap mUniqueNotifications; - - typedef std::map GlobalStringMap; - GlobalStringMap mGlobalStrings; }; diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 588a36a0f..8a22df234 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -1065,7 +1065,6 @@ struct LLLayoutStack::LLEmbeddedPanel mVisibleAmt(1.f) // default to fully visible { LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; - LLRect resize_bar_rect = panelp->getRect(); S32 min_dim; if (orientation == HORIZONTAL) diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp index 593f7207c..9dbdb8a8e 100644 --- a/indra/llui/llprogressbar.cpp +++ b/indra/llui/llprogressbar.cpp @@ -83,9 +83,6 @@ void LLProgressBar::draw() bar_bg_imagep->draw(getLocalRect(), background_color); - F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32())); - LLColor4 bar_color = LLUI::sColorsGroup->getColor("LoginProgressBarFgColor"); - bar_color.mV[3] = alpha; LLRect progress_rect = getLocalRect(); progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f)); bar_fg_imagep->draw(progress_rect); diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 07649adfa..334ead62a 100644 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -383,6 +383,13 @@ std::string LLResMgr::getMonetaryString( S32 input ) const void LLResMgr::getIntegerString( std::string& output, S32 input ) const { + // handle special case of input value being zero + if (input == 0) + { + output = "0"; + return; + } + S32 fraction = 0; std::string fraction_string; S32 remaining_count = input; diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index 0cf96ff0d..04e4b8cf2 100644 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -261,7 +261,6 @@ void LLSlider::draw() F32 opacity = getEnabled() ? 1.f : 0.3f; LLColor4 center_color = (mThumbCenterColor % opacity); - LLColor4 track_color = (mTrackColor % opacity); // Track LLRect track_rect(mThumbImage->getWidth() / 2, diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h index 613d2e426..72c991c63 100644 --- a/indra/llui/llstyle.h +++ b/indra/llui/llstyle.h @@ -35,7 +35,7 @@ #include "v4color.h" #include "llresmgr.h" -#include "llfont.h" +#include "llfontfreetype.h" #include "llui.h" #include "lluiimage.h" diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3be654b4a..59fbd367b 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2228,7 +2228,7 @@ void LLTextEditor::pasteHelper(bool is_primary) for( S32 i = 0; i < len; i++ ) { llwchar wc = clean_string[i]; - if( (wc < LLFont::FIRST_CHAR) && (wc != LF) ) + if( (wc < LLFontFreetype::FIRST_CHAR) && (wc != LF) ) { clean_string[i] = LL_UNKNOWN_CHAR; } diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 570f668e8..3123092f9 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -348,8 +348,10 @@ public: // even if their constructors have side effects void reference() { +#if LL_WINDOWS S32 dummy; dummy = 0; +#endif /*LL_WINDOWS*/ } }; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 6c1bce689..e3edbcc6f 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -59,10 +59,6 @@ #include "lltextbox.h" #include "llfasttimer.h" -// -#include "lldelayeduidelete.h" -// - using namespace LLOldEvents; //HACK: this allows you to instantiate LLView from xml with "" which we don't want @@ -1420,7 +1416,7 @@ void LLView::updateBoundingRect() { if (isDead()) return; - LLRect cur_rect = mBoundingRect; + //LLRect cur_rect = mBoundingRect; if (getUseBoundingRect()) { diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index 8dabf5b91..ca491529b 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -41,12 +41,12 @@ if (LINUX) LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp) LIST(APPEND llvfs_HEADER_FILES lldir_linux.h) - if (VIEWER AND INSTALL) + if (INSTALL) set_source_files_properties(lldir_linux.cpp PROPERTIES COMPILE_FLAGS "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\"" ) - endif (VIEWER AND INSTALL) + endif (INSTALL) endif (LINUX) if (WINDOWS) diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 12c778cd8..c7d9509e1 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -18,6 +18,7 @@ include(LLMath) include(LLRender) include(LLVFS) include(LLWindow) +include(LLXML) include(UI) include_directories( @@ -27,13 +28,16 @@ include_directories( ${LLRENDER_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} + ${LLXML_INCLUDE_DIRS} + ${DIRECTX_INCLUDE_DIR} ) set(llwindow_SOURCE_FILES llkeyboard.cpp llkeyboardheadless.cpp - llwindowheadless.cpp + llwindow.cpp llwindowcallbacks.cpp + llwindowheadless.cpp ) set(llwindow_HEADER_FILES @@ -41,30 +45,47 @@ set(llwindow_HEADER_FILES llkeyboard.h llkeyboardheadless.h - llwindowheadless.h llwindowcallbacks.h + llwindowheadless.h ) set(viewer_SOURCE_FILES - llwindow.cpp llmousehandler.cpp ) set(viewer_HEADER_FILES - llwindow.h - llpreeditor.h llmousehandler.h + llpreeditor.h + llwindow.h ) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level -if (LINUX AND VIEWER) +if (LINUX) set(llwindow_LINK_LIBRARIES + ${LLCOMMON_LIBRARIES} + ${LLIMAGE_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLRENDER_LIBRARIES} + ${LLVFS_LIBRARIES} + ${LLWINDOW_LIBRARIES} + ${LLXML_LIBRARIES} ${UI_LIBRARIES} # for GTK ${SDL_LIBRARY} fontconfig # For FCInit and other FC* functions. ) -endif (LINUX AND VIEWER) + + list(APPEND viewer_SOURCE_FILES + llkeyboardsdl.cpp + llwindowsdl.cpp + ) + list(APPEND viewer_HEADER_FILES + llkeyboardsdl.h + llwindowsdl.h + ) + + +endif (LINUX) if (DARWIN) list(APPEND llwindow_SOURCE_FILES @@ -87,29 +108,19 @@ if (DARWIN) ) endif (DARWIN) -if (LINUX AND VIEWER) - list(APPEND viewer_SOURCE_FILES - llkeyboardsdl.cpp - llwindowsdl.cpp - ) - list(APPEND viewer_HEADER_FILES - llkeyboardsdl.h - llwindowsdl.h - ) -endif (LINUX AND VIEWER) if (WINDOWS) list(APPEND llwindow_SOURCE_FILES - llwindowwin32.cpp + lldragdropwin32.cpp lldxhardware.cpp llkeyboardwin32.cpp - lldragdropwin32.cpp + llwindowwin32.cpp ) list(APPEND llwindow_HEADER_FILES - llwindowwin32.h + lldragdropwin32.h lldxhardware.h llkeyboardwin32.h - lldragdropwin32.h + llwindowwin32.h ) list(APPEND llwindow_LINK_LIBRARIES comdlg32 # Common Dialogs for ChooseColor @@ -129,41 +140,16 @@ endif (SOLARIS) set_source_files_properties(${llwindow_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if (SERVER AND NOT WINDOWS AND NOT DARWIN) - set(server_SOURCE_FILES - llwindowmesaheadless.cpp - ) - set(server_HEADER_FILES - llwindowmesaheadless.h - ) - copy_server_sources( - llwindow - ) - - - set_source_files_properties( - ${server_SOURCE_FILES} - PROPERTIES - COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1" - ) - add_library (llwindowheadless - ${llwindow_SOURCE_FILES} - ${server_SOURCE_FILES} - ) - target_link_libraries (llwindowheadless ${llwindow_LINK_LIBRARIES}) -endif (SERVER AND NOT WINDOWS AND NOT DARWIN) - if (llwindow_HEADER_FILES) list(APPEND llwindow_SOURCE_FILES ${llwindow_HEADER_FILES}) endif (llwindow_HEADER_FILES) list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) -if (VIEWER) - add_library (llwindow +add_library (llwindow ${llwindow_SOURCE_FILES} ${viewer_SOURCE_FILES} ) - add_dependencies(llwindow prepare) - target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) -endif (VIEWER) +add_dependencies(llwindow prepare) +target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES}) + diff --git a/indra/llwindow/GL/glh_extensions.h b/indra/llwindow/GL/glh_extensions.h index b936b5d30..554cb1731 100644 --- a/indra/llwindow/GL/glh_extensions.h +++ b/indra/llwindow/GL/glh_extensions.h @@ -1,5 +1,7 @@ /* * glh_extensions.h + * $LicenseInfo:firstyear=2006&license=mit$ (mit used here to satisfy validity checker) + * Copyright (C) 2006, NVIDIA * From nVidia Corporation, downloaded 2006-12-18 from: * http://developer.nvidia.com/attach/8196 * ("NVParse Library with Source (.zip) (2390 KB)") @@ -8,6 +10,8 @@ * "The files bison.exe, bison.simple, and flex.exe are covered by * the GPL. All other files in this distribution can be used however * you want." + * $/LicenseInfo$ + */ #ifndef GLH_EXTENSIONS @@ -109,7 +113,7 @@ static const char* EatNonWhiteSpace(const char *str) int glh_init_extensions(const char *origReqExts) { // Length of requested extensions string - unsigned reqExtsLen; + //unsigned reqExtsLen; char *reqExts; // Ptr for individual extensions within reqExts char *reqExt; @@ -151,8 +155,8 @@ int glh_init_extensions(const char *origReqExts) return TRUE; } reqExts = strdup(origReqExts); - reqExtsLen = (S32)strlen(reqExts); /* + reqExtsLen = (S32)strlen(reqExts); if (NULL == gGLHExts.mUnsupportedExts) { gGLHExts.mUnsupportedExts = (char*)malloc(reqExtsLen + 1); diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index f69400191..80a272789 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1619,24 +1619,24 @@ void check_vm_bloat() const long long significant_vm_difference = 250 * 1024*1024; const long long significant_rss_difference = 50 * 1024*1024; - ssize_t res; size_t dummy; char *ptr; - for (int i=0; i<22; ++i) // parse past the values we don't want + size_t delim_result = 0; + for (int i=0; i<22 && delim_result > -1; ++i) // parse past the values we don't want { ptr = NULL; - res = getdelim(&ptr, &dummy, ' ', fp); + delim_result = getdelim(&ptr, &dummy, ' ', fp); free(ptr); } // 23rd space-delimited entry is vsize ptr = NULL; - res = getdelim(&ptr, &dummy, ' ', fp); + delim_result = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); long long this_vm_size = atoll(ptr); free(ptr); // 24th space-delimited entry is RSS ptr = NULL; - res = getdelim(&ptr, &dummy, ' ', fp); + delim_result = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); long long this_rss_size = getpagesize() * atoll(ptr); free(ptr); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 46b0b270c..9e3abed3e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -42,10 +42,8 @@ include(GooglePerfTools) include(StateMachine) include(TemplateCheck) include(UI) -include(LLKDU) include(ViewerMiscLibs) include(GLOD) -include(ViewerArtwork.cmake) include(LLAppearance) if (WINDOWS) @@ -58,7 +56,7 @@ include_directories( ${DBUSGLIB_INCLUDE_DIRS} ${HUNSPELL_INCLUDE_DIR} ${ELFIO_INCLUDE_DIR} - ${JSONCPP_INCLUDE_DIRS} + ${JSONCPP_INCLUDE_DIR} ${GLOD_INCLUDE_DIRS} ${LLAUDIO_INCLUDE_DIRS} ${LLCHARACTER_INCLUDE_DIRS} @@ -81,6 +79,7 @@ include_directories( ) set(viewer_SOURCE_FILES + NACLantispam.cpp aoremotectrl.cpp ascentfloatercontactgroups.cpp ascentkeyword.cpp @@ -88,12 +87,10 @@ set(viewer_SOURCE_FILES ascentprefssys.cpp ascentprefsvan.cpp chatbar_as_cmdline.cpp - emeraldboobutils.cpp floaterao.cpp floaterlocalassetbrowse.cpp floatervoicelicense.cpp hbfloatergrouptitles.cpp - hgfloatertexteditor.cpp hippofloaterxml.cpp hippogridmanager.cpp hippolimits.cpp @@ -122,7 +119,6 @@ set(viewer_SOURCE_FILES llaudiosourcevo.cpp llavatarpropertiesprocessor.cpp llbox.cpp - llbuildnewviewsscheduler.cpp llcallbacklist.cpp llcallingcard.cpp llcapabilitylistener.cpp @@ -161,6 +157,7 @@ set(viewer_SOURCE_FILES lldynamictexture.cpp llemote.cpp llenvmanager.cpp + llestateinfomodel.cpp lleventinfo.cpp lleventnotifier.cpp lleventpoll.cpp @@ -234,6 +231,9 @@ set(viewer_SOURCE_FILES llfloateropenobject.cpp llfloateroutbox.cpp llfloaterparcel.cpp + llfloaterpathfindingcharacters.cpp + llfloaterpathfindinglinksets.cpp + llfloaterpathfindingobjects.cpp llfloaterpermissionsmgr.cpp llfloaterperms.cpp llfloaterpostcard.cpp @@ -258,8 +258,6 @@ set(viewer_SOURCE_FILES llfloatertos.cpp llfloaterurldisplay.cpp llfloaterurlentry.cpp - llfloatervfs.cpp - llfloatervfsexplorer.cpp llfloatervoicedevicesettings.cpp llfloaterwater.cpp llfloaterwindlight.cpp @@ -292,7 +290,6 @@ set(viewer_SOURCE_FILES llimpanel.cpp llimview.cpp llinventoryactions.cpp - llinventorybackup.cpp llinventorybridge.cpp llinventoryclipboard.cpp llinventoryfilter.cpp @@ -318,7 +315,6 @@ set(viewer_SOURCE_FILES llmarketplacenotifications.cpp llmediactrl.cpp llmediaremotectrl.cpp - llmemoryview.cpp llmenucommands.cpp llmenuoptionpathfindingrebakenavmesh.cpp llmeshrepository.cpp @@ -347,8 +343,8 @@ set(viewer_SOURCE_FILES llpaneldirland.cpp llpaneldirpeople.cpp llpaneldirplaces.cpp - llpaneldisplay.cpp llpaneldirpopular.cpp + llpaneldisplay.cpp llpaneleditwearable.cpp llpanelevent.cpp llpanelface.cpp @@ -551,11 +547,10 @@ set(viewer_SOURCE_FILES llworld.cpp llworldmap.cpp llworldmapmessage.cpp - llworldmipmap.cpp llworldmapview.cpp + llworldmipmap.cpp llxmlrpcresponder.cpp m7wlinterface.cpp - NACLantispam.cpp noise.cpp pipeline.cpp qtoolalign.cpp @@ -583,6 +578,8 @@ set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake + + NACLantispam.h aoremotectrl.h ascentfloatercontactgroups.h ascentkeyword.h @@ -590,12 +587,10 @@ set(viewer_HEADER_FILES ascentprefssys.h ascentprefsvan.h chatbar_as_cmdline.h - emeraldboobutils.h floaterao.h floaterlocalassetbrowse.h floatervoicelicense.h hbfloatergrouptitles.h - hgfloatertexteditor.h hippofloaterxml.h hippogridmanager.h hippolimits.h @@ -625,7 +620,6 @@ set(viewer_HEADER_FILES llaudiosourcevo.h llavatarpropertiesprocessor.h llbox.h - llbuildnewviewsscheduler.h llcallbacklist.h llcallingcard.h llcapabilitylistener.h @@ -664,6 +658,7 @@ set(viewer_HEADER_FILES lldynamictexture.h llemote.h llenvmanager.h + llestateinfomodel.h lleventinfo.h lleventnotifier.h lleventpoll.h @@ -701,9 +696,9 @@ set(viewer_HEADER_FILES llfloaterdisplayname.h llfloatereditui.h llfloaterenvsettings.h + llfloaterevent.h llfloaterexploreanimations.h llfloaterexploresounds.h - llfloaterevent.h llfloaterfeed.h llfloaterfonttest.h llfloaterfriends.h @@ -737,6 +732,9 @@ set(viewer_HEADER_FILES llfloateropenobject.h llfloateroutbox.h llfloaterparcel.h + llfloaterpathfindingcharacters.h + llfloaterpathfindinglinksets.h + llfloaterpathfindingobjects.h llfloaterpermissionsmgr.h llfloaterperms.h llfloaterpostcard.h @@ -761,8 +759,6 @@ set(viewer_HEADER_FILES llfloatertos.h llfloaterurldisplay.h llfloaterurlentry.h - llfloatervfs.h - llfloatervfsexplorer.h llfloatervoicedevicesettings.h llfloaterwater.h llfloaterwindlight.h @@ -794,7 +790,6 @@ set(viewer_HEADER_FILES llhudview.h llimpanel.h llimview.h - llinventorybackup.h llinventorybridge.h llinventoryclipboard.h llinventoryfilter.h @@ -821,9 +816,8 @@ set(viewer_HEADER_FILES llmarketplacenotifications.h llmediactrl.h llmediaremotectrl.h - llmemoryview.h - llmenuoptionpathfindingrebakenavmesh.h llmenucommands.h + llmenuoptionpathfindingrebakenavmesh.h llmeshrepository.h llmimetypes.h llmorphview.h @@ -1061,12 +1055,11 @@ set(viewer_HEADER_FILES llworld.h llworldmap.h llworldmapmessage.h - llworldmipmap.h llworldmapview.h + llworldmipmap.h llxmlrpcresponder.h m7wlinterface.h macmain.h - NACLantispam.h noise.h pipeline.h qtoolalign.h @@ -1086,9 +1079,9 @@ set(viewer_HEADER_FILES shcommandhandler.h shfloatermediaticker.h slfloatermediafilter.h + wlfPanel_AdvSettings.h VertexCache.h VorbisFramework.h - wlfPanel_AdvSettings.h ) source_group("CMake Rules" FILES ViewerInstall.cmake) @@ -1174,66 +1167,53 @@ if (WINDOWS) # viewerRes.rc is the only buildable file, but # the rest are all dependencies of it. set(viewer_RESOURCE_FILES - ${ARTWORK_DIR}/res/arrow.cur - ${ARTWORK_DIR}/res/arrowcop.cur - ${ARTWORK_DIR}/res/arrowcopmulti.cur - ${ARTWORK_DIR}/res/arrowdrag.cur - ${ARTWORK_DIR}/res/circleandline.cur - ${ARTWORK_DIR}/res/icon1.ico - ${ARTWORK_DIR}/res/llarrow.cur - ${ARTWORK_DIR}/res/llarrowdrag.cur - ${ARTWORK_DIR}/res/llarrowdragmulti.cur - ${ARTWORK_DIR}/res/llarrowlocked.cur - ${ARTWORK_DIR}/res/llgrablocked.cur - ${ARTWORK_DIR}/res/llno.cur - ${ARTWORK_DIR}/res/llnolocked.cur - ${ARTWORK_DIR}/res/lltoolcamera.cur - ${ARTWORK_DIR}/res/lltoolcreate.cur - ${ARTWORK_DIR}/res/lltoolfocus.cur - ${ARTWORK_DIR}/res/lltoolgrab.cur - ${ARTWORK_DIR}/res/lltoolland.cur - ${ARTWORK_DIR}/res/lltoolpan.cur - ${ARTWORK_DIR}/res/lltoolpipette.cur - ${ARTWORK_DIR}/res/lltoolrotate.cur - ${ARTWORK_DIR}/res/lltoolscale.cur - ${ARTWORK_DIR}/res/lltooltranslate.cur - ${ARTWORK_DIR}/res/lltoolzoomin.cur - ${ARTWORK_DIR}/res/lltoolzoomout.cur - ${ARTWORK_DIR}/res/snowglobe_icon.BMP - ${ARTWORK_DIR}/res/snowglobe_icon.ico - ${ARTWORK_DIR}/res/resource.h - ${ARTWORK_DIR}/res/toolpickobject.cur - ${ARTWORK_DIR}/res/toolpickobject2.cur - ${ARTWORK_DIR}/res/toolpickobject3.cur - ${ARTWORK_DIR}/res/toolpipette.cur - ${ARTWORK_DIR}/res/toolbuy.cur - ${ARTWORK_DIR}/res/toolopen.cur - ${ARTWORK_DIR}/res/toolpay.cur - ${ARTWORK_DIR}/res/toolsit.cur + res/arrow.cur + res/arrowcop.cur + res/arrowcopmulti.cur + res/arrowdrag.cur + res/circleandline.cur + res/icon1.ico + res/llarrow.cur + res/llarrowdrag.cur + res/llarrowdragmulti.cur + res/llarrowlocked.cur + res/llgrablocked.cur + res/llno.cur + res/llnolocked.cur + res/lltoolcamera.cur + res/lltoolcreate.cur + res/lltoolfocus.cur + res/lltoolgrab.cur + res/lltoolland.cur + res/lltoolpan.cur + res/lltoolpipette.cur + res/lltoolrotate.cur + res/lltoolscale.cur + res/lltooltranslate.cur + res/lltoolzoomin.cur + res/lltoolzoomout.cur + res/snowglobe_icon.BMP + res/snowglobe_icon.ico + res/resource.h + res/toolpickobject.cur + res/toolpickobject2.cur + res/toolpickobject3.cur + res/toolpipette.cur + res/toolbuy.cur + res/toolopen.cur + res/toolpay.cur + res/toolsit.cur ) set_source_files_properties(${viewer_RESOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) - if(NOT ARTWORK_IN_SOURCE) - # The resource compiler needs to find resources here. - include_directories(${ARTWORK_DIR}/res) - endif(NOT ARTWORK_IN_SOURCE) + set(viewer_RESOURCE_FILES + res/resource.h + res/viewerRes.rc + ${viewer_RESOURCE_FILES} + ) - if (MSVC71 OR MSVC80 AND NOT VISTA_ICON) - set(viewer_RESOURCE_FILES - res/resource.h - res/viewerRes_bc.rc - ${viewer_RESOURCE_FILES} - ) - else (MSVC71 OR MSVC80 AND NOT VISTA_ICON) - set(viewer_RESOURCE_FILES - res/resource.h - res/viewerRes.rc - ${viewer_RESOURCE_FILES} - ) - endif (MSVC71 OR MSVC80 AND NOT VISTA_ICON) - SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES}) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) @@ -1339,22 +1319,20 @@ set_source_files_properties(${viewer_APPSETTINGS_FILES} list(APPEND viewer_SOURCE_FILES ${viewer_APPSETTINGS_FILES}) -if(ARTWORK_EXISTS) - set(viewer_CHARACTER_FILES - ${ARTWORK_DIR}/character/attentions.xml - ${ARTWORK_DIR}/character/attentionsN.xml - ${ARTWORK_DIR}/character/avatar_lad.xml - ${ARTWORK_DIR}/character/avatar_skeleton.xml - ${ARTWORK_DIR}/character/genepool.xml +set(viewer_CHARACTER_FILES + character/attentions.xml + character/attentionsN.xml + character/avatar_lad.xml + character/avatar_skeleton.xml + character/genepool.xml ) - source_group("Character File" FILES ${viewer_CHARACTER_FILES}) +source_group("Character File" FILES ${viewer_CHARACTER_FILES}) - set_source_files_properties(${viewer_CHARACTER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties(${viewer_CHARACTER_FILES} + PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) -endif(ARTWORK_EXISTS) +list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) if (WINDOWS) file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) @@ -1420,10 +1398,6 @@ if (!DISABLE_TEMPLATE_CHECK) check_message_template(${VIEWER_BINARY_NAME}) endif (!DISABLE_TEMPLATE_CHECK) -if (LLKDU_LIBRARY) - add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY}) -endif (LLKDU_LIBRARY) - # We package by default on Linux so we can run from newview/packaged. if (LINUX) set(PACKAGE_DEFAULT ON) diff --git a/indra/newview/NACLantispam.cpp b/indra/newview/NACLantispam.cpp index a46378268..44d91cc13 100644 --- a/indra/newview/NACLantispam.cpp +++ b/indra/newview/NACLantispam.cpp @@ -23,6 +23,14 @@ #include #include +bool can_block(const LLUUID& id) +{ + if (id.isNull() || gAgent.getID() == id) return false; //Can't block system or self. + if (const LLViewerObject* obj = gObjectList.findObject(id)) //From an object, + return !obj->permYouOwner(); //not own object. + return true; +} + U32 NACLAntiSpamRegistry::globalAmount; U32 NACLAntiSpamRegistry::globalTime; bool NACLAntiSpamRegistry::bGlobalQueue; @@ -308,10 +316,8 @@ void NACLAntiSpamRegistry::blockGlobalEntry(LLUUID& source) bool NACLAntiSpamRegistry::checkQueue(U32 name, LLUUID& source, U32 multiplier) //returns true if blocked { - if(source.isNull() || gAgent.getID() == source) return false; - LLViewerObject *obj=gObjectList.findObject(source); - if(obj && obj->permYouOwner()) return false; - + if (!can_block(source)) return false; + int result; if(bGlobalQueue) { diff --git a/indra/newview/ViewerArtwork.cmake b/indra/newview/ViewerArtwork.cmake deleted file mode 100644 index e9ed5a5b9..000000000 --- a/indra/newview/ViewerArtwork.cmake +++ /dev/null @@ -1,62 +0,0 @@ -set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH - "Path to artwork files.") - -# Hide the ARTWORK_REQUIRED cache option by default. -set(doc "Require artwork?") -if(DEFINED ARTWORK_REQUIRED) - set(ARTWORK_REQUIRED "${ARTWORK_REQUIRED}" CACHE INTERNAL "${doc}") -endif(DEFINED ARTWORK_REQUIRED) - -# Check if artwork is available. -if(EXISTS "${ARTWORK_DIR}/res/arrow.cur") - set(ARTWORK_EXISTS 1) -else(EXISTS "${ARTWORK_DIR}/res/arrow.cur") - set(ARTWORK_EXISTS 0) - if(PACKAGE) - set(ARTWORK_REQUIRED 1) - set(_ARTWORK_MESSAGE "Artwork is required to build a PACKAGE.") - elseif(WINDOWS) - set(ARTWORK_REQUIRED 1) - set(_ARTWORK_MESSAGE "Artwork is required to build on Windows.") - else() - option(ARTWORK_REQUIRED "${doc}" ON) - set(_ARTWORK_MESSAGE "Alternatively, disable ARTWORK_REQUIRED.") - # Show the option. - set(ARTWORK_REQUIRED "${ARTWORK_REQUIRED}" CACHE BOOL "${doc}" FORCE) - endif() -endif(EXISTS "${ARTWORK_DIR}/res/arrow.cur") - -# Verify artwork setting. -if(NOT ARTWORK_EXISTS AND ARTWORK_REQUIRED) - # Try to report the artwork asset URL. - set(asset_urls_file "${CMAKE_SOURCE_DIR}/../doc/asset_urls.txt") - if(EXISTS "${asset_urls_file}") - file(STRINGS "${asset_urls_file}" art_line REGEX "SLASSET_ART=") - string(REPLACE "SLASSET_ART=" "" SLASSET_ART "${art_line}") - endif(EXISTS "${asset_urls_file}") - if(NOT SLASSET_ART) - set(SLASSET_ART "http://wiki.secondlife.com/wiki/Source_downloads") - endif(NOT SLASSET_ART) - - # Report missing artwork. - message(FATAL_ERROR - "The artwork directory\n" - " ARTWORK_DIR = ${ARTWORK_DIR}\n" - "does not appear to contain the viewer artwork. " - "Download artwork files from\n" - " ${SLASSET_ART}\n" - "and extract the zip file. " - "Then set the ARTWORK_DIR cache entry to point at " - "linden/indra/newview within the extracted directory. " - "See the wiki for further help:\n" - " http://wiki.secondlife.com/wiki/Get_source_and_compile\n" - "${_ARTWORK_MESSAGE}" - ) -endif(NOT ARTWORK_EXISTS AND ARTWORK_REQUIRED) - -# Check if the artwork is in the source tree. -if(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem") - set(ARTWORK_IN_SOURCE 1) -else(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem") - set(ARTWORK_IN_SOURCE 0) -endif(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem") diff --git a/indra/newview/aoremotectrl.cpp b/indra/newview/aoremotectrl.cpp index 8cafdd98e..d9b782fca 100644 --- a/indra/newview/aoremotectrl.cpp +++ b/indra/newview/aoremotectrl.cpp @@ -84,8 +84,11 @@ BOOL AORemoteCtrl::postBuild() { childSetAction("ao_btn", onClickToggleAO, this); - childSetAction("ao_sit_btn", onClickToggleAOSit, this); - childSetAction("ao_show_btn", onClickShowAO, this); + if (gSavedSettings.getBOOL("ShowAOSitPopup")) + { + childSetAction("ao_sit_btn", onClickToggleAOSit, this); + //childSetAction("ao_show_btn", onClickShowAO, this); + } childSetAction("popup_btn", onClickPopupBtn, this); return TRUE; diff --git a/indra/newview/app_settings/default_grids.xml b/indra/newview/app_settings/default_grids.xml old mode 100755 new mode 100644 diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 0cc3d6693..b084a5894 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -119,7 +119,7 @@ AGENT_ALWAYS_RUN Returned by llGetAgentInfo if the Agent has 'Always Run' enable AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control AGENT_LIST_PARCEL Passed to llGetAgentList to return only agents on the same parcel where the script is running -AGENT_LIST_PARCEL_OWNER Passed to llGetAgentList to return only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object +AGENT_LIST_PARCEL_OWNER Passed to llGetAgentList to return only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object AGENT_LIST_REGION Passed to llGetAgentList to return any/all agents in the region PSYS_PART_FLAGS @@ -177,9 +177,18 @@ OBJECT_TOTAL_SCRIPT_COUNT Gets the number of scripts, both running and stopped, OBJECT_SCRIPT_MEMORY Gets the total amount of script memory allocated to the object or agent, in bytes. OBJECT_SCRIPT_TIME Gets the total amount of average script CPU time used by the object or agent, in seconds. OBJECT_PRIM_EQUIVALENCE Gets the prim equivalence of the object. -OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost. +OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost. OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost. -OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost. +OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost. +OBJECT_PATHFINDING_TYPE Used with llGetObjectDetails to get an object's pathfinding settings. +OPT_UNKNOWN Returned object pathfinding type by llGetObjectDetails for attachments, Linden trees and grass. +OPT_LEGACY_LINKSET Returned object pathfinding type by llGetObjectDetails for movable obstacles, movable phantoms, physical, and volumedetect objects. +OPT_AVATAR Returned object pathfinding type by llGetObjectDetails for avatars. +OPT_PATHFINDING_CHARACTER Returned object pathfinding type by llGetObjectDetails for pathfinding characters. +OPT_WALKABLE Returned object pathfinding type by llGetObjectDetails for walkable objects. +OPT_STATIC_OBSTACLE Returned object pathfinding type by llGetObjectDetails for static obstacles. +OPT_MATERIAL_VOLUME Returned object pathfinding type by llGetObjectDetails for material volumes. +OPT_EXCLUSION_VOLUME Returned object pathfinding type by llGetObjectDetails for exclusion volumes. # some vehicle params VEHICLE_TYPE_NONE Used with llSetVehicleType to turn off vehicle support @@ -298,9 +307,8 @@ ATTACH_HUD_CENTER_2 Passed to llAttachToAvatar to attach task to center 2 hud ar ATTACH_HUD_TOP_CENTER Passed to llAttachToAvatar to attach task to top center hud area ATTACH_HUD_TOP_LEFT Passed to llAttachToAvatar to attach task to top left hud area ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area -##The following attachment points exist only as numbers thus far, but will be ready when the time comes. -#ATTACH_NECK Passed to llAttachToAvatar to attach task to neck -#ATTACH_ROOT Passed to llAttachToAvatar to attach task to avatar center/root +ATTACH_NECK Passed to llAttachToAvatar to attach task to neck +ATTACH_AVATAR_CENTER Passed to llAttachToAvatar to attach task to avatar center LAND_LEVEL Passed to llModifyLand to level terrain LAND_RAISE Passed to llModifyLand to raise terrain @@ -367,8 +375,8 @@ REMOTE_DATA_REQUEST Value of event_type in remote_event if XML-RPC request is re REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received -PRIM_NAME For primitive name (from server v1.40 onwards). Followed by a string. -PRIM_DESC For primitive description (from server v1.40 onwards). Followed by a string. +PRIM_NAME Sets the prim's name +PRIM_DESC Sets the prim's description PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER PRIM_PHYSICS Sets physics to TRUE or FALSE @@ -390,12 +398,9 @@ PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying PRIM_POS_LOCAL Sets the prim's local position PRIM_ROT_LOCAL Sets the prim's local rotation PRIM_OMEGA Makes the object spin at the specified axis and rate -PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call +PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call. PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form -PROFILE_NONE Disables profiling -PROFILE_SCRIPT_MEMORY Enables memory profiling - PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear @@ -608,6 +613,9 @@ STATUS_NOT_SUPPORTED Feature not supported STATUS_INTERNAL_ERROR An internal error occurred STATUS_WHITELIST_FAILED URL failed to pass whitelist +PROFILE_NONE Disables profiling +PROFILE_SCRIPT_MEMORY Enables memory profiling + RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM. RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise. RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results. @@ -636,11 +644,12 @@ FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its materi RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution. GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier. +SIM_STAT_PCT_CHARS_STEPPED Option for llGetSimStats() to return the % of pathfinding characters skipped each frame, averaged over the last minute. + KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list. KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion. KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion. KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion. -KFM_CMD_SET_MODE TODO: add documentation KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE. KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode. KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode. @@ -650,23 +659,26 @@ KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION. KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION. -CHARACTER_CMD_STOP TODO: add documentation -CHARACTER_CMD_JUMP TODO: add documentation +CHARACTER_CMD_STOP Used with llExecCharacterCmd(). Makes the character jump. +CHARACTER_CMD_SMOOTH_STOP Used with llExecCharacterCmd(). Stops any current pathfinding operation in a smooth like fashion. +CHARACTER_CMD_JUMP Used with llExecCharacterCmd(). Stops any current pathfinding operation. -CHARACTER_DESIRED_SPEED TODO: add documentation -CHARACTER_RADIUS TODO: add documentation -CHARACTER_LENGTH TODO: add documentation -CHARACTER_ORIENTATION TODO: add documentation -CHARACTER_AVOIDANCE_MODE TODO: add documentation -PURSUIT_OFFSET TODO: add documentation -REQUIRE_LINE_OF_SIGHT TODO: add documentation -PURSUIT_FUZZ_FACTOR TODO: add documentation -PURSUIT_INTERCEPT TODO: add documentation -FORCE_DIRECT_PATH TODO: add documentation -VERTICAL TODO: add documentation -HORIZONTAL TODO: add documentation +CHARACTER_DESIRED_SPEED Speed of pursuit in meters per second. +CHARACTER_RADIUS Set collision capsule radius. +CHARACTER_LENGTH Set collision capsule length. +CHARACTER_ORIENTATION Set the character orientation. +CHARACTER_AVOIDANCE_MODE Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both. +CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES Defines if a character will attempt to catch up lost time if pathfinding performance is low. +PURSUIT_OFFSET Used with llPursue(). Go to a position offset from the target. +REQUIRE_LINE_OF_SIGHT Used with llPursue(). Define whether the character needs a physical line-of-sight to give chase. When enabled, the character will not pick a new target position while there is a something solid between the character and the target object/agent. +PURSUIT_FUZZ_FACTOR Used with llPursue(). Selects a random destination near the PURSUIT_OFFSET. The valid fuzz factor range is from 0 to 1, where 1 is most random. This option requires a nonzero PURSUIT_OFFSET. +PURSUIT_INTERCEPT Used with llPursue(). Define whether the character attempts to predict the target's future location. +PURSUIT_GOAL_TOLERANCE Used with llPursue(). Defines approximately how close the character must be to the current goal to consider itself to be at the desired position. The valid range is from 0.25 to 10m. +VERTICAL Constant to indicate that the orientation of the capsule for a Pathfinding character is vertical. +HORIZONTAL Constant to indicate that the orientation of the capsule for a Pathfinding character is horizontal. AVOID_CHARACTERS TODO: add documentation AVOID_DYNAMIC_OBSTACLES TODO: add documentation +AVOID_NONE TODO: add documentation PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer. PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running @@ -678,26 +690,34 @@ PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path. PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering). PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal. +PU_FAILURE_NO_NAVMESH Triggered if no navmesh is available for the region. +PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED Triggered when a character enters a region with dynamic pathfinding disabled. +PU_FAILURE_PARCEL_UNREACHABLE Triggered when a character failed to enter a parcel because it is not allowed to enter, e.g. because the parcel is already full or because object entry was disabled after the navmesh was baked. -CHARACTER_TYPE TODO: add documentation -CHARACTER_TYPE_A TODO: add documentation -CHARACTER_TYPE_B TODO: add documentation -CHARACTER_TYPE_C TODO: add documentation -CHARACTER_TYPE_D TODO: add documentation -CHARACTER_TYPE_NONE TODO: add documentation +CHARACTER_TYPE Specifies which walkability coefficient will be used by this character. +CHARACTER_TYPE_A Used for character types that you prefer move in a way consistent with humanoids. +CHARACTER_TYPE_B Used for character types that you prefer move in a way consistent with wild animals or off road vehicles. +CHARACTER_TYPE_C Used for mechanical character types or road going vehicles. +CHARACTER_TYPE_D Used for character types that are not consistent with the A, B, or C type. +CHARACTER_TYPE_NONE Used to set no specific character type. -TRAVERSAL_TYPE TODO: add documentation +TRAVERSAL_TYPE Controls the speed at which characters moves on terrain that is less than 100% walkable will move faster (e.g., a cat crossing a street) or slower (e.g., a car driving in a swamp). TRAVERSAL_TYPE_SLOW TODO: add documentation TRAVERSAL_TYPE_FAST TODO: add documentation TRAVERSAL_TYPE_NONE TODO: add documentation -CHARACTER_MAX_ACCEL TODO: add documentation -CHARACTER_MAX_DECEL TODO: add documentation -CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation -CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation +CHARACTER_MAX_ACCEL The character's maximum acceleration rate. +CHARACTER_MAX_DECEL The character's maximum deceleration rate. +CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation +CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation -CHARACTER_DESIRED_TURN_SPEED TODO: add documentation -CHARACTER_MAX_TURN_RADIUS TODO: add documentation +CHARACTER_DESIRED_TURN_SPEED The character's maximum speed while turning--note that this is only loosely enforced (i.e., a character may turn at higher speeds under certain conditions) +CHARACTER_MAX_TURN_RADIUS The character's turn radius when traveling at CHARACTER_DESIRED_TURN_SPEED. +CHARACTER_MAX_SPEED The character's maximum speed. Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in TRAVERSAL_TYPE_FAST mode. + +PATROL_PAUSE_AT_WAYPOINTS Used with llPatrolPoints(). Defines if characters slow down and momentarily pause at each waypoint. +WANDER_PAUSE_AT_WAYPOINTS Used with llWanderWithin(). Defines if characters should pause after reaching each wander waypoint. + # --- OpenSim and Aurora-Sim constants Below --- # OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs) # Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs) diff --git a/indra/newview/app_settings/lsl_functions_sl.xml b/indra/newview/app_settings/lsl_functions_sl.xml index f0a49db5f..51074f13e 100644 --- a/indra/newview/app_settings/lsl_functions_sl.xml +++ b/indra/newview/app_settings/lsl_functions_sl.xml @@ -1010,5 +1010,8 @@ llWanderWithin + + llGetSimStats + \ No newline at end of file diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 294dfb319..2b7f2fb86 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -726,6 +726,17 @@ Found in Advanced->Rendering->Info Displays Value 0 + InstantMessageLogPathAnyAccount + + Comment + Path to your log files if you've never set the path while logged in on this account. + Persist + 1 + Type + String + Value + + UseConciseIMButtons Comment @@ -762,7 +773,7 @@ Found in Advanced->Rendering->Info Displays ShowLocalChatFloaterBar Comment - Whether or not local chat should have an input bar, requires a restart. + Whether or not local chat should have an input bar when undocked. Persist 1 Type @@ -826,6 +837,17 @@ This should be as low as possible, but too low may break functionality Value 1 + ShowDisplayNameChanges + + Comment + Show a notification when someone changes their display name + Persist + 1 + Type + Boolean + Value + 1 + ShowSimChannel Comment @@ -837,6 +859,17 @@ This should be as low as possible, but too low may break functionality Value 0 + StatusBarPositionBeforeParcel + + Comment + Show your position coordinates before the name of the parcel in the status bar + Persist + 1 + Type + Boolean + Value + 0 + MoyFastMiniMap Comment @@ -4459,17 +4492,6 @@ This should be as low as possible, but too low may break functionality Value 16 - CurlMaximumNumberOfHandles - - Comment - Maximum number of handles curl can use (requires restart) - Persist - 1 - Type - S32 - Value - 256 - CurlTimeoutDNSLookup Comment @@ -4512,7 +4534,7 @@ This should be as low as possible, but too low may break functionality Type U32 Value - 56000 + 7000 CurlTimeoutLowSpeedTime @@ -6301,22 +6323,6 @@ This should be as low as possible, but too low may break functionality 0 - FloaterChatBarlessRect - - Comment - Rectangle for chat history without input bar - Persist - 1 - Type - Rect - Value - - 0 - 172 - 500 - 0 - - FloaterClothingRect Comment diff --git a/indra/newview/app_settings/windlight/skies/%5BEUPHORIA%5D%20smoky%20blue%20sky%20%253A%20reverse.xml b/indra/newview/app_settings/windlight/skies/%5BEUPHORIA%5D%20smoky%20blue%20sky%20%253A%20reverse.xml old mode 100755 new mode 100644 diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index dd8531965..599ab0c66 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -328,6 +328,7 @@ void LLPrefsAscentChat::refreshValues() mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"); mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification"); mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"); + mShowDisplayNameChanges = gSavedSettings.getBOOL("ShowDisplayNameChanges"); mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound"); mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat"); mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose"); @@ -543,6 +544,7 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming); gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification); gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM); + gSavedSettings.setBOOL("ShowDisplayNameChanges", mShowDisplayNameChanges); gSavedSettings.setBOOL("PlayTypingSound", mPlayTypingSound); gSavedSettings.setBOOL("HideNotificationsInChat", mHideNotificationsInChat); gSavedSettings.setBOOL("AscentAllowMUpose", mEnableMUPose); diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index 63cedf611..291645b42 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -65,6 +65,7 @@ protected: BOOL mIMAnnounceIncoming; BOOL mHideTypingNotification; BOOL mShowGroupNameInChatIM; + bool mShowDisplayNameChanges; BOOL mPlayTypingSound; BOOL mHideNotificationsInChat; BOOL mEnableMUPose; diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index ba835d7ac..68d4a1f03 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -394,22 +394,22 @@ void LLPrefsAscentSys::refresh() childSetValue("SinguCmdLineAway", mCmdLineAway); //Build ------------------------------------------------------------------------------- - childSetValue("EmeraldBuildPrefs_Alpha", mAlpha); - getChild("EmeraldBuildPrefs_Color")->setOriginal(mColor); - childSetValue("EmeraldBuildPrefs_FullBright", mFullBright); - childSetValue("EmeraldBuildPrefs_Glow", mGlow); - childSetValue("BuildPrefs_Material", mMaterial); - childSetValue("NextOwnerCopy", mNextCopy); - childSetValue("NextOwnerModify", mNextMod); - childSetValue("NextOwnerTransfer", mNextTrans); - childSetValue("EmeraldBuildPrefs_Phantom", mPhantom); - childSetValue("EmeraldBuildPrefs_Physical", mPhysical); - childSetValue("EmeraldBuildPrefs_Shiny", mShiny); - childSetValue("EmeraldBuildPrefs_Temporary", mTemporary); - childSetValue("EmeraldBuildPrefs_Texture", mTexture); - childSetValue("BuildPrefs_Xsize", mXsize); - childSetValue("BuildPrefs_Ysize", mYsize); - childSetValue("BuildPrefs_Zsize", mZsize); + childSetValue("alpha", mAlpha); + getChild("colorswatch")->setOriginal(mColor); + childSetValue("EmFBToggle", mFullBright); + childSetValue("glow", mGlow); + childSetValue("material", mMaterial); + childSetValue("next_owner_copy", mNextCopy); + childSetValue("next_owner_modify", mNextMod); + childSetValue("next_owner_transfer", mNextTrans); + childSetValue("EmPhantomToggle", mPhantom); + childSetValue("EmPhysicalToggle", mPhysical); + childSetValue("combobox shininess", mShiny); + childSetValue("EmTemporaryToggle", mTemporary); + childSetValue("texture control", mTexture); + childSetValue("X size", mXsize); + childSetValue("Y size", mYsize); + childSetValue("Z size", mZsize); } void LLPrefsAscentSys::cancel() diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 449745d5a..b61fe28d4 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -57,7 +57,7 @@ LLPrefsAscentVan::LLPrefsAscentVan() { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml"); - childSetVisible("announce_streaming_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData()); + childSetVisible("announce_stream_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData()); childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this); @@ -219,14 +219,6 @@ void LLPrefsAscentVan::refreshValues() mColorMutedChat = gSavedSettings.getBOOL("ColorMutedChat"); // mColorCustomChat = gSavedSettings.getBOOL("ColorCustomChat"); - //Body Dynamics -------------------------------------------------------------------------- - mBreastPhysicsToggle = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle"); - mBoobMass = gSavedSettings.getF32("EmeraldBoobMass"); - mBoobHardness = gSavedSettings.getF32("EmeraldBoobHardness"); - mBoobVelMax = gSavedSettings.getF32("EmeraldBoobVelMax"); - mBoobFriction = gSavedSettings.getF32("EmeraldBoobFriction"); - mBoobVelMin = gSavedSettings.getF32("EmeraldBoobVelMin"); - mAvatarXModifier = gSavedSettings.getF32("AscentAvatarXModifier"); mAvatarYModifier = gSavedSettings.getF32("AscentAvatarYModifier"); mAvatarZModifier = gSavedSettings.getF32("AscentAvatarZModifier"); @@ -252,13 +244,6 @@ void LLPrefsAscentVan::refresh() childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel")); childSetEnabled("custom_tag_color_text", mCustomTagOn); childSetEnabled("custom_tag_color_swatch", mCustomTagOn); - - //Body Dynamics -------------------------------------------------------------------------- - childSetEnabled("EmeraldBoobMass", mBreastPhysicsToggle); - childSetEnabled("EmeraldBoobHardness", mBreastPhysicsToggle); - childSetEnabled("EmeraldBoobVelMax", mBreastPhysicsToggle); - childSetEnabled("EmeraldBoobFriction", mBreastPhysicsToggle); - childSetEnabled("EmeraldBoobVelMin", mBreastPhysicsToggle); } // Reset settings to local copy @@ -302,14 +287,6 @@ void LLPrefsAscentVan::cancel() gSavedSettings.setBOOL("ColorMutedChat", mColorMutedChat); // gSavedSettings.setBOOL("ColorCustomChat", mColorCustomChat); - //Body Dynamics -------------------------------------------------------------------------- - gSavedSettings.setBOOL("EmeraldBreastPhysicsToggle", mBreastPhysicsToggle); - gSavedSettings.setF32("EmeraldBoobMass", mBoobMass); - gSavedSettings.setF32("EmeraldBoobHardness", mBoobHardness); - gSavedSettings.setF32("EmeraldBoobVelMax", mBoobVelMax); - gSavedSettings.setF32("EmeraldBoobFriction", mBoobFriction); - gSavedSettings.setF32("EmeraldBoobVelMin", mBoobVelMin); - gSavedSettings.setF32("AscentAvatarXModifier", mAvatarXModifier); gSavedSettings.setF32("AscentAvatarYModifier", mAvatarYModifier); gSavedSettings.setF32("AscentAvatarZModifier", mAvatarZModifier); diff --git a/indra/newview/ascentprefsvan.h b/indra/newview/ascentprefsvan.h index 4439205cc..25e789697 100644 --- a/indra/newview/ascentprefsvan.h +++ b/indra/newview/ascentprefsvan.h @@ -88,13 +88,7 @@ protected: bool mColorLindenChat; bool mColorMutedChat; // bool mColorCustomChat; - //Body Dynamics - BOOL mBreastPhysicsToggle; - F32 mBoobMass; - F32 mBoobHardness; - F32 mBoobVelMax; - F32 mBoobFriction; - F32 mBoobVelMin; + F32 mAvatarXModifier; F32 mAvatarYModifier; F32 mAvatarZModifier; diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 6d19d693c..52f1a712f 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -244,7 +244,6 @@ bool cmd_line_chat(std::string revised_text, EChatType type) { if (i >> z) { - LLVector3 agentPos = gAgent.getPositionAgent(); LLViewerRegion* agentRegionp = gAgent.getRegion(); if(agentRegionp) { diff --git a/indra/newview/emeraldboobutils.cpp b/indra/newview/emeraldboobutils.cpp deleted file mode 100644 index 084d666a3..000000000 --- a/indra/newview/emeraldboobutils.cpp +++ /dev/null @@ -1,141 +0,0 @@ -#include "llviewerprecompiledheaders.h" -#include "emeraldboobutils.h" - -std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v) -{ - os << "EmeraldBoobConfig" << std::endl; - os << "enabled: " << v.enabled << std::endl; - os << "mass: " << v.mass << std::endl; - os << "hardness: " << v.hardness << std::endl; - os << "zMax: " << v.zMax << std::endl; - os << "velMin: " << v.velMin << std::endl; - os << "velMax: " << v.velMax << std::endl; - os << "zInfluence: " << v.zInfluence << std::endl; - os << "friction: " << v.friction << std::endl; - return os; -} - -std::ostream &operator<<(std::ostream &os, const EmeraldAvatarLocalBoobConfig &v) -{ - os << "EmeraldAvatarLocalBoobConfig" << std::endl; - os << "actualBoobGrav: " << v.actualBoobGrav << std::endl; - os << "boobSize: " << v.boobSize << std::endl; - return os; -} - -std::ostream &operator<<(std::ostream &os, const EmeraldBoobState &v) -{ - os << "EmeraldBoobState" << std::endl; - os << "boobGrav: " << v.boobGrav << std::endl; - os << "chestPosition: " << v.chestPosition << std::endl; - os << "chestRotation: " << v.chestRotation << std::endl; - os << "elapsedTime: " << v.elapsedTime << std::endl; - os << "frameDuration: " << v.frameDuration << std::endl; - os << "chestDisplacement: " << v.chestDisplacement << std::endl; - os << "localChestDisplacement: " << v.localChestDisplacement << std::endl; - os << "Number of bounceStates: " << v.bounceStates.size() << std::endl; - return os; -} - -std::ostream &operator<<(std::ostream &os, const EmeraldBoobInputs &v) -{ - os << "EmeraldBoobInputs" << std::endl; - os << "chestPosition: " << v.chestPosition << std::endl; - os << "chestRotation: " << v.chestRotation << std::endl; - os << "elapsedTime: " << v.elapsedTime << std::endl; - return os; -} - -std::ostream &operator<<(std::ostream &os, const EmeraldBoobBounceState &v) -{ - os << "EmeraldBoobBounceState" << std::endl; - os << "bounceStart: " << v.bounceStart << std::endl; - os << "bounceStartAmplitude: " << v.bounceStartAmplitude << std::endl; - os << "bounceStartFrameDuration: " << v.bounceStartFrameDuration << std::endl; - return os; -} - -F32 EmeraldBoobUtils::convertMass(F32 displayMass) -{ return displayMass/100.f*150.f; }; - -F32 EmeraldBoobUtils::convertHardness(F32 displayHardness) -{ return displayHardness/100.f*50; }; - -F32 EmeraldBoobUtils::convertVelMax(F32 displayVelMax) -{ return displayVelMax/100.f*0.01f; }; - -F32 EmeraldBoobUtils::convertFriction(F32 displayFriction) -{ return displayFriction/100.f*1.0f; }; - -F32 EmeraldBoobUtils::convertVelMin(F32 displayVelMin) -{ return displayVelMin/100.f; }; - -EmeraldBoobState EmeraldBoobUtils::idleUpdate(const EmeraldGlobalBoobConfig &config, const EmeraldAvatarLocalBoobConfig &localConfig, const EmeraldBoobState &oldState, const EmeraldBoobInputs &inputs) -{ - EmeraldBoobState newState; - F32 avatarLocalMass = 0.0f; - F32 partMod = 1.f; - - if(!config.enabled) - return newState; - - newState.boobGrav = localConfig.actualBoobGrav; - avatarLocalMass = (llclamp(localConfig.boobSize, 0.0f, 0.5f) / 0.5f); - - newState.elapsedTime = inputs.elapsedTime; - // seemed to create incorrect amounts of velocity when FPS varied - newState.frameDuration = inputs.elapsedTime - oldState.elapsedTime; - newState.chestPosition = inputs.chestPosition; - newState.chestRotation = inputs.chestRotation; - newState.chestDisplacement = inputs.chestPosition - oldState.chestPosition; - newState.localChestDisplacement = newState.chestDisplacement * ~inputs.chestRotation; - - - std::list bounceStates = oldState.bounceStates; - - if(fabs(newState.localChestDisplacement.length()) > 0.f) - { - F32 boobVel = 0.f; - boobVel = newState.localChestDisplacement.mV[VZ]; - boobVel += newState.localChestDisplacement[VX] * config.XYInfluence; - boobVel += newState.localChestDisplacement.mV[VY] * config.XYInfluence; - boobVel = llclamp(boobVel, -config.velMax, config.velMax); - boobVel *= newState.frameDuration * 0.3f * 100.f; - - if(fabs(boobVel) <= config.velMin * newState.frameDuration * 100.f) - boobVel = 0.0f; - else - { - EmeraldBoobBounceState bounceState; - bounceState.bounceStart = inputs.elapsedTime; - bounceState.bounceStartFrameDuration = newState.frameDuration; - bounceState.bounceStartAmplitude = boobVel; - bounceState.bounceStartAmplitude *= avatarLocalMass; - bounceState.bounceStartAmplitude *= config.mass; - bounceStates.push_front(bounceState); - } - } - - F32 totalNewAmplitude = 0.0f; - //std::cout << "Beginning bounce State processing at time " << inputs.elapsedTime << std::endl; - while(!bounceStates.empty()) { - EmeraldBoobBounceState bounceState = bounceStates.front(); - //std::cout << "Now processing " << bounceState; - bounceStates.pop_front(); - F32 bounceTime = newState.elapsedTime-bounceState.bounceStart; - F32 newAmplitude = bounceState.bounceStartAmplitude*pow(60.f*config.friction, -bounceTime)*cos(config.hardness*partMod*bounceTime); - if(fabs(newAmplitude) < 0.005f) { - newAmplitude = 0.0f; - } else { - newState.bounceStates.push_front(bounceState); - } - totalNewAmplitude+=newAmplitude; - } - - newState.boobGrav = totalNewAmplitude; - - - newState.boobGrav = llclamp(newState.boobGrav, -1.5f, 2.0f); - - return newState; -} diff --git a/indra/newview/emeraldboobutils.h b/indra/newview/emeraldboobutils.h deleted file mode 100644 index a9cdf3abc..000000000 --- a/indra/newview/emeraldboobutils.h +++ /dev/null @@ -1,163 +0,0 @@ -#ifndef __emeraldboobutils_h -#define __emeraldboobutils_h - -#include -#include - -#include "stdtypes.h" -#include "v3math.h" -#include "llquaternion.h" - -struct EmeraldGlobalBoobConfig -{ - bool enabled; - F32 mass; - F32 hardness; - F32 zMax; - F32 velMin; - F32 velMax; - F32 zInfluence; - F32 friction; - F32 XYInfluence; - - EmeraldGlobalBoobConfig() - : enabled(false), - mass(6.4f), - hardness(0.67f), - zMax(1.29f), - velMin(0.0027f*0.017f), - velMax(0.0027f), - zInfluence(0.0f), - friction(0.35f), - XYInfluence(0.3f) - { - } -}; - -std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v); - -struct EmeraldAvatarLocalBoobConfig -{ - F32 actualBoobGrav; - F32 boobSize; - - EmeraldAvatarLocalBoobConfig() - : actualBoobGrav(0.0f), - boobSize(0.0f) - { - } - - bool operator==(const EmeraldAvatarLocalBoobConfig &other) const - { - return - actualBoobGrav == other.actualBoobGrav && - boobSize == other.boobSize; - } - -}; - -std::ostream &operator<<(std::ostream &os, const EmeraldAvatarLocalBoobConfig &v); - -struct EmeraldBoobBounceState; - -struct EmeraldBoobState -{ - F32 boobGrav; - LLVector3 chestPosition; - LLQuaternion chestRotation; - F32 elapsedTime; - F32 frameDuration; - LLVector3 chestDisplacement; - LLVector3 localChestDisplacement; - std::list bounceStates; - - EmeraldBoobState() - : boobGrav(0.0f), - chestPosition(0.0f,0.0f,0.0f), - chestRotation(0.0f,0.0f,0.0f,1.0f), - elapsedTime(0.0f), - frameDuration(0.0f), - chestDisplacement(0.0f,0.0f,0.0f), - localChestDisplacement(0.0f,0.0f,0.0f) - { - } - - bool operator==(const EmeraldBoobState &other) const - { - return - boobGrav == other.boobGrav && - chestPosition == other.chestPosition && - chestRotation == other.chestRotation && - elapsedTime == other.elapsedTime && - frameDuration == other.frameDuration && - chestDisplacement == other.chestDisplacement && - localChestDisplacement == other.localChestDisplacement && - bounceStates == other.bounceStates; - } -}; - -std::ostream &operator<<(std::ostream &os, const EmeraldBoobState &v); - -struct EmeraldBoobInputs -{ - LLVector3 chestPosition; - LLQuaternion chestRotation; - F32 elapsedTime; - - EmeraldBoobInputs() - : chestPosition(0.0f,0.0f,0.0f), - chestRotation(0.0f,0.0f,0.0f,1.0f), - elapsedTime(0.0f) - { - } - - bool operator==(const EmeraldBoobInputs &other) const - { - return - chestPosition == other.chestPosition && - chestRotation == other.chestRotation && - elapsedTime == other.elapsedTime; - } -}; - -std::ostream &operator<<(std::ostream &os, const EmeraldBoobInputs &v); - -struct EmeraldBoobBounceState -{ - F32 bounceStart; - F32 bounceStartAmplitude; - F32 bounceStartFrameDuration; - - EmeraldBoobBounceState() - : bounceStart(0.0f), - bounceStartAmplitude(0.0f), - bounceStartFrameDuration(0.0f) - { - }; - - bool operator==(const EmeraldBoobBounceState &other) const - { - return - bounceStart == other.bounceStart && - bounceStartAmplitude == other.bounceStartAmplitude && - bounceStartFrameDuration == other.bounceStartFrameDuration; - } -}; - -std::ostream &operator<<(std::ostream &os, const EmeraldBoobBounceState &v); - - -struct EmeraldBoobUtils -{ -public: - static EmeraldBoobState idleUpdate(const EmeraldGlobalBoobConfig &config, const EmeraldAvatarLocalBoobConfig &localConfig, const EmeraldBoobState &oldState, const EmeraldBoobInputs &inputs); - - static F32 convertMass(F32 displayMass); - static F32 convertHardness(F32 displayHardness); - static F32 convertVelMax(F32 displayVelMax); - static F32 convertFriction(F32 displayFriction); - static F32 convertVelMin(F32 displayVelMin); -}; - - -#endif diff --git a/indra/newview/floaterao.cpp b/indra/newview/floaterao.cpp index 59f922cca..b7ab4994e 100644 --- a/indra/newview/floaterao.cpp +++ b/indra/newview/floaterao.cpp @@ -356,9 +356,9 @@ BOOL LLFloaterAO::postBuild() childSetAction("newcard",onClickNewCard,this); childSetAction("prevstand",onClickPrevStand,this); childSetAction("nextstand",onClickNextStand,this); - getChild("AOEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleAO)); - getChild("AOSitsEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleSits)); - getChild("standtime")->setCommitCallback(boost::bind(&LLFloaterAO::onSpinnerCommit,_1)); + getChild("AOEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleAO)); + getChild("AOSitsEnabled")->setCommitCallback(boost::bind(&LLFloaterAO::onClickToggleSits)); + getChild("standtime")->setCommitCallback(boost::bind(&LLFloaterAO::onSpinnerCommit,_1)); mcomboBox_stands = getChild("stands"); mcomboBox_walks = getChild("walks"); mcomboBox_runs = getChild("runs"); @@ -593,7 +593,6 @@ void LLFloaterAO::updateLayout(LLFloaterAO* floater) floater->childSetVisible("sits", advanced); floater->childSetVisible("gsits", advanced); floater->childSetVisible("crouchs", advanced); - floater->childSetVisible("crouchwalks", advanced); floater->childSetVisible("falls", advanced); floater->childSetVisible("hovers", advanced); floater->childSetVisible("flys", advanced); diff --git a/indra/newview/fonts/DroidSans-Bold.ttf b/indra/newview/fonts/DroidSans-Bold.ttf index 7ac04b6f0..d065b64eb 100644 Binary files a/indra/newview/fonts/DroidSans-Bold.ttf and b/indra/newview/fonts/DroidSans-Bold.ttf differ diff --git a/indra/newview/fonts/DroidSans-license.txt b/indra/newview/fonts/DroidSans-license.txt new file mode 100644 index 000000000..c5b1efa7a --- /dev/null +++ b/indra/newview/fonts/DroidSans-license.txt @@ -0,0 +1,190 @@ + + Copyright (c) 2005-2008, The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/indra/newview/fonts/DroidSans.ttf b/indra/newview/fonts/DroidSans.ttf index 2537cc3ae..ad1efca88 100644 Binary files a/indra/newview/fonts/DroidSans.ttf and b/indra/newview/fonts/DroidSans.ttf differ diff --git a/indra/newview/hgfloatertexteditor.cpp b/indra/newview/hgfloatertexteditor.cpp deleted file mode 100644 index fdda09ea3..000000000 --- a/indra/newview/hgfloatertexteditor.cpp +++ /dev/null @@ -1,399 +0,0 @@ -/** - * @file hgfloatertexteditor.cpp - * @brief Asset Text Editor floater made by Hazim Gazov (based on hex editor floater by Day Oh) - * @author Hazim Gazov - * - * $LicenseInfo:firstyear=2010&license=WTFPLV2$ - * - */ - -// - -#include "llviewerprecompiledheaders.h" - -#include "hgfloatertexteditor.h" -#include "lluictrlfactory.h" -#include "llinventorybackup.h" // for downloading -#include "llviewercontrol.h" // gSavedSettings -#include "llviewerwindow.h" // alertXML -#include "llagent.h" // gAgent getID -#include "llviewermenufile.h" -#include "llviewerregion.h" // getCapability -#include "llassetuploadresponders.h" // LLUpdateAgentInventoryResponder -#include "llinventorymodel.h" // gInventory.updateItem -#include "llappviewer.h" // System Folders -#include "llfloaterperms.h" //get default perms -#include "lllocalinventory.h" -#include "llnotificationsutil.h" - -std::list HGFloaterTextEditor::sInstances; -S32 HGFloaterTextEditor::sUploadAmount = 10; - -HGFloaterTextEditor::HGFloaterTextEditor(LLInventoryItem* item) -: LLFloater() -{ - sInstances.push_back(this); - mItem = item; - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_asset_text_editor.xml"); -} - -// static -void HGFloaterTextEditor::show(LLUUID item_id) -{ - LLInventoryItem* item = (LLInventoryItem*)gInventory.getItem(item_id); - if(item) - { - S32 left, top; - gFloaterView->getNewFloaterPosition(&left, &top); - LLRect rect = gSavedSettings.getRect("FloaterAssetTextEditorRect"); - rect.translate(left - rect.mLeft, top - rect.mTop); - HGFloaterTextEditor* floaterp = new HGFloaterTextEditor(item); - floaterp->setRect(rect); - gFloaterView->adjustToFitScreen(floaterp, FALSE); - } -} - -HGFloaterTextEditor::~HGFloaterTextEditor() -{ - sInstances.remove(this); -} - -void HGFloaterTextEditor::close(bool app_quitting) -{ - LLFloater::close(app_quitting); -} - -BOOL HGFloaterTextEditor::postBuild(void) -{ - LLTextEditor* editor = getChild("text_editor"); - mEditor = editor; - - childSetEnabled("upload_btn", false); - childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload")); - childSetAction("upload_btn", onClickUpload, this); - childSetEnabled("save_btn", false); - childSetAction("save_btn", onClickSave, this); - - if(mItem) - { - std::string title = "Text editor: " + mItem->getName(); - const char* asset_type_name = LLAssetType::lookup(mItem->getType()); - if(asset_type_name) - { - title.append(" (" + std::string(asset_type_name) + ")"); - } - setTitle(title); - } -#if OPENSIM_RULES!=1 - if(mItem->getCreatorUUID() == gAgentID) - { -#endif /* OPENSIM_RULES!=1 */ - // Load the asset - editor->setVisible(FALSE); - childSetText("status_text", std::string("Loading...")); - LLInventoryBackup::download(mItem, this, imageCallback, assetCallback); -#if OPENSIM_RULES!=1 - } else { - this->close(false); - } -#endif /* OPENSIM_RULES!=1 */ - - return TRUE; -} - -// static -void HGFloaterTextEditor::imageCallback(BOOL success, - LLViewerFetchedTexture *src_vi, - LLImageRaw* src, - LLImageRaw* aux_src, - S32 discard_level, - BOOL final, - void* userdata) -{ - if(final) - { - LLInventoryBackup::callbackdata* data = static_cast(userdata); - HGFloaterTextEditor* floater = (HGFloaterTextEditor*)(data->floater); - if(!floater) return; - if(std::find(sInstances.begin(), sInstances.end(), floater) == sInstances.end()) return; // no more crash - //LLInventoryItem* item = data->item; - - if(!success) - { - floater->childSetText("status_text", std::string("Unable to download asset.")); - return; - } - - U8* src_data = src->getData(); - S32 size = src->getDataSize(); - std::string new_data; - for(S32 i = 0; i < size; i++) - new_data += (char)src_data[i]; - - delete[] src_data; - - floater->mEditor->setValue(new_data); - floater->mEditor->setVisible(TRUE); - floater->childSetText("status_text", std::string("Note: Image data shown isn't the actual asset data, yet")); - - floater->childSetEnabled("save_btn", false); - floater->childSetEnabled("upload_btn", true); - floater->childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload (L$10)")); - } - else - { - src_vi->setBoostLevel(LLGLTexture::BOOST_UI); - } -} - -// static -void HGFloaterTextEditor::assetCallback(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status) -{ - LLInventoryBackup::callbackdata* data = static_cast(user_data); - HGFloaterTextEditor* floater = (HGFloaterTextEditor*)(data->floater); - if(!floater) return; - if(std::find(sInstances.begin(), sInstances.end(), floater) == sInstances.end()) return; // no more crash - LLInventoryItem* item = data->item; - - if(status != 0 && item->getType() != LLAssetType::AT_NOTECARD) - { - floater->childSetText("status_text", std::string("Unable to download asset.")); - return; - } - - // Todo: this doesn't work for static vfs shit - LLVFile file(vfs, asset_uuid, type, LLVFile::READ); - S32 size = file.getSize(); - - std::string new_data(""); - if(size > 0) - { - char* buffer = new char[size + 1]; - if (buffer == NULL) - { - llerrs << "Memory Allocation Failed" << llendl; - return; - } - - file.read((U8*)buffer, size); - buffer[size - 1] = 0; - - new_data = std::string(buffer); - delete[] buffer; - } - - - floater->mEditor->setText(LLStringExplicit(new_data)); - floater->mEditor->setVisible(TRUE); - floater->childSetText("status_text", llformat("File Size: %d", size)); - - floater->childSetEnabled("upload_btn", true); - floater->childSetEnabled("save_btn", false); - if(item->getPermissions().allowModifyBy(gAgent.getID())) - { - switch(item->getType()) - { - case LLAssetType::AT_TEXTURE: - case LLAssetType::AT_ANIMATION: - case LLAssetType::AT_SOUND: - floater->childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload (L$10)")); - break; - case LLAssetType::AT_LANDMARK: - case LLAssetType::AT_CALLINGCARD: - floater->childSetEnabled("upload_btn", false); - floater->childSetEnabled("save_btn", false); - break; - default: - floater->childSetEnabled("save_btn", true); - break; - } - } - else - { - switch(item->getType()) - { - case LLAssetType::AT_TEXTURE: - case LLAssetType::AT_ANIMATION: - case LLAssetType::AT_SOUND: - floater->childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload (L$10)")); - break; - default: - break; - } - } - - // Never enable save if it's a pretend item - if(gInventory.isObjectDescendentOf(item->getUUID(), gSystemFolderRoot)) - { - floater->childSetEnabled("save_btn", false); - } -} - -// static -void HGFloaterTextEditor::onClickUpload(void* user_data) -{ - HGFloaterTextEditor* floater = (HGFloaterTextEditor*)user_data; - LLInventoryItem* item = floater->mItem; - - LLTransactionID transaction_id; - transaction_id.generate(); - LLUUID fake_asset_id = transaction_id.makeAssetID(gAgent.getSecureSessionID()); - - const char* value = floater->mEditor->getText().c_str(); - int size = strlen(value); - U8* buffer = new U8[size]; - for(int i = 0; i < size; i++) - buffer[i] = (U8)value[i]; - - delete[] value; - - LLVFile file(gVFS, fake_asset_id, item->getType(), LLVFile::APPEND); - file.setMaxSize(size); - if (!file.write(buffer, size)) - { - LLSD args; - args["ERROR_MESSAGE"] = "Couldn't write data to file"; - LLNotificationsUtil::add("ErrorMessage", args); - return; - } - - LLAssetStorage::LLStoreAssetCallback callback = NULL; - void *fake_user_data = NULL; - - if(item->getType() != LLAssetType::AT_GESTURE && item->getType() != LLAssetType::AT_LSL_TEXT - && item->getType() != LLAssetType::AT_NOTECARD) - { - upload_new_resource(transaction_id, - item->getType(), - item->getName(), - item->getDescription(), - 0, - LLFolderType::assetTypeToFolderType(item->getType()), - item->getInventoryType(), - LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), - item->getName(), - callback, - sUploadAmount, - fake_user_data); - } - else // gestures and scripts, create an item first - { // AND notecards - //if(item->getType() == LLAssetType::AT_NOTECARD) gDontOpenNextNotecard = true; - create_inventory_item( gAgent.getID(), - gAgent.getSessionID(), - item->getParentUUID(), //gInventory.findCategoryUUIDForType(item->getType()), - LLTransactionID::tnull, - item->getName(), - fake_asset_id.asString(), - item->getType(), - item->getInventoryType(), - (LLWearableType::EType)item->getFlags(), - PERM_ITEM_UNRESTRICTED, - new NewResourceItemCallback); - } -} - -struct LLSaveInfo -{ - LLSaveInfo(HGFloaterTextEditor* floater, LLTransactionID transaction_id) - : mFloater(floater), mTransactionID(transaction_id) - { - } - - HGFloaterTextEditor* mFloater; - LLTransactionID mTransactionID; -}; - -// static -void HGFloaterTextEditor::onClickSave(void* user_data) -{ - HGFloaterTextEditor* floater = (HGFloaterTextEditor*)user_data; - LLInventoryItem* item = floater->mItem; - - LLTransactionID transaction_id; - transaction_id.generate(); - LLUUID fake_asset_id = transaction_id.makeAssetID(gAgent.getSecureSessionID()); - - const char* value = floater->mEditor->getText().c_str(); - int size = strlen(value); - U8* buffer = new U8[size]; - for(int i = 0; i < size; i++) - buffer[i] = (U8)value[i]; - - LLVFile file(gVFS, fake_asset_id, item->getType(), LLVFile::APPEND); - file.setMaxSize(size); - if (!file.write(buffer, size)) - { - LLSD args; - args["ERROR_MESSAGE"] = "Couldn't write data to file"; - LLNotificationsUtil::add("ErrorMessage", args); - return; - } - - bool caps = false; - std::string url; - LLSD body; - body["item_id"] = item->getUUID(); - - switch(item->getType()) - { - case LLAssetType::AT_GESTURE: - url = gAgent.getRegion()->getCapability("UpdateGestureAgentInventory"); - caps = true; - break; - case LLAssetType::AT_LSL_TEXT: - url = gAgent.getRegion()->getCapability("UpdateScriptAgent"); - body["target"] = "mono"; - caps = true; - break; - case LLAssetType::AT_NOTECARD: - url = gAgent.getRegion()->getCapability("UpdateNotecardAgentInventory"); - caps = true; - break; - default: // wearables & notecards, Oct 12 2009 - // ONLY WEARABLES, Oct 15 2009 - floater->childSetText("status_text", std::string("Saving...")); - LLSaveInfo* info = new LLSaveInfo(floater, transaction_id); - gAssetStorage->storeAssetData(transaction_id, item->getType(), onSaveComplete, info); - caps = false; - break; - } - - if(caps) - { - LLHTTPClient::post(url, body, - new LLUpdateAgentInventoryResponder(body, fake_asset_id, item->getType())); - } -} - -void HGFloaterTextEditor::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) -{ - LLSaveInfo* info = (LLSaveInfo*)user_data; - HGFloaterTextEditor* floater = info->mFloater; - if(std::find(sInstances.begin(), sInstances.end(), floater) == sInstances.end()) return; // no more crash - LLInventoryItem* item = floater->mItem; - - floater->childSetText("status_text", std::string("")); - - if(item && (status == 0)) - { - LLPointer new_item = new LLViewerInventoryItem(item); - new_item->setDescription(item->getDescription()); - new_item->setTransactionID(info->mTransactionID); - new_item->setAssetUUID(asset_uuid); - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - LLSD args; - args["ERROR_MESSAGE"] = llformat("Upload failed with status %d, also %d", status, ext_status); - LLNotificationsUtil::add("ErrorMessage", args); - } -} - -// diff --git a/indra/newview/hgfloatertexteditor.h b/indra/newview/hgfloatertexteditor.h deleted file mode 100644 index fe6d36709..000000000 --- a/indra/newview/hgfloatertexteditor.h +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @file hgfloatertexteditor.h - * @brief Asset Text Editor floater made by Hazim Gazov (based on hex editor floater by Day Oh) - * @author Hazim Gazov - * - * $LicenseInfo:firstyear=2010&license=WTFPLV2$ - * - */ - - -#ifndef HG_HGFLOATERTEXT_H -#define HG_HGFLOATERTEXT_H - -#include "llfloater.h" -#include "lltexteditor.h" -#include "llinventory.h" -#include "llviewertexture.h" - -class HGFloaterTextEditor -: public LLFloater -{ -public: - HGFloaterTextEditor(LLInventoryItem* item); - static void show(LLUUID item_id); - BOOL postBuild(void); - void close(bool app_quitting); - static void imageCallback(BOOL success, - LLViewerFetchedTexture *src_vi, - LLImageRaw* src, - LLImageRaw* aux_src, - S32 discard_level, - BOOL final, - void* userdata); - static void assetCallback(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status); - static void onClickSave(void* user_data); - static void onClickUpload(void* user_data); - static void onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); - LLInventoryItem* mItem; - LLTextEditor* mEditor; - static std::list sInstances; -private: - virtual ~HGFloaterTextEditor(); -protected: - static S32 sUploadAmount; -}; - -#endif diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index 18663b175..bab5eb8dd 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -553,7 +553,7 @@ std::string HippoGridInfo::getDirectoryFee() const { std::string fee; formatFee(fee, mDirectoryFee, true); - if (fee != LLTrans::getString("hippo_label_free")) fee += "/" + LLTrans::getString("hippo_label_week"); + if (mDirectoryFee != 0) fee += "/" + LLTrans::getString("hippo_label_week"); return fee; } diff --git a/indra/newview/hippopanelgrids.cpp b/indra/newview/hippopanelgrids.cpp index 6af943c5b..61ebcdde2 100644 --- a/indra/newview/hippopanelgrids.cpp +++ b/indra/newview/hippopanelgrids.cpp @@ -133,7 +133,7 @@ BOOL HippoPanelGridsImpl::postBuild() requires("btn_add"); requires("btn_copy"); requires("btn_default"); - requires("btn_gridinfo"); + //requires("btn_gridinfo"); requires("btn_help_render_compat"); if (!checkRequirements()) return false; @@ -146,7 +146,7 @@ BOOL HippoPanelGridsImpl::postBuild() childSetAction("btn_add", onClickAdd, this); childSetAction("btn_copy", onClickCopy, this); childSetAction("btn_default", onClickDefault, this); - childSetAction("btn_gridinfo", onClickGridInfo, this); + //childSetAction("btn_gridinfo", onClickGridInfo, this); childSetAction("btn_help_render_compat", onClickHelpRenderCompat, this); childSetAction("btn_advanced", onClickAdvanced, this); diff --git a/indra/newview/linux_tools/launch_url.sh b/indra/newview/linux_tools/launch_url.sh index 404ea36f2..c528ee762 100755 --- a/indra/newview/linux_tools/launch_url.sh +++ b/indra/newview/linux_tools/launch_url.sh @@ -45,6 +45,18 @@ if [ ! -z "$XBROWSER" ]; then echo "$0: Trying some others..." fi +# Launcher for any desktop. +if which xdg-open >/dev/null; then + xdg-open "$URL" + case $? in + 0) exit ;; + 1) echo "xdg-open: Error in command line syntax." ;; + 2) echo "xdg-open: One of the files passed on the command line did not exist." ;; + 3) echo "xdg-open: A required tool could not be found." ;; + 4) echo "xdg-open: The action failed." ;; + esac +fi + # Launcher the default GNOME browser. if [ ! -z "$GNOME_DESKTOP_SESSION_ID" ] && which gnome-open >/dev/null; then gnome-open "$URL" & diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 55152cf19..eb6b1835b 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -172,12 +172,25 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const sim_access_string.c_str()); break; case LOCATION_FORMAT_FULL: + static LLCachedControl position_before_parcel("StatusBarPositionBeforeParcel"); + if (!position_before_parcel) + { buffer = llformat("%s, %s (%d, %d, %d)%s%s", parcel_name.c_str(), region_name.c_str(), pos_x, pos_y, pos_z, sim_access_string.empty() ? "" : " - ", sim_access_string.c_str()); + } + else + { + buffer = llformat("%s (%d, %d, %d) - %s%s%s", + region_name.c_str(), + pos_x, pos_y, pos_z, + parcel_name.c_str(), + sim_access_string.empty() ? "" : " - ", + sim_access_string.c_str()); + } break; } } diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index cdf4a4c11..e106e2299 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1308,30 +1308,6 @@ void LLAgentWearables::removeWearableFinal( LLWearableType::EType type, bool do_ gInventory.notifyObservers(); } -/*static bool isFirstPhysicsWearable(LLWearableType::EType type, LLInventoryItem *new_item, LLWearable *new_wearable) -{ - if (type == LLWearableType::WT_PHYSICS && gSavedSettings.getWarning("FirstPhysicsWearable")) - { - class WearableDelayedCallback - { - public: - static void setDelayedWearable( const LLSD& notification, const LLSD& response, LLUUID item_id, LLWearable *wearable ) - { - if(LLNotification::getSelectedOption(notification, response) == 0) //User selected wear - { - gSavedSettings.setWarning("FirstPhysicsWearable",FALSE); - LLInventoryItem *item = gInventory.getItem(item_id); - if(item) - gAgentWearables.setWearableItem(item,wearable); //re-enter. - } - } - }; - LLNotificationsUtil::add("FirstPhysicsWearable",LLSD(),LLSD(),boost::bind(WearableDelayedCallback::setDelayedWearable, _1, _2, new_item->getUUID(),new_wearable)); - return true; - } - return false; -}*/ - // Assumes existing wearables are not dirty. void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& wearables, @@ -1373,11 +1349,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it { const LLWearableType::EType type = new_wearable->getType(); - /*if (isFirstPhysicsWearable(type, new_item, new_wearable)) - { - return; - }*/ - new_wearable->setName(new_item->getName()); new_wearable->setItemID(new_item->getUUID()); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a5d67e356..60a3788d6 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3964,7 +3964,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b //to cause appearance of the agent to be updated bool result = false; - if (result = gAgentWearables.moveWearable(item, closer_to_body)) + if ((result = gAgentWearables.moveWearable(item, closer_to_body))) { gAgentAvatarp->wearableUpdated(item->getWearableType(), FALSE); } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 39c580f50..4321e0fcc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -80,7 +80,7 @@ #include "llfirstuse.h" #include "llrender.h" #include "llvector4a.h" -#include "llfont.h" +#include "llfontfreetype.h" #include "llvocache.h" #include "llvopartgroup.h" #include "llfloaterteleporthistory.h" @@ -117,8 +117,6 @@ #include "llimageworker.h" // -#include "lldelayeduidelete.h" -#include "llbuildnewviewsscheduler.h" #include "aicurleasyrequeststatemachine.h" #include "aihttptimeoutpolicy.h" // @@ -236,6 +234,9 @@ extern BOOL gRandomizeFramerate; extern BOOL gPeriodicSlowFrame; extern BOOL gDebugGL; +extern void startEngineThread(void); +extern void stopEngineThread(void); + //////////////////////////////////////////////////////////// // All from the last globals push... const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user flagged as Away From Keyboard @@ -243,7 +244,6 @@ const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user fl F32 gSimLastTime; // Used in LLAppViewer::init and send_stats() F32 gSimFrames; -BOOL gAllowTapTapHoldRun = TRUE; BOOL gShowObjectUpdates = FALSE; BOOL gUseQuickTime = TRUE; @@ -283,9 +283,6 @@ LLUUID gSystemFolderAssets; BOOL gDisconnected = FALSE; -// Minimap scale in pixels per region - - // used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; BOOL gRestoreGL = FALSE; @@ -322,9 +319,6 @@ const std::string ERROR_MARKER_FILE_NAME("Singularity.error_marker"); const std::string LLERROR_MARKER_FILE_NAME("Singularity.llerror_marker"); const std::string LOGOUT_MARKER_FILE_NAME("Singularity.logout_marker"); static BOOL gDoDisconnect = FALSE; -// -//static BOOL gBusyDisconnect = FALSE; -// static std::string gLaunchFileOnQuit; // Used on Win32 for other apps to identify our window (eg, win_setup) @@ -512,7 +506,6 @@ static void settings_to_globals() gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle")); gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); - gAllowTapTapHoldRun = gSavedSettings.getBOOL("AllowTapTapHoldRun"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); LLWorldMapView::sMapScale = llmax(.1f,gSavedSettings.getF32("MapScale")); LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); @@ -641,9 +634,6 @@ bool LLAppViewer::init() // Logging is initialized. Now it's safe to start the error thread. startErrorThread(); - gDeleteScheduler = new LLDeleteScheduler(); - gBuildNewViewsScheduler = new LLBuildNewViewsScheduler(); - // // // OK to write stuff to logs now, we've now crash reported if necessary // @@ -662,7 +652,7 @@ bool LLAppViewer::init() mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); - AIStateMachine::setMaxCount(gSavedSettings.getU32("StateMachineMaxTime")); + AIEngine::setMaxCount(gSavedSettings.getU32("StateMachineMaxTime")); { AIHTTPTimeoutPolicy policy_tmp( @@ -695,7 +685,36 @@ bool LLAppViewer::init() initThreads(); LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ; + // Load art UUID information, don't require these strings to be declared in code. + std::string colors_base_filename = gDirUtilp->findSkinnedFilename("colors_base.xml"); + LL_DEBUGS("InitInfo") << "Loading base colors from " << colors_base_filename << LL_ENDL; + gColors.loadFromFileLegacy(colors_base_filename, FALSE, TYPE_COL4U); + // Load overrides from user colors file + std::string user_colors_filename = gDirUtilp->findSkinnedFilename("colors.xml"); + LL_DEBUGS("InitInfo") << "Loading user colors from " << user_colors_filename << LL_ENDL; + if (gColors.loadFromFileLegacy(user_colors_filename, FALSE, TYPE_COL4U) == 0) + { + LL_DEBUGS("InitInfo") << "Cannot load user colors from " << user_colors_filename << LL_ENDL; + } + + // Widget construction depends on LLUI being initialized + LLUI::initClass(&gSavedSettings, + &gSavedSettings, + &gColors, + LLUIImageList::getInstance(), + ui_audio_callback, + &LLUI::getScaleFactor()); + LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ; + + LLUICtrlFactory::getInstance()->setupPaths(); // update paths with correct language set + + // Setup LLTrans after LLUI::initClass has been called. + LLTrans::parseStrings("strings.xml", default_trans_args); + + // Setup notifications after LLUI::initClass() has been called. + LLNotifications::instance().createDefaultChannels(); + LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ; writeSystemInfo(); @@ -744,37 +763,8 @@ bool LLAppViewer::init() LLError::setPrintLocation(true); } - // Load art UUID information, don't require these strings to be declared in code. - std::string colors_base_filename = gDirUtilp->findSkinnedFilename("colors_base.xml"); - LL_DEBUGS("InitInfo") << "Loading base colors from " << colors_base_filename << LL_ENDL; - gColors.loadFromFileLegacy(colors_base_filename, FALSE, TYPE_COL4U); - - // Load overrides from user colors file - std::string user_colors_filename = gDirUtilp->findSkinnedFilename("colors.xml"); - LL_DEBUGS("InitInfo") << "Loading user colors from " << user_colors_filename << LL_ENDL; - if (gColors.loadFromFileLegacy(user_colors_filename, FALSE, TYPE_COL4U) == 0) - { - LL_DEBUGS("InitInfo") << "Cannot load user colors from " << user_colors_filename << LL_ENDL; - } - - // Widget construction depends on LLUI being initialized - LLUI::initClass(&gSavedSettings, - &gSavedSettings, - &gColors, - LLUIImageList::getInstance(), - ui_audio_callback, - &LLUI::getScaleFactor() - ); - - // Setup notifications after LLUI::initClass() has been called. - LLNotifications::instance(); - LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ; - LLWeb::initClass(); // do this after LLUI - LLUICtrlFactory::getInstance()->setupPaths(); // update paths with correct language set - LLTrans::parseStrings("strings.xml", default_trans_args); - LLTextEditor::setURLCallbacks(&LLWeb::loadURL, &LLURLDispatcher::dispatchFromTextEditor, &LLURLDispatcher::dispatchFromTextEditor); @@ -808,7 +798,7 @@ bool LLAppViewer::init() // Modify settings based on system configuration and compile options settings_modify(); // Work around for a crash bug when changing OpenGL settings - LLFont::sOpenGLcrashOnRestart = (getenv("LL_OPENGL_RESTART_CRASH_BUG") != NULL); + LLFontFreetype::sOpenGLcrashOnRestart = (getenv("LL_OPENGL_RESTART_CRASH_BUG") != NULL); // Find partition serial number (Windows) or hardware serial (Mac) mSerialNumber = generateSerialNumber(); @@ -885,7 +875,7 @@ bool LLAppViewer::init() { // can't use an alert here since we're exiting and // all hell breaks lose. - std::string msg = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements"); + std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedGLRequirements"); LLStringUtil::format(msg,LLTrans::getDefaultArgs()); OSMessageBox( msg, @@ -900,7 +890,7 @@ bool LLAppViewer::init() { // can't use an alert here since we're exiting and // all hell breaks lose. - std::string msg = LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2"); + std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2"); LLStringUtil::format(msg,LLTrans::getDefaultArgs()); OSMessageBox( msg, @@ -914,7 +904,7 @@ bool LLAppViewer::init() { // can't use an alert here since we're exiting and // all hell breaks lose. - std::string msg = LNotifications::instance().getGlobalString("UnsupportedCPUSSE2"); + std::string msg = LNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2"); LLStringUtil::format(msg,LLTrans::getDefaultArgs()); OSMessageBox( msg, @@ -932,31 +922,31 @@ bool LLAppViewer::init() std::string minSpecs; // get cpu data from xml - std::stringstream minCPUString(LLNotifications::instance().getGlobalString("UnsupportedCPUAmount")); + std::stringstream minCPUString(LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUAmount")); S32 minCPU = 0; minCPUString >> minCPU; // get RAM data from XML - std::stringstream minRAMString(LLNotifications::instance().getGlobalString("UnsupportedRAMAmount")); + std::stringstream minRAMString(LLNotificationTemplates::instance().getGlobalString("UnsupportedRAMAmount")); U64 minRAM = 0; minRAMString >> minRAM; minRAM = minRAM * 1024 * 1024; if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN) { - minSpecs += LLNotifications::instance().getGlobalString("UnsupportedGPU"); + minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedGPU"); minSpecs += "\n"; unsupported = true; } if(gSysCPU.getMHz() < minCPU) { - minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); + minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedCPU"); minSpecs += "\n"; unsupported = true; } if(gSysMemory.getPhysicalMemoryClamped() < minRAM) { - minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM"); + minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedRAM"); minSpecs += "\n"; unsupported = true; } @@ -989,6 +979,11 @@ bool LLAppViewer::init() LLViewerJoystick::getInstance()->init(false); + // Finish windlight initialization. + LLWLParamManager::instance().initHack(); + // Use prefered Environment. + LLEnvManagerNew::instance().usePrefs(); + gGLActive = FALSE; return true; } @@ -1096,7 +1091,6 @@ static LLFastTimer::DeclareTimer FTM_STATEMACHINE("State Machine"); bool LLAppViewer::mainLoop() { - LLMemType mt1(LLMemType::MTYPE_MAIN); mMainloopTimeout = new LLWatchdogTimeout(); // *FIX:Mani - Make this a setting, once new settings exist in this branch. @@ -1216,7 +1210,6 @@ bool LLAppViewer::mainLoop() && !gViewerWindow->getShowProgress() && !gFocusMgr.focusLocked()) { - LLMemType mjk(LLMemType::MTYPE_JOY_KEY); joystick->scanJoystick(); gKeyboard->scanKeyboard(); if(isCrouch) @@ -1236,7 +1229,6 @@ bool LLAppViewer::mainLoop() if (gAres != NULL && gAres->isInitialized()) { - LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP); pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(FTM_PUMP); { @@ -1285,7 +1277,6 @@ bool LLAppViewer::mainLoop() // Sleep and run background threads { - LLMemType mt_sleep(LLMemType::MTYPE_SLEEP); LLFastTimer t2(FTM_SLEEP); static const LLCachedControl run_multiple_threads("RunMultipleThreads",false); static const LLCachedControl yield_time("YieldTime", -1); @@ -1833,6 +1824,7 @@ bool LLAppViewer::cleanup() llinfos << "Message system deleted." << llendflush; LLApp::stopErrorThread(); // The following call is not thread-safe. Have to stop all threads. + stopEngineThread(); AICurlInterface::cleanupCurl(); // Cleanup settings last in case other classes reference them. @@ -1910,6 +1902,9 @@ bool LLAppViewer::initThreads() LLWatchdog::getInstance()->init(watchdog_killer_callback); } + // State machine thread. + startEngineThread(); + AICurlInterface::startCurlThread(gSavedSettings.getU32("CurlMaxTotalConcurrentConnections"), gSavedSettings.getU32("CurlConcurrentConnectionsPerHost"), gSavedSettings.getBOOL("NoVerifySSLCert")); @@ -2202,7 +2197,6 @@ bool LLAppViewer::initConfiguration() LLFirstUse::addConfigVariable("FirstSculptedPrim"); LLFirstUse::addConfigVariable("FirstVoice"); LLFirstUse::addConfigVariable("FirstMedia"); - LLFirstUse::addConfigVariable("FirstPhysicsWearable"); // [RLVa:KB] - Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a //LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_DETACH); @@ -2697,25 +2691,15 @@ void LLAppViewer::cleanupSavedSettings() { gSavedSettings.setBOOL("MouseSun", FALSE); - gSavedSettings.setBOOL("FlyBtnState", FALSE); - - gSavedSettings.setBOOL("FirstPersonBtnState", FALSE); - gSavedSettings.setBOOL("ThirdPersonBtnState", TRUE); - gSavedSettings.setBOOL("BuildBtnState", FALSE); - gSavedSettings.setBOOL("UseEnergy", TRUE); // force toggle to turn off, since sends message to simulator gSavedSettings.setBOOL("DebugWindowProc", gDebugWindowProc); - gSavedSettings.setBOOL("AllowTapTapHoldRun", gAllowTapTapHoldRun); gSavedSettings.setBOOL("ShowObjectUpdates", gShowObjectUpdates); - if (!gNoRender) + if (!gNoRender && gDebugView) { - if (gDebugView) - { - gSavedSettings.setBOOL("ShowDebugConsole", gDebugView->mDebugConsolep->getVisible()); - } + gSavedSettings.setBOOL("ShowDebugConsole", gDebugView->mDebugConsolep->getVisible()); } // save window position if not fullscreen @@ -3823,7 +3807,6 @@ static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager"); /////////////////////////////////////////////////////// void LLAppViewer::idle() { - LLMemType mt_idle(LLMemType::MTYPE_IDLE); pingMainloopTimeout("Main:Idle"); // Update frame timers @@ -3865,7 +3848,7 @@ void LLAppViewer::idle() { LLFastTimer t(FTM_STATEMACHINE); - AIStateMachine::mainloop(); + gMainThreadEngine.mainloop(); } // Must wait until both have avatar object and mute list, so poll @@ -4446,7 +4429,6 @@ static LLFastTimer::DeclareTimer FTM_DYNAMIC_THROTTLE("Dynamic Throttle"); static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit"); void LLAppViewer::idleNetwork() { - LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK); pingMainloopTimeout("idleNetwork"); gObjectList.mNumNewObjects = 0; diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 6685e16fd..b894ad17e 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -37,11 +37,11 @@ #include "llsys.h" // for LLOSInfo #include "llviewercontrol.h" // settings_map_type +class LLCommandLineParser; class LLTextureCache; class LLImageDecodeThread; class LLTextureFetch; class LLWatchdogTimeout; -class LLCommandLineParser; class LLAppViewer : public LLApp { @@ -278,14 +278,11 @@ const S32 AGENT_UPDATES_PER_SECOND = 10; // "// llstartup" indicates that llstartup is the only client for this global. extern LLSD gDebugInfo; - -extern BOOL gAllowTapTapHoldRun; extern BOOL gShowObjectUpdates; extern BOOL gAcceptTOS; extern BOOL gAcceptCriticalMessage; - typedef enum { LAST_EXEC_NORMAL = 0, @@ -332,8 +329,6 @@ extern LLUUID gSystemFolderAssets; extern BOOL gDisconnected; -// Minimap scale in pixels per region - extern LLFrameTimer gRestoreGLTimer; extern BOOL gRestoreGL; extern BOOL gUseWireframe; diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 154e38de3..29f8cfe8e 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -37,7 +37,6 @@ #include "llcommandlineparser.h" #include "lldiriterator.h" -#include "llmemtype.h" #include "llurldispatcher.h" // SLURL from other app instance #include "llviewernetwork.h" #include "llviewercontrol.h" @@ -102,8 +101,6 @@ int main( int argc, char **argv ) Debug(debug::init()); Debug(libcw_do.on()); - LLMemType mt1(LLMemType::MTYPE_STARTUP); - #if LL_SOLARIS && defined(__sparc) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 67e5b8d78..da03fc76e 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -39,8 +39,6 @@ #include "llappviewermacosx.h" #include "llcommandlineparser.h" -#include "llmemtype.h" - #include "lldiriterator.h" #include "llviewernetwork.h" #include "llviewercontrol.h" @@ -74,8 +72,6 @@ namespace int main( int argc, char **argv ) { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - #if LL_SOLARIS && defined(__sparc) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 79da09dfc..0d71bc3f4 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -40,8 +40,6 @@ #include "llappviewerwin32.h" -#include "llmemtype.h" - #include "llwindowwin32.cpp" // *FIX: for setting gIconResource. #include "res/resource.h" // *FIX: for setting gIconResource. @@ -159,8 +157,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - const S32 MAX_HEAPS = 255; DWORD heap_enable_lfh_error[MAX_HEAPS]; S32 num_heaps = 0; diff --git a/indra/newview/llbuildnewviewsscheduler.cpp b/indra/newview/llbuildnewviewsscheduler.cpp deleted file mode 100644 index 16d2900ed..000000000 --- a/indra/newview/llbuildnewviewsscheduler.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// -#include "llviewerprecompiledheaders.h" -#include "llbuildnewviewsscheduler.h" -#include "llinventorybridge.h" -#define BUILD_DELAY 0.1f -#define BUILD_PER_DELAY 512 - -LLBuildNewViewsScheduler* gBuildNewViewsScheduler; - -std::list LLBuildNewViewsScheduler::sJobs; -LLBuildNewViewsScheduler::LLBuildNewViewsScheduler() : LLEventTimer(BUILD_DELAY) -{ -} -void LLBuildNewViewsScheduler::addJob(LLInventoryPanel* inventory_panel, LLInventoryObject* inventory_object) -{ - LLBuildNewViewsScheduler::job j; - j.mInventoryPanel = inventory_panel; - j.mInventoryObject = inventory_object; - sJobs.push_back(j); -} -void LLBuildNewViewsScheduler::cancel(LLInventoryPanel* inventory_panel) -{ - for(std::list::iterator iter = sJobs.begin(); - iter != sJobs.end(); ) - { - LLInventoryPanel* job_panel = (*iter).mInventoryPanel; - if(job_panel == inventory_panel) - { - iter = sJobs.erase(iter); - } - else - { - ++iter; - } - } -} -BOOL LLBuildNewViewsScheduler::tick() -{ - U32 i = 0; - while(!sJobs.empty() && (i < BUILD_PER_DELAY)) - { - LLBuildNewViewsScheduler::job j = sJobs.front(); - buildNewViews(j.mInventoryPanel, j.mInventoryObject); - sJobs.pop_front(); - ++i; - } - return FALSE; -} -void LLBuildNewViewsScheduler::buildNewViews(LLInventoryPanel* panelp, LLInventoryObject* objectp) -{ - LLFolderViewItem* itemp = NULL; - - if (objectp) - { - if (objectp->getType() <= LLAssetType::AT_NONE || - objectp->getType() >= LLAssetType::AT_COUNT) - { - llwarns << "called with objectp->mType == " - << ((S32) objectp->getType()) - << " (shouldn't happen)" << llendl; - } - else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category - { - LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(), - objectp->getType(), - LLInventoryType::IT_CATEGORY, - panelp, - panelp->getRootFolder(), - objectp->getUUID()); - - if (new_listener) - { - LLFolderViewFolder* folderp = new LLFolderViewFolder(new_listener->getDisplayName(), - new_listener->getIcon(), - new_listener->getIcon(), - NULL, - panelp->getRootFolder(), - new_listener); - - folderp->setItemSortOrder(panelp->getSortOrder()); - itemp = folderp; - } - } - else // build new view for item - { - LLInventoryItem* item = (LLInventoryItem*)objectp; - LLInvFVBridge* new_listener = LLInvFVBridge::createBridge( - item->getType(), - item->getActualType(), - item->getInventoryType(), - panelp, - panelp->getRootFolder(), - item->getUUID(), - item->getFlags()); - if (new_listener) - { - itemp = new LLFolderViewItem(new_listener->getDisplayName(), - new_listener->getIcon(), - NULL, - NULL, - new_listener->getCreationDate(), - panelp->getRootFolder(), - new_listener); - } - } - - LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)panelp->getRootFolder()->getItemByID(objectp->getParentUUID()); - - if (itemp) - { - //itemp->mDelayedDelete = TRUE; - if (parent_folder) - { - itemp->addToFolder(parent_folder, panelp->getRootFolder()); - } - else - { - llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl; - delete itemp; - } - } - } - - if (!objectp || (objectp && (objectp->getType() == LLAssetType::AT_CATEGORY))) - { - LLViewerInventoryCategory::cat_array_t* categories; - LLViewerInventoryItem::item_array_t* items; - - panelp->getModel()->lockDirectDescendentArrays((objectp != NULL) ? objectp->getUUID() : LLUUID::null, categories, items); - if(categories) - { - S32 count = categories->count(); - for(S32 i = 0; i < count; ++i) - { - LLInventoryCategory* cat = categories->get(i); - addJob(panelp, cat); - } - } - if(items) - { - S32 count = items->count(); - for(S32 i = 0; i < count; ++i) - { - LLInventoryItem* item = items->get(i); - addJob(panelp, item); - } - } - panelp->getModel()->unlockDirectDescendentArrays(objectp->getUUID()); - } -} -// diff --git a/indra/newview/llbuildnewviewsscheduler.h b/indra/newview/llbuildnewviewsscheduler.h deleted file mode 100644 index 83169d925..000000000 --- a/indra/newview/llbuildnewviewsscheduler.h +++ /dev/null @@ -1,22 +0,0 @@ -// -#include "llinventorypanel.h" -#include "llinventory.h" -#include "lleventtimer.h" -class LLBuildNewViewsScheduler : public LLEventTimer -{ - typedef struct - { - LLInventoryPanel* mInventoryPanel; - LLInventoryObject* mInventoryObject; - } job; -public: - LLBuildNewViewsScheduler(); - void addJob(LLInventoryPanel* inventory_panel, LLInventoryObject* inventory_object); - void cancel(LLInventoryPanel* inventory_panel); - BOOL tick(); -private: - static std::list sJobs; - void buildNewViews(LLInventoryPanel* panelp, LLInventoryObject* objectp); -}; -extern LLBuildNewViewsScheduler* gBuildNewViewsScheduler; -// diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 12e26b1c4..bce3853d2 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -87,7 +87,7 @@ const F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds LLChatBar *gChatBar = NULL; // legacy calllback glue -void toggleChatHistory(void* user_data); +void toggleChatHistory(LLUICtrl*, const LLSD&); //void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | Modified: RLVa-0.2.2a void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel); @@ -137,19 +137,16 @@ LLChatBar::~LLChatBar() BOOL LLChatBar::postBuild() { - childSetAction("History", toggleChatHistory, this); - getChild("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1)); + if (LLUICtrl* history_ctrl = findChild("History")) + history_ctrl->setCommitCallback(toggleChatHistory); + if (LLUICtrl* say_ctrl = getChild("Say")) + say_ctrl->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1)); // attempt to bind to an existing combo box named gesture - setGestureCombo(getChild( "Gesture")); + if (LLComboBox* gesture_combo = findChild("Gesture")) + setGestureCombo(gesture_combo); - LLButton * sayp = getChild("Say"); - if(sayp) - { - setDefaultBtn(sayp); - } - - mInputEditor = getChild("Chat Editor"); + mInputEditor = findChild("Chat Editor"); if (mInputEditor) { mInputEditor->setCallbackUserData(this); @@ -165,9 +162,6 @@ BOOL LLChatBar::postBuild() mInputEditor->setEnableLineHistory(TRUE); } - mHistoryBtn.connect(this,"History"); - mSayBtn.connect(this,"Say"); - mIsBuilt = TRUE; return TRUE; @@ -231,9 +225,11 @@ void LLChatBar::refresh() gAgent.stopTyping(); } - mHistoryBtn->setValue(LLFloaterChat::instanceVisible(LLSD())); + if (LLUICtrl* history_ctrl = findChild("History")) + history_ctrl->setValue(LLFloaterChat::instanceVisible()); - mSayBtn->setEnabled(mInputEditor->getText().size() > 0); + if (LLUICtrl* say_ctrl = getChild("Say")) + say_ctrl->setEnabled(mInputEditor->getText().size() > 0); //childSetEnabled("Shout", mInputEditor->getText().size() > 0); createDummyWidget Making Dummy -HgB } @@ -430,8 +426,6 @@ void LLChatBar::sendChat( EChatType type ) { if (gSavedSettings.getBOOL("AscentAutoCloseOOC") && (utf8text.length() > 1)) { - // Chalice - OOC autoclosing patch based on code by Henri Beauchamp - int needsClosingType=0; //Check if it needs the end-of-chat brackets -HgB if (utf8text.find("((") == 0 && utf8text.find("))") == -1) { @@ -445,8 +439,7 @@ void LLChatBar::sendChat( EChatType type ) utf8text+=" "; utf8text+="]]"; } - //Check if it needs the start-of-chat brackets -HgB - needsClosingType=0; + if (utf8text.find("((") == -1 && utf8text.find("))") == (utf8text.length() - 2)) { if(utf8text.at(0) == '(') @@ -897,7 +890,7 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl) } } -void toggleChatHistory(void* user_data) +void toggleChatHistory(LLUICtrl* ctrl, const LLSD&) { LLFloaterChat::toggleInstance(LLSD()); } diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h index 5e0391d08..c4fed67d9 100644 --- a/indra/newview/llchatbar.h +++ b/indra/newview/llchatbar.h @@ -110,9 +110,6 @@ protected: LLComboBox* mGestureCombo; LLChatBarGestureObserver* mObserver; - - CachedUICtrl mHistoryBtn; - CachedUICtrl mSayBtn; }; extern LLChatBar *gChatBar; diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index e6fed3c30..92ed63027 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -37,7 +37,6 @@ // library includes #include "llframestatview.h" #include "llfasttimerview.h" -#include "llmemoryview.h" #include "llconsole.h" #include "lltextureview.h" #include "llresmgr.h" @@ -84,13 +83,6 @@ LLDebugView::LLDebugView(const std::string& name, const LLRect &rect) mFastTimerView->setVisible(FALSE); // start invisible addChild(mFastTimerView); - r.set(25, rect.getHeight() - 50, rect.getWidth()/2, rect.getHeight() - 450); - mMemoryView = new LLMemoryView("memory", r); - mMemoryView->setFollowsTop(); - mMemoryView->setFollowsLeft(); - mMemoryView->setVisible(FALSE); // start invisible - addChild(mMemoryView); - r.set(150, rect.getHeight() - 50, 870, 100); gTextureView = new LLTextureView("gTextureView", r); gTextureView->setRect(r); diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 947422310..81cc087cc 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -762,8 +762,6 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) void LLDrawable::updateTexture() { - LLMemType mt(LLMemType::MTYPE_DRAWABLE); - if (isDead()) { llwarns << "Dead drawable updating texture!" << llendl; diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index a9bec244f..c502d0f9f 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -44,7 +44,6 @@ #include "llvector4a.h" #include "llquaternion.h" #include "xform.h" -#include "llmemtype.h" #include "lldarray.h" #include "llviewerobject.h" #include "llrect.h" diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp new file mode 100644 index 000000000..2b4494473 --- /dev/null +++ b/indra/newview/llestateinfomodel.cpp @@ -0,0 +1,236 @@ +/** + * @file llestateinfomodel.cpp + * @brief Estate info model + * + * $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 "llviewerprecompiledheaders.h" + +#include "llestateinfomodel.h" + +// libs +#include "llhttpclient.h" +#include "llregionflags.h" +#include "message.h" + +// viewer +#include "llagent.h" +#include "llfloaterregioninfo.h" // for invoice id +#include "llviewerregion.h" + +class AIHTTPTimeoutPolicy; +extern AIHTTPTimeoutPolicy estateChangeInfoResponder_timeout; + +LLEstateInfoModel::LLEstateInfoModel() +: mID(0) +, mFlags(0) +, mSunHour(0) +{ +} + +boost::signals2::connection LLEstateInfoModel::setUpdateCallback(const update_signal_t::slot_type& cb) +{ + return mUpdateSignal.connect(cb); +} + +boost::signals2::connection LLEstateInfoModel::setCommitCallback(const update_signal_t::slot_type& cb) +{ + return mCommitSignal.connect(cb); +} + +void LLEstateInfoModel::sendEstateInfo() +{ + if (!commitEstateInfoCaps()) + { + // the caps method failed, try the old way + LLFloaterRegionInfo::nextInvoice(); + commitEstateInfoDataserver(); + } +} + +bool LLEstateInfoModel::getUseFixedSun() const { return mFlags & REGION_FLAGS_SUN_FIXED; } +bool LLEstateInfoModel::getIsExternallyVisible() const { return mFlags & REGION_FLAGS_EXTERNALLY_VISIBLE; } +bool LLEstateInfoModel::getAllowDirectTeleport() const { return mFlags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT; } +bool LLEstateInfoModel::getDenyAnonymous() const { return mFlags & REGION_FLAGS_DENY_ANONYMOUS; } +bool LLEstateInfoModel::getDenyAgeUnverified() const { return mFlags & REGION_FLAGS_DENY_AGEUNVERIFIED; } +bool LLEstateInfoModel::getAllowVoiceChat() const { return mFlags & REGION_FLAGS_ALLOW_VOICE; } + +void LLEstateInfoModel::setUseFixedSun(bool val) { setFlag(REGION_FLAGS_SUN_FIXED, val); } +void LLEstateInfoModel::setIsExternallyVisible(bool val) { setFlag(REGION_FLAGS_EXTERNALLY_VISIBLE, val); } +void LLEstateInfoModel::setAllowDirectTeleport(bool val) { setFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, val); } +void LLEstateInfoModel::setDenyAnonymous(bool val) { setFlag(REGION_FLAGS_DENY_ANONYMOUS, val); } +void LLEstateInfoModel::setDenyAgeUnverified(bool val) { setFlag(REGION_FLAGS_DENY_AGEUNVERIFIED, val); } +void LLEstateInfoModel::setAllowVoiceChat(bool val) { setFlag(REGION_FLAGS_ALLOW_VOICE, val); } + +void LLEstateInfoModel::update(const strings_t& strings) +{ + // NOTE: LLDispatcher extracts strings with an extra \0 at the + // end. If we pass the std::string direct to the UI/renderer + // it draws with a weird character at the end of the string. + mName = strings[0].c_str(); + mOwnerID = LLUUID(strings[1].c_str()); + mID = strtoul(strings[2].c_str(), NULL, 10); + mFlags = strtoul(strings[3].c_str(), NULL, 10); + mSunHour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f; + + LL_DEBUGS("Windlight Sync") << "Received estate info: " + << "is_sun_fixed = " << getUseFixedSun() + << ", sun_hour = " << getSunHour() << LL_ENDL; + lldebugs << getInfoDump() << llendl; + + // Update region owner. + LLViewerRegion* regionp = gAgent.getRegion(); + regionp->setOwner(mOwnerID); + + // Let interested parties know that estate info has been updated. + mUpdateSignal(); +} + +void LLEstateInfoModel::notifyCommit() +{ + mCommitSignal(); +} + +//== PRIVATE STUFF ============================================================ + +class LLEstateChangeInfoResponder : public LLHTTPClient::ResponderWithResult +{ +public: + + // if we get a normal response, handle it here + /*virtual*/ void result(const LLSD& content) + { + llinfos << "Committed estate info" << llendl; + LLEstateInfoModel::instance().notifyCommit(); + } + + // if we get an error response + /*virtual*/ void error(U32 status, const std::string& reason) + { + llwarns << "Failed to commit estate info (" << status << "): " << reason << llendl; + } + + /*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return estateChangeInfoResponder_timeout; } + /*virtual*/ char const* getName(void) const { return "LLEstateChangeInfoResponder"; } +}; + +// tries to send estate info using a cap; returns true if it succeeded +bool LLEstateInfoModel::commitEstateInfoCaps() +{ + std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo"); + + if (url.empty()) + { + // whoops, couldn't find the cap, so bail out + return false; + } + + LLSD body; + body["estate_name" ] = getName(); + body["sun_hour" ] = getSunHour(); + + body["is_sun_fixed" ] = getUseFixedSun(); + body["is_externally_visible"] = getIsExternallyVisible(); + body["allow_direct_teleport"] = getAllowDirectTeleport(); + body["deny_anonymous" ] = getDenyAnonymous(); + body["deny_age_unverified" ] = getDenyAgeUnverified(); + body["allow_voice_chat" ] = getAllowVoiceChat(); + + body["invoice" ] = LLFloaterRegionInfo::getLastInvoice(); + + LL_DEBUGS("Windlight Sync") << "Sending estate caps: " + << "is_sun_fixed = " << getUseFixedSun() + << ", sun_hour = " << getSunHour() << LL_ENDL; + lldebugs << body << LL_ENDL; + + // we use a responder so that we can re-get the data after committing to the database + LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder); + return true; +} + +/* This is the old way of doing things, is deprecated, and should be + deleted when the dataserver model can be removed */ +// key = "estatechangeinfo" +// strings[0] = str(estate_id) (added by simulator before relay - not here) +// strings[1] = estate_name +// strings[2] = str(estate_flags) +// strings[3] = str((S32)(sun_hour * 1024.f)) +void LLEstateInfoModel::commitEstateInfoDataserver() +{ + LL_DEBUGS("Windlight Sync") << "Sending estate info: " + << "is_sun_fixed = " << getUseFixedSun() + << ", sun_hour = " << getSunHour() << LL_ENDL; + lldebugs << getInfoDump() << LL_ENDL; + + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("EstateOwnerMessage"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used + + msg->nextBlock("MethodData"); + msg->addString("Method", "estatechangeinfo"); + msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); + + msg->nextBlock("ParamList"); + msg->addString("Parameter", getName()); + + msg->nextBlock("ParamList"); + msg->addString("Parameter", llformat("%u", getFlags())); + + msg->nextBlock("ParamList"); + msg->addString("Parameter", llformat("%d", (S32) (getSunHour() * 1024.0f))); + + gAgent.sendMessage(); +} + +void LLEstateInfoModel::setFlag(U32 flag, bool val) +{ + if (val) + { + mFlags |= flag; + } + else + { + mFlags &= ~flag; + } +} + +std::string LLEstateInfoModel::getInfoDump() +{ + LLSD dump; + dump["estate_name" ] = getName(); + dump["sun_hour" ] = getSunHour(); + + dump["is_sun_fixed" ] = getUseFixedSun(); + dump["is_externally_visible"] = getIsExternallyVisible(); + dump["allow_direct_teleport"] = getAllowDirectTeleport(); + dump["deny_anonymous" ] = getDenyAnonymous(); + dump["deny_age_unverified" ] = getDenyAgeUnverified(); + dump["allow_voice_chat" ] = getAllowVoiceChat(); + + std::stringstream dump_str; + dump_str << dump; + return dump_str.str(); +} diff --git a/indra/newview/llestateinfomodel.h b/indra/newview/llestateinfomodel.h new file mode 100644 index 000000000..56391eda9 --- /dev/null +++ b/indra/newview/llestateinfomodel.h @@ -0,0 +1,103 @@ +/** + * @file llestateinfomodel.h + * @brief Estate info model + * + * $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 LL_LLESTATEINFOMODEL_H +#define LL_LLESTATEINFOMODEL_H + +class LLMessageSystem; + +#include "llsingleton.h" + +/** + * Contains estate info, notifies interested parties of its changes. + */ +class LLEstateInfoModel : public LLSingleton +{ + LOG_CLASS(LLEstateInfoModel); + +public: + typedef boost::signals2::signal update_signal_t; + boost::signals2::connection setUpdateCallback(const update_signal_t::slot_type& cb); /// the model has been externally updated + boost::signals2::connection setCommitCallback(const update_signal_t::slot_type& cb); /// our changes have been applied + + void sendEstateInfo(); /// send estate info to the simulator + + // getters + bool getUseFixedSun() const; + bool getIsExternallyVisible() const; + bool getAllowDirectTeleport() const; + bool getDenyAnonymous() const; + bool getDenyAgeUnverified() const; + bool getAllowVoiceChat() const; + + const std::string& getName() const { return mName; } + const LLUUID& getOwnerID() const { return mOwnerID; } + U32 getID() const { return mID; } + F32 getSunHour() const { return getUseFixedSun() ? mSunHour : 0.f; } + + // setters + void setUseFixedSun(bool val); + void setIsExternallyVisible(bool val); + void setAllowDirectTeleport(bool val); + void setDenyAnonymous(bool val); + void setDenyAgeUnverified(bool val); + void setAllowVoiceChat(bool val); + + void setSunHour(F32 sun_hour) { mSunHour = sun_hour; } + +protected: + typedef std::vector strings_t; + + friend class LLSingleton; + friend class LLDispatchEstateUpdateInfo; + friend class LLEstateChangeInfoResponder; + + LLEstateInfoModel(); + + /// refresh model with data from the incoming server message + void update(const strings_t& strings); + + void notifyCommit(); + +private: + bool commitEstateInfoCaps(); + void commitEstateInfoDataserver(); + U32 getFlags() const { return mFlags; } + void setFlag(U32 flag, bool val); + std::string getInfoDump(); + + // estate info + std::string mName; /// estate name + LLUUID mOwnerID; /// estate owner id + U32 mID; /// estate id + U32 mFlags; /// estate flags + F32 mSunHour; /// estate sun hour + + update_signal_t mUpdateSignal; /// emitted when we receive update from sim + update_signal_t mCommitSignal; /// emitted when our update gets applied to sim +}; + +#endif // LL_LLESTATEINFOMODEL_H diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 0092f5277..bbd4426f0 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -265,8 +265,6 @@ void LLFace::setPool(LLFacePool* pool) void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (!new_pool) { llerrs << "Setting pool to null!" << llendl; @@ -442,8 +440,6 @@ U16 LLFace::getGeometryAvatar( LLStrider &vertex_weights, LLStrider &clothing_weights) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (mVertexBuffer.notNull()) { mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount); @@ -459,8 +455,6 @@ U16 LLFace::getGeometryAvatar( U16 LLFace::getGeometry(LLStrider &vertices, LLStrider &normals, LLStrider &tex_coords, LLStrider &indicesp) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (mVertexBuffer.notNull()) { mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount); @@ -776,8 +770,6 @@ bool less_than_max_mag(const LLVector4a& vec) BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - //get bounding box if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED)) { diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 22539595e..30864755c 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -420,7 +420,7 @@ void LLFastTimerView::draw() S32 left, top, right, bottom; S32 x, y, barw, barh, dx, dy; - S32 texth, textw; + S32 texth; LLPointer box_imagep = LLUI::getUIImage("rounded_square.tga"); // Draw the window background @@ -461,7 +461,6 @@ void LLFastTimerView::draw() tdesc = llformat("Full bar = %s [Click to pause/reset] [SHIFT-Click to toggle]",modedesc[mDisplayMode]); LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - textw = LLFontGL::getFontMonospace()->getWidth(tdesc); x = xleft, y -= (texth + 2); tdesc = llformat("Justification = %s [CTRL-Click to toggle]",centerdesc[mDisplayCenter]); @@ -485,8 +484,8 @@ void LLFastTimerView::draw() sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey; F32 hue = 0.f; - - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + // Move color generation down to be in the next loop. + /*for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != timer_tree_iterator_t(); ++it) { @@ -503,7 +502,8 @@ void LLFastTimerView::draw() child_color.setHSL(hue, saturation, lightness); sTimerColors[idp] = child_color; - } + }*/ + // const S32 LEGEND_WIDTH = 220; { @@ -517,6 +517,20 @@ void LLFastTimerView::draw() ++it) { LLFastTimer::NamedTimer* idp = (*it); + // Move color generation down to be in the next loop. + const F32 HUE_INCREMENT = 0.23f; + hue = fmodf(hue + HUE_INCREMENT, 1.f); + // saturation increases with depth + F32 saturation = clamp_rescale((F32)idp->getDepth(), 0.f, 3.f, 0.f, 1.f); + // lightness alternates with depth + F32 lightness = idp->getDepth() % 2 ? 0.5f : 0.6f; + + LLColor4 child_color; + child_color.setHSL(hue, saturation, lightness); + + sTimerColors[idp] = child_color; + // + // Making the ledgend part of fast timers scrollable if(mScrollOffset_tmp) { @@ -600,8 +614,6 @@ void LLFastTimerView::draw() y -= (texth + 2); - textw = dx + LLFontGL::getFontMonospace()->getWidth(idp->getName()) + 40; - if (idp->getCollapsed()) { it.skipDescendants(); diff --git a/indra/newview/llfloateractivespeakers.cpp b/indra/newview/llfloateractivespeakers.cpp index 88e6ceab0..8203c310b 100644 --- a/indra/newview/llfloateractivespeakers.cpp +++ b/indra/newview/llfloateractivespeakers.cpp @@ -324,29 +324,27 @@ BOOL LLPanelActiveSpeakers::postBuild() mSpeakerList->setSortChangedCallback(boost::bind(&LLPanelActiveSpeakers::onSortChanged,this)); mSpeakerList->setCallbackUserData(this); - mMuteTextCtrl = getChild("mute_text_btn"); - childSetCommitCallback("mute_text_btn", onClickMuteTextCommit, this); + if ((mMuteTextCtrl = findChild("mute_text_btn"))) + childSetCommitCallback("mute_text_btn", onClickMuteTextCommit, this); mMuteVoiceCtrl = getChild("mute_btn"); childSetCommitCallback("mute_btn", onClickMuteVoiceCommit, this); childSetCommitCallback("speaker_volume", onVolumeChange, this); - mNameText = getChild("resident_name"); + mNameText = findChild("resident_name"); - mProfileBtn = getChild("profile_btn"); - childSetAction("profile_btn", onClickProfile, this); + if ((mProfileBtn = findChild("profile_btn"))) + childSetAction("profile_btn", onClickProfile, this); - childSetCommitCallback("moderator_allow_voice", onModeratorMuteVoice, this); - childSetCommitCallback("moderator_allow_text", onModeratorMuteText, this); - childSetCommitCallback("moderation_mode", onChangeModerationMode, this); + if (findChild("moderator_allow_voice")) + childSetCommitCallback("moderator_allow_voice", onModeratorMuteVoice, this); + if (findChild("moderator_allow_text")) + childSetCommitCallback("moderator_allow_text", onModeratorMuteText, this); + if (findChild("moderator_mode")) + childSetCommitCallback("moderation_mode", onChangeModerationMode, this); mVolumeSlider.connect(this,"speaker_volume"); - mModeratorCtrlLbl.connect(this,"moderator_controls_label"); - mModeratorAllowVoiceCheckbox.connect(this,"moderator_allow_voice"); - mModeratorAllowTextCheckbox.connect(this,"moderator_allow_text"); - mModeratorModePanel.connect(this,"moderation_mode_panel"); - mModeratorControlsPanel.connect(this,"moderator_controls"); // update speaker UI handleSpeakerSelect(); @@ -628,15 +626,14 @@ void LLPanelActiveSpeakers::refreshSpeakers() && selected_id != gAgent.getID() && (selected_speakerp.notNull() && (selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT || selected_speakerp->mType == LLSpeaker::SPEAKER_EXTERNAL))); - mModeratorCtrlLbl->setEnabled(selected_id.notNull()); + if (LLView* view = findChild("moderator_controls_label")) + view->setEnabled(selected_id.notNull()); - mModeratorAllowVoiceCheckbox->setEnabled( - selected_id.notNull() - && mSpeakerMgr->isVoiceActive() - && gVoiceClient->getVoiceEnabled(selected_id)); + if (LLView* view = findChild("moderator_allow_voice")) + view->setEnabled(selected_id.notNull() && mSpeakerMgr->isVoiceActive() && gVoiceClient->getVoiceEnabled(selected_id)); - mModeratorAllowTextCheckbox->setEnabled( - selected_id.notNull()); + if (LLView* view = findChild("moderator_allow_text")) + view->setEnabled(selected_id.notNull()); if (mProfileBtn) { @@ -660,8 +657,10 @@ void LLPanelActiveSpeakers::refreshSpeakers() LLPointer self_speakerp = mSpeakerMgr->findSpeaker(gAgent.getID()); if(self_speakerp) { - mModeratorModePanel->setVisible(self_speakerp->mIsModerator && mSpeakerMgr->isVoiceActive()); - mModeratorControlsPanel->setVisible(self_speakerp->mIsModerator); + if (LLView* view = findChild("moderation_mode_panel")) + view->setVisible(self_speakerp->mIsModerator && mSpeakerMgr->isVoiceActive()); + if (LLView* view = findChild("moderator_controls")) + view->setVisible(self_speakerp->mIsModerator); } // keep scroll value stable diff --git a/indra/newview/llfloateractivespeakers.h b/indra/newview/llfloateractivespeakers.h index efad321cb..4fef7933a 100644 --- a/indra/newview/llfloateractivespeakers.h +++ b/indra/newview/llfloateractivespeakers.h @@ -299,11 +299,6 @@ protected: LLPointer mSpeakerClearListener; CachedUICtrl mVolumeSlider; - CachedUICtrl mModeratorCtrlLbl; - CachedUICtrl mModeratorAllowVoiceCheckbox; - CachedUICtrl mModeratorAllowTextCheckbox; - CachedUICtrl mModeratorModePanel; - CachedUICtrl mModeratorControlsPanel; }; diff --git a/indra/newview/llfloaterblacklist.cpp b/indra/newview/llfloaterblacklist.cpp index dd3443019..44e03ed16 100644 --- a/indra/newview/llfloaterblacklist.cpp +++ b/indra/newview/llfloaterblacklist.cpp @@ -51,7 +51,7 @@ BOOL LLFloaterBlacklist::postBuild() childSetAction("remove_btn", onClickRemove, this); childSetAction("save_btn", onClickSave, this); childSetAction("load_btn", onClickLoad, this); - childSetAction("rerender_btn", onClickRerender, this); + //childSetAction("rerender_btn", onClickRerender, this); childSetVisible("copy_uuid_btn",false); LLComboBox* box = getChild("asset_combo"); box->add("Texture",LLSD(0)); diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 78aefe250..92b8e8eeb 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -378,8 +378,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInv void LLFloaterBulkPermission::updateInventory(LLViewerObject* object, LLViewerInventoryItem* item, U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // This slices the object into what we're concerned about on the viewer. // The simulator will take the permissions and transfer ownership. LLPointer task_item = diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index db38f8009..7e1cfcd73 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -107,17 +107,14 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed) mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL); mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL); // do not automatically open singleton floaters (as result of getInstance()) - BOOL no_open = FALSE; - bool show_bar = gSavedSettings.getBOOL("ShowLocalChatFloaterBar"); - LLUICtrlFactory::getInstance()->buildFloater(this, (show_bar ? "floater_chat_history.xml" : "floater_chat_history_barless.xml"), &getFactoryMap(), no_open); + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chat_history.xml", &getFactoryMap(), /*no_open =*/false); childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes - childSetCommitCallback("translate chat",onClickToggleTranslateChat,this); - childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat")); + //childSetCommitCallback("translate chat",onClickToggleTranslateChat,this); + //childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat")); childSetVisible("Chat History Editor with mute",FALSE); childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); childSetAction("chat_history_open", onClickChatHistoryOpen, this); - setDefaultBtn("Chat"); } LLFloaterChat::~LLFloaterChat() @@ -182,6 +179,8 @@ void LLFloaterChat::handleVisibilityChange(BOOL new_visibility) if (new_visibility) { LLFloaterChatterBox::getInstance()->setFloaterFlashing(this, FALSE); + // Work around the chat bar no longer focusing from within the layout_stack + gFocusMgr.setKeyboardFocus(getChildView("Chat Editor")); } LLFloater::handleVisibilityChange(new_visibility); diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 876e2c321..9a56acfec 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -44,6 +44,15 @@ #include "llimview.h" #include "llimpanel.h" #include "llstring.h" + +namespace +{ + void handleLocalChatBar(LLFloaterChat* floater_chat, bool show_bar) + { + floater_chat->childSetVisible("chat_layout_panel", show_bar || !gSavedSettings.getBOOL("ChatHistoryTornOff")); + } +} + // // LLFloaterMyFriends // @@ -119,9 +128,9 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) : addFloater(LLFloaterMyFriends::getInstance(0), TRUE); } + LLFloaterChat* floater_chat = LLFloaterChat::getInstance(); if (gSavedSettings.getBOOL("ChatHistoryTornOff")) { - LLFloaterChat* floater_chat = LLFloaterChat::getInstance(); // add then remove to set up relationship for re-attach addFloater(floater_chat, FALSE); removeFloater(floater_chat); @@ -130,8 +139,9 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) : } else { - addFloater(LLFloaterChat::getInstance(LLSD()), FALSE); + addFloater(floater_chat, FALSE); } + gSavedSettings.getControl("ShowLocalChatFloaterBar")->getSignal()->connect(boost::bind(handleLocalChatBar, floater_chat, _2)); mTabContainer->lockTabs(); } @@ -235,6 +245,7 @@ void LLFloaterChatterBox::removeFloater(LLFloater* floaterp) // only my friends floater now locked mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1); gSavedSettings.setBOOL("ChatHistoryTornOff", TRUE); + if (!gSavedSettings.getBOOL("ShowLocalChatFloaterBar")) floaterp->childSetVisible("chat_layout_panel", false); floaterp->setCanClose(TRUE); } else if (floaterp->getName() == "floater_my_friends") @@ -261,7 +272,7 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp, { mTabContainer->unlockTabs(); // add chat history as second tab if contact window is present, first tab otherwise - if (getChildView("floater_my_friends")) + if (findChild("floater_my_friends")) { // assuming contacts window is first tab, select it mTabContainer->selectFirstTab(); @@ -276,6 +287,7 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp, // make sure first two tabs are now locked mTabContainer->lockTabs(num_locked_tabs + 1); gSavedSettings.setBOOL("ChatHistoryTornOff", FALSE); + floaterp->childSetVisible("chat_layout_panel", true); floaterp->setCanClose(FALSE); } else if (floaterp->getName() == "floater_my_friends") diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp index 3a4e829cf..0873c0351 100644 --- a/indra/newview/llfloaterdaycycle.cpp +++ b/indra/newview/llfloaterdaycycle.cpp @@ -370,14 +370,12 @@ bool LLFloaterDayCycle::deleteAlertCallback(const LLSD& notification, const LLSD "DayCyclePresetsCombo"); LLFloaterDayCycle* day_cycle = NULL; LLComboBox* key_combo = NULL; - LLMultiSliderCtrl* mult_sldr = NULL; if(LLFloaterDayCycle::isOpen()) { day_cycle = LLFloaterDayCycle::instance(); key_combo = day_cycle->getChild( "WLKeyPresets"); - mult_sldr = day_cycle->getChild("WLDayCycleKeys"); } std::string name(combo_box->getSelectedValue().asString()); diff --git a/indra/newview/llfloaterdirectory.cpp b/indra/newview/llfloaterdirectory.cpp index 9953d5d73..0bd358d4c 100644 --- a/indra/newview/llfloaterdirectory.cpp +++ b/indra/newview/llfloaterdirectory.cpp @@ -66,6 +66,12 @@ #include "lluictrlfactory.h" #include "hippogridmanager.h" +#include "llenvmanager.h" +#include "llnotificationsutil.h" +#include "llviewerregion.h" +#include "llwindow.h" + +const char* market_panel = "market_panel"; class LLPanelDirMarket : public LLPanelDirFind { @@ -81,13 +87,92 @@ public: /*virtual*/ void navigateToDefaultPage() { - if (mWebBrowser) mWebBrowser->navigateTo(getString("default_search_page")); + if (mWebBrowser && !mMarketplaceURL.empty()) mWebBrowser->navigateTo(mMarketplaceURL); + } + + /*virtual*/ BOOL postBuild() + { + if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + { + mMarketplaceURL = getString("default_search_page"); + } + else + { + getChild("reset_btn")->setCommitCallback(boost::bind(&LLPanelDirMarket::navigateToDefaultPage, this)); + } + return LLPanelDirFind::postBuild(); + } + + void handleRegionChange(LLTabContainer* container) + { + if (LLViewerRegion* region = gAgent.getRegion()) + { + if (region->getFeaturesReceived()) + { + setMarketplaceURL(container); + } + else + { + region->setFeaturesReceivedCallback(boost::bind(&LLPanelDirMarket::setMarketplaceURL, this, container)); + } + } + } + + void setMarketplaceURL(LLTabContainer* container) + { + if (LLViewerRegion* region = gAgent.getRegion()) + { + LLSD info; + region->getSimulatorFeatures(info); + if (info.has("MarketplaceURL")) + { + std::string url = info["MarketplaceURL"].asString(); + if (mMarketplaceURL == url) return; + + if (mMarketplaceURL.empty()) + { + container->addTabPanel(this, getLabel()); + mMarketplaceURL = url; + navigateToDefaultPage(); + } + else + { + LLNotificationsUtil::add("MarketplaceURLChanged", LLSD(), LLSD(), + boost::bind(&LLPanelDirMarket::onConfirmChangeMarketplaceURL, this, boost::bind(LLNotification::getSelectedOption, _1, _2), url)); + } + } + else if (!mMarketplaceURL.empty()) + { + if (gFloaterView->getParentFloater(this)->getVisible()) // Notify the user that they're no longer on the region with the marketplace when search is open + { + LLNotificationsUtil::add("MarketplaceURLGone"); + } + else // Search is not in use, remove the marketplace + { + mMarketplaceURL = ""; + container->removeTabPanel(this); + } + } + } + } + + void onConfirmChangeMarketplaceURL(const S32 option, const std::string& url) + { + if (option == 1) return; //no + else //yes + { + mMarketplaceURL = url; + if (option == 2) navigateToDefaultPage(); + } } static void* create(void* data) { - return new LLPanelDirMarket("market_panel", static_cast(data)); + return new LLPanelDirMarket(market_panel, static_cast(data)); } + +private: + std::string mMarketplaceURL; }; LLFloaterDirectory* LLFloaterDirectory::sInstance = NULL; @@ -128,13 +213,12 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name) factory_map["land_sales_panel"] = LLCallbackMap(createLand, this); factory_map["people_panel"] = LLCallbackMap(createPeople, this); factory_map["groups_panel"] = LLCallbackMap(createGroups, this); + factory_map[market_panel] = LLCallbackMap(LLPanelDirMarket::create, this); if (enableWebSearch) { // web search and showcase only for SecondLife factory_map["find_all_panel"] = LLCallbackMap(createFindAll, this); factory_map["showcase_panel"] = LLCallbackMap(createShowcase, this); - if (!enableClassicAllSearch) - factory_map["market_panel"] = LLCallbackMap(LLPanelDirMarket::create, this); } if (enableClassicAllSearch) @@ -169,7 +253,15 @@ LLFloaterDirectory::LLFloaterDirectory(const std::string& name) mPanelAvatarp->selectTab(0); } - getChild("Directory Tabs")->setCommitCallback(boost::bind(&LLFloaterDirectory::onTabChanged,_2)); + LLTabContainer* container = getChild("Directory Tabs"); + if (enableClassicAllSearch) + { + LLPanelDirMarket* marketp = static_cast(container->getPanelByName(market_panel)); + container->removeTabPanel(marketp); // Until we get a MarketPlace URL, tab is removed. + marketp->handleRegionChange(container); + LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLPanelDirMarket::handleRegionChange, marketp, container)); + } + container->setCommitCallback(boost::bind(&LLFloaterDirectory::onTabChanged,_2)); } LLFloaterDirectory::~LLFloaterDirectory() diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 1eb0ca856..a00cfb8bf 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -123,7 +123,6 @@ void LLFloaterDisplayName::onOpen() getChild("lockout_text")->setTextArg("[TIME]", next_update_string_time); getChild("lockout_text")->setVisible(true); - getChild("no_lockout_text")->setVisible(false); getChild("save_btn")->setEnabled(false); getChild("display_name_editor")->setEnabled(false); getChild("display_name_confirm")->setEnabled(false); @@ -133,7 +132,6 @@ void LLFloaterDisplayName::onOpen() else { getChild("lockout_text")->setVisible(false); - getChild("no_lockout_text")->setVisible(true); getChild("save_btn")->setEnabled(true); getChild("display_name_editor")->setEnabled(true); getChild("display_name_confirm")->setEnabled(true); @@ -167,7 +165,7 @@ void LLFloaterDisplayName::onCacheSetName(bool success, // We might have a localized string for this message // error_args will usually be empty from the server. if (!error_tag.empty() - && LLNotifications::getInstance()->templateExists(error_tag)) + && LLNotificationTemplates::getInstance()->templateExists(error_tag)) { LLNotifications::instance().add(error_tag); return; diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp index 905ad3b68..9e59cf046 100644 --- a/indra/newview/llfloaterenvsettings.cpp +++ b/indra/newview/llfloaterenvsettings.cpp @@ -88,7 +88,6 @@ void LLFloaterEnvSettings::initCallbacks(void) // WL Top childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, NULL); childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, NULL); - childSetAction("EnvSubmitWindlight", onSubmitWindlight, NULL); childSetAction("EnvUseEstateTimeButton", onUseEstateTime, NULL); childSetAction("EnvSettingsHelpButton", onClickHelp, this); } @@ -285,21 +284,6 @@ void LLFloaterEnvSettings::onOpenAdvancedWater(void* userData) LLFloaterWater::show(); } -void LLFloaterEnvSettings::onSubmitWindlight(void* userData) -{ - Meta7WindlightPacket * wl = new Meta7WindlightPacket(); - - LLWaterParamManager * param_mgr = LLWaterParamManager::getInstance(); - wl->reflectionWaveletScale.X = param_mgr->mNormalScale.mX; - wl->reflectionWaveletScale.Y = param_mgr->mNormalScale.mY; - wl->reflectionWaveletScale.Z = param_mgr->mNormalScale.mZ; - - - std::vector strings; - strings.push_back((char*)wl); - send_generic_message("Windlight", strings); -} - void LLFloaterEnvSettings::onUseEstateTime(void* userData) { if(LLFloaterWindLight::isOpen()) diff --git a/indra/newview/llfloaterenvsettings.h b/indra/newview/llfloaterenvsettings.h index 49bf4fd0d..4cdf6036c 100644 --- a/indra/newview/llfloaterenvsettings.h +++ b/indra/newview/llfloaterenvsettings.h @@ -78,9 +78,6 @@ public: /// open the advanced water settings menu static void onOpenAdvancedWater(void* userData); - /// submit windlight settings to the estate - static void onSubmitWindlight(void* userData); - /// sync time with the server static void onUseEstateTime(void* userData); diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 66c41cd7b..f7b27c18b 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -114,11 +114,11 @@ BOOL LLFloaterGesture::postBuild() setTitle(label); - LLScrollListCtrl* gesture_list = getChild("avatar_list"); + LLScrollListCtrl* gesture_list = getChild("gesture_list"); gesture_list->setCommitCallback(boost::bind(&LLFloaterGesture::onCommitList,this)); gesture_list->setDoubleClickCallback(boost::bind(&LLFloaterGesture::onClickPlay,this)); - childSetAction("inventory_btn", onClickInventory, this); + //childSetAction("inventory_btn", onClickInventory, this); childSetAction("edit_btn", onClickEdit, this); @@ -323,6 +323,7 @@ void LLFloaterGesture::buildGestureList() } } +/* // static void LLFloaterGesture::onClickInventory(void* data) { @@ -336,6 +337,7 @@ void LLFloaterGesture::onClickInventory(void* data) if (!inv) return; inv->getPanel()->setSelection(item_id, TRUE); } +*/ // static void LLFloaterGesture::onClickPlay(void* data) diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 19e1b3e2c..88fbc64e8 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -96,7 +96,6 @@ BOOL LLFloaterJoystick::postBuild() if (child) { LLRect r = child->getRect(); - LLRect f = getRect(); rect = LLRect(350, r.mTop, r.mRight + 200, 0); } diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 8ff747187..5bba956c3 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -729,7 +729,6 @@ void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit) void LLFloaterModelPreview::draw() { LLFloater::draw(); - LLRect r = getRect(); mModelPreview->update(); @@ -4934,14 +4933,8 @@ BOOL LLModelPreview::render() bool upload_skin = mFMP->childGetValue("upload_skin").asBoolean(); bool upload_joints = mFMP->childGetValue("upload_joints").asBoolean(); - bool resetJoints = false; - if (upload_joints != mLastJointUpdate) + if ( upload_joints != mLastJointUpdate ) { - if (mLastJointUpdate) - { - resetJoints = true; - } - mLastJointUpdate = upload_joints; } diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 5d6b771d5..ec9bf09b0 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -187,8 +187,8 @@ BOOL LLFloaterNotificationConsole::postBuild() getChild("add_notification")->setClickedCallback(onClickAdd, this); LLComboBox* notifications = getChild("notification_types"); - LLNotifications::TemplateNames names = LLNotifications::instance().getTemplateNames(); - for (LLNotifications::TemplateNames::iterator template_it = names.begin(); + LLNotificationTemplates::TemplateNames names = LLNotificationTemplates::instance().getTemplateNames(); + for (LLNotificationTemplates::TemplateNames::iterator template_it = names.begin(); template_it != names.end(); ++template_it) { diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp new file mode 100644 index 000000000..d5e7fc089 --- /dev/null +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -0,0 +1,323 @@ +/** +* @file llfloaterpathfindingcharacters.cpp +* @brief "Pathfinding characters" floater, allowing for identification of pathfinding characters and their cpu usage. +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, 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 "llfloaterpathfindingcharacters.h" + +/* Singu Note: Capsule doesn't seem to work without havok +#include + +#include "llcheckboxctrl.h" +#include "llfloaterpathfindingobjects.h" +#include "llhandle.h" +*/ +#include "llpathfindingcharacter.h" +#include "llpathfindingcharacterlist.h" +/* Singu Note: Capsule doesn't seem to work without havok +#include "llpathfindingmanager.h" +#include "llpathfindingobject.h" +#include "llpathfindingobjectlist.h" +#include "llpathinglib.h" +#include "llquaternion.h" +#include "llsd.h" +#include "llui.h" +#include "lluuid.h" +#include "llviewerobject.h" +#include "llviewerobjectlist.h" +#include "pipeline.h" +#include "v3math.h" +#include "v4color.h" +*/ +#include "lluictrlfactory.h" + +//--------------------------------------------------------------------------- +// LLFloaterPathfindingCharacters +//--------------------------------------------------------------------------- + +/* Singu Note: Capsule doesn't seem to work without havok +void LLFloaterPathfindingCharacters::onClose(bool pIsAppQuitting) +{ + // Hide any capsule that might be showing on floater close + hideCapsule(); + LLFloaterPathfindingObjects::onClose( pIsAppQuitting ); +} + +BOOL LLFloaterPathfindingCharacters::isShowPhysicsCapsule() const +{ + return mShowPhysicsCapsuleCheckBox->get(); +} + +void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule) +{ + mShowPhysicsCapsuleCheckBox->set(pIsShowPhysicsCapsule && (LLPathingLib::getInstance() != NULL)); +} + +BOOL LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const +{ + id = mSelectedCharacterId; + // Physics capsule is enable if the checkbox is enabled and if we can get the required render + // parameters for any selected object + return (isShowPhysicsCapsule() && getCapsuleRenderData(pos, rot )); +} +*/ + +void LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects() +{ + LLFloaterPathfindingCharacters* charactersFloater = getInstance(); + charactersFloater->showFloaterWithSelectionObjects(); +} + +LLFloaterPathfindingCharacters::LLFloaterPathfindingCharacters(const LLSD& pSeed) + : LLFloaterPathfindingObjects(/*pSeed*/), +// mShowPhysicsCapsuleCheckBox(NULL), + mSelectedCharacterId(), + mBeaconColor() +{ + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_pathfinding_characters.xml"); +} + +LLFloaterPathfindingCharacters::~LLFloaterPathfindingCharacters() +{ +} + +BOOL LLFloaterPathfindingCharacters::postBuild() +{ + mBeaconColor = LLUI::sColorsGroup->getColor("PathfindingCharacterBeaconColor"); + +/* Singu Note: Capsule doesn't seem to work without havok + mShowPhysicsCapsuleCheckBox = getChild("show_physics_capsule"); + llassert(mShowPhysicsCapsuleCheckBox != NULL); + mShowPhysicsCapsuleCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingCharacters::onShowPhysicsCapsuleClicked, this)); + mShowPhysicsCapsuleCheckBox->setEnabled(LLPathingLib::getInstance() != NULL); +*/ + + return LLFloaterPathfindingObjects::postBuild(); +} + +void LLFloaterPathfindingCharacters::requestGetObjects() +{ + LLPathfindingManager::getInstance()->requestGetCharacters(getNewRequestId(), boost::bind(&LLFloaterPathfindingCharacters::handleNewObjectList, this, _1, _2, _3)); +} + +void LLFloaterPathfindingCharacters::buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr) +{ + llassert(pObjectListPtr != NULL); + llassert(!pObjectListPtr->isEmpty()); + + for (LLPathfindingObjectList::const_iterator objectIter = pObjectListPtr->begin(); objectIter != pObjectListPtr->end(); ++objectIter) + { + const LLPathfindingObjectPtr objectPtr = objectIter->second; + const LLPathfindingCharacter *characterPtr = dynamic_cast(objectPtr.get()); + llassert(characterPtr != NULL); + + LLSD scrollListItemData = buildCharacterScrollListItemData(characterPtr); + addObjectToScrollList(objectPtr, scrollListItemData); + } +} + +/* Singu Note: Capsule doesn't seem to work without havok +void LLFloaterPathfindingCharacters::updateControlsOnScrollListChange() +{ + LLFloaterPathfindingObjects::updateControlsOnScrollListChange(); + updateStateOnDisplayControls(); + showSelectedCharacterCapsules(); +} +*/ + +S32 LLFloaterPathfindingCharacters::getNameColumnIndex() const +{ + return 0; +} + +S32 LLFloaterPathfindingCharacters::getOwnerNameColumnIndex() const +{ + return 2; +} + +std::string LLFloaterPathfindingCharacters::getOwnerName(const LLPathfindingObject *pObject) const +{ + return (pObject->hasOwner() + ? (pObject->hasOwnerName() + ? (pObject->isGroupOwned() + ? (pObject->getOwnerName() + " " + getString("character_owner_group")) + : pObject->getOwnerName()) + : getString("character_owner_loading")) + : getString("character_owner_unknown")); +} + +const LLColor4 &LLFloaterPathfindingCharacters::getBeaconColor() const +{ + return mBeaconColor; +} + +LLPathfindingObjectListPtr LLFloaterPathfindingCharacters::getEmptyObjectList() const +{ + LLPathfindingObjectListPtr objectListPtr(new LLPathfindingCharacterList()); + return objectListPtr; +} + +/* Singu Note: Capsule doesn't seem to work without havok +void LLFloaterPathfindingCharacters::onShowPhysicsCapsuleClicked() +{ + if (LLPathingLib::getInstance() == NULL) + { + if (isShowPhysicsCapsule()) + { + setShowPhysicsCapsule(FALSE); + } + } + else + { + if (mSelectedCharacterId.notNull() && isShowPhysicsCapsule()) + { + showCapsule(); + } + else + { + hideCapsule(); + } + } +} +*/ + +LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListItemData(const LLPathfindingCharacter *pCharacterPtr) const +{ + LLSD columns = LLSD::emptyArray(); + + columns[0]["column"] = "name"; + columns[0]["value"] = pCharacterPtr->getName(); + + columns[1]["column"] = "description"; + columns[1]["value"] = pCharacterPtr->getDescription(); + + columns[2]["column"] = "owner"; + columns[2]["value"] = getOwnerName(pCharacterPtr); + + S32 cpuTime = llround(pCharacterPtr->getCPUTime()); + std::string cpuTimeString = llformat("%d", cpuTime); + LLStringUtil::format_map_t string_args; + string_args["[CPU_TIME]"] = cpuTimeString; + + columns[3]["column"] = "cpu_time"; + columns[3]["value"] = getString("character_cpu_time", string_args); + + columns[4]["column"] = "altitude"; + columns[4]["value"] = llformat("%1.0f m", pCharacterPtr->getLocation()[2]); + + return columns; +} + +/* Singu Note: Capsule doesn't seem to work without havok +void LLFloaterPathfindingCharacters::updateStateOnDisplayControls() +{ + int numSelectedItems = getNumSelectedObjects();; + bool isEditEnabled = ((numSelectedItems == 1) && (LLPathingLib::getInstance() != NULL)); + + mShowPhysicsCapsuleCheckBox->setEnabled(isEditEnabled); + if (!isEditEnabled) + { + setShowPhysicsCapsule(FALSE); + } +} + +void LLFloaterPathfindingCharacters::showSelectedCharacterCapsules() +{ + // Hide any previous capsule + hideCapsule(); + + // Get the only selected object, or set the selected object to null if we do not have exactly + // one object selected + if (getNumSelectedObjects() == 1) + { + LLPathfindingObjectPtr selectedObjectPtr = getFirstSelectedObject(); + mSelectedCharacterId = selectedObjectPtr->getUUID(); + } + else + { + mSelectedCharacterId.setNull(); + } + + // Show any capsule if enabled + showCapsule(); +} + +void LLFloaterPathfindingCharacters::showCapsule() const +{ + if (mSelectedCharacterId.notNull() && isShowPhysicsCapsule()) + { + LLPathfindingObjectPtr objectPtr = getFirstSelectedObject(); + llassert(objectPtr != NULL); + if (objectPtr != NULL) + { + const LLPathfindingCharacter *character = dynamic_cast(objectPtr.get()); + llassert(mSelectedCharacterId == character->getUUID()); + if (LLPathingLib::getInstance() != NULL) + { + LLPathingLib::getInstance()->createPhysicsCapsuleRep(character->getLength(), character->getRadius(), + character->isHorizontal(), character->getUUID()); + } + } + + gPipeline.hideObject(mSelectedCharacterId); + } +} + +void LLFloaterPathfindingCharacters::hideCapsule() const +{ + if (mSelectedCharacterId.notNull()) + { + gPipeline.restoreHiddenObject(mSelectedCharacterId); + } + if (LLPathingLib::getInstance() != NULL) + { + LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals(); + } +} + +bool LLFloaterPathfindingCharacters::getCapsuleRenderData(LLVector3& pPosition, LLQuaternion& rot) const +{ + bool result = false; + + // If we have a selected object, find the object on the viewer object list and return its + // position. Else, return false indicating that we either do not have a selected object + // or we cannot find the selected object on the viewer object list + if (mSelectedCharacterId.notNull()) + { + LLViewerObject *viewerObject = gObjectList.findObject(mSelectedCharacterId); + if ( viewerObject != NULL ) + { + rot = viewerObject->getRotation() ; + pPosition = viewerObject->getRenderPosition(); + result = true; + } + } + + return result; +} +*/ diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h new file mode 100644 index 000000000..4d263603c --- /dev/null +++ b/indra/newview/llfloaterpathfindingcharacters.h @@ -0,0 +1,101 @@ +/** +* @file llfloaterpathfindingcharacters.h +* @brief "Pathfinding characters" floater, allowing for identification of pathfinding characters and their cpu usage. +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, 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_LLFLOATERPATHFINDINGCHARACTERS_H +#define LL_LLFLOATERPATHFINDINGCHARACTERS_H + +#include "llfloaterpathfindingobjects.h" +#include "llpathfindingobjectlist.h" +#include "lluuid.h" +#include "v4color.h" + +//class LLCheckBoxCtrl; +class LLPathfindingCharacter; +/* Singu Note: Capsule doesn't seem to work without havok +class LLQuaternion; +class LLSD; +class LLVector3; +*/ + +class LLFloaterPathfindingCharacters : public LLFloaterPathfindingObjects, public LLFloaterSingleton +{ +public: +/* Singu Note: Capsule doesn't seem to work without havok + virtual void onClose(bool pIsAppQuitting); + + BOOL isShowPhysicsCapsule() const; + void setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule); + + BOOL isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const; +*/ + + static void openCharactersWithSelectedObjects(); + + LLFloaterPathfindingCharacters(const LLSD& pSeed); + virtual ~LLFloaterPathfindingCharacters(); + +protected: +// friend class LLFloaterReg; + + virtual BOOL postBuild(); + + virtual void requestGetObjects(); + + virtual void buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr); + +// virtual void updateControlsOnScrollListChange(); + + virtual S32 getNameColumnIndex() const; + virtual S32 getOwnerNameColumnIndex() const; + virtual std::string getOwnerName(const LLPathfindingObject *pObject) const; + virtual const LLColor4 &getBeaconColor() const; + + virtual LLPathfindingObjectListPtr getEmptyObjectList() const; + +private: +// void onShowPhysicsCapsuleClicked(); + + + LLSD buildCharacterScrollListItemData(const LLPathfindingCharacter *pCharacterPtr) const; + +/* Singu Note: Capsule doesn't seem to work without havok + void updateStateOnDisplayControls(); + void showSelectedCharacterCapsules(); + + void showCapsule() const; + void hideCapsule() const; + + bool getCapsuleRenderData(LLVector3& pPosition, LLQuaternion& rot) const; + + LLCheckBoxCtrl *mShowPhysicsCapsuleCheckBox; +*/ + + LLUUID mSelectedCharacterId; + + LLColor4 mBeaconColor; +}; + +#endif // LL_LLFLOATERPATHFINDINGCHARACTERS_H diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp new file mode 100644 index 000000000..69b4bce60 --- /dev/null +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -0,0 +1,806 @@ +/** +* @file llfloaterpathfindinglinksets.cpp +* @brief "Pathfinding linksets" floater, allowing manipulation of the linksets on the current region. +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, 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 "llfloaterpathfindinglinksets.h" + +#include + +#include + +#include "llagent.h" +#include "llbutton.h" +#include "llcombobox.h" +#include "llfloaterpathfindingobjects.h" +#include "lllineeditor.h" +#include "llnotificationsutil.h" +#include "llpathfindinglinkset.h" +#include "llpathfindinglinksetlist.h" +#include "llpathfindingmanager.h" +#include "llscrolllistctrl.h" +#include "llsd.h" +#include "lltextbox.h" +#include "llui.h" +#include "lluictrlfactory.h" +#include "lluictrl.h" +#include "v3math.h" +#include "v4color.h" + +#define XUI_LINKSET_USE_NONE 0 +#define XUI_LINKSET_USE_WALKABLE 1 +#define XUI_LINKSET_USE_STATIC_OBSTACLE 2 +#define XUI_LINKSET_USE_DYNAMIC_OBSTACLE 3 +#define XUI_LINKSET_USE_MATERIAL_VOLUME 4 +#define XUI_LINKSET_USE_EXCLUSION_VOLUME 5 +#define XUI_LINKSET_USE_DYNAMIC_PHANTOM 6 + +//--------------------------------------------------------------------------- +// LLFloaterPathfindingLinksets +//--------------------------------------------------------------------------- + +void LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects() +{ + LLFloaterPathfindingLinksets* linksetsFloater = getInstance(); + linksetsFloater->clearFilters(); + linksetsFloater->showFloaterWithSelectionObjects(); +} + +LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed) + : LLFloaterPathfindingObjects(/*pSeed*/), + mFilterByName(NULL), + mFilterByDescription(NULL), + mFilterByLinksetUse(NULL), + mEditLinksetUse(NULL), + mEditLinksetUseWalkable(NULL), + mEditLinksetUseStaticObstacle(NULL), + mEditLinksetUseDynamicObstacle(NULL), + mEditLinksetUseMaterialVolume(NULL), + mEditLinksetUseExclusionVolume(NULL), + mEditLinksetUseDynamicPhantom(NULL), + mLabelWalkabilityCoefficients(NULL), + mLabelEditA(NULL), + mLabelSuggestedUseA(NULL), + mEditA(NULL), + mLabelEditB(NULL), + mLabelSuggestedUseB(NULL), + mEditB(NULL), + mLabelEditC(NULL), + mLabelSuggestedUseC(NULL), + mEditC(NULL), + mLabelEditD(NULL), + mLabelSuggestedUseD(NULL), + mEditD(NULL), + mApplyEditsButton(NULL), + mBeaconColor(), + mPreviousValueA(LLPathfindingLinkset::MAX_WALKABILITY_VALUE), + mPreviousValueB(LLPathfindingLinkset::MAX_WALKABILITY_VALUE), + mPreviousValueC(LLPathfindingLinkset::MAX_WALKABILITY_VALUE), + mPreviousValueD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE) +{ + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_pathfinding_linksets.xml"); +} + +LLFloaterPathfindingLinksets::~LLFloaterPathfindingLinksets() +{ +} + +BOOL LLFloaterPathfindingLinksets::postBuild() +{ + mBeaconColor = LLUI::sColorsGroup->getColor("PathfindingLinksetBeaconColor"); + + mFilterByName = getChild("filter_by_name"); + llassert(mFilterByName != NULL); + mFilterByName->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this)); + mFilterByName->setSelectAllonFocusReceived(true); + mFilterByName->setCommitOnFocusLost(true); + + mFilterByDescription = getChild("filter_by_description"); + llassert(mFilterByDescription != NULL); + mFilterByDescription->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this)); + mFilterByDescription->setSelectAllonFocusReceived(true); + mFilterByDescription->setCommitOnFocusLost(true); + + mFilterByLinksetUse = getChild("filter_by_linkset_use"); + llassert(mFilterByLinksetUse != NULL); + mFilterByLinksetUse->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this)); + + childSetAction("apply_filters", boost::bind(&LLFloaterPathfindingLinksets::onApplyAllFilters, this)); + childSetAction("clear_filters", boost::bind(&LLFloaterPathfindingLinksets::onClearFiltersClicked, this)); + + mEditLinksetUse = getChild("edit_linkset_use"); + llassert(mEditLinksetUse != NULL); + mEditLinksetUse->clearRows(); + + mEditLinksetUseUnset = mEditLinksetUse->add(getString("linkset_choose_use"), XUI_LINKSET_USE_NONE); + llassert(mEditLinksetUseUnset != NULL); + + mEditLinksetUseWalkable = mEditLinksetUse->add(getLinksetUseString(LLPathfindingLinkset::kWalkable), XUI_LINKSET_USE_WALKABLE); + llassert(mEditLinksetUseWalkable != NULL); + + mEditLinksetUseStaticObstacle = mEditLinksetUse->add(getLinksetUseString(LLPathfindingLinkset::kStaticObstacle), XUI_LINKSET_USE_STATIC_OBSTACLE); + llassert(mEditLinksetUseStaticObstacle != NULL); + + mEditLinksetUseDynamicObstacle = mEditLinksetUse->add(getLinksetUseString(LLPathfindingLinkset::kDynamicObstacle), XUI_LINKSET_USE_DYNAMIC_OBSTACLE); + llassert(mEditLinksetUseDynamicObstacle != NULL); + + mEditLinksetUseMaterialVolume = mEditLinksetUse->add(getLinksetUseString(LLPathfindingLinkset::kMaterialVolume), XUI_LINKSET_USE_MATERIAL_VOLUME); + llassert(mEditLinksetUseMaterialVolume != NULL); + + mEditLinksetUseExclusionVolume = mEditLinksetUse->add(getLinksetUseString(LLPathfindingLinkset::kExclusionVolume), XUI_LINKSET_USE_EXCLUSION_VOLUME); + llassert(mEditLinksetUseExclusionVolume != NULL); + + mEditLinksetUseDynamicPhantom = mEditLinksetUse->add(getLinksetUseString(LLPathfindingLinkset::kDynamicPhantom), XUI_LINKSET_USE_DYNAMIC_PHANTOM); + llassert(mEditLinksetUseDynamicPhantom != NULL); + + mEditLinksetUse->selectFirstItem(); + + mLabelWalkabilityCoefficients = getChild("walkability_coefficients_label"); + llassert(mLabelWalkabilityCoefficients != NULL); + + mLabelEditA = getChild("edit_a_label"); + llassert(mLabelEditA != NULL); + + mLabelSuggestedUseA = getChild("suggested_use_a_label"); + llassert(mLabelSuggestedUseA != NULL); + + mEditA = getChild("edit_a_value"); + llassert(mEditA != NULL); + mEditA->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32); + mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueA)); + + mLabelEditB = getChild("edit_b_label"); + llassert(mLabelEditB != NULL); + + mLabelSuggestedUseB = getChild("suggested_use_b_label"); + llassert(mLabelSuggestedUseB != NULL); + + mEditB = getChild("edit_b_value"); + llassert(mEditB != NULL); + mEditB->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32); + mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueB)); + + mLabelEditC = getChild("edit_c_label"); + llassert(mLabelEditC != NULL); + + mLabelSuggestedUseC = getChild("suggested_use_c_label"); + llassert(mLabelSuggestedUseC != NULL); + + mEditC = getChild("edit_c_value"); + llassert(mEditC != NULL); + mEditC->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32); + mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueC)); + + mLabelEditD = getChild("edit_d_label"); + llassert(mLabelEditD != NULL); + + mLabelSuggestedUseD = getChild("suggested_use_d_label"); + llassert(mLabelSuggestedUseD != NULL); + + mEditD = getChild("edit_d_value"); + llassert(mEditD != NULL); + mEditD->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32); + mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueD)); + + mApplyEditsButton = getChild("apply_edit_values"); + llassert(mApplyEditsButton != NULL); + mApplyEditsButton->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyChangesClicked, this)); + + return LLFloaterPathfindingObjects::postBuild(); +} + +void LLFloaterPathfindingLinksets::requestGetObjects() +{ + LLPathfindingManager::getInstance()->requestGetLinksets(getNewRequestId(), boost::bind(&LLFloaterPathfindingLinksets::handleNewObjectList, this, _1, _2, _3)); +} + +void LLFloaterPathfindingLinksets::buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr) +{ + llassert(pObjectListPtr != NULL); + llassert(!pObjectListPtr->isEmpty()); + + std::string nameFilter = mFilterByName->getText(); + std::string descriptionFilter = mFilterByDescription->getText(); + LLPathfindingLinkset::ELinksetUse linksetUseFilter = getFilterLinksetUse(); + bool isFilteringName = !nameFilter.empty(); + bool isFilteringDescription = !descriptionFilter.empty(); + bool isFilteringLinksetUse = (linksetUseFilter != LLPathfindingLinkset::kUnknown); + + const LLVector3& avatarPosition = gAgent.getPositionAgent(); + + if (isFilteringName || isFilteringDescription || isFilteringLinksetUse) + { + LLStringUtil::toUpper(nameFilter); + LLStringUtil::toUpper(descriptionFilter); + for (LLPathfindingObjectList::const_iterator objectIter = pObjectListPtr->begin(); objectIter != pObjectListPtr->end(); ++objectIter) + { + const LLPathfindingObjectPtr objectPtr = objectIter->second; + const LLPathfindingLinkset *linksetPtr = dynamic_cast(objectPtr.get()); + llassert(linksetPtr != NULL); + + std::string linksetName = (linksetPtr->isTerrain() ? getString("linkset_terrain_name") : linksetPtr->getName()); + std::string linksetDescription = linksetPtr->getDescription(); + LLStringUtil::toUpper(linksetName); + LLStringUtil::toUpper(linksetDescription); + + if ((!isFilteringName || (linksetName.find(nameFilter) != std::string::npos)) && + (!isFilteringDescription || (linksetDescription.find(descriptionFilter) != std::string::npos)) && + (!isFilteringLinksetUse || (linksetPtr->getLinksetUse() == linksetUseFilter))) + { + LLSD scrollListItemData = buildLinksetScrollListItemData(linksetPtr, avatarPosition); + addObjectToScrollList(objectPtr, scrollListItemData); + } + } + } + else + { + for (LLPathfindingObjectList::const_iterator objectIter = pObjectListPtr->begin(); objectIter != pObjectListPtr->end(); ++objectIter) + { + const LLPathfindingObjectPtr objectPtr = objectIter->second; + const LLPathfindingLinkset *linksetPtr = dynamic_cast(objectPtr.get()); + llassert(linksetPtr != NULL); + + LLSD scrollListItemData = buildLinksetScrollListItemData(linksetPtr, avatarPosition); + addObjectToScrollList(objectPtr, scrollListItemData); + } + } +} + +void LLFloaterPathfindingLinksets::updateControlsOnScrollListChange() +{ + LLFloaterPathfindingObjects::updateControlsOnScrollListChange(); + updateEditFieldValues(); + updateStateOnEditFields(); + updateStateOnEditLinksetUse(); +} + +S32 LLFloaterPathfindingLinksets::getNameColumnIndex() const +{ + return 0; +} + +S32 LLFloaterPathfindingLinksets::getOwnerNameColumnIndex() const +{ + return 2; +} + +std::string LLFloaterPathfindingLinksets::getOwnerName(const LLPathfindingObject *pObject) const +{ + return (pObject->hasOwner() + ? (pObject->hasOwnerName() + ? (pObject->isGroupOwned() + ? (pObject->getOwnerName() + " " + getString("linkset_owner_group")) + : pObject->getOwnerName()) + : getString("linkset_owner_loading")) + : getString("linkset_owner_unknown")); +} + +const LLColor4 &LLFloaterPathfindingLinksets::getBeaconColor() const +{ + return mBeaconColor; +} + +LLPathfindingObjectListPtr LLFloaterPathfindingLinksets::getEmptyObjectList() const +{ + LLPathfindingObjectListPtr objectListPtr(new LLPathfindingLinksetList()); + return objectListPtr; +} + +void LLFloaterPathfindingLinksets::requestSetLinksets(LLPathfindingObjectListPtr pLinksetList, LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) +{ + LLPathfindingManager::getInstance()->requestSetLinksets(getNewRequestId(), pLinksetList, pLinksetUse, pA, pB, pC, pD, boost::bind(&LLFloaterPathfindingLinksets::handleUpdateObjectList, this, _1, _2, _3)); +} + +void LLFloaterPathfindingLinksets::onApplyAllFilters() +{ + rebuildObjectsScrollList(); +} + +void LLFloaterPathfindingLinksets::onClearFiltersClicked() +{ + clearFilters(); + rebuildObjectsScrollList(); +} + +void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue) +{ + LLLineEditor *pLineEditor = static_cast(pUICtrl); + llassert(pLineEditor != NULL); + + const std::string &valueString = pLineEditor->getText(); + + S32 intValue; + LLSD value; + bool doResetValue = false; + + if (valueString.empty()) + { + value = pPreviousValue; + doResetValue = true; + } + else if (LLStringUtil::convertToS32(valueString, intValue)) + { + doResetValue = ((intValue < LLPathfindingLinkset::MIN_WALKABILITY_VALUE) || (intValue > LLPathfindingLinkset::MAX_WALKABILITY_VALUE)); + value = LLSD(llclamp(intValue, LLPathfindingLinkset::MIN_WALKABILITY_VALUE, LLPathfindingLinkset::MAX_WALKABILITY_VALUE)); + } + else + { + value = LLSD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE); + doResetValue = true; + } + + if (doResetValue) + { + pLineEditor->setValue(value); + } + pPreviousValue = value; +} + +void LLFloaterPathfindingLinksets::onApplyChangesClicked() +{ + applyEdit(); +} + +void LLFloaterPathfindingLinksets::clearFilters() +{ + mFilterByName->clear(); + mFilterByDescription->clear(); + setFilterLinksetUse(LLPathfindingLinkset::kUnknown); +} + +void LLFloaterPathfindingLinksets::updateEditFieldValues() +{ + int numSelectedObjects = getNumSelectedObjects(); + if (numSelectedObjects <= 0) + { + mEditLinksetUse->selectFirstItem(); + mEditA->clear(); + mEditB->clear(); + mEditC->clear(); + mEditD->clear(); + } + else + { + LLPathfindingObjectPtr firstSelectedObjectPtr = getFirstSelectedObject(); + llassert(firstSelectedObjectPtr != NULL); + + const LLPathfindingLinkset *linkset = dynamic_cast(firstSelectedObjectPtr.get()); + + setEditLinksetUse(linkset->getLinksetUse()); + mPreviousValueA = LLSD(linkset->getWalkabilityCoefficientA()); + mPreviousValueB = LLSD(linkset->getWalkabilityCoefficientB()); + mPreviousValueC = LLSD(linkset->getWalkabilityCoefficientC()); + mPreviousValueD = LLSD(linkset->getWalkabilityCoefficientD()); + mEditA->setValue(mPreviousValueA); + mEditB->setValue(mPreviousValueB); + mEditC->setValue(mPreviousValueC); + mEditD->setValue(mPreviousValueD); + } +} + +LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListItemData(const LLPathfindingLinkset *pLinksetPtr, const LLVector3 &pAvatarPosition) const +{ + llassert(pLinksetPtr != NULL); + LLSD columns = LLSD::emptyArray(); + + if (pLinksetPtr->isTerrain()) + { + columns[0]["column"] = "name"; + columns[0]["value"] = getString("linkset_terrain_name"); + + columns[1]["column"] = "description"; + columns[1]["value"] = getString("linkset_terrain_description"); + + columns[2]["column"] = "owner"; + columns[2]["value"] = getString("linkset_terrain_owner"); + + columns[3]["column"] = "scripted"; + columns[3]["value"] = getString("linkset_terrain_scripted"); + + columns[4]["column"] = "land_impact"; + columns[4]["value"] = getString("linkset_terrain_land_impact"); + + columns[5]["column"] = "dist_from_you"; + columns[5]["value"] = getString("linkset_terrain_dist_from_you"); + } + else + { + columns[0]["column"] = "name"; + columns[0]["value"] = pLinksetPtr->getName(); + + columns[1]["column"] = "description"; + columns[1]["value"] = pLinksetPtr->getDescription(); + + columns[2]["column"] = "owner"; + columns[2]["value"] = getOwnerName(pLinksetPtr); + + columns[3]["column"] = "scripted"; + columns[3]["value"] = (pLinksetPtr->hasIsScripted() + ? (pLinksetPtr->isScripted() + ? getString("linkset_is_scripted") + : getString("linkset_is_not_scripted")) + : getString("linkset_is_unknown_scripted")); + + columns[4]["column"] = "land_impact"; + columns[4]["value"] = llformat("%1d", pLinksetPtr->getLandImpact()); + + columns[5]["column"] = "dist_from_you"; + columns[5]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation())); + } + + columns[6]["column"] = "linkset_use"; + std::string linksetUse = getLinksetUseString(pLinksetPtr->getLinksetUse()); + if (pLinksetPtr->isTerrain()) + { + linksetUse += (" " + getString("linkset_is_terrain")); + } + else if (!pLinksetPtr->isModifiable() && pLinksetPtr->canBeVolume()) + { + linksetUse += (" " + getString("linkset_is_restricted_state")); + } + else if (pLinksetPtr->isModifiable() && !pLinksetPtr->canBeVolume()) + { + linksetUse += (" " + getString("linkset_is_non_volume_state")); + } + else if (!pLinksetPtr->isModifiable() && !pLinksetPtr->canBeVolume()) + { + linksetUse += (" " + getString("linkset_is_restricted_non_volume_state")); + } + columns[6]["value"] = linksetUse; + + columns[7]["column"] = "a_percent"; + columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA()); + + columns[8]["column"] = "b_percent"; + columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB()); + + columns[9]["column"] = "c_percent"; + columns[9]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC()); + + columns[10]["column"] = "d_percent"; + columns[10]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD()); + + return columns; +} + +/* Singu-Note: Unused function +LLSD LLFloaterPathfindingLinksets::buildLinksetUseScrollListData(const std::string &pLabel, S32 pValue) const +{ + LLSD columns; + + columns[0]["column"] = "name"; + columns[0]["value"] = pLabel; + columns[0]["font"] = "SANSSERIF"; + + LLSD element; + element["value"] = pValue; + element["column"] = columns; + + return element; +} +*/ + +bool LLFloaterPathfindingLinksets::isShowUnmodifiablePhantomWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const +{ + bool isShowWarning = false; + + if (pLinksetUse != LLPathfindingLinkset::kUnknown) + { + LLPathfindingObjectListPtr selectedObjects = getSelectedObjects(); + if ((selectedObjects != NULL) && !selectedObjects->isEmpty()) + { + const LLPathfindingLinksetList *linksetList = dynamic_cast(selectedObjects.get()); + isShowWarning = linksetList->isShowUnmodifiablePhantomWarning(pLinksetUse); + } + } + + return isShowWarning; +} + +bool LLFloaterPathfindingLinksets::isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const +{ + bool isShowWarning = false; + + if (pLinksetUse != LLPathfindingLinkset::kUnknown) + { + LLPathfindingObjectListPtr selectedObjects = getSelectedObjects(); + if ((selectedObjects != NULL) && !selectedObjects->isEmpty()) + { + const LLPathfindingLinksetList *linksetList = dynamic_cast(selectedObjects.get()); + isShowWarning = linksetList->isShowPhantomToggleWarning(pLinksetUse); + } + } + + return isShowWarning; +} + +bool LLFloaterPathfindingLinksets::isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const +{ + bool isShowWarning = false; + + if (pLinksetUse != LLPathfindingLinkset::kUnknown) + { + LLPathfindingObjectListPtr selectedObjects = getSelectedObjects(); + if ((selectedObjects != NULL) && !selectedObjects->isEmpty()) + { + const LLPathfindingLinksetList *linksetList = dynamic_cast(selectedObjects.get()); + isShowWarning = linksetList->isShowCannotBeVolumeWarning(pLinksetUse); + } + } + + return isShowWarning; +} + +void LLFloaterPathfindingLinksets::updateStateOnEditFields() +{ + int numSelectedItems = getNumSelectedObjects(); + bool isEditEnabled = (numSelectedItems > 0); + + mEditLinksetUse->setEnabled(isEditEnabled); + + mLabelWalkabilityCoefficients->setEnabled(isEditEnabled); + mLabelEditA->setEnabled(isEditEnabled); + mLabelEditB->setEnabled(isEditEnabled); + mLabelEditC->setEnabled(isEditEnabled); + mLabelEditD->setEnabled(isEditEnabled); + mLabelSuggestedUseA->setEnabled(isEditEnabled); + mLabelSuggestedUseB->setEnabled(isEditEnabled); + mLabelSuggestedUseC->setEnabled(isEditEnabled); + mLabelSuggestedUseD->setEnabled(isEditEnabled); + mEditA->setEnabled(isEditEnabled); + mEditB->setEnabled(isEditEnabled); + mEditC->setEnabled(isEditEnabled); + mEditD->setEnabled(isEditEnabled); + + mApplyEditsButton->setEnabled(isEditEnabled && (getMessagingState() == kMessagingComplete)); +} + +void LLFloaterPathfindingLinksets::updateStateOnEditLinksetUse() +{ + BOOL useWalkable = FALSE; + BOOL useStaticObstacle = FALSE; + BOOL useDynamicObstacle = FALSE; + BOOL useMaterialVolume = FALSE; + BOOL useExclusionVolume = FALSE; + BOOL useDynamicPhantom = FALSE; + + LLPathfindingObjectListPtr selectedObjects = getSelectedObjects(); + if ((selectedObjects != NULL) && !selectedObjects->isEmpty()) + { + const LLPathfindingLinksetList *linksetList = dynamic_cast(selectedObjects.get()); + linksetList->determinePossibleStates(useWalkable, useStaticObstacle, useDynamicObstacle, useMaterialVolume, useExclusionVolume, useDynamicPhantom); + } + + mEditLinksetUseWalkable->setEnabled(useWalkable); + mEditLinksetUseStaticObstacle->setEnabled(useStaticObstacle); + mEditLinksetUseDynamicObstacle->setEnabled(useDynamicObstacle); + mEditLinksetUseMaterialVolume->setEnabled(useMaterialVolume); + mEditLinksetUseExclusionVolume->setEnabled(useExclusionVolume); + mEditLinksetUseDynamicPhantom->setEnabled(useDynamicPhantom); +} + +void LLFloaterPathfindingLinksets::applyEdit() +{ + LLPathfindingLinkset::ELinksetUse linksetUse = getEditLinksetUse(); + + bool showPhantomToggleWarning = isShowPhantomToggleWarning(linksetUse); + bool showUnmodifiablePhantomWarning = isShowUnmodifiablePhantomWarning(linksetUse); + bool showCannotBeVolumeWarning = isShowCannotBeVolumeWarning(linksetUse); + + if (showPhantomToggleWarning || showUnmodifiablePhantomWarning || showCannotBeVolumeWarning) + { + LLPathfindingLinkset::ELinksetUse restrictedLinksetUse = LLPathfindingLinkset::getLinksetUseWithToggledPhantom(linksetUse); + LLSD substitutions; + substitutions["REQUESTED_TYPE"] = getLinksetUseString(linksetUse); + substitutions["RESTRICTED_TYPE"] = getLinksetUseString(restrictedLinksetUse); + + // Build one of the following notifications names + // - PathfindingLinksets_WarnOnPhantom + // - PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted + // - PathfindingLinksets_WarnOnPhantom_MismatchOnVolume + // - PathfindingLinksets_WarnOnPhantom_MismatchOnRestricted_MismatchOnVolume + // - PathfindingLinksets_MismatchOnRestricted + // - PathfindingLinksets_MismatchOnVolume + // - PathfindingLinksets_MismatchOnRestricted_MismatchOnVolume + + std::string notificationName = "PathfindingLinksets"; + + if (showPhantomToggleWarning) + { + notificationName += "_WarnOnPhantom"; + } + if (showUnmodifiablePhantomWarning) + { + notificationName += "_MismatchOnRestricted"; + } + if (showCannotBeVolumeWarning) + { + notificationName += "_MismatchOnVolume"; + } + + LLNotificationsUtil::add(notificationName, substitutions, LLSD(), boost::bind(&LLFloaterPathfindingLinksets::handleApplyEdit, this, _1, _2)); + } + else + { + doApplyEdit(); + } +} + +void LLFloaterPathfindingLinksets::handleApplyEdit(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + doApplyEdit(); + } +} + +void LLFloaterPathfindingLinksets::doApplyEdit() +{ + LLPathfindingObjectListPtr selectedObjects = getSelectedObjects(); + if ((selectedObjects != NULL) && !selectedObjects->isEmpty()) + { + LLPathfindingLinkset::ELinksetUse linksetUse = getEditLinksetUse(); + const std::string &aString = mEditA->getText(); + const std::string &bString = mEditB->getText(); + const std::string &cString = mEditC->getText(); + const std::string &dString = mEditD->getText(); + S32 aValue = static_cast(atoi(aString.c_str())); + S32 bValue = static_cast(atoi(bString.c_str())); + S32 cValue = static_cast(atoi(cString.c_str())); + S32 dValue = static_cast(atoi(dString.c_str())); + + + requestSetLinksets(selectedObjects, linksetUse, aValue, bValue, cValue, dValue); + } +} + +std::string LLFloaterPathfindingLinksets::getLinksetUseString(LLPathfindingLinkset::ELinksetUse pLinksetUse) const +{ + std::string linksetUse; + + switch (pLinksetUse) + { + case LLPathfindingLinkset::kWalkable : + linksetUse = getString("linkset_use_walkable"); + break; + case LLPathfindingLinkset::kStaticObstacle : + linksetUse = getString("linkset_use_static_obstacle"); + break; + case LLPathfindingLinkset::kDynamicObstacle : + linksetUse = getString("linkset_use_dynamic_obstacle"); + break; + case LLPathfindingLinkset::kMaterialVolume : + linksetUse = getString("linkset_use_material_volume"); + break; + case LLPathfindingLinkset::kExclusionVolume : + linksetUse = getString("linkset_use_exclusion_volume"); + break; + case LLPathfindingLinkset::kDynamicPhantom : + linksetUse = getString("linkset_use_dynamic_phantom"); + break; + case LLPathfindingLinkset::kUnknown : + default : + linksetUse = getString("linkset_use_dynamic_obstacle"); + llassert(0); + break; + } + + return linksetUse; +} + +LLPathfindingLinkset::ELinksetUse LLFloaterPathfindingLinksets::getFilterLinksetUse() const +{ + return convertToLinksetUse(mFilterByLinksetUse->getValue()); +} + +void LLFloaterPathfindingLinksets::setFilterLinksetUse(LLPathfindingLinkset::ELinksetUse pLinksetUse) +{ + mFilterByLinksetUse->setValue(convertToXuiValue(pLinksetUse)); +} + +LLPathfindingLinkset::ELinksetUse LLFloaterPathfindingLinksets::getEditLinksetUse() const +{ + return convertToLinksetUse(mEditLinksetUse->getValue()); +} + +void LLFloaterPathfindingLinksets::setEditLinksetUse(LLPathfindingLinkset::ELinksetUse pLinksetUse) +{ + mEditLinksetUse->setValue(convertToXuiValue(pLinksetUse)); +} + +LLPathfindingLinkset::ELinksetUse LLFloaterPathfindingLinksets::convertToLinksetUse(LLSD pXuiValue) const +{ + LLPathfindingLinkset::ELinksetUse linkUse; + + switch (pXuiValue.asInteger()) + { + case XUI_LINKSET_USE_NONE : + linkUse = LLPathfindingLinkset::kUnknown; + break; + case XUI_LINKSET_USE_WALKABLE : + linkUse = LLPathfindingLinkset::kWalkable; + break; + case XUI_LINKSET_USE_STATIC_OBSTACLE : + linkUse = LLPathfindingLinkset::kStaticObstacle; + break; + case XUI_LINKSET_USE_DYNAMIC_OBSTACLE : + linkUse = LLPathfindingLinkset::kDynamicObstacle; + break; + case XUI_LINKSET_USE_MATERIAL_VOLUME : + linkUse = LLPathfindingLinkset::kMaterialVolume; + break; + case XUI_LINKSET_USE_EXCLUSION_VOLUME : + linkUse = LLPathfindingLinkset::kExclusionVolume; + break; + case XUI_LINKSET_USE_DYNAMIC_PHANTOM : + linkUse = LLPathfindingLinkset::kDynamicPhantom; + break; + default : + linkUse = LLPathfindingLinkset::kUnknown; + llassert(0); + break; + } + + return linkUse; +} + +LLSD LLFloaterPathfindingLinksets::convertToXuiValue(LLPathfindingLinkset::ELinksetUse pLinksetUse) const +{ + LLSD xuiValue; + + switch (pLinksetUse) + { + case LLPathfindingLinkset::kUnknown : + xuiValue = XUI_LINKSET_USE_NONE; + break; + case LLPathfindingLinkset::kWalkable : + xuiValue = XUI_LINKSET_USE_WALKABLE; + break; + case LLPathfindingLinkset::kStaticObstacle : + xuiValue = XUI_LINKSET_USE_STATIC_OBSTACLE; + break; + case LLPathfindingLinkset::kDynamicObstacle : + xuiValue = XUI_LINKSET_USE_DYNAMIC_OBSTACLE; + break; + case LLPathfindingLinkset::kMaterialVolume : + xuiValue = XUI_LINKSET_USE_MATERIAL_VOLUME; + break; + case LLPathfindingLinkset::kExclusionVolume : + xuiValue = XUI_LINKSET_USE_EXCLUSION_VOLUME; + break; + case LLPathfindingLinkset::kDynamicPhantom : + xuiValue = XUI_LINKSET_USE_DYNAMIC_PHANTOM; + break; + default : + xuiValue = XUI_LINKSET_USE_NONE; + llassert(0); + break; + } + + return xuiValue; +} diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h new file mode 100644 index 000000000..519ce8294 --- /dev/null +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -0,0 +1,142 @@ +/** +* @file llfloaterpathfindinglinksets.h +* @brief "Pathfinding linksets" floater, allowing manipulation of the linksets on the current region. +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, 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_LLFLOATERPATHFINDINGLINKSETS_H +#define LL_LLFLOATERPATHFINDINGLINKSETS_H + +#include + +#include "llfloaterpathfindingobjects.h" +#include "llpathfindinglinkset.h" +#include "llpathfindingobjectlist.h" +#include "v4color.h" + +class LLButton; +class LLComboBox; +class LLLineEditor; +class LLScrollListItem; +class LLSD; +class LLTextBox; +class LLUICtrl; +class LLVector3; + +class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects, public LLFloaterSingleton +{ +public: + static void openLinksetsWithSelectedObjects(); + + LLFloaterPathfindingLinksets(const LLSD& pSeed); + virtual ~LLFloaterPathfindingLinksets(); + +protected: +// friend class LLFloaterReg; + + virtual BOOL postBuild(); + + virtual void requestGetObjects(); + + virtual void buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr); + + virtual void updateControlsOnScrollListChange(); + + virtual S32 getNameColumnIndex() const; + virtual S32 getOwnerNameColumnIndex() const; + virtual std::string getOwnerName(const LLPathfindingObject *pObject) const; + virtual const LLColor4 &getBeaconColor() const; + + virtual LLPathfindingObjectListPtr getEmptyObjectList() const; + +private: + void requestSetLinksets(LLPathfindingObjectListPtr pLinksetList, LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD); + + void onApplyAllFilters(); + void onClearFiltersClicked(); + void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue); + void onApplyChangesClicked(); + + void clearFilters(); + + void updateEditFieldValues(); + LLSD buildLinksetScrollListItemData(const LLPathfindingLinkset *pLinksetPtr, const LLVector3 &pAvatarPosition) const; + LLSD buildLinksetUseScrollListData(const std::string &pLabel, S32 pValue) const; + + bool isShowUnmodifiablePhantomWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const; + bool isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const; + bool isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const; + + void updateStateOnEditFields(); + void updateStateOnEditLinksetUse(); + + void applyEdit(); + void handleApplyEdit(const LLSD &pNotification, const LLSD &pResponse); + void doApplyEdit(); + + std::string getLinksetUseString(LLPathfindingLinkset::ELinksetUse pLinksetUse) const; + + LLPathfindingLinkset::ELinksetUse getFilterLinksetUse() const; + void setFilterLinksetUse(LLPathfindingLinkset::ELinksetUse pLinksetUse); + + LLPathfindingLinkset::ELinksetUse getEditLinksetUse() const; + void setEditLinksetUse(LLPathfindingLinkset::ELinksetUse pLinksetUse); + + LLPathfindingLinkset::ELinksetUse convertToLinksetUse(LLSD pXuiValue) const; + LLSD convertToXuiValue(LLPathfindingLinkset::ELinksetUse pLinksetUse) const; + + LLLineEditor *mFilterByName; + LLLineEditor *mFilterByDescription; + LLComboBox *mFilterByLinksetUse; + LLComboBox *mEditLinksetUse; + LLScrollListItem *mEditLinksetUseUnset; + LLScrollListItem *mEditLinksetUseWalkable; + LLScrollListItem *mEditLinksetUseStaticObstacle; + LLScrollListItem *mEditLinksetUseDynamicObstacle; + LLScrollListItem *mEditLinksetUseMaterialVolume; + LLScrollListItem *mEditLinksetUseExclusionVolume; + LLScrollListItem *mEditLinksetUseDynamicPhantom; + LLTextBox *mLabelWalkabilityCoefficients; + LLTextBox *mLabelEditA; + LLTextBox *mLabelSuggestedUseA; + LLLineEditor *mEditA; + LLTextBox *mLabelEditB; + LLTextBox *mLabelSuggestedUseB; + LLLineEditor *mEditB; + LLTextBox *mLabelEditC; + LLTextBox *mLabelSuggestedUseC; + LLLineEditor *mEditC; + LLTextBox *mLabelEditD; + LLTextBox *mLabelSuggestedUseD; + LLLineEditor *mEditD; + LLButton *mApplyEditsButton; + + LLColor4 mBeaconColor; + + LLSD mPreviousValueA; + LLSD mPreviousValueB; + LLSD mPreviousValueC; + LLSD mPreviousValueD; +}; + +#endif // LL_LLFLOATERPATHFINDINGLINKSETS_H diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp new file mode 100644 index 000000000..017278719 --- /dev/null +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -0,0 +1,878 @@ +/** +* @file llfloaterpathfindingobjects.cpp +* @brief Base class for both the pathfinding linksets and characters floater. +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, 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 "llfloaterpathfindingobjects.h" + +#include +#include +#include + +#include +#include + +#include "llagent.h" +#include "llavatarname.h" +#include "llavatarnamecache.h" +#include "llbutton.h" +#include "llcheckboxctrl.h" +#include "llenvmanager.h" +#include "llfloater.h" +#include "llfontgl.h" +#include "llnotifications.h" +#include "llnotificationsutil.h" +#include "llpathfindingmanager.h" +#include "llresmgr.h" +#include "llscrolllistctrl.h" +#include "llselectmgr.h" +#include "llsd.h" +#include "llstring.h" +#include "llstyle.h" +#include "lltextbox.h" +#include "llui.h" +#include "llviewermenu.h" +#include "llviewerobject.h" +#include "llviewerobjectlist.h" +#include "llviewerregion.h" +#include "v3dmath.h" +#include "v3math.h" +#include "v4color.h" + +#define DEFAULT_BEACON_WIDTH 6 + +//--------------------------------------------------------------------------- +// LLFloaterPathfindingObjects +//--------------------------------------------------------------------------- + +void LLFloaterPathfindingObjects::onOpen(/*const LLSD &pKey*/) +{ + LLFloater::onOpen(/*pKey*/); + + //selectNoneObjects(); // Singu Note: We call this onClose, we shouldn't need to call this onOpen, in fact this call causes opening with selection to fail + mObjectsScrollList->setCommitOnSelectionChange(TRUE); + + if (!mSelectionUpdateSlot.connected()) + { + mSelectionUpdateSlot = LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterPathfindingObjects::onInWorldSelectionListChanged, this)); + } + + if (!mRegionBoundaryCrossingSlot.connected()) + { + mRegionBoundaryCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLFloaterPathfindingObjects::onRegionBoundaryCrossed, this)); + } + + if (!mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot = gAgent.registerGodLevelChanageListener(boost::bind(&LLFloaterPathfindingObjects::onGodLevelChange, this, _1)); + } + + requestGetObjects(); +} + +void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting) +{ + if (mGodLevelChangeSlot.connected()) + { + mGodLevelChangeSlot.disconnect(); + } + + if (mRegionBoundaryCrossingSlot.connected()) + { + mRegionBoundaryCrossingSlot.disconnect(); + } + + if (mSelectionUpdateSlot.connected()) + { + mSelectionUpdateSlot.disconnect(); + } + + mObjectsScrollList->setCommitOnSelectionChange(FALSE); + selectNoneObjects(); + + if (mObjectsSelection.notNull()) + { + mObjectsSelection.clear(); + } + + if (pIsAppQuitting) + { + //clearAllObjects(); + destroy(); + } + else + { + setVisible(false); + } +} + +void LLFloaterPathfindingObjects::draw() +{ + LLFloater::draw(); + + if (isShowBeacons()) + { + std::vector selectedItems = mObjectsScrollList->getAllSelected(); + if (!selectedItems.empty()) + { + int numSelectedItems = selectedItems.size(); + S32 nameColumnIndex = getNameColumnIndex(); + const LLColor4 &beaconColor = getBeaconColor(); + const LLColor4 &beaconTextColor = getBeaconTextColor(); + S32 beaconWidth = getBeaconWidth(); + + std::vector viewerObjects; + viewerObjects.reserve(numSelectedItems); + + for (std::vector::const_iterator selectedItemIter = selectedItems.begin(); + selectedItemIter != selectedItems.end(); ++selectedItemIter) + { + const LLScrollListItem *selectedItem = *selectedItemIter; + + LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID()); + if (viewerObject != NULL) + { + const std::string &objectName = selectedItem->getColumn(nameColumnIndex)->getValue().asString(); + gObjectList.addDebugBeacon(viewerObject->getPositionAgent(), objectName, beaconColor, beaconTextColor, beaconWidth); + } + } + } + } +} + +LLFloaterPathfindingObjects::LLFloaterPathfindingObjects(/*const LLSD &pSeed*/) + : LLFloater(/*pSeed*/), + mObjectsScrollList(NULL), + mMessagingStatus(NULL), + mRefreshListButton(NULL), + mSelectAllButton(NULL), + mSelectNoneButton(NULL), + mShowBeaconCheckBox(NULL), + mTakeButton(NULL), + mTakeCopyButton(NULL), + mReturnButton(NULL), + mDeleteButton(NULL), + mTeleportButton(NULL), + mDefaultBeaconColor(), + mDefaultBeaconTextColor(), + mErrorTextColor(), + mWarningTextColor(), + mMessagingState(kMessagingUnknown), + mMessagingRequestId(0U), + mMissingNameObjectsScrollListItems(), + mObjectList(), + mObjectsSelection(), + mHasObjectsToBeSelected(false), + mObjectsToBeSelected(), + mSelectionUpdateSlot(), + mRegionBoundaryCrossingSlot() +{ +} + +LLFloaterPathfindingObjects::~LLFloaterPathfindingObjects() +{ + clearAllObjects(); +} + +BOOL LLFloaterPathfindingObjects::postBuild() +{ + mDefaultBeaconColor = LLUI::sColorsGroup->getColor("PathfindingDefaultBeaconColor"); + mDefaultBeaconTextColor = LLUI::sColorsGroup->getColor("PathfindingDefaultBeaconTextColor"); + mErrorTextColor = LLUI::sColorsGroup->getColor("PathfindingErrorColor"); + mWarningTextColor = LLUI::sColorsGroup->getColor("PathfindingWarningColor"); + + mObjectsScrollList = getChild("objects_scroll_list"); + llassert(mObjectsScrollList != NULL); + mObjectsScrollList->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onScrollListSelectionChanged, this)); + mObjectsScrollList->sortByColumnIndex(static_cast(getNameColumnIndex()), TRUE); + + mMessagingStatus = getChild("messaging_status"); + llassert(mMessagingStatus != NULL); + + mRefreshListButton = getChild("refresh_objects_list"); + llassert(mRefreshListButton != NULL); + mRefreshListButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onRefreshObjectsClicked, this)); + + mSelectAllButton = getChild("select_all_objects"); + llassert(mSelectAllButton != NULL); + mSelectAllButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onSelectAllObjectsClicked, this)); + + mSelectNoneButton = getChild("select_none_objects"); + llassert(mSelectNoneButton != NULL); + mSelectNoneButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onSelectNoneObjectsClicked, this)); + + mShowBeaconCheckBox = getChild("show_beacon"); + llassert(mShowBeaconCheckBox != NULL); + + mTakeButton = getChild("take_objects"); + llassert(mTakeButton != NULL); + mTakeButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onTakeClicked, this)); + + mTakeCopyButton = getChild("take_copy_objects"); + llassert(mTakeCopyButton != NULL); + mTakeCopyButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onTakeCopyClicked, this)); + + mReturnButton = getChild("return_objects"); + llassert(mReturnButton != NULL); + mReturnButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onReturnClicked, this)); + + mDeleteButton = getChild("delete_objects"); + llassert(mDeleteButton != NULL); + mDeleteButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onDeleteClicked, this)); + + mTeleportButton = getChild("teleport_me_to_object"); + llassert(mTeleportButton != NULL); + mTeleportButton->setCommitCallback(boost::bind(&LLFloaterPathfindingObjects::onTeleportClicked, this)); + + return LLFloater::postBuild(); +} + +void LLFloaterPathfindingObjects::requestGetObjects() +{ + llassert(0); +} + +LLPathfindingManager::request_id_t LLFloaterPathfindingObjects::getNewRequestId() +{ + return ++mMessagingRequestId; +} + +void LLFloaterPathfindingObjects::handleNewObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList) +{ + llassert(pRequestId <= mMessagingRequestId); + if (pRequestId == mMessagingRequestId) + { + switch (pRequestStatus) + { + case LLPathfindingManager::kRequestStarted : + setMessagingState(kMessagingGetRequestSent); + break; + case LLPathfindingManager::kRequestCompleted : + mObjectList = pObjectList; + rebuildObjectsScrollList(); + setMessagingState(kMessagingComplete); + break; + case LLPathfindingManager::kRequestNotEnabled : + clearAllObjects(); + setMessagingState(kMessagingNotEnabled); + break; + case LLPathfindingManager::kRequestError : + clearAllObjects(); + setMessagingState(kMessagingGetError); + break; + default : + clearAllObjects(); + setMessagingState(kMessagingGetError); + llassert(0); + break; + } + } +} + +void LLFloaterPathfindingObjects::handleUpdateObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList) +{ + // We current assume that handleUpdateObjectList is called only when objects are being SET + llassert(pRequestId <= mMessagingRequestId); + if (pRequestId == mMessagingRequestId) + { + switch (pRequestStatus) + { + case LLPathfindingManager::kRequestStarted : + setMessagingState(kMessagingSetRequestSent); + break; + case LLPathfindingManager::kRequestCompleted : + if (mObjectList == NULL) + { + mObjectList = pObjectList; + } + else + { + mObjectList->update(pObjectList); + } + rebuildObjectsScrollList(); + setMessagingState(kMessagingComplete); + break; + case LLPathfindingManager::kRequestNotEnabled : + clearAllObjects(); + setMessagingState(kMessagingNotEnabled); + break; + case LLPathfindingManager::kRequestError : + clearAllObjects(); + setMessagingState(kMessagingSetError); + break; + default : + clearAllObjects(); + setMessagingState(kMessagingSetError); + llassert(0); + break; + } + } +} + +void LLFloaterPathfindingObjects::rebuildObjectsScrollList() +{ + if (!mHasObjectsToBeSelected) + { + std::vector selectedItems = mObjectsScrollList->getAllSelected(); + int numSelectedItems = selectedItems.size(); + if (numSelectedItems > 0) + { + mObjectsToBeSelected.reserve(selectedItems.size()); + for (std::vector::const_iterator itemIter = selectedItems.begin(); + itemIter != selectedItems.end(); ++itemIter) + { + const LLScrollListItem *listItem = *itemIter; + mObjectsToBeSelected.push_back(listItem->getUUID()); + } + } + } + + S32 origScrollPosition = mObjectsScrollList->getScrollPos(); + mObjectsScrollList->deleteAllItems(); + mMissingNameObjectsScrollListItems.clear(); + + if ((mObjectList != NULL) && !mObjectList->isEmpty()) + { + buildObjectsScrollList(mObjectList); + + mObjectsScrollList->selectMultiple(mObjectsToBeSelected); + if (mHasObjectsToBeSelected) + { + mObjectsScrollList->scrollToShowSelected(); + } + else + { + mObjectsScrollList->setScrollPos(origScrollPosition); + } + } + + mObjectsToBeSelected.clear(); + mHasObjectsToBeSelected = false; + + updateControlsOnScrollListChange(); +} + +void LLFloaterPathfindingObjects::buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr) +{ + llassert(0); +} + +void LLFloaterPathfindingObjects::addObjectToScrollList(const LLPathfindingObjectPtr pObjectPtr, const LLSD &pScrollListItemData) +{ + LLSD rowParams; + rowParams["id"] = pObjectPtr->getUUID(); + + llassert(pScrollListItemData.isArray()); + S32 idx = 0; + for (LLSD::array_const_iterator cellIter = pScrollListItemData.beginArray(); + cellIter != pScrollListItemData.endArray(); ++cellIter) + { + rowParams["columns"][idx] = *cellIter; + idx++; + } + + LLScrollListItem *scrollListItem = mObjectsScrollList->addElement(rowParams); + + if (pObjectPtr->hasOwner() && !pObjectPtr->hasOwnerName()) + { + mMissingNameObjectsScrollListItems.insert(std::make_pair(pObjectPtr->getUUID().asString(), scrollListItem)); + pObjectPtr->registerOwnerNameListener(boost::bind(&LLFloaterPathfindingObjects::handleObjectNameResponse, this, _1)); + } +} + +void LLFloaterPathfindingObjects::updateControlsOnScrollListChange() +{ + updateMessagingStatus(); + updateStateOnListControls(); + selectScrollListItemsInWorld(); + updateStateOnActionControls(); +} + +void LLFloaterPathfindingObjects::updateControlsOnInWorldSelectionChange() +{ + updateStateOnActionControls(); +} + +S32 LLFloaterPathfindingObjects::getNameColumnIndex() const +{ + return 0; +} + +S32 LLFloaterPathfindingObjects::getOwnerNameColumnIndex() const +{ + return 2; +} + +std::string LLFloaterPathfindingObjects::getOwnerName(const LLPathfindingObject *pObject) const +{ + llassert(0); + std::string returnVal; + return returnVal; +} + +const LLColor4 &LLFloaterPathfindingObjects::getBeaconColor() const +{ + return mDefaultBeaconColor; +} + +const LLColor4 &LLFloaterPathfindingObjects::getBeaconTextColor() const +{ + return mDefaultBeaconTextColor; +} + +S32 LLFloaterPathfindingObjects::getBeaconWidth() const +{ + return DEFAULT_BEACON_WIDTH; +} + +void LLFloaterPathfindingObjects::showFloaterWithSelectionObjects() +{ + mObjectsToBeSelected.clear(); + + LLObjectSelectionHandle selectedObjectsHandle = LLSelectMgr::getInstance()->getSelection(); + if (selectedObjectsHandle.notNull()) + { + LLObjectSelection *selectedObjects = selectedObjectsHandle.get(); + if (!selectedObjects->isEmpty()) + { + for (LLObjectSelection::valid_iterator objectIter = selectedObjects->valid_begin(); + objectIter != selectedObjects->valid_end(); ++objectIter) + { + LLSelectNode *object = *objectIter; + LLViewerObject *viewerObject = object->getObject(); + mObjectsToBeSelected.push_back(viewerObject->getID()); + } + } + } + mHasObjectsToBeSelected = true; + + if (!getVisible()) + { + open(); + setVisibleAndFrontmost(); + } + else + { + rebuildObjectsScrollList(); + if (isMinimized()) + { + setMinimized(FALSE); + } + setVisibleAndFrontmost(); + } + setFocus(TRUE); +} + +BOOL LLFloaterPathfindingObjects::isShowBeacons() const +{ + return mShowBeaconCheckBox->get(); +} + +void LLFloaterPathfindingObjects::clearAllObjects() +{ + selectNoneObjects(); + mObjectsScrollList->deleteAllItems(); + mMissingNameObjectsScrollListItems.clear(); + mObjectList.reset(); +} + +void LLFloaterPathfindingObjects::selectAllObjects() +{ + mObjectsScrollList->selectAll(); +} + +void LLFloaterPathfindingObjects::selectNoneObjects() +{ + mObjectsScrollList->deselectAllItems(); +} + +void LLFloaterPathfindingObjects::teleportToSelectedObject() +{ + std::vector selectedItems = mObjectsScrollList->getAllSelected(); + llassert(selectedItems.size() == 1); + if (selectedItems.size() == 1) + { + std::vector::const_reference selectedItemRef = selectedItems.front(); + const LLScrollListItem *selectedItem = selectedItemRef; + llassert(mObjectList != NULL); + LLVector3d teleportLocation; + LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID()); + if (viewerObject == NULL) + { + // If we cannot find the object in the viewer list, teleport to the last reported position + const LLPathfindingObjectPtr objectPtr = mObjectList->find(selectedItem->getUUID().asString()); + teleportLocation = gAgent.getPosGlobalFromAgent(objectPtr->getLocation()); + } + else + { + // If we can find the object in the viewer list, teleport to the known current position + teleportLocation = viewerObject->getPositionGlobal(); + } + gAgent.teleportViaLocationLookAt(teleportLocation); + } +} + +LLPathfindingObjectListPtr LLFloaterPathfindingObjects::getEmptyObjectList() const +{ + llassert(0); + LLPathfindingObjectListPtr objectListPtr(new LLPathfindingObjectList()); + return objectListPtr; +} + +int LLFloaterPathfindingObjects::getNumSelectedObjects() const +{ + return mObjectsScrollList->getNumSelected(); +} + +LLPathfindingObjectListPtr LLFloaterPathfindingObjects::getSelectedObjects() const +{ + LLPathfindingObjectListPtr selectedObjects = getEmptyObjectList(); + + std::vector selectedItems = mObjectsScrollList->getAllSelected(); + if (!selectedItems.empty()) + { + for (std::vector::const_iterator itemIter = selectedItems.begin(); + itemIter != selectedItems.end(); ++itemIter) + { + LLPathfindingObjectPtr objectPtr = findObject(*itemIter); + if (objectPtr != NULL) + { + selectedObjects->update(objectPtr); + } + } + } + + return selectedObjects; +} + +LLPathfindingObjectPtr LLFloaterPathfindingObjects::getFirstSelectedObject() const +{ + LLPathfindingObjectPtr objectPtr; + + std::vector selectedItems = mObjectsScrollList->getAllSelected(); + if (!selectedItems.empty()) + { + objectPtr = findObject(selectedItems.front()); + } + + return objectPtr; +} + +LLFloaterPathfindingObjects::EMessagingState LLFloaterPathfindingObjects::getMessagingState() const +{ + return mMessagingState; +} + +void LLFloaterPathfindingObjects::setMessagingState(EMessagingState pMessagingState) +{ + mMessagingState = pMessagingState; + updateControlsOnScrollListChange(); +} + +void LLFloaterPathfindingObjects::onRefreshObjectsClicked() +{ + requestGetObjects(); +} + +void LLFloaterPathfindingObjects::onSelectAllObjectsClicked() +{ + selectAllObjects(); +} + +void LLFloaterPathfindingObjects::onSelectNoneObjectsClicked() +{ + selectNoneObjects(); +} + +void LLFloaterPathfindingObjects::onTakeClicked() +{ + handle_take(); + requestGetObjects(); +} + +void LLFloaterPathfindingObjects::onTakeCopyClicked() +{ + handle_take_copy(); +} + +void LLFloaterPathfindingObjects::onReturnClicked() +{ + LLNotification::Params params("PathfindingReturnMultipleItems"); + params.functor(boost::bind(&LLFloaterPathfindingObjects::handleReturnItemsResponse, this, _1, _2)); + + LLSD substitutions; + int numItems = getNumSelectedObjects(); + substitutions["NUM_ITEMS"] = static_cast(numItems); + params.substitutions = substitutions; + + if (numItems == 1) + { + LLNotifications::getInstance()->forceResponse(params, 0); + } + else if (numItems > 1) + { + LLNotifications::getInstance()->add(params); + } +} + +void LLFloaterPathfindingObjects::onDeleteClicked() +{ + LLNotification::Params params("PathfindingDeleteMultipleItems"); + params.functor(boost::bind(&LLFloaterPathfindingObjects::handleDeleteItemsResponse, this, _1, _2)); + + LLSD substitutions; + int numItems = getNumSelectedObjects(); + substitutions["NUM_ITEMS"] = static_cast(numItems); + params.substitutions = substitutions; + + if (numItems == 1) + { + LLNotifications::getInstance()->forceResponse(params, 0); + } + else if (numItems > 1) + { + LLNotifications::getInstance()->add(params); + } +} + +void LLFloaterPathfindingObjects::onTeleportClicked() +{ + teleportToSelectedObject(); +} + +void LLFloaterPathfindingObjects::onScrollListSelectionChanged() +{ + updateControlsOnScrollListChange(); +} + +void LLFloaterPathfindingObjects::onInWorldSelectionListChanged() +{ + updateControlsOnInWorldSelectionChange(); +} + +void LLFloaterPathfindingObjects::onRegionBoundaryCrossed() +{ + requestGetObjects(); +} + +void LLFloaterPathfindingObjects::onGodLevelChange(U8 pGodLevel) +{ + requestGetObjects(); +} + +void LLFloaterPathfindingObjects::handleObjectNameResponse(const LLPathfindingObject *pObject) +{ + llassert(pObject != NULL); + const std::string uuid = pObject->getUUID().asString(); + scroll_list_item_map::iterator scrollListItemIter = mMissingNameObjectsScrollListItems.find(uuid); + if (scrollListItemIter != mMissingNameObjectsScrollListItems.end()) + { + LLScrollListItem *scrollListItem = scrollListItemIter->second; + llassert(scrollListItem != NULL); + + LLScrollListCell *scrollListCell = scrollListItem->getColumn(getOwnerNameColumnIndex()); + LLSD ownerName = getOwnerName(pObject); + + scrollListCell->setValue(ownerName); + + mMissingNameObjectsScrollListItems.erase(scrollListItemIter); + } +} + +void LLFloaterPathfindingObjects::updateMessagingStatus() +{ + std::string statusText(""); + LLColor4 color; + + switch (getMessagingState()) + { + case kMessagingUnknown: + statusText = getString("messaging_initial"); + color = mErrorTextColor; + break; + case kMessagingGetRequestSent : + statusText = getString("messaging_get_inprogress"); + color = mWarningTextColor; + break; + case kMessagingGetError : + statusText = getString("messaging_get_error"); + color = mErrorTextColor; + break; + case kMessagingSetRequestSent : + statusText = getString("messaging_set_inprogress"); + color = mWarningTextColor; + break; + case kMessagingSetError : + statusText = getString("messaging_set_error"); + color = mErrorTextColor; + break; + case kMessagingComplete : + if (mObjectsScrollList->isEmpty()) + { + statusText = getString("messaging_complete_none_found"); + } + else + { + S32 numItems = mObjectsScrollList->getItemCount(); + S32 numSelectedItems = mObjectsScrollList->getNumSelected(); + + LLLocale locale(LLStringUtil::getLocale()); + std::string numItemsString; + LLResMgr::getInstance()->getIntegerString(numItemsString, numItems); + + std::string numSelectedItemsString; + LLResMgr::getInstance()->getIntegerString(numSelectedItemsString, numSelectedItems); + + LLStringUtil::format_map_t string_args; + string_args["[NUM_SELECTED]"] = numSelectedItemsString; + string_args["[NUM_TOTAL]"] = numItemsString; + statusText = getString("messaging_complete_available", string_args); + } + color = LLUI::sColorsGroup->getColor("PathfindingGoodColor"); + break; + case kMessagingNotEnabled : + statusText = getString("messaging_not_enabled"); + color = mErrorTextColor; + break; + default: + statusText = getString("messaging_initial"); + color = mErrorTextColor; + llassert(0); + break; + } + + mMessagingStatus->setText((LLStringExplicit)statusText); + mMessagingStatus->setColor(color); +} + +void LLFloaterPathfindingObjects::updateStateOnListControls() +{ + switch (getMessagingState()) + { + case kMessagingUnknown: + case kMessagingGetRequestSent : + case kMessagingSetRequestSent : + mRefreshListButton->setEnabled(FALSE); + mSelectAllButton->setEnabled(FALSE); + mSelectNoneButton->setEnabled(FALSE); + break; + case kMessagingGetError : + case kMessagingSetError : + case kMessagingNotEnabled : + mRefreshListButton->setEnabled(TRUE); + mSelectAllButton->setEnabled(FALSE); + mSelectNoneButton->setEnabled(FALSE); + break; + case kMessagingComplete : + { + int numItems = mObjectsScrollList->getItemCount(); + int numSelectedItems = mObjectsScrollList->getNumSelected(); + mRefreshListButton->setEnabled(TRUE); + mSelectAllButton->setEnabled(numSelectedItems < numItems); + mSelectNoneButton->setEnabled(numSelectedItems > 0); + } + break; + default: + llassert(0); + break; + } +} + +void LLFloaterPathfindingObjects::updateStateOnActionControls() +{ + int numSelectedItems = mObjectsScrollList->getNumSelected(); + bool isEditEnabled = (numSelectedItems > 0); + + mShowBeaconCheckBox->setEnabled(isEditEnabled); + mTakeButton->setEnabled(isEditEnabled && visible_take_object()); + mTakeCopyButton->setEnabled(isEditEnabled && enable_object_take_copy()); + mReturnButton->setEnabled(isEditEnabled && enable_object_return()); + mDeleteButton->setEnabled(isEditEnabled && enable_object_delete()); + mTeleportButton->setEnabled(numSelectedItems == 1); +} + +void LLFloaterPathfindingObjects::selectScrollListItemsInWorld() +{ + mObjectsSelection.clear(); + LLSelectMgr::getInstance()->deselectAll(); + + std::vector selectedItems = mObjectsScrollList->getAllSelected(); + if (!selectedItems.empty()) + { + int numSelectedItems = selectedItems.size(); + + std::vectorviewerObjects; + viewerObjects.reserve(numSelectedItems); + + for (std::vector::const_iterator selectedItemIter = selectedItems.begin(); + selectedItemIter != selectedItems.end(); ++selectedItemIter) + { + const LLScrollListItem *selectedItem = *selectedItemIter; + + LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID()); + if (viewerObject != NULL) + { + viewerObjects.push_back(viewerObject); + } + } + + if (!viewerObjects.empty()) + { + mObjectsSelection = LLSelectMgr::getInstance()->selectObjectAndFamily(viewerObjects); + } + } +} + +void LLFloaterPathfindingObjects::handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + handle_object_return(); + requestGetObjects(); + } +} + +void LLFloaterPathfindingObjects::handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + handle_object_delete(); + requestGetObjects(); + } +} + +LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollListItem *pListItem) const +{ + LLPathfindingObjectPtr objectPtr; + + LLUUID uuid = pListItem->getUUID(); + const std::string &uuidString = uuid.asString(); + llassert(mObjectList != NULL); + objectPtr = mObjectList->find(uuidString); + + return objectPtr; +} diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h new file mode 100644 index 000000000..de8c53044 --- /dev/null +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -0,0 +1,179 @@ +/** +* @file llfloaterpathfindingobjects.h +* @brief Base class for both the pathfinding linksets and characters floater. +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, 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_LLFLOATERPATHFINDINGOBJECTS_H +#define LL_LLFLOATERPATHFINDINGOBJECTS_H + +#include +#include + +#include + +#include "llagent.h" +#include "llfloater.h" +#include "llpathfindingmanager.h" +#include "llpathfindingobject.h" +#include "llpathfindingobjectlist.h" +#include "llselectmgr.h" +#include "lluuid.h" +#include "v4color.h" + +class LLAvatarName; +class LLButton; +class LLCheckBoxCtrl; +class LLScrollListCtrl; +class LLScrollListItem; +class LLSD; +class LLTextBox; + +class LLFloaterPathfindingObjects : public LLFloater +{ +public: + virtual void onOpen(/*const LLSD &pKey*/); + virtual void onClose(bool pIsAppQuitting); + virtual void draw(); + +protected: +// friend class LLFloaterReg; + + typedef enum + { + kMessagingUnknown, + kMessagingGetRequestSent, + kMessagingGetError, + kMessagingSetRequestSent, + kMessagingSetError, + kMessagingComplete, + kMessagingNotEnabled + } EMessagingState; + + LLFloaterPathfindingObjects(/*const LLSD &pSeed*/); + virtual ~LLFloaterPathfindingObjects(); + + virtual BOOL postBuild(); + + virtual void requestGetObjects(); + LLPathfindingManager::request_id_t getNewRequestId(); + void handleNewObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList); + void handleUpdateObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList); + + void rebuildObjectsScrollList(); + virtual void buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr); + void addObjectToScrollList(const LLPathfindingObjectPtr pObjectPr, const LLSD &pScrollListItemData); + + virtual void updateControlsOnScrollListChange(); + virtual void updateControlsOnInWorldSelectionChange(); + + virtual S32 getNameColumnIndex() const; + virtual S32 getOwnerNameColumnIndex() const; + virtual std::string getOwnerName(const LLPathfindingObject *pObject) const; + virtual const LLColor4 &getBeaconColor() const; + virtual const LLColor4 &getBeaconTextColor() const; + virtual S32 getBeaconWidth() const; + + void showFloaterWithSelectionObjects(); + + BOOL isShowBeacons() const; + void clearAllObjects(); + void selectAllObjects(); + void selectNoneObjects(); + void teleportToSelectedObject(); + + virtual LLPathfindingObjectListPtr getEmptyObjectList() const; + int getNumSelectedObjects() const; + LLPathfindingObjectListPtr getSelectedObjects() const; + LLPathfindingObjectPtr getFirstSelectedObject() const; + + EMessagingState getMessagingState() const; + +private: + LLFloaterPathfindingObjects(const LLFloaterPathfindingObjects &pOther); + + void setMessagingState(EMessagingState pMessagingState); + + void onRefreshObjectsClicked(); + void onSelectAllObjectsClicked(); + void onSelectNoneObjectsClicked(); + void onTakeClicked(); + void onTakeCopyClicked(); + void onReturnClicked(); + void onDeleteClicked(); + void onTeleportClicked(); + + void onScrollListSelectionChanged(); + void onInWorldSelectionListChanged(); + void onRegionBoundaryCrossed(); + void onGodLevelChange(U8 pGodLevel); + + void handleObjectNameResponse(const LLPathfindingObject *pObject); + + void updateMessagingStatus(); + void updateStateOnListControls(); + void updateStateOnActionControls(); + void selectScrollListItemsInWorld(); + + void handleReturnItemsResponse(const LLSD &pNotification, const LLSD &pResponse); + void handleDeleteItemsResponse(const LLSD &pNotification, const LLSD &pResponse); + + LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const; + + LLScrollListCtrl *mObjectsScrollList; + LLTextBox *mMessagingStatus; + LLButton *mRefreshListButton; + LLButton *mSelectAllButton; + LLButton *mSelectNoneButton; + LLCheckBoxCtrl *mShowBeaconCheckBox; + + LLButton *mTakeButton; + LLButton *mTakeCopyButton; + LLButton *mReturnButton; + LLButton *mDeleteButton; + LLButton *mTeleportButton; + + LLColor4 mDefaultBeaconColor; + LLColor4 mDefaultBeaconTextColor; + LLColor4 mErrorTextColor; + LLColor4 mWarningTextColor; + + EMessagingState mMessagingState; + LLPathfindingManager::request_id_t mMessagingRequestId; + + typedef std::map scroll_list_item_map; + scroll_list_item_map mMissingNameObjectsScrollListItems; + + LLPathfindingObjectListPtr mObjectList; + + LLObjectSelectionHandle mObjectsSelection; + + bool mHasObjectsToBeSelected; + uuid_vec_t mObjectsToBeSelected; + + boost::signals2::connection mSelectionUpdateSlot; + boost::signals2::connection mRegionBoundaryCrossingSlot; + LLAgent::god_level_change_slot_t mGodLevelChangeSlot; +}; + +#endif // LL_LLFLOATERPATHFINDINGOBJECTS_H diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 0c8e7914e..34a51e018 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -62,9 +62,6 @@ #include "hippogridmanager.h" -// -#include "llclipboard.h" -// // [RLVa:KB] #include "rlvhandler.h" @@ -166,9 +163,6 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& mItemID(item_id), mObjectID(object_id), mDirty(TRUE) - // - , mExpanded(FALSE) - // { LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); @@ -212,13 +206,6 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& childSetCommitCallback("RadioSaleType",&onCommitSaleType, this); // "Price" label for edit childSetCommitCallback("EditPrice",&onCommitSaleInfo, this); - // - childSetAction("more_btn", &onClickMore, this); - childSetAction("less_btn", &onClickLess, this); - childSetAction("copy_btn", &onClickCopy, this); - childSetAction("update_btn", &onClickUpdate, this); - setExpanded(mExpanded); - // // The UI has been built, now fill in all the values refresh(); } @@ -308,28 +295,6 @@ void LLFloaterProperties::draw() void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) { - // - childSetText("EditItemID", item->getUUID().asString()); - childSetText("EditFolderID", item->getParentUUID().asString()); - childSetText("EditGroup", item->getPermissions().getGroup().asString()); - childSetText("EditAssetID", item->getAssetUUID().asString()); - - std::string type_str = LLAssetType::lookup(item->getType()); - if(type_str.c_str() == NULL) type_str = llformat("%d", item->getType()); - childSetText("EditType", type_str); - - std::string invtype_str = LLInventoryType::lookup(item->getInventoryType()); - if(invtype_str.c_str() == NULL) invtype_str = llformat("%d", item->getInventoryType()); - childSetText("EditInvType", invtype_str); - childSetText("EditFlags", llformat("%d", item->getFlags())); - - std::ostringstream strm; - item->exportLegacyStream(strm, TRUE); - std::string str(strm.str()); - LLStringUtil::replaceTabsWithSpaces(str, 4); - childSetText("item_text", str); - // - //////////////////////// // PERMISSIONS LOOKUP // //////////////////////// @@ -1010,163 +975,14 @@ void LLFloaterProperties::closeByID(const LLUUID& item_id, const LLUUID &object_ } } -// -void LLFloaterProperties::onClickMore(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLMultiProperties* host = (LLMultiProperties*)floaterp->getHost(); - if(host) - host->setExpanded(TRUE); - else - floaterp->setExpanded(TRUE); - } -} - -void LLFloaterProperties::onClickLess(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLMultiProperties* host = (LLMultiProperties*)floaterp->getHost(); - if(host) - host->setExpanded(FALSE); - else - floaterp->setExpanded(FALSE); - } -} - -void LLFloaterProperties::setExpanded(BOOL expanded) -{ - mExpanded = expanded; - LLRect rect = getRect(); - if(expanded) - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 800, rect.getHeight()); - else - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 350, rect.getHeight()); - setRect(rect); - childSetVisible("more_btn", !mExpanded); - childSetVisible("less_btn", mExpanded); - childSetVisible("item_text", mExpanded); - childSetVisible("copy_btn", mExpanded); - childSetVisible("update_btn", mExpanded); - if(getHost()) - setCanTearOff(!expanded); // idk why it comes out ugly if expanded -} - -// static -void LLFloaterProperties::onClickCopy(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLViewerInventoryItem* item = (LLViewerInventoryItem*)floaterp->findItem(); - if(item) - { - std::string str(floaterp->childGetValue("item_text").asString()); - std::string::size_type pos; - while((pos = str.find(" ")) != std::string::npos) - { - str.replace(pos, 4, "\t"); - } - - std::istringstream strm(str); - LLViewerInventoryItem* temp = new LLViewerInventoryItem(); - temp->importLegacyStream(strm); - std::ostringstream strm2; - temp->exportLegacyStream(strm2, TRUE); - LLWString wstr(utf8str_to_wstring(strm2.str())); - - gClipboard.copyFromSubstring(wstr, 0, wstr.length()); - - //delete temp; - } - } -} - -// static -void LLFloaterProperties::onClickUpdate(void* user_data) -{ - LLFloaterProperties* floaterp = (LLFloaterProperties*)user_data; - if(floaterp) - { - LLViewerInventoryItem* item = (LLViewerInventoryItem*)floaterp->findItem(); - if(item) - { - std::string str(floaterp->childGetValue("item_text").asString()); - std::string::size_type pos; - while((pos = str.find(" ")) != std::string::npos) - { - str.replace(pos, 4, "\t"); - } - - std::istringstream strm(str); - item->importLegacyStream(strm); - - if(floaterp->mObjectID.isNull()) - { - // This is in the agent's inventory. - item->updateServer(FALSE); - gInventory.updateItem(item); - gInventory.notifyObservers(); - - item->setComplete(FALSE); - item->fetchFromServer(); - } - else - { - // This is in an object's contents. - LLViewerObject* object = gObjectList.findObject(floaterp->mObjectID); - if(object) - { - object->updateInventory( - item, - TASK_INVENTORY_ITEM_KEY, - false); - object->fetchInventoryFromServer(); - } - } - } - } -} -// - ///---------------------------------------------------------------------------- /// LLMultiProperties ///---------------------------------------------------------------------------- LLMultiProperties::LLMultiProperties(const LLRect &rect) : LLMultiFloater(std::string("Properties"), rect) -// -, mExpanded(FALSE) -// { } -void LLMultiProperties::setExpanded(BOOL expanded) -{ - mExpanded = expanded; - LLRect rect = getRect(); - LLRect tab_rect = mTabContainer->getRect(); - if(expanded) - { - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 800, rect.getHeight()); - tab_rect.setOriginAndSize(tab_rect.mLeft, tab_rect.mBottom, 800, tab_rect.getHeight()); - } - else - { - rect.setOriginAndSize(rect.mLeft, rect.mBottom, 350, rect.getHeight()); - tab_rect.setOriginAndSize(tab_rect.mLeft, tab_rect.mBottom, 350, tab_rect.getHeight()); - } - setRect(rect); - mTabContainer->setRect(tab_rect); - for (S32 i = 0; i < mTabContainer->getTabCount(); i++) - { - LLFloaterProperties* floaterp = (LLFloaterProperties*)mTabContainer->getPanelByIndex(i); - floaterp->setExpanded(expanded); - } -} - ///---------------------------------------------------------------------------- /// Local function definitions ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h index cf72ddecc..fe54bcd0e 100644 --- a/indra/newview/llfloaterproperties.h +++ b/indra/newview/llfloaterproperties.h @@ -61,14 +61,6 @@ public: static void closeByID(const LLUUID& item_id, const LLUUID& object_id); - // - static void onClickMore(void* user_data); - static void onClickLess(void* user_data); - static void onClickCopy(void* user_data); - static void onClickUpdate(void* user_data); - void setExpanded(BOOL expanded); - // - LLFloaterProperties(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_id, const LLUUID& object_id); virtual ~LLFloaterProperties(); @@ -102,9 +94,6 @@ protected: LLUUID mObjectID; BOOL mDirty; - // - BOOL mExpanded; - // typedef std::map instance_map; static instance_map sInstances; @@ -116,11 +105,6 @@ class LLMultiProperties : public LLMultiFloater { public: LLMultiProperties(const LLRect& rect); - // - void setExpanded(BOOL expanded); -protected: - BOOL mExpanded; - // }; #endif // LL_LLFLOATERPROPERTIES_H diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 19f7af069..382d747a5 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -45,27 +45,31 @@ #include "llstl.h" #include "indra_constants.h" #include "message.h" +//#include "llloadingindicator.h" // Singu TODO: LLLoadingIndicator +#include "llradiogroup.h" #include "llagent.h" #include "llalertdialog.h" #include "llappviewer.h" +#include "llavatarnamecache.h" #include "llfloateravatarpicker.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" +#include "lldaycyclemanager.h" +#include "llenvmanager.h" +#include "llestateinfomodel.h" #include "statemachine/aifilepicker.h" -#include "llfloaterdaycycle.h" #include "llfloatergodtools.h" // for send_sim_wide_deletes() #include "llfloatertopobjects.h" // added to fix SL-32336 #include "llfloatergroups.h" #include "llfloatertelehub.h" -#include "llfloaterwindlight.h" #include "llinventorymodel.h" #include "lllineeditor.h" -#include "llalertdialog.h" #include "llnamelistctrl.h" #include "llnotifications.h" #include "llnotificationsutil.h" +#include "llregioninfomodel.h" #include "llsliderctrl.h" #include "llspinctrl.h" #include "lltabcontainer.h" @@ -81,13 +85,12 @@ #include "llviewertexteditor.h" #include "llviewerwindow.h" #include "llvlcomposition.h" +#include "llwaterparammanager.h" #include "llagentui.h" // [RLVa:KB] #include "rlvhandler.h" // [/RLVa:KB] -#define ELAR_ENABLED 0 // Enable when server support is implemented - const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; @@ -177,6 +180,7 @@ LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) BOOL LLFloaterRegionInfo::postBuild() { mTab = getChild("region_panels"); + mTab->setCommitCallback(boost::bind(&LLFloaterRegionInfo::onTabSelected, this, _2)); // contruct the panels LLPanelRegionInfo* panel; @@ -200,9 +204,9 @@ BOOL LLFloaterRegionInfo::postBuild() LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml"); mTab->addTabPanel(panel, panel->getLabel(), FALSE); - panel = new LLPanelRegionTextureInfo; + panel = new LLPanelEnvironmentInfo; mInfoPanels.push_back(panel); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml"); + LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_environment.xml"); mTab->addTabPanel(panel, panel->getLabel(), FALSE); panel = new LLPanelRegionDebugInfo; @@ -214,12 +218,14 @@ BOOL LLFloaterRegionInfo::postBuild() "EstateOwnerMessage", &processEstateOwnerRequest); + // Request region info when agent region changes. + LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterRegionInfo::requestRegionInfo, this)); + return TRUE; } LLFloaterRegionInfo::~LLFloaterRegionInfo() -{ -} +{} void LLFloaterRegionInfo::onOpen() { @@ -236,7 +242,7 @@ void LLFloaterRegionInfo::onOpen() // static void LLFloaterRegionInfo::requestRegionInfo() { - LLTabContainer* tab = findInstance()->getChild("region_panels"); + LLTabContainer* tab = getChild("region_panels"); tab->getChild("General")->setCtrlsEnabled(FALSE); tab->getChild("Debug")->setCtrlsEnabled(FALSE); @@ -294,13 +300,12 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) { LLPanel* panel; - - llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl; LLFloaterRegionInfo* floater = findInstance(); if(!floater) { return; } + // We need to re-request environment setting here, // otherwise after we apply (send) updated region settings we won't get them back, // so our environment won't be updated. @@ -312,6 +317,9 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) LLViewerRegion* region = gAgent.getRegion(); BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + // *TODO: Replace parsing msg with accessing the region info model. + LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); + // extract message std::string sim_name; std::string sim_type = LLTrans::getString("land_type_unknown"); @@ -346,20 +354,20 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) // GENERAL PANEL panel = tab->getChild("General"); - panel->childSetValue("region_text", LLSD(sim_name)); - panel->childSetValue("region_type", LLSD(sim_type)); - panel->childSetValue("version_channel_text", gLastVersionChannel); + panel->getChild("region_text")->setValue(LLSD(sim_name)); + panel->getChild("region_type")->setValue(LLSD(sim_type)); + panel->getChild("version_channel_text")->setValue(gLastVersionChannel); - panel->childSetValue("block_terraform_check", (region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE ); - panel->childSetValue("block_fly_check", (region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE ); - panel->childSetValue("allow_damage_check", (region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE ); - panel->childSetValue("restrict_pushobject", (region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE ); - panel->childSetValue("allow_land_resell_check", (region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE ); - panel->childSetValue("allow_parcel_changes_check", (region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE ); - panel->childSetValue("block_parcel_search_check", (region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE ); - panel->childSetValue("agent_limit_spin", LLSD((F32)agent_limit) ); - panel->childSetValue("object_bonus_spin", LLSD(object_bonus_factor) ); - panel->childSetValue("access_combo", LLSD(sim_access) ); + panel->getChild("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE ); + panel->getChild("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE ); + panel->getChild("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE ); + panel->getChild("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE ); + panel->getChild("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE ); + panel->getChild("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE ); + panel->getChild("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE ); + panel->getChild("agent_limit_spin")->setValue(LLSD((F32)agent_limit) ); + panel->getChild("object_bonus_spin")->setValue(LLSD(object_bonus_factor) ); + panel->getChild("access_combo")->setValue(LLSD(sim_access) ); // detect teen grid for maturity @@ -367,32 +375,27 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) U32 parent_estate_id; msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id); BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that - panel->childSetEnabled("access_combo", gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); + panel->getChildView("access_combo")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); panel->setCtrlsEnabled(allow_modify); // DEBUG PANEL panel = tab->getChild("Debug"); - panel->childSetValue("region_text", LLSD(sim_name) ); - panel->childSetValue("disable_scripts_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) ); - panel->childSetValue("disable_collisions_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) ); - panel->childSetValue("disable_physics_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) ); + panel->getChild("region_text")->setValue(LLSD(sim_name) ); + panel->getChild("disable_scripts_check")->setValue(LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) ); + panel->getChild("disable_collisions_check")->setValue(LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) ); + panel->getChild("disable_physics_check")->setValue(LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) ); panel->setCtrlsEnabled(allow_modify); // TERRAIN PANEL panel = tab->getChild("Terrain"); - panel->childSetValue("region_text", LLSD(sim_name)); - panel->childSetValue("water_height_spin", LLSD(water_height)); - panel->childSetValue("terrain_raise_spin", LLSD(terrain_raise_limit)); - panel->childSetValue("terrain_lower_spin", LLSD(terrain_lower_limit)); - panel->childSetValue("use_estate_sun_check", LLSD(use_estate_sun)); + panel->getChild("region_text")->setValue(LLSD(sim_name)); + panel->getChild("water_height_spin")->setValue(region_info.mWaterHeight); + panel->getChild("terrain_raise_spin")->setValue(region_info.mTerrainRaiseLimit); + panel->getChild("terrain_lower_spin")->setValue(region_info.mTerrainLowerLimit); - panel->childSetValue("fixed_sun_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED))); - panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun); - panel->childSetValue("sun_hour_slider", LLSD(sun_hour)); - panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun); panel->setCtrlsEnabled(allow_modify); floater->refreshFromRegion( gAgent.getRegion() ); @@ -418,6 +421,29 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() return panel; } +// static +LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain() +{ + LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); + if (!floater) + { + llassert(floater); + return NULL; + } + + LLTabContainer* tab_container = floater->getChild("region_panels"); + LLPanelRegionTerrainInfo* panel = + dynamic_cast(tab_container->getChild("Terrain")); + llassert(panel); + return panel; +} + +void LLFloaterRegionInfo::onTabSelected(const LLSD& param) +{ + LLPanelRegionInfo* active_panel = getChild(param.asString()); + active_panel->onOpen(LLSD()); +} + void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) { if (!region) @@ -457,32 +483,36 @@ void LLFloaterRegionInfo::refresh() // LLPanelRegionInfo // -// static -void LLPanelRegionInfo::onBtnSet(void* user_data) +LLPanelRegionInfo::LLPanelRegionInfo() + : LLPanel(std::string("Region Info Panel")) { - LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data; - if(!panel) return; - if (panel->sendUpdate()) +} + +void LLPanelRegionInfo::onBtnSet() +{ + if (sendUpdate()) { - panel->disableButton("apply_btn"); + disableButton("apply_btn"); } } -//static -void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl, void* user_data) +void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl) { - if (ctrl) - { - LLPanelRegionInfo* panel = (LLPanelRegionInfo*) ctrl->getParent(); - panel->updateChild(ctrl); - } + updateChild(ctrl); // virtual function } -// static // Enables the "set" button if it is not already enabled -void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data) +void LLPanelRegionInfo::onChangeAnything() { - LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data; + enableButton("apply_btn"); + refresh(); +} + +// static +// Enables set button on change to line editor +void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) +{ + LLPanelRegionInfo* panel = dynamic_cast(caller->getParent()); if(panel) { panel->enableButton("apply_btn"); @@ -490,20 +520,17 @@ void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data) } } -// static -// Enables set button on change to line editor -void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) -{ - // reuse the previous method - onChangeAnything(0, user_data); -} - // virtual BOOL LLPanelRegionInfo::postBuild() { - childSetAction("apply_btn", onBtnSet, this); - childDisable("apply_btn"); + // If the panel has an Apply button, set a callback for it. + LLUICtrl* apply_btn = findChild("apply_btn"); + if (apply_btn) + { + apply_btn->setCommitCallback(boost::bind(&LLPanelRegionInfo::onBtnSet, this)); + } + refresh(); return TRUE; } @@ -555,29 +582,35 @@ void LLPanelRegionInfo::sendEstateOwnerMessage( void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) { - childSetEnabled(btn_name, enable); + LLView* button = findChild(btn_name); + if (button) button->setEnabled(enable); } void LLPanelRegionInfo::disableButton(const std::string& btn_name) { - childDisable(btn_name); + LLView* button = findChild(btn_name); + if (button) button->setEnabled(FALSE); } void LLPanelRegionInfo::initCtrl(const std::string& name) { - childSetCommitCallback(name, onChangeAnything, this); + getChild(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this)); } void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert) { - childSetAction(name, onClickHelp, new std::string(xml_alert)); + childSetAction(name, boost::bind(&LLPanelRegionInfo::onClickHelp, this, xml_alert)); } -// static -void LLPanelRegionInfo::onClickHelp(void* data) +void LLPanelRegionInfo::onClickHelp(const std::string& xml_alert) { - std::string* xml_alert = (std::string*)data; - LLNotifications::instance().add(*xml_alert); + LLNotifications::instance().add(xml_alert); +} + +void LLPanelRegionInfo::onClickManageTelehub() +{ + LLFloaterRegionInfo::getInstance()->close(); + LLFloaterTelehub::show(); } ///////////////////////////////////////////////////////////////////////////// @@ -587,14 +620,14 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) { BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); setCtrlsEnabled(allow_modify); - childDisable("apply_btn"); - childSetEnabled("access_text", allow_modify); - // childSetEnabled("access_combo", allow_modify); + getChildView("apply_btn")->setEnabled(FALSE); + getChildView("access_text")->setEnabled(allow_modify); + // getChildView("access_combo")->setEnabled(allow_modify); // now set in processRegionInfo for teen grid detection - childSetEnabled("kick_btn", allow_modify); - childSetEnabled("kick_all_btn", allow_modify); - childSetEnabled("assign_btn", allow_modify); - childSetEnabled("manage_telehub_btn", allow_modify); + getChildView("kick_btn")->setEnabled(allow_modify); + getChildView("kick_all_btn")->setEnabled(allow_modify); + getChildView("im_btn")->setEnabled(allow_modify); + getChildView("manage_telehub_btn")->setEnabled(allow_modify); // Data gets filled in by processRegionInfo @@ -626,24 +659,22 @@ BOOL LLPanelRegionGeneralInfo::postBuild() initHelpBtn("parcel_changes_help", "HelpParcelChanges"); initHelpBtn("parcel_search_help", "HelpRegionSearch"); - childSetAction("kick_btn", onClickKick, this); + childSetAction("kick_btn", boost::bind(&LLPanelRegionGeneralInfo::onClickKick, this)); childSetAction("kick_all_btn", onClickKickAll, this); childSetAction("im_btn", onClickMessage, this); - childSetAction("manage_telehub_btn", onClickManageTelehub, this); + childSetAction("manage_telehub_btn", boost::bind(&LLPanelRegionGeneralInfo::onClickManageTelehub, this)); return LLPanelRegionInfo::postBuild(); } -// static -void LLPanelRegionGeneralInfo::onClickKick(void* userdata) +void LLPanelRegionGeneralInfo::onClickKick() { llinfos << "LLPanelRegionGeneralInfo::onClickKick" << llendl; - LLPanelRegionGeneralInfo* panelp = (LLPanelRegionGeneralInfo*)userdata; // this depends on the grandparent view being a floater // in order to set up floater dependency - LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); - LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, panelp, _1), FALSE, TRUE); + LLFloater* parent_floater = gFloaterView->getParentFloater(this); + LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1), FALSE, TRUE); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -737,14 +768,6 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L return false; } -// static -void LLPanelRegionGeneralInfo::onClickManageTelehub(void* data) -{ - LLFloaterRegionInfo::getInstance()->close(); - - LLFloaterTelehub::show(); -} - // setregioninfo // strings[0] = 'Y' - block terraform, 'N' - not // strings[1] = 'Y' - block fly, 'N' - not @@ -765,16 +788,16 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() std::string url = gAgent.getRegion()->getCapability("DispatchRegionInfo"); if (!url.empty()) { - body["block_terraform"] = childGetValue("block_terraform_check"); - body["block_fly"] = childGetValue("block_fly_check"); - body["allow_damage"] = childGetValue("allow_damage_check"); - body["allow_land_resell"] = childGetValue("allow_land_resell_check"); - body["agent_limit"] = childGetValue("agent_limit_spin"); - body["prim_bonus"] = childGetValue("object_bonus_spin"); - body["sim_access"] = childGetValue("access_combo"); - body["restrict_pushobject"] = childGetValue("restrict_pushobject"); - body["allow_parcel_changes"] = childGetValue("allow_parcel_changes_check"); - body["block_parcel_search"] = childGetValue("block_parcel_search_check"); + body["block_terraform"] = getChild("block_terraform_check")->getValue(); + body["block_fly"] = getChild("block_fly_check")->getValue(); + body["allow_damage"] = getChild("allow_damage_check")->getValue(); + body["allow_land_resell"] = getChild("allow_land_resell_check")->getValue(); + body["agent_limit"] = getChild("agent_limit_spin")->getValue(); + body["prim_bonus"] = getChild("object_bonus_spin")->getValue(); + body["sim_access"] = getChild("access_combo")->getValue(); + body["restrict_pushobject"] = getChild("restrict_pushobject")->getValue(); + body["allow_parcel_changes"] = getChild("allow_parcel_changes_check")->getValue(); + body["block_parcel_search"] = getChild("block_parcel_search_check")->getValue(); LLHTTPClient::post(url, body, new LLHTTPClient::ResponderIgnore); } @@ -783,33 +806,33 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() strings_t strings; std::string buffer; - buffer = llformat("%s", (childGetValue("block_terraform_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("block_terraform_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(strings_t::value_type(buffer)); - buffer = llformat("%s", (childGetValue("block_fly_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("block_fly_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(strings_t::value_type(buffer)); - buffer = llformat("%s", (childGetValue("allow_damage_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("allow_damage_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(strings_t::value_type(buffer)); - buffer = llformat("%s", (childGetValue("allow_land_resell_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("allow_land_resell_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(strings_t::value_type(buffer)); - F32 value = (F32)childGetValue("agent_limit_spin").asReal(); + F32 value = (F32)getChild("agent_limit_spin")->getValue().asReal(); buffer = llformat("%f", value); strings.push_back(strings_t::value_type(buffer)); - value = (F32)childGetValue("object_bonus_spin").asReal(); + value = (F32)getChild("object_bonus_spin")->getValue().asReal(); buffer = llformat("%f", value); strings.push_back(strings_t::value_type(buffer)); - buffer = llformat("%d", childGetValue("access_combo").asInteger()); + buffer = llformat("%d", getChild("access_combo")->getValue().asInteger()); strings.push_back(strings_t::value_type(buffer)); - buffer = llformat("%s", (childGetValue("restrict_pushobject").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("restrict_pushobject")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(strings_t::value_type(buffer)); - buffer = llformat("%s", (childGetValue("allow_parcel_changes_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("allow_parcel_changes_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(strings_t::value_type(buffer)); LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); @@ -818,7 +841,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() // if we changed access levels, tell user about it LLViewerRegion* region = gAgent.getRegion(); - if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) ) + if (region && (getChild("access_combo")->getValue().asInteger() != region->getSimAccess()) ) { LLNotificationsUtil::add("RegionMaturityChange"); } @@ -843,7 +866,7 @@ BOOL LLPanelRegionDebugInfo::postBuild() initHelpBtn("top_scripts_help", "HelpRegionTopScripts"); initHelpBtn("restart_help", "HelpRegionRestart"); - childSetAction("choose_avatar_btn", onClickChooseAvatar, this); + childSetAction("choose_avatar_btn", boost::bind(&LLPanelRegionDebugInfo::onClickChooseAvatar, this)); childSetAction("return_btn", onClickReturn, this); childSetAction("top_colliders_btn", onClickTopColliders, this); childSetAction("top_scripts_btn", onClickTopScripts, this); @@ -858,18 +881,18 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) { BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); setCtrlsEnabled(allow_modify); - childDisable("apply_btn"); - childDisable("target_avatar_name"); + getChildView("apply_btn")->setEnabled(FALSE); + getChildView("target_avatar_name")->setEnabled(FALSE); - childSetEnabled("choose_avatar_btn", allow_modify); - childSetEnabled("return_scripts", allow_modify && !mTargetAvatar.isNull()); - childSetEnabled("return_other_land", allow_modify && !mTargetAvatar.isNull()); - childSetEnabled("return_estate_wide", allow_modify && !mTargetAvatar.isNull()); - childSetEnabled("return_btn", allow_modify && !mTargetAvatar.isNull()); - childSetEnabled("top_colliders_btn", allow_modify); - childSetEnabled("top_scripts_btn", allow_modify); - childSetEnabled("restart_btn", allow_modify); - childSetEnabled("cancel_restart_btn", allow_modify); + getChildView("choose_avatar_btn")->setEnabled(allow_modify); + getChildView("return_scripts")->setEnabled(allow_modify && !mTargetAvatar.isNull()); + getChildView("return_other_land")->setEnabled(allow_modify && !mTargetAvatar.isNull()); + getChildView("return_estate_wide")->setEnabled(allow_modify && !mTargetAvatar.isNull()); + getChildView("return_btn")->setEnabled(allow_modify && !mTargetAvatar.isNull()); + getChildView("top_colliders_btn")->setEnabled(allow_modify); + getChildView("top_scripts_btn")->setEnabled(allow_modify); + getChildView("restart_btn")->setEnabled(allow_modify); + getChildView("cancel_restart_btn")->setEnabled(allow_modify); return LLPanelRegionInfo::refreshFromRegion(region); } @@ -881,13 +904,13 @@ BOOL LLPanelRegionDebugInfo::sendUpdate() strings_t strings; std::string buffer; - buffer = llformat("%s", (childGetValue("disable_scripts_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("disable_scripts_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(buffer); - buffer = llformat("%s", (childGetValue("disable_collisions_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("disable_collisions_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(buffer); - buffer = llformat("%s", (childGetValue("disable_physics_check").asBoolean() ? "Y" : "N")); + buffer = llformat("%s", (getChild("disable_physics_check")->getValue().asBoolean() ? "Y" : "N")); strings.push_back(buffer); LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); @@ -895,16 +918,17 @@ BOOL LLPanelRegionDebugInfo::sendUpdate() return TRUE; } -void LLPanelRegionDebugInfo::onClickChooseAvatar(void* data) +void LLPanelRegionDebugInfo::onClickChooseAvatar() { - LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, (LLPanelRegionDebugInfo*)data, _1, _2), FALSE, TRUE); + LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), FALSE, TRUE); } + void LLPanelRegionDebugInfo::callbackAvatarID(const uuid_vec_t& ids, const std::vector& names) { if (ids.empty() || names.empty()) return; mTargetAvatar = ids[0]; - childSetValue("target_avatar_name", LLSD(names[0].getCompleteName())); + getChild("target_avatar_name")->setValue(LLSD(names[0].getCompleteName())); refreshFromRegion( gAgent.getRegion() ); } @@ -915,23 +939,23 @@ void LLPanelRegionDebugInfo::onClickReturn(void* data) if (panelp->mTargetAvatar.isNull()) return; LLSD args; - args["USER_NAME"] = panelp->childGetValue("target_avatar_name").asString(); + args["USER_NAME"] = panelp->getChild("target_avatar_name")->getValue().asString(); LLSD payload; payload["avatar_id"] = panelp->mTargetAvatar; U32 flags = SWD_ALWAYS_RETURN_OBJECTS; - if (panelp->childGetValue("return_scripts").asBoolean()) + if (panelp->getChild("return_scripts")->getValue().asBoolean()) { flags |= SWD_SCRIPTED_ONLY; } - if (panelp->childGetValue("return_other_land").asBoolean()) + if (panelp->getChild("return_other_land")->getValue().asBoolean()) { flags |= SWD_OTHERS_LAND_ONLY; } payload["flags"] = int(flags); - payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean(); + payload["return_estate_wide"] = panelp->getChild("return_estate_wide")->getValue().asBoolean(); LLNotificationsUtil::add("EstateObjectReturn", args, payload, boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2)); } @@ -994,18 +1018,17 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data) // static void LLPanelRegionDebugInfo::onClickRestart(void* data) { - LLPanelRegionDebugInfo* self = (LLPanelRegionDebugInfo*)data; LLNotificationsUtil::add("ConfirmRestart", LLSD(), LLSD(), - boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2, self->getChild("rcount")->getValue().asInteger())); + boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2)); } -bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response, S32 seconds) +bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) return false; strings_t strings; - strings.push_back(llformat("%d",seconds)); + strings.push_back(llformat("%d", getChild("rcount")->getValue().asInteger())); LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); sendEstateOwnerMessage(gMessageSystem, "restart", invoice, strings); return false; @@ -1022,131 +1045,7 @@ void LLPanelRegionDebugInfo::onClickCancelRestart(void* data) } -///////////////////////////////////////////////////////////////////////////// -// LLPanelRegionTextureInfo -// -LLPanelRegionTextureInfo::LLPanelRegionTextureInfo() : LLPanelRegionInfo() -{ - // nothing. -} - -bool LLPanelRegionTextureInfo::refreshFromRegion(LLViewerRegion* region) -{ - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); - setCtrlsEnabled(allow_modify); - childDisable("apply_btn"); - - if (region) - { - childSetValue("region_text", LLSD(region->getName())); - } - else - { - childSetValue("region_text", LLSD("")); - } - - if (!region) return LLPanelRegionInfo::refreshFromRegion(region); - - LLVLComposition* compp = region->getComposition(); - LLTextureCtrl* texture_ctrl; - std::string buffer; - for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) - { - buffer = llformat("texture_detail_%d", i); - texture_ctrl = getChild(buffer); - if(texture_ctrl) - { - lldebugs << "Detail Texture " << i << ": " - << compp->getDetailTextureID(i) << llendl; - LLUUID tmp_id(compp->getDetailTextureID(i)); - texture_ctrl->setImageAssetID(tmp_id); - } - } - - for(S32 i = 0; i < CORNER_COUNT; ++i) - { - buffer = llformat("height_start_spin_%d", i); - childSetValue(buffer, LLSD(compp->getStartHeight(i))); - buffer = llformat("height_range_spin_%d", i); - childSetValue(buffer, LLSD(compp->getHeightRange(i))); - } - - // Call the parent for common book-keeping - return LLPanelRegionInfo::refreshFromRegion(region); -} - - -BOOL LLPanelRegionTextureInfo::postBuild() -{ - LLPanelRegionInfo::postBuild(); - std::string buffer; - for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) - { - buffer = llformat("texture_detail_%d", i); - initCtrl(buffer); - } - - for(S32 i = 0; i < CORNER_COUNT; ++i) - { - buffer = llformat("height_start_spin_%d", i); - initCtrl(buffer); - buffer = llformat("height_range_spin_%d", i); - initCtrl(buffer); - } - -// LLButton* btn = new LLButton("dump", LLRect(0, 20, 100, 0), "", onClickDump, this); -// btn->setFollows(FOLLOWS_TOP|FOLLOWS_LEFT); -// addChild(btn); - - return LLPanelRegionInfo::postBuild(); -} - -BOOL LLPanelRegionTextureInfo::sendUpdate() -{ - llinfos << "LLPanelRegionTextureInfo::sendUpdate()" << llendl; - - // Make sure user hasn't chosen wacky textures. - if (!validateTextureSizes()) - { - return FALSE; - } - - LLTextureCtrl* texture_ctrl; - std::string buffer; - std::string id_str; - LLMessageSystem* msg = gMessageSystem; - strings_t strings; - - LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); - - for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) - { - buffer = llformat("texture_detail_%d", i); - texture_ctrl = getChild(buffer); - if(texture_ctrl) - { - LLUUID tmp_id(texture_ctrl->getImageAssetID()); - tmp_id.toString(id_str); - buffer = llformat("%d %s", i, id_str.c_str()); - strings.push_back(buffer); - } - } - sendEstateOwnerMessage(msg, "texturedetail", invoice, strings); - strings.clear(); - for(S32 i = 0; i < CORNER_COUNT; ++i) - { - buffer = llformat("height_start_spin_%d", i); - std::string buffer2 = llformat("height_range_spin_%d", i); - std::string buffer3 = llformat("%d %f %f", i, (F32)childGetValue(buffer).asReal(), (F32)childGetValue(buffer2).asReal()); - strings.push_back(buffer3); - } - sendEstateOwnerMessage(msg, "textureheights", invoice, strings); - strings.clear(); - sendEstateOwnerMessage(msg, "texturecommit", invoice, strings); - return TRUE; -} - -BOOL LLPanelRegionTextureInfo::validateTextureSizes() +BOOL LLPanelRegionTerrainInfo::validateTextureSizes() { for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) { @@ -1189,17 +1088,11 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes() return TRUE; } - -// static -void LLPanelRegionTextureInfo::onClickDump(void* data) -{ - llinfos << "LLPanelRegionTextureInfo::onClickDump()" << llendl; -} - - ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionTerrainInfo ///////////////////////////////////////////////////////////////////////////// +// Initialize statics + BOOL LLPanelRegionTerrainInfo::postBuild() { LLPanelRegionInfo::postBuild(); @@ -1209,41 +1102,82 @@ BOOL LLPanelRegionTerrainInfo::postBuild() initHelpBtn("terrain_lower_help", "HelpRegionTerrainLower"); initHelpBtn("upload_raw_help", "HelpRegionUploadRaw"); initHelpBtn("download_raw_help", "HelpRegionDownloadRaw"); - initHelpBtn("use_estate_sun_help", "HelpRegionUseEstateSun"); - initHelpBtn("fixed_sun_help", "HelpRegionFixedSun"); initHelpBtn("bake_terrain_help", "HelpRegionBakeTerrain"); initCtrl("water_height_spin"); initCtrl("terrain_raise_spin"); initCtrl("terrain_lower_spin"); - initCtrl("fixed_sun_check"); - childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this); - childSetCommitCallback("use_estate_sun_check", onChangeUseEstateTime, this); - childSetCommitCallback("sun_hour_slider", onChangeSunHour, this); + std::string buffer; + for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) + { + buffer = llformat("texture_detail_%d", i); + initCtrl(buffer); + } + + for(S32 i = 0; i < CORNER_COUNT; ++i) + { + buffer = llformat("height_start_spin_%d", i); + initCtrl(buffer); + buffer = llformat("height_range_spin_%d", i); + initCtrl(buffer); + } childSetAction("download_raw_btn", onClickDownloadRaw, this); childSetAction("upload_raw_btn", onClickUploadRaw, this); childSetAction("bake_terrain_btn", onClickBakeTerrain, this); - return TRUE; + return LLPanelRegionInfo::postBuild(); } // virtual bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) { - llinfos << "LLPanelRegionTerrainInfo::refreshFromRegion" << llendl; - BOOL owner_or_god = gAgent.isGodlike() || (region && (region->getOwner() == gAgent.getID())); BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager()); setCtrlsEnabled(owner_or_god_or_manager); - childDisable("apply_btn"); - childSetEnabled("download_raw_btn", owner_or_god); - childSetEnabled("upload_raw_btn", owner_or_god); - childSetEnabled("bake_terrain_btn", owner_or_god); + getChildView("apply_btn")->setEnabled(FALSE); + + if (region) + { + getChild("region_text")->setValue(LLSD(region->getName())); + + LLVLComposition* compp = region->getComposition(); + LLTextureCtrl* texture_ctrl; + std::string buffer; + for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) + { + buffer = llformat("texture_detail_%d", i); + texture_ctrl = getChild(buffer); + if(texture_ctrl) + { + lldebugs << "Detail Texture " << i << ": " + << compp->getDetailTextureID(i) << llendl; + LLUUID tmp_id(compp->getDetailTextureID(i)); + texture_ctrl->setImageAssetID(tmp_id); + } + } + + for(S32 i = 0; i < CORNER_COUNT; ++i) + { + buffer = llformat("height_start_spin_%d", i); + getChild(buffer)->setValue(LLSD(compp->getStartHeight(i))); + buffer = llformat("height_range_spin_%d", i); + getChild(buffer)->setValue(LLSD(compp->getHeightRange(i))); + } + } + else + { + lldebugs << "no region set" << llendl; + getChild("region_text")->setValue(LLSD("")); + } + + getChildView("download_raw_btn")->setEnabled(owner_or_god); + getChildView("upload_raw_btn")->setEnabled(owner_or_god); + getChildView("bake_terrain_btn")->setEnabled(owner_or_god); return LLPanelRegionInfo::refreshFromRegion(region); } @@ -1257,88 +1191,64 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() strings_t strings; LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); - buffer = llformat("%f", (F32)childGetValue("water_height_spin").asReal()); - strings.push_back(buffer); - buffer = llformat("%f", (F32)childGetValue("terrain_raise_spin").asReal()); - strings.push_back(buffer); - buffer = llformat("%f", (F32)childGetValue("terrain_lower_spin").asReal()); - strings.push_back(buffer); - buffer = llformat("%s", (childGetValue("use_estate_sun_check").asBoolean() ? "Y" : "N")); - strings.push_back(buffer); - buffer = llformat("%s", (childGetValue("fixed_sun_check").asBoolean() ? "Y" : "N")); - strings.push_back(buffer); - buffer = llformat("%f", (F32)childGetValue("sun_hour_slider").asReal() ); - strings.push_back(buffer); + // update the model + LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); + region_info.mWaterHeight = (F32) getChild("water_height_spin")->getValue().asReal(); + region_info.mTerrainRaiseLimit = (F32) getChild("terrain_raise_spin")->getValue().asReal(); + region_info.mTerrainLowerLimit = (F32) getChild("terrain_lower_spin")->getValue().asReal(); - // Grab estate information in case the user decided to set the - // region back to estate time. JC - LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance(); - if (!floater) return true; + // and sync the region with it + region_info.sendRegionTerrain(invoice); - LLTabContainer* tab = floater->getChild("region_panels"); - if (!tab) return true; + // ======================================= + // Assemble and send texturedetail message - LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild("Estate"); - if (!panel) return true; - - BOOL estate_global_time = panel->getGlobalTime(); - BOOL estate_fixed_sun = panel->getFixedSun(); - F32 estate_sun_hour; - if (estate_global_time) + // Make sure user hasn't chosen wacky textures. + if (!validateTextureSizes()) { - estate_sun_hour = 0.f; - } - else - { - estate_sun_hour = panel->getSunHour(); + return FALSE; } - buffer = llformat("%s", (estate_global_time ? "Y" : "N") ); - strings.push_back(buffer); - buffer = llformat("%s", (estate_fixed_sun ? "Y" : "N") ); - strings.push_back(buffer); - buffer = llformat("%f", estate_sun_hour); - strings.push_back(buffer); + LLTextureCtrl* texture_ctrl; + std::string id_str; + LLMessageSystem* msg = gMessageSystem; + + for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) + { + buffer = llformat("texture_detail_%d", i); + texture_ctrl = getChild(buffer); + if(texture_ctrl) + { + LLUUID tmp_id(texture_ctrl->getImageAssetID()); + tmp_id.toString(id_str); + buffer = llformat("%d %s", i, id_str.c_str()); + strings.push_back(buffer); + } + } + sendEstateOwnerMessage(msg, "texturedetail", invoice, strings); + strings.clear(); + + // ======================================== + // Assemble and send textureheights message + + for(S32 i = 0; i < CORNER_COUNT; ++i) + { + buffer = llformat("height_start_spin_%d", i); + std::string buffer2 = llformat("height_range_spin_%d", i); + std::string buffer3 = llformat("%d %f %f", i, (F32)getChild(buffer)->getValue().asReal(), (F32)getChild(buffer2)->getValue().asReal()); + strings.push_back(buffer3); + } + sendEstateOwnerMessage(msg, "textureheights", invoice, strings); + strings.clear(); + + // ======================================== + // Send texturecommit message + + sendEstateOwnerMessage(msg, "texturecommit", invoice, strings); - sendEstateOwnerMessage(gMessageSystem, "setregionterrain", invoice, strings); return TRUE; } -// static -void LLPanelRegionTerrainInfo::onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data) -{ - LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data; - if (!panel) return; - BOOL use_estate_sun = panel->childGetValue("use_estate_sun_check").asBoolean(); - panel->childSetEnabled("fixed_sun_check", !use_estate_sun); - panel->childSetEnabled("sun_hour_slider", !use_estate_sun); - if (use_estate_sun) - { - panel->childSetValue("fixed_sun_check", LLSD(FALSE)); - panel->childSetValue("sun_hour_slider", LLSD(0.f)); - } - panel->childEnable("apply_btn"); -} - -// static -void LLPanelRegionTerrainInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data) -{ - LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data; - if (!panel) return; - // Just enable the apply button. We let the sun-hour slider be enabled - // for both fixed-sun and non-fixed-sun. JC - panel->childEnable("apply_btn"); -} - -// static -void LLPanelRegionTerrainInfo::onChangeSunHour(LLUICtrl* ctrl, void*) -{ - // can't use userdata to get panel, slider uses it internally - LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) ctrl->getParent(); - if (!panel) return; - panel->childEnable("apply_btn"); -} - // static void LLPanelRegionTerrainInfo::onClickDownloadRaw(void* data) { @@ -1417,6 +1327,9 @@ LLPanelEstateInfo::LLPanelEstateInfo() : LLPanelRegionInfo(), mEstateID(0) // invalid { + LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); + estate_info.setCommitCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this)); + estate_info.setUpdateCallback(boost::bind(&LLPanelEstateInfo::refreshFromEstate, this)); } // static @@ -1439,55 +1352,12 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch) estate_dispatch_initialized = true; } -// static -// Disables the sun-hour slider and the use fixed time check if the use global time is check -void LLPanelEstateInfo::onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data) -{ - LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data; - if (panel) - { - bool enabled = !panel->childGetValue("use_global_time_check").asBoolean(); - panel->childSetEnabled("sun_hour_slider", enabled); - panel->childSetEnabled("fixed_sun_check", enabled); - panel->childSetValue("fixed_sun_check", LLSD(FALSE)); - panel->enableButton("apply_btn"); - } -} - -// Enables the sun-hour slider if the fixed-sun checkbox is set -void LLPanelEstateInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data) -{ - LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data; - if (panel) - { - bool enabled = !panel->childGetValue("fixed_sun_check").asBoolean(); - panel->childSetEnabled("use_global_time_check", enabled); - panel->childSetValue("use_global_time_check", LLSD(FALSE)); - panel->enableButton("apply_btn"); - } -} - - - - //--------------------------------------------------------------------------- // Add/Remove estate access button callbacks //--------------------------------------------------------------------------- -void LLPanelEstateInfo::onClickEditSky(void* user_data) +void LLPanelEstateInfo::onClickAddAllowedAgent() { - LLFloaterWindLight::show(); -} - -void LLPanelEstateInfo::onClickEditDayCycle(void* user_data) -{ - LLFloaterDayCycle::show(); -} - -// static -void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data) -{ - LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; - LLCtrlListInterface *list = self->childGetListInterface("allowed_avatar_name_list"); + LLCtrlListInterface *list = childGetListInterface("allowed_avatar_name_list"); if (!list) return; if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) { @@ -1501,17 +1371,14 @@ void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data) accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd"); } -// static -void LLPanelEstateInfo::onClickRemoveAllowedAgent(void* user_data) +void LLPanelEstateInfo::onClickRemoveAllowedAgent() { accessRemoveCore(ESTATE_ACCESS_ALLOWED_AGENT_REMOVE, "EstateAllowedAgentRemove", "allowed_avatar_name_list"); } -// static -void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data) +void LLPanelEstateInfo::onClickAddAllowedGroup() { - LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; - LLCtrlListInterface *list = self->childGetListInterface("allowed_group_name_list"); + LLCtrlListInterface *list = childGetListInterface("allowed_group_name_list"); if (!list) return; if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) { @@ -1522,7 +1389,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup(void* user_data) } LLNotification::Params params("ChangeLindenAccess"); - params.functor(boost::bind(&LLPanelEstateInfo::addAllowedGroup, self, _1, _2)); + params.functor(boost::bind(&LLPanelEstateInfo::addAllowedGroup, this, _1, _2)); if (isLindenEstate()) { LLNotifications::instance().add(params); @@ -1540,8 +1407,7 @@ bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& re LLFloater* parent_floater = gFloaterView->getParentFloater(this); - LLFloaterGroupPicker* widget; - widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); + LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); if (widget) { widget->setSelectCallback(addAllowedGroup2, NULL); @@ -1556,17 +1422,14 @@ bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& re return false; } -// static -void LLPanelEstateInfo::onClickRemoveAllowedGroup(void* user_data) +void LLPanelEstateInfo::onClickRemoveAllowedGroup() { accessRemoveCore(ESTATE_ACCESS_ALLOWED_GROUP_REMOVE, "EstateAllowedGroupRemove", "allowed_group_name_list"); } -// static -void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data) +void LLPanelEstateInfo::onClickAddBannedAgent() { - LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; - LLCtrlListInterface *list = self->childGetListInterface("banned_avatar_name_list"); + LLCtrlListInterface *list = childGetListInterface("banned_avatar_name_list"); if (!list) return; if (list->getItemCount() >= ESTATE_MAX_ACCESS_IDS) { @@ -1578,17 +1441,15 @@ void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data) accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd"); } -// static -void LLPanelEstateInfo::onClickRemoveBannedAgent(void* user_data) +void LLPanelEstateInfo::onClickRemoveBannedAgent() { accessRemoveCore(ESTATE_ACCESS_BANNED_AGENT_REMOVE, "EstateBannedAgentRemove", "banned_avatar_name_list"); } // static -void LLPanelEstateInfo::onClickAddEstateManager(void* user_data) +void LLPanelEstateInfo::onClickAddEstateManager() { - LLPanelEstateInfo* self = (LLPanelEstateInfo*)user_data; - LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list"); + LLCtrlListInterface *list = childGetListInterface("estate_manager_name_list"); if (!list) return; if (list->getItemCount() >= ESTATE_MAX_MANAGERS) { // Tell user they can't add more managers @@ -1603,7 +1464,7 @@ void LLPanelEstateInfo::onClickAddEstateManager(void* user_data) } // static -void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data) +void LLPanelEstateInfo::onClickRemoveEstateManager() { accessRemoveCore(ESTATE_ACCESS_MANAGER_REMOVE, "EstateManagerRemove", "estate_manager_name_list"); } @@ -1611,25 +1472,17 @@ void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data) //--------------------------------------------------------------------------- // Kick from estate methods //--------------------------------------------------------------------------- -struct LLKickFromEstateInfo -{ - LLPanelEstateInfo *mEstatePanelp; - LLUUID mAgentID; -}; -void LLPanelEstateInfo::onClickKickUser(void *user_data) +void LLPanelEstateInfo::onClickKickUser() { - LLPanelEstateInfo* panelp = (LLPanelEstateInfo*)user_data; - // this depends on the grandparent view being a floater // in order to set up floater dependency - LLFloater* parent_floater = gFloaterView->getParentFloater(panelp); - LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, panelp, _1, _2), FALSE, TRUE); + LLFloater* parent_floater = gFloaterView->getParentFloater(this); + LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1, _2), FALSE, TRUE); if (child_floater) { parent_floater->addDependentFloater(child_floater); } - parent_floater->addDependentFloater(child_floater); } void LLPanelEstateInfo::onKickUserCommit(const uuid_vec_t& ids, const std::vector& names) @@ -1642,11 +1495,6 @@ void LLPanelEstateInfo::onKickUserCommit(const uuid_vec_t& ids, const std::vecto return; } - //keep track of what user they want to kick and other misc info - LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo(); - kick_info->mEstatePanelp = this; - kick_info->mAgentID = ids[0]; - //Bring up a confirmation dialog LLSD args; args["EVIL_USER"] = names[0].getCompleteName(); @@ -1714,14 +1562,10 @@ std::string all_estates_text() // static bool LLPanelEstateInfo::isLindenEstate() { - LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); - if (!panel) return false; - - U32 estate_id = panel->getEstateID(); + U32 estate_id = LLEstateInfoModel::instance().getID(); return (estate_id <= ESTATE_LAST_LINDEN); } -typedef std::vector AgentOrGroupIDsVector; struct LLEstateAccessChangeInfo { LLEstateAccessChangeInfo(const LLSD& sd) @@ -1742,7 +1586,7 @@ struct LLEstateAccessChangeInfo LLSD sd; sd["name"] = mDialogName; sd["operation"] = (S32)mOperationFlag; - for (AgentOrGroupIDsVector::const_iterator it = mAgentOrGroupIDs.begin(); + for (uuid_vec_t::const_iterator it = mAgentOrGroupIDs.begin(); it != mAgentOrGroupIDs.end(); ++it) { @@ -1753,12 +1597,12 @@ struct LLEstateAccessChangeInfo U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc. std::string mDialogName; - AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change + uuid_vec_t mAgentOrGroupIDs; // List of agent IDs to apply to this change }; -// Special case callback for groups, since it has different callback format than names // static -void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data) +// Special case callback for groups, since it has different callback format than names +void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void*) { LLSD payload; payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD; @@ -2065,31 +1909,64 @@ void LLPanelEstateInfo::sendEstateAccessDelta(U32 flags, const LLUUID& agent_or_ gAgent.sendReliableMessage(); } +// static +void LLPanelEstateInfo::updateEstateOwnerName(const std::string& name) +{ + LLPanelEstateInfo* panelp = LLFloaterRegionInfo::getPanelEstate(); + if (panelp) + { + panelp->setOwnerName(name); + } +} + +// static +void LLPanelEstateInfo::updateEstateName(const std::string& name) +{ + LLPanelEstateInfo* panelp = LLFloaterRegionInfo::getPanelEstate(); + if (panelp) + { + panelp->getChildRef("estate_name").setText(name); + } +} + void LLPanelEstateInfo::updateControls(LLViewerRegion* region) { BOOL god = gAgent.isGodlike(); BOOL owner = (region && (region->getOwner() == gAgent.getID())); BOOL manager = (region && region->isEstateManager()); setCtrlsEnabled(god || owner || manager); - childDisable("apply_btn"); - childSetEnabled("add_allowed_avatar_btn", god || owner || manager); - childSetEnabled("remove_allowed_avatar_btn", god || owner || manager); - childSetEnabled("add_allowed_group_btn", god || owner || manager); - childSetEnabled("remove_allowed_group_btn", god || owner || manager); - childSetEnabled("add_banned_avatar_btn", god || owner || manager); - childSetEnabled("remove_banned_avatar_btn", god || owner || manager); - childSetEnabled("message_estate_btn", god || owner || manager); - childSetEnabled("kick_user_from_estate_btn", god || owner || manager); -#if ELAR_ENABLED - childSetEnabled("abuse_email_address", god || owner || manager); -#else - childSetEnabled("abuse_email_address", false); -#endif + + BOOL has_allowed_avatar = getChild("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; + BOOL has_allowed_group = getChild("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE; + BOOL has_banned_agent = getChild("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; + BOOL has_estate_manager = getChild("estate_manager_name_list")->getFirstSelected() ? TRUE : FALSE; + + getChildView("add_allowed_avatar_btn")->setEnabled(god || owner || manager); + getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && (god || owner || manager)); + getChildView("allowed_avatar_name_list")->setEnabled(god || owner || manager); + + getChildView("add_allowed_group_btn")->setEnabled(god || owner || manager); + getChildView("remove_allowed_group_btn")->setEnabled(has_allowed_group && (god || owner || manager) ); + getChildView("allowed_group_name_list")->setEnabled(god || owner || manager); + + // Can't ban people from mainland, orientation islands, etc. because this + // creates much network traffic and server load. + // Disable their accounts in CSR tool instead. + bool linden_estate = isLindenEstate(); + bool enable_ban = (god || owner || manager) && !linden_estate; + getChildView("add_banned_avatar_btn")->setEnabled(enable_ban); + getChildView("remove_banned_avatar_btn")->setEnabled(has_banned_agent && enable_ban); + getChildView("banned_avatar_name_list")->setEnabled(god || owner || manager); + + getChildView("message_estate_btn")->setEnabled(god || owner || manager); + getChildView("kick_user_from_estate_btn")->setEnabled(god || owner || manager); // estate managers can't add estate managers - childSetEnabled("add_estate_manager_btn", god || owner); - childSetEnabled("remove_estate_manager_btn", god || owner); - childSetEnabled("estate_manager_name_list", god || owner); + getChildView("add_estate_manager_btn")->setEnabled(god || owner); + getChildView("remove_estate_manager_btn")->setEnabled(has_estate_manager && (god || owner)); + getChildView("estate_manager_name_list")->setEnabled(god || owner); + + refresh(); } bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) @@ -2123,14 +2000,8 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) { - if (checkRemovalButton(child_ctrl->getName())) - { - // do nothing - } - else if (checkSunHourSlider(child_ctrl)) - { - // do nothing - } + // Ensure appropriate state of the management ui. + updateControls(gAgent.getRegion()); } bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) @@ -2144,35 +2015,19 @@ BOOL LLPanelEstateInfo::postBuild() { // set up the callbacks for the generic controls initCtrl("externally_visible_check"); - initCtrl("use_global_time_check"); - initCtrl("fixed_sun_check"); initCtrl("allow_direct_teleport"); initCtrl("limit_payment"); initCtrl("limit_age_verified"); initCtrl("voice_chat_check"); - childSetCommitCallback("abuse_email_address", onChangeAnything, this); - childSetKeystrokeCallback("abuse_email_address", onChangeText, this); - initHelpBtn("estate_manager_help", "HelpEstateEstateManager"); - initHelpBtn("use_global_time_help", "HelpEstateUseGlobalTime"); - initHelpBtn("fixed_sun_help", "HelpEstateFixedSun"); - initHelpBtn("WLEditSkyHelp", "HelpEditSky"); - initHelpBtn("WLEditDayCycleHelp", "HelpEditDayCycle"); - initHelpBtn("externally_visible_help", "HelpEstateExternallyVisible"); initHelpBtn("allow_direct_teleport_help", "HelpEstateAllowDirectTeleport"); initHelpBtn("allow_resident_help", "HelpEstateAllowResident"); initHelpBtn("allow_group_help", "HelpEstateAllowGroup"); initHelpBtn("ban_resident_help", "HelpEstateBanResident"); - initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress"); initHelpBtn("voice_chat_help", "HelpEstateVoiceChat"); - // set up the use global time checkbox - childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this); - childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this); - childSetCommitCallback("sun_hour_slider", onChangeChildCtrl, this); - - childSetCommitCallback("allowed_avatar_name_list", onChangeChildCtrl, this); + getChild("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl *avatar_name_list = getChild("allowed_avatar_name_list"); if (avatar_name_list) { @@ -2180,10 +2035,10 @@ BOOL LLPanelEstateInfo::postBuild() avatar_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } - childSetAction("add_allowed_avatar_btn", onClickAddAllowedAgent, this); - childSetAction("remove_allowed_avatar_btn", onClickRemoveAllowedAgent, this); + childSetAction("add_allowed_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickAddAllowedAgent, this)); + childSetAction("remove_allowed_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveAllowedAgent, this)); - childSetCommitCallback("allowed_group_name_list", onChangeChildCtrl, this); + getChild("allowed_group_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl* group_name_list = getChild("allowed_group_name_list"); if (group_name_list) { @@ -2191,10 +2046,10 @@ BOOL LLPanelEstateInfo::postBuild() group_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } - childSetAction("add_allowed_group_btn", onClickAddAllowedGroup, this); - childSetAction("remove_allowed_group_btn", onClickRemoveAllowedGroup, this); + getChild("add_allowed_group_btn")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onClickAddAllowedGroup, this)); + childSetAction("remove_allowed_group_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveAllowedGroup, this)); - childSetCommitCallback("banned_avatar_name_list", onChangeChildCtrl, this); + getChild("banned_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl* banned_name_list = getChild("banned_avatar_name_list"); if (banned_name_list) { @@ -2202,10 +2057,10 @@ BOOL LLPanelEstateInfo::postBuild() banned_name_list->setMaxItemCount(ESTATE_MAX_ACCESS_IDS); } - childSetAction("add_banned_avatar_btn", onClickAddBannedAgent, this); - childSetAction("remove_banned_avatar_btn", onClickRemoveBannedAgent, this); + childSetAction("add_banned_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickAddBannedAgent, this)); + childSetAction("remove_banned_avatar_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveBannedAgent, this)); - childSetCommitCallback("estate_manager_name_list", onChangeChildCtrl, this); + getChild("estate_manager_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl* manager_name_list = getChild("estate_manager_name_list"); if (manager_name_list) { @@ -2213,31 +2068,49 @@ BOOL LLPanelEstateInfo::postBuild() manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue } - childSetAction("add_estate_manager_btn", onClickAddEstateManager, this); - childSetAction("remove_estate_manager_btn", onClickRemoveEstateManager, this); - childSetAction("message_estate_btn", onClickMessageEstate, this); - childSetAction("kick_user_from_estate_btn", onClickKickUser, this); - - childSetAction("WLEditSky", onClickEditSky, this); - childSetAction("WLEditDayCycle", onClickEditDayCycle, this); + childSetAction("add_estate_manager_btn", boost::bind(&LLPanelEstateInfo::onClickAddEstateManager, this)); + childSetAction("remove_estate_manager_btn", boost::bind(&LLPanelEstateInfo::onClickRemoveEstateManager, this)); + childSetAction("message_estate_btn", boost::bind(&LLPanelEstateInfo::onClickMessageEstate, this)); + childSetAction("kick_user_from_estate_btn", boost::bind(&LLPanelEstateInfo::onClickKickUser, this)); return LLPanelRegionInfo::postBuild(); } void LLPanelEstateInfo::refresh() { - bool public_access = childGetValue("externally_visible_check").asBoolean(); - childSetEnabled("Only Allow", public_access); - childSetEnabled("limit_payment", public_access); - childSetEnabled("limit_age_verified", public_access); + // Disable access restriction controls if they make no sense. + bool public_access = getChild("externally_visible_check")->getValue().asBoolean(); + + getChildView("Only Allow")->setEnabled(public_access); + getChildView("limit_payment")->setEnabled(public_access); + getChildView("limit_age_verified")->setEnabled(public_access); + // if this is set to false, then the limit fields are meaningless and should be turned off if (public_access == false) { - childSetValue("limit_payment", false); - childSetValue("limit_age_verified", false); + getChild("limit_payment")->setValue(false); + getChild("limit_age_verified")->setValue(false); } } +void LLPanelEstateInfo::refreshFromEstate() +{ + const LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); + + getChild("estate_name")->setValue(estate_info.getName()); + LLAvatarNameCache::get(estate_info.getOwnerID(), boost::bind(&LLPanelEstateInfo::setOwnerPNSName, this, _1, _2)); + + getChild("externally_visible_check")->setValue(estate_info.getIsExternallyVisible()); + getChild("voice_chat_check")->setValue(estate_info.getAllowVoiceChat()); + getChild("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport()); + getChild("limit_payment")->setValue(estate_info.getDenyAnonymous()); + getChild("limit_age_verified")->setValue(estate_info.getDenyAgeUnverified()); + + // Ensure appriopriate state of the management UI + updateControls(gAgent.getRegion()); + refresh(); +} + BOOL LLPanelEstateInfo::sendUpdate() { llinfos << "LLPanelEsateInfo::sendUpdate()" << llendl; @@ -2245,7 +2118,7 @@ BOOL LLPanelEstateInfo::sendUpdate() LLNotification::Params params("ChangeLindenEstate"); params.functor(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2)); - if (getEstateID() <= ESTATE_LAST_LINDEN) + if (isLindenEstate()) { // trying to change reserved estate, warn LLNotifications::instance().add(params); @@ -2264,12 +2137,19 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con switch(option) { case 0: - // send the update - if (!commitEstateInfoCaps()) { - // the caps method failed, try the old way - LLFloaterRegionInfo::nextInvoice(); - commitEstateInfoDataserver(); + LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); + + // update model + estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore + estate_info.setIsExternallyVisible(getChild("externally_visible_check")->getValue().asBoolean()); + estate_info.setAllowDirectTeleport(getChild("allow_direct_teleport")->getValue().asBoolean()); + estate_info.setDenyAnonymous(getChild("limit_payment")->getValue().asBoolean()); + estate_info.setDenyAgeUnverified(getChild("limit_age_verified")->getValue().asBoolean()); + estate_info.setAllowVoiceChat(getChild("voice_chat_check")->getValue().asBoolean()); + + // send the update to sim + estate_info.sendEstateInfo(); } // we don't want to do this because we'll get it automatically from the sim @@ -2350,270 +2230,21 @@ private: LLHandle mpPanel; }; -// tries to send estate info using a cap; returns true if it succeeded -bool LLPanelEstateInfo::commitEstateInfoCaps() -{ - std::string url = gAgent.getRegion()->getCapability("EstateChangeInfo"); - - if (url.empty()) - { - // whoops, couldn't find the cap, so bail out - return false; - } - - LLSD body; - body["estate_name"] = getEstateName(); - - body["is_externally_visible"] = childGetValue("externally_visible_check").asBoolean(); - body["allow_direct_teleport"] = childGetValue("allow_direct_teleport").asBoolean(); - body["is_sun_fixed" ] = childGetValue("fixed_sun_check").asBoolean(); - body["deny_anonymous" ] = childGetValue("limit_payment").asBoolean(); - body["deny_age_unverified" ] = childGetValue("limit_age_verified").asBoolean(); - body["allow_voice_chat" ] = childGetValue("voice_chat_check").asBoolean(); - body["invoice" ] = LLFloaterRegionInfo::getLastInvoice(); - - // block fly is in estate database but not in estate UI, so we're not supporting it - //body["block_fly" ] = childGetValue("").asBoolean(); - - F32 sun_hour = getSunHour(); - if (childGetValue("use_global_time_check").asBoolean()) - { - sun_hour = 0.f; // 0 = global time - } - body["sun_hour"] = sun_hour; - - body["owner_abuse_email"] = childGetValue("abuse_email_address").asString(); - - // we use a responder so that we can re-get the data after committing to the database - LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder(this)); - return true; -} - -/* This is the old way of doing things, is deprecated, and should be - deleted when the dataserver model can be removed */ -// key = "estatechangeinfo" -// strings[0] = str(estate_id) (added by simulator before relay - not here) -// strings[1] = estate_name -// strings[2] = str(estate_flags) -// strings[3] = str((S32)(sun_hour * 1024.f)) -void LLPanelEstateInfo::commitEstateInfoDataserver() -{ - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("EstateOwnerMessage"); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used - - msg->nextBlock("MethodData"); - msg->addString("Method", "estatechangeinfo"); - msg->addUUID("Invoice", LLFloaterRegionInfo::getLastInvoice()); - - msg->nextBlock("ParamList"); - msg->addString("Parameter", getEstateName()); - - std::string buffer; - buffer = llformat("%u", computeEstateFlags()); - msg->nextBlock("ParamList"); - msg->addString("Parameter", buffer); - - F32 sun_hour = getSunHour(); - if (childGetValue("use_global_time_check").asBoolean()) - { - sun_hour = 0.f; // 0 = global time - } - - buffer = llformat("%d", (S32)(sun_hour*1024.0f)); - msg->nextBlock("ParamList"); - msg->addString("Parameter", buffer); - - gAgent.sendMessage(); -} - -void LLPanelEstateInfo::setEstateFlags(U32 flags) -{ - childSetValue("externally_visible_check", LLSD(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE) ); - childSetValue("fixed_sun_check", LLSD(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE) ); - childSetValue( - "voice_chat_check", - LLSD(flags & REGION_FLAGS_ALLOW_VOICE ? TRUE : FALSE)); - childSetValue("allow_direct_teleport", LLSD(flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT ? TRUE : FALSE) ); - childSetValue("limit_payment", LLSD(flags & REGION_FLAGS_DENY_ANONYMOUS ? TRUE : FALSE) ); - childSetValue("limit_age_verified", LLSD(flags & REGION_FLAGS_DENY_AGEUNVERIFIED ? TRUE : FALSE) ); - - refresh(); -} - -U32 LLPanelEstateInfo::computeEstateFlags() -{ - U32 flags = 0; - - if (childGetValue("externally_visible_check").asBoolean()) - { - flags |= REGION_FLAGS_EXTERNALLY_VISIBLE; - } - - if ( childGetValue("voice_chat_check").asBoolean() ) - { - flags |= REGION_FLAGS_ALLOW_VOICE; - } - - if (childGetValue("allow_direct_teleport").asBoolean()) - { - flags |= REGION_FLAGS_ALLOW_DIRECT_TELEPORT; - } - - if (childGetValue("fixed_sun_check").asBoolean()) - { - flags |= REGION_FLAGS_SUN_FIXED; - } - - if (childGetValue("limit_payment").asBoolean()) - { - flags |= REGION_FLAGS_DENY_ANONYMOUS; - } - - if (childGetValue("limit_age_verified").asBoolean()) - { - flags |= REGION_FLAGS_DENY_AGEUNVERIFIED; - } - - - return flags; -} - -BOOL LLPanelEstateInfo::getGlobalTime() -{ - return childGetValue("use_global_time_check").asBoolean(); -} - -void LLPanelEstateInfo::setGlobalTime(bool b) -{ - childSetValue("use_global_time_check", LLSD(b)); - childSetEnabled("fixed_sun_check", LLSD(!b)); - childSetEnabled("sun_hour_slider", LLSD(!b)); - if (b) - { - childSetValue("sun_hour_slider", LLSD(0.f)); - } -} - - -BOOL LLPanelEstateInfo::getFixedSun() -{ - return childGetValue("fixed_sun_check").asBoolean(); -} - -void LLPanelEstateInfo::setSunHour(F32 sun_hour) -{ - if(sun_hour < 6.0f) - { - sun_hour = 24.0f + sun_hour; - } - childSetValue("sun_hour_slider", LLSD(sun_hour)); -} - -F32 LLPanelEstateInfo::getSunHour() -{ - if (childIsEnabled("sun_hour_slider")) - { - return (F32)childGetValue("sun_hour_slider").asReal(); - } - return 0.f; -} - -const std::string LLPanelEstateInfo::getEstateName() const -{ - return childGetValue("estate_name").asString(); -} - -void LLPanelEstateInfo::setEstateName(const std::string& name) -{ - childSetValue("estate_name", LLSD(name)); -} - const std::string LLPanelEstateInfo::getOwnerName() const { - return childGetValue("estate_owner").asString(); + return getChild("estate_owner")->getValue().asString(); } void LLPanelEstateInfo::setOwnerName(const std::string& name) { - childSetValue("estate_owner", LLSD(name)); + getChild("estate_owner")->setValue(LLSD(name)); } -const std::string LLPanelEstateInfo::getAbuseEmailAddress() const +void LLPanelEstateInfo::setOwnerPNSName(const LLUUID& agent_id, const LLAvatarName& av_name) { - return childGetValue("abuse_email_address").asString(); -} - -void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address) -{ - childSetValue("abuse_email_address", LLSD(address)); -} - -void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, - bool enable_group, - bool enable_ban) -{ - childSetEnabled("allow_resident_label", enable_agent); - childSetEnabled("allowed_avatar_name_list", enable_agent); - childSetVisible("allowed_avatar_name_list", enable_agent); - childSetEnabled("add_allowed_avatar_btn", enable_agent); - childSetEnabled("remove_allowed_avatar_btn", enable_agent); - - // Groups - childSetEnabled("allow_group_label", enable_group); - childSetEnabled("allowed_group_name_list", enable_group); - childSetVisible("allowed_group_name_list", enable_group); - childSetEnabled("add_allowed_group_btn", enable_group); - childSetEnabled("remove_allowed_group_btn", enable_group); - - // Ban - childSetEnabled("ban_resident_label", enable_ban); - childSetEnabled("banned_avatar_name_list", enable_ban); - childSetVisible("banned_avatar_name_list", enable_ban); - childSetEnabled("add_banned_avatar_btn", enable_ban); - childSetEnabled("remove_banned_avatar_btn", enable_ban); - - // Update removal buttons if needed - if (enable_agent) - { - checkRemovalButton("allowed_avatar_name_list"); - } - - if (enable_group) - { - checkRemovalButton("allowed_group_name_list"); - } - - if (enable_ban) - { - checkRemovalButton("banned_avatar_name_list"); - } -} - -// static -void LLPanelEstateInfo::callbackCacheName( - const LLUUID& id, - const std::string& full_name, - bool is_group) -{ - LLPanelEstateInfo* self = LLFloaterRegionInfo::getPanelEstate(); - if (!self) return; - std::string name; - - if (id.isNull()) - { - name = "(none)"; - } - else - { - name = full_name; - } - - self->setOwnerName(name); + LLAvatarNameCache::getPNSName(av_name, name); + setOwnerName(name); } void LLPanelEstateInfo::clearAccessLists() @@ -2629,50 +2260,7 @@ void LLPanelEstateInfo::clearAccessLists() { name_list->deleteAllItems(); } -} - -// enables/disables the "remove" button for the various allow/ban lists -BOOL LLPanelEstateInfo::checkRemovalButton(std::string name) -{ - std::string btn_name = ""; - if (name == "allowed_avatar_name_list") - { - btn_name = "remove_allowed_avatar_btn"; - } - else if (name == "allowed_group_name_list") - { - btn_name = "remove_allowed_group_btn"; - } - else if (name == "banned_avatar_name_list") - { - btn_name = "remove_banned_avatar_btn"; - } - else if (name == "estate_manager_name_list") - { - //ONLY OWNER CAN ADD /DELET ESTATE MANAGER - LLViewerRegion* region = gAgent.getRegion(); - if (region && (region->getOwner() == gAgent.getID())) - { - btn_name = "remove_estate_manager_btn"; - } - } - - // enable the remove button if something is selected - LLNameListCtrl* name_list = getChild(name); - childSetEnabled(btn_name, name_list && name_list->getFirstSelected() ? TRUE : FALSE); - - return (btn_name != ""); -} - -BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl) -{ - BOOL found_child_ctrl = FALSE; - if (child_ctrl->getName() == "sun_hour_slider") - { - enableButton("apply_btn"); - found_child_ctrl = TRUE; - } - return found_child_ctrl; + updateControls(gAgent.getRegion()); } // static @@ -2701,7 +2289,8 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re } LLPanelEstateCovenant::LLPanelEstateCovenant() -: mCovenantID(LLUUID::null) + : + mCovenantID(LLUUID::null) { } @@ -2747,10 +2336,7 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region) } LLTextBox* region_landtype = getChild("region_landtype_text"); - if (region_landtype) - { - region_landtype->setText(region->getLocalizedSimProductName()); - } + region_landtype->setText(region->getLocalizedSimProductName()); // let the parent class handle the general data collection. bool rv = LLPanelRegionInfo::refreshFromRegion(region); @@ -2912,20 +2498,14 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, S32 file_length = file.getSize(); - char* buffer = new char[file_length+1]; - if (buffer == NULL) - { - llerrs << "Memory Allocation Failed" << llendl; - return; - } - - file.read((U8*)buffer, file_length); /* Flawfinder: ignore */ + std::vector buffer(file_length+1); + file.read((U8*)&buffer[0], file_length); // put a EOS at the end buffer[file_length] = 0; - if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) + if( (file_length > 19) && !strncmp( &buffer[0], "Linden text version", 19 ) ) { - if( !panelp->mEditor->importBuffer( buffer, file_length+1 ) ) + if( !panelp->mEditor->importBuffer( &buffer[0], file_length+1 ) ) { llwarns << "Problem importing estate covenant." << llendl; LLNotificationsUtil::add("ProblemImportingEstateCovenant"); @@ -2940,7 +2520,6 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs, // Version 0 (just text, doesn't include version number) panelp->sendChangeCovenantID(asset_uuid); } - delete[] buffer; } else { @@ -3082,64 +2661,12 @@ bool LLDispatchEstateUpdateInfo::operator()( const LLUUID& invoice, const sparam_t& strings) { - LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); - if (!panel) return true; + lldebugs << "Received estate update" << llendl; - // NOTE: LLDispatcher extracts strings with an extra \0 at the - // end. If we pass the std::string direct to the UI/renderer - // it draws with a weird character at the end of the string. - std::string estate_name = strings[0].c_str(); // preserve c_str() call! - panel->setEstateName(estate_name); - -#if ELAR_ENABLED - if (strings.size() > 9) - { - std::string abuse_email = strings[9].c_str(); // preserve c_str() call! - panel->setAbuseEmailAddress(abuse_email); - } - else -#endif - { - panel->setAbuseEmailAddress(panel->getString("email_unsupported")); - } - - LLViewerRegion* regionp = gAgent.getRegion(); - - LLUUID owner_id(strings[1]); - regionp->setOwner(owner_id); - // Update estate owner name in UI - gCacheName->get(owner_id, false, boost::bind(&LLPanelEstateInfo::callbackCacheName,_1,_2,_3)); - - U32 estate_id = strtoul(strings[2].c_str(), NULL, 10); - panel->setEstateID(estate_id); - - U32 flags = strtoul(strings[3].c_str(), NULL, 10); - panel->setEstateFlags(flags); - - F32 sun_hour = ((F32)(strtod(strings[4].c_str(), NULL)))/1024.0f; - if(sun_hour == 0 && (flags & REGION_FLAGS_SUN_FIXED ? FALSE : TRUE)) - { - panel->setGlobalTime(TRUE); - } - else - { - panel->setGlobalTime(FALSE); - panel->setSunHour(sun_hour); - } - - bool visible_from_mainland = (bool)(flags & REGION_FLAGS_EXTERNALLY_VISIBLE); - bool god = gAgent.isGodlike(); - bool linden_estate = (estate_id <= ESTATE_LAST_LINDEN); - - // If visible from mainland, disable the access allowed - // UI, as anyone can teleport there. - // However, gods need to be able to edit the access list for - // linden estates, regardless of visibility, to allow object - // and L$ transfers. - bool enable_agent = (!visible_from_mainland || (god && linden_estate)); - bool enable_group = enable_agent; - bool enable_ban = !linden_estate; - panel->setAccessAllowedEnabled(enable_agent, enable_group, enable_ban); + // Update estate info model. + // This will call LLPanelEstateInfo::refreshFromEstate(). + // *TODO: Move estate message handling stuff to llestateinfomodel.cpp. + LLEstateInfoModel::instance().update(strings); return true; } @@ -3211,7 +2738,7 @@ bool LLDispatchSetEstateAccess::operator()( args["[ALLOWEDAGENTS]"] = llformat ("%d", totalAllowedAgents); args["[MAXACCESS]"] = llformat ("%d", ESTATE_MAX_ACCESS_IDS); std::string msg = LLTrans::getString("RegionInfoAllowedResidents", args); - panel->childSetValue("allow_resident_label", LLSD(msg)); + panel->getChild("allow_resident_label")->setValue(LLSD(msg)); if (allowed_agent_name_list) { @@ -3223,7 +2750,6 @@ bool LLDispatchSetEstateAccess::operator()( memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ allowed_agent_name_list->addNameItem(id); } - panel->childSetEnabled("remove_allowed_avatar_btn", allowed_agent_name_list->getFirstSelected() ? TRUE : FALSE); allowed_agent_name_list->sortByName(TRUE); } } @@ -3237,7 +2763,7 @@ bool LLDispatchSetEstateAccess::operator()( args["[ALLOWEDGROUPS]"] = llformat ("%d", num_allowed_groups); args["[MAXACCESS]"] = llformat ("%d", ESTATE_MAX_GROUP_IDS); std::string msg = LLTrans::getString("RegionInfoAllowedGroups", args); - panel->childSetValue("allow_group_label", LLSD(msg)); + panel->getChild("allow_group_label")->setValue(LLSD(msg)); if (allowed_group_name_list) { @@ -3250,7 +2776,6 @@ bool LLDispatchSetEstateAccess::operator()( memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ allowed_group_name_list->addGroupNameItem(id); } - panel->childSetEnabled("remove_allowed_group_btn", allowed_group_name_list->getFirstSelected() ? TRUE : FALSE); allowed_group_name_list->sortByName(TRUE); } } @@ -3271,7 +2796,7 @@ bool LLDispatchSetEstateAccess::operator()( std::string msg = llformat("Banned residents: (%d, max %d)", totalBannedAgents, ESTATE_MAX_ACCESS_IDS); - panel->childSetValue("ban_resident_label", LLSD(msg)); + panel->getChild("ban_resident_label")->setValue(LLSD(msg)); if (banned_agent_name_list) { @@ -3284,7 +2809,6 @@ bool LLDispatchSetEstateAccess::operator()( memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ banned_agent_name_list->addNameItem(id); } - panel->childSetEnabled("remove_banned_avatar_btn", banned_agent_name_list->getFirstSelected() ? TRUE : FALSE); banned_agent_name_list->sortByName(TRUE); } } @@ -3294,7 +2818,7 @@ bool LLDispatchSetEstateAccess::operator()( std::string msg = llformat("Estate Managers: (%d, max %d)", num_estate_managers, ESTATE_MAX_MANAGERS); - panel->childSetValue("estate_manager_label", LLSD(msg)); + panel->getChild("estate_manager_label")->setValue(LLSD(msg)); LLNameListCtrl* estate_manager_name_list = panel->getChild("estate_manager_name_list"); @@ -3314,14 +2838,610 @@ bool LLDispatchSetEstateAccess::operator()( memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */ estate_manager_name_list->addNameItem(id); } - panel->childSetEnabled("remove_estate_manager_btn", estate_manager_name_list->getFirstSelected() ? TRUE : FALSE); estate_manager_name_list->sortByName(TRUE); } } + // Update the buttons which may change based on the list contents but also needs to account for general access features. + panel->updateControls(gAgent.getRegion()); + return true; } +LLPanelEnvironmentInfo::LLPanelEnvironmentInfo() +: mEnableEditing(false), + mRegionSettingsRadioGroup(NULL), + mDayCycleSettingsRadioGroup(NULL), + mWaterPresetCombo(NULL), + mSkyPresetCombo(NULL), + mDayCyclePresetCombo(NULL) +{ +} + +// virtual +BOOL LLPanelEnvironmentInfo::postBuild() +{ + mRegionSettingsRadioGroup = getChild("region_settings_radio_group"); + mRegionSettingsRadioGroup->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSwitchRegionSettings, this)); + + mDayCycleSettingsRadioGroup = getChild("sky_dayc_settings_radio_group"); + mDayCycleSettingsRadioGroup->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSwitchDayCycle, this)); + + mWaterPresetCombo = getChild("water_settings_preset_combo"); + mWaterPresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectWaterPreset, this)); + + mSkyPresetCombo = getChild("sky_settings_preset_combo"); + mSkyPresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectSkyPreset, this)); + + mDayCyclePresetCombo = getChild("dayc_settings_preset_combo"); + mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectDayCycle, this)); + + getChild("apply_btn")->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onBtnApply, this)); + //getChild("apply_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance())); + getChild("cancel_btn")->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onBtnCancel, this)); + //getChild("cancel_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpPresets, LLEnvManagerNew::getInstance())); + + LLEnvManagerNew::instance().setRegionSettingsChangeCallback(boost::bind(&LLPanelEnvironmentInfo::onRegionSettingschange, this)); + LLEnvManagerNew::instance().setRegionSettingsAppliedCallback(boost::bind(&LLPanelEnvironmentInfo::onRegionSettingsApplied, this, _1)); + + LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLPanelEnvironmentInfo::populateDayCyclesList, this)); + LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelEnvironmentInfo::populateSkyPresetsList, this)); + LLWaterParamManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelEnvironmentInfo::populateWaterPresetsList, this)); + + return TRUE; +} + +// virtual +void LLPanelEnvironmentInfo::onOpen(const LLSD& key) +{ + LL_DEBUGS("Windlight") << "Panel opened, refreshing" << LL_ENDL; + refresh(); +} + +// virtual +void LLPanelEnvironmentInfo::handleVisibilityChange(BOOL new_visibility) +{ + // If hiding (user switched to another tab or closed the floater), + // display user's preferred environment. + if (!new_visibility) + { + LLEnvManagerNew::instance().usePrefs(); + } +} + +// virtual +bool LLPanelEnvironmentInfo::refreshFromRegion(LLViewerRegion* region) +{ + LL_DEBUGS("Windlight") << "Region updated, enabling/disabling controls" << LL_ENDL; + BOOL owner_or_god = gAgent.isGodlike() || (region && (region->getOwner() == gAgent.getID())); + BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager()); + + // Don't refresh from region settings to avoid flicker after applying new region settings. + mEnableEditing = owner_or_god_or_manager; + setControlsEnabled(mEnableEditing); + + return LLPanelRegionInfo::refreshFromRegion(region); +} + +void LLPanelEnvironmentInfo::refresh() +{ + populateWaterPresetsList(); + populateSkyPresetsList(); + populateDayCyclesList(); + + // Init radio groups. + const LLEnvironmentSettings& settings = LLEnvManagerNew::instance().getRegionSettings(); + const LLSD& dc = settings.getWLDayCycle(); + LLSD::Real first_frame_time = dc.size() > 0 ? dc[0][0].asReal() : 0.0f; + const bool use_fixed_sky = dc.size() == 1 && first_frame_time < 0; + mRegionSettingsRadioGroup->setSelectedIndex(settings.getSkyMap().size() == 0 ? 0 : 1); + mDayCycleSettingsRadioGroup->setSelectedIndex(use_fixed_sky ? 0 : 1); + + setControlsEnabled(mEnableEditing); + + setDirty(false); +} + +void LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) +{ + mRegionSettingsRadioGroup->setEnabled(enabled); + mDayCycleSettingsRadioGroup->setEnabled(enabled); + + mWaterPresetCombo->setEnabled(enabled); + mSkyPresetCombo->setEnabled(enabled); + mDayCyclePresetCombo->setEnabled(enabled); + + getChildView("apply_btn")->setEnabled(enabled); + getChildView("cancel_btn")->setEnabled(enabled); + + if (enabled) + { + // Enable/disable some controls based on currently selected radio buttons. + bool use_defaults = mRegionSettingsRadioGroup->getSelectedIndex() == 0; + getChild("user_environment_settings")->setEnabled(!use_defaults); + + bool is_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0; + mSkyPresetCombo->setEnabled(is_fixed_sky); + mDayCyclePresetCombo->setEnabled(!is_fixed_sky); + } +} + +void LLPanelEnvironmentInfo::setApplyProgress(bool started) +{ + LLTextBox* indicator = getChild("progress_indicator"); + + indicator->setVisible(started); + +/* Singu TODO: LLLoadingIndicator + if (started) + { + indicator->start(); + } + else + { + indicator->stop(); + } +*/ +} + +void LLPanelEnvironmentInfo::setDirty(bool dirty) +{ + getChildView("apply_btn")->setEnabled(dirty); + getChildView("cancel_btn")->setEnabled(dirty); +} + +void LLPanelEnvironmentInfo::sendRegionSunUpdate() +{ + LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); + + // If the region is being switched to fixed sky, + // change the region's sun hour according to the (fixed) sun position. + // This is needed for llGetSunDirection() LSL function to work properly (STORM-1330). + const LLSD& sky_map = mNewRegionSettings.getSkyMap(); + bool region_use_fixed_sky = sky_map.size() == 1; + if (region_use_fixed_sky) + { + LLWLParamSet param_set; + llassert(sky_map.isMap()); + param_set.setAll(sky_map.beginMap()->second); + F32 sun_angle = param_set.getSunAngle(); + + LL_DEBUGS("Windlight Sync") << "Old sun hour: " << region_info.mSunHour << LL_ENDL; + // convert value range from 0..2pi to 6..30 + region_info.mSunHour = fmodf((sun_angle / F_TWO_PI) * 24.f, 24.f) + 6.f; + } + + region_info.setUseFixedSun(region_use_fixed_sky); + region_info.mUseEstateSun = !region_use_fixed_sky; + LL_DEBUGS("Windlight Sync") << "Sun hour: " << region_info.mSunHour << LL_ENDL; + + region_info.sendRegionTerrain(LLFloaterRegionInfo::getLastInvoice()); +} + +void LLPanelEnvironmentInfo::fixEstateSun() +{ + // We don't support fixed sun estates anymore and need to fix + // such estates for region day cycle to take effect. + // *NOTE: Assuming that current estate settings have arrived already. + LLEstateInfoModel& estate_info = LLEstateInfoModel::instance(); + if (estate_info.getUseFixedSun()) + { + llinfos << "Switching estate to global sun" << llendl; + estate_info.setUseFixedSun(false); + estate_info.sendEstateInfo(); + } +} + +void LLPanelEnvironmentInfo::populateWaterPresetsList() +{ + mWaterPresetCombo->removeall(); + + // If the region already has water params, add them to the list. + const LLEnvironmentSettings& region_settings = LLEnvManagerNew::instance().getRegionSettings(); + if (region_settings.getWaterParams().size() != 0) + { + const std::string& region_name = gAgent.getRegion()->getName(); + mWaterPresetCombo->add(region_name, LLWLParamKey(region_name, LLEnvKey::SCOPE_REGION).toLLSD()); + mWaterPresetCombo->addSeparator(); + } + + std::list user_presets, system_presets; + LLWaterParamManager::instance().getPresetNames(user_presets, system_presets); + + // Add local user presets first. + for (std::list::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it) + { + mWaterPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD()); + } + + if (user_presets.size() > 0) + { + mWaterPresetCombo->addSeparator(); + } + + // Add local system presets. + for (std::list::const_iterator it = system_presets.begin(); it != system_presets.end(); ++it) + { + mWaterPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD()); + } + + // There's no way to select current preset because its name is not stored on server. +} + +void LLPanelEnvironmentInfo::populateSkyPresetsList() +{ + mSkyPresetCombo->removeall(); + + LLWLParamManager::preset_name_list_t region_presets; + LLWLParamManager::preset_name_list_t user_presets, sys_presets; + LLWLParamManager::instance().getPresetNames(region_presets, user_presets, sys_presets); + + // Add region presets. + std::string region_name = gAgent.getRegion() ? gAgent.getRegion()->getName() : LLTrans::getString("Unknown"); + for (LLWLParamManager::preset_name_list_t::const_iterator it = region_presets.begin(); it != region_presets.end(); ++it) + { + std::string preset_name = *it; + std::string item_title = preset_name + " (" + region_name + ")"; + mSkyPresetCombo->add(item_title, LLWLParamKey(preset_name, LLEnvKey::SCOPE_REGION).toStringVal()); + } + + if (!region_presets.empty()) + { + mSkyPresetCombo->addSeparator(); + } + + // Add user presets. + for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it) + { + mSkyPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal()); + } + + if (!user_presets.empty()) + { + mSkyPresetCombo->addSeparator(); + } + + // Add system presets. + for (LLWLParamManager::preset_name_list_t::const_iterator it = sys_presets.begin(); it != sys_presets.end(); ++it) + { + mSkyPresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal()); + } + + // Select current preset. + LLSD sky_map = LLEnvManagerNew::instance().getRegionSettings().getSkyMap(); + if (sky_map.size() == 1) // if the region is set to fixed sky + { + std::string preset_name = sky_map.beginMap()->first; + mSkyPresetCombo->selectByValue(LLWLParamKey(preset_name, LLEnvKey::SCOPE_REGION).toStringVal()); + } +} + +void LLPanelEnvironmentInfo::populateDayCyclesList() +{ + mDayCyclePresetCombo->removeall(); + + // If the region already has env. settings, add its day cycle to the list. + const LLSD& cur_region_dc = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle(); + if (cur_region_dc.size() != 0) + { + LLViewerRegion* region = gAgent.getRegion(); + llassert(region != NULL); + + LLWLParamKey key(region->getName(), LLEnvKey::SCOPE_REGION); + mDayCyclePresetCombo->add(region->getName(), key.toStringVal()); + mDayCyclePresetCombo->addSeparator(); + } + + // Add local user day cycles. + LLDayCycleManager::preset_name_list_t user_days, sys_days; + LLDayCycleManager::instance().getPresetNames(user_days, sys_days); + for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it) + { + mDayCyclePresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal()); + } + + if (user_days.size() > 0) + { + mDayCyclePresetCombo->addSeparator(); + } + + // Add local system day cycles. + for (LLDayCycleManager::preset_name_list_t::const_iterator it = sys_days.begin(); it != sys_days.end(); ++it) + { + mDayCyclePresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal()); + } + + // Current day cycle is already selected. +} + +bool LLPanelEnvironmentInfo::getSelectedWaterParams(LLSD& water_params) +{ + LLWLParamKey water_key(mWaterPresetCombo->getSelectedValue()); + + if (water_key.scope == LLEnvKey::SCOPE_REGION) + { + water_params = LLEnvManagerNew::instance().getRegionSettings().getWaterParams(); + } + else + { + LLWaterParamSet param_set; + if (!LLWaterParamManager::instance().getParamSet(water_key.name, param_set)) + { + llwarns << "Error getting water preset: " << water_key.name << llendl; + return false; + } + + water_params = param_set.getAll(); + } + + return true; +} + +bool LLPanelEnvironmentInfo::getSelectedSkyParams(LLSD& sky_params, std::string& preset_name) +{ + std::string preset_key(mSkyPresetCombo->getValue().asString()); + LLWLParamKey preset(preset_key); + + // Get the preset sky params. + LLWLParamSet param_set; + if (!LLWLParamManager::instance().getParamSet(preset, param_set)) + { + llwarns << "Error getting sky params: " << preset.toLLSD() << llendl; + return false; + } + + sky_params = param_set.getAll(); + preset_name = preset.name; + return true; +} + +bool LLPanelEnvironmentInfo::getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sky_map, short& scope) +{ + std::string preset_key(mDayCyclePresetCombo->getValue().asString()); + LLWLParamKey dc(preset_key); + LL_DEBUGS("Windlight") << "Use day cycle: " << dc.toLLSD() << LL_ENDL; + + if (dc.scope == LLEnvKey::SCOPE_REGION) // current region day cycle + { + const LLEnvironmentSettings& cur_region_settings = LLEnvManagerNew::instance().getRegionSettings(); + day_cycle = cur_region_settings.getWLDayCycle(); + sky_map = cur_region_settings.getSkyMap(); + } + else // a local day cycle + { + if (!LLDayCycleManager::instance().getPreset(dc.name, day_cycle)) + { + llwarns << "Error getting day cycle " << dc.name << llendl; + return false; + } + + // Create sky map from the day cycle. + { + LLWLDayCycle tmp_day; + tmp_day.loadDayCycle(day_cycle, dc.scope); + tmp_day.getSkyMap(sky_map); + } + } + + scope = dc.scope; + + return true; +} +void LLPanelEnvironmentInfo::onSwitchRegionSettings() +{ + bool use_defaults = mRegionSettingsRadioGroup->getSelectedIndex() == 0; + getChild("user_environment_settings")->setEnabled(!use_defaults); + + if (use_defaults) + { + LLEnvManagerNew::instance().useDefaults(); + } + else + { + onSelectWaterPreset(); + onSwitchDayCycle(); + } + + setDirty(true); +} + +void LLPanelEnvironmentInfo::onSwitchDayCycle() +{ + bool is_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0; + + mSkyPresetCombo->setEnabled(is_fixed_sky); + mDayCyclePresetCombo->setEnabled(!is_fixed_sky); + + if (is_fixed_sky) + { + onSelectSkyPreset(); + } + else + { + onSelectDayCycle(); + } + + setDirty(true); +} + +void LLPanelEnvironmentInfo::onSelectWaterPreset() +{ + LLSD water_params; + + if (getSelectedWaterParams(water_params)) + { + LLEnvManagerNew::instance().useWaterParams(water_params); + } + + setDirty(true); +} + +void LLPanelEnvironmentInfo::onSelectSkyPreset() +{ + LLSD params; + std::string dummy; + + if (getSelectedSkyParams(params, dummy)) + { + LLEnvManagerNew::instance().useSkyParams(params); + } + + setDirty(true); +} + +void LLPanelEnvironmentInfo::onSelectDayCycle() +{ + LLSD day_cycle; + LLSD sky_map; // unused + short scope; + + if (getSelectedDayCycleParams(day_cycle, sky_map, scope)) + { + LLEnvManagerNew::instance().useDayCycleParams(day_cycle, (LLEnvKey::EScope) scope); + } + + setDirty(true); +} + +void LLPanelEnvironmentInfo::onBtnApply() +{ + const bool use_defaults = mRegionSettingsRadioGroup->getSelectedIndex() == 0; + const bool use_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0; + + LLSD day_cycle; + LLSD sky_map; + LLSD water_params; + + if (use_defaults) + { + // settings will be empty + LL_DEBUGS("Windlight") << "Defaults" << LL_ENDL; + } + else // use custom region settings + { + if (use_fixed_sky) + { + LL_DEBUGS("Windlight") << "Use fixed sky" << LL_ENDL; + + // Get selected sky params. + LLSD params; + std::string preset_name; + if (!getSelectedSkyParams(params, preset_name)) + { + return; + } + + // Create a day cycle consisting of a single sky preset. + LLSD key(LLSD::emptyArray()); + key.append(-1.0f); // indicate that user preference is actually fixed sky, not a day cycle + key.append(preset_name); + day_cycle.append(key); + + // Create a sky map consisting of only the sky preset. + std::map refs; + LLWLParamSet param_set; + param_set.setAll(params); + refs[LLWLParamKey(preset_name, LLEnvKey::SCOPE_LOCAL)] = param_set; // scope doesn't matter here + sky_map = LLWLParamManager::createSkyMap(refs); + } + else // use day cycle + { + LL_DEBUGS("Windlight") << "Use day cycle" << LL_ENDL; + + short scope; // unused + if (!getSelectedDayCycleParams(day_cycle, sky_map, scope)) + { + return; + } + + // If it's a special single-preset day cycle meaning using a fixed sky, + // reset the frame time to a non-negative value, + // so that the region setting is displayed in the floater as + // a day cycle, not a preset. (STORM-1289) + if (day_cycle.size() == 1 && day_cycle[0][0].asReal() < 0.0f) + { + LL_DEBUGS("Windlight") << "Fixing negative time" << LL_ENDL; + day_cycle[0][0] = 0.0f; + } + } + + // Get water params. + if (!getSelectedWaterParams(water_params)) + { + // *TODO: show a notification? + return; + } + } + + // Send settings apply request. + LLEnvironmentSettings new_region_settings; + new_region_settings.saveParams(day_cycle, sky_map, water_params, 0.0f); + if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings)) + { + llwarns << "Error applying region environment settings" << llendl; + return; + } + + // When the settings get applied, we'll also send the region sun position update. + // To determine the sun angle we're going to need the new settings. + mNewRegionSettings = new_region_settings; + + // Start spinning the progress indicator. + setApplyProgress(true); +} + +void LLPanelEnvironmentInfo::onBtnCancel() +{ + // Reload last saved region settings. + refresh(); + + // Apply them. + LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance(); + const LLEnvironmentSettings& cur_settings = env_mgr.getRegionSettings(); + const LLSD& region_day_cycle = cur_settings.getWLDayCycle(); + const LLSD& region_water = cur_settings.getWaterParams(); + env_mgr.useWaterParams(region_water); + env_mgr.useDayCycleParams(region_day_cycle, LLEnvKey::SCOPE_REGION); +} + +void LLPanelEnvironmentInfo::onRegionSettingschange() +{ + LL_DEBUGS("Windlight") << "Region settings changed, refreshing" << LL_ENDL; + refresh(); + + // Stop applying progress indicator (it may be running if it's us who initiated settings update). + setApplyProgress(false); +} + +void LLPanelEnvironmentInfo::onRegionSettingsApplied(bool ok) +{ + // If applying new settings has failed, stop the indicator right away. + // Otherwise it will be stopped when we receive the updated settings from server. + if (ok) + { + // Set the region sun phase/flags according to the chosen new preferences. + // + // If we do this earlier we may get jerky transition from fixed sky to a day cycle (STORM-1481). + // That is caused by the simulator re-sending the region info, which in turn makes us + // re-request and display old region environment settings while the new ones haven't been applied yet. + sendRegionSunUpdate(); + + // Switch estate to not using fixed sun for the region day cycle to work properly (STORM-1506). + fixEstateSun(); + } + else + { + setApplyProgress(false); + + // We need to re-request environment setting here, + // otherwise our subsequent attempts to change region settings will fail with the following error: + // "Unable to update environment settings because the last update your viewer saw was not the same + // as the last update sent from the simulator. Try sending your update again, and if this + // does not work, try leaving and returning to the region." + LLEnvManagerNew::instance().requestRegionSettings(); + } +} + // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) void LLFloaterRegionInfo::open() { diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 8a3d77075..f81ec930b 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -38,6 +38,8 @@ #include "llfloater.h" #include "llpanel.h" +#include "llenvmanager.h" // for LLEnvironmentSettings + class LLAvatarName; struct LLEstateAccessChangeInfo; class LLLineEditor; @@ -50,6 +52,7 @@ class LLInventoryItem; class LLCheckBoxCtrl; class LLComboBox; class LLNameListCtrl; +class LLRadioGroup; class LLSliderCtrl; class LLSpinCtrl; class LLTextBox; @@ -57,16 +60,16 @@ class AIFilePicker; class LLPanelRegionGeneralInfo; class LLPanelRegionDebugInfo; -class LLPanelRegionTextureInfo; class LLPanelRegionTerrainInfo; class LLPanelEstateInfo; class LLPanelEstateCovenant; + class LLFloaterRegionInfo : public LLFloater, public LLFloaterSingleton { friend class LLUISingleton >; public: - ~LLFloaterRegionInfo(); + /*virtual*/ void onOpen(); /*virtual*/ BOOL postBuild(); @@ -86,14 +89,18 @@ public: static LLPanelEstateInfo* getPanelEstate(); static LLPanelEstateCovenant* getPanelCovenant(); + static LLPanelRegionTerrainInfo* getPanelRegionTerrain(); // from LLPanel virtual void refresh(); - static void requestRegionInfo(); + void requestRegionInfo(); protected: LLFloaterRegionInfo(const LLSD& seed); + ~LLFloaterRegionInfo(); + + void onTabSelected(const LLSD& param); void refreshFromRegion(LLViewerRegion* region); // member data @@ -109,10 +116,11 @@ protected: class LLPanelRegionInfo : public LLPanel { public: - LLPanelRegionInfo() : LLPanel(std::string("Region Info Panel")) {} - static void onBtnSet(void* user_data); - static void onChangeChildCtrl(LLUICtrl* ctrl, void* user_data); - static void onChangeAnything(LLUICtrl* ctrl, void* user_data); + LLPanelRegionInfo(); + + void onBtnSet(); + void onChangeChildCtrl(LLUICtrl* ctrl); + void onChangeAnything(); static void onChangeText(LLLineEditor* caller, void* user_data); virtual bool refreshFromRegion(LLViewerRegion* region); @@ -120,16 +128,19 @@ public: virtual BOOL postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); + virtual void onOpen(const LLSD& key) {} void enableButton(const std::string& btn_name, BOOL enable = TRUE); void disableButton(const std::string& btn_name); + void onClickManageTelehub(); + protected: void initCtrl(const std::string& name); void initHelpBtn(const std::string& name, const std::string& xml_alert); - // Callback for all help buttons, data is name of XML alert to show. - static void onClickHelp(void* data); + // Callback for all help buttons, xml_alert is the name of XML alert to show. + void onClickHelp(const std::string& xml_alert); // Returns TRUE if update sent and apply button should be // disabled. @@ -153,6 +164,7 @@ protected: class LLPanelRegionGeneralInfo : public LLPanelRegionInfo { + public: LLPanelRegionGeneralInfo() : LLPanelRegionInfo() {} @@ -162,16 +174,16 @@ public: // LLPanel virtual BOOL postBuild(); + protected: virtual BOOL sendUpdate(); - - static void onClickKick(void* userdata); + void onClickKick(); void onKickCommit(const uuid_vec_t& ids); static void onClickKickAll(void* userdata); bool onKickAllCommit(const LLSD& notification, const LLSD& response); static void onClickMessage(void* userdata); bool onMessageCommit(const LLSD& notification, const LLSD& response); - static void onClickManageTelehub(void* data); + }; ///////////////////////////////////////////////////////////////////////////// @@ -190,14 +202,14 @@ public: protected: virtual BOOL sendUpdate(); - static void onClickChooseAvatar(void*); + void onClickChooseAvatar(); void callbackAvatarID(const uuid_vec_t& ids, const std::vector& names); static void onClickReturn(void *); bool callbackReturn(const LLSD& notification, const LLSD& response); static void onClickTopColliders(void*); static void onClickTopScripts(void*); static void onClickRestart(void* data); - bool callbackRestart(const LLSD& notification, const LLSD& response, S32 seconds); + bool callbackRestart(const LLSD& notification, const LLSD& response); static void onClickCancelRestart(void* data); private: @@ -206,43 +218,25 @@ private: ///////////////////////////////////////////////////////////////////////////// -class LLPanelRegionTextureInfo : public LLPanelRegionInfo -{ -public: - LLPanelRegionTextureInfo(); - ~LLPanelRegionTextureInfo() {} - - virtual bool refreshFromRegion(LLViewerRegion* region); - - // LLPanel && LLView - virtual BOOL postBuild(); - -protected: - virtual BOOL sendUpdate(); - - static void onClickDump(void* data); - BOOL validateTextureSizes(); -}; - -///////////////////////////////////////////////////////////////////////////// - class LLPanelRegionTerrainInfo : public LLPanelRegionInfo { -public: - LLPanelRegionTerrainInfo() - : LLPanelRegionInfo() {} - ~LLPanelRegionTerrainInfo() {} - // LLPanel - virtual BOOL postBuild(); - - virtual bool refreshFromRegion(LLViewerRegion* region); - -protected: - virtual BOOL sendUpdate(); + LOG_CLASS(LLPanelRegionTerrainInfo); - static void onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data); - static void onChangeFixedSun(LLUICtrl* ctrl, void* user_data); - static void onChangeSunHour(LLUICtrl* ctrl, void*); +public: + LLPanelRegionTerrainInfo() : LLPanelRegionInfo() {} + ~LLPanelRegionTerrainInfo() {} + + virtual BOOL postBuild(); // LLPanel + + virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator + + BOOL validateTextureSizes(); + +protected: + + //static void onChangeAnything(LLUICtrl* ctrl, void* userData); // callback for any change, to enable commit button + + virtual BOOL sendUpdate(); static void onClickDownloadRaw(void*); void onClickDownloadRaw_continued(AIFilePicker* filepicker); @@ -259,27 +253,27 @@ class LLPanelEstateInfo : public LLPanelRegionInfo public: static void initDispatch(LLDispatcher& dispatch); - static void onChangeFixedSun(LLUICtrl* ctrl, void* user_data); - static void onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data); + void onChangeFixedSun(); + void onChangeUseGlobalTime(); - static void onClickEditSky(void* userdata); - static void onClickEditSkyHelp(void* userdata); - static void onClickEditDayCycle(void* userdata); - static void onClickEditDayCycleHelp(void* userdata); + void onClickEditSky(); + void onClickEditSkyHelp(); + void onClickEditDayCycle(); + void onClickEditDayCycleHelp(); - static void onClickAddAllowedAgent(void* user_data); - static void onClickRemoveAllowedAgent(void* user_data); - static void onClickAddAllowedGroup(void* user_data); - static void onClickRemoveAllowedGroup(void* user_data); - static void onClickAddBannedAgent(void* user_data); - static void onClickRemoveBannedAgent(void* user_data); - static void onClickAddEstateManager(void* user_data); - static void onClickRemoveEstateManager(void* user_data); - static void onClickKickUser(void* userdata); + void onClickAddAllowedAgent(); + void onClickRemoveAllowedAgent(); + void onClickAddAllowedGroup(); + void onClickRemoveAllowedGroup(); + void onClickAddBannedAgent(); + void onClickRemoveBannedAgent(); + void onClickAddEstateManager(); + void onClickRemoveEstateManager(); + void onClickKickUser(); // Group picker callback is different, can't use core methods below bool addAllowedGroup(const LLSD& notification, const LLSD& response); - static void addAllowedGroup2(LLUUID id, void* data); + static void addAllowedGroup2(LLUUID id, void*); // Core methods for all above add/remove button clicks static void accessAddCore(U32 operation_flag, const std::string& dialog_name); @@ -305,6 +299,9 @@ public: void updateControls(LLViewerRegion* region); + static void updateEstateName(const std::string& name); + static void updateEstateOwnerName(const std::string& name); + virtual bool refreshFromRegion(LLViewerRegion* region); virtual bool estateUpdate(LLMessageSystem* msg); @@ -313,53 +310,23 @@ public: virtual void updateChild(LLUICtrl* child_ctrl); virtual void refresh(); - U32 computeEstateFlags(); - void setEstateFlags(U32 flags); + void refreshFromEstate(); - BOOL getGlobalTime(); - void setGlobalTime(bool b); - - BOOL getFixedSun(); - - F32 getSunHour(); - void setSunHour(F32 sun_hour); - - const std::string getEstateName() const; - void setEstateName(const std::string& name); - - U32 getEstateID() const { return mEstateID; } - void setEstateID(U32 estate_id) { mEstateID = estate_id; } static bool isLindenEstate(); const std::string getOwnerName() const; void setOwnerName(const std::string& name); - - const std::string getAbuseEmailAddress() const; - void setAbuseEmailAddress(const std::string& address); - - // If visible from mainland, allowed agent and allowed groups - // are ignored, so must disable UI. - void setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban); - - // this must have the same function signature as - // llmessage/llcachename.h:LLCacheNameCallback - static void callbackCacheName( - const LLUUID& id, - const std::string& full_name, - bool is_group); + void setOwnerPNSName(const LLUUID& agent_id, const LLAvatarName& av_name); protected: virtual BOOL sendUpdate(); // confirmation dialog callback bool callbackChangeLindenEstate(const LLSD& notification, const LLSD& response); - void commitEstateInfoDataserver(); - bool commitEstateInfoCaps(); void commitEstateAccess(); void commitEstateManagers(); void clearAccessLists(); - BOOL checkRemovalButton(std::string name); BOOL checkSunHourSlider(LLUICtrl* child_ctrl); U32 mEstateID; @@ -427,4 +394,68 @@ protected: EAssetStatus mAssetStatus; }; +///////////////////////////////////////////////////////////////////////////// + +class LLPanelEnvironmentInfo : public LLPanelRegionInfo +{ + LOG_CLASS(LLPanelEnvironmentInfo); + +public: + LLPanelEnvironmentInfo(); + + // LLPanel + /*virtual*/ BOOL postBuild(); + + // LLPanelRegionInfo + /*virtual*/ void onOpen(const LLSD& key); + + // LLView + /*virtual*/ void handleVisibilityChange(BOOL new_visibility); + + // LLPanelRegionInfo + /*virtual*/ bool refreshFromRegion(LLViewerRegion* region); + +private: + void refresh(); + void setControlsEnabled(bool enabled); + void setApplyProgress(bool started); + void setDirty(bool dirty); + + void sendRegionSunUpdate(); + void fixEstateSun(); + + void populateWaterPresetsList(); + void populateSkyPresetsList(); + void populateDayCyclesList(); + + bool getSelectedWaterParams(LLSD& water_params); + bool getSelectedSkyParams(LLSD& sky_params, std::string& preset_name); + bool getSelectedDayCycleParams(LLSD& day_cycle, LLSD& sky_map, short& scope); + + void onSwitchRegionSettings(); + void onSwitchDayCycle(); + + void onSelectWaterPreset(); + void onSelectSkyPreset(); + void onSelectDayCycle(); + + void onBtnApply(); + void onBtnCancel(); + + void onRegionSettingschange(); + void onRegionSettingsApplied(bool ok); + + /// New environment settings that are being applied to the region. + LLEnvironmentSettings mNewRegionSettings; + + bool mEnableEditing; + + LLRadioGroup* mRegionSettingsRadioGroup; + LLRadioGroup* mDayCycleSettingsRadioGroup; + + LLComboBox* mWaterPresetCombo; + LLComboBox* mSkyPresetCombo; + LLComboBox* mDayCyclePresetCombo; +}; + #endif diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 7c49e5184..9e60be11a 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -270,11 +270,6 @@ void LLFloaterReporter::draw() void LLFloaterReporter::enableControls(BOOL enable) { childSetEnabled("category_combo", enable); - // bug reports never include the chat history - if (mReportType != BUG_REPORT) - { - childSetEnabled("chat_check", enable); - } childSetEnabled("screen_check", enable); childDisable("screenshot"); childSetEnabled("pick_btn", enable); diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 5bd332024..1360b8b12 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -105,7 +105,6 @@ BOOL LLFloaterSettingsDebug::postBuild() getChild("val_spinner_4")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); getChild("val_text")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); getChild("boolean_combo")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); - getChild("color_swatch")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); getChild("copy_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onCopyToClipboard, this)); getChild("default_btn")->setCommitCallback(boost::bind(&LLFloaterSettingsDebug::onClickDefault, this)); getChild("search_settings_input")->setSearchCallback(onUpdateFilter, this); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 8cea6087a..d4830adbf 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -295,6 +295,7 @@ public: mAvatarPauseHandles.clear(); mQualityMouseUpConnection.disconnect(); } + static void onClickDiscard(void* data); static void onClickKeep(void* data); static void onCommitSave(LLUICtrl* ctrl, void* data); static void onClickNewSnapshot(void* data); @@ -994,18 +995,8 @@ LLSnapshotLivePreview::EAspectSizeProblem LLSnapshotLivePreview::getAspectSizePr // llround(window_height * scale_factor) respectively (since we set uncrop = true). F32 raw_aspect = (F32)mRawSnapshotWidth / mRawSnapshotHeight; // The smaller dimension might have been rounded up to 0.5 up or down. Calculate upper and lower limits. - F32 lower_raw_aspect; - F32 upper_raw_aspect; - if (mRawSnapshotWidth < mRawSnapshotHeight) - { - lower_raw_aspect = (mRawSnapshotWidth - 0.5) / mRawSnapshotHeight; - upper_raw_aspect = (mRawSnapshotWidth + 0.5) / mRawSnapshotHeight; - } - else - { - lower_raw_aspect = mRawSnapshotWidth / (mRawSnapshotHeight + 0.5); - upper_raw_aspect = mRawSnapshotWidth / (mRawSnapshotHeight - 0.5); - } + F32 lower_raw_aspect = (mRawSnapshotWidth - 0.5) / (mRawSnapshotHeight + 0.5); + F32 upper_raw_aspect = (mRawSnapshotWidth + 0.5) / (mRawSnapshotHeight - 0.5); // Find out if mRawSnapshot was cropped already. bool const allow_vertical_crop = window_height * upper_raw_aspect >= window_width; // mRawSnapshot was cropped horizontally. bool const allow_horizontal_crop = window_width / lower_raw_aspect >= window_height; // mRawSnapshot was cropped vertically. @@ -1861,7 +1852,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater, bool de floater->childSetVisible("keep_aspect", is_advance); floater->childSetVisible("type_label3", is_advance); floater->childSetVisible("format_label", is_advance && is_local); - floater->childSetVisible("local_format_combo", is_local); + floater->childSetVisible("local_format_combo", is_advance && is_local); floater->childSetVisible("layer_types", is_advance); floater->childSetVisible("layer_type_label", is_advance); floater->childSetVisible("aspect_one_label", is_advance); @@ -1873,7 +1864,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater, bool de floater->childSetVisible("keep_open_check", is_advance); floater->childSetVisible("freeze_time_check", is_advance); floater->childSetVisible("auto_snapshot_check", is_advance); - floater->childSetVisible("image_quality_slider", show_slider); + floater->childSetVisible("image_quality_slider", is_advance && show_slider); floater->childSetVisible("temp_check", is_advance); BOOL got_bytes = previewp && previewp->getDataSize() > 0; @@ -1941,6 +1932,23 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, } } +// static +void LLFloaterSnapshot::Impl::onClickDiscard(void* data) +{ + LLFloaterSnapshot* view = static_cast(data); + if (gSavedSettings.getBOOL("FreezeTime")) + { + LLSnapshotLivePreview* previewp = view->impl.getPreviewView(); + if (previewp && previewp->getShowFreezeFrameSnapshot()) + previewp->showFreezeFrameSnapshot(false); + view->impl.freezeTime(false); + } + else + { + view->close(); + } +} + // static void LLFloaterSnapshot::Impl::onCommitFeedResolution(LLUICtrl* ctrl, void* data) { @@ -2934,6 +2942,7 @@ BOOL LLFloaterSnapshot::postBuild() childSetAction("send_btn", Impl::onClickKeep, this); childSetAction("feed_btn", Impl::onClickKeep, this); childSetCommitCallback("save_btn", Impl::onCommitSave, this); + childSetAction("discard_btn", Impl::onClickDiscard, this); childSetCommitCallback("image_quality_slider", Impl::onCommitQuality, this); childSetValue("image_quality_slider", gSavedSettings.getS32("SnapshotQuality")); @@ -3075,6 +3084,14 @@ void LLFloaterSnapshot::show(void*) sInstance->impl.updateLayout(sInstance); } + else // just refresh the snapshot in the existing floater instance (DEV-12255) + { + LLSnapshotLivePreview* preview = LLFloaterSnapshot::Impl::getPreviewView(); + if(preview) + { + preview->updateSnapshot(TRUE); + } + } sInstance->open(); /* Flawfinder: ignore */ sInstance->focusFirstItem(FALSE); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index f52b0960c..1cbaac1a7 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -294,8 +294,8 @@ BOOL LLFloaterTools::postBuild() llwarns << "Tool button not found! DOA Pending." << llendl; } } - mComboTreesGrass = getChild("trees_grass"); - childSetCommitCallback("trees_grass", onSelectTreesGrass, (void*)0); + if ((mComboTreesGrass = findChild("trees_grass"))) + childSetCommitCallback("trees_grass", onSelectTreesGrass, (void*)0); mCheckCopySelection = getChild("checkbox copy selection"); childSetValue("checkbox copy selection",(BOOL)gSavedSettings.getBOOL("CreateToolCopySelection")); mCheckSticky = getChild("checkbox sticky"); @@ -722,9 +722,10 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // Create buttons BOOL create_visible = (tool == LLToolCompCreate::getInstance()); - mBtnCreate ->setToggleState( tool == LLToolCompCreate::getInstance() ); + mBtnCreate ->setToggleState(create_visible); - updateTreeGrassCombo(create_visible); + if (mComboTreesGrass) + updateTreeGrassCombo(create_visible); if (mCheckCopySelection && mCheckCopySelection->get()) diff --git a/indra/newview/llfloatervfs.cpp b/indra/newview/llfloatervfs.cpp deleted file mode 100644 index 12dc0e08c..000000000 --- a/indra/newview/llfloatervfs.cpp +++ /dev/null @@ -1,374 +0,0 @@ -// -#include "llviewerprecompiledheaders.h" -#include "llfloatervfs.h" -#include "lluictrlfactory.h" -#include "llscrolllistctrl.h" -#include "llcheckboxctrl.h" -#include "statemachine/aifilepicker.h" -#include "lllocalinventory.h" -#include "llviewerwindow.h" -#include "llassetconverter.h" -#include "llviewertexturelist.h" -#include "llimagej2c.h" - -LLFloaterVFS* LLFloaterVFS::sInstance; -std::list LLFloaterVFS::mFiles; -LLFloaterVFS::LLFloaterVFS() -: LLFloater(), - mEditID(LLUUID::null) -{ - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_vfs.xml"); -} -LLFloaterVFS::~LLFloaterVFS() -{ - sInstance = NULL; -} -// static -void LLFloaterVFS::show() -{ - if(sInstance) - sInstance->open(); - else - { - sInstance = new LLFloaterVFS(); - sInstance->open(); - } -} -BOOL LLFloaterVFS::postBuild() -{ - childSetAction("add_btn", onClickAdd, this); - childSetAction("clear_btn", onClickClear, this); - childSetAction("reload_all_btn", onClickReloadAll, this); - childSetCommitCallback("file_list", onCommitFileList, this); - childSetCommitCallback("name_edit", onCommitEdit, this); - childSetCommitCallback("id_edit", onCommitEdit, this); - childSetCommitCallback("type_combo", onCommitEdit, this); - childSetAction("copy_uuid_btn", onClickCopyUUID, this); - childSetAction("item_btn", onClickItem, this); - childSetAction("reload_btn", onClickReload, this); - childSetAction("remove_btn", onClickRemove, this); - refresh(); - return TRUE; -} -void LLFloaterVFS::refresh() -{ - LLScrollListCtrl* list = getChild("file_list"); - list->clearRows(); - std::list::iterator end = mFiles.end(); - for(std::list::iterator iter = mFiles.begin(); iter != end; ++iter) - { - entry file = (*iter); - LLSD element; - element["id"] = file.mID; - LLSD& name_column = element["columns"][0]; - name_column["column"] = "name"; - name_column["value"] = file.mName.empty() ? file.mID.asString() : file.mName; - LLSD& type_column = element["columns"][1]; - type_column["column"] = "type"; - type_column["value"] = std::string(LLAssetType::lookup(file.mType)); - list->addElement(element, ADD_BOTTOM); - } - setMassEnabled(!mFiles.empty()); - setEditID(mEditID); -} -void LLFloaterVFS::add(entry file) -{ - mFiles.push_back(file); - refresh(); -} -void LLFloaterVFS::clear() -{ - std::list::iterator end = mFiles.end(); - for(std::list::iterator iter = mFiles.begin(); iter != end; ++iter) - { - gVFS->removeFile((*iter).mID, (*iter).mType); - } - mFiles.clear(); - refresh(); -} -void LLFloaterVFS::reloadAll() -{ - std::list::iterator end = mFiles.end(); - for(std::list::iterator iter = mFiles.begin(); iter != end; ++iter) - { - entry file = (*iter); - reloadEntry(file); - } - refresh(); -} -void LLFloaterVFS::reloadEntry(entry file) -{ - LLUUID asset_id = file.mID; - LLAssetType::EType asset_type = file.mType; - gVFS->removeFile(file.mID, file.mType); - std::string file_name = file.mFilename; - S32 file_size; - LLAPRFile fp(file_name, LL_APR_RB, &file_size); - if(fp.getFileHandle()) - { - LLVFile file(gVFS, asset_id, asset_type, LLVFile::WRITE); - file.setMaxSize(file_size); - const S32 buf_size = 65536; - U8 copy_buf[buf_size]; - while ((file_size = fp.read(copy_buf, buf_size))) - file.write(copy_buf, file_size); - fp.close(); - } - else - { - // todo: show a warning, couldn't open the original file - return; - } - refresh(); -} -void LLFloaterVFS::setEditID(LLUUID edit_id) -{ - LLScrollListCtrl* list = getChild("file_list"); - bool found_in_list = (list->getItemIndex(edit_id) != -1); - bool found_in_files = false; - entry file; - std::list::iterator end = mFiles.end(); - for(std::list::iterator iter = mFiles.begin(); iter != end; ++iter) - { - if((*iter).mID == edit_id) - { - found_in_files = true; - file = (*iter); - break; - } - } - if(found_in_files && found_in_list) - { - mEditID = edit_id; - list->selectByID(edit_id); - setEditEnabled(true); - childSetText("name_edit", file.mName); - childSetText("id_edit", file.mID.asString()); - childSetValue("type_combo", std::string(LLAssetType::lookup(file.mType))); - } - else - { - mEditID = LLUUID::null; - list->deselectAllItems(TRUE); - setEditEnabled(false); - childSetText("name_edit", std::string("")); - childSetText("id_edit", std::string("")); - childSetValue("type_combo", std::string("animatn")); - } -} -LLFloaterVFS::entry LLFloaterVFS::getEditEntry() -{ - std::list::iterator end = mFiles.end(); - for(std::list::iterator iter = mFiles.begin(); iter != end; ++iter) - { - if((*iter).mID == mEditID) - return (*iter); - } - entry file; - file.mID = LLUUID::null; - return file; -} -void LLFloaterVFS::commitEdit() -{ - bool found = false; - entry file; - std::list::iterator iter; - std::list::iterator end = mFiles.end(); - for(iter = mFiles.begin(); iter != end; ++iter) - { - if((*iter).mID == mEditID) - { - found = true; - file = (*iter); - break; - } - } - if(!found) return; - entry edited_file; - edited_file.mName = childGetValue("name_edit").asString(); - edited_file.mID = LLUUID(childGetValue("id_edit").asString()); - edited_file.mType = LLAssetType::lookup(getChild("type_combo")->getValue().asString()); - if((edited_file.mID != file.mID) || (edited_file.mType != file.mType)) - { - gVFS->renameFile(file.mID, file.mType, edited_file.mID, edited_file.mType); - mEditID = edited_file.mID; - } - - (*iter) = edited_file; - refresh(); -} -void LLFloaterVFS::removeEntry() -{ - for(std::list::iterator iter = mFiles.begin(); iter != mFiles.end(); ) - { - if((*iter).mID == mEditID) - { - if((*iter).mType == LLAssetType::AT_TEXTURE) - gTextureList.deleteImage(gTextureList.findImage( (*iter).mID )); - else - gVFS->removeFile((*iter).mID, (*iter).mType); - iter = mFiles.erase(iter); - } - else ++iter; - } - refresh(); -} -void LLFloaterVFS::setMassEnabled(bool enabled) -{ - childSetEnabled("clear_btn", enabled); - childSetEnabled("reload_all_btn", enabled); // SHOULD WORK NOW! -} -void LLFloaterVFS::setEditEnabled(bool enabled) -{ - childSetEnabled("name_edit", enabled); - childSetEnabled("id_edit", false); // DOESN'T WORK - childSetEnabled("type_combo", false); // DOESN'T WORK - childSetEnabled("copy_uuid_btn", enabled); - childSetEnabled("item_btn", enabled); - childSetEnabled("reload_btn", enabled); // WORKS! - childSetEnabled("remove_btn", enabled); -} - -// static -void LLFloaterVFS::onClickAdd(void* user_data) -{ - if(!user_data) return; - AIFilePicker* filepicker = AIFilePicker::create(); - filepicker->open(); - filepicker->run(boost::bind(&LLFloaterVFS::onClickAdd_continued, user_data, filepicker)); -} - -// static -void LLFloaterVFS::onClickAdd_continued(void* user_data, AIFilePicker* filepicker) -{ - LLFloaterVFS* self = (LLFloaterVFS*)user_data; - if (filepicker->hasFilename()) - { - std::string file_name = filepicker->getFilename(); - std::string temp_filename = file_name + ".tmp"; - LLAssetType::EType asset_type = LLAssetConverter::convert(file_name, temp_filename); - if(asset_type == LLAssetType::AT_NONE) - { - // todo: show a warning - return; - } - LLUUID asset_id; - asset_id.generate(); - S32 file_size; - LLAPRFile fp(temp_filename, LL_APR_RB, &file_size); - if(fp.getFileHandle()) - { - if(asset_type == LLAssetType::AT_TEXTURE) - { - fp.close(); - //load the texture using built in functions - LLPointer image_j2c = new LLImageJ2C; - if( !image_j2c->loadAndValidate( temp_filename ) ) - { - llinfos << "Image: " << file_name << " is corrupt." << llendl; - return; - } - LLPointer image_raw = new LLImageRaw; - if( !image_j2c->decode(image_raw,0.0f) ) - { - llinfos << "Image: " << file_name << " is corrupt." << llendl; - return; - } - LLPointer imagep = new LLViewerFetchedTexture(asset_id); - imagep->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::BOOST_NONE); - gTextureList.addImage(imagep); - } - else - { - LLVFile file(gVFS, asset_id, asset_type, LLVFile::WRITE); - file.setMaxSize(file_size); - const S32 buf_size = 65536; - U8 copy_buf[buf_size]; - while ((file_size = fp.read(copy_buf, buf_size))) - file.write(copy_buf, file_size); - fp.close(); - } - } - else - { - if(temp_filename != file_name) - { - LLFile::remove(temp_filename); - } - // todo: show a warning, couldn't open the selected file - return; - } - if(temp_filename != file_name) - { - LLFile::remove(temp_filename); - } - entry file; - file.mFilename = file_name; - file.mID = asset_id; - file.mType = asset_type; - file.mName = gDirUtilp->getBaseFileName(file_name, true); - self->add(file); - /*if(self->getChild("create_pretend_item")->get()) - { - LLLocalInventory::addItem(file.mName, (int)file.mType, file.mID, true); - }*/ - } -} -// static -void LLFloaterVFS::onClickClear(void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - if(!floaterp) return; - floaterp->clear(); -} -// static -void LLFloaterVFS::onClickReloadAll(void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - if(!floaterp) return; - floaterp->reloadAll(); -} -// static -void LLFloaterVFS::onCommitFileList(LLUICtrl* ctrl, void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - LLScrollListCtrl* list = floaterp->getChild("file_list"); - LLUUID selected_id(LLUUID::null); - if(list->getFirstSelected()) - selected_id = list->getFirstSelected()->getUUID(); - floaterp->setEditID(selected_id); -} -// static -void LLFloaterVFS::onCommitEdit(LLUICtrl* ctrl, void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - floaterp->commitEdit(); -} -// static -void LLFloaterVFS::onClickCopyUUID(void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - entry file = floaterp->getEditEntry(); - gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(file.mID.asString())); -} -// static -void LLFloaterVFS::onClickItem(void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - entry file = floaterp->getEditEntry(); - LLLocalInventory::addItem(file.mName, (int)file.mType, file.mID, true); -} -// static -void LLFloaterVFS::onClickReload(void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - entry file = floaterp->getEditEntry(); - floaterp->reloadEntry(file); -} -// static -void LLFloaterVFS::onClickRemove(void* user_data) -{ - LLFloaterVFS* floaterp = (LLFloaterVFS*)user_data; - floaterp->removeEntry(); -} -// diff --git a/indra/newview/llfloatervfs.h b/indra/newview/llfloatervfs.h deleted file mode 100644 index 47d1d8755..000000000 --- a/indra/newview/llfloatervfs.h +++ /dev/null @@ -1,50 +0,0 @@ -// -#ifndef LL_LLFLOATERVFS_H -#define LL_LLFLOATERVFS_H -#include "llfloater.h" -#include "llassettype.h" - -class AIFilePicker; - -class LLFloaterVFS : LLFloater -{ -typedef struct -{ - std::string mFilename; - std::string mName; - LLUUID mID; - LLAssetType::EType mType; -} entry; -public: - LLFloaterVFS(); - ~LLFloaterVFS(); - static void show(); - BOOL postBuild(); - void refresh(); - void add(entry file); - void clear(); - void reloadAll(); - void setEditID(LLUUID edit_id); - entry getEditEntry(); - void commitEdit(); - void reloadEntry(entry file); - void removeEntry(); - static void onClickAdd(void* user_data); - static void onClickAdd_continued(void* user_data, AIFilePicker* filepicker); - static void onClickClear(void* user_data); - static void onClickReloadAll(void* user_data); - static void onCommitFileList(LLUICtrl* ctrl, void* user_data); - static void onCommitEdit(LLUICtrl* ctrl, void* user_data); - static void onClickCopyUUID(void* user_data); - static void onClickItem(void* user_data); - static void onClickReload(void* user_data); - static void onClickRemove(void* user_data); -private: - static LLFloaterVFS* sInstance; - static std::list mFiles; - LLUUID mEditID; - void setMassEnabled(bool enabled); - void setEditEnabled(bool enabled); -}; -#endif -// diff --git a/indra/newview/llfloatervfsexplorer.cpp b/indra/newview/llfloatervfsexplorer.cpp deleted file mode 100644 index 9c4030bee..000000000 --- a/indra/newview/llfloatervfsexplorer.cpp +++ /dev/null @@ -1,182 +0,0 @@ -// -//A lot of bad things going on in here, needs a rewrite. -#include "llviewerprecompiledheaders.h" -#include "llfloatervfsexplorer.h" -#include "lluictrlfactory.h" -#include "llscrolllistctrl.h" -#include "llcheckboxctrl.h" -#include "llvfs.h" -#include "lllocalinventory.h" -#include "llviewerwindow.h" -#include "llassetconverter.h" - -LLFloaterVFSExplorer* LLFloaterVFSExplorer::sInstance; -std::map LLFloaterVFSExplorer::sVFSFileMap; - -LLFloaterVFSExplorer::LLFloaterVFSExplorer() -: LLFloater(), - mEditID(LLUUID::null) -{ - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_vfs_explorer.xml"); -} -LLFloaterVFSExplorer::~LLFloaterVFSExplorer() -{ - sInstance = NULL; -} -// static -void LLFloaterVFSExplorer::show() -{ - if(sInstance) - sInstance->open(); - else - { - sInstance = new LLFloaterVFSExplorer(); - sInstance->open(); - } -} -BOOL LLFloaterVFSExplorer::postBuild() -{ - childSetCommitCallback("file_list", onCommitFileList, this); - childSetAction("remove_btn", onClickRemove, this); - childSetAction("reload_all_btn", onClickReload, this); - childSetAction("copy_uuid_btn", onClickCopyUUID, this); - childSetAction("item_btn", onClickItem, this); - refresh(); - return TRUE; -} -void LLFloaterVFSExplorer::refresh() -{ - LLScrollListCtrl* list = getChild("file_list"); - list->clearRows(); - sVFSFileMap = gVFS->getFileList(); - std::map::iterator end = sVFSFileMap.end(); - for(std::map::iterator iter = sVFSFileMap.begin(); iter != end; ++iter) - { - LLVFSFileSpecifier file_spec = iter->first; - LLSD element; - element["id"] = file_spec.mFileID; - LLSD& name_column = element["columns"][0]; - name_column["column"] = "name"; - name_column["value"] = file_spec.mFileID.asString(); - LLSD& type_column = element["columns"][1]; - type_column["column"] = "type"; - type_column["value"] = std::string(LLAssetType::lookup(file_spec.mFileType)); - list->addElement(element, ADD_BOTTOM); - } - setEditID(mEditID); -} -void LLFloaterVFSExplorer::reloadAll() -{ - //get our magic from gvfs here - //this should re-request all assets from the server if possible. - refresh(); -} -void LLFloaterVFSExplorer::setEditID(LLUUID edit_id) -{ - LLScrollListCtrl* list = getChild("file_list"); - bool found_in_list = (list->getItemIndex(edit_id) != -1); - bool found_in_files = false; - LLVFSFileSpecifier file; - std::map::iterator end = sVFSFileMap.end(); - for(std::map::iterator iter = sVFSFileMap.begin(); iter != end; ++iter) - { - if((*iter).first.mFileID == edit_id) - { - found_in_files = true; - file = (*iter).first; - break; - } - } - if(found_in_files && found_in_list) - { - mEditID = edit_id; - list->selectByID(edit_id); - setEditEnabled(true); - childSetText("name_edit", file.mFileID.asString()); - childSetText("id_edit", file.mFileID.asString()); - childSetValue("type_combo", std::string(LLAssetType::lookup(file.mFileType))); - } - else - { - mEditID = LLUUID::null; - list->deselectAllItems(TRUE); - setEditEnabled(false); - childSetText("name_edit", std::string("")); - childSetText("id_edit", std::string("")); - childSetValue("type_combo", std::string("animatn")); - } -} -LLVFSFileSpecifier LLFloaterVFSExplorer::getEditEntry() -{ - LLVFSFileSpecifier file; - std::map::iterator end = sVFSFileMap.end(); - for(std::map::iterator iter = sVFSFileMap.begin(); iter != end; ++iter) - { - if((*iter).first.mFileID == mEditID) - return (*iter).first; - } - file.mFileID = LLUUID::null; - return file; -} - -void LLFloaterVFSExplorer::removeEntry() -{ - std::map::iterator end = sVFSFileMap.end(); - for(std::map::iterator iter = sVFSFileMap.begin(); iter != end; ++iter) - { - if((*iter).first.mFileID == mEditID) - { - gVFS->removeFile((*iter).first.mFileID, (*iter).first.mFileType); - sVFSFileMap.erase(iter); - break; - } - else ++iter; - } - refresh(); -} -void LLFloaterVFSExplorer::setEditEnabled(bool enabled) -{ - childSetEnabled("name_edit", false); - childSetEnabled("id_edit", false); - childSetEnabled("type_combo", false); - childSetEnabled("edit_data_btn", enabled); - childSetEnabled("remove_btn", enabled); - childSetEnabled("copy_uuid_btn", enabled); -} -// static -void LLFloaterVFSExplorer::onCommitFileList(LLUICtrl* ctrl, void* user_data) -{ - LLFloaterVFSExplorer* floaterp = (LLFloaterVFSExplorer*)user_data; - LLScrollListCtrl* list = floaterp->getChild("file_list"); - LLUUID selected_id(LLUUID::null); - if(list->getFirstSelected()) - selected_id = list->getFirstSelected()->getUUID(); - floaterp->setEditID(selected_id); -} -// static -void LLFloaterVFSExplorer::onClickCopyUUID(void* user_data) -{ - LLFloaterVFSExplorer* floaterp = (LLFloaterVFSExplorer*)user_data; - LLVFSFileSpecifier file = floaterp->getEditEntry(); - gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(file.mFileID.asString())); -} -// static -void LLFloaterVFSExplorer::onClickRemove(void* user_data) -{ - LLFloaterVFSExplorer* floaterp = (LLFloaterVFSExplorer*)user_data; - floaterp->removeEntry(); -} -// static -void LLFloaterVFSExplorer::onClickReload(void* user_data) -{ - LLFloaterVFSExplorer* floaterp = (LLFloaterVFSExplorer*)user_data; - floaterp->reloadAll(); -} -// static -void LLFloaterVFSExplorer::onClickItem(void* user_data) -{ - LLFloaterVFSExplorer* floaterp = (LLFloaterVFSExplorer*)user_data; - LLVFSFileSpecifier file = floaterp->getEditEntry(); - LLLocalInventory::addItem(file.mFileID.asString(),file.mFileType,file.mFileID,true); -} -// diff --git a/indra/newview/llfloatervfsexplorer.h b/indra/newview/llfloatervfsexplorer.h deleted file mode 100644 index 34fd8e2d4..000000000 --- a/indra/newview/llfloatervfsexplorer.h +++ /dev/null @@ -1,41 +0,0 @@ -// -#ifndef LL_LLFLOATERVFSEXPLORER_H -#define LL_LLFLOATERVFSEXPLORER_H - -#include "llfloater.h" -#include "llassettype.h" -#include "llvfs.h" - -class LLFloaterVFSExplorer : LLFloater -{ -typedef struct -{ - std::string mFilename; - std::string mName; - LLUUID mID; - LLAssetType::EType mType; -} entry; -public: - LLFloaterVFSExplorer(); - ~LLFloaterVFSExplorer(); - static void show(); - BOOL postBuild(); - void refresh(); - void reloadAll(); - void removeEntry(); - void setEditID(LLUUID edit_id); - LLVFSFileSpecifier getEditEntry(); - static void onCommitFileList(LLUICtrl* ctrl, void* user_data); - static void onClickCopyUUID(void* user_data); - static void onClickRemove(void* user_data); - static void onClickReload(void* user_data); - static void onClickEditData(void* user_data); - static void onClickItem(void* user_data); -private: - static LLFloaterVFSExplorer* sInstance; - static std::map sVFSFileMap; - LLUUID mEditID; - void setEditEnabled(bool enabled); -}; -#endif -// diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp index 0a72fdadf..5da4452e3 100644 --- a/indra/newview/llfloaterwater.cpp +++ b/indra/newview/llfloaterwater.cpp @@ -108,7 +108,7 @@ void LLFloaterWater::initCallbacks(void) { initHelpBtn("WaterFogColorHelp", "HelpWaterFogColor"); initHelpBtn("WaterFogDensityHelp", "HelpWaterFogDensity"); initHelpBtn("WaterUnderWaterFogModHelp", "HelpUnderWaterFogMod"); - initHelpBtn("WaterGlowHelp", "HelpWaterGlow"); + //initHelpBtn("WaterGlowHelp", "HelpWaterGlow"); initHelpBtn("WaterNormalScaleHelp", "HelpWaterNormalScale"); initHelpBtn("WaterFresnelScaleHelp", "HelpWaterFresnelScale"); initHelpBtn("WaterFresnelOffsetHelp", "HelpWaterFresnelOffset"); @@ -126,7 +126,7 @@ void LLFloaterWater::initCallbacks(void) { childSetCommitCallback("WaterFogColor", onWaterFogColorMoved, ¶m_mgr->mFogColor); // - childSetCommitCallback("WaterGlow", onColorControlAMoved, ¶m_mgr->mFogColor); + //childSetCommitCallback("WaterGlow", onColorControlAMoved, ¶m_mgr->mFogColor); // fog density childSetCommitCallback("WaterFogDensity", onExpFloatControlMoved, ¶m_mgr->mFogDensity); @@ -165,8 +165,8 @@ void LLFloaterWater::initCallbacks(void) { childSetCommitCallback("WaterNormalMap", onNormalMapPicked, NULL); // next/prev buttons - childSetAction("next", onClickNext, this); - childSetAction("prev", onClickPrev, this); + //childSetAction("next", onClickNext, this); + //childSetAction("prev", onClickPrev, this); } void LLFloaterWater::onClickHelp(void* data) @@ -237,7 +237,7 @@ void LLFloaterWater::syncMenu() param_mgr->mFogColor = current_params.getVector4(param_mgr->mFogColor.mName, err); LLColor4 col = param_mgr->getFogColor(); - childSetValue("WaterGlow", col.mV[3]); + //childSetValue("WaterGlow", col.mV[3]); col.mV[3] = 1.0f; LLColorSwatchCtrl* colCtrl = sWaterMenu->getChild("WaterFogColor"); @@ -689,13 +689,11 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r { LLFloaterDayCycle* day_cycle = NULL; LLComboBox* key_combo = NULL; - LLMultiSliderCtrl* mult_sldr = NULL; if(LLFloaterDayCycle::isOpen()) { day_cycle = LLFloaterDayCycle::instance(); key_combo = day_cycle->getChild("WaterKeyPresets"); - mult_sldr = day_cycle->getChild("WaterDayCycleKeys"); } std::string name = sWaterMenu->mWaterPresetCombo->getSelectedValue().asString(); diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index d84eaf2a2..116ecbdec 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -222,8 +222,8 @@ void LLFloaterWindLight::initCallbacks(void) { childSetCommitCallback("WLStarAlpha", onStarAlphaMoved, NULL); // next/prev buttons - childSetAction("next", onClickNext, this); - childSetAction("prev", onClickPrev, this); + //childSetAction("next", onClickNext, this); + //childSetAction("prev", onClickPrev, this); } void LLFloaterWindLight::onClickHelp(void* data) @@ -322,7 +322,7 @@ void LLFloaterWindLight::syncMenu() // blue horizon param_mgr->mBlueHorizon = cur_params.getVector(param_mgr->mBlueHorizon.mName, err); - setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE); + //setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE); // haze density, horizon, mult, and altitude param_mgr->mHazeDensity = cur_params.getFloat(param_mgr->mHazeDensity.mName, err); @@ -336,13 +336,13 @@ void LLFloaterWindLight::syncMenu() // blue density param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err); - setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE); + //setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE); // Lighting // sunlight param_mgr->mSunlight = cur_params.getVector(param_mgr->mSunlight.mName, err); - setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE); + //setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE); // glow param_mgr->mGlow = cur_params.getVector(param_mgr->mGlow.mName, err); @@ -351,7 +351,7 @@ void LLFloaterWindLight::syncMenu() // ambient param_mgr->mAmbient = cur_params.getVector(param_mgr->mAmbient.mName, err); - setColorSwatch("WLAmbient", param_mgr->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE); + //setColorSwatch("WLAmbient", param_mgr->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE); childSetValue("WLSunAngle", param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI); childSetValue("WLEastAngle", param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI); @@ -360,7 +360,7 @@ void LLFloaterWindLight::syncMenu() // Cloud Color param_mgr->mCloudColor = cur_params.getVector(param_mgr->mCloudColor.mName, err); - setColorSwatch("WLCloudColor", param_mgr->mCloudColor, WL_CLOUD_SLIDER_SCALE); + //setColorSwatch("WLCloudColor", param_mgr->mCloudColor, WL_CLOUD_SLIDER_SCALE); // Cloud param_mgr->mCloudMain = cur_params.getVector(param_mgr->mCloudMain.mName, err); @@ -875,14 +875,11 @@ bool LLFloaterWindLight::deleteAlertCallback(const LLSD& notification, const LLS { LLFloaterDayCycle* day_cycle = NULL; LLComboBox* key_combo = NULL; - LLMultiSliderCtrl* mult_sldr = NULL; if(LLFloaterDayCycle::isOpen()) { day_cycle = LLFloaterDayCycle::instance(); - key_combo = day_cycle->getChild( - "WLKeyPresets"); - mult_sldr = day_cycle->getChild("WLDayCycleKeys"); + key_combo = day_cycle->getChild("WLKeyPresets"); } std::string name(mSkyPresetCombo->getSelectedValue().asString()); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 0cd3906fb..c164d6cf9 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -1644,11 +1644,9 @@ void LLFloaterWorldMap::onChangeMaturity() bool can_access_adult = gAgent.canAccessAdult(); childSetVisible("events_mature_icon", can_access_mature); - childSetVisible("events_mature_label", can_access_mature); childSetVisible("event_mature_chk", can_access_mature); childSetVisible("events_adult_icon", can_access_adult); - childSetVisible("events_adult_label", can_access_adult); childSetVisible("event_adult_chk", can_access_adult); // disable mature / adult events. diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index e474dec9e..8c84104f2 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -2046,7 +2046,6 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr { LLRect local_rect = item->getLocalRect(); LLRect item_scrolled_rect; // item position relative to display area of scroller - LLRect visible_doc_rect = mScrollContainer->getVisibleContentRect(); S32 icon_height = mIcon.isNull() ? 0 : mIcon->getHeight(); S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); diff --git a/indra/newview/llgivemoney.cpp b/indra/newview/llgivemoney.cpp index a335129c3..93865f444 100644 --- a/indra/newview/llgivemoney.cpp +++ b/indra/newview/llgivemoney.cpp @@ -155,8 +155,6 @@ LLFloaterPay::LLFloaterPay(const std::string& name, childSetVisible("amount text", FALSE); - childSetVisible("currency text", FALSE); - childSetTextArg("currency text", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); std::string last_amount; if(sLastAmount > 0) @@ -213,14 +211,12 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) self->childSetVisible("amount", FALSE); self->childSetVisible("pay btn", FALSE); self->childSetVisible("amount text", FALSE); - self->childSetVisible("currency text", FALSE); } else if (PAY_PRICE_DEFAULT == price) { self->childSetVisible("amount", TRUE); self->childSetVisible("pay btn", TRUE); self->childSetVisible("amount text", TRUE); - self->childSetVisible("currency text", TRUE); } else { @@ -231,7 +227,6 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) self->childSetVisible("pay btn", TRUE); self->childSetEnabled("pay btn", TRUE); self->childSetVisible("amount text", TRUE); - self->childSetVisible("currency text", TRUE); self->childSetText("amount", llformat("%d", llabs(price))); } @@ -375,7 +370,6 @@ void LLFloaterPay::payDirectly(money_callback callback, floater->childSetVisible("amount", TRUE); floater->childSetVisible("pay btn", TRUE); floater->childSetVisible("amount text", TRUE); - floater->childSetVisible("currency text", TRUE); floater->childSetVisible("fastpay text",TRUE); for(S32 i=0;igetHoverParcel(); LLUUID owner; - S32 width = 0; - S32 height = 0; if ( hover_parcel ) { owner = hover_parcel->getOwnerID(); - width = S32(LLViewerParcelMgr::getInstance()->getHoverParcelWidth()); - height = S32(LLViewerParcelMgr::getInstance()->getHoverParcelHeight()); } // Line: "Land" @@ -636,15 +632,6 @@ void LLHoverView::updateText() } } - // Line: "Size: 1x4" - // Only show for non-public land - /* - if ( hover_parcel && LLUUID::null != owner) - { - line = llformat("Size: %dx%d", width, height ); - mText.push_back(line); - } - */ if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE)) { LLStringUtil::format_map_t args; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 338bf45cf..d81d9e6f2 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -197,11 +197,8 @@ void LLHUDText::renderText() LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec); } - LLVector2 border_scale_vec((F32)border_width / (F32)imagep->getTextureWidth(), (F32)border_height / (F32)imagep->getTextureHeight()); LLVector3 width_vec = mWidth * x_pixel_vec; LLVector3 height_vec = mHeight * y_pixel_vec; - LLVector3 scaled_border_width = (F32)llfloor(border_scale * (F32)border_width) * x_pixel_vec; - LLVector3 scaled_border_height = (F32)llfloor(border_scale * (F32)border_height) * y_pixel_vec; mRadius = (width_vec + height_vec).magVec() * 0.5f; @@ -492,7 +489,7 @@ LLVector2 LLHUDText::updateScreenPos(LLVector2 &offset) LLVector3 x_pixel_vec; LLVector3 y_pixel_vec; LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec); - LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec); +// LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec); // if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen) // { // // bubble off-screen, so find a spot for it along screen edge diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 2e366dac0..953f7c097 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1356,18 +1356,25 @@ BOOL LLFloaterIMPanel::postBuild() mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); - childSetAction("profile_callee_btn", onClickProfile, this); - childSetAction("profile_tele_btn", onClickTeleport, this); - childSetAction("group_info_btn", onClickGroupInfo, this); + if (LLButton* btn = findChild("profile_callee_btn")) + { + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickProfile, this)); + if (!mProfileButtonEnabled) btn->setEnabled(false); + } + if (LLButton* btn = findChild("profile_tele_btn")) + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickTeleport, this)); + if (LLButton* btn = findChild("group_info_btn")) + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickGroupInfo, this)); childSetAction("history_btn", onClickHistory, this); - childSetCommitCallback("rp_mode", onRPMode, this); + if (LLUICtrl* ctrl = findChild("rp_mode")) + ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onRPMode, this, _2)); childSetAction("start_call_btn", onClickStartCall, this); childSetAction("end_call_btn", onClickEndCall, this); childSetAction("send_btn", onClickSend, this); - childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); + if (LLButton* btn = findChild("toggle_active_speakers_btn")) + btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickToggleActiveSpeakers, this, _2)); - childSetAction("moderator_kick_speaker", onKickSpeaker, this); //LLButton* close_btn = getChild("close_btn"); //close_btn->setClickedCallback(&LLFloaterIMPanel::onClickClose, this); @@ -1380,11 +1387,6 @@ BOOL LLFloaterIMPanel::postBuild() childSetEnabled("profile_btn", FALSE); } - if(!mProfileButtonEnabled) - { - childSetEnabled("profile_callee_btn", FALSE); - } - sTitleString = getString("title_string"); sTypingStartString = getString("typing_start_string"); sSessionStartString = getString("session_start_string"); @@ -1402,8 +1404,6 @@ BOOL LLFloaterIMPanel::postBuild() setDefaultBtn("send_btn"); - mActiveSpeakersPanel.connect(this,"active_speakers_panel"); - mToggleActiveSpeakersBtn.connect(this,"toggle_active_speakers_btn"); mVolumeSlider.connect(this,"speaker_volume"); mEndCallBtn.connect(this,"end_call_btn"); mStartCallBtn.connect(this,"start_call_btn"); @@ -1496,10 +1496,11 @@ void LLFloaterIMPanel::draw() // show speakers window when voice first connects if (mShowSpeakersOnConnect && mVoiceChannel->isActive()) { - mActiveSpeakersPanel->setVisible(true); + childSetVisible("active_speakers_panel", true); mShowSpeakersOnConnect = FALSE; } - mToggleActiveSpeakersBtn->setValue(mActiveSpeakersPanel->getVisible()); + if (LLUICtrl* ctrl = findChild("toggle_active_speakers_btn")) + ctrl->setValue(getChildView("active_speakers_panel")->getVisible()); if (mTyping) { @@ -1884,37 +1885,28 @@ void LLFloaterIMPanel::onTabClick(void* userdata) } -// static -void LLFloaterIMPanel::onClickProfile( void* userdata ) +void LLFloaterIMPanel::onClickProfile() { // Bring up the Profile window - LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; - - if (self->mOtherParticipantUUID.notNull()) + if (mOtherParticipantUUID.notNull()) { - LLFloaterAvatarInfo::showFromDirectory(self->getOtherParticipantID()); + LLFloaterAvatarInfo::showFromDirectory(mOtherParticipantUUID); } } -//static -void LLFloaterIMPanel::onClickTeleport( void* userdata ) +void LLFloaterIMPanel::onClickTeleport() { - // Bring up the Profile window - LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; - - if (self->mOtherParticipantUUID.notNull()) + if (mOtherParticipantUUID.notNull()) { - handle_lure(self->getOtherParticipantID()); + handle_lure(mOtherParticipantUUID); //do a teleport to other part id - //LLFloaterAvatarInfo::showFromDirectory(self->getOtherParticipantID()); + //LLFloaterAvatarInfo::showFromDirectory(mOtherParticipantID); } } -// static -void LLFloaterIMPanel::onRPMode(LLUICtrl* source, void* user_data) +void LLFloaterIMPanel::onRPMode(const LLSD& value) { - LLFloaterIMPanel* self = (LLFloaterIMPanel*) user_data; - self->mRPMode = source->getValue().asBoolean(); + mRPMode = value.asBoolean(); } // static @@ -1936,13 +1928,10 @@ void LLFloaterIMPanel::onClickHistory( void* userdata ) } } -// static -void LLFloaterIMPanel::onClickGroupInfo( void* userdata ) +void LLFloaterIMPanel::onClickGroupInfo() { // Bring up the Profile window - LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; - - LLFloaterGroupInfo::showFromUUID(self->mSessionUUID); + LLFloaterGroupInfo::showFromUUID(mSessionUUID); } // static @@ -1978,12 +1967,9 @@ void LLFloaterIMPanel::onClickSend(void* userdata) self->sendMsg(); } -// static -void LLFloaterIMPanel::onClickToggleActiveSpeakers(void* userdata) +void LLFloaterIMPanel::onClickToggleActiveSpeakers(const LLSD& value) { - LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata; - - self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel")); + childSetVisible("active_speakers_panel", !value); } // static @@ -2159,8 +2145,6 @@ void LLFloaterIMPanel::sendMsg() std::string prefix = utf8text.substr(0, 4); if (gSavedSettings.getBOOL("AscentAutoCloseOOC") && (utf8text.length() > 1) && !mRPMode) { - // Chalice - OOC autoclosing patch based on code by Henri Beauchamp - int needsClosingType=0; //Check if it needs the end-of-chat brackets -HgB if (utf8text.find("((") == 0 && utf8text.find("))") == std::string::npos) { @@ -2174,8 +2158,7 @@ void LLFloaterIMPanel::sendMsg() utf8text+=" "; utf8text+="]]"; } - //Check if it needs the start-of-chat brackets -HgB - needsClosingType=0; + if (prefix != "/me " && prefix != "/me'") //Allow /me to end with )) or ]] { if (utf8text.find("((") == std::string::npos && utf8text.find("))") == (utf8text.length() - 2)) @@ -2596,12 +2579,6 @@ void LLFloaterIMPanel::showSessionForceClose( } -//static -void LLFloaterIMPanel::onKickSpeaker(void* user_data) -{ - -} - bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const LLSD& response) { //only 1 option really diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 5cccd78b4..54a12c9d0 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -237,18 +237,17 @@ public: static void onCommitChat(LLUICtrl* caller, void* userdata); static void onTabClick( void* userdata ); - static void onClickProfile( void* userdata ); + void onClickProfile(); static void onClickHistory( void* userdata ); - static void onRPMode(LLUICtrl* source, void* user_data); - static void onClickTeleport( void* userdata ); - static void onClickGroupInfo( void* userdata ); + void onRPMode(const LLSD& value); + void onClickTeleport(); + void onClickGroupInfo(); static void onClickClose( void* userdata ); static void onClickStartCall( void* userdata ); static void onClickEndCall( void* userdata ); static void onClickSend( void* userdata ); - static void onClickToggleActiveSpeakers( void* userdata ); + void onClickToggleActiveSpeakers(const LLSD& value); static void* createSpeakersPanel(void* data); - static void onKickSpeaker(void* user_data); //callbacks for P2P muting and volume control static void onClickMuteVoice(void* user_data); @@ -385,8 +384,6 @@ private: boost::signals2::connection mFocusLostSignal; - CachedUICtrl mActiveSpeakersPanel; - CachedUICtrl mToggleActiveSpeakersBtn; CachedUICtrl mVolumeSlider; CachedUICtrl mEndCallBtn; CachedUICtrl mStartCallBtn; diff --git a/indra/newview/llinventoryactions.cpp b/indra/newview/llinventoryactions.cpp index 46a92a09d..5f0c183ee 100644 --- a/indra/newview/llinventoryactions.cpp +++ b/indra/newview/llinventoryactions.cpp @@ -95,9 +95,6 @@ // #include "lllocalinventory.h" -#include "llinventorybackup.h" -//#include "llcheats.h" -//#include "llnotecardmagic.h" #include "statemachine/aifilepicker.h" // diff --git a/indra/newview/llinventorybackup.cpp b/indra/newview/llinventorybackup.cpp deleted file mode 100644 index 0976daf8a..000000000 --- a/indra/newview/llinventorybackup.cpp +++ /dev/null @@ -1,790 +0,0 @@ -// -#include "llviewerprecompiledheaders.h" - -#include "llinventorybackup.h" -#include "llinventorymodel.h" -#include "llviewerinventory.h" -#include "statemachine/aifilepicker.h" -#include "statemachine/aidirpicker.h" -#include "llviewertexturelist.h" // gTextureList -#include "llagent.h" // gAgent -#include "llviewerwindow.h" // gViewerWindow -#include "llfloater.h" -#include "lluictrlfactory.h" -#include "llscrolllistctrl.h" -#include "llimagetga.h" -#include "llnotificationsutil.h" - -std::list LLFloaterInventoryBackup::sInstances; - -LLInventoryBackupOrder::LLInventoryBackupOrder() -{ - // My personal defaults based on what is assumed to not work - mDownloadTextures = true; - mDownloadSounds = true; - mDownloadCallingCards = false; - mDownloadLandmarks = true; - mDownloadScripts = true; - mDownloadWearables = true; - mDownloadObjects = false; - mDownloadNotecards = true; - mDownloadAnimations = true; - mDownloadGestures = true; - //mDownloadOthers = true; -} - -LLFloaterInventoryBackupSettings::LLFloaterInventoryBackupSettings(LLInventoryBackupOrder* order) -: LLFloater(), - mOrder(order) -{ - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inventory_backup_settings.xml"); -} - -LLFloaterInventoryBackupSettings::~LLFloaterInventoryBackupSettings() -{ -} - -BOOL LLFloaterInventoryBackupSettings::postBuild(void) -{ - childSetValue("chk_textures", mOrder->mDownloadTextures); - childSetValue("chk_sounds", mOrder->mDownloadSounds); - childSetValue("chk_callingcards", mOrder->mDownloadCallingCards); - childSetValue("chk_landmarks", mOrder->mDownloadLandmarks); - childSetValue("chk_scripts", mOrder->mDownloadScripts); - childSetValue("chk_wearables", mOrder->mDownloadWearables); - childSetValue("chk_objects", mOrder->mDownloadObjects); - childSetValue("chk_notecards", mOrder->mDownloadNotecards); - childSetValue("chk_animations", mOrder->mDownloadAnimations); - childSetValue("chk_gestures", mOrder->mDownloadGestures); - //childSetValue("chk_others", mOrder->mDownloadOthers); - - childSetAction("next_btn", LLFloaterInventoryBackupSettings::onClickNext, this); - - return TRUE; -} - -// static -void LLFloaterInventoryBackupSettings::onClickNext(void* userdata) -{ - LLFloaterInventoryBackupSettings* floater = (LLFloaterInventoryBackupSettings*)userdata; - LLInventoryBackupOrder* order = floater->mOrder; - - // Apply changes to filters - order->mDownloadAnimations = floater->childGetValue("chk_animations"); - order->mDownloadCallingCards = floater->childGetValue("chk_callingcards"); - order->mDownloadGestures = floater->childGetValue("chk_gestures"); - order->mDownloadLandmarks = floater->childGetValue("chk_landmarks"); - order->mDownloadNotecards = floater->childGetValue("chk_notecards"); - order->mDownloadObjects = floater->childGetValue("chk_objects"); - //order->mDownloadOthers = floater->childGetValue("chk_others"); - order->mDownloadScripts = floater->childGetValue("chk_scripts"); - order->mDownloadSounds = floater->childGetValue("chk_sounds"); - order->mDownloadTextures = floater->childGetValue("chk_textures"); - order->mDownloadWearables = floater->childGetValue("chk_wearables"); - - // Make filters - std::map type_remove; - type_remove[LLAssetType::AT_ANIMATION] = !order->mDownloadAnimations; - type_remove[LLAssetType::AT_BODYPART] = !order->mDownloadWearables; - type_remove[LLAssetType::AT_CALLINGCARD] = !order->mDownloadCallingCards; - type_remove[LLAssetType::AT_CLOTHING] = !order->mDownloadWearables; - type_remove[LLAssetType::AT_GESTURE] = !order->mDownloadGestures; - type_remove[LLAssetType::AT_IMAGE_JPEG] = !order->mDownloadTextures; - type_remove[LLAssetType::AT_IMAGE_TGA] = !order->mDownloadTextures; - type_remove[LLAssetType::AT_LANDMARK] = !order->mDownloadLandmarks; - type_remove[LLAssetType::AT_LSL_TEXT] = !order->mDownloadScripts; - type_remove[LLAssetType::AT_NOTECARD] = !order->mDownloadNotecards; - type_remove[LLAssetType::AT_OBJECT] = !order->mDownloadObjects; - type_remove[LLAssetType::AT_SCRIPT] = !order->mDownloadScripts; - type_remove[LLAssetType::AT_SOUND] = !order->mDownloadSounds; - type_remove[LLAssetType::AT_SOUND_WAV] = !order->mDownloadSounds; - type_remove[LLAssetType::AT_TEXTURE] = !order->mDownloadTextures; - type_remove[LLAssetType::AT_TEXTURE_TGA] = !order->mDownloadTextures; - - // Apply filters - std::vector::iterator item_iter = order->mItems.begin(); - for( ; item_iter != order->mItems.end(); ) - { - if(type_remove[(*item_iter)->getType()]) - item_iter = order->mItems.erase(item_iter); - else - ++item_iter; - } - - if(order->mItems.size() < 1) - { - LLSD args; - args["ERROR_MESSAGE"] = "No items passed the filter \\o/"; - LLNotificationsUtil::add("ErrorMessage", args); - return; - } - - // Get dir name - AIDirPicker* dirpicker = new AIDirPicker("New Folder"); - dirpicker->run(boost::bind(&LLFloaterInventoryBackupSettings::onClickNext_continued, userdata, dirpicker)); -} - -// static -void LLFloaterInventoryBackupSettings::onClickNext_continued(void* userdata, AIDirPicker* dirpicker) -{ - LLFloaterInventoryBackupSettings* floater = (LLFloaterInventoryBackupSettings*)userdata; - LLInventoryBackupOrder* order = floater->mOrder; - - if (!dirpicker->hasDirname()) - { - floater->close(); - return; - } - std::string dirname = dirpicker->getDirname(); - - // Make local directory tree - LLFile::mkdir(dirname); - std::vector::iterator _cat_iter = order->mCats.begin(); - std::vector::iterator _cat_end = order->mCats.end(); - for( ; _cat_iter != _cat_end; ++_cat_iter) - { - std::string path = dirname + OS_SEP + LLInventoryBackup::getPath(*_cat_iter, order->mCats); - LLFile::mkdir(path); - } - - // Go go backup floater - LLFloaterInventoryBackup* backup_floater = new LLFloaterInventoryBackup(dirname, order->mCats, order->mItems); - backup_floater->center(); - - // Close myself - floater->close(); -} - -// static -bool LLInventoryBackup::itemIsFolder(LLInventoryItem* item) -{ - return ((item->getInventoryType() == LLInventoryType::IT_CATEGORY) - || (item->getInventoryType() == LLInventoryType::IT_ROOT_CATEGORY)); -} - -// static -ESaveFilter LLInventoryBackup::getSaveFilter(LLInventoryItem* item) -{ - LLAssetType::EType type = item->getType(); - LLWearableType::EType wear = (LLWearableType::EType)(item->getFlags() & 0xFF); - switch(type) - { - case LLAssetType::AT_TEXTURE: - return FFSAVE_TGA; - case LLAssetType::AT_SOUND: - return FFSAVE_OGG; - case LLAssetType::AT_SCRIPT: - case LLAssetType::AT_LSL_TEXT: - return FFSAVE_SCRIPT; - case LLAssetType::AT_ANIMATION: - return FFSAVE_ANIMATN; - case LLAssetType::AT_GESTURE: - return FFSAVE_GESTURE; - case LLAssetType::AT_NOTECARD: - return FFSAVE_NOTECARD; - case LLAssetType::AT_LANDMARK: - return FFSAVE_LANDMARK; - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - switch(wear) - { - case LLWearableType::WT_EYES: - return FFSAVE_EYES; - case LLWearableType::WT_GLOVES: - return FFSAVE_GLOVES; - case LLWearableType::WT_HAIR: - return FFSAVE_HAIR; - case LLWearableType::WT_JACKET: - return FFSAVE_JACKET; - case LLWearableType::WT_PANTS: - return FFSAVE_PANTS; - case LLWearableType::WT_SHAPE: - return FFSAVE_SHAPE; - case LLWearableType::WT_SHIRT: - return FFSAVE_SHIRT; - case LLWearableType::WT_SHOES: - return FFSAVE_SHOES; - case LLWearableType::WT_SKIN: - return FFSAVE_SKIN; - case LLWearableType::WT_SKIRT: - return FFSAVE_SKIRT; - case LLWearableType::WT_SOCKS: - return FFSAVE_SOCKS; - case LLWearableType::WT_UNDERPANTS: - return FFSAVE_UNDERPANTS; - case LLWearableType::WT_UNDERSHIRT: - return FFSAVE_UNDERSHIRT; - case LLWearableType::WT_PHYSICS: - return FFSAVE_PHYSICS; - default: - return FFSAVE_ALL; - } - default: - return FFSAVE_ALL; - } -} - -// static -std::string LLInventoryBackup::getExtension(LLInventoryItem* item) -{ - LLAssetType::EType type = item->getType(); - LLWearableType::EType wear = (LLWearableType::EType)(item->getFlags() & 0xFF); - std::string scratch; - switch(type) - { - case LLAssetType::AT_TEXTURE: - return ".tga"; - case LLAssetType::AT_SOUND: - return ".ogg"; - case LLAssetType::AT_SCRIPT: - case LLAssetType::AT_LSL_TEXT: - return ".lsl"; - case LLAssetType::AT_ANIMATION: - return ".animatn"; - case LLAssetType::AT_GESTURE: - return ".gesture"; - case LLAssetType::AT_NOTECARD: - return ".notecard"; - case LLAssetType::AT_LANDMARK: - return ".landmark"; - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - scratch = LLWearableType::getTypeName(wear); - if(scratch == "invalid") - { - if(type == LLAssetType::AT_BODYPART) - scratch = "bodypart"; - else - scratch = "clothing"; - } - return "." + scratch; - default: - return ""; - } -} - -// static -std::string LLInventoryBackup::getUniqueFilename(std::string filename, std::string extension) -{ - if(LLFile::isfile( (filename + extension).c_str() )) - { - int i = 1; - while(LLFile::isfile( (filename + llformat(" %d", i) + extension).c_str() )) - { - i++; - } - return filename + llformat(" %d", i) + extension; - } - return filename + extension; -} - -// static -std::string LLInventoryBackup::getUniqueDirname(std::string dirname) -{ - if(LLFile::isdir(dirname.c_str())) - { - int i = 1; - while(LLFile::isdir( (dirname + llformat(" %d", i)).c_str() )) - { - i++; - } - return dirname + llformat(" %d", i); - } - return dirname; -} - - -// static -void LLInventoryBackup::download(LLInventoryItem* item, LLFloater* floater, loaded_callback_func onImage, LLGetAssetCallback onAsset) -{ - LLInventoryBackup::callbackdata* userdata = new LLInventoryBackup::callbackdata(); - userdata->floater = floater; - userdata->item = item; - LLViewerFetchedTexture* imagep; - - switch(item->getType()) - { - case LLAssetType::AT_TEXTURE: - imagep = LLViewerTextureManager::getFetchedTexture(item->getAssetUUID(), MIPMAP_TRUE, LLGLTexture::BOOST_UI); - imagep->setLoadedCallback( onImage, 0, TRUE, FALSE, userdata, NULL ); // was setLoadedCallbackNoAuth - break; - case LLAssetType::AT_NOTECARD: - case LLAssetType::AT_SCRIPT: - case LLAssetType::AT_LSL_TEXT: // normal script download - case LLAssetType::AT_LSL_BYTECODE: - gAssetStorage->getInvItemAsset(LLHost::invalid, - gAgent.getID(), - gAgent.getSessionID(), - item->getPermissions().getOwner(), - LLUUID::null, - item->getUUID(), - item->getAssetUUID(), - item->getType(), - onAsset, - userdata, // user_data - TRUE); - break; - case LLAssetType::AT_SOUND: - case LLAssetType::AT_CLOTHING: - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_ANIMATION: - case LLAssetType::AT_GESTURE: - default: - gAssetStorage->getAssetData(item->getAssetUUID(), item->getType(), onAsset, userdata, TRUE); - break; - } -} - -// static -void LLInventoryBackup::imageCallback(BOOL success, - LLViewerFetchedTexture *src_vi, - LLImageRaw* src, - LLImageRaw* aux_src, - S32 discard_level, - BOOL final, - void* userdata) -{ - if(final) - { - LLInventoryBackup::callbackdata* data = static_cast(userdata); - LLInventoryItem* item = data->item; - - if(!success) - { - LLSD args; - args["ERROR_MESSAGE"] = "Download didn't work on " + item->getName() + "."; - LLNotificationsUtil::add("ErrorMessage", args); - return; - } - - AIFilePicker* filepicker = AIFilePicker::create(); - filepicker->open(LLDir::getScrubbedFileName(item->getName()), getSaveFilter(item)); - filepicker->run(boost::bind(&LLInventoryBackup::imageCallback_continued, src, filepicker)); - } - else - { - src_vi->setBoostLevel(LLGLTexture::BOOST_UI); - } -} - -void LLInventoryBackup::imageCallback_continued(LLImageRaw* src, AIFilePicker* filepicker) -{ - if (!filepicker->hasFilename()) - return; - - std::string filename = filepicker->getFilename(); - - LLPointer image_tga = new LLImageTGA; - if( !image_tga->encode( src ) ) - { - LLSD args; - args["ERROR_MESSAGE"] = "Couldn't encode file."; - LLNotificationsUtil::add("ErrorMessage", args); - } - else if( !image_tga->save( filename ) ) - { - LLSD args; - args["ERROR_MESSAGE"] = "Couldn't write file."; - LLNotificationsUtil::add("ErrorMessage", args); - } -} - -// static -void LLInventoryBackup::assetCallback(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status) -{ - LLInventoryBackup::callbackdata* data = static_cast(user_data); - LLInventoryItem* item = data->item; - - if(status != 0) - { - LLSD args; - args["ERROR_MESSAGE"] = "Download didn't work on " + item->getName() + "."; - LLNotificationsUtil::add("ErrorMessage", args); - return; - } - - // Todo: this doesn't work for static vfs shit - LLVFile file(vfs, asset_uuid, type, LLVFile::READ); - S32 size = file.getSize(); - - char* buffer = new char[size]; // Deleted in assetCallback_continued. - if (buffer == NULL) - { - llerrs << "Memory Allocation Failed" << llendl; - return; - } - - file.read((U8*)buffer, size); - - // Write it back out... - - AIFilePicker* filepicker = AIFilePicker::create(); - filepicker->open(LLDir::getScrubbedFileName(item->getName()), getSaveFilter(item)); - filepicker->run(boost::bind(&LLInventoryBackup::assetCallback_continued, buffer, size, filepicker)); -} - -// static -void LLInventoryBackup::assetCallback_continued(char* buffer, S32 size, AIFilePicker* filepicker) -{ - if (filepicker->hasFilename()) - { - std::string filename = filepicker->getFilename(); - std::ofstream export_file(filename.c_str(), std::ofstream::binary); - export_file.write(buffer, size); - export_file.close(); - } - delete [] buffer; -} - -// static -void LLInventoryBackup::climb(LLInventoryCategory* cat, - std::vector& cats, - std::vector& items) -{ - LLInventoryModel* model = &gInventory; - - // Add this category - cats.push_back(cat); - - LLInventoryModel::cat_array_t *direct_cats; - LLInventoryModel::item_array_t *direct_items; - model->getDirectDescendentsOf(cat->getUUID(), direct_cats, direct_items); - - // Add items - LLInventoryModel::item_array_t::iterator item_iter = direct_items->begin(); - LLInventoryModel::item_array_t::iterator item_end = direct_items->end(); - for( ; item_iter != item_end; ++item_iter) - { - items.push_back(*item_iter); - } - - // Do subcategories - LLInventoryModel::cat_array_t::iterator cat_iter = direct_cats->begin(); - LLInventoryModel::cat_array_t::iterator cat_end = direct_cats->end(); - for( ; cat_iter != cat_end; ++cat_iter) - { - climb(*cat_iter, cats, items); - } -} - -// static -std::string LLInventoryBackup::getPath(LLInventoryCategory* cat, std::vector cats) -{ - LLInventoryModel* model = &gInventory; - std::string path = LLDir::getScrubbedFileName(cat->getName()); - LLInventoryCategory* parent = model->getCategory(cat->getParentUUID()); - while(parent && (std::find(cats.begin(), cats.end(), parent) != cats.end())) - { - path = LLDir::getScrubbedFileName(parent->getName()) + OS_SEP + path; - parent = model->getCategory(parent->getParentUUID()); - } - return path; -} - -// static -void LLInventoryBackup::save(LLFolderView* folder) -{ - LLInventoryModel* model = &gInventory; - - std::set selected_items = folder->getSelectionList(); - - if(selected_items.size() < 1) - { - // No items selected? Omg - return; - } - else if(selected_items.size() == 1) - { - // One item. See if it's a folder - LLUUID id = *(selected_items.begin()); - LLInventoryItem* item = model->getItem(id); - if(item) - { - if(!itemIsFolder(item)) - { - // Single item, save it now - LLInventoryBackup::download((LLViewerInventoryItem*)item, NULL, imageCallback, assetCallback); - return; - } - } - } - - // We got here? We need to save multiple items or at least make a folder - - std::vector cats; - std::vector items; - - // Make complete lists of child categories and items - std::set::iterator sel_iter = selected_items.begin(); - std::set::iterator sel_end = selected_items.end(); - for( ; sel_iter != sel_end; ++sel_iter) - { - LLInventoryCategory* cat = model->getCategory(*sel_iter); - if(cat) - { - climb(cat, cats, items); - } - } - - // And what about items inside a folder that wasn't selected? - // I guess I will just add selected items, so long as they aren't already added - for(sel_iter = selected_items.begin(); sel_iter != sel_end; ++sel_iter) - { - LLInventoryItem* item = model->getItem(*sel_iter); - if(item) - { - if(std::find(items.begin(), items.end(), item) == items.end()) - { - items.push_back(item); - LLInventoryCategory* parent = model->getCategory(item->getParentUUID()); - if(std::find(cats.begin(), cats.end(), parent) == cats.end()) - { - cats.push_back(parent); - } - } - } - } - - LLInventoryBackupOrder* order = new LLInventoryBackupOrder(); - order->mCats = cats; - order->mItems = items; - LLFloaterInventoryBackupSettings* floater = new LLFloaterInventoryBackupSettings(order); - floater->center(); -} - - - -LLFloaterInventoryBackup::LLFloaterInventoryBackup(std::string path, std::vector cats, std::vector items) -: LLFloater(), - mPath(path), - mCats(cats), - mItems(items), - mBusy(0) -{ - mItemsTotal = mItems.size(); - mItemsCompleted = 0; - - LLFloaterInventoryBackup::sInstances.push_back(this); - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inventory_backup.xml"); -} - - -LLFloaterInventoryBackup::~LLFloaterInventoryBackup() -{ - LLFloaterInventoryBackup::sInstances.remove(this); -} - -BOOL LLFloaterInventoryBackup::postBuild(void) -{ - // Make progress bar - - /* - LLLineEditor* line = new LLLineEditor( - std::string("progress_line"), - LLRect(4, 80, 396, 60), - std::string("Progress")); - line->setEnabled(FALSE); - addChild(line); - - LLViewBorder* border = new LLViewBorder( - "progress_border", - LLRect(4, 79, 395, 60)); - addChild(border); - */ - - // Add all items to the list - - LLScrollListCtrl* list = getChild("item_list"); - - std::vector::iterator item_iter = mItems.begin(); - std::vector::iterator item_end = mItems.end(); - for( ; item_iter != item_end; ++item_iter) - { - LLSD element; - element["id"] = (*item_iter)->getUUID(); - - LLSD& type_column = element["columns"][LIST_TYPE]; - type_column["column"] = "type"; - type_column["type"] = "icon"; - type_column["value"] = "move_down_in.tga"; // FIXME - - LLSD& name_column = element["columns"][LIST_NAME]; - name_column["column"] = "name"; - name_column["value"] = (*item_iter)->getName(); - - LLSD& status_column = element["columns"][LIST_STATUS]; - status_column["column"] = "status"; - status_column["value"] = "Pending"; - - /*LLScrollListItem* scroll_itemp = */list->addElement(element, ADD_BOTTOM); - - //hack to stop crashing - //LLScrollListIcon* icon = (LLScrollListIcon*)scroll_itemp->getColumn(LIST_TYPE); - //icon->setClickCallback(NULL); - } - - // Setup and go! - mBusy = 1; - mItemIter = mItems.begin(); - setStatus((*mItemIter)->getUUID(), "Downloading"); - LLInventoryBackup::download(*mItemIter, this, LLFloaterInventoryBackup::imageCallback, LLFloaterInventoryBackup::assetCallback); - advance(); - - return TRUE; -} - -void LLFloaterInventoryBackup::advance() -{ - while((mItemIter != mItems.end()) && (mBusy < 4)) - { - mBusy++; - mItemIter++; - if(mItemIter >= mItems.end()) break; - setStatus((*mItemIter)->getUUID(), "Downloading"); - LLInventoryBackup::download(*mItemIter, this, LLFloaterInventoryBackup::imageCallback, LLFloaterInventoryBackup::assetCallback); - } -} - -void LLFloaterInventoryBackup::setStatus(LLUUID itemid, std::string status) -{ - LLScrollListCtrl* list = getChild("item_list"); - std::vector items = list->getAllData(); - std::vector::iterator iter = items.begin(); - std::vector::iterator end = items.end(); - for( ; iter != end; ++iter) - { - if((*iter)->getUUID() == itemid) - { - (*iter)->getColumn(LIST_STATUS)->setValue(status); - break; - } - } -} - -void LLFloaterInventoryBackup::finishItem(LLUUID itemid, std::string status) -{ - // Update big happy progress bar - mItemsCompleted++; - LLView* progress_background = getChildView("progress_background", TRUE, TRUE); - LLRect rect = progress_background->getRect(); - float item_count = (float)mItemsTotal; - float item_pos = (float)mItemsCompleted; - float rect_width = (float)rect.getWidth(); - float incr = rect_width / item_count; - incr *= item_pos; - rect.mRight = rect.mLeft + (S32)incr; - LLView* progress_foreground = getChildView("progress_foreground", TRUE, TRUE); - progress_foreground->setRect(rect); - - if(mItemsCompleted >= mItemsTotal) - { - childSetText("progress_background", llformat("Completed %d items.", mItemsTotal)); - childSetVisible("progress_foreground", false); - } - - // Update item status - setStatus(itemid, status); - - // And advance - mBusy--; - advance(); -} - -// static -void LLFloaterInventoryBackup::imageCallback(BOOL success, - LLViewerFetchedTexture *src_vi, - LLImageRaw* src, - LLImageRaw* aux_src, - S32 discard_level, - BOOL final, - void* userdata) -{ - if(final) - { - LLInventoryBackup::callbackdata* data = static_cast(userdata); - LLFloaterInventoryBackup* floater = (LLFloaterInventoryBackup*)(data->floater); - LLInventoryItem* item = data->item; - - if(std::find(LLFloaterInventoryBackup::sInstances.begin(), LLFloaterInventoryBackup::sInstances.end(), floater) == LLFloaterInventoryBackup::sInstances.end()) - { - return; - } - - if(!success) - { - floater->finishItem(item->getUUID(), "Failed download"); - return; - } - - std::string filename = floater->mPath + OS_SEP + LLInventoryBackup::getPath(gInventory.getCategory(item->getParentUUID()), floater->mCats) + OS_SEP + LLDir::getScrubbedFileName(item->getName()); - filename = LLInventoryBackup::getUniqueFilename(filename, LLInventoryBackup::getExtension(item)); - - LLPointer image_tga = new LLImageTGA; - if( !image_tga->encode( src ) ) - { - floater->finishItem(item->getUUID(), "Failed tga encode"); - } - else if( !image_tga->save( filename ) ) - { - floater->finishItem(item->getUUID(), "Failed save"); - } - else - { - floater->finishItem(item->getUUID(), "Done"); - } - } - else - { - src_vi->setBoostLevel(LLGLTexture::BOOST_UI); - } -} - -// static -void LLFloaterInventoryBackup::assetCallback(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status) -{ - LLInventoryBackup::callbackdata* data = static_cast(user_data); - LLFloaterInventoryBackup* floater = (LLFloaterInventoryBackup*)(data->floater); - LLInventoryItem* item = data->item; - - if(std::find(LLFloaterInventoryBackup::sInstances.begin(), LLFloaterInventoryBackup::sInstances.end(), floater) == LLFloaterInventoryBackup::sInstances.end()) - { - return; - } - - if(status != 0) - { - floater->finishItem(item->getUUID(), "Failed download"); - return; - } - - // Todo: this doesn't work for static vfs shit - LLVFile file(vfs, asset_uuid, type, LLVFile::READ); - S32 size = file.getSize(); - - char* buffer = new char[size]; - if (buffer == NULL) - { - //llerrs << "Memory Allocation Failed" << llendl; - floater->finishItem(item->getUUID(), "Failed memory allocation"); - return; - } - - file.read((U8*)buffer, size); - - // Write it back out... - std::string filename = floater->mPath + OS_SEP + LLInventoryBackup::getPath(gInventory.getCategory(item->getParentUUID()), floater->mCats) + OS_SEP + LLDir::getScrubbedFileName(item->getName()); - filename = LLInventoryBackup::getUniqueFilename(filename, LLInventoryBackup::getExtension(item)); - - std::ofstream export_file(filename.c_str(), std::ofstream::binary); - export_file.write(buffer, size); - export_file.close(); - - floater->finishItem(item->getUUID(), "Done"); -} -// diff --git a/indra/newview/llinventorybackup.h b/indra/newview/llinventorybackup.h deleted file mode 100644 index 2ee0c197c..000000000 --- a/indra/newview/llinventorybackup.h +++ /dev/null @@ -1,141 +0,0 @@ -// -#ifndef LL_LLINVENTORYBACKUP_H -#define LL_LLINVENTORYBACKUP_H - -#if LL_WINDOWS -#define OS_SEP "\\" -#else -#define OS_SEP "/" -#endif - - -#include "llviewerinventory.h" -#include "llfolderview.h" -#include "statemachine/aifilepicker.h" -#include "llviewertexture.h" -#include "llfloater.h" - -class AIDirPicker; - -class LLInventoryBackupOrder -{ -public: - LLInventoryBackupOrder(); - - std::string mPath; - std::vector mCats; - std::vector mItems; - - bool mDownloadTextures; - bool mDownloadSounds; - bool mDownloadCallingCards; - bool mDownloadLandmarks; - bool mDownloadScripts; - bool mDownloadWearables; - bool mDownloadObjects; - bool mDownloadNotecards; - bool mDownloadAnimations; - bool mDownloadGestures; - //bool mDownloadOthers; -}; - -class LLFloaterInventoryBackupSettings -: public LLFloater -{ -public: - LLFloaterInventoryBackupSettings(LLInventoryBackupOrder* order); - BOOL postBuild(void); - static void onClickNext(void* userdata); - static void onClickNext_continued(void* userdata, AIDirPicker* dirpicker); - - LLInventoryBackupOrder* mOrder; - virtual ~LLFloaterInventoryBackupSettings(); -}; - -class LLFloaterInventoryBackup -: public LLFloater -{ -public: - LLFloaterInventoryBackup(std::string path, std::vector cats, std::vector items); - BOOL postBuild(void); - - std::string mPath; - std::vector mCats; - std::vector mItems; - std::vector::iterator mItemIter; - int mBusy; - - static std::list sInstances; - -private: - virtual ~LLFloaterInventoryBackup(); - void setStatus(LLUUID itemid, std::string status); - void finishItem(LLUUID itemid, std::string status); - void advance(); - static void imageCallback(BOOL success, - LLViewerFetchedTexture *src_vi, - LLImageRaw* src, - LLImageRaw* aux_src, - S32 discard_level, - BOOL final, - void* userdata); - static void assetCallback(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status); - - int mItemsTotal; - int mItemsCompleted; - - enum LIST_COLUMN_ORDER - { - LIST_TYPE, - LIST_NAME, - LIST_STATUS - }; - -}; - -class AIFilePicker; - -class LLInventoryBackup -{ -public: - static ESaveFilter getSaveFilter(LLInventoryItem* item); - static std::string getExtension(LLInventoryItem* item); - static std::string getUniqueFilename(std::string filename, std::string extension); - static std::string getUniqueDirname(std::string dirname); - static bool itemIsFolder(LLInventoryItem* item); - static void save(LLFolderView* folder); - static void download(LLInventoryItem* item, LLFloater* floater, loaded_callback_func onImage, LLGetAssetCallback onAsset); - static std::string getPath(LLInventoryCategory* cat, std::vector cats); - - struct callbackdata - { - LLFloater* floater; - LLInventoryItem* item; - }; - -private: - static void imageCallback(BOOL success, - LLViewerFetchedTexture *src_vi, - LLImageRaw* src, - LLImageRaw* aux_src, - S32 discard_level, - BOOL final, - void* userdata); - static void imageCallback_continued(LLImageRaw* src, AIFilePicker* filepicker); - static void assetCallback(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status); - static void assetCallback_continued(char* buffer, S32 size, AIFilePicker* filepicker); - static void climb(LLInventoryCategory* cat, - std::vector& cats, - std::vector& items); -}; - - - -#endif -// diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d792118e4..6316714b1 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -108,8 +108,6 @@ #include "llappviewer.h" // System Folders #include "llfloateranimpreview.h" // for reuploads #include "llfloaterimagepreview.h" // for reuploads -//#include "llcheats.h" -#include "hgfloatertexteditor.h" #include "statemachine/aifilepicker.h" // diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 9e27b1ad4..3dce0c96a 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -547,7 +547,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str fetcher->incrFetchCount(-1); - if (status==499) // timed out + if (is_internal_http_error_that_warrants_a_retry(status)) // timed out { for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(); folder_it != mRequestSD["folders"].endArray(); diff --git a/indra/newview/lllocalinventory.cpp b/indra/newview/lllocalinventory.cpp index 1bb9cf102..edab999ff 100644 --- a/indra/newview/lllocalinventory.cpp +++ b/indra/newview/lllocalinventory.cpp @@ -11,7 +11,6 @@ #include "llpreviewtexture.h" #include "llpreviewgesture.h" #include "llpreviewlandmark.h" -#include "hgfloatertexteditor.h" #include "llappviewer.h" diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 0b19efde6..7db143bc2 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -172,6 +172,7 @@ namespace LLMarketplaceImport if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) || (status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) || + (status == MarketplaceErrorCodes::IMPORT_JOB_LOW_SPEED) || (status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)) { if (gSavedSettings.getBOOL("InventoryOutboxLogging")) @@ -228,6 +229,7 @@ namespace LLMarketplaceImport } if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) || + (status == MarketplaceErrorCodes::IMPORT_JOB_LOW_SPEED) || (status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)) { if (gSavedSettings.getBOOL("InventoryOutboxLogging")) diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 4c4e07903..af7c864c0 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -35,6 +35,7 @@ #include "llsingleton.h" #include "llstring.h" +#include "llhttpstatuscodes.h" LLSD getMarketplaceStringSubstitutions(); @@ -44,13 +45,14 @@ namespace MarketplaceErrorCodes { enum eCode { - IMPORT_DONE = 200, - IMPORT_PROCESSING = 202, - IMPORT_REDIRECT = 302, - IMPORT_AUTHENTICATION_ERROR = 401, - IMPORT_DONE_WITH_ERRORS = 409, - IMPORT_JOB_FAILED = 410, - IMPORT_JOB_TIMEOUT = 499, + IMPORT_DONE = HTTP_OK, + IMPORT_PROCESSING = HTTP_ACCEPTED, + IMPORT_REDIRECT = HTTP_FOUND, + IMPORT_AUTHENTICATION_ERROR = HTTP_UNAUTHORIZED, + IMPORT_DONE_WITH_ERRORS = HTTP_CONFLICT, + IMPORT_JOB_FAILED = HTTP_GONE, + IMPORT_JOB_LOW_SPEED = HTTP_INTERNAL_ERROR_LOW_SPEED, + IMPORT_JOB_TIMEOUT = HTTP_INTERNAL_ERROR_CURL_TIMEOUT }; } diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp deleted file mode 100644 index e4815fbb1..000000000 --- a/indra/newview/llmemoryview.cpp +++ /dev/null @@ -1,346 +0,0 @@ -/** - * @file llmemoryview.cpp - * @brief LLMemoryView class implementation - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llmemoryview.h" - -#include "llappviewer.h" -#include "llallocator_heap_profile.h" -#include "llgl.h" // LLGLSUIDefault -#include "llviewerwindow.h" -#include "llviewercontrol.h" - -#include -#include - -#include "llmemory.h" - - - -LLMemoryView::LLMemoryView(const std::string& name, const LLRect& rect) -: LLView(name, rect, TRUE), - mPaused(FALSE), - //mDelay(120), - mAlloc(NULL) -{ - setVisible(FALSE); -} - -LLMemoryView::~LLMemoryView() -{ -} - -BOOL LLMemoryView::handleMouseDown(S32 x, S32 y, MASK mask) -{ - if (mask & MASK_SHIFT) - { - } - else if (mask & MASK_CONTROL) - { - } - else - { - mPaused = !mPaused; - } - return TRUE; -} - -BOOL LLMemoryView::handleMouseUp(S32 x, S32 y, MASK mask) -{ - return TRUE; -} - - -BOOL LLMemoryView::handleHover(S32 x, S32 y, MASK mask) -{ - return FALSE; -} - -void LLMemoryView::refreshProfile() -{ - /* - LLAllocator & alloc = LLAppViewer::instance()->getAllocator(); - if(alloc.isProfiling()) { - std::string profile_text = alloc.getRawProfile(); - - boost::algorithm::split(mLines, profile_text, boost::bind(std::equal_to(), '\n', _1)); - } else { - mLines.clear(); - } - */ - if (mAlloc == NULL) { - mAlloc = &LLAppViewer::instance()->getAllocator(); - } - - mLines.clear(); - -#if MEM_TRACK_MEM - if(mAlloc->isProfiling()) - { - const LLAllocatorHeapProfile &prof = mAlloc->getProfile(); - for(size_t i = 0; i < prof.mLines.size(); ++i) - { - std::stringstream ss; - ss << "Unfreed Mem: " << (prof.mLines[i].mLiveSize >> 20) << " M Trace: "; - for(size_t k = 0; k < prof.mLines[i].mTrace.size(); ++k) - { - ss << LLMemType::getNameFromID(prof.mLines[i].mTrace[k]) << " "; - } - mLines.push_back(utf8string_to_wstring(ss.str())); - } - } -#endif -} - -void LLMemoryView::draw() -{ - const S32 UPDATE_INTERVAL = 60; - const S32 MARGIN_AMT = 10; - static S32 curUpdate = UPDATE_INTERVAL; - static const LLCachedControl console_background(gColors,"ConsoleBackground"); - static LLColor4 s_console_color = console_background; - - // setup update interval - if (curUpdate >= UPDATE_INTERVAL) - { - refreshProfile(); - curUpdate = 0; - } - curUpdate++; - - // setup window properly - S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f); - S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.9f); - setRect(LLRect().setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height)); - - // setup window color - static const LLCachedControl console_background_opacity("ConsoleBackgroundOpacity"); - F32 console_opacity = llclamp(console_background_opacity.get(), 0.f, 1.f); - LLColor4 color = s_console_color; - color.mV[VALPHA] *= console_opacity; - - LLGLSUIDefault gls_ui; - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gl_rect_2d(0, height, width, 0, color); - - LLFontGL * font = LLFontGL::getFontSansSerifSmall(); - - // draw remaining lines - F32 y_pos = 0.f; - F32 y_off = 0.f; - - F32 line_height = font->getLineHeight(); - S32 target_width = width - 2 * MARGIN_AMT; - - // cut off lines on bottom - U32 max_lines = U32((height - 2 * line_height) / line_height); - y_pos = height - MARGIN_AMT - line_height; - y_off = 0.f; - -#if !MEM_TRACK_MEM - std::vector::const_iterator end = mLines.end(); - if(mLines.size() > max_lines) { - end = mLines.begin() + max_lines; - } - for (std::vector::const_iterator i = mLines.begin(); i != end; ++i) - { - font->render(*i, 0, MARGIN_AMT, y_pos - y_off, - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW, - S32_MAX, - target_width - ); - y_off += line_height; - } - -#else - LLMemTracker::getInstance()->preDraw(mPaused) ; - - { - F32 x_pos = MARGIN_AMT ; - U32 lines = 0 ; - const char* str = LLMemTracker::getInstance()->getNextLine() ; - while(str != NULL) - { - lines++ ; - font->renderUTF8(str, 0, x_pos, y_pos - y_off, - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW, - S32_MAX, - target_width, - NULL, FALSE); - - str = LLMemTracker::getInstance()->getNextLine() ; - y_off += line_height; - - if(lines >= max_lines) - { - lines = 0 ; - x_pos += 512.f ; - if(x_pos + 512.f > target_width) - { - break ; - } - - y_pos = height - MARGIN_AMT - line_height; - y_off = 0.f; - } - } - } - - LLMemTracker::getInstance()->postDraw() ; -#endif - -#if MEM_TRACK_TYPE - - S32 left, top, right, bottom; - S32 x, y; - - S32 margin = 10; - S32 texth = (S32)LLFontGL::getFontMonospace()->getLineHeight(); - - S32 xleft = margin; - S32 ytop = height - margin; - S32 labelwidth = 0; - S32 maxmaxbytes = 1; - - // Make sure all timers are accounted for - // Set 'MT_OTHER' to unaccounted ticks last frame - { - S32 display_memtypes[LLMemType::MTYPE_NUM_TYPES]; - for (S32 i=0; i < LLMemType::MTYPE_NUM_TYPES; i++) - { - display_memtypes[i] = 0; - } - for (S32 i=0; i < MTV_DISPLAY_NUM; i++) - { - S32 tidx = mtv_display_table[i].memtype; - display_memtypes[tidx]++; - } - LLMemType::sMemCount[LLMemType::MTYPE_OTHER] = 0; - LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] = 0; - for (S32 tidx = 0; tidx < LLMemType::MTYPE_NUM_TYPES; tidx++) - { - if (display_memtypes[tidx] == 0) - { - LLMemType::sMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMemCount[tidx]; - LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMaxMemCount[tidx]; - } - } - } - - // Labels - { - y = ytop; - S32 peak = 0; - for (S32 i=0; i> 20; - - tdesc = llformat("%s [%4d MB] in %06d NEWS",mtv_display_table[i].desc,mbytes, LLMemType::sNewCount[tidx]); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - - y -= (texth + 2); - - S32 textw = LLFontGL::getFontMonospace()->getWidth(tdesc); - if (textw > labelwidth) - labelwidth = textw; - } - - S32 num_avatars = 0; - S32 num_motions = 0; - S32 num_loading_motions = 0; - S32 num_loaded_motions = 0; - S32 num_active_motions = 0; - S32 num_deprecated_motions = 0; - for (std::vector::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - num_avatars++; - (*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); - } - - x = xleft; - tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d", - LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10, - num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - } - - // Bars - y = ytop; - labelwidth += 8; - S32 barw = width - labelwidth - xleft - margin; - for (S32 i=0; i mLines; - LLAllocator* mAlloc; - BOOL mPaused ; - -}; - -#endif diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 61ebb135d..88f6c8e38 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1351,17 +1351,17 @@ void AIMeshUpload::initialize_impl() set_state(AIMeshUpload_start); } -void AIMeshUpload::multiplex_impl() +void AIMeshUpload::multiplex_impl(state_type run_state) { - switch (mRunState) + switch (run_state) { case AIMeshUpload_start: mMeshUpload.run(this, AIMeshUpload_threadFinished); - idle(AIMeshUpload_start); // Wait till the thread finished. + idle(); // Wait till the thread finished. break; case AIMeshUpload_threadFinished: mMeshUpload->postRequest(mWholeModelUploadURL, this); - idle(AIMeshUpload_threadFinished); // Wait till the responder finished. + idle(); // Wait till the responder finished. break; case AIMeshUpload_responderFinished: finish(); @@ -1402,14 +1402,6 @@ void LLMeshUploadThread::postRequest(std::string& whole_model_upload_url, AIMesh } } -void AIMeshUpload::abort_impl() -{ -} - -void AIMeshUpload::finish_impl() -{ -} - void dump_llsd_to_file(const LLSD& content, std::string filename) { if (gSavedSettings.getBOOL("MeshUploadLogXML")) @@ -1788,7 +1780,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, if (data_size < (S32)mRequestedBytes) { - if (status == 499 || status == 503) + if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD); @@ -1842,7 +1834,7 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason if (data_size < (S32)mRequestedBytes) { - if (status == 499 || status == 503) + if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); @@ -1896,7 +1888,7 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r if (data_size < (S32)mRequestedBytes) { - if (status == 499 || status == 503) + if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); @@ -1950,7 +1942,7 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re if (data_size < (S32)mRequestedBytes) { - if (status == 499 || status == 503) + if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); @@ -2001,13 +1993,13 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, // << "Header responder failed with status: " // << status << ": " << reason << llendl; - // 503 (service unavailable) or 499 (timeout) + // HTTP_SERVICE_UNAVAILABLE (503) or HTTP_INTERNAL_ERROR_*'s. // can be due to server load and can be retried // TODO*: Add maximum retry logic, exponential backoff // and (somewhat more optional than the others) retries // again after some set period of time - if (status == 503 || status == 499) + if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE) { //retry LLMeshRepository::sHTTPRetryCount++; LLMeshRepoThread::HeaderRequest req(mMeshParams); @@ -3028,6 +3020,7 @@ void LLPhysicsDecomp::doDecomposition() param_map[params[i].mName] = params+i; } + LLCDResult ret = LLCD_OK; //set parameter values for (decomp_params::iterator iter = mCurRequest->mParams.begin(); iter != mCurRequest->mParams.end(); ++iter) { @@ -3041,8 +3034,6 @@ void LLPhysicsDecomp::doDecomposition() continue; } - U32 ret = LLCD_OK; - if (param->mType == LLCDParam::LLCD_FLOAT) { ret = LLConvexDecomposition::getInstance()->setParam(param->mName, (F32) value.asReal()); @@ -3060,8 +3051,6 @@ void LLPhysicsDecomp::doDecomposition() mCurRequest->setStatusMessage("Executing."); - LLCDResult ret = LLCD_OK; - if (LLConvexDecomposition::getInstance() != NULL) { ret = LLConvexDecomposition::getInstance()->executeStage(stage); diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 3db85edf9..d26316a85 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -445,11 +445,9 @@ public: protected: // Implement AIStateMachine. - /*virtual*/ const char* state_str_impl(state_type) const; + /*virtual*/ const char* state_str_impl(state_type run_state) const; /*virtual*/ void initialize_impl(); - /*virtual*/ void multiplex_impl(); - /*virtual*/ void abort_impl(); - /*virtual*/ void finish_impl(); + /*virtual*/ void multiplex_impl(state_type run_state); }; class LLMeshRepository diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 8c8fc5305..9842691da 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -1571,17 +1571,17 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) if(gAgent.isGodlike()) { childSetEnabled("Offer Teleport...", TRUE); - childSetToolTip("Offer Teleport...", childGetValue("TeleportGod").asString()); + childSetToolTip("Offer Teleport...", getString("TeleportGod")); } else if (in_prelude) { childSetEnabled("Offer Teleport...",FALSE); - childSetToolTip("Offer Teleport...",childGetValue("TeleportPrelude").asString()); + childSetToolTip("Offer Teleport...", getString("TeleportPrelude")); } else { childSetEnabled("Offer Teleport...", TRUE /*(online_status == ONLINE_STATUS_YES)*/); - childSetToolTip("Offer Teleport...", childGetValue("TeleportNormal").asString()); + childSetToolTip("Offer Teleport...", getString("TeleportNormal")); } } @@ -1759,15 +1759,15 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name childSetEnabled("Find on Map",enable_track); if (!mIsFriend) { - childSetToolTip("Find on Map",childGetValue("ShowOnMapNonFriend").asString()); + childSetToolTip("Find on Map", getString("ShowOnMapNonFriend")); } else if (ONLINE_STATUS_YES != online_status) { - childSetToolTip("Find on Map",childGetValue("ShowOnMapFriendOffline").asString()); + childSetToolTip("Find on Map", getString("ShowOnMapFriendOffline")); } else { - childSetToolTip("Find on Map",childGetValue("ShowOnMapFriendOnline").asString()); + childSetToolTip("Find on Map", getString("ShowOnMapFriendOnline")); } childSetVisible("Add Friend...", true); childSetEnabled("Add Friend...", !avatar_is_friend); diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp index 5dee332b3..19201c56d 100644 --- a/indra/newview/llpaneldirbrowser.cpp +++ b/indra/newview/llpaneldirbrowser.cpp @@ -107,13 +107,20 @@ LLPanelDirBrowser::LLPanelDirBrowser(const std::string& name, LLFloaterDirectory BOOL LLPanelDirBrowser::postBuild() { - childSetCommitCallback("results", onCommitList, this); + if (LLUICtrl* ctrl = findChild("results")) + ctrl->setCommitCallback(onCommitList, this); - childSetAction("< Prev", onClickPrev, this); - childHide("< Prev"); + if (LLButton* btn = findChild("< Prev")) + { + childSetAction("< Prev", onClickPrev, this); + btn->setVisible(false); + } - childSetAction("Next >", onClickNext, this); - childHide("Next >"); + if (LLButton* btn = findChild("Next >")) + { + childSetAction("Next >", onClickNext, this); + btn->setVisible(false); + } return TRUE; } @@ -136,7 +143,7 @@ void LLPanelDirBrowser::draw() if (mLastResultTimer.getElapsedTimeF32() > 0.5) { if (!mDidAutoSelect && - !childHasFocus("results")) + hasChild("results") && !childHasFocus("results")) { LLCtrlListInterface *list = childGetListInterface("results"); if (list) @@ -171,7 +178,8 @@ void LLPanelDirBrowser::nextPage() void LLPanelDirBrowser::prevPage() { mSearchStart -= mResultsPerPage; - childSetVisible("< Prev", mSearchStart > 0); + if (LLUICtrl* ctrl = findChild("< Prev")) + ctrl->setVisible(mSearchStart > 0); performQuery(); } @@ -180,14 +188,17 @@ void LLPanelDirBrowser::prevPage() void LLPanelDirBrowser::resetSearchStart() { mSearchStart = 0; - childHide("Next >"); - childHide("< Prev"); + if (LLUICtrl* ctrl = findChild("Next >")) + ctrl->setVisible(false); + if (LLUICtrl* ctrl = findChild("< Prev")) + ctrl->setVisible(false); } // protected void LLPanelDirBrowser::updateResultCount() { - LLScrollListCtrl* list = getChild("results"); + LLScrollListCtrl* list = findChild("results"); + if (!list) return; S32 result_count = list->getItemCount(); std::string result_text; @@ -218,7 +229,7 @@ void LLPanelDirBrowser::updateResultCount() } else { - childEnable("results"); + list->setEnabled(true); } } @@ -319,7 +330,7 @@ void LLPanelDirBrowser::updateMaturityCheckbox() void LLPanelDirBrowser::selectByUUID(const LLUUID& id) { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = findChild("results"); if (!list) return; BOOL found = list->setCurrentByID(id); if (found) @@ -363,7 +374,7 @@ U32 LLPanelDirBrowser::getSelectedEventID() const void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type) { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = findChild("results"); if (!list) return; LLSD id_sd = childGetValue("results"); @@ -379,7 +390,7 @@ void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type) void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data) { LLPanelDirBrowser* self = (LLPanelDirBrowser*)data; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; // Start with everyone invisible @@ -515,7 +526,7 @@ void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -610,7 +621,7 @@ void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -696,7 +707,7 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -835,7 +846,7 @@ void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -932,7 +943,7 @@ void LLPanelDirBrowser::processDirClassifiedReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -1005,7 +1016,7 @@ void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -1184,7 +1195,7 @@ LLSD LLPanelDirBrowser::createLandSale(const LLUUID& parcel_id, BOOL is_auction, void LLPanelDirBrowser::newClassified() { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = findChild("results"); if (!list) return; if (mFloaterDirectory->mPanelClassifiedp) @@ -1212,8 +1223,6 @@ void LLPanelDirBrowser::newClassified() void LLPanelDirBrowser::setupNewSearch() { - LLScrollListCtrl* list = getChild("results"); - gDirBrowserInstances.removeData(mSearchID); // Make a new query ID mSearchID.generate(); @@ -1221,9 +1230,12 @@ void LLPanelDirBrowser::setupNewSearch() gDirBrowserInstances.addData(mSearchID, this); // ready the list for results - list->operateOnAll(LLCtrlListInterface::OP_DELETE); - list->setCommentText(LLTrans::getString("Searching")); - childDisable("results"); + if (LLScrollListCtrl* list = findChild("results")) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + list->setCommentText(LLTrans::getString("Searching")); + list->setEnabled(false); + } mResultsReceived = 0; mHaveSearchResults = FALSE; diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp index bded7d142..7f087d9dc 100644 --- a/indra/newview/llpaneldirevents.cpp +++ b/indra/newview/llpaneldirevents.cpp @@ -75,8 +75,6 @@ BOOL LLPanelDirEvents::postBuild() childSetAction("Today", onClickToday, this); - childSetCommitCallback("mature", onCommitMature, this); - childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this); setDefaultBtn("Search"); @@ -296,14 +294,6 @@ void LLPanelDirEvents::onForwardBtn(void* data) } -// static -void LLPanelDirEvents::onCommitMature(LLUICtrl* ctrl, void* data) -{ - // just perform another search - onClickSearchCore(data); -} - - // static void LLPanelDirEvents::onClickDelete(void *userdata) { diff --git a/indra/newview/llpaneldirevents.h b/indra/newview/llpaneldirevents.h index dce31b597..a74f1b3a4 100644 --- a/indra/newview/llpaneldirevents.h +++ b/indra/newview/llpaneldirevents.h @@ -61,7 +61,6 @@ protected: static void onBackBtn(void* data); static void onForwardBtn(void* data); static void onClickToday(void *userdata); - static void onCommitMature(LLUICtrl* ctrl, void* data); static void onClickSearch(void *data); static void onClickDelete(void *data); diff --git a/indra/newview/llpaneldirfind.cpp b/indra/newview/llpaneldirfind.cpp index 2ba9aac2c..a442a40a0 100644 --- a/indra/newview/llpaneldirfind.cpp +++ b/indra/newview/llpaneldirfind.cpp @@ -108,12 +108,16 @@ BOOL LLPanelDirFind::postBuild() LLPanelDirBrowser::postBuild(); childSetAction("back_btn", onClickBack, this); - childSetAction("home_btn", onClickHome, this); + if (hasChild("home_btn")) + childSetAction("home_btn", onClickHome, this); childSetAction("forward_btn", onClickForward, this); childSetAction("reload_btn", onClickRefresh, this); - childSetCommitCallback("search_editor", onCommitSearch, this); - childSetAction("search_btn", onClickSearch, this); - childSetAction("?", onClickHelp, this); + if (hasChild("search_editor")) + childSetCommitCallback("search_editor", onCommitSearch, this); + if (hasChild("search_btn")) + childSetAction("search_btn", onClickSearch, this); + if (hasChild("?")) + childSetAction("?", onClickHelp, this); // showcase doesn't have maturity flags -- it's all PG if (hasChild("incmature")) @@ -161,7 +165,8 @@ BOOL LLPanelDirFind::postBuild() navigateToDefaultPage(); } - childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL)); + if (LLUICtrl* ctrl = findChild("filter_gaming")) + ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL)); return TRUE; } @@ -257,7 +262,8 @@ void LLPanelDirFindAll::search(const std::string& search_text) void LLPanelDirFind::focus() { - childSetFocus("search_editor"); + if (hasChild("search_editor")) + childSetFocus("search_editor"); } void LLPanelDirFind::navigateToDefaultPage() @@ -291,17 +297,20 @@ void LLPanelDirFind::navigateToDefaultPage() start_url += "panel=" + getName() + "&"; } - BOOL inc_pg = childGetValue("incpg").asBoolean(); - BOOL inc_mature = childGetValue("incmature").asBoolean(); - BOOL inc_adult = childGetValue("incadult").asBoolean(); - if (!(inc_pg || inc_mature || inc_adult)) + if (hasChild("incmature")) { - // if nothing's checked, just go for pg; we don't notify in - // this case because it's a default page. - inc_pg = true; - } + bool inc_pg = childGetValue("incpg").asBoolean(); + bool inc_mature = childGetValue("incmature").asBoolean(); + bool inc_adult = childGetValue("incadult").asBoolean(); + if (!(inc_pg || inc_mature || inc_adult)) + { + // if nothing's checked, just go for pg; we don't notify in + // this case because it's a default page. + inc_pg = true; + } - start_url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult, true); + start_url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult, true); + } } llinfos << "default web search url: " << start_url << llendl; @@ -433,7 +442,7 @@ const std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_matur if (!gHippoGridManager->getConnectedGrid()->isSecondLife()) { substring = "[DICE]"; - url.replace(url.find(substring), substring.length(), childGetValue("filter_gaming").asBoolean() ? "y" : "n"); + url.replace(url.find(substring), substring.length(), (hasChild("filter_gaming") && childGetValue("filter_gaming").asBoolean()) ? "y" : "n"); } } } @@ -570,7 +579,8 @@ BOOL LLPanelDirFindAllOld::postBuild() childDisable("Search"); setDefaultBtn( "Search" ); - childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL_CLASSIC)); + if (LLUICtrl* ctrl = findChild("filter_gaming")) + ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL_CLASSIC)); return TRUE; } @@ -634,7 +644,7 @@ void LLPanelDirFindAllOld::onClickSearch(void *userdata) scope |= DFQ_INC_ADULT; } - if (self->childGetValue("filter_gaming").asBoolean()) + if (self->hasChild("filter_gaming") && self->childGetValue("filter_gaming").asBoolean()) { scope |= DFQ_FILTER_GAMING; } diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp index 199426a6d..06b34570d 100644 --- a/indra/newview/llpaneldirland.cpp +++ b/indra/newview/llpaneldirland.cpp @@ -103,7 +103,6 @@ BOOL LLPanelDirLand::postBuild() childSetAction("Search", onClickSearchCore, this); setDefaultBtn("Search"); - childSetTextArg("land", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetTextArg("pricecheck_symbol", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetLabelArg("pricecheck", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 362675292..269a1f479 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -107,9 +107,6 @@ BOOL LLPanelDisplay::postBuild() // return to default values childSetAction("Defaults", setHardwareDefaults, NULL); - // Help button - childSetAction("GraphicsPreferencesHelpButton", onOpenHelp, this); - //============================================================================ // Resolution @@ -120,7 +117,6 @@ BOOL LLPanelDisplay::postBuild() mCtrlWindowed->setCallbackUserData(this); mAspectRatioLabel1 = getChild("AspectRatioLabel1"); - mFullScreenInfo = getChild("FullScreenInfo"); mDisplayResLabel = getChild("DisplayResLabel"); S32 num_resolutions = 0; @@ -218,7 +214,7 @@ BOOL LLPanelDisplay::postBuild() mCtrlCustomSettings->setCommitCallback(onChangeCustom); mCtrlCustomSettings->setCallbackUserData(this); - mGraphicsBorder = getChild("GraphicsBorder"); + //mGraphicsBorder = getChild("GraphicsBorder"); // Enable Transparent Water mCtrlTransparentWater = getChild("TransparentWater"); @@ -350,7 +346,6 @@ BOOL LLPanelDisplay::postBuild() mReflectionText = getChild("ReflectionDetailText"); mAvatarText = getChild("AvatarRenderingText"); mTerrainText = getChild("TerrainDetailText"); - mLightingText = getChild("LightingDetailText"); mMeshDetailText = getChild("MeshDetailText"); mShadowDetailText = getChild("ShadowDetailText"); mTerrainScaleText = getChild("TerrainScaleText"); @@ -486,7 +481,6 @@ void LLPanelDisplay::refreshEnabledState() mCtrlAspectRatio->setVisible(isFullScreen); mAspectRatioLabel1->setVisible(isFullScreen); mCtrlAutoDetectAspect->setVisible(isFullScreen); - mFullScreenInfo->setVisible(!isFullScreen); mWindowSizeLabel->setVisible(!isFullScreen); mCtrlWindowSize->setVisible(!isFullScreen); @@ -713,7 +707,7 @@ void LLPanelDisplay::disableUnavailableSettings() void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) { // quick check - llassert(mGraphicsBorder != NULL); + //llassert(mGraphicsBorder != NULL); llassert(mCtrlDrawDistance != NULL); llassert(mCtrlLODFactor != NULL); @@ -753,13 +747,12 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) llassert(mReflectionText != NULL); llassert(mTerrainScaleText != NULL); llassert(mAvatarText != NULL); - llassert(mLightingText != NULL); llassert(mTerrainText != NULL); llassert(mDrawDistanceMeterText1 != NULL); llassert(mDrawDistanceMeterText2 != NULL); // enable/disable the states - mGraphicsBorder->setVisible(!isHidden); + //mGraphicsBorder->setVisible(!isHidden); /* LLColor4 light(.45098f, .51765f, .6078f, 1.0f); LLColor4 dark(.10196f, .10196f, .10196f, 1.0f); @@ -809,7 +802,6 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) mShaderText->setVisible(!isHidden); mReflectionText->setVisible(!isHidden); mAvatarText->setVisible(!isHidden); - mLightingText->setVisible(!isHidden); mTerrainText->setVisible(!isHidden); mDrawDistanceMeterText1->setVisible(!isHidden); mDrawDistanceMeterText2->setVisible(!isHidden); @@ -930,15 +922,6 @@ void LLPanelDisplay::onChangeCustom(LLUICtrl *ctrl, void *data) LLFloaterPreference::refreshEnabledGraphics(); } -void LLPanelDisplay::onOpenHelp(void* user_data) -{ - LLPanelDisplay* self = static_cast(user_data); - - const char* xml_alert = "GraphicsPreferencesHelp"; - LLFloater* parent_floater = gFloaterView->getParentFloater(self); - LLNotifications::instance().add(parent_floater->contextualNotification(xml_alert)); -} - void LLPanelDisplay::onApplyResolution(LLUICtrl* src, void* user_data) { ((LLPanelDisplay*) src)->applyResolution(); diff --git a/indra/newview/llpaneldisplay.h b/indra/newview/llpaneldisplay.h index 185263f9f..304c674a4 100644 --- a/indra/newview/llpaneldisplay.h +++ b/indra/newview/llpaneldisplay.h @@ -93,7 +93,7 @@ protected: LLCheckBoxCtrl *mCtrlCustomSettings; // performance sliders and boxes - LLViewBorder *mGraphicsBorder; + //LLViewBorder *mGraphicsBorder; LLSliderCtrl *mCtrlDrawDistance; // the draw distance slider LLSliderCtrl *mCtrlLODFactor; // LOD for volume objects @@ -125,14 +125,12 @@ protected: LLTextBox *mAspectRatioLabel1; LLTextBox *mDisplayResLabel; - LLTextEditor *mFullScreenInfo; LLTextBox *mWindowSizeLabel; LLTextBox *mShaderText; LLTextBox *mReflectionText; LLTextBox *mAvatarText; LLTextBox *mTerrainText; - LLTextBox *mLightingText; LLTextBox *mDrawDistanceMeterText1; LLTextBox *mDrawDistanceMeterText2; @@ -203,7 +201,6 @@ protected: // if the custom settings box is clicked static void onChangeCustom(LLUICtrl *ctrl, void *data); - static void onOpenHelp(void *data); static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data); static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data); static void onSelectAspectRatio(LLUICtrl*, void*); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 9442caa53..f3b7f5af1 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1327,7 +1327,8 @@ void LLPanelEditWearable::setUIPermissions(U32 perm_mask, BOOL is_complete) childSetEnabled("Save", is_modifiable && is_complete); childSetEnabled("Save As", is_copyable && is_complete); - childSetEnabled("sex radio", is_modifiable && is_complete); + if (LLView* view = findChild("sex radio")) + view->setEnabled(is_modifiable && is_complete); for_each_picker_ctrl_entry (this, mType, boost::bind(set_enabled_texture_ctrl, is_copyable && is_modifiable && is_complete, _1, _2)); for_each_picker_ctrl_entry (this, mType, boost::bind(set_enabled_color_swatch_ctrl, is_modifiable && is_complete, _1, _2)); for(string_texture_index_map_t::iterator iter = mAlphaCheckbox2Index.begin(); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ca19b2caa..2fc014216 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -75,7 +75,6 @@ BOOL LLPanelFace::postBuild() { - LLRect rect = this->getRect(); LLTextureCtrl* mTextureCtrl; LLColorSwatchCtrl* mColorSwatch; diff --git a/indra/newview/llpanelgeneral.cpp b/indra/newview/llpanelgeneral.cpp index 097f0d8db..bd67c5284 100644 --- a/indra/newview/llpanelgeneral.cpp +++ b/indra/newview/llpanelgeneral.cpp @@ -113,7 +113,9 @@ BOOL LLPanelGeneral::postBuild() childSetVisible("maturity_desired_combobox", can_choose); childSetVisible("maturity_desired_textbox", !can_choose); - childSetEnabled("afk_timeout_spinner", gSavedSettings.getBOOL("AllowIdleAFK")); + bool allow_idle = gSavedSettings.getBOOL("AllowIdleAFK"); + childSetEnabled("afk_timeout_spinner", allow_idle); + childSetEnabled("seconds_textbox", allow_idle); childSetCommitCallback("away_when_idle_checkbox", &onClickCheckbox, this); childSetEnabled("no_transaction_clutter_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange")); @@ -179,7 +181,10 @@ void LLPanelGeneral::onClickCheckbox(LLUICtrl* ctrl, void* data) LLPanelGeneral* self = (LLPanelGeneral*)data; bool enabled = ctrl->getValue().asBoolean(); if(ctrl->getName() == "away_when_idle_checkbox") + { self->childSetEnabled("afk_timeout_spinner", enabled); + self->childSetEnabled("seconds_textbox", enabled); + } else if(ctrl->getName() == "notify_money_change_checkbox") self->childSetEnabled("no_transaction_clutter_checkbox", enabled); } diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 49b59720d..e45f0608a 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -69,7 +69,7 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp) BOOL LLPanelGroupTab::postBuild() { // Hook up the help button callback. - LLButton* button = getChild("help_button"); + LLButton* button = findChild("help_button"); if (button) { button->setClickedCallback(boost::bind(&LLPanelGroupTab::onClickHelp,this)); diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 5ad7ad7a1..64f48e0c5 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -1388,13 +1388,11 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, S32 cur_land_tax; S32 cur_group_tax; S32 cur_parcel_dir_fee; - S32 cur_total_tax; S32 proj_object_tax; S32 proj_light_tax; S32 proj_land_tax; S32 proj_group_tax; S32 proj_parcel_dir_fee; - S32 proj_total_tax; S32 non_exempt_members; msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_IntervalDays, interval_days ); @@ -1418,9 +1416,6 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, msg->getStringFast(_PREHASH_MoneyData, _PREHASH_LastTaxDate, last_stipend_date); msg->getStringFast(_PREHASH_MoneyData, _PREHASH_TaxDate, next_stipend_date); - cur_total_tax = cur_object_tax + cur_light_tax + cur_land_tax + cur_group_tax + cur_parcel_dir_fee; - proj_total_tax = proj_object_tax + proj_light_tax + proj_land_tax + proj_group_tax + proj_parcel_dir_fee; - if (interval_days != mImplementationp->mIntervalLength || current_interval != mImplementationp->mCurrentInterval) { diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index b7f09bd69..630a28128 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -515,7 +515,7 @@ BOOL LLPanelGroupSubTab::postBuild() delete icon; } - icon = getChild("power_all_have_icon",no_recurse); + icon = getChild("power_all_have_icon",no_recurse, false); if (icon && !icon->getImageName().empty()) { mActionIcons["full"] = icon->getImageName(); @@ -523,7 +523,7 @@ BOOL LLPanelGroupSubTab::postBuild() delete icon; } - icon = getChild("power_partial_icon",no_recurse); + icon = getChild("power_partial_icon",no_recurse, false); if (icon && !icon->getImageName().empty()) { mActionIcons["partial"] = icon->getImageName(); @@ -1085,8 +1085,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() // Extract the checkbox that was created. LLScrollListCheck* check_cell = (LLScrollListCheck*) item->getColumn(0); LLCheckBoxCtrl* check = check_cell->getCheckBox(); - check->setCommitCallback(onRoleCheck); - check->setCallbackUserData(this); + check->setCommitCallback(onRoleCheck, this); check->set( count > 0 ); check->setTentative( (0 != count) @@ -1098,6 +1097,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() //last owner. We should check for this special case // -jwolk check->setEnabled(cb_enable); + item->setEnabled(cb_enable); } } else diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 097d0fda6..dac3c99ce 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -115,7 +115,6 @@ LLInventoryView::LLInventoryView(const std::string& name, void LLInventoryView::init(LLInventoryModel* inventory) { - LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_INIT); // Callbacks init_inventory_actions(this); @@ -879,7 +878,6 @@ void LLInventoryView::setFilterTextFromFilter() void LLInventoryView::toggleFindOptions() { - LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE); LLFloater *floater = getFinder(); if (!floater) { @@ -1011,7 +1009,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() void LLFloaterInventoryFinder::draw() { - LLMemType mt(LLMemType::MTYPE_INVENTORY_DRAW); U32 filter = 0xffffffff; BOOL filtered_by_all_types = TRUE; diff --git a/indra/newview/llpanelmediahud.cpp b/indra/newview/llpanelmediahud.cpp index e56e976f5..ad47eb732 100644 --- a/indra/newview/llpanelmediahud.cpp +++ b/indra/newview/llpanelmediahud.cpp @@ -355,8 +355,6 @@ void LLPanelMediaHUD::updateShape() media_hud_rect.mTop += getRect().getHeight() - media_region->getRect().mTop; media_hud_rect.mRight += getRect().getWidth() - media_region->getRect().mRight; - - LLRect old_hud_rect = media_hud_rect; // keep all parts of HUD on-screen media_hud_rect.intersectWith(getParent()->getLocalRect()); diff --git a/indra/newview/llpanelmsgs.cpp b/indra/newview/llpanelmsgs.cpp index 54e2f7dbe..e1afe8a1f 100644 --- a/indra/newview/llpanelmsgs.cpp +++ b/indra/newview/llpanelmsgs.cpp @@ -83,8 +83,8 @@ void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in disabled_popups.deleteAllItems(); enabled_popups.deleteAllItems(); - for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); - iter != LLNotifications::instance().templatesEnd(); + for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin(); + iter != LLNotificationTemplates::instance().templatesEnd(); ++iter) { LLNotificationTemplatePtr templatep = iter->second; @@ -175,8 +175,8 @@ void LLPanelMsgs::cancel() void LLPanelMsgs::resetAllIgnored() { - for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); - iter != LLNotifications::instance().templatesEnd(); + for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin(); + iter != LLNotificationTemplates::instance().templatesEnd(); ++iter) { if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) @@ -188,8 +188,8 @@ void LLPanelMsgs::resetAllIgnored() void LLPanelMsgs::setAllIgnored() { - for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); - iter != LLNotifications::instance().templatesEnd(); + for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin(); + iter != LLNotificationTemplates::instance().templatesEnd(); ++iter) { if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) @@ -210,7 +210,7 @@ void LLPanelMsgs::onClickEnablePopup(void* user_data) std::vector::iterator itor; for (itor = items.begin(); itor != items.end(); ++itor) { - LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata())); + LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate(*(std::string*)((*itor)->getUserdata())); gSavedSettings.setWarning(templatep->mName, TRUE); } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 6af8129ff..821ebd4a0 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -145,7 +145,7 @@ BOOL LLPanelObject::postBuild() //-------------------------------------------------------- // Build constant tipsheet - childSetAction("build_math_constants",onClickBuildConstants,this); + //childSetAction("build_math_constants",onClickBuildConstants,this); // Lock checkbox mCheckLock = getChild("checkbox locked"); @@ -471,7 +471,6 @@ void LLPanelObject::getState( ) BOOL enable_scale = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && objectp->permModify(); BOOL enable_rotate = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); - childSetEnabled("build_math_constants",true); S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) && (selected_count == 1); @@ -2295,8 +2294,6 @@ void LLPanelObject::clearCtrls() childSetEnabled("advanced_cut", FALSE); childSetEnabled("advanced_dimple", FALSE); childSetVisible("advanced_slice", FALSE); - - childSetEnabled("build_math_constants",false); } // diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp index 2afff003e..ba12d60a0 100644 --- a/indra/newview/llpanelplace.cpp +++ b/indra/newview/llpanelplace.cpp @@ -97,7 +97,7 @@ BOOL LLPanelPlace::postBuild() mDescEditor = getChild("desc_editor"); mInfoEditor = getChild("info_editor"); - mLandTypeEditor = getChild("land_type_display"); + mLandTypeEditor = findChild("land_type_display"); mLocationDisplay = getChild("location_editor"); @@ -145,7 +145,8 @@ void LLPanelPlace::resetLocation() mNameEditor->setText( LLStringUtil::null ); mDescEditor->setText( LLStringUtil::null ); mInfoEditor->setText( LLStringUtil::null ); - mLandTypeEditor->setText( LLStringUtil::null ); + if (mLandTypeEditor) + mLandTypeEditor->setText(LLStringUtil::null); mLocationDisplay->setText( LLStringUtil::null ); } @@ -198,21 +199,31 @@ void LLPanelPlace::setLocationString(const std::string& location) void LLPanelPlace::setLandTypeString(const std::string& land_type) { - mLandTypeEditor->setText(land_type); + if (mLandTypeEditor) + mLandTypeEditor->setText(land_type); } void LLPanelPlace::setErrorStatus(U32 status, const std::string& reason) { - // We only really handle 404 and 499 errors + // We only really handle 404 and timeout errors std::string error_text; - if(status == 404) + if (status == HTTP_NOT_FOUND) { error_text = getString("server_error_text"); } - else if(status == 499) + else if (status == HTTP_UNAUTHORIZED) // AIFIXME: Is this indeed the error we get when we don't have access rights for this? { error_text = getString("server_forbidden_text"); } + else if (status == HTTP_INTERNAL_ERROR_LOW_SPEED || status == HTTP_INTERNAL_ERROR_CURL_TIMEOUT) + { + error_text = getString("internal_timeout_text"); + } + else + { + llwarns << "Unexpected error (" << status << "): " << reason << llendl; + error_text = llformat("Unexpected Error (%u): %s", status, reason.c_str()); + } mDescEditor->setText(error_text); } diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 274180174..783c728c0 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -48,7 +48,7 @@ #include "llpathfindingnavmesh.h" #include "llpathfindingnavmeshstatus.h" #include "llpathfindingobject.h" -//#include "llpathinglib.h" +#include "llpathinglib.h" #include "llsingleton.h" #include "llsd.h" #include "lltrans.h" @@ -318,24 +318,23 @@ LLPathfindingManager::~LLPathfindingManager() void LLPathfindingManager::initSystem() { - /*if (LLPathingLib::getInstance() == NULL) + if (LLPathingLib::getInstance() == NULL) { LLPathingLib::initSystem(); - }*/ + } } void LLPathfindingManager::quitSystem() { - /*if (LLPathingLib::getInstance() != NULL) + if (LLPathingLib::getInstance() != NULL) { LLPathingLib::quitSystem(); - }*/ + } } bool LLPathfindingManager::isPathfindingViewEnabled() const { - return false; - //return (LLPathingLib::getInstance() != NULL); + return (LLPathingLib::getInstance() != NULL); } bool LLPathfindingManager::isPathfindingEnabledForCurrentRegion() const diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 8d3a249fd..d3cf56ff4 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -109,9 +109,7 @@ public: mLastTime(0), mPosition_local(0), mVelocityJoint_local(0), - mPositionLastUpdate_local(0), - mAccelerationJoint_local(0), - mVelocity_local(0) + mPositionLastUpdate_local(0) { mJointState = new LLJointState; @@ -119,8 +117,7 @@ public: { mParamCache[i] = NULL; } - } - void getString(std::ostringstream &oss); + } BOOL initialize(); @@ -132,8 +129,6 @@ public: { return mJointState; } - - void reset(); protected: F32 getParamValue(eParamName param) @@ -238,84 +233,9 @@ BOOL LLPhysicsMotion::initialize() return TRUE; } -std::string LLPhysicsMotionController::getString() -{ - std::ostringstream oss; - oss << "{" << std::endl << - "Active: " << mActive << std::endl << - "IsDefault: " << mIsDefault << std::endl << - "Stopped: " << isStopped() << std::endl << - "Name: " << getName() << std::endl << - "ID: " << getID().asString() << std::endl; - - for (motion_vec_t::iterator iter = mMotions.begin();iter != mMotions.end();++iter) - { - (*iter)->getString(oss); - } - oss << "}" << std::endl; - return oss.str(); -} -void getParamString(U32 depth, LLViewerVisualParam *param, std::ostringstream &oss) -{ - std::string indent; - indent.resize(depth,' '); - - oss << - indent << "getID: " << param->getID() << std::endl << - indent << "getName: " << param->getName() << std::endl << - indent << "getDisplayName: " << param->getDisplayName() << std::endl << - indent << "getGroup: " << param->getGroup() << std::endl << - indent << "getSex: " << param->getSex() << std::endl << - indent << "getMinWeight: " << param->getMinWeight() << std::endl << - indent << "getMaxWeight: " << param->getMaxWeight() << std::endl << - indent << "getDefaultWeight: " << param->getDefaultWeight() << std::endl << - indent << "getWeight: " << param->getWeight() << std::endl << - indent << "getCurrentWeight: " << param->getCurrentWeight() << std::endl << - indent << "getLastWeight: " << param->getLastWeight() << std::endl << - indent << "isAnimating: " << param->isAnimating() << std::endl << - indent << "isTweakable: " << param->isTweakable() << std::endl; -} -void LLPhysicsMotion::getString(std::ostringstream &oss) -{ - oss << - " mParamDriverName: " << mParamDriverName << std::endl << - " mParamControllerName: " << mParamControllerName << std::endl << - " mMotionDirectionVec: " << mMotionDirectionVec << std::endl << - " mJointName: " << mJointName << std::endl << - " mPosition_local: " << mPosition_local << std::endl << - " mVelocityJoint_local: " << mVelocityJoint_local << std::endl << - " mAccelerationJoint_local: " << mAccelerationJoint_local << std::endl << - " mPositionLastUpdate_local: " << mPositionLastUpdate_local << std::endl << - " mPosition_world: " << mPosition_world << std::endl << - " mVelocity_local: " << mVelocity_local << std::endl; - if(mParamDriver) - { - oss << " " << std::endl; - getParamString(2,mParamDriver,oss); - LLDriverParam *driver_param = dynamic_cast(mParamDriver); - if(driver_param) - { - for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); - iter != driver_param->mDriven.end();++iter) - { - oss << " " << std::endl; - getParamString(3,iter->mParam,oss); - } - } - } - else - oss << " mParamDriver: (NULL)" << std::endl; - oss << " Controllers:" << std::endl; - for(controller_map_t::const_iterator it = mParamControllers.begin(); it!= mParamControllers.end(); ++it) - { - oss << " mParamControllers[\"" << it->first << "\"] = \"" << it->second << "\" =" << mCharacter->getVisualParamWeight(it->first.c_str()) << std::endl; - } -} - LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) : LLMotion(id), - mCharacter(NULL), - mIsDefault(true) + mCharacter(NULL) { mName = "breast_motion"; } @@ -514,9 +434,9 @@ F32 LLPhysicsMotion::calculateVelocity_local() const LLVector3 position_world = joint->getWorldPosition(); const LLVector3 last_position_world = mPosition_world; const LLVector3 positionchange_world = (position_world-last_position_world) * world_to_model_scale; - const LLVector3 velocity_world = positionchange_world; - const F32 velocity_local = toLocal(velocity_world); - return velocity_local; + const LLVector3 velocity_world = positionchange_world; + const F32 velocity_local = toLocal(velocity_world); + return velocity_local; } F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local) @@ -535,26 +455,11 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local) BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) { // Skip if disabled globally. - static const LLCachedControl avatar_physics("AvatarPhysics",false); - bool physics_unsupported = !avatar_physics || (!((LLVOAvatar*)mCharacter)->isSelf() && !((LLVOAvatar*)mCharacter)->mSupportsPhysics); - //Treat lod 0 as AvatarPhyiscs:FALSE. AvatarPhyiscs setting is superfluous unless we decide to hook it into param sending. - if (physics_unsupported || !LLVOAvatar::sPhysicsLODFactor) + if (!gSavedSettings.getBOOL("AvatarPhysics")) { - if(!mIsDefault) - { - mIsDefault = true; - for (motion_vec_t::iterator iter = mMotions.begin();iter != mMotions.end();++iter) - { - (*iter)->reset(); - } - mCharacter->updateVisualParams(); - } - ((LLVOAvatar*)mCharacter)->idleUpdateBoobEffect(); //Emerald physics will fix params it altered if wearable physics are disabled. - return TRUE; - } + return TRUE; + } - mIsDefault = false; - BOOL update_visuals = FALSE; for (motion_vec_t::iterator iter = mMotions.begin(); iter != mMotions.end(); @@ -871,21 +776,3 @@ void LLPhysicsMotion::setParamValue(const LLViewerVisualParam *param, new_value_local, FALSE); } - -void LLPhysicsMotion::reset() -{ - LLDriverParam *driver_param = dynamic_cast(mParamDriver); - if (driver_param) - { - if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && - (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT)) - { - mCharacter->setVisualParamWeight(driver_param,driver_param->getDefaultWeight()); - } - for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); - iter != driver_param->mDriven.end();++iter) - { - mCharacter->setVisualParamWeight((*iter).mParam,(*iter).mParam->getDefaultWeight()); - } - } -} diff --git a/indra/newview/llprefschat.cpp b/indra/newview/llprefschat.cpp index 7290c3fb9..559ad2ba9 100644 --- a/indra/newview/llprefschat.cpp +++ b/indra/newview/llprefschat.cpp @@ -73,8 +73,6 @@ private: BOOL mScriptErrorAsChat; F32 mConsoleOpacity; F32 mBubbleOpacity; - std::string mTranslateLanguage; - BOOL mTranslateChat; }; @@ -109,8 +107,6 @@ LLPrefsChatImpl::LLPrefsChatImpl() childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); - childSetValue("translate_language_combobox", gSavedSettings.getString("TranslateLanguage")); - childSetValue("translate_chat", gSavedSettings.getBOOL("TranslateChat")); } void LLPrefsChatImpl::refreshValues() @@ -137,8 +133,6 @@ void LLPrefsChatImpl::refreshValues() mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); - mTranslateLanguage = gSavedSettings.getString("TranslateLanguage"); - mTranslateChat = gSavedSettings.getBOOL("TranslateChat"); } void LLPrefsChatImpl::cancel() @@ -164,8 +158,6 @@ void LLPrefsChatImpl::cancel() gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); - gSavedSettings.setString("TranslateLanguage", mTranslateLanguage); - gSavedSettings.setBOOL("TranslateChat", mTranslateChat); } void LLPrefsChatImpl::apply() @@ -197,9 +189,6 @@ void LLPrefsChatImpl::apply() gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); - gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox")); - gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat")); - refreshValues(); // member values become the official values and cancel becomes a no-op. } diff --git a/indra/newview/llprefsim.cpp b/indra/newview/llprefsim.cpp index ac803a6e7..fd0dc783b 100644 --- a/indra/newview/llprefsim.cpp +++ b/indra/newview/llprefsim.cpp @@ -113,7 +113,7 @@ BOOL LLPrefsIMImpl::postBuild() childDisable("log_instant_messages"); childDisable("log_chat"); childDisable("log_show_history"); - childDisable("log_path_button"); + //childDisable("log_path_button"); childDisable("busy_response"); childDisable("log_instant_messages_timestamp"); childDisable("log_chat_timestamp"); @@ -127,7 +127,8 @@ BOOL LLPrefsIMImpl::postBuild() childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps")); childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); - childSetText("log_path_string", gSavedPerAccountSettings.getString("InstantMessageLogPath")); + const std::string log_path = gSavedPerAccountSettings.getString("InstantMessageLogPath"); + childSetText("log_path_string", log_path.empty() ? gSavedSettings.getString("InstantMessageLogPathAnyAccount") : log_path); childSetValue("log_instant_messages", gSavedPerAccountSettings.getBOOL("LogInstantMessages")); childSetValue("log_chat", gSavedPerAccountSettings.getBOOL("LogChat")); childSetValue("log_show_history", gSavedPerAccountSettings.getBOOL("LogShowHistory")); @@ -229,6 +230,12 @@ void LLPrefsIMImpl::apply() gAgent.sendReliableMessage(); } } + else + { + const std::string log_path = childGetText("log_path_string"); + gSavedPerAccountSettings.setString("InstantMessageLogPathAnyAccount", log_path); + gDirUtilp->setChatLogsDir(log_path); + } } void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 45de56e14..affd4bbce 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -126,7 +126,8 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name, } } } - childSetAction("Save",onClickSave,this); + if (hasChild("Save", true)) + childSetAction("Save",onClickSave,this); // only assert shape if not hosted in a multifloater if (!getHost()) @@ -135,18 +136,20 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name, setRect(curRect); } - childSetVisible("lock", FALSE); + if (LLUICtrl* ctrl = findChild("lock")) + ctrl->setVisible(false); - const LLInventoryItem* item = getItem(); - - childSetCommitCallback("desc", LLPreview::onText, this); - if (item) - childSetText("desc", item->getDescription()); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + if (hasChild("desc", true)) + { + childSetCommitCallback("desc", LLPreview::onText, this); + if (const LLInventoryItem* item = getItem()) + childSetText("desc", item->getDescription()); + childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + } setTitle(title); - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); if (editor) { @@ -166,7 +169,7 @@ LLPreviewNotecard::~LLPreviewNotecard() BOOL LLPreviewNotecard::postBuild() { - LLViewerTextEditor *ed = getChild("Notecard Editor"); + LLViewerTextEditor* ed = findChild("Notecard Editor"); if (ed) { ed->setNotecardInfo(mNotecardItemID, mObjectID); @@ -192,27 +195,27 @@ bool LLPreviewNotecard::saveItem(LLPointer* itemptr) void LLPreviewNotecard::setEnabled( BOOL enabled ) { + LLViewerTextEditor* editor = findChild("Notecard Editor"); - LLViewerTextEditor* editor = getChild("Notecard Editor"); - - childSetEnabled("Notecard Editor", enabled); - childSetVisible("lock", !enabled); - childSetEnabled("desc", enabled); - childSetEnabled("Save", enabled && editor && (!editor->isPristine())); + if (editor) + editor->setEnabled(enabled); + if (LLUICtrl* ctrl = findChild("lock")) + ctrl->setVisible(!enabled); + if (LLUICtrl* ctrl = findChild("desc")) + ctrl->setEnabled(enabled); + if (LLUICtrl* ctrl = findChild("Save")) + ctrl->setEnabled(enabled && editor && !editor->isPristine()); } void LLPreviewNotecard::draw() { + LLViewerTextEditor* editor = findChild("Notecard Editor"); + BOOL script_changed = editor && !editor->isPristine(); - - //childSetFocus("Save", FALSE); - - LLViewerTextEditor* editor = getChild("Notecard Editor"); - BOOL script_changed = !editor->isPristine(); - - childSetEnabled("Save", script_changed && getEnabled()); + if (LLUICtrl* ctrl = findChild("Save")) + ctrl->setEnabled(script_changed && getEnabled()); LLPreview::draw(); } @@ -228,7 +231,7 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) if ('F' == key && (mask & MASK_CONTROL) && !(mask & (MASK_SHIFT | MASK_ALT))) { - LLFloaterSearchReplace::show(getChild("Notecard Editor")); + LLFloaterSearchReplace::show(findChild("Notecard Editor")); return TRUE; } @@ -238,9 +241,9 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) // virtual BOOL LLPreviewNotecard::canClose() { - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); - if(mForceClose || editor->isPristine()) + if (mForceClose || (editor && editor->isPristine())) { return TRUE; } @@ -255,9 +258,7 @@ BOOL LLPreviewNotecard::canClose() const LLInventoryItem* LLPreviewNotecard::getDragItem() { - LLViewerTextEditor* editor = getChild("Notecard Editor"); - - if(editor) + if (LLViewerTextEditor* editor = findChild("Notecard Editor")) { return editor->getDragItem(); } @@ -266,10 +267,9 @@ const LLInventoryItem* LLPreviewNotecard::getDragItem() bool LLPreviewNotecard::hasEmbeddedInventory() { - LLViewerTextEditor* editor = NULL; - editor = getChild("Notecard Editor"); - if (!editor) return false; - return editor->hasEmbeddedInventory(); + if (LLViewerTextEditor* editor = findChild("Notecard Editor")) + return editor->hasEmbeddedInventory(); + return false; } void LLPreviewNotecard::refreshFromInventory() @@ -280,15 +280,13 @@ void LLPreviewNotecard::refreshFromInventory() void LLPreviewNotecard::loadAsset() { - // request the asset. - const LLInventoryItem* item = getItem(); - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); if (!editor) return; - - if(item) + // request the asset. + if (const LLInventoryItem* item = getItem()) { if (gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE) @@ -355,7 +353,8 @@ void LLPreviewNotecard::loadAsset() // You can always save in task inventory if(!mObjectUUID.isNull()) editor->setEnabled(TRUE); // - childSetVisible("lock", TRUE); + if (LLUICtrl* ctrl = findChild("lock")) + ctrl->setVisible(true); } } else @@ -391,22 +390,23 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, buffer[file_length] = 0; - LLViewerTextEditor* previewEditor = preview->getChild("Notecard Editor"); - - if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) + if (LLViewerTextEditor* previewEditor = preview->findChild("Notecard Editor")) { - if( !previewEditor->importBuffer( buffer, file_length+1 ) ) + if ((file_length > 19) && !strncmp(buffer, "Linden text version", 19)) { - llwarns << "Problem importing notecard" << llendl; + if (!previewEditor->importBuffer(buffer, file_length+1)) + { + llwarns << "Problem importing notecard" << llendl; + } + } + else + { + // Version 0 (just text, doesn't include version number) + previewEditor->setText(LLStringExplicit(buffer)); } - } - else - { - // Version 0 (just text, doesn't include version number) - previewEditor->setText(LLStringExplicit(buffer)); - } - previewEditor->makePristine(); + previewEditor->makePristine(); + } const LLInventoryItem* item = preview->getItem(); BOOL modifiable = item && gAgent.allowOperation(PERM_MODIFY, @@ -466,42 +466,37 @@ void LLPreviewNotecard::onClickSave(void* user_data) // static void LLPreviewNotecard::onClickGetItems(void* user_data) { - LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data; - if(preview) + LLPreviewNotecard* preview = static_cast(user_data); + if (LLViewerTextEditor* editor = preview->findChild("Notecard Editor")) { - LLViewerTextEditor* editor = preview->getChild("Notecard Editor"); - if(editor) + std::vector > items = editor->getEmbeddedItems(); + if (items.size()) { - std::vector > items = editor->getEmbeddedItems(); - if(items.size()) + std::vector >::iterator iter = items.begin(); + std::vector >::iterator end = items.end(); + for ( ; iter != end; ++iter) { - const BOOL use_caps = FALSE; - - std::vector >::iterator iter = items.begin(); - std::vector >::iterator end = items.end(); - for( ; iter != end; ++iter) + LLInventoryItem* item = static_cast(*iter); + #if 0 //use_caps { - LLInventoryItem* item = static_cast(*iter); - if(use_caps) - { - copy_inventory_from_notecard(LLUUID::null, preview->getObjectID(), preview->getNotecardItemID(), item, 0); - } - else - { - // Only one item per message actually works - gMessageSystem->newMessageFast(_PREHASH_CopyInventoryFromNotecard); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - gMessageSystem->nextBlockFast(_PREHASH_NotecardData); - gMessageSystem->addUUIDFast(_PREHASH_NotecardItemID, preview->getNotecardItemID()); - gMessageSystem->addUUIDFast(_PREHASH_ObjectID, preview->getObjectID()); - gMessageSystem->nextBlockFast(_PREHASH_InventoryData); - gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getUUID()); - gMessageSystem->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(item->getType()))); - gAgent.sendReliableMessage(); - } + copy_inventory_from_notecard(LLUUID::null, preview->getObjectID(), preview->getNotecardItemID(), item, 0); } + #else + { + // Only one item per message actually works + gMessageSystem->newMessageFast(_PREHASH_CopyInventoryFromNotecard); + gMessageSystem->nextBlockFast(_PREHASH_AgentData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gMessageSystem->nextBlockFast(_PREHASH_NotecardData); + gMessageSystem->addUUIDFast(_PREHASH_NotecardItemID, preview->getNotecardItemID()); + gMessageSystem->addUUIDFast(_PREHASH_ObjectID, preview->getObjectID()); + gMessageSystem->nextBlockFast(_PREHASH_InventoryData); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getUUID()); + gMessageSystem->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(item->getType()))); + gAgent.sendReliableMessage(); + } + #endif } } } @@ -530,9 +525,9 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) } - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); - if(!editor->isPristine()) + if (editor && !editor->isPristine()) { // We need to update the asset information LLTransactionID tid; @@ -602,8 +597,8 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) // static void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { - LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data; - if(info && (0 == status)) + LLSaveNotecardInfo* info = static_cast(user_data); + if (0 == status) { if(info->mObjectUUID.isNull()) { @@ -647,8 +642,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data // Perform item copy to inventory if (info->mCopyItem.notNull()) { - LLViewerTextEditor* editor = info->mSelf->getChild("Notecard Editor"); - if (editor) + if (LLViewerTextEditor* editor = info->mSelf->findChild("Notecard Editor")) { editor->copyInventory(info->mCopyItem); } @@ -741,10 +735,10 @@ void LLPreviewNotecard::saveAs_continued(AIFilePicker* filepicker) if (!filepicker->hasFilename()) return; - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); std::string buffer; - if (!editor->exportBuffer(buffer)) + if (editor && !editor->exportBuffer(buffer)) { // FIXME: Notify the user! return; @@ -782,7 +776,7 @@ LLUUID LLPreviewNotecard::getItemID() LLTextEditor* LLPreviewNotecard::getEditor() { - return getChild("Notecard Editor"); + return findChild("Notecard Editor"); } void LLPreviewNotecard::initMenu() @@ -823,183 +817,128 @@ void LLPreviewNotecard::initMenu() // static void LLPreviewNotecard::onSearchMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - LLFloaterSearchReplace::show(editor); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + LLFloaterSearchReplace::show(editor); } // static void LLPreviewNotecard::onUndoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->undo(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->undo(); } // static void LLPreviewNotecard::onRedoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->redo(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->redo(); } // static void LLPreviewNotecard::onCutMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->cut(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->cut(); } // static void LLPreviewNotecard::onCopyMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->copy(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->copy(); } // static void LLPreviewNotecard::onPasteMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->paste(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->paste(); } // static void LLPreviewNotecard::onSelectAllMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->selectAll(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->selectAll(); } // static void LLPreviewNotecard::onDeselectMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->deselect(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->deselect(); } // static BOOL LLPreviewNotecard::enableUndoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canUndo(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canUndo(); + return false; } // static BOOL LLPreviewNotecard::enableRedoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canRedo(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canRedo(); + return false; } // static BOOL LLPreviewNotecard::enableCutMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canCut(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canCut(); + return false; } // static BOOL LLPreviewNotecard::enableCopyMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canCopy(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canCopy(); + return false; } // static BOOL LLPreviewNotecard::enablePasteMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canPaste(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canPaste(); + return false; } // static BOOL LLPreviewNotecard::enableSelectAllMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canSelectAll(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canSelectAll(); + return false; } // static BOOL LLPreviewNotecard::enableDeselectMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canDeselect(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canDeselect(); + return false; } // EOF diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index e5128f28c..18c873852 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -319,9 +319,15 @@ LLScriptEdCore::LLScriptEdCore( tooltips.push_back(desc); } } - - LLColor3 color(0.5f, 0.0f, 0.15f); - mEditor->loadKeywords(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords.ini"), funcs, tooltips, color); + + LLColor3 color = vec4to3(gColors.getColor("LSLFunctionColor")); + + std::string keywords_ini = gDirUtilp->getExpandedFilename(LL_PATH_TOP_SKIN, "keywords.ini"); + if(!LLFile::isfile(keywords_ini)) + { + keywords_ini = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "keywords.ini"); + } + mEditor->loadKeywords(keywords_ini, funcs, tooltips, color); std::vector primary_keywords; std::vector secondary_keywords; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 8fbd83515..9e9be1c74 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1205,7 +1205,6 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & if (mGridMode == GRID_MODE_LOCAL && mSelectedObjects->getObjectCount()) { //LLViewerObject* root = getSelectedParentObject(mSelectedObjects->getFirstObject()); - LLBBox bbox = mSavedSelectionBBox; mGridOrigin = mSavedSelectionBBox.getCenterAgent(); mGridScale = mSavedSelectionBBox.getExtentLocal() * 0.5f; @@ -1223,7 +1222,6 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull()) { mGridRotation = first_grid_object->getRenderRotation(); - LLVector3 first_grid_obj_pos = first_grid_object->getRenderPosition(); LLVector4a min_extents(F32_MAX); LLVector4a max_extents(-F32_MAX); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 2a7758bc6..728ffeb12 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -383,7 +383,6 @@ LLSpatialGroup::~LLSpatialGroup() } } - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); clearDrawMap(); } @@ -499,8 +498,6 @@ void LLSpatialGroup::validateDrawMap() BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - drawablep->updateSpatialExtents(); OctreeNode* parent = mOctreeNode->getOctParent(); @@ -522,7 +519,6 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (!from_octree) { mOctreeNode->insert(drawablep); @@ -548,7 +544,6 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_oc void LLSpatialGroup::rebuildGeom() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (!isDead()) { mSpatialPartition->rebuildGeom(this); @@ -759,7 +754,6 @@ LLSpatialGroup* LLSpatialGroup::getParent() BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); unbound(); if (mOctreeNode && !from_octree) { @@ -796,7 +790,6 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) void LLSpatialGroup::shift(const LLVector4a &offset) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLVector4a t = mOctreeNode->getCenter(); t.add(offset); mOctreeNode->setCenter(t); @@ -853,8 +846,6 @@ void LLSpatialGroup::setState(eSpatialState state) void LLSpatialGroup::setState(eSpatialState state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - llassert(state <= LLSpatialGroup::STATE_MASK); if (mode > STATE_MODE_SINGLE) @@ -911,8 +902,6 @@ void LLSpatialGroup::clearState(eSpatialState state, S32 mode) { llassert(state <= LLSpatialGroup::STATE_MASK); - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -969,8 +958,6 @@ public: void LLSpatialGroup::setOcclusionState(eOcclusionState state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1035,8 +1022,6 @@ public: void LLSpatialGroup::clearOcclusionState(eOcclusionState state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1084,7 +1069,6 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : ll_assert_aligned(this,16); sNodeCount++; - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); mViewAngle.splat(0.f); mLastUpdateViewAngle.splat(-1.f); @@ -1271,7 +1255,6 @@ BOOL LLSpatialGroup::changeLOD() void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); addObject(drawablep, FALSE, TRUE); unbound(); setState(OBJECT_DIRTY); @@ -1279,14 +1262,12 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); removeObject(drawable, TRUE); setState(OBJECT_DIRTY); } void LLSpatialGroup::handleDestruction(const TreeNode* node) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); setState(DEAD); {OctreeGuard guard(mOctreeNode); @@ -1330,7 +1311,6 @@ void LLSpatialGroup::handleStateChange(const TreeNode* node) void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (child->getListenerCount() == 0) { new LLSpatialGroup(child, mSpatialPartition); @@ -1681,7 +1661,6 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage) : mRenderByGroup(render_by_group), mBridge(NULL) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); mOcclusionEnabled = TRUE; mDrawableType = 0; mPartitionType = LLViewerRegion::PARTITION_NONE; @@ -1705,8 +1684,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 LLSpatialPartition::~LLSpatialPartition() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - delete mOctree; mOctree = NULL; } @@ -1714,8 +1691,6 @@ LLSpatialPartition::~LLSpatialPartition() LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - drawablep->updateSpatialExtents(); //keep drawable from being garbage collected @@ -1737,8 +1712,6 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (!curp->removeObject(drawablep)) { OCT_ERRS << "Failed to remove drawable from octree!" << llendl; @@ -1757,8 +1730,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - // sanity check submitted by open source user bushing Spatula // who was seeing crashing here. (See VWR-424 reported by Bunny Mayne) if (!drawablep) @@ -1815,7 +1786,6 @@ public: void LLSpatialPartition::shift(const LLVector4a &offset) { //shift octree node bounding boxes by offset - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLSpatialShift shifter(offset); shifter.traverse(mOctree); } @@ -2232,7 +2202,6 @@ public: void LLSpatialPartition::restoreGL() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); } void LLSpatialPartition::resetVertexBuffers() @@ -2274,7 +2243,6 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera) S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* results, BOOL for_select) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); #if LL_OCTREE_PARANOIA_CHECK ((LLSpatialGroup*)mOctree->getListener(0))->checkStates(); #endif @@ -4240,8 +4208,6 @@ void LLSpatialPartition::renderDebug() sCurMaxTexPriority = 0.f; } - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - LLGLDisable cullface(GL_CULL_FACE); LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_ALPHA); @@ -4374,9 +4340,6 @@ public: virtual bool check(LLDrawable* drawable) { - LLVector3 local_start = mStart; - LLVector3 local_end = mEnd; - if (!drawable || !gPipeline.hasRenderType(drawable->getRenderType()) || !drawable->isVisible()) { return false; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 59b00dbc7..3ecc2aa4d 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -261,10 +261,6 @@ extern S32 gStartImageHeight; // local globals // -#if defined(CWDEBUG) || defined(DEBUG_CURLIO) -static bool gCurlIo; -#endif - static LLHost gAgentSimHost; static BOOL gSkipOptionalUpdate = FALSE; @@ -376,13 +372,10 @@ void hooked_process_sound_trigger(LLMessageSystem *msg, void **) // true when all initialization done. bool idle_startup() { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); const F32 TIMEOUT_SECONDS = 5.f; const S32 MAX_TIMEOUT_COUNT = 3; static LLTimer timeout; - static S32 timeout_count = 0; static LLTimer login_time; @@ -404,7 +397,6 @@ bool idle_startup() // last location by default static S32 agent_location_id = START_LOCATION_ID_LAST; - static S32 location_which = START_LOCATION_ID_LAST; static bool show_connect_box = true; @@ -845,9 +837,6 @@ bool idle_startup() gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW); - timeout_count = 0; - - // *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance(). // *NOTE: This is where gHUDManager used to bet allocated before becoming LLHUDManager::getInstance(). @@ -1048,7 +1037,8 @@ bool idle_startup() //Default the path if one isn't set. if (gSavedPerAccountSettings.getString("InstantMessageLogPath").empty()) { - gDirUtilp->setChatLogsDir(gDirUtilp->getOSUserAppDir()); + const std::string dir = gSavedSettings.getString("InstantMessageLogPathAnyAccount"); + gDirUtilp->setChatLogsDir(dir.empty() ? gDirUtilp->getOSUserAppDir() : dir); gSavedPerAccountSettings.setString("InstantMessageLogPath",gDirUtilp->getChatLogsDir()); } else @@ -1131,7 +1121,6 @@ bool idle_startup() { // Force login at the last location agent_location_id = START_LOCATION_ID_LAST; - location_which = START_LOCATION_ID_LAST; gSavedSettings.setBOOL("LoginLastLocation", FALSE); // Clear some things that would cause us to divert to a user-specified location @@ -1143,21 +1132,14 @@ bool idle_startup() { // a startup URL was specified agent_location_id = START_LOCATION_ID_URL; - - // doesn't really matter what location_which is, since - // agent_start_look_at will be overwritten when the - // UserLoginLocationReply arrives - location_which = START_LOCATION_ID_LAST; } else if (gSavedSettings.getBOOL("LoginLastLocation")) { agent_location_id = START_LOCATION_ID_LAST; // last location - location_which = START_LOCATION_ID_LAST; } else { agent_location_id = START_LOCATION_ID_HOME; // home - location_which = START_LOCATION_ID_HOME; } gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 9f74be7ff..631527d24 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -38,7 +38,7 @@ #include "llagent.h" #include "llbutton.h" #include "llcommandhandler.h" -#include "llviewercontrol.h" +#include "llenvmanager.h" #include "llfloaterbuycurrency.h" #include "llfloaterchat.h" #include "llfloaterdirectory.h" // to spawn search @@ -51,7 +51,10 @@ #include "llkeyboard.h" #include "lllineeditor.h" #include "llmenugl.h" +#include "llmenuoptionpathfindingrebakenavmesh.h" #include "llnotify.h" +#include "llpathfindingmanager.h" +#include "llpathfindingnavmeshstatus.h" #include "llimview.h" #include "lltextbox.h" #include "llui.h" @@ -64,6 +67,7 @@ #include "llresmgr.h" #include "llworld.h" #include "llstatgraph.h" +#include "llviewercontrol.h" #include "llviewermenu.h" // for gMenuBarView #include "llviewerparcelmgr.h" #include "llviewerthrottle.h" @@ -122,6 +126,8 @@ static void onClickFly(void*); static void onClickPush(void*); static void onClickVoice(void*); static void onClickBuild(void*); +static void onClickPFDirty(void*); +static void onClickPFDisabled(void*); static void onClickSeeAV(void*); static void onClickScripts(void*); static void onClickBuyLand(void*); @@ -136,7 +142,10 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect) mBalance(0), mHealth(100), mSquareMetersCredit(0), -mSquareMetersCommitted(0) +mSquareMetersCommitted(0), +mRegionCrossingSlot(), +mNavMeshSlot(), +mIsNavMeshDirty(false) { // status bar can possible overlay menus? setMouseOpaque(FALSE); @@ -169,6 +178,8 @@ mSquareMetersCommitted(0) childSetAction("buyland", onClickBuyLand, this ); childSetAction("buycurrency", onClickBuyCurrency, this ); childSetAction("no_build", onClickBuild, this ); + childSetAction("pf_dirty", onClickPFDirty, this); + childSetAction("pf_disabled", onClickPFDisabled, this); childSetAction("status_SeeAV", onClickSeeAV, this ); childSetAction("no_scripts", onClickScripts, this ); childSetAction("restrictpush", onClickPush, this ); @@ -188,7 +199,10 @@ mSquareMetersCommitted(0) // that don't support currency yet -- MC LLButton* buybtn = getChild("buycurrency"); buybtn->setLabelArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); - + + mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLStatusBar::createNavMeshStatusListenerForCurrentRegion, this)); + createNavMeshStatusListenerForCurrentRegion(); + // Adding Net Stat Graph S32 x = getRect().getWidth() - 2; S32 y = 0; @@ -197,9 +211,7 @@ mSquareMetersCommitted(0) mSGBandwidth = new LLStatGraph("BandwidthGraph", r); mSGBandwidth->setFollows(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); mSGBandwidth->setStat(&LLViewerStats::getInstance()->mKBitStat); - std::string text = childGetText("bandwidth_tooltip") + " "; - LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven - mSGBandwidth->setLabel(bandwidth_tooltip.getString()); + mSGBandwidth->setLabel(getString("bandwidth_tooltip") + " "); mSGBandwidth->setUnits("Kbps"); mSGBandwidth->setPrecision(0); mSGBandwidth->setMouseOpaque(FALSE); @@ -210,9 +222,7 @@ mSquareMetersCommitted(0) mSGPacketLoss = new LLStatGraph("PacketLossPercent", r); mSGPacketLoss->setFollows(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); mSGPacketLoss->setStat(&LLViewerStats::getInstance()->mPacketsLostPercentStat); - text = childGetText("packet_loss_tooltip") + " "; - LLUIString packet_loss_tooltip = text; // get the text from XML until this widget is XML driven - mSGPacketLoss->setLabel(packet_loss_tooltip.getString()); + mSGPacketLoss->setLabel(getString("packet_loss_tooltip") + " "); mSGPacketLoss->setUnits("%"); mSGPacketLoss->setMin(0.f); mSGPacketLoss->setMax(5.f); @@ -236,6 +246,9 @@ LLStatusBar::~LLStatusBar() delete mHealthTimer; mHealthTimer = NULL; + mRegionCrossingSlot.disconnect(); + mNavMeshSlot.disconnect(); + // LLView destructor cleans up children } @@ -461,6 +474,22 @@ void LLStatusBar::refresh() x += buttonRect.getWidth(); } + if (region) + { + bool pf_disabled = !region->dynamicPathfindingEnabled(); + getChild("pf_dirty")->setVisible(mIsNavMeshDirty); + getChild("pf_disabled")->setVisible(pf_disabled); + const std::string pf_icon = mIsNavMeshDirty ? "pf_dirty" : pf_disabled ? "pf_disabled" : ""; + if (!pf_icon.empty()) + { + x += 6; + childGetRect(pf_icon, buttonRect); + r.setOriginAndSize(x, y, buttonRect.getWidth(), buttonRect.getHeight()); + childSetRect(pf_icon, r); + x += buttonRect.getWidth(); + } + } + BOOL canBuyLand = parcel && !parcel->isPublic() && LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, false); @@ -771,6 +800,47 @@ static void onClickBuild(void*) LLNotificationsUtil::add("NoBuild"); } +static bool rebakeRegionCallback(const LLSD& n, const LLSD& r) +{ + if(!LLNotificationsUtil::getSelectedOption(n, r)) //0 is Yes + { + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->sendRequestRebakeNavmesh(); + return true; + } + return false; +} + +static void onClickPFDirty(void*) +{ + LLNotificationsUtil::add("PathfindingDirty", LLSD(), LLSD(), rebakeRegionCallback); +} + +static void onClickPFDisabled(void*) +{ + LLNotificationsUtil::add("DynamicPathfindingDisabled"); +} + +void LLStatusBar::createNavMeshStatusListenerForCurrentRegion() +{ + if (mNavMeshSlot.connected()) + { + mNavMeshSlot.disconnect(); + } + + LLViewerRegion *currentRegion = gAgent.getRegion(); + if (currentRegion != NULL) + { + mNavMeshSlot = LLPathfindingManager::getInstance()->registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLStatusBar::onNavMeshStatusChange, this, _2)); + LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true); + } +} + +void LLStatusBar::onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus) +{ + mIsNavMeshDirty = pNavMeshStatus.isValid() && (pNavMeshStatus.getStatus() != LLPathfindingNavMeshStatus::kComplete); + refresh(); +} + static void onClickSeeAV(void*) { LLNotificationsUtil::add("SeeAvatars"); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 0782e9fd0..144047166 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -34,6 +34,7 @@ #define LL_LLSTATUSBAR_H #include "llpanel.h" +#include "llpathfindingnavmesh.h" // "Constants" loaded from settings.xml at start time extern S32 STATUS_BAR_HEIGHT; @@ -47,6 +48,7 @@ class LLUICtrl; class LLUUID; class LLFrameTimer; class LLStatGraph; +class LLPathfindingNavMeshStatus; class LLStatusBar : public LLPanel @@ -91,6 +93,10 @@ private: static void onClickSearch(void* data); static void onClickStatGraph(void* data); + void onRegionBoundaryCrossed(); + void createNavMeshStatusListenerForCurrentRegion(); + void onNavMeshStatusChange(const LLPathfindingNavMeshStatus &pNavMeshStatus); + private: LLTextBox *mTextBalance; LLTextBox *mTextHealth; @@ -109,6 +115,9 @@ private: S32 mSquareMetersCommitted; LLFrameTimer* mBalanceTimer; LLFrameTimer* mHealthTimer; + boost::signals2::connection mRegionCrossingSlot; + LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot; + bool mIsNavMeshDirty; static std::vector sDays; static std::vector sMonths; diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index bd1b99911..ca4c37eff 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -1248,8 +1248,6 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y, y_end = tex_width; } - LLVector3d origin_global = from_region_handle(getRegion()->getHandle()); - // OK, for now, just have the composition value equal the height at the point. LLVector3 location; LLColor4U coloru; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 17323d610..1d3634573 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1334,18 +1334,17 @@ bool LLTextureFetchWorker::doWork(S32 param) mRequestedOffset--; } - try - { - // Will call callbackHttpGet when curl request completes - AIHTTPHeaders headers("Accept", "image/x-j2c"); - LLHTTPClient::getByteRange(mUrl, mRequestedOffset, mRequestedSize, - new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true), headers); - res = true; - } - catch(AICurlNoEasyHandle const& error) - { - llwarns << error.what() << llendl; - } + // Will call callbackHttpGet when curl request completes + AIHTTPHeaders headers("Accept", "image/x-j2c"); + // Call LLHTTPClient::request directly instead of LLHTTPClient::getByteRange, because we want to pass a NULL AIEngine. + if (mRequestedOffset > 0 || mRequestedSize > 0) + { + headers.addHeader("Range", llformat("bytes=%d-%d", mRequestedOffset, mRequestedOffset + mRequestedSize - 1)); + } + LLHTTPClient::request(mUrl, LLHTTPClient::HTTP_GET, NULL, + new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true), + headers/*,*/ DEBUG_CURLIO_PARAM(false), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL); + res = true; } if (!res) { @@ -1370,14 +1369,21 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mRequestedSize < 0) { S32 max_attempts; - if (mGetStatus == HTTP_NOT_FOUND || mGetStatus == 499) + if (mGetStatus == HTTP_NOT_FOUND || mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED) { mHTTPFailCount = max_attempts = 1; // Don't retry if(mGetStatus == HTTP_NOT_FOUND) llwarns << "Texture missing from server (404): " << mUrl << llendl; - else if (mGetStatus == 499) + else if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED) { - llwarns << "No response from server (499): " << mUrl << llendl; + if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT) + { + llwarns << "No response from server (HTTP_INTERNAL_ERROR_CURL_TIMEOUT): " << mUrl << llendl; + } + else + { + llwarns << "Slow response from server (HTTP_INTERNAL_ERROR_LOW_SPEED): " << mUrl << llendl; + } SGHostBlackList::add(mUrl, 60.0, mGetStatus); } //roll back to try UDP @@ -3137,8 +3143,6 @@ TFReqSendMetrics::~TFReqSendMetrics() bool TFReqSendMetrics::doWork(LLTextureFetch * fetcher) { - static const U32 report_priority(1); - if (! gViewerAssetStatsThread1) return true; diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 01d2e26d6..a72c8be5b 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -132,8 +132,8 @@ BOOL LLToolBar::postBuild() childSetAction("chat_btn", onClickChat, this); childSetControlName("chat_btn", "ChatVisible"); - childSetAction("appearance_btn", onClickAppearance, this); - childSetControlName("appearance_btn", ""); + //childSetAction("appearance_btn", onClickAppearance, this); + //childSetControlName("appearance_btn", ""); childSetAction("radar_list_btn", onClickRadarList, this); childSetControlName("radar_list_btn", "ShowRadar"); @@ -141,8 +141,8 @@ BOOL LLToolBar::postBuild() childSetAction("fly_btn", onClickFly, this); childSetControlName("fly_btn", "FlyBtnState"); - childSetAction("sit_btn", onClickSit, this); - childSetControlName("sit_btn", "SitBtnState"); + //childSetAction("sit_btn", onClickSit, this); + //childSetControlName("sit_btn", "SitBtnState"); childSetAction("snapshot_btn", onClickSnapshot, this); childSetControlName("snapshot_btn", "SnapshotBtnState"); @@ -167,7 +167,7 @@ BOOL LLToolBar::postBuild() mBuildBtn.connect(this, "build_btn"); mMapBtn.connect(this, "map_btn"); mRadarBtn.connect(this, "radar_btn"); - mInventoryBtn.connect(this, "inventory_button"); + mInventoryBtn.connect(this, "inventory_btn"); for (child_list_const_iter_t child_iter = getChildList()->begin(); child_iter != getChildList()->end(); ++child_iter) diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp index 5f17aef78..876ce02d4 100644 --- a/indra/newview/llurlhistory.cpp +++ b/indra/newview/llurlhistory.cpp @@ -151,8 +151,6 @@ void LLURLHistory::addURL(const std::string& collection, const std::string& url) // static void LLURLHistory::removeURL(const std::string& collection, const std::string& url) { - LLSD::array_iterator iter = sHistorySD[collection].beginArray(); - LLSD::array_iterator end = sHistorySD[collection].endArray(); for(int index = 0; index < sHistorySD[collection].size(); index++) { if(sHistorySD[collection].get(index).asString() == url) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9a7c114f5..05d5836d6 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -81,11 +81,9 @@ #include "aistatemachine.h" #include "aithreadsafe.h" #include "lldrawpoolbump.h" -#include "emeraldboobutils.h" #include "aicurl.h" #include "aihttptimeoutpolicy.h" -#include "NACLantispam.h" // for NaCl Antispam Registry #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -136,7 +134,7 @@ static bool handleTerrainScaleChanged(const LLSD& inputvalue) bool handleStateMachineMaxTimeChanged(const LLSD& newvalue) { F32 StateMachineMaxTime = newvalue.asFloat(); - AIStateMachine::setMaxCount(StateMachineMaxTime); + AIEngine::setMaxCount(StateMachineMaxTime); return true; } @@ -194,49 +192,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue) return true; } -static bool handleAvatarBoobMassChanged(const LLSD& newvalue) -{ - LLVOAvatar::sBoobConfig.mass = EmeraldBoobUtils::convertMass((F32) newvalue.asReal()); - return true; -} - -static bool handleAvatarBoobHardnessChanged(const LLSD& newvalue) -{ - LLVOAvatar::sBoobConfig.hardness = EmeraldBoobUtils::convertHardness((F32) newvalue.asReal()); - return true; -} - -static bool handleAvatarBoobVelMaxChanged(const LLSD& newvalue) -{ - LLVOAvatar::sBoobConfig.velMax = EmeraldBoobUtils::convertVelMax((F32) newvalue.asReal()); - LLVOAvatar::sBoobConfig.velMin = LLVOAvatar::sBoobConfig.velMin*LLVOAvatar::sBoobConfig.velMax; - return true; -} - -static bool handleAvatarBoobFrictionChanged(const LLSD& newvalue) -{ - LLVOAvatar::sBoobConfig.friction = EmeraldBoobUtils::convertFriction((F32) newvalue.asReal()); - return true; -} - -static bool handleAvatarBoobVelMinChanged(const LLSD& newvalue) -{ - LLVOAvatar::sBoobConfig.velMin = EmeraldBoobUtils::convertVelMin((F32) newvalue.asReal())*LLVOAvatar::sBoobConfig.velMax; - return true; -} - -static bool handleAvatarBoobToggleChanged(const LLSD& newvalue) -{ - LLVOAvatar::sBoobConfig.enabled = (BOOL) newvalue.asReal(); - return true; -} - -static bool handleAvatarBoobXYInfluence(const LLSD& newvalue) -{ - LLVOAvatar::sBoobConfig.XYInfluence = (F32) newvalue.asReal(); - return true; -} - static bool handleSetSelfInvisible( const LLSD& newvalue) { LLVOAvatarSelf::onChangeSelfInvisible( newvalue.asBoolean() ); @@ -829,14 +784,6 @@ void settings_setup_listeners() gSavedSettings.getControl("CloudsEnabled")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _2)); gSavedSettings.getControl("SkyUseClassicClouds")->getSignal()->connect(boost::bind(&handleCloudSettingsChanged, _2)); gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2)); - - gSavedSettings.getControl("EmeraldBoobMass")->getSignal()->connect(boost::bind(&handleAvatarBoobMassChanged, _2)); - gSavedSettings.getControl("EmeraldBoobHardness")->getSignal()->connect(boost::bind(&handleAvatarBoobHardnessChanged, _2)); - gSavedSettings.getControl("EmeraldBoobVelMax")->getSignal()->connect(boost::bind(&handleAvatarBoobVelMaxChanged, _2)); - gSavedSettings.getControl("EmeraldBoobFriction")->getSignal()->connect(boost::bind(&handleAvatarBoobFrictionChanged, _2)); - gSavedSettings.getControl("EmeraldBoobVelMin")->getSignal()->connect(boost::bind(&handleAvatarBoobVelMinChanged, _2)); - gSavedSettings.getControl("EmeraldBreastPhysicsToggle")->getSignal()->connect(boost::bind(&handleAvatarBoobToggleChanged, _2)); - gSavedSettings.getControl("EmeraldBoobXYInfluence")->getSignal()->connect(boost::bind(&handleAvatarBoobXYInfluence, _2)); gSavedSettings.getControl("AscentAvatarXModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2)); gSavedSettings.getControl("AscentAvatarYModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2)); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 1a8129bb3..232c4d8fa 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1159,7 +1159,6 @@ void render_hud_attachments() if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices()) { LLCamera hud_cam = *LLViewerCamera::getInstance(); - LLVector3 origin = hud_cam.getOrigin(); hud_cam.setOrigin(-1.f,0,0); hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1)); LLViewerCamera::updateFrustumPlanes(hud_cam, TRUE); diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index ea38be2cb..54ac54fd2 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -192,11 +192,14 @@ class LLDisplayNameUpdate : public LLHTTPNode // force name tag to update LLVOAvatar::invalidateNameTag(agent_id); - LLSD args; - args["OLD_NAME"] = old_display_name; - args["SLID"] = av_name.mUsername; - args["NEW_NAME"] = av_name.mDisplayName; - LLNotificationsUtil::add("DisplayNameUpdate", args); + if (gSavedSettings.getBOOL("ShowDisplayNameChanges")) + { + LLSD args; + args["OLD_NAME"] = old_display_name; + args["SLID"] = av_name.mUsername; + args["NEW_NAME"] = av_name.mDisplayName; + LLNotificationsUtil::add("DisplayNameUpdate", args); + } if (agent_id == gAgent.getID()) { LLViewerDisplayName::sNameChangedSignal(); diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index fa42fbfc0..1c8b3b629 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -117,7 +117,7 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m gAgent.clearTempRun(); // [/RLVa:KB] } - else if (gAllowTapTapHoldRun && + else if (gSavedSettings.getBOOL("AllowTapTapHoldRun") && KEYSTATE_DOWN == s && !gAgent.getRunning()) { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 3e8b49b98..e6abe3676 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -84,7 +84,7 @@ public: /*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers) { - if (200 <= status && status < 300 || status == 405) // Using HEAD may result in a 405 METHOD NOT ALLOWED, but still have the right Content-TYpe header. + if ((200 <= status && status < 300) || status == 405) // Using HEAD may result in a 405 METHOD NOT ALLOWED, but still have the right Content-Type header. { std::string media_type; if (headers.getFirstValue("content-type", media_type)) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b2f8bade8..38bc05235 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -141,6 +141,8 @@ #include "llfloatermute.h" #include "llfloateropenobject.h" #include "llfloateroutbox.h" +#include "llfloaterpathfindingcharacters.h" +#include "llfloaterpathfindinglinksets.h" #include "llfloaterpermissionsmgr.h" #include "llfloaterperms.h" #include "llfloaterpostprocess.h" @@ -165,7 +167,6 @@ #include "llframestats.h" #include "llframestatview.h" #include "llfasttimerview.h" -#include "llmemoryview.h" #include "llgivemoney.h" #include "llgroupmgr.h" #include "llhoverview.h" @@ -251,9 +252,6 @@ #include "lltexlayer.h" // -#include "hgfloatertexteditor.h" -#include "llfloatervfs.h" -#include "llfloatervfsexplorer.h" #include "llfloatermessagelog.h" #include "shfloatermediaticker.h" #include "llpacketring.h" @@ -503,8 +501,6 @@ void handle_hide_typing_notification(void*); void handle_close_all_notifications(void*); void handle_open_message_log(void*); void handle_edit_ao(void*); -void handle_local_assets(void*); -void handle_vfs_explorer(void*); void handle_sounds_explorer(void*); void handle_blacklist(void*); // @@ -800,11 +796,8 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Sound", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Upload Animation", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Bulk Upload", "[UPLOADFEE]", fee); - gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); - gMenuHolder->childSetLabelArg("Reload Balance", "[CURRENCY]", - gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); gAFKMenu = gMenuBarView->getChild("Set Away", TRUE); gBusyMenu = gMenuBarView->getChild("Set Busy", TRUE); @@ -973,14 +966,6 @@ void init_client_menu(LLMenuGL* menu) &get_visibility, (void*)gDebugView->mFastTimerView, '9', MASK_CONTROL|MASK_SHIFT ) ); -//#if MEM_TRACK_MEM - sub->addChild(new LLMenuItemCheckGL("Memory", - &toggle_visibility, - NULL, - &get_visibility, - (void*)gDebugView->mMemoryView, - '0', MASK_CONTROL|MASK_SHIFT ) ); -//#endif sub->addSeparator(); @@ -1670,7 +1655,7 @@ void init_debug_avatar_menu(LLMenuGL* menu) menu->addChild(sub_menu); - menu->addChild(new LLMenuItemToggleGL("Tap-Tap-Hold To Run", &gAllowTapTapHoldRun)); + menu->addChild(new LLMenuItemCheckGL("Tap-Tap-Hold To Run", menu_toggle_control, NULL, menu_check_control, (void*)"AllowTapTapHoldRun")); menu->addChild(new LLMenuItemCallGL("Force Params to Default", &LLAgent::clearVisualParams, NULL)); menu->addChild(new LLMenuItemCallGL("Reload Vertex Shader", &reload_vertex_shader, NULL)); menu->addChild(new LLMenuItemToggleGL("Animation Info", &LLVOAvatar::sShowAnimationDebug)); @@ -2881,16 +2866,50 @@ class LLObjectMeasure : public view_listener_t } }; +class LLObjectPFLinksetsSelected : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects(); + return true; + } +}; + bool enable_object_select_in_pathfinding_linksets() { return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets(); } +class LLObjectEnablePFLinksetsSelected : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + return enable_object_select_in_pathfinding_linksets(); + } +}; + +class LLObjectPFCharactersSelected : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects(); + return true; + } +}; + bool enable_object_select_in_pathfinding_characters() { return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetViewableCharacters(); } +class LLObjectEnablePFCharactersSelected : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + return enable_object_select_in_pathfinding_characters(); + } +}; + class LLAvatarAnims : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -3811,16 +3830,6 @@ void handle_edit_ao(void*) LLFloaterAO::show(NULL); } -void handle_local_assets(void*) -{ - -} - -void handle_vfs_explorer(void*) -{ - -} - void handle_sounds_explorer(void*) { LLFloaterExploreSounds::toggle(); @@ -4841,7 +4850,14 @@ class LLToolsTakeCopy : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; + handle_take_copy(); + return true; + } +}; + +void handle_take_copy() +{ + if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; // [RLVa:KB] - Checked: 2010-03-07 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canStand()) ) { @@ -4849,16 +4865,13 @@ class LLToolsTakeCopy : public view_listener_t LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); RlvSelectIsSittingOn f(gAgentAvatarp); if ( (hSel.notNull()) && (hSel->getFirstRootNode(&f, TRUE) != NULL) ) - return true; + return; } // [/RLVa:KB] - const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); - derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); - - return true; - } -}; + const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); + derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); +} // You can return an object to its owner if it is on your land. class LLObjectReturn : public view_listener_t @@ -5146,6 +5159,11 @@ class LLToolsBuyOrTake : public view_listener_t } }; +bool visible_take_object() +{ + return !is_selection_buy_not_take() && enable_take(); +} + class LLToolsEnableBuyOrTake : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -5782,31 +5800,42 @@ class LLEditDelete : public view_listener_t } }; +bool enable_object_return() +{ + return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() && + (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER))); +} + class LLObjectEnableDelete : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - bool new_value = -#ifdef HACKED_GODLIKE_VIEWER - TRUE; -#else -# ifdef TOGGLE_HACKED_GODLIKE_VIEWER - (!LLViewerLogin::getInstance()->isInProductionGrid() - && gAgent.isGodlike()) || -# endif - LLSelectMgr::getInstance()->canDoDelete(); -#endif -// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) - if ( (new_value) && (rlv_handler_t::isEnabled()) ) - { - new_value = rlvCanDeleteOrReturn(); - } -// [/RLVa:KB] - gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); + gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_delete()); return true; } }; +bool enable_object_delete() +{ + bool new_value = +#ifdef HACKED_GODLIKE_VIEWER + TRUE; +#else +# ifdef TOGGLE_HACKED_GODLIKE_VIEWER + (!LLViewerLogin::getInstance()->isInProductionGrid() + && gAgent.isGodlike()) || +# endif + LLSelectMgr::getInstance()->canDoDelete(); +#endif +// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) + if ( (new_value) && (rlv_handler_t::isEnabled()) ) + { + new_value = rlvCanDeleteOrReturn(); + } +// [/RLVa:KB] + return new_value; +} + class LLEditSearch : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -5816,6 +5845,49 @@ class LLEditSearch : public view_listener_t } }; +class LLObjectsReturnPackage +{ +public: + LLObjectsReturnPackage() : mObjectSelection(), mReturnableObjects(), mError(), mFirstRegion(NULL) {}; + ~LLObjectsReturnPackage() + { + mObjectSelection.clear(); + mReturnableObjects.clear(); + mError.clear(); + mFirstRegion = NULL; + }; + + LLObjectSelectionHandle mObjectSelection; + LLDynamicArray mReturnableObjects; + std::string mError; + LLViewerRegion *mFirstRegion; +}; + +static void return_objects(LLObjectsReturnPackage *objectsReturnPackage, const LLSD& notification, const LLSD& response) +{ + if (LLNotificationsUtil::getSelectedOption(notification, response) == 0) + { + // Ignore category ID for this derez destination. + derez_objects(DRD_RETURN_TO_OWNER, LLUUID::null, objectsReturnPackage->mFirstRegion, objectsReturnPackage->mError, &objectsReturnPackage->mReturnableObjects); + } + + delete objectsReturnPackage; +} + +void handle_object_return() +{ + if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) + { + LLObjectsReturnPackage *objectsReturnPackage = new LLObjectsReturnPackage(); + objectsReturnPackage->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); + + // Save selected objects, so that we still know what to return after the confirmation dialog resets selection. + get_derezzable_objects(DRD_RETURN_TO_OWNER, objectsReturnPackage->mError, objectsReturnPackage->mFirstRegion, &objectsReturnPackage->mReturnableObjects); + + LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&return_objects, objectsReturnPackage, _1, _2)); + } +} + class LLObjectDelete : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -5826,7 +5898,13 @@ class LLObjectDelete : public view_listener_t return true; } // [/RLVa:KB] + handle_object_delete(); + return true; + } +}; +void handle_object_delete() +{ if (LLSelectMgr::getInstance()) { LLSelectMgr::getInstance()->doDelete(); @@ -5838,9 +5916,8 @@ class LLObjectDelete : public view_listener_t // When deleting an object we may not actually be done // Keep selection so we know what to delete when confirmation is needed about the delete gPieObject->hide(TRUE); - return true; - } -}; + return; +} void handle_force_delete(void*) { @@ -6742,6 +6819,14 @@ class LLShowFloater : public view_listener_t { LLFloaterOutbox::toggleInstance(LLSD()); } + else if (floater_name == "pathfinding_linksets") + { + LLFloaterPathfindingLinksets::toggleInstance(LLSD()); + } + else if (floater_name == "pathfinding_characters") + { + LLFloaterPathfindingCharacters::toggleInstance(LLSD()); + } else // Simple codeless floater { LLFloater* floater = LLUICtrlFactory::getInstance()->getBuiltFloater(floater_name); @@ -6828,6 +6913,14 @@ class LLFloaterVisible : public view_listener_t { new_value = LLFloaterOutbox::instanceVisible(LLSD()); } + else if (floater_name == "pathfinding_linksets") + { + new_value = LLFloaterPathfindingLinksets::instanceVisible(LLSD()); + } + else if (floater_name == "pathfinding_characters") + { + new_value = LLFloaterPathfindingCharacters::instanceVisible(LLSD()); + } gMenuHolder->findControl(control_name)->setValue(new_value); return true; } @@ -8044,8 +8137,17 @@ class LLToolsEnableTakeCopy : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - bool all_valid = false; - if (LLSelectMgr::getInstance()) + gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_take_copy()); + return true; + } +}; + +bool enable_object_take_copy() +{ + bool all_valid = false; + if (LLSelectMgr::getInstance()) + { + if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { all_valid = true; #ifndef HACKED_GODLIKE_VIEWER @@ -8059,10 +8161,9 @@ class LLToolsEnableTakeCopy : public view_listener_t virtual bool apply(LLViewerObject* obj) { // return (!obj->permCopy() || obj->isAttachment()); -// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) +// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g return (!obj->permCopy() || obj->isAttachment()) || - ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgentAvatarp) && - (gAgentAvatarp->getRoot() == obj) ); + ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (isAgentAvatarValid()) && (gAgentAvatarp->getRoot() == obj) ); // [/RLVa:KB] } } func; @@ -8072,11 +8173,10 @@ class LLToolsEnableTakeCopy : public view_listener_t } #endif // HACKED_GODLIKE_VIEWER } - - gMenuHolder->findControl(userdata["control"].asString())->setValue(all_valid); - return true; } -}; + + return all_valid; +} // class LLToolsEnableAdminDelete : public view_listener_t @@ -9722,6 +9822,11 @@ void initialize_menus() addMenu(new LLEnablePayObject(), "EnablePayObject"); addMenu(new LLEnableEdit(), "EnableEdit"); + addMenu(new LLObjectPFLinksetsSelected(), "Pathfinding.Linksets.Select"); + addMenu(new LLObjectEnablePFLinksetsSelected(), "EnableSelectInPathfindingLinksets"); + addMenu(new LLObjectPFCharactersSelected(), "Pathfinding.Characters.Select"); + addMenu(new LLObjectEnablePFCharactersSelected(), "EnableSelectInPathfindingCharacters"); + addMenu(new LLFloaterVisible(), "FloaterVisible"); addMenu(new LLSomethingSelected(), "SomethingSelected"); addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD"); @@ -9805,5 +9910,18 @@ void custom_selected(void* user_data) LLSD menuAction = LLSD::emptyMap(); menuAction["action"] = LLSD(custom->getName()); + LLSD selection = LLSD::emptyArray(); + + for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin(); + iter != LLSelectMgr::getInstance()->getSelection()->end(); iter++) + { + LLSelectNode* selectNode = *iter; + LLViewerObject*cur = selectNode->getObject(); + + selection.append(LLSD((S32)cur->getLocalID())); + } + + menuAction["selection"] = selection; + LLHTTPClient::post(url, menuAction, new LLHTTPClient::ResponderIgnore); } diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 5f9c37dd9..9d4d43629 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -99,7 +99,18 @@ void handle_gestures(void*); void handle_sit_down(void*); void handle_object_build(void*); +bool visible_take_object(); +bool enable_object_take_copy(); +bool enable_object_return(); +bool enable_object_delete(); + +// Buy either contents or object itself void handle_buy(); +void handle_take(); +void handle_take_copy(); +void handle_object_return(); +void handle_object_delete(); + // Can anyone take a free copy of the object? // *TODO: Move to separate file bool anyone_copy_selection(LLSelectNode* nodep); @@ -121,11 +132,6 @@ bool handle_go_to(); // Export to XML or Collada void handle_export_selected( void * ); -// Pass in an empty string and this function will build a string that -// describes buyer permissions. -class LLSaleInfo; -class LLPermissions; - class LLViewerMenuHolderGL : public LLMenuHolderGL { public: diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c66a706d8..3efe1822a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -182,6 +182,7 @@ // NaCl - Antispam Registry #include "NACLantispam.h" +bool can_block(const LLUUID& id); // NaCl - Newline flood protection #include static const boost::regex NEWLINES("\\n{1}"); @@ -211,7 +212,7 @@ extern bool gShiftFrame; // function prototypes bool check_offer_throttle(const std::string& from_name, bool check_only); -void callbackCacheEstateOwnerName(const LLUUID& id, const std::string& full_name, bool is_group); +void callbackCacheEstateOwnerName(const LLUUID& id, const LLAvatarName& av_name); static void process_money_balance_reply_extended(LLMessageSystem* msg); //inventory offer throttle globals @@ -1476,9 +1477,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& bool busy=FALSE; -// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e - bool fRlvNotifyAccepted = false; -// [/RLVa:KB] switch(button) { case IOR_ACCEPT: @@ -1494,13 +1492,11 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if ( (rlv_handler_t::isEnabled()) && (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) ) { - fRlvNotifyAccepted = true; if (!RlvSettings::getForbidGiveToRLV()) { const LLViewerInventoryCategory* pRlvRoot = RlvInventory::instance().getSharedRoot(); if (pRlvRoot) { - fRlvNotifyAccepted = false; // "accepted_in_rlv" is sent from RlvGiveToRLVTaskOffer *after* we have the folder mFolderID = pRlvRoot->getUUID(); RlvGiveToRLVTaskOffer* pOfferObserver = new RlvGiveToRLVTaskOffer(mTransactionID); @@ -1956,27 +1952,22 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) msg->getStringFast(_PREHASH_MessageBlock, _PREHASH_Message, message); // NaCl - Newline flood protection static LLCachedControl AntiSpamEnabled(gSavedSettings,"AntiSpamEnabled",false); - if(AntiSpamEnabled){ - LLViewerObject* obj=gObjectList.findObject(from_id); - if(!from_id.isNull() //Not from nothing. - && gAgent.getID() != from_id //Not from self. - && !(obj && obj->permYouOwner())) //Not from own object. + if (AntiSpamEnabled && can_block(from_id)) + { + static LLCachedControl SpamNewlines(gSavedSettings,"_NACL_AntiSpamNewlines"); + boost::sregex_iterator iter(message.begin(), message.end(), NEWLINES); + if((U32)std::abs(std::distance(iter, boost::sregex_iterator())) > SpamNewlines) { - static LLCachedControl SpamNewlines(gSavedSettings,"_NACL_AntiSpamNewlines"); - boost::sregex_iterator iter(message.begin(), message.end(), NEWLINES); - if((U32)std::abs(std::distance(iter, boost::sregex_iterator())) > SpamNewlines) + NACLAntiSpamRegistry::blockOnQueue((U32)NACLAntiSpamRegistry::QUEUE_IM,from_id); + llinfos << "[antispam] blocked owner due to too many newlines: " << from_id << llendl; + if(gSavedSettings.getBOOL("AntiSpamNotify")) { - NACLAntiSpamRegistry::blockOnQueue((U32)NACLAntiSpamRegistry::QUEUE_IM,from_id); - llinfos << "[antispam] blocked owner due to too many newlines: " << from_id << llendl; - if(gSavedSettings.getBOOL("AntiSpamNotify")) - { - LLSD args; - args["SOURCE"] = from_id.asString(); - args["AMOUNT"] = boost::lexical_cast(SpamNewlines); - LLNotificationsUtil::add("AntiSpamNewlineFlood", args); - } - return; + LLSD args; + args["SOURCE"] = from_id.asString(); + args["AMOUNT"] = boost::lexical_cast(SpamNewlines); + LLNotificationsUtil::add("AntiSpamNewlineFlood", args); } + return; } } // NaCl End @@ -3540,25 +3531,20 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // NaCl - Newline flood protection static LLCachedControl AntiSpamEnabled(gSavedSettings,"AntiSpamEnabled",false); - if(AntiSpamEnabled){ - LLViewerObject* obj=gObjectList.findObject(from_id); - if(!(from_id.isNull()) //Not from nothing. - || !(gAgent.getID() != from_id) //Not from self. - || !(obj && obj->permYouOwner())) //Not from own object. + if (AntiSpamEnabled && can_block(from_id)) + { + static LLCachedControl SpamNewlines(gSavedSettings,"_NACL_AntiSpamNewlines"); + boost::sregex_iterator iter(mesg.begin(), mesg.end(), NEWLINES); + if((U32)std::abs(std::distance(iter, boost::sregex_iterator())) > SpamNewlines) { - static LLCachedControl SpamNewlines(gSavedSettings,"_NACL_AntiSpamNewlines"); - boost::sregex_iterator iter(mesg.begin(), mesg.end(), NEWLINES); - if((U32)std::abs(std::distance(iter, boost::sregex_iterator())) > SpamNewlines) + NACLAntiSpamRegistry::blockOnQueue((U32)NACLAntiSpamRegistry::QUEUE_CHAT,owner_id); + if(gSavedSettings.getBOOL("AntiSpamNotify")) { - NACLAntiSpamRegistry::blockOnQueue((U32)NACLAntiSpamRegistry::QUEUE_CHAT,owner_id); - if(gSavedSettings.getBOOL("AntiSpamNotify")) - { - LLSD args; - args["MESSAGE"] = "Chat: Blocked newline flood from "+owner_id.asString(); - LLNotificationsUtil::add("SystemMessageTip", args); - } - return; + LLSD args; + args["MESSAGE"] = "Chat: Blocked newline flood from "+owner_id.asString(); + LLNotificationsUtil::add("SystemMessageTip", args); } + return; } } // NaCl End @@ -4687,7 +4673,6 @@ extern U32 gObjectBits; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4704,7 +4689,6 @@ void process_object_update(LLMessageSystem *mesgsys, void **user_data) void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4721,7 +4705,6 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4739,7 +4722,6 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (mesgsys->getReceiveCompressedSize()) { gObjectBits += mesgsys->getReceiveCompressedSize() * 8; @@ -6149,7 +6131,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // notification was specified using the new mechanism, so we can just handle it here std::string notificationID; msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID); - if (!LLNotifications::getInstance()->templateExists(notificationID)) + if (!LLNotificationTemplates::getInstance()->templateExists(notificationID)) { return false; } @@ -6327,7 +6309,7 @@ void process_alert_core(const std::string& message, BOOL modal) } else { - std::string new_msg =LLNotifications::instance().getGlobalString(text); + std::string new_msg =LLNotificationTemplates::instance().getGlobalString(text); args["MESSAGE"] = new_msg; LLNotificationsUtil::add("SystemMessage", args); } @@ -6335,7 +6317,7 @@ void process_alert_core(const std::string& message, BOOL modal) else if (modal) { LLSD args; - std::string new_msg =LLNotifications::instance().getGlobalString(message); + std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message); args["ERROR_MESSAGE"] = new_msg; LLNotificationsUtil::add("ErrorMessage", args); } @@ -6346,7 +6328,7 @@ void process_alert_core(const std::string& message, BOOL modal) if (message.find(AUTOPILOT_CANCELED_MSG) == std::string::npos ) { LLSD args; - std::string new_msg =LLNotifications::instance().getGlobalString(message); + std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message); std::string localized_msg; bool is_message_localized = LLTrans::findString(localized_msg, new_msg); @@ -6486,7 +6468,6 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) gMenuHolder->childSetLabelArg("Upload Sound", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Upload Animation", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Bulk Upload", "[UPLOADFEE]", fee); - gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); } @@ -7661,8 +7642,11 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelEstateCovenant::updateEstateName(estate_name); LLPanelLandCovenant::updateEstateName(estate_name); + LLPanelEstateInfo::updateEstateName(estate_name); LLFloaterBuyLand::updateEstateName(estate_name); + LLAvatarNameCache::get(estate_owner_id, boost::bind(&callbackCacheEstateOwnerName, _1, _2)); + // standard message, not from system std::string last_modified; if (covenant_timestamp == 0) @@ -7677,9 +7661,6 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelEstateCovenant::updateLastModified(last_modified); LLPanelLandCovenant::updateLastModified(last_modified); LLFloaterBuyLand::updateLastModified(last_modified); - - gCacheName->get(estate_owner_id, false, - boost::bind(&callbackCacheEstateOwnerName, _1, _2, _3)); // load the actual covenant asset data const BOOL high_priority = TRUE; @@ -7713,22 +7694,14 @@ void process_covenant_reply(LLMessageSystem* msg, void**) } } -void callbackCacheEstateOwnerName(const LLUUID& id, - const std::string& full_name, - bool is_group) +void callbackCacheEstateOwnerName(const LLUUID& id, const LLAvatarName& av_name) { std::string name; - - if (id.isNull()) - { - name = "(none)"; - } - else - { - name = full_name; - } + LLAvatarNameCache::getPNSName(av_name, name); + LLPanelEstateCovenant::updateEstateOwnerName(name); LLPanelLandCovenant::updateEstateOwnerName(name); + LLPanelEstateInfo::updateEstateOwnerName(name); LLFloaterBuyLand::updateEstateOwnerName(name); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index aee6936a0..48f4481ba 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -907,7 +907,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, LLDataPacker *dp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); U32 retval = 0x0; // If region is removed from the list it is also deleted. @@ -2449,8 +2448,6 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) BOOL LLViewerObject::setData(const U8 *datap, const U32 data_size) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - delete [] mData; if (datap) @@ -2492,8 +2489,6 @@ void LLViewerObject::doUpdateInventory( U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLViewerInventoryItem* old_item = NULL; if(TASK_INVENTORY_ITEM_KEY == key) { @@ -2577,8 +2572,6 @@ void LLViewerObject::saveScript( BOOL active, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - /* * XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the * interaction with doUpdateInventory() called below. @@ -2654,8 +2647,6 @@ void LLViewerObject::dirtyInventory() void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLInventoryCallbackInfo* info = new LLInventoryCallbackInfo; info->mListener = listener; info->mInventoryData = user_data; @@ -2753,8 +2744,6 @@ S32 LLFilenameAndTask::sCount = 0; // static void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLUUID task_id; msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_TaskID, task_id); LLViewerObject* object = gObjectList.findObject(task_id); @@ -2841,8 +2830,6 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS void LLViewerObject::loadTaskInvFile(const std::string& filename) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); llifstream ifs(filename_and_local_path); if(ifs.good()) @@ -2970,8 +2957,6 @@ void LLViewerObject::updateInventory( U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // This slices the object into what we're concerned about on the // viewer. The simulator will take the permissions and transfer // ownership. @@ -3982,8 +3967,6 @@ std::string LLViewerObject::getMediaURL() const void LLViewerObject::setMediaURL(const std::string& media_url) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - if (!mMedia) { mMedia = new LLViewerObjectMedia; @@ -4033,8 +4016,6 @@ BOOL LLViewerObject::setMaterial(const U8 material) void LLViewerObject::setNumTEs(const U8 num_tes) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - U32 i; if (num_tes != getNumTEs()) { diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 8b4693c79..b5522be92 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -40,7 +40,6 @@ #include "llhudicon.h" #include "llinventory.h" #include "llrefcount.h" -#include "llmemtype.h" #include "llprimitive.h" #include "lluuid.h" #include "llvoinventorylistener.h" diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index ddcb84554..c4aa02be9 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -323,7 +323,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { LLFastTimer t(FTM_PROCESS_OBJECTS); - LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal(); LLViewerObject *objectp; S32 num_objects; U32 local_id; @@ -908,8 +907,6 @@ private: void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // Update globals static const LLCachedControl VelocityInterpolate("VelocityInterpolate"); static const LLCachedControl PingInterpolate("PingInterpolate"); @@ -1235,7 +1232,6 @@ void LLViewerObjectList::clearDebugText() void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) { llinfos << "Object " << objectp->mID << " already on dead list!" << llendl; @@ -1477,7 +1473,6 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp) void LLViewerObjectList::updateActive(LLViewerObject *objectp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (objectp->isDead()) { return; // We don't update dead objects! @@ -1958,7 +1953,6 @@ void LLViewerObjectList::resetObjectBeacons() LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); LLUUID fullid; fullid.generate(); @@ -1990,7 +1984,6 @@ static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) { - LLMemType mt(LLMemType::MTYPE_OBJECT); LLFastTimer t(FTM_CREATE_OBJECT); LLUUID fullid; @@ -2061,7 +2054,6 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { - LLMemType mt(LLMemType::MTYPE_OBJECT); #ifdef ORPHAN_SPAM llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; #endif diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 6a8de2595..92abe4bf2 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -85,7 +85,6 @@ LLViewerPart::LLViewerPart() : mVPCallback(NULL), mImagep(NULL) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartSourcep = NULL; ++LLViewerPartSim::sParticleCount2 ; @@ -93,7 +92,6 @@ LLViewerPart::LLViewerPart() : LLViewerPart::~LLViewerPart() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartSourcep = NULL; --LLViewerPartSim::sParticleCount2 ; @@ -101,7 +99,6 @@ LLViewerPart::~LLViewerPart() void LLViewerPart::init(LLPointer sourcep, LLViewerTexture *imagep, LLVPCallback cb) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartID = LLViewerPart::sNextPartID; LLViewerPart::sNextPartID++; mFlags = 0x00f; @@ -126,7 +123,6 @@ void LLViewerPart::init(LLPointer sourcep, LLViewerTexture * LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 box_side, bool hud) : mHud(hud) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mVOPartGroupp = NULL; mUniformParticles = TRUE; @@ -183,7 +179,6 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo LLViewerPartGroup::~LLViewerPartGroup() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); cleanup(); S32 count = (S32) mParticles.size(); @@ -198,7 +193,6 @@ LLViewerPartGroup::~LLViewerPartGroup() void LLViewerPartGroup::cleanup() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (mVOPartGroupp) { if (!mVOPartGroupp->isDead()) @@ -211,7 +205,6 @@ void LLViewerPartGroup::cleanup() BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if ((pos.mV[VX] < mMinObjPos.mV[VX]) || (pos.mV[VY] < mMinObjPos.mV[VY]) || (pos.mV[VZ] < mMinObjPos.mV[VZ])) @@ -239,8 +232,6 @@ BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - if (part->mFlags & LLPartData::LL_PART_HUD && !mHud) { return FALSE; @@ -267,7 +258,6 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) void LLViewerPartGroup::updateParticles(const F32 lastdt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 dt; LLVector3 gravity(0.f, 0.f, GRAVITY); @@ -435,7 +425,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) void LLViewerPartGroup::shift(const LLVector3 &offset) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mCenterAgent += offset; mMinObjPos += offset; mMaxObjPos += offset; @@ -448,8 +437,6 @@ void LLViewerPartGroup::shift(const LLVector3 &offset) void LLViewerPartGroup::removeParticlesByID(const U32 source_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - for (S32 i = 0; i < (S32)mParticles.size(); i++) { if(mParticles[i]->mPartSourcep->getID() == source_id) @@ -481,7 +468,6 @@ void LLViewerPartSim::checkParticleCount(U32 size) LLViewerPartSim::LLViewerPartSim() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT); static U32 id_seed = 0; mID = ++id_seed; @@ -490,7 +476,6 @@ LLViewerPartSim::LLViewerPartSim() void LLViewerPartSim::destroyClass() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); S32 i; S32 count; @@ -508,7 +493,6 @@ void LLViewerPartSim::destroyClass() BOOL LLViewerPartSim::shouldAddPart() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount) { @@ -531,7 +515,6 @@ BOOL LLViewerPartSim::shouldAddPart() void LLViewerPartSim::addPart(LLViewerPart* part) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (sParticleCount < MAX_PART_COUNT) { put(part); @@ -547,7 +530,6 @@ void LLViewerPartSim::addPart(LLViewerPart* part) LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); const F32 MAX_MAG = 1000000.f*1000000.f; // 1 million LLViewerPartGroup *return_group = NULL ; if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite()) @@ -605,7 +587,6 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) LLViewerPartGroup *LLViewerPartSim::createViewerPartGroup(const LLVector3 &pos_agent, const F32 desired_size, bool hud) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); //find a box that has a center position divisible by PART_SIM_BOX_SIDE that encompasses //pos_agent LLViewerPartGroup *groupp = new LLViewerPartGroup(pos_agent, desired_size, hud); @@ -638,8 +619,6 @@ static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - static LLFrameTimer update_timer; const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f); @@ -817,7 +796,6 @@ void LLViewerPartSim::updatePartBurstRate() void LLViewerPartSim::addPartSource(LLPointer sourcep) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!sourcep) { llwarns << "Null part source!" << llendl; @@ -834,8 +812,6 @@ void LLViewerPartSim::removeLastCreatedSource() void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - group_list_t& vec = mViewerPartGroups; for (group_list_t::size_type i = 0;iremoveParticlesByID(system_id); @@ -869,7 +844,6 @@ void LLViewerPartSim::clearParticlesByID(const U32 system_id) void LLViewerPartSim::clearParticlesByOwnerID(const LLUUID& task_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); for (source_list_t::iterator iter = mViewerPartSources.begin(); iter != mViewerPartSources.end(); ++iter) { if ((*iter)->getOwnerUUID() == task_id) diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 4752bf1a8..d712138fd 100644 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -96,7 +96,6 @@ void LLViewerPartSource::setStart() LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) : LLViewerPartSource(LL_PART_SOURCE_SCRIPT) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); llassert(source_objp); mSourceObjectp = source_objp; mPosAgent = mSourceObjectp->getPositionAgent(); @@ -108,7 +107,6 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) void LLViewerPartSourceScript::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; mTargetObjectp = NULL; @@ -119,7 +117,6 @@ void LLViewerPartSourceScript::update(const F32 dt) if( mIsSuspended ) return; - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 old_update_time = mLastUpdateTime; mLastUpdateTime += dt; @@ -400,7 +397,6 @@ void LLViewerPartSourceScript::update(const F32 dt) // static LLPointer LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer pssp, const S32 block_num) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) { if (LLPartSysData::isNullPS(block_num)) @@ -442,7 +438,6 @@ LLPointer LLViewerPartSourceScript::unpackPSS(LLViewer LLPointer LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer pssp, LLDataPacker &dp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) { LLPointer new_pssp = new LLViewerPartSourceScript(source_objp); @@ -476,8 +471,6 @@ LLPointer LLViewerPartSourceScript::unpackPSS(LLViewer /* static */ LLPointer LLViewerPartSourceScript::createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - LLPointer new_pssp = new LLViewerPartSourceScript(source_objp); new_pssp->mPartSysData = particle_parameters; @@ -493,13 +486,11 @@ LLPointer LLViewerPartSourceScript::createPSS(LLViewer void LLViewerPartSourceScript::setImage(LLViewerTexture *imagep) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mImagep = imagep; } void LLViewerPartSourceScript::setTargetObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mTargetObjectp = objp; } @@ -515,7 +506,6 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) : void LLViewerPartSourceSpiral::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; } @@ -523,7 +513,6 @@ void LLViewerPartSourceSpiral::setDead() void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLVector3 center_pos; @@ -548,7 +537,6 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceSpiral::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!mImagep) { mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); @@ -594,7 +582,6 @@ void LLViewerPartSourceSpiral::update(const F32 dt) void LLViewerPartSourceSpiral::setSourceObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } @@ -618,7 +605,6 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam() void LLViewerPartSourceBeam::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; mTargetObjectp = NULL; @@ -632,7 +618,6 @@ void LLViewerPartSourceBeam::setColor(const LLColor4 &color) void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep; @@ -677,7 +662,6 @@ void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceBeam::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); const F32 RATE = 0.025f; mLastUpdateTime += dt; @@ -749,13 +733,11 @@ void LLViewerPartSourceBeam::update(const F32 dt) void LLViewerPartSourceBeam::setSourceObject(LLViewerObject* objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } void LLViewerPartSourceBeam::setTargetObject(LLViewerObject* objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mTargetObjectp = objp; } @@ -770,7 +752,6 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) : void LLViewerPartSourceChat::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; } @@ -778,7 +759,6 @@ void LLViewerPartSourceChat::setDead() void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLVector3 center_pos; @@ -803,7 +783,6 @@ void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceChat::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!mImagep) { mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); @@ -859,7 +838,6 @@ void LLViewerPartSourceChat::update(const F32 dt) void LLViewerPartSourceChat::setSourceObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 84504a118..f000bc39c 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -780,7 +780,6 @@ void LLViewerRegion::dirtyHeights() BOOL LLViewerRegion::idleUpdate(F32 max_update_time) { - LLMemType mt_ivr(LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION); // did_update returns TRUE if we did at least one significant update BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0f305c087..a1de57f87 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -39,7 +39,6 @@ #include "llimagebmp.h" #include "llimagej2c.h" #include "llimagetga.h" -#include "llmemtype.h" #include "llstl.h" #include "llvfile.h" #include "llvfs.h" diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 06bca2c16..7a7b70f9b 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1393,7 +1393,6 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { static LLCachedControl log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE); LLFastTimer t(FTM_PROCESS_IMAGES); // Receives image packet, copy into image object, diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9b87e221e..5ed1a2aa1 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -206,9 +206,6 @@ const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12; const F32 CHAT_FADE_TIME = 8.0; const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f; -const U32 EMERALD_BOOB_SIZE_PARAM = 105; -const U32 EMERALD_BOOB_GRAVITY_PARAM = 507; - //Singu note: FADE and ALWAYS are swapped around from LL's source to match our preference panel. // Changing the "RenderName" order would cause confusion when 'always' setting suddenly gets // interpreted as 'fade', and vice versa. @@ -906,12 +903,10 @@ void SHClientTagMgr::clearAvatarTag(const LLVOAvatar* pAvatar) LLAvatarAppearanceDictionary *LLVOAvatar::sAvatarDictionary = NULL; S32 LLVOAvatar::sFreezeCounter = 0; U32 LLVOAvatar::sMaxVisible = 50; - F32 LLVOAvatar::sRenderDistance = 256.f; S32 LLVOAvatar::sNumVisibleAvatars = 0; S32 LLVOAvatar::sNumLODChangesThisFrame = 0; - const LLUUID LLVOAvatar::sStepSoundOnLand("e8af4a28-aa83-4310-a7c4-c047e15ea0df"); const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] = { @@ -946,9 +941,6 @@ F32 LLVOAvatar::sGreyUpdateTime = 0.f; //Move to LLVOAvatarSelf BOOL LLVOAvatar::sDebugAvatarRotation = FALSE; -//Custom stuff. -EmeraldGlobalBoobConfig LLVOAvatar::sBoobConfig; - //----------------------------------------------------------------------------- // Helper functions //----------------------------------------------------------------------------- @@ -1008,8 +1000,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), mUseServerBakes(FALSE), // FIXME DRANO consider using boost::optional, defaulting to unknown. - mFirstSetActualBoobGravRan( false ), - mSupportsPhysics( false ), // mIdleMinute(0), mCCSChatTextOverride(false) @@ -1018,7 +1008,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, static LLCachedControl const freeze_time("FreezeTime", false); mFreezeTimeLangolier = freeze_time; - LLMemType mt(LLMemType::MTYPE_AVATAR); //VTResume(); // VTune // mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline @@ -1524,15 +1513,6 @@ void LLVOAvatar::initInstance(void) LLAvatarAppearance::initInstance(); - // grab the boob savedparams (prob a better place for this) - sBoobConfig.mass = EmeraldBoobUtils::convertMass(gSavedSettings.getF32("EmeraldBoobMass")); - sBoobConfig.hardness = EmeraldBoobUtils::convertHardness(gSavedSettings.getF32("EmeraldBoobHardness")); - sBoobConfig.velMax = EmeraldBoobUtils::convertVelMax(gSavedSettings.getF32("EmeraldBoobVelMax")); - sBoobConfig.velMin = EmeraldBoobUtils::convertVelMin(gSavedSettings.getF32("EmeraldBoobVelMin"))*sBoobConfig.velMax; - sBoobConfig.friction = EmeraldBoobUtils::convertFriction(gSavedSettings.getF32("EmeraldBoobFriction")); - sBoobConfig.enabled = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle"); - sBoobConfig.XYInfluence = gSavedSettings.getF32("EmeraldBoobXYInfluence"); - if (gNoRender) { return; @@ -1965,8 +1945,6 @@ void LLVOAvatar::buildCharacter() //----------------------------------------------------------------------------- void LLVOAvatar::releaseMeshData() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy) { return; @@ -2021,7 +1999,6 @@ void LLVOAvatar::releaseMeshData() void LLVOAvatar::restoreMeshData() { llassert(!isSelf()); - LLMemType mt(LLMemType::MTYPE_AVATAR); //llinfos << "Restoring" << llendl; mMeshValid = TRUE; @@ -2177,10 +2154,8 @@ void LLVOAvatar::updateMeshData() U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, void **user_data, U32 block_num, const EObjectUpdateType update_type, - LLDataPacker *dp) + LLDataPacker *dp) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - const BOOL has_name = !getNVPair("FirstName"); // Do base class updates... @@ -2286,7 +2261,6 @@ void LLVOAvatar::dumpAnimationState() //------------------------------------------------------------------------ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - LLMemType mt(LLMemType::MTYPE_AVATAR); LLFastTimer t(FTM_AVATAR_UPDATE); if (isDead()) @@ -2295,7 +2269,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) return; } - if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))) + if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))) { return; } @@ -2374,7 +2348,6 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) idleUpdateAppearanceAnimation(); if (detailed_update) { - //idleUpdateBoobEffect(); idleUpdateLipSync( voice_enabled ); idleUpdateLoadingEffect(); idleUpdateBelowWater(); // wind effect uses this @@ -2696,48 +2669,10 @@ F32 LLVOAvatar::calcMorphAmount() { morph_amt = (blend_frac - last_blend_frac) / (1.f - last_blend_frac); } - + return morph_amt; } -// ------------------------------------------------------------ -// Danny: ZOMG Boob Phsyics go! -// ------------------------------------------------------------ -void LLVOAvatar::idleUpdateBoobEffect() -{ - if(mFirstSetActualBoobGravRan) - { - // should probably be moved somewhere where it is only called when boobsize changes - static const LLCachedControl avatar_physics("AvatarPhysics",false); - - EmeraldBoobState newBoobState; - - if(!avatar_physics || (!isSelf() && !mSupportsPhysics)) - { - mLocalBoobConfig.boobSize = getVisualParam(EMERALD_BOOB_SIZE_PARAM)->getCurrentWeight(); - - EmeraldBoobInputs boobInputs; - boobInputs.chestPosition = mChestp->getWorldPosition(); - boobInputs.chestRotation = mChestp->getWorldRotation(); - boobInputs.elapsedTime = mBoobBounceTimer.getElapsedTimeF32(); - - newBoobState = EmeraldBoobUtils::idleUpdate(sBoobConfig, mLocalBoobConfig, mBoobState, boobInputs); - } - - if(mBoobState.boobGrav != newBoobState.boobGrav) - { - LLVisualParam *param = getVisualParam(EMERALD_BOOB_GRAVITY_PARAM); - - param->stopAnimating(FALSE); - param->setWeight(llclamp(newBoobState.boobGrav+getActualBoobGrav(), -1.5f, 2.f), FALSE); - param->apply(getSex()); - updateVisualParams(); - } - - mBoobState = newBoobState; - } -} - void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) { // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync @@ -3207,7 +3142,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) // LLFontGL::getFontSansSerifSmall()); } - // static LLICachedControl show_display_names("NameTagShowDisplayNames"); + // static LLUICachedControl show_display_names("NameTagShowDisplayNames"); // static LLUICachedControl show_usernames("NameTagShowUsernames"); static const LLCachedControl phoenix_name_system("PhoenixNameSystem", 0); @@ -3350,8 +3285,6 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) mNameText->setTextAlignment(LLHUDNameTag::ALIGN_TEXT_LEFT); mNameText->setFadeDistance(CHAT_NORMAL_RADIUS * 2.f, 5.f); - char line[MAX_STRING]; /* Flawfinder: ignore */ - line[0] = '\0'; std::deque::iterator chat_iter = mChats.begin(); mNameText->clearString(); @@ -3418,8 +3351,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) { // ...not using chat bubbles, just names mNameText->setTextAlignment(LLHUDNameTag::ALIGN_TEXT_CENTER); - mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); - mNameText->setVisibleOffScreen(FALSE); + mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); + mNameText->setVisibleOffScreen(FALSE); } } @@ -3442,8 +3375,8 @@ void LLVOAvatar::clearNameTag() { mNameString.clear(); if (mNameText) - { - mNameText->setLabel(""); + { + mNameText->setLabel(""); mNameText->setString( "" ); } } @@ -3469,7 +3402,7 @@ void LLVOAvatar::invalidateNameTags() LLVOAvatar* avatar = dynamic_cast(*it); if (!avatar) continue; if (avatar->isDead()) continue; - + avatar->clearNameTag(); } @@ -3596,8 +3529,6 @@ void LLVOAvatar::resetFreezeTime() //------------------------------------------------------------------------ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // Frozen! if (areAnimationsPaused()) { @@ -3653,13 +3584,13 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { output = llformat("%s - %d", motionp->getID().asString().c_str(), - (U32)motionp->getPriority()); + (U32)motionp->getPriority()); } else { output = llformat("%s - %d", - motionp->getName().c_str(), - (U32)motionp->getPriority()); + motionp->getName().c_str(), + (U32)motionp->getPriority()); } addDebugText(output); } @@ -3829,7 +3760,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) resolveHeightGlobal(root_pos, ground_under_pelvis, normal); F32 foot_to_ground = (F32) (root_pos.mdV[VZ] - mPelvisToFoot - ground_under_pelvis.mdV[VZ]); - BOOL in_air = ( (!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) || + BOOL in_air = ((!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) || foot_to_ground > FOOT_GROUND_COLLISION_TOLERANCE); if (in_air && !mInAir) @@ -3847,7 +3778,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) if (newPosition != mRoot->getXform()->getWorldPosition()) { mRoot->touch(); - mRoot->setWorldPosition(newPosition ); // regular update + mRoot->setWorldPosition( newPosition ); // regular update } @@ -4223,7 +4154,7 @@ void LLVOAvatar::updateVisibility() if(isSelf()) { - if( !gAgentWearables.areWearablesLoaded()) + if (!gAgentWearables.areWearablesLoaded()) { visible = FALSE; } @@ -4364,11 +4295,11 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) { //LOD changed or new mesh created, allocate new vertex buffer if needed if (needs_rebuild || mDirtyMesh >= 2 || mVisibilityRank <= 4) { - updateMeshData(); + updateMeshData(); mDirtyMesh = 0; - mNeedsSkin = TRUE; - mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY); - } + mNeedsSkin = TRUE; + mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY); + } } if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) <= 0) @@ -4614,8 +4545,8 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) } // Can't test for baked hair being defined, since that won't always be the case (not all viewers send baked hair) // TODO: 1.25 will be able to switch this logic back to calling isTextureVisible(); - if ( getImage(TEX_HAIR_BAKED, 0) && - getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha) + if ((getImage(TEX_HAIR_BAKED, 0) && + getImage(TEX_HAIR_BAKED, 0)->getID() != IMG_INVISIBLE) || LLDrawPoolAlpha::sShowDebugAlpha) { LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR); if (hair_mesh) @@ -4996,7 +4927,7 @@ void LLVOAvatar::updateTextures() layer_baked.push_back(isTextureDefined(mBakedTextureDatas[i].mTextureIndex)); // bind the texture so that they'll be decoded slightly // inefficient, we can short-circuit this if we have to - if( render_avatar && !gGLManager.mIsDisabled ) + if (render_avatar && !gGLManager.mIsDisabled) { if (layer_baked[i] && !mBakedTextureDatas[i].mIsLoaded) { @@ -5161,7 +5092,7 @@ void LLVOAvatar::checkTextureLoading() } const F32 SELF_ADDITIONAL_PRI = 0.75f ; -const F32 ADDITIONAL_PRI = 0.5f; +const F32 ADDITIONAL_PRI = 0.5f; void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level) { //Note: @@ -5306,8 +5237,6 @@ const LLUUID& LLVOAvatar::getStepSound() const //----------------------------------------------------------------------------- void LLVOAvatar::processAnimationStateChanges() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if ((gNoRender)||(gAgent.isTPosed())) //isTPosed is meant to stop animation updates while force-TPosed. { return; @@ -5423,8 +5352,6 @@ void LLVOAvatar::processAnimationStateChanges() //----------------------------------------------------------------------------- BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start ) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - BOOL result = FALSE; if ( start ) // start animation @@ -5612,8 +5539,6 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) return TRUE; } - LLMemType mt(LLMemType::MTYPE_AVATAR); - lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; LLUUID remap_id = remapMotionID(id); @@ -5992,8 +5917,6 @@ BOOL LLVOAvatar::isActive() const //----------------------------------------------------------------------------- void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if (mDrawable.isNull()) { return; @@ -6563,7 +6486,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) gAgentCamera.changeCameraToMouselook(); } } - + if (mDrawable.isNull() || sit_object->mDrawable.isNull()) { return; @@ -8051,7 +7974,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) && baked_index != BAKED_SKIRT) { setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, - LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } } @@ -8072,8 +7995,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) setCompositeUpdatesEnabled( FALSE ); gPipeline.markGLRebuild(this); - mSupportsPhysics = false; - // Apply visual params if( num_params > 1) { @@ -8081,20 +8002,11 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) BOOL params_changed = FALSE; BOOL interp_params = FALSE; - for( S32 i = 0; i < num_params; i++ ) + for( S32 i = 0; i < num_params; i++ ) { LLVisualParam* param = contents.mParams[i]; F32 newWeight = contents.mParamWeights[i]; - if(param->getID() == 10000) - { - mSupportsPhysics = true; - } - else if(param->getID() == EMERALD_BOOB_GRAVITY_PARAM && newWeight != getActualBoobGrav()) - { - setActualBoobGrav(newWeight); - } - if (is_first_appearance_message || (param->getWeight() != newWeight)) { params_changed = TRUE; @@ -8200,7 +8112,6 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture if (!userdata) return; //llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl; - const LLMemType mt(LLMemType::MTYPE_AVATAR); const LLUUID id = src_vi->getID(); LLTextureMaskData* maskData = (LLTextureMaskData*) userdata; @@ -8310,7 +8221,7 @@ void LLVOAvatar::onBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) { - //llinfos << "onBakedTextureLoaded: " << src_vi->getID() << llendl; + // llinfos << "onBakedTextureLoaded: " << src_vi->getID() << llendl; LLUUID id = src_vi->getID(); LLUUID *avatar_idp = (LLUUID *)userdata; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 5ceeee92b..10b025197 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -52,7 +52,6 @@ #include "material_codes.h" // LL_MCODE_END #include "llviewerstats.h" -#include "emeraldboobutils.h" #include "llavatarname.h" extern const LLUUID ANIM_AGENT_BODY_NOISE; @@ -292,7 +291,6 @@ public: void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font); void idleUpdateRenderCost(); void idleUpdateBelowWater(); - void idleUpdateBoobEffect(); //Emerald //-------------------------------------------------------------------- // Static preferences (controlled by user settings/menus) @@ -871,30 +869,6 @@ private: BOOL mStepOnLand; U8 mStepMaterial; LLVector3 mStepObjectVelocity; - -public: - bool mSupportsPhysics; //Client supports v2 wearable physics. Disable emerald physics. - - //-------------------------------------------------------------------- - // Emerald legacy boob bounce - //-------------------------------------------------------------------- -public: - F32 getActualBoobGrav() const { return mLocalBoobConfig.actualBoobGrav; } - void setActualBoobGrav(F32 grav) - { - mLocalBoobConfig.actualBoobGrav = grav; - if(!mFirstSetActualBoobGravRan) - { - mBoobState.boobGrav = grav; - mFirstSetActualBoobGravRan = true; - } - } - static EmeraldGlobalBoobConfig sBoobConfig; -private: - bool mFirstSetActualBoobGravRan; - LLFrameTimer mBoobBounceTimer; - EmeraldAvatarLocalBoobConfig mLocalBoobConfig; - EmeraldBoobState mBoobState; /** Physics ** ** @@ -1091,6 +1065,4 @@ private: extern const F32 SELF_ADDITIONAL_PRI; extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL; -extern const U32 EMERALD_BOOB_SIZE_PARAM; //"Breast Size" -extern const U32 EMERALD_BOOB_GRAVITY_PARAM; //"Breast_Gravity" #endif // LL_VOAVATAR_H diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index eb8cec7dc..6ce7fd2e5 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -299,8 +299,6 @@ BOOL LLVOAvatarSelf::loadAvatarSelf() BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLAvatarSkeletonInfo *info) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // add special-purpose "screen" joint mScreenp = new LLViewerJoint("mScreen", NULL); // for now, put screen at origin, as it is only used during special @@ -555,8 +553,6 @@ LLVOAvatarSelf::~LLVOAvatarSelf() // virtual BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // update screen joint size if (mScreenp) { @@ -655,11 +651,6 @@ BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight } } - if(param->getID() == EMERALD_BOOB_GRAVITY_PARAM && weight != getActualBoobGrav()) - { - setActualBoobGrav(weight); - } - return LLCharacter::setVisualParamWeight(param,weight,upload_bake); } @@ -962,8 +953,6 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() // virtual void LLVOAvatarSelf::restoreMeshData() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //llinfos << "Restoring" << llendl; mMeshValid = TRUE; updateJointLODs(); diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 4c40dd76a..f1ca2c6a3 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -700,7 +700,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); void LLGrassPartition::getGeometry(LLSpatialGroup* group) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLFastTimer ftm(FTM_REBUILD_GRASS_VB); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 43a12d5c9..888d77d8e 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -3079,7 +3079,8 @@ void LLVoiceClient::giveUp() static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVector3d &pos, LLVector3 &vel) { - F32 nat[3], nup[3], nl[3], nvel[3]; // the new at, up, left vectors and the new position and velocity + F32 nat[3], nup[3], nl[3]; // the new at, up, left vectors and the new position and velocity +// F32 nvel[3]; F64 npos[3]; // The original XML command was sent like this: @@ -3129,9 +3130,9 @@ static void oldSDKTransform (LLVector3 &left, LLVector3 &up, LLVector3 &at, LLVe npos[1] = pos.mdV[VZ]; npos[2] = pos.mdV[VY]; - nvel[0] = vel.mV[VX]; - nvel[1] = vel.mV[VZ]; - nvel[2] = vel.mV[VY]; +// nvel[0] = vel.mV[VX]; +// nvel[1] = vel.mV[VZ]; +// nvel[2] = vel.mV[VY]; for(int i=0;i<3;++i) { at.mV[i] = nat[i]; diff --git a/indra/newview/llvoiceremotectrl.cpp b/indra/newview/llvoiceremotectrl.cpp index f8d402a61..725402b7a 100644 --- a/indra/newview/llvoiceremotectrl.cpp +++ b/indra/newview/llvoiceremotectrl.cpp @@ -80,21 +80,19 @@ BOOL LLVoiceRemoteCtrl::postBuild() mSpeakersBtn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickSpeakers)); childSetAction("show_channel", onClickPopupBtn, this); - childSetAction("end_call_btn", onClickEndCall, this); + if (LLButton* end_call_btn = findChild("end_call_btn")) + end_call_btn->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickEndCall)); - LLTextBox* text = getChild("channel_label"); + LLTextBox* text = findChild("channel_label"); if (text) { text->setUseEllipses(TRUE); } - childSetAction("voice_channel_bg", onClickVoiceChannel, this); + if (LLButton* voice_channel_bg = findChild("voice_channel_bg")) + voice_channel_bg->setClickedCallback(boost::bind(&LLVoiceRemoteCtrl::onClickVoiceChannel)); - mEndCallBtn.connect(this,"end_call_btn"); mVoiceVolIcon.connect(this,"voice_volume"); - mVoiceChanIcon.connect(this,"voice_channel_icon"); - mVoiceChanBgBtn.connect(this,"voice_channel_bg"); - mChanLabelTextBox.connect(this,"channel_label"); mShowChanBtn.connect(this,"show_channel"); return TRUE; } @@ -168,23 +166,25 @@ void LLVoiceRemoteCtrl::draw() } LLVoiceChannel* current_channel = LLVoiceChannel::getCurrentVoiceChannel(); - mEndCallBtn->setEnabled(LLVoiceClient::voiceEnabled() + if (LLButton* end_call_btn = findChild("end_call_btn")) + end_call_btn->setEnabled(LLVoiceClient::voiceEnabled() && current_channel && current_channel->isActive() && current_channel != LLVoiceChannelProximal::getInstance()); - mChanLabelTextBox->setValue(active_channel_name); - mVoiceChanBgBtn->setToolTip(active_channel_name); + if (LLTextBox* text = findChild("channel_label")) + text->setValue(active_channel_name); + LLButton* voice_channel_bg = findChild("voice_channel_bg"); + if (voice_channel_bg) voice_channel_bg->setToolTip(active_channel_name); if (current_channel) { - LLIconCtrl* voice_channel_icon = mVoiceChanIcon; + LLIconCtrl* voice_channel_icon = findChild("voice_channel_icon"); if (voice_channel_icon && voice_floater) { voice_channel_icon->setImage(voice_floater->getString("voice_icon")); } - LLButton* voice_channel_bg = mVoiceChanBgBtn; if (voice_channel_bg) { LLColor4 bg_color; @@ -272,7 +272,7 @@ void LLVoiceRemoteCtrl::onClickPopupBtn(void* user_data) } //static -void LLVoiceRemoteCtrl::onClickEndCall(void* user_data) +void LLVoiceRemoteCtrl::onClickEndCall() { LLVoiceChannel* current_channel = LLVoiceChannel::getCurrentVoiceChannel(); @@ -289,7 +289,7 @@ void LLVoiceRemoteCtrl::onClickSpeakers() } //static -void LLVoiceRemoteCtrl::onClickVoiceChannel(void* user_data) +void LLVoiceRemoteCtrl::onClickVoiceChannel() { LLFloaterChatterBox::showInstance(); } diff --git a/indra/newview/llvoiceremotectrl.h b/indra/newview/llvoiceremotectrl.h index 86504fe38..69ea20ae1 100644 --- a/indra/newview/llvoiceremotectrl.h +++ b/indra/newview/llvoiceremotectrl.h @@ -54,18 +54,14 @@ public: static void onBtnTalkClicked(); static void onClickSpeakers(); static void onClickPopupBtn(void* user_data); - static void onClickVoiceChannel(void* user_data); - static void onClickEndCall(void* user_data); + static void onClickVoiceChannel(); + static void onClickEndCall(); protected: LLButton* mTalkBtn; LLButton* mTalkLockBtn; LLButton* mSpeakersBtn; - CachedUICtrl mEndCallBtn; CachedUICtrl mVoiceVolIcon; - CachedUICtrl mVoiceChanIcon; - CachedUICtrl mVoiceChanBgBtn; - CachedUICtrl mChanLabelTextBox; CachedUICtrl mShowChanBtn; }; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 9f4c1c22d..b3faa57ac 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -600,7 +600,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom"); void LLParticlePartition::getGeometry(LLSpatialGroup* group) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d1cee520d..535f0879c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3044,10 +3044,13 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons } //build matrix palette - LLMatrix4a mp[64]; + static const size_t kMaxJoints = 64; + + LLMatrix4a mp[kMaxJoints]; LLMatrix4* mat = (LLMatrix4*) mp; - for (U32 j = 0; j < skin->mJointNames.size(); ++j) + U32 maxJoints = llmin(skin->mJointNames.size(), kMaxJoints); + for (U32 j = 0; j < maxJoints; ++j) { LLJoint* joint = avatar->getJoint(skin->mJointNames[j]); if (joint) @@ -3105,8 +3108,10 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons F32 w = wght[k]; LLMatrix4a src; - src.setMul(mp[idx[k]], w); - + // Insure ref'd bone is in our clamped array of mats + llassert(idx[k] < kMaxJoints); + // clamp k to kMaxJoints to avoid reading garbage off stack in release + src.setMul(mp[idx[(k < kMaxJoints) ? k : 0]], w); final_mat.add(src); } @@ -3210,7 +3215,6 @@ static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face"); void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type) { LLFastTimer t(FTM_REGISTER_FACE); - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); // if (facep->getViewerObject()->isSelected() && gHideSelectedObjects) // [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 08f1d85a8..a39530724 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -588,7 +588,10 @@ void LLWaterParamManager::initSingleton() loadAllPresets(); - LLEnvManagerNew::instance().usePrefs(); + // This shouldn't be called here. It has nothing to do with the initialization of this singleton. + // Instead, call it one-time when the viewer starts. Calling it here causes a recursive entry + // of LLWaterParamManager::initSingleton(). + //LLEnvManagerNew::instance().usePrefs(); } // static diff --git a/indra/newview/llwaterparamset.cpp b/indra/newview/llwaterparamset.cpp index 39d366b02..9cc91d224 100644 --- a/indra/newview/llwaterparamset.cpp +++ b/indra/newview/llwaterparamset.cpp @@ -185,8 +185,6 @@ LLVector3 LLWaterParamSet::getVector3(const std::string& paramName, bool& error) LLVector2 LLWaterParamSet::getVector2(const std::string& paramName, bool& error) { // test to see if right type - int ttest; - ttest = mParamValues.size(); LLSD cur_val = mParamValues.get(paramName); if (!cur_val.isArray() || cur_val.size() != 2) { diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index b6f8e0a65..7286766c6 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -97,7 +97,7 @@ public: } // *TODO: 404 = not supported by the grid - // *TODO: increase timeout or handle 499 Expired + // *TODO: increase timeout or handle HTTP_INTERNAL_ERROR_* time errors. // Convert config to LLSD. const Json::Value data = root["data"]; diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index cbcd5ec4e..95eba470f 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -775,14 +775,19 @@ boost::signals2::connection LLWLParamManager::setPresetListChangeCallback(const } - -// static void LLWLParamManager::initSingleton() { LL_DEBUGS("Windlight") << "Initializing sky" << LL_ENDL; loadAllPresets(); + // Here it used to call LLWLParamManager::initHack(), but we can't do that since it calls + // LLWLParamManager::initSingleton() recursively. Instead, call it from LLAppViewer::init(). +} + +// This is really really horrible, but can't be fixed without a rewrite. +void LLWLParamManager::initHack() +{ // load the day std::string preferred_day = LLEnvManagerNew::instance().getDayCycleName(); if (!LLDayCycleManager::instance().getPreset(preferred_day, mDay)) @@ -810,7 +815,10 @@ void LLWLParamManager::initSingleton() // but use linden time sets it to what the estate is mAnimator.setTimeType(LLWLAnimator::TIME_LINDEN); - LLEnvManagerNew::instance().usePrefs(); + // This shouldn't be called here. It has nothing to do with the initialization of this singleton. + // Instead, call it one-time when the viewer starts. Calling it here causes a recursive entry + // of LLWLParamManager::initSingleton(). + //LLEnvManagerNew::instance().usePrefs(); } // static diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h index c65cbcb36..d244d4c47 100644 --- a/indra/newview/llwlparammanager.h +++ b/indra/newview/llwlparammanager.h @@ -341,6 +341,9 @@ private: std::map mParamList; preset_list_signal_t mPresetListChangeSignal; + +public: + void initHack(); }; inline F32 LLWLParamManager::getDomeOffset(void) const diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 487a28905..3bdb3ed59 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -149,7 +149,6 @@ void LLWorld::destroyClass() LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { - LLMemType mt(LLMemType::MTYPE_REGIONS); llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; LLViewerRegion *regionp = getRegionFromHandle(region_handle); if (regionp) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 01d9ca29f..9f06fbbcc 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1311,8 +1311,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& S32 text_x = x; S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight()); - BOOL is_in_window = true; - if( x < 0 || y < 0 || x >= getRect().getWidth() @@ -1325,7 +1323,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& text_x = sTrackingArrowX; text_y = sTrackingArrowY; } - is_in_window = false; } else if (LLTracker::getTrackingStatus() == LLTracker::TRACKING_LOCATION && LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING) diff --git a/indra/newview/llxmlrpcresponder.h b/indra/newview/llxmlrpcresponder.h index 25615f236..3c32cd2a6 100644 --- a/indra/newview/llxmlrpcresponder.h +++ b/indra/newview/llxmlrpcresponder.h @@ -35,7 +35,6 @@ #define LLXMLRPCRESPONDER_H #include -#include "llurlrequest.h" // Injector #include "llcurl.h" #include "llhttpstatuscodes.h" diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 55ad60a5c..b893f6ec2 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -42,7 +42,6 @@ #include "llfasttimer.h" #include "llfontgl.h" #include "llmemory.h" -#include "llmemtype.h" #include "llnamevalue.h" #include "llpointer.h" #include "llprimitive.h" @@ -401,8 +400,6 @@ LLPipeline::LLPipeline() : void LLPipeline::init() { - LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT); - refreshCachedSettings(); gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity"); @@ -985,7 +982,6 @@ void LLPipeline::releaseScreenBuffers() void LLPipeline::createGLBuffers() { stop_glerror(); - LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS); assertInitialized(); updateRenderDeferred(); @@ -1130,7 +1126,6 @@ void LLPipeline::createLUTBuffers() void LLPipeline::restoreGL() { - LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_RESTORE_GL); assertInitialized(); if (mVertexShadersEnabled) @@ -1194,7 +1189,6 @@ BOOL LLPipeline::canUseAntiAliasing() const void LLPipeline::unloadShaders() { - LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS); LLViewerShaderMgr::instance()->unloadShaders(); mVertexShadersLoaded = 0; @@ -1226,7 +1220,6 @@ S32 LLPipeline::getMaxLightingDetail() const S32 LLPipeline::setLightingDetail(S32 level) { - LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL); refreshCachedSettings(); if (level < 0) @@ -1392,7 +1385,6 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0) LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); LLDrawPool *poolp = findPool(type, tex0); if (poolp) { @@ -1409,7 +1401,6 @@ LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0) // static LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* imagep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); U32 type = getPoolTypeFromTE(te, imagep); return gPipeline.getPool(type, imagep); } @@ -1417,8 +1408,6 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* //static U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep) { - LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE); - if (!te || !imagep) { return 0; @@ -1447,7 +1436,6 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima void LLPipeline::addPool(LLDrawPool *new_poolp) { - LLMemType mt_a(LLMemType::MTYPE_PIPELINE_ADD_POOL); assertInitialized(); mPools.insert(new_poolp); addToQuickLookup( new_poolp ); @@ -1459,7 +1447,7 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj) { llerrs << "Null object passed to allocDrawable!" << llendl; } - LLMemType mt_ad(LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE); + LLDrawable *drawable = new LLDrawable(); vobj->mDrawable = drawable; @@ -1568,7 +1556,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) { return 0; } - LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT); + static const LLCachedControl render_delay_creation("RenderDelayCreation",false); if (!vobj->isAvatar() && render_delay_creation) { @@ -1585,7 +1573,6 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) void LLPipeline::createObjects(F32 max_dtime) { LLFastTimer ftm(FTM_PIPELINE_CREATE); - LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS); LLTimer update_timer; @@ -1774,7 +1761,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move"); void LLPipeline::updateMove() { LLFastTimer t(FTM_UPDATE_MOVE); - LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE); static const LLCachedControl freeze_time("FreezeTime",false); if (freeze_time) @@ -2129,7 +2115,6 @@ static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { LLFastTimer t(FTM_CULL); - LLMemType mt_uc(LLMemType::MTYPE_PIPELINE_UPDATE_CULL); grabReferences(result); @@ -2512,7 +2497,6 @@ void LLPipeline::rebuildPriorityGroups() { LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS); LLTimer update_timer; - LLMemType mt(LLMemType::MTYPE_PIPELINE); assertInitialized(); @@ -2585,7 +2569,6 @@ void LLPipeline::rebuildGroups() void LLPipeline::updateGeom(F32 max_dtime) { LLTimer update_timer; - LLMemType mt(LLMemType::MTYPE_PIPELINE_UPDATE_GEOM); LLPointer drawablep; LLFastTimer t(FTM_GEO_UPDATE); @@ -2688,8 +2671,6 @@ void LLPipeline::updateGeom(F32 max_dtime) void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE); - if(drawablep && !drawablep->isDead()) { if (drawablep->isSpatialBridge()) @@ -2733,8 +2714,6 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) { - LLMemType mt_mm(LLMemType::MTYPE_PIPELINE_MARK_MOVED); - if (!drawablep) { //llerrs << "Sending null drawable to moved list!" << llendl; @@ -2779,8 +2758,6 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) void LLPipeline::markShift(LLDrawable *drawablep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_SHIFT); - if (!drawablep || drawablep->isDead()) { return; @@ -2806,8 +2783,6 @@ static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD"); void LLPipeline::shiftObjects(const LLVector3 &offset) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS); - assertInitialized(); glClear(GL_DEPTH_BUFFER_BIT); @@ -2859,8 +2834,6 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) void LLPipeline::markTextured(LLDrawable *drawablep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_TEXTURED); - if (drawablep && !drawablep->isDead() && assertInitialized()) { mRetexturedList.insert(drawablep); @@ -2911,8 +2884,6 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group) void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); - if (group && !group->isDead() && group->mSpatialPartition) { if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD) @@ -2957,8 +2928,6 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD); - if (drawablep && !drawablep->isDead() && assertInitialized()) { if (!drawablep->isState(LLDrawable::BUILT)) @@ -3005,7 +2974,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } LLFastTimer ftm(FTM_STATESORT); - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); //LLVertexBuffer::unbind(); @@ -3107,7 +3075,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); if (!sSkipUpdate && group->changeLOD()) { OctreeGuard guard(group->mOctreeNode); @@ -3127,7 +3094,6 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); if (/*!sShadowRender && */!sSkipUpdate && bridge->getSpatialGroup()->changeLOD()) { bool force_update = false; @@ -3137,8 +3103,6 @@ void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera) void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); - if (!drawablep || drawablep->isDead() || !hasRenderType(drawablep->getRenderType())) @@ -3409,7 +3373,6 @@ void updateParticleActivity(LLDrawable *drawablep); void LLPipeline::postSort(LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT); LLFastTimer ftm(FTM_STATESORT_POSTSORT); assertInitialized(); @@ -3661,7 +3624,6 @@ void LLPipeline::postSort(LLCamera& camera) void render_hud_elements() { - LLMemType mt_rhe(LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS); LLFastTimer t(FTM_RENDER_UI); gPipeline.disableLights(); @@ -3717,8 +3679,6 @@ void render_hud_elements() void LLPipeline::renderHighlights() { - LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_HL); - assertInitialized(); // Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD) @@ -3785,7 +3745,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ; void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM); LLFastTimer t(FTM_RENDER_GEOMETRY); assertInitialized(); @@ -4050,7 +4009,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) void LLPipeline::renderGeomDeferred(LLCamera& camera) { LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred"); - LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED); LLFastTimer t(FTM_RENDER_GEOMETRY); LLFastTimer t2(FTM_DEFERRED_POOLS); @@ -4150,7 +4108,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) void LLPipeline::renderGeomPostDeferred(LLCamera& camera) { - LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF); LLFastTimer t(FTM_POST_DEFERRED_POOLS); U32 cur_type = 0; @@ -4247,7 +4204,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) void LLPipeline::renderGeomShadow(LLCamera& camera) { - LLMemType mt_rgs(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW); U32 cur_type = 0; LLGLEnable cull(GL_CULL_FACE); @@ -4401,16 +4357,14 @@ void LLPipeline::renderPhysicsDisplay() void LLPipeline::renderDebug() { - LLMemType mt(LLMemType::MTYPE_PIPELINE); - assertInitialized(); + gGL.color4f(1,1,1,1); gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); gGL.setColorMask(true, false); - bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); if (!hud_only && !mDebugBlips.empty()) @@ -4735,7 +4689,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools"); void LLPipeline::rebuildPools() { LLFastTimer t(FTM_REBUILD_POOLS); - LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS); assertInitialized(); @@ -4775,8 +4728,6 @@ void LLPipeline::rebuildPools() void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP); - assertInitialized(); switch( new_poolp->getType() ) @@ -4942,7 +4893,6 @@ void LLPipeline::removePool( LLDrawPool* poolp ) void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) { assertInitialized(); - LLMemType mt(LLMemType::MTYPE_PIPELINE); switch( poolp->getType() ) { case LLDrawPool::POOL_SIMPLE: @@ -6425,7 +6375,6 @@ void LLPipeline::doResetVertexBuffers() void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture) { - LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS); assertInitialized(); gGL.loadMatrix(gGLModelView); gGLLastMatrix = NULL; @@ -6501,7 +6450,6 @@ void LLPipeline::bindScreenToTexture() static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, bool tiling) { - LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM); if (!(gPipeline.canUseVertexShaders() && sRenderGlow)) { @@ -9599,7 +9547,6 @@ static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { - LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR); LLGLState::checkStates(); LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); @@ -10024,3 +9971,72 @@ void LLPipeline::addDebugBlip(const LLVector3& position, const LLColor4& color) mDebugBlips.push_back(blip); } +/* Singu Note: This is currently only used upstream by code that requires havok +void LLPipeline::hideObject( const LLUUID& id ) +{ + LLViewerObject *pVO = gObjectList.findObject( id ); + + if ( pVO ) + { + LLDrawable *pDrawable = pVO->mDrawable; + + if ( pDrawable ) + { + hideDrawable( pDrawable ); + } + } +} + +void LLPipeline::hideDrawable( LLDrawable *pDrawable ) +{ + pDrawable->setState( LLDrawable::FORCE_INVISIBLE ); + markRebuild( pDrawable, LLDrawable::REBUILD_ALL, TRUE ); + //hide the children + LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren(); + for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); + iter != child_list.end(); iter++ ) + { + LLViewerObject* child = *iter; + LLDrawable* drawable = child->mDrawable; + if ( drawable ) + { + drawable->setState( LLDrawable::FORCE_INVISIBLE ); + markRebuild( drawable, LLDrawable::REBUILD_ALL, TRUE ); + } + } +} + +void LLPipeline::unhideDrawable( LLDrawable *pDrawable ) +{ + pDrawable->clearState( LLDrawable::FORCE_INVISIBLE ); + markRebuild( pDrawable, LLDrawable::REBUILD_ALL, TRUE ); + //restore children + LLViewerObject::const_child_list_t& child_list = pDrawable->getVObj()->getChildren(); + for ( LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); + iter != child_list.end(); iter++) + { + LLViewerObject* child = *iter; + LLDrawable* drawable = child->mDrawable; + if ( drawable ) + { + drawable->clearState( LLDrawable::FORCE_INVISIBLE ); + markRebuild( drawable, LLDrawable::REBUILD_ALL, TRUE ); + } + } +} + +void LLPipeline::restoreHiddenObject( const LLUUID& id ) +{ + LLViewerObject *pVO = gObjectList.findObject( id ); + + if ( pVO ) + { + LLDrawable *pDrawable = pVO->mDrawable; + if ( pDrawable ) + { + unhideDrawable( pDrawable ); + } + } +} +*/ + diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index a0e89bbdf..b8ede8af7 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -397,6 +397,9 @@ public: void addDebugBlip(const LLVector3& position, const LLColor4& color); + void hideObject( const LLUUID& id ); + void restoreHiddenObject( const LLUUID& id ); + private: void unloadShaders(); void addToQuickLookup( LLDrawPool* new_poolp ); @@ -404,7 +407,8 @@ private: BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority); void assertInitializedDoError(); bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; }; - + void hideDrawable( LLDrawable *pDrawable ); + void unhideDrawable( LLDrawable *pDrawable ); public: enum {GPU_CLASS_MAX = 3 }; diff --git a/indra/newview/skins/Pony-Aquablue.xml b/indra/newview/skins/Pony-Aquablue.xml index 19e0c2e3a..28390db10 100644 --- a/indra/newview/skins/Pony-Aquablue.xml +++ b/indra/newview/skins/Pony-Aquablue.xml @@ -10,6 +10,6 @@ Game-style interface. Make your Second Life Viewer more like online games If you like it, there are still many other colors for you to choose. folder_name - Pony-Aquablue + ponyaquablue diff --git a/indra/newview/skins/Pony-Purple.xml b/indra/newview/skins/Pony-Purple.xml index 8e9e0eca0..2102573fe 100644 --- a/indra/newview/skins/Pony-Purple.xml +++ b/indra/newview/skins/Pony-Purple.xml @@ -10,6 +10,6 @@ Game-style interface. Make your Second Life Viewer more like online games If you like it, there are still many other colors for you to choose. folder_name - Pony-Purple + ponypurple diff --git a/indra/newview/skins/apollo/colors.xml b/indra/newview/skins/apollo/colors.xml index eb3cbaeb0..155efacee 100644 --- a/indra/newview/skins/apollo/colors.xml +++ b/indra/newview/skins/apollo/colors.xml @@ -62,7 +62,7 @@ - + @@ -152,8 +152,7 @@ - - + @@ -220,4 +219,7 @@ + + + diff --git a/indra/newview/skins/apollo/keywords.ini b/indra/newview/skins/apollo/keywords.ini new file mode 100644 index 000000000..5a85f42a1 --- /dev/null +++ b/indra/newview/skins/apollo/keywords.ini @@ -0,0 +1,894 @@ +llkeywords version 2 + +# sections +[word .648, .882, .179] +default Name of default state that all scripts must have +state Keyword to indicate state block or state transition + +# data types +[word .398, .847, .933] +integer Integer type +float Floating-point type +string String type +key Key type. Use NULL_KEY to test for empty keys +vector Vector type of 3 floats. Used to represent 3D motion, Euler angles, and color.:Access components by .x, .y. or .z +rotation Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y., .z, or .w +list List of various data types +quaternion Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y, .z, or .w + +# events +[word .398, .847, .933] +state_entry state_entry():Triggered on any state transition and startup +state_exit state_exit():Triggered on any state transition +touch_start touch_start(integer num_detected):Triggered by the start of agent clicking on task +touch touch(integer num_detected):Triggered while agent is clicking on task +touch_end touch_end(integer num_detected):Triggered when agent stops clicking on task +collision_start collision_start(integer num_detected):Triggered when task starts colliding with another task +collision collision(integer num_detected):Triggered while task is colliding with another task +collision_end collision_end(integer num_detected):Triggered when task stops colliding with another task +land_collision_start land_collision_start(vector pos):Triggered when task starts colliding with land +land_collision land_collision(vector pos):Triggered when task is colliding with land +land_collision_end land_collision_end(vector pos):Triggered when task stops colliding with land +timer timer():Result of the llSetTimerEvent library function call +listen listen(integer channel, string name, key id, string message):Result of the llListen library function call +sensor sensor(integer num_detected):Result of the llSensor library function call +no_sensor no_sensor():Result of the llSensor library function call +control control(key id, integer level, integer edge):Result of llTakeControls library function call +at_target at_target(integer tnum, vector targetpos, vector ourpos):Result of llTarget library function call +not_at_target not_at_target():Result of llTarget library function call +at_rot_target at_rot_target(integer tnum, rotation targetrot, rotation ourrot):Result of LLRotTarget library function call +not_at_rot_target not_at_rot_target():Result of LLRotTarget library function call +money money(key id, integer amount):Triggered when L$ is given to task +email email(string time, string address, string subj, string message, integer num_left):Triggered when task receives email +run_time_permissions run_time_permissions(integer perm):Triggered when an agent grants run time permissions to task +attach attach(key id):Triggered when task attaches or detaches from agent +dataserver dataserver(key queryid, string data):Triggered when task receives asynchronous data +moving_start moving_start():Triggered when task begins moving +moving_end moving_end():Triggered when task stops moving +on_rez on_rez(integer start_param):Triggered when task is rezzed in from inventory or another task +object_rez object_rez(key id):Triggered when task rezzes in another task +link_message link_message(integer sender_num, integer num, string str, key id):Triggered when task receives a link message via LLMessageLinked library function call +changed changed( integer change ):Triggered various event change the task:(test change with CHANGED_INVENTORY, CHANGED_COLOR, CHANGED_SHAPE, CHANGED_SCALE, CHANGED_TEXTURE, CHANGED_LINK, CHANGED_ALLOWED_DROP, CHANGED_OWNER, CHANGED_REGION, CHANGED_TELEPORT, CHANGED_REGION_START, CHANGED_MEDIA) +remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY) +http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests +http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL +transaction_result transaction_result(key id, integer success, string data):Triggered when task receives asynchronous data. +path_update path_update(integer type, list reserved):Triggered when the state of a pathfinder character changes. Note; "list reserved" is not currently used + +# integer constants +[word .679, .503, .996] +TRUE Integer constant for Boolean operations +FALSE Integer constant for Boolean operations +STATUS_PHYSICS Passed in the llSetStatus library function. If TRUE, object moves physically +STATUS_PHANTOM Passed in the llSetStatus library function. If TRUE, object doesn't collide with other objects +STATUS_ROTATE_X Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local X axis +STATUS_ROTATE_Y Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Y axis +STATUS_ROTATE_Z Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Z axis +STATUS_SANDBOX Passed in the llSetStatus library function. If TRUE, object can't cross region boundaries or move more than 10 meters from its start location +STATUS_BLOCK_GRAB Passed in the llSetStatus library function. If TRUE, object can't be grabbed and physically dragged +STATUS_BLOCK_GRAB_OBJECT This status flag keeps the object from being moved by grabs. This flag applies to the entire linkset +STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner +STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set +STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects + +AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME +AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name +AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username +ACTIVE Passed in llSensor library function to look for moving objects +PASSIVE Passed in llSensor library function to look for objects that aren't moving +SCRIPTED Passed in llSensor library function to look for scripted objects +CONTROL_FWD Passed to llTakeControls library function and used control event handler to test for agent forward control +CONTROL_BACK Passed to llTakeControls library function and used control event handler to test for agent back control +CONTROL_LEFT Passed to llTakeControls library function and used control event handler to test for agent left control +CONTROL_RIGHT Passed to llTakeControls library function and used control event handler to test for agent right control +CONTROL_ROT_LEFT Passed to llTakeControls library function and used control event handler to test for agent rotate left control +CONTROL_ROT_RIGHT Passed to llTakeControls library function and used control event handler to test for agent rotate right control +CONTROL_UP Passed to llTakeControls library function and used control event handler to test for agent up control +CONTROL_DOWN Passed to llTakeControls library function and used control event handler to test for agent down control +CONTROL_LBUTTON Passed to llTakeControls library function and used control event handler to test for agent left button control +CONTROL_ML_LBUTTON Passed to llTakeControls library function and used control event handler to test for agent left button control with the agent in mouse look +PERMISSION_DEBIT Passed to llRequestPermissions library function to request permission to take L$ from agent's account +PERMISSION_TAKE_CONTROLS Passed to llRequestPermissions library function to request permission to take agent's controls +# PERMISSION_REMAP_CONTROLS Passed to llRequestPermissions library function to request permission to remap agent's controls (not implemented yet) +PERMISSION_TRIGGER_ANIMATION Passed to llRequestPermissions library function to request permission to trigger animation on agent +PERMISSION_ATTACH Passed to llRequestPermissions library function to request permission to attach/detach from agent +# PERMISSION_RELEASE_OWNERSHIP Passed to llRequestPermissions library function to request permission to release ownership (not implemented) +PERMISSION_CHANGE_LINKS Passed to llRequestPermissions library function to request permission to change links +# PERMISSION_CHANGE_JOINTS Passed to llRequestPermissions library function to request permission to change joints (not implemented) +# PERMISSION_CHANGE_PERMISSIONS Passed to llRequestPermissions library function to request permission to change permissions +PERMISSION_TRACK_CAMERA Passed to llRequestPermissions library function to request permission to track agent's camera +PERMISSION_CONTROL_CAMERA Passed to llRequestPermissions library function to request permission to change agent's camera +PERMISSION_TELEPORT Passed to llRequestPermissions library function to request permission to teleport agent + +DEBUG_CHANNEL Chat channel reserved for debug and error messages from scripts +PUBLIC_CHANNEL Chat channel that broadcasts to all nearby users + +AGENT_FLYING Returned by llGetAgentInfo if the Agent is flying +AGENT_ATTACHMENTS Returned by llGetAgentInfo if the Agent has attachments +AGENT_SCRIPTED Returned by llGetAgentInfo if the Agent has scripted attachments +AGENT_SITTING Returned by llGetAgentInfo if the Agent is sitting +AGENT_ON_OBJECT Returned by llGetAgentInfo if the Agent is sitting on an object +AGENT_MOUSELOOK Returned by llGetAgentInfo if the Agent is in mouselook +AGENT_AWAY Returned by llGetAgentInfo if the Agent is in away mode +AGENT_WALKING Returned by llGetAgentInfo if the Agent is walking +AGENT_IN_AIR Returned by llGetAgentInfo if the Agent is in the air +AGENT_TYPING Returned by llGetAgentInfo if the Agent is typing +AGENT_CROUCHING Returned by llGetAgentInfo if the Agent is crouching +AGENT_BUSY Returned by llGetAgentInfo if the Agent is busy +AGENT_ALWAYS_RUN Returned by llGetAgentInfo if the Agent has 'Always Run' enabled +AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control + +AGENT_LIST_PARCEL Passed to llGetAgentList to return only agents on the same parcel where the script is running +AGENT_LIST_PARCEL_OWNER Passed to llGetAgentList to return only agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object +AGENT_LIST_REGION Passed to llGetAgentList to return any/all agents in the region + +PSYS_PART_FLAGS +PSYS_PART_START_COLOR +PSYS_PART_START_ALPHA +PSYS_PART_START_SCALE +PSYS_PART_END_COLOR +PSYS_PART_END_ALPHA +PSYS_PART_END_SCALE +PSYS_PART_MAX_AGE + +PSYS_PART_BOUNCE_MASK +PSYS_PART_WIND_MASK +PSYS_PART_INTERP_COLOR_MASK +PSYS_PART_INTERP_SCALE_MASK +PSYS_PART_FOLLOW_SRC_MASK +PSYS_PART_FOLLOW_VELOCITY_MASK +PSYS_PART_TARGET_POS_MASK +PSYS_PART_EMISSIVE_MASK +PSYS_PART_TARGET_LINEAR_MASK + +PSYS_SRC_PATTERN +PSYS_SRC_INNERANGLE Deprecated -- Use PSYS_SRC_ANGLE_BEGIN +PSYS_SRC_OUTERANGLE Deprecated -- Use PSYS_SRC_ANGLE_END +PSYS_SRC_ANGLE_BEGIN +PSYS_SRC_ANGLE_END +PSYS_SRC_BURST_RATE +PSYS_SRC_BURST_PART_COUNT +PSYS_SRC_BURST_RADIUS +PSYS_SRC_BURST_SPEED_MIN +PSYS_SRC_BURST_SPEED_MAX +PSYS_SRC_MAX_AGE +PSYS_SRC_ACCEL +PSYS_SRC_TEXTURE +PSYS_SRC_TARGET_KEY +PSYS_SRC_OMEGA + +PSYS_SRC_PATTERN_DROP +PSYS_SRC_PATTERN_EXPLODE +PSYS_SRC_PATTERN_ANGLE +PSYS_SRC_PATTERN_ANGLE_CONE +PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY + +OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type +OBJECT_NAME Used with llGetObjectDetails to get an object's name +OBJECT_DESC Used with llGetObjectDetails to get an object's description +OBJECT_POS Used with llGetObjectDetails to get an object's position +OBJECT_ROT Used with llGetObjectDetails to get an object's rotation +OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity +OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned +OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key +OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key +OBJECT_RUNNING_SCRIPT_COUNT Gets the number of running scripts attached to the object or agent +OBJECT_TOTAL_SCRIPT_COUNT Gets the number of scripts, both running and stopped, attached to the object or agent. +OBJECT_SCRIPT_MEMORY Gets the total amount of script memory allocated to the object or agent, in bytes. +OBJECT_SCRIPT_TIME Gets the total amount of average script CPU time used by the object or agent, in seconds. +OBJECT_PRIM_EQUIVALENCE Gets the prim equivalence of the object. +OBJECT_SERVER_COST Used with llGetObjectDetails to get the server cost. +OBJECT_STREAMING_COST Used with llGetObjectDetails to get the streaming (download) cost. +OBJECT_PHYSICS_COST Used with llGetObjectDetails to get the physics cost. +OBJECT_PATHFINDING_TYPE Used with llGetObjectDetails to get an object's pathfinding settings. +OPT_UNKNOWN Returned object pathfinding type by llGetObjectDetails for attachments, Linden trees and grass. +OPT_LEGACY_LINKSET Returned object pathfinding type by llGetObjectDetails for movable obstacles, movable phantoms, physical, and volumedetect objects. +OPT_AVATAR Returned object pathfinding type by llGetObjectDetails for avatars. +OPT_PATHFINDING_CHARACTER Returned object pathfinding type by llGetObjectDetails for pathfinding characters. +OPT_WALKABLE Returned object pathfinding type by llGetObjectDetails for walkable objects. +OPT_STATIC_OBSTACLE Returned object pathfinding type by llGetObjectDetails for static obstacles. +OPT_MATERIAL_VOLUME Returned object pathfinding type by llGetObjectDetails for material volumes. +OPT_EXCLUSION_VOLUME Returned object pathfinding type by llGetObjectDetails for exclusion volumes. + +# some vehicle params +VEHICLE_TYPE_NONE Used with llSetVehicleType to turn off vehicle support +VEHICLE_TYPE_SLED Used with llSetVehicleType to make a simple vehicle that bumps along the ground, and likes to move along its local x-axis +VEHICLE_TYPE_CAR Used with llSetVehicleType to make a vehicle that bounces along the ground but needs the motors to be driven from external controls or timer events +VEHICLE_TYPE_BOAT Used with llSetVehicleType to make a vehicle that hovers over water with lots of friction and some angular deflection +VEHICLE_TYPE_AIRPLANE Used with llSetVehicleType to make a vehicle that uses linear deflection for lift, and banking to turn, but doesn't hover +VEHICLE_TYPE_BALLOON Used with llSetVehicleType to make a vehicle that uses hover, and friction, but doesn't use deflection + +VEHICLE_REFERENCE_FRAME Rotation of vehicle axes relative to local frame + +VEHICLE_LINEAR_FRICTION_TIMESCALE A vector of timescales for exponential decay of linear velocity along the three vehicle axes +VEHICLE_ANGULAR_FRICTION_TIMESCALE A vector of timescales for exponential decay of angular velocity about the three vehicle axes +VEHICLE_LINEAR_MOTOR_DIRECTION The linear velocity that the vehicle will try to achieve +VEHICLE_LINEAR_MOTOR_OFFSET An offset from the center of mass of the vehicle where the linear motor is applied +VEHICLE_ANGULAR_MOTOR_DIRECTION The angular velocity that the vehicle will try to achieve + +VEHICLE_HOVER_HEIGHT The height the vehicle will try to hover +VEHICLE_HOVER_EFFICIENCY A slider between 0 (bouncy) and 1 (critically damped) hover behavior +VEHICLE_HOVER_TIMESCALE The period of time for the vehicle to achieve its hover height +VEHICLE_BUOYANCY A slider between 0 (no anti-gravity) and 1 (full anti-gravity) + +VEHICLE_LINEAR_DEFLECTION_EFFICIENCY A slider between 0 (no deflection) and 1 (maximum strength) +VEHICLE_LINEAR_DEFLECTION_TIMESCALE The exponential timescale for the vehicle to redirect its velocity to be along its x-axis + +VEHICLE_LINEAR_MOTOR_TIMESCALE The exponential timescale for the vehicle to achive its full linear motor velocity +VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE The exponential timescale for the linear motor's effectiveness to decay toward zero + +VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY A slider between 0 (no deflection) and 1 (maximum strength) +VEHICLE_ANGULAR_DEFLECTION_TIMESCALE The exponential timescale for the vehicle to achieve full angular deflection + +VEHICLE_ANGULAR_MOTOR_TIMESCALE The exponential timescale for the vehicle to achive its full angular motor velocity +VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE The exponential timescale for the angular motor's effectiveness to decay toward zero + +VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY A slider between 0 (bouncy) and 1 (critically damped) attraction of vehicle z-axis to world z-axis (vertical) +VEHICLE_VERTICAL_ATTRACTION_TIMESCALE The exponential timescale for the vehicle to align its z-axis to the world z-axis (vertical) + +VEHICLE_BANKING_EFFICIENCY A slider between -1 (leans out of turns), 0 (no banking), and +1 (leans into turns) +VEHICLE_BANKING_MIX A slider between 0 (static banking) and 1 (dynamic banking) +VEHICLE_BANKING_TIMESCALE The exponential timescale for the banking behavior to take full effect + +VEHICLE_FLAG_NO_DEFLECTION_UP Prevents linear deflection along world-z axis +VEHICLE_FLAG_LIMIT_ROLL_ONLY Removes vertical attraction for changes in vehicle pitch +VEHICLE_FLAG_HOVER_WATER_ONLY Hover only pays attention to water level +VEHICLE_FLAG_HOVER_TERRAIN_ONLY Hover only pays attention to terrain height +VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT Hover only pays attention to global height +VEHICLE_FLAG_HOVER_UP_ONLY Hover only pushes up +VEHICLE_FLAG_LIMIT_MOTOR_UP Prevents ground vehicles from motoring into the sky +VEHICLE_FLAG_MOUSELOOK_STEER Makes vehicle try to turn toward mouselook direction +VEHICLE_FLAG_MOUSELOOK_BANK Makes vehicle try to turn toward mouselook direction assuming banking is enabled +VEHICLE_FLAG_CAMERA_DECOUPLED Causes the camera look-at axis to NOT move when the vehicle rotates + +CAMERA_PITCH (-45 to 80) (Adjusts the angular amount that the camera aims straight ahead vs. straight down, maintaining the same distance. Analogous to 'incidence'.") +CAMERA_FOCUS_OFFSET (-10 to 10) A vector that adjusts the position of the camera focus position relative to the subject +CAMERA_POSITION_LAG (0.0 to 3.0) How much the camera lags as it tries to move towards its 'ideal' position +CAMERA_FOCUS_LAG (0.0 to 3.0) How much the camera lags as it tries to aim towards the subject +CAMERA_DISTANCE (0.5 to 10) Sets how far away the camera wants to be from its subject +CAMERA_BEHINDNESS_ANGLE (0 to 180) Sets the angle in degrees within which the camera is not constrained by changes in subject rotation +CAMERA_BEHINDNESS_LAG (0.0 to 3.0) Sets how strongly the camera is forced to stay behind the target if outside of behindness angle +CAMERA_POSITION_THRESHOLD (0.0 to 4.0) Sets the radius of a sphere around the camera's ideal position within which it is not affected by subject motion +CAMERA_FOCUS_THRESHOLD (0.0 to 4.0) Sets the radius of a sphere around the camera's subject position within which its focus is not affected by subject motion +CAMERA_ACTIVE (0 or 1) Turns on or off scripted control of the camera +CAMERA_POSITION Sets the position of the camera +CAMERA_FOCUS Sets the focus (target position) of the camera +CAMERA_POSITION_LOCKED (0 or 1) Locks the camera position so it will not move +CAMERA_FOCUS_LOCKED (0 or 1) Locks the camera focus so it will not move + +INVENTORY_TEXTURE Passed to task inventory library functions to reference textures +INVENTORY_SOUND Passed to task inventory library functions to reference sounds +INVENTORY_OBJECT Passed to task inventory library functions to reference objects +INVENTORY_SCRIPT Passed to task inventory library functions to reference scripts +INVENTORY_LANDMARK Passed to task inventory library functions to reference landmarks +INVENTORY_CLOTHING Passed to task inventory library functions to reference clothing +INVENTORY_NOTECARD Passed to task inventory library functions to reference notecards +INVENTORY_BODYPART Passed to task inventory library functions to reference body parts +INVENTORY_ANIMATION Passed to task inventory library functions to reference animations +INVENTORY_GESTURE Passed to task inventory library functions to reference gestures +INVENTORY_ALL Passed to task inventory library functions to reference all inventory items +INVENTORY_NONE Returned by llGetInventoryType when no item is found + +ATTACH_CHEST Passed to llAttachToAvatar to attach task to chest +ATTACH_HEAD Passed to llAttachToAvatar to attach task to head +ATTACH_LSHOULDER Passed to llAttachToAvatar to attach task to left shoulder +ATTACH_RSHOULDER Passed to llAttachToAvatar to attach task to right shoulder +ATTACH_LHAND Passed to llAttachToAvatar to attach task to left hand +ATTACH_RHAND Passed to llAttachToAvatar to attach task to right hand +ATTACH_LFOOT Passed to llAttachToAvatar to attach task to left foot +ATTACH_RFOOT Passed to llAttachToAvatar to attach task to right foot +ATTACH_BACK Passed to llAttachToAvatar to attach task to back +ATTACH_PELVIS Passed to llAttachToAvatar to attach task to pelvis +ATTACH_MOUTH Passed to llAttachToAvatar to attach task to mouth +ATTACH_CHIN Passed to llAttachToAvatar to attach task to chin +ATTACH_LEAR Passed to llAttachToAvatar to attach task to left ear +ATTACH_REAR Passed to llAttachToAvatar to attach task to right ear +ATTACH_LEYE Passed to llAttachToAvatar to attach task to left eye +ATTACH_REYE Passed to llAttachToAvatar to attach task to right eye +ATTACH_NOSE Passed to llAttachToAvatar to attach task to nose +ATTACH_RUARM Passed to llAttachToAvatar to attach task to right upper arm +ATTACH_RLARM Passed to llAttachToAvatar to attach task to right lower arm +ATTACH_LUARM Passed to llAttachToAvatar to attach task to left upper arm +ATTACH_LLARM Passed to llAttachToAvatar to attach task to left lower arm +ATTACH_RHIP Passed to llAttachToAvatar to attach task to right hip +ATTACH_RULEG Passed to llAttachToAvatar to attach task to right upper leg +ATTACH_RLLEG Passed to llAttachToAvatar to attach task to right lower leg +ATTACH_LHIP Passed to llAttachToAvatar to attach task to left hip +ATTACH_LULEG Passed to llAttachToAvatar to attach task to left upper leg +ATTACH_LLLEG Passed to llAttachToAvatar to attach task to left lower leg +ATTACH_BELLY Passed to llAttachToAvatar to attach task to belly +ATTACH_LEFT_PEC Passed to llAttachToAvatar to attach task to left pectoral +ATTACH_RIGHT_PEC Passed to llAttachToAvatar to attach task to right pectoral +ATTACH_HUD_BOTTOM Passed to llAttachToAvatar to attach task to bottom hud area +ATTACH_HUD_BOTTOM_LEFT Passed to llAttachToAvatar to attach task to bottom left hud area +ATTACH_HUD_BOTTOM_RIGHT Passed to llAttachToAvatar to attach task to bottom right hud area +ATTACH_HUD_CENTER_1 Passed to llAttachToAvatar to attach task to center 1 hud area +ATTACH_HUD_CENTER_2 Passed to llAttachToAvatar to attach task to center 2 hud area +ATTACH_HUD_TOP_CENTER Passed to llAttachToAvatar to attach task to top center hud area +ATTACH_HUD_TOP_LEFT Passed to llAttachToAvatar to attach task to top left hud area +ATTACH_HUD_TOP_RIGHT Passed to llAttachToAvatar to attach task to top right hud area +ATTACH_NECK Passed to llAttachToAvatar to attach task to neck +ATTACH_AVATAR_CENTER Passed to llAttachToAvatar to attach task to avatar center + +LAND_LEVEL Passed to llModifyLand to level terrain +LAND_RAISE Passed to llModifyLand to raise terrain +LAND_LOWER Passed to llModifyLand to lower terrain +LAND_SMOOTH Passed to llModifyLand to smooth terrain +LAND_NOISE Passed to llModifyLand to randomize terrain +LAND_REVERT Passed to llModifyLand to revert terrain toward original state +LAND_SMALL_BRUSH Passed to llModifyLand to modify small land areas +LAND_MEDIUM_BRUSH Passed to llModifyLand to modify medium land areas +LAND_LARGE_BRUSH Passed to llModifyLand to modify large land areas + +DATA_PAYINFO Passed to llRequestAgentData to get payment status of an agent +DATA_ONLINE Passed to llRequestAgentData to determine if agent is online +DATA_NAME Passed to llRequestAgentData to get full agent name +DATA_BORN Passed to llRequestAgentData to get born on date as a string +DATA_RATING Passed to llRequestAgentData to get a comma separated sting of integer ratings +DATA_SIM_POS Passed to llRequestSimulatorData to get a string (cast to vector) of a simulator's global position +DATA_SIM_STATUS Passed to llRequestSimulatorData to get the status of a simulator +DATA_SIM_RATING Passed to llRequestSimulatorData to get the rating of a simulator + +PAYMENT_INFO_ON_FILE Used with llRequestAgentData to tell if Agent is of "Payment Info On File" status +PAYMENT_INFO_USED Used with llRequestAgentData to tell if Agent is of "Payment Info Used" status + +ANIM_ON Enable texture animation +LOOP Loop when animating textures +REVERSE Animate in the reverse direction +PING_PONG Animate forward, then reverse +SMOOTH Textures slides, instead of stepping +ROTATE Rotates the texture, instead of using frames +SCALE Scales the texture, instead of using frames + +ALL_SIDES Passed to various texture and color library functions to modify all sides + +LINK_SET Passed to various link functions to modify all blocks in the object +LINK_ROOT Passed to various link functions to modify only the root block (no effect on single block objects) +LINK_ALL_OTHERS Passed to various link functions to modify all other blocks in the object +LINK_ALL_CHILDREN Passed to various link functions to modify all child blocks in the object +LINK_THIS Passed to various link functions to modify only the calling block + +CHANGED_INVENTORY Parameter of changed event handler used to indicate change to task's inventory +CHANGED_COLOR Parameter of changed event handler used to indicate change to task's color +CHANGED_SHAPE Parameter of changed event handler used to indicate change to task's shape parameters +CHANGED_SCALE Parameter of changed event handler used to indicate change to task's scale +CHANGED_TEXTURE Parameter of changed event handler used to indicate change to task's texture +CHANGED_LINK Parameter of changed event handler used to indicate change to task's link status +CHANGED_ALLOWED_DROP Parameter of changed event handler used to indicate a user dropped an inventory item:onto task that was allowed only by llAllowInventoryDrop function call +CHANGED_OWNER Parameter of changed event handler used to indicate change to task's owner ONLY when an object is sold as original or deeded to group +CHANGED_REGION Parameter of changed event handler used to indicate the region has changed +CHANGED_TELEPORT Parameter of changed event handler used to indicate teleport has completed +CHANGED_REGION_START Parameter of changed event handler used to indicate the region has been restarted +CHANGED_MEDIA Parameter of changed event handler used to indicate that media has changed on a face of the task + +TYPE_INTEGER Indicates that the list entry is holding an integer +TYPE_FLOAT Indicates that the list entry is holding an float +TYPE_STRING Indicates that the list entry is holding an string +TYPE_KEY Indicates that the list entry is holding an key +TYPE_VECTOR Indicates that the list entry is holding an vector +TYPE_ROTATION Indicates that the list entry is holding an rotation +TYPE_INVALID Indicates that this wasn't a valid list entry + + +REMOTE_DATA_CHANNEL Value of event_type in remote_event after successful llOpenRemoteDataChannel +REMOTE_DATA_REQUEST Value of event_type in remote_event if XML-RPC request is received +REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received + + +PRIM_NAME Sets the prim's name +PRIM_DESC Sets the prim's description +PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments +PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER +PRIM_PHYSICS Sets physics to TRUE or FALSE +PRIM_FLEXIBLE Followed by TRUE or FALSE, integer softness, float gravity, float friction, float wind, float tension, and vector force +PRIM_POINT_LIGHT Followed by TRUE or FALSE, vector color, float intensity, float radius, float falloff +PRIM_TEMP_ON_REZ Sets temporary on rez to TRUE or FALSE +PRIM_PHANTOM Sets phantom to TRUE or FALSE +PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an integer, but has no effect when set and always returns 0 if used in llGetPrimitiveParams +PRIM_POSITION Sets primitive position to a vector position +PRIM_SIZE Sets primitive size to a vector size +PRIM_ROTATION Sets primitive rotation +PRIM_TEXT Used to get or set the object's floating text. +PRIM_TEXTURE Followed by an integer face, key id, vector repeats, vector offsets,:and float rotation in radians +PRIM_COLOR Followed by an integer face, vector color, and float alpha +PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY_LOW,:PRIM_SHINY_MEDIUM, or PRIM_SHINY_HIGH,:and one of PRIM_BUMP_NONE, PRIM_BUMP_BRIGHT, PRIM_BUMP_DARK, etc +PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE +PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR +PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount +PRIM_POS_LOCAL Sets the prim's local position +PRIM_ROT_LOCAL Sets the prim's local rotation +PRIM_OMEGA Makes the object spin at the specified axis and rate +PRIM_LINK_TARGET Used to get or set multiple links with a single PrimParameters call. +PRIM_SLICE Get and set the 'slice' parameter of all shapes. Takes a vector parameter of the form + +PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear +PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear +PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear +PRIM_TYPE_SPHERE Followed by integer hole shape, vector cut, float hollow, vector twist,:and vector dimple +PRIM_TYPE_TORUS Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew +PRIM_TYPE_TUBE Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew +PRIM_TYPE_RING Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew +PRIM_TYPE_SCULPT Followed by a key/string texture uuid, and one of PRIM_SCULPT_TYPE_SPHERE, PRIM_SCULPT_TYPE_TORUS, PRIM_SCULPT_TYPE_PLANE, or PRIM_SCULPT_TYPE_CYLINDER + +PRIM_HOLE_DEFAULT Sets hole type to match the prim type +PRIM_HOLE_SQUARE Sets hole type to square +PRIM_HOLE_CIRCLE Sets hole type to circle +PRIM_HOLE_TRIANGLE Sets hole type to triangle + +PRIM_MATERIAL_STONE Sets material to stone +PRIM_MATERIAL_METAL Sets material to metal +PRIM_MATERIAL_GLASS Sets material to glass +PRIM_MATERIAL_WOOD Sets material to wood +PRIM_MATERIAL_FLESH Sets material to flesh +PRIM_MATERIAL_PLASTIC Sets material to plastic +PRIM_MATERIAL_RUBBER Sets material to rubber +PRIM_MATERIAL_LIGHT Sets material to light + +PRIM_SHINY_NONE No shininess +PRIM_SHINY_LOW Low shininess +PRIM_SHINY_MEDIUM Medium shininess +PRIM_SHINY_HIGH High shininess + +PRIM_BUMP_NONE No bump map +PRIM_BUMP_BRIGHT Generate bump map from highlights +PRIM_BUMP_DARK Generate bump map from lowlights +PRIM_BUMP_WOOD Wood bump map +PRIM_BUMP_BARK Bark bump map +PRIM_BUMP_BRICKS Brick bump map +PRIM_BUMP_CHECKER Checker bump map +PRIM_BUMP_CONCRETE Concrete bump map +PRIM_BUMP_TILE Tile bump map +PRIM_BUMP_STONE Stone bump map +PRIM_BUMP_DISKS Disk bump map +PRIM_BUMP_GRAVEL Gravel bump map +PRIM_BUMP_BLOBS Blob bump map +PRIM_BUMP_SIDING Siding bump map +PRIM_BUMP_LARGETILE Large tile bump map +PRIM_BUMP_STUCCO Stucco bump map +PRIM_BUMP_SUCTION Suction cup bump map +PRIM_BUMP_WEAVE Weave bump map + +PRIM_TEXGEN_DEFAULT Default texture mapping +PRIM_TEXGEN_PLANAR Planar texture mapping + +PRIM_SCULPT_TYPE_SPHERE Stitch edges in a sphere-like way +PRIM_SCULPT_TYPE_TORUS Stitch edges in a torus-like way +PRIM_SCULPT_TYPE_PLANE Do not stitch edges +PRIM_SCULPT_TYPE_CYLINDER Stitch edges in a cylinder-like way +PRIM_SCULPT_TYPE_MASK Mask used to determine stitching type +PRIM_SCULPT_FLAG_INVERT Flag to specify that the surface normals should be inverted +PRIM_SCULPT_FLAG_MIRROR Flag to specify that the prim should be reflected along X axis + +PRIM_PHYSICS_SHAPE_TYPE For primitive physics shape type. Followed with either PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_NONE or PRIM_PHYSICS_SHAPE_CONVEX. +PRIM_PHYSICS_SHAPE_PRIM Use the normal prim shape for physics (this is the default for all non-mesh objects) +PRIM_PHYSICS_SHAPE_NONE Use the convex hull of the prim shape for physics (this is the default for mesh objects) +PRIM_PHYSICS_SHAPE_CONVEX Ignore this prim in the physics shape. This cannot be applied to the root prim. + +MASK_BASE Base permissions +MASK_OWNER Owner permissions +MASK_GROUP Group permissions +MASK_EVERYONE Everyone permissions +MASK_NEXT Next owner permissions + +PERM_TRANSFER Transfer permission +PERM_MODIFY Modify permission +PERM_COPY Copy permission +PERM_MOVE Move permission +PERM_ALL Move/Modify/Copy/Transfer permissions + +PARCEL_MEDIA_COMMAND_STOP Stop media stream +PARCEL_MEDIA_COMMAND_PAUSE Pause media stream +PARCEL_MEDIA_COMMAND_PLAY Play media stream +PARCEL_MEDIA_COMMAND_LOOP Loop media stream +PARCEL_MEDIA_COMMAND_LOOP_SET Used to get or set the parcel's media loop duration +PARCEL_MEDIA_COMMAND_TEXTURE Get or set the parcel's media texture +PARCEL_MEDIA_COMMAND_URL Get or set the parcel's media url +PARCEL_MEDIA_COMMAND_TYPE Get or set the parcel's media mimetype +PARCEL_MEDIA_COMMAND_DESC Get or set the parcel's media description +PARCEL_MEDIA_COMMAND_TIME Set media stream to specific time +PARCEL_MEDIA_COMMAND_SIZE Get or set the parcel's media pixel resolution +PARCEL_MEDIA_COMMAND_AGENT Allows media stream commands to apply to only one agent +PARCEL_MEDIA_COMMAND_UNLOAD Unloads the media stream +PARCEL_MEDIA_COMMAND_AUTO_ALIGN Auto aligns the media stream to the texture size. May cause a performance hit and loss of some visual quality + +PAY_HIDE Used with llSetPayPrice to hide a button +PAY_DEFAULT Used with llSetPayPrice to use the default price for a button + +LIST_STAT_MAX Used with llListStatistics to find the largest number in a list +LIST_STAT_MIN Used with llListStatistics to find the smallest number in a list +LIST_STAT_MEAN Used with llListStatistics to find the mean of the numbers in a list +LIST_STAT_MEDIAN Used with llListStatistics to find the median of the numbers in a list +LIST_STAT_STD_DEV Used with llListStatistics to find the standard deviation of the numbers in a list +LIST_STAT_SUM Used with llListStatistics to find the sum of the numbers in a list +LIST_STAT_SUM_SQUARES Used with llListStatistics to find the sum of the squares of the numbers in a list +LIST_STAT_NUM_COUNT Used with llListStatistics to find how many numbers are in a list +LIST_STAT_GEOMETRIC_MEAN Used with llListStatistics to find the geometric mean of the numbers in a list (all numbers must be > 0) +LIST_STAT_RANGE Used with llListStatistics to find the range of the numbers in a list + +PARCEL_FLAG_ALLOW_FLY Used with llGetParcelFlags to find if a parcel allows flying +PARCEL_FLAG_ALLOW_GROUP_SCRIPTS Used with llGetParcelFlags to find if a parcel allows group scripts +PARCEL_FLAG_ALLOW_SCRIPTS Used with llGetParcelFlags to find if a parcel allows outside scripts +PARCEL_FLAG_ALLOW_LANDMARK Used with llGetParcelFlags to find if a parcel allows landmarks to be created +PARCEL_FLAG_ALLOW_TERRAFORM Used with llGetParcelFlags to find if a parcel allows anyone to terraform the land +PARCEL_FLAG_ALLOW_DAMAGE Used with llGetParcelFlags to find if a parcel allows damage +PARCEL_FLAG_ALLOW_CREATE_OBJECTS Used with llGetParcelFlags to find if a parcel allows anyone to create objects +PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS Used with llGetParcelFlags to find if a parcel allows group members or objects to create objects +PARCEL_FLAG_USE_ACCESS_GROUP Used with llGetParcelFlags to find if a parcel limits access to a group +PARCEL_FLAG_USE_ACCESS_LIST Used with llGetParcelFlags to find if a parcel limits access to a list of residents +PARCEL_FLAG_USE_BAN_LIST Used with llGetParcelFlags to find if a parcel uses a ban list +PARCEL_FLAG_USE_LAND_PASS_LIST Used with llGetParcelFlags to find if a parcel allows passes to be purchased +PARCEL_FLAG_LOCAL_SOUND_ONLY Used with llGetParcelFlags to find if a parcel restricts spacialized sound to the parcel +PARCEL_FLAG_RESTRICT_PUSHOBJECT Used with llGetParcelFlags to find if a parcel restricts llPushObject() calls +PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel allows all objects to enter +PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel only allows group (and owner) objects to enter + +REGION_FLAG_ALLOW_DAMAGE Used with llGetRegionFlags to find if a region is entirely damage enabled +REGION_FLAG_FIXED_SUN Used with llGetRegionFlags to find if a region has a fixed sun position +REGION_FLAG_BLOCK_TERRAFORM Used with llGetRegionFlags to find if a region terraforming disabled +REGION_FLAG_SANDBOX Used with llGetRegionFlags to find if a region is a sandbox +REGION_FLAG_DISABLE_COLLISIONS Used with llGetRegionFlags to find if a region has disabled collisions +REGION_FLAG_DISABLE_PHYSICS Used with llGetRegionFlags to find if a region has disabled physics +REGION_FLAG_BLOCK_FLY Used with llGetRegionFlags to find if a region blocks flying +REGION_FLAG_ALLOW_DIRECT_TELEPORT Used with llGetRegionFlags to find if a region allows direct teleports +REGION_FLAG_RESTRICT_PUSHOBJECT Used with llGetRegionFlags to find if a region restricts llPushObject() calls + +HTTP_METHOD Used with llHTTPRequest to specify the method, "GET", "POST", "PUT", or "DELETE" +HTTP_MIMETYPE Used with llHTTPRequest to specify the MIME type, defaults to "text/plain" +HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum response body to return +HTTP_VERIFY_CERT Used with llHTTPRequest to specify SSL certificate verification +HTTP_BODY_TRUNCATED Used with http_response to indicate truncation point in bytes +HTTP_VERBOSE_THROTTLE Used with llHTTPRequest to shout error messages to DEBUG_CHANNEL if the outgoing request rate exceeds the server limit. +HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum body size for the date returned from the request. Mono scripts can request from 1byte to 16k, non-mono scripts can request from 1byte to 4k. The default is 2k. + +PARCEL_COUNT_TOTAL Used with llGetParcelPrimCount to get the total number of prims on the parcel +PARCEL_COUNT_OWNER Used with llGetParcelPrimCount to get the number of prims on the parcel owned by the owner +PARCEL_COUNT_GROUP Used with llGetParcelPrimCount to get the number of prims on the parcel owned by the group +PARCEL_COUNT_OTHER Used with llGetParcelPrimCount to get the number of prims on the parcel owned by others +PARCEL_COUNT_SELECTED Used with llGetParcelPrimCount to get the number of prims on the parcel currently selected or sat upon +PARCEL_COUNT_TEMP Used with llGetParcelPrimCount to get the number of prims on the parcel that are temp on rez + +PARCEL_DETAILS_NAME Used with llGetParcelDetails to get the parcel name +PARCEL_DETAILS_DESC Used with llGetParcelDetails to get the parcel description +PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id +PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id +PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters +PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id +PARCEL_DETAILS_SEE_AVATARS Used with llGetParcelDetails to get the avatars visibility setting + +STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string +STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string +STRING_TRIM Used with llStringTrim to trim both leading and trailing spaces from a string + +CLICK_ACTION_NONE Used with llSetClickAction to disable the click action +CLICK_ACTION_TOUCH Used with llSetClickAction to set touch as the default action when object is clicked +CLICK_ACTION_SIT Used with llSetClickAction to set sit as the default action when object is clicked +CLICK_ACTION_BUY Used with llSetClickAction to set buy as the default action when object is clicked +CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default action when object is clicked +CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked +CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked +CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked +CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked + +TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid +TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid +TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid + +PRIM_MEDIA_ALT_IMAGE_ENABLE Used with ll{Get,Set}PrimMediaParams to enable the default alt image for media +PRIM_MEDIA_CONTROLS Used with ll{Get,Set}PrimMediaParams to determine the controls shown for media +PRIM_MEDIA_CURRENT_URL Used with ll{Get,Set}PrimMediaParams to navigate/access the current URL +PRIM_MEDIA_HOME_URL Used with ll{Get,Set}PrimMediaParams to access the home URL +PRIM_MEDIA_AUTO_LOOP Used with ll{Get,Set}PrimMediaParams to determine if media should auto-loop (if applicable) +PRIM_MEDIA_AUTO_PLAY Used with ll{Get,Set}PrimMediaParams to determine if media should start playing as soon as it is created +PRIM_MEDIA_AUTO_SCALE Used with ll{Get,Set}PrimMediaParams to determine if media should scale to fit the face it is on +PRIM_MEDIA_AUTO_ZOOM Used with ll{Get,Set}PrimMediaParams to determine if the user would zoom in when viewing media +PRIM_MEDIA_FIRST_CLICK_INTERACT Used with ll{Get,Set}PrimMediaParams to determine whether the user interacts with media or not when she first clicks it (versus selection) +PRIM_MEDIA_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's width in pixels +PRIM_MEDIA_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's height in pixels +PRIM_MEDIA_WHITELIST_ENABLE Used with ll{Get,Set}PrimMediaParams to determine if the domain whitelist is enabled +PRIM_MEDIA_WHITELIST Used with ll{Get,Set}PrimMediaParams to access the media's list of allowable URL prefixes to navigate to +PRIM_MEDIA_PERMS_INTERACT Used with ll{Get,Set}PrimMediaParams to determine the permissions for who can interact with the media +PRIM_MEDIA_PERMS_CONTROL Used with ll{Get,Set}PrimMediaParams to determine the permissions for who has controls +PRIM_MEDIA_PARAM_MAX The value of the largest media param + +PRIM_MEDIA_CONTROLS_STANDARD Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "standard controls" +PRIM_MEDIA_CONTROLS_MINI Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "mini controls" + +PRIM_MEDIA_PERM_NONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, no permissions +PRIM_MEDIA_PERM_OWNER Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, owner permissions +PRIM_MEDIA_PERM_GROUP Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, group permissions +PRIM_MEDIA_PERM_ANYONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, anyone has permissions + +PRIM_MEDIA_MAX_URL_LENGTH Used with ll{Get,Set}PrimMediaParams, the maximum length of PRIM_MEDIA_CURRENT_URL or PRIM_MEDIA_HOME_URL +PRIM_MEDIA_MAX_WHITELIST_SIZE Used with ll{Get,Set}PrimMediaParams, the maximum length, in bytes, of PRIM_MEDIA_WHITELIST +PRIM_MEDIA_MAX_WHITELIST_COUNT Used with ll{Get,Set}PrimMediaParams, the maximum number of items allowed in PRIM_MEDIA_WHITELIST +PRIM_MEDIA_MAX_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_WIDTH_PIXELS +PRIM_MEDIA_MAX_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_HEIGHT_PIXELS + +STATUS_OK Result of function call was success +STATUS_MALFORMED_PARAMS Function was called with malformed params +STATUS_TYPE_MISMATCH Argument(s) passed to function had a type mismatch +STATUS_BOUNDS_ERROR Argument(s) passed to function had a bounds error +STATUS_NOT_FOUND Object or other item was not found +STATUS_NOT_SUPPORTED Feature not supported +STATUS_INTERNAL_ERROR An internal error occurred +STATUS_WHITELIST_FAILED URL failed to pass whitelist + +PROFILE_NONE Disables profiling +PROFILE_SCRIPT_MEMORY Enables memory profiling + +RC_DATA_FLAGS Option for llCastRay() followed with a bitwise combination of RC_GET_NORMAL, RC_GET_ROOT_KEY and RC_GET_LINK_NUM. +RC_DETECT_PHANTOM Option for llCastRay() followed with TRUE to detect phantom AND volume detect objects, FASLE otherwise. +RC_GET_LINK_NUM Flag used in the RC_DATA_FLAGS mask to get link numbers in llCastRay() results. +RC_GET_NORMAL Flag used in the RC_DATA_FLAGS mask to get hit normals in llCastRay() results. +RC_GET_ROOT_KEY Flag used in the RC_DATA_FLAGS mask to get root keys in llCastRay() results. +RC_MAX_HITS Option for llCastRay() followed with an integer specifying the maximum number of hits to return (must be <= 256). +RC_REJECT_TYPES Option for llCastRay() used to ignore specific types of objects, followed with a bitwise combination of RC_REJECT_AGENTS, RC_REJECT_PHYSICAL, RC_REJECT_NONPHYSICAL and RC_REJECT_LAND. +RC_REJECT_AGENTS Flag used in the RC_REJECT_TYPES mask to reject agents in llCastRay(). +RC_REJECT_PHYSICAL Flag used in the RC_REJECT_TYPES mask to reject physical objects in llCastRay(). +RC_REJECT_NONPHYSICAL Flag used in the RC_REJECT_TYPES mask to reject non-physical objects in llCastRay(). +RC_REJECT_LAND Flag used in the RC_REJECT_TYPES mask to reject land in llCastRay(). + +RCERR_CAST_TIME_EXCEEDED Returned by llCastRay() when the raycast failed because the parcel or agent has exceeded the maximum time allowed for raycasting. +RCERR_SIM_PERF_LOW Returned by llCastRay() when the raycast failed because simulator performance is low. +RCERR_UNKNOWN Returned by llCastRay() when the raycast failed for an unspecified reason. + +ESTATE_ACCESS_ALLOWED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's allowed residents list. +ESTATE_ACCESS_ALLOWED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's allowed residents list. +ESTATE_ACCESS_ALLOWED_GROUP_ADD Used with llManageEstateAccess to add a group to this estate's allowed groups list. +ESTATE_ACCESS_ALLOWED_GROUP_REMOVE Used with llManageEstateAccess to remove a group from this estate's allowed groups list. +ESTATE_ACCESS_BANNED_AGENT_ADD Used with llManageEstateAccess to add an agent to this estate's banned residents list. +ESTATE_ACCESS_BANNED_AGENT_REMOVE Used with llManageEstateAccess to remove an agent from this estate's banned residents list. + +DENSITY For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the density. +FRICTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the friction. +RESTITUTION For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the restitution. +GRAVITY_MULTIPLIER For use with llSetPhysicsMaterial() as a bitwise value in its material_bits parameter, to set the gravity multiplier. + +SIM_STAT_PCT_CHARS_STEPPED Option for llGetSimStats() to return the % of pathfinding characters skipped each frame, averaged over the last minute. + +KFM_COMMAND Option for llSetKeyframedMotion(), followed by one of KFM_CMD_STOP, KFM_CMD_PLAY, KFM_CMD_PAUSE. Note that KFM_COMMAND must be the only option in the list, and cannot be specified in the same function call that sets the keyframes list. +KFM_CMD_PLAY Option for llSetKeyframedMotion(), used after KFM_COMMAND to play the motion. +KFM_CMD_STOP Option for llSetKeyframedMotion(), used after KFM_COMMAND to stop the motion. +KFM_CMD_PAUSE Option for llSetKeyframedMotion(), used after KFM_COMMAND to pause the motion. +KFM_MODE Option for llSetKeyframedMotion(), used to specify the playback mode, followed by one of KFM_FORWARD, KFM_LOOP, KFM_PING_PONG or KFM_REVERSE. +KFM_FORWARD Option for llSetKeyframedMotion(), used after KFM_MODE to specify the forward playback mode. +KFM_LOOP Option for llSetKeyframedMotion(), used after KFM_MODE to specify the loop playback mode. +KFM_PING_PONG Option for llSetKeyframedMotion(), used after KFM_MODE to specify the ping pong playback mode. +KFM_REVERSE Option for llSetKeyframedMotion(), used after KFM_MODE to specify the reverse playback mode. +KFM_DATA Option for llSetKeyframedMotion(), followed by a bitwise combination of KFM_TRANSLATION and KFM_ROTATION. If you specify one or the other, you should only include translations or rotations in your keyframe list. +KFM_ROTATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_TRANSLATION. +KFM_TRANSLATION Option for llSetKeyframedMotion(), used after KFM_DATA, possibly as a bitwise combination with KFM_ROTATION. + +CHARACTER_CMD_STOP Used with llExecCharacterCmd(). Makes the character jump. +CHARACTER_CMD_SMOOTH_STOP Used with llExecCharacterCmd(). Stops any current pathfinding operation in a smooth like fashion. +CHARACTER_CMD_JUMP Used with llExecCharacterCmd(). Stops any current pathfinding operation. + +CHARACTER_DESIRED_SPEED Speed of pursuit in meters per second. +CHARACTER_RADIUS Set collision capsule radius. +CHARACTER_LENGTH Set collision capsule length. +CHARACTER_ORIENTATION Set the character orientation. +CHARACTER_AVOIDANCE_MODE Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both. +CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES Defines if a character will attempt to catch up lost time if pathfinding performance is low. +PURSUIT_OFFSET Used with llPursue(). Go to a position offset from the target. +REQUIRE_LINE_OF_SIGHT Used with llPursue(). Define whether the character needs a physical line-of-sight to give chase. When enabled, the character will not pick a new target position while there is a something solid between the character and the target object/agent. +PURSUIT_FUZZ_FACTOR Used with llPursue(). Selects a random destination near the PURSUIT_OFFSET. The valid fuzz factor range is from 0 to 1, where 1 is most random. This option requires a nonzero PURSUIT_OFFSET. +PURSUIT_INTERCEPT Used with llPursue(). Define whether the character attempts to predict the target's future location. +PURSUIT_GOAL_TOLERANCE Used with llPursue(). Defines approximately how close the character must be to the current goal to consider itself to be at the desired position. The valid range is from 0.25 to 10m. +VERTICAL Constant to indicate that the orientation of the capsule for a Pathfinding character is vertical. +HORIZONTAL Constant to indicate that the orientation of the capsule for a Pathfinding character is horizontal. +AVOID_CHARACTERS TODO: add documentation +AVOID_DYNAMIC_OBSTACLES TODO: add documentation +AVOID_NONE TODO: add documentation + +PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer. +PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running +PU_FAILURE_INVALID_GOAL Goal is not on the navigation-mesh and cannot be reached. +PU_FAILURE_INVALID_START Character cannot navigate from the current location - e.g., the character is off the navmesh or too high above it. +PU_FAILURE_NO_VALID_DESTINATION There's no good place for the character to go - e.g., it is patrolling and all the patrol points are now unreachable. +PU_FAILURE_OTHER Unknown failure +PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer be tracked - e.g., it left the region or is an avatar that is now more than about 30m outside the region. +PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path. +PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering). +PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal. +PU_FAILURE_NO_NAVMESH Triggered if no navmesh is available for the region. +PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED Triggered when a character enters a region with dynamic pathfinding disabled. +PU_FAILURE_PARCEL_UNREACHABLE Triggered when a character failed to enter a parcel because it is not allowed to enter, e.g. because the parcel is already full or because object entry was disabled after the navmesh was baked. + +CHARACTER_TYPE Specifies which walkability coefficient will be used by this character. +CHARACTER_TYPE_A Used for character types that you prefer move in a way consistent with humanoids. +CHARACTER_TYPE_B Used for character types that you prefer move in a way consistent with wild animals or off road vehicles. +CHARACTER_TYPE_C Used for mechanical character types or road going vehicles. +CHARACTER_TYPE_D Used for character types that are not consistent with the A, B, or C type. +CHARACTER_TYPE_NONE Used to set no specific character type. + +TRAVERSAL_TYPE Controls the speed at which characters moves on terrain that is less than 100% walkable will move faster (e.g., a cat crossing a street) or slower (e.g., a car driving in a swamp). +TRAVERSAL_TYPE_SLOW TODO: add documentation +TRAVERSAL_TYPE_FAST TODO: add documentation +TRAVERSAL_TYPE_NONE TODO: add documentation + +CHARACTER_MAX_ACCEL The character's maximum acceleration rate. +CHARACTER_MAX_DECEL The character's maximum deceleration rate. +CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation +CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation +CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation +CHARACTER_DESIRED_TURN_SPEED The character's maximum speed while turning--note that this is only loosely enforced (i.e., a character may turn at higher speeds under certain conditions) +CHARACTER_MAX_TURN_RADIUS The character's turn radius when traveling at CHARACTER_DESIRED_TURN_SPEED. +CHARACTER_MAX_SPEED The character's maximum speed. Affects speed when avoiding dynamic obstacles and when traversing low-walkability objects in TRAVERSAL_TYPE_FAST mode. + +PATROL_PAUSE_AT_WAYPOINTS Used with llPatrolPoints(). Defines if characters slow down and momentarily pause at each waypoint. +WANDER_PAUSE_AT_WAYPOINTS Used with llWanderWithin(). Defines if characters should pause after reaching each wander waypoint. + +# --- OpenSim and Aurora-Sim constants Below --- +# OpenSim Constants (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\LSL_Constants.cs) +# Constants for cmWindlight (\OpenSim\Region\ScriptEngine\Shared\Api\Runtime\CM_Constants.cs) +CHANGED_ANIMATION OpenSim change event animation change detection. +CAMERA_FOCUS_OFFSET_X OpenSim enhancement for llSetCameraParams(), adjusts the camera focus x position relative to the target. (float) +CAMERA_FOCUS_OFFSET_Y OpenSim enhancement for llSetCameraParams(), adjusts the camera focus y position relative to the target. (float) +CAMERA_FOCUS_OFFSET_Z OpenSim enhancement for llSetCameraParams(), adjusts the camera focus z position relative to the target. (float) +CAMERA_POSITION_X OpenSim enhancement for llSetCameraParams(), sets camera x position in region coordinates. (float) +CAMERA_POSITION_Y OpenSim enhancement for llSetCameraParams(), sets camera y position in region coordinates. (float) +CAMERA_POSITION_Z OpenSim enhancement for llSetCameraParams(), sets camera z position in region coordinates. (float) +CAMERA_FOCUS_X OpenSim enhancement for llSetCameraParams(), sets camera x focus (target position) in region coordinates. (float) +CAMERA_FOCUS_Y OpenSim enhancement for llSetCameraParams(), sets camera y focus (target position) in region coordinates. (float) +CAMERA_FOCUS_Z OpenSim enhancement for llSetCameraParams(), sets camera z focus (target position) in region coordinates. (float) +OS_LISTEN_REGEX_NAME Value 0x1, process name parameter as regex +OS_LISTEN_REGEX_MESSAGE Value 0x2, process name parameter as regex +OS_ATTACH_MSG_ALL Used with osMessageAttachements +OS_ATTACH_MSG_INVERT_POINTS Used with osMessageAttachements +OS_ATTACH_MSG_OBJECT_CREATOR Used with osMessageAttachements +OS_ATTACH_MSG_SCRIPT_CREATOR Used with osMessageAttachements +PARCEL_DETAILS_CLAIMDATE Used with osSetParcelDetails +# osGetRegionStats +STATS_TIME_DILATION returned value from osGetRegionStats(), 1st of 21 items in returned list. +STATS_SIM_FPS returned value from osGetRegionStats(), 2nd of 21 items in returned list. +STATS_PHYSICS_FPS returned value from osGetRegionStats(), 3rd of 21 items in returned list. +STATS_AGENT_UPDATES returned value from osGetRegionStats(), 4th of 21 items in returned list. +STATS_ROOT_AGENTS returned value from osGetRegionStats(), 5th of 21 items in returned list. +STATS_CHILD_AGENTS returned value from osGetRegionStats(), 6th of 21 items in returned list. +STATS_TOTAL_PRIMS returned value from osGetRegionStats(), 7th of 21 items in returned list. +STATS_ACTIVE_PRIMS returned value from osGetRegionStats(), 8th of 21 items in returned list. +STATS_FRAME_MS returned value from osGetRegionStats(), 9th of 21 items in returned list. +STATS_NET_MS returned value from osGetRegionStats(), 10th of 21 items in returned list. +STATS_PHYSICS_MS returned value from osGetRegionStats(), 11th of 21 items in returned list. +STATS_IMAGE_MS returned value from osGetRegionStats(), 12th of 21 items in returned list. +STATS_OTHER_MS returned value from osGetRegionStats(), 13th of 21 items in returned list. +STATS_IN_PACKETS_PER_SECOND returned value from osGetRegionStats(), 14th of 21 items in returned list. +STATS_OUT_PACKETS_PER_SECOND returned value from osGetRegionStats(), 15th of 21 items in returned list. +STATS_UNACKED_BYTES returned value from osGetRegionStats(), 16th of 21 items in returned list. +STATS_AGENT_MS returned value from osGetRegionStats(), 17th of 21 items in returned list. +STATS_PENDING_DOWNLOADS returned value from osGetRegionStats(), 18th of 21 items in returned list. +STATS_PENDING_UPLOADS returned value from osGetRegionStats(), 19th of 21 items in returned list. +STATS_ACTIVE_SCRIPTS returned value from osGetRegionStats(), 20th of 21 items in returned list. +STATS_SCRIPT_LPS returned value from osGetRegionStats(), 21st of 21 items in returned list. +# OpenSim NPC +OS_NPC used by osNPC. Value 0x01000000 +OS_NPC_FLY used by osNPC. Value 0 +OS_NPC_NO_FLY used by osNPC. Value 1 +OS_NPC_LAND_AT_TARGET used by osNPC. Value 2 +OS_NPC_SIT_NOW used by osNPC. Value 0 +OS_NPC_CREATOR_OWNED used by osNPC. Value 0x1 +OS_NPC_NOT_OWNED used by osNPC. Value 0x2 +OS_NPC_SENSE_AS_AGENT used by osNPC. Value 0x4 +OS_NPC_RUNNING used by osNPC. Value 4 +# Windlight/Lightshare +WL_WATER_COLOR Windlight Water Colour +WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent +WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier +WL_REFLECTION_WAVELET_SCALE Windlight Reflection Wavelet Scale +WL_FRESNEL_SCALE Windlight Fresnel Scale +WL_FRESNEL_OFFSET Windlight Fresnel Offset +WL_REFRACT_SCALE_ABOVE Windlight Refract Scale Above +WL_REFRACT_SCALE_BELOW Windlight Refract Scale Below +WL_BLUR_MULTIPLIER Windlight Blur Multiplier +WL_BIG_WAVE_DIRECTION Windlight Big Wave Direction +WL_LITTLE_WAVE_DIRECTION Windlight Little Wave Direction +WL_NORMAL_MAP_TEXTURE Windlight Normal Map Texture +WL_HORIZON Windlight Horizon Colour +WL_HAZE_HORIZON Windlight Haze Horizon +WL_BLUE_DENSITY Windlight Blue Density +WL_HAZE_DENSITY Windlight Haze Density +WL_DENSITY_MULTIPLIER Windlight Density Multiplier +WL_DISTANCE_MULTIPLIER Windlight Distance Multiplier +WL_MAX_ALTITUDE Windlight Max Altitude +WL_SUN_MOON_COLOR Windlight Sun/Moon Colour +WL_SUN_MOON_POSITION Windlight Sun/Moon Position +WL_AMBIENT Windlight Ambient Colour +WL_EAST_ANGLE Windlight Sun/Position East +WL_SUN_GLOW_FOCUS Windlight Sun Glow Focus +WL_SUN_GLOW_SIZE Windlight Sun Glow Size +WL_SCENE_GAMMA Windlight Scene Gamma +WL_STAR_BRIGHTNESS Windlight Star Brightness +WL_CLOUD_COLOR Windlight Cloud Colour +WL_CLOUD_XY_DENSITY Windlight Cloud X/Y/Density +WL_CLOUD_COVERAGE Windlight Cloud Coverage +WL_CLOUD_SCALE Windlight Cloud Scale +WL_CLOUD_DETAIL_XY_DENSITY Windlight Cloud Detail X/Y/Density +WL_CLOUD_SCROLL_X Windlight Cloud Scroll X +WL_CLOUD_SCROLL_Y Windlight Cloud Scroll Y +WL_CLOUD_SCROLL_Y_LOCK Windlight Cloud Scroll Y Lock +WL_CLOUD_SCROLL_X_LOCK Windlight Cloud Scroll X Lock +WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds +# WL Constants added unique to Aurora-Sim +WL_OK Value -1 +WL_ERROR Value -2 +WL_ERROR_NO_SCENE_SET Value -3 +WL_ERROR_SCENE_MUST_BE_STATIC Value -4 +WL_ERROR_SCENE_MUST_NOT_BE_STATIC Value -5 +WL_ERROR_BAD_SETTING Value -6 +WL_ERROR_NO_PRESET_FOUND Value -7 +# Aurora-Sim Constants (\Aurora\AuroraDotNetEngine\APIs\AA_Constants.cs) +ENABLE_GRAVITY enable_gravity. +GRAVITY_FORCE_X gravity_force_x. +GRAVITY_FORCE_Y gravity_force_y. +GRAVITY_FORCE_Z gravity_force_z. +ADD_GRAVITY_POINT add_gravity_point. +ADD_GRAVITY_FORCE add_gravity_force. +START_TIME_REVERSAL_SAVING start_time_reversal_saving. +STOP_TIME_REVERSAL_SAVING stop_time_reversal_saving. +START_TIME_REVERSAL start_time_reversal. +STOP_TIME_REVERSAL stop_time_reversal. +# Aurora botFunctions +BOT_FOLLOW_FLAG_NONE value 0. +BOT_FOLLOW_FLAG_INDEFINITELY value 1. +BOT_TAG_FIND_ALL value AllBots. +BOT_FOLLOW_WALK value 0. +BOT_FOLLOW_RUN value 1. +BOT_FOLLOW_FLY value 2. +BOT_FOLLOW_TELEPORT value 3. +BOT_FOLLOW_WAIT value 4. +BOT_FOLLOW_TRIGGER_HERE_EVENT value 1. +BOT_FOLLOW_FLAG_FORCEDIRECTPATH value 4. + +# string constants +[word .679, .503, .996] +NULL_KEY Indicates an empty key +EOF Indicates the last line of a notecard was read +TEXTURE_BLANK UUID for the "Blank" texture +TEXTURE_DEFAULT Alias for TEXTURE_PLYWOOD +TEXTURE_MEDIA UUID for the "Default Media" texture +TEXTURE_PLYWOOD UUID for the default "Plywood" texture +TEXTURE_TRANSPARENT UUID for the "White - Transparent" texture + +URL_REQUEST_GRANTED Used with http_request when a public URL is successfully granted +URL_REQUEST_DENIED Used with http_request when a public URL is not available + +# float constants +[word .679, .503, .996] +PI 3.1415926535897932384626433832795 +TWO_PI 6.283185307179586476925286766559 +PI_BY_TWO 1.5707963267948966192313216916398 +DEG_TO_RAD To convert from degrees to radians +RAD_TO_DEG To convert from radians to degrees +SQRT2 1.4142135623730950488016887242097 + +# compound constants +[word .679, .503, .996] +ZERO_VECTOR <0.0, 0.0, 0.0> +ZERO_ROTATION <0.0, 0.0, 0.0, 1.0> + + +# flow control keywords +[word .972, .148, .445] +for for loop:for (initializer; test; iteration):{: statements:} +do do loop:do:{: statements:} while (test); +while while loop:while (test):{ statements:} +if if statement:if (test):{ statements:} +else else clause:if (test):{ statements:}:else:{ statements:} +jump jump statement:jump label;: +return Leave current function or event handler + +# flow control label +[line .972, .148, .445] +@ Label:Target for jump statement + +# Comment +[one_sided_delimiter .457, .441, .367] +// Comment:Non-functional commentary or disabled code +[two_sided_delimiter_esc .457, .441, .367] +/* */ Comment:Non-functional commentary or disabled code + +# String literals +[two_sided_delimiter_esc .989, .855, .453] +" " String literal + +#functions are supplied by the program now diff --git a/indra/newview/skins/blackdark.xml b/indra/newview/skins/blackdark.xml index 8f83e11f1..f00a3fea0 100644 --- a/indra/newview/skins/blackdark.xml +++ b/indra/newview/skins/blackdark.xml @@ -9,6 +9,6 @@ skin_info folder_name - Blackdark + blackdark diff --git a/indra/newview/skins/Blackdark/colors.xml b/indra/newview/skins/blackdark/colors.xml similarity index 100% rename from indra/newview/skins/Blackdark/colors.xml rename to indra/newview/skins/blackdark/colors.xml diff --git a/indra/newview/skins/Blackdark/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga b/indra/newview/skins/blackdark/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga rename to indra/newview/skins/blackdark/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga diff --git a/indra/newview/skins/Blackdark/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga b/indra/newview/skins/blackdark/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga rename to indra/newview/skins/blackdark/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga diff --git a/indra/newview/skins/Blackdark/textures/5748decc-f629-461c-9a36-a35a221fe21f.tga b/indra/newview/skins/blackdark/textures/5748decc-f629-461c-9a36-a35a221fe21f.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/5748decc-f629-461c-9a36-a35a221fe21f.tga rename to indra/newview/skins/blackdark/textures/5748decc-f629-461c-9a36-a35a221fe21f.tga diff --git a/indra/newview/skins/Blackdark/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga b/indra/newview/skins/blackdark/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga rename to indra/newview/skins/blackdark/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga diff --git a/indra/newview/skins/Blackdark/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga b/indra/newview/skins/blackdark/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga rename to indra/newview/skins/blackdark/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga diff --git a/indra/newview/skins/Blackdark/textures/89e9fc7c-0b16-457d-be4f-136270759c4d.tga b/indra/newview/skins/blackdark/textures/89e9fc7c-0b16-457d-be4f-136270759c4d.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/89e9fc7c-0b16-457d-be4f-136270759c4d.tga rename to indra/newview/skins/blackdark/textures/89e9fc7c-0b16-457d-be4f-136270759c4d.tga diff --git a/indra/newview/skins/Blackdark/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga b/indra/newview/skins/blackdark/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga rename to indra/newview/skins/blackdark/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga diff --git a/indra/newview/skins/Blackdark/textures/active_speakers.tga b/indra/newview/skins/blackdark/textures/active_speakers.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/active_speakers.tga rename to indra/newview/skins/blackdark/textures/active_speakers.tga diff --git a/indra/newview/skins/Blackdark/textures/active_voice_tab.tga b/indra/newview/skins/blackdark/textures/active_voice_tab.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/active_voice_tab.tga rename to indra/newview/skins/blackdark/textures/active_voice_tab.tga diff --git a/indra/newview/skins/Blackdark/textures/arrow_down.tga b/indra/newview/skins/blackdark/textures/arrow_down.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/arrow_down.tga rename to indra/newview/skins/blackdark/textures/arrow_down.tga diff --git a/indra/newview/skins/Blackdark/textures/arrow_up.tga b/indra/newview/skins/blackdark/textures/arrow_up.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/arrow_up.tga rename to indra/newview/skins/blackdark/textures/arrow_up.tga diff --git a/indra/newview/skins/Blackdark/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga b/indra/newview/skins/blackdark/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga rename to indra/newview/skins/blackdark/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga diff --git a/indra/newview/skins/Blackdark/textures/badge_error.j2c b/indra/newview/skins/blackdark/textures/badge_error.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/badge_error.j2c rename to indra/newview/skins/blackdark/textures/badge_error.j2c diff --git a/indra/newview/skins/Blackdark/textures/badge_note.j2c b/indra/newview/skins/blackdark/textures/badge_note.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/badge_note.j2c rename to indra/newview/skins/blackdark/textures/badge_note.j2c diff --git a/indra/newview/skins/Blackdark/textures/badge_ok.j2c b/indra/newview/skins/blackdark/textures/badge_ok.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/badge_ok.j2c rename to indra/newview/skins/blackdark/textures/badge_ok.j2c diff --git a/indra/newview/skins/Blackdark/textures/badge_warn.j2c b/indra/newview/skins/blackdark/textures/badge_warn.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/badge_warn.j2c rename to indra/newview/skins/blackdark/textures/badge_warn.j2c diff --git a/indra/newview/skins/Blackdark/textures/black.tga b/indra/newview/skins/blackdark/textures/black.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/black.tga rename to indra/newview/skins/blackdark/textures/black.tga diff --git a/indra/newview/skins/Blackdark/textures/btn_chatbar.tga b/indra/newview/skins/blackdark/textures/btn_chatbar.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/btn_chatbar.tga rename to indra/newview/skins/blackdark/textures/btn_chatbar.tga diff --git a/indra/newview/skins/Blackdark/textures/btn_chatbar_selected.tga b/indra/newview/skins/blackdark/textures/btn_chatbar_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/btn_chatbar_selected.tga rename to indra/newview/skins/blackdark/textures/btn_chatbar_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/button_anim_pause.tga b/indra/newview/skins/blackdark/textures/button_anim_pause.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_anim_pause.tga rename to indra/newview/skins/blackdark/textures/button_anim_pause.tga diff --git a/indra/newview/skins/Blackdark/textures/button_anim_pause_selected.tga b/indra/newview/skins/blackdark/textures/button_anim_pause_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_anim_pause_selected.tga rename to indra/newview/skins/blackdark/textures/button_anim_pause_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/button_anim_play.tga b/indra/newview/skins/blackdark/textures/button_anim_play.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_anim_play.tga rename to indra/newview/skins/blackdark/textures/button_anim_play.tga diff --git a/indra/newview/skins/Blackdark/textures/button_anim_play_selected.tga b/indra/newview/skins/blackdark/textures/button_anim_play_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_anim_play_selected.tga rename to indra/newview/skins/blackdark/textures/button_anim_play_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/button_anim_stop.tga b/indra/newview/skins/blackdark/textures/button_anim_stop.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_anim_stop.tga rename to indra/newview/skins/blackdark/textures/button_anim_stop.tga diff --git a/indra/newview/skins/Blackdark/textures/button_anim_stop_selected.tga b/indra/newview/skins/blackdark/textures/button_anim_stop_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_anim_stop_selected.tga rename to indra/newview/skins/blackdark/textures/button_anim_stop_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/button_disabled_32x128.tga b/indra/newview/skins/blackdark/textures/button_disabled_32x128.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_disabled_32x128.tga rename to indra/newview/skins/blackdark/textures/button_disabled_32x128.tga diff --git a/indra/newview/skins/Blackdark/textures/button_enabled_32x128.tga b/indra/newview/skins/blackdark/textures/button_enabled_32x128.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_enabled_32x128.tga rename to indra/newview/skins/blackdark/textures/button_enabled_32x128.tga diff --git a/indra/newview/skins/Blackdark/textures/button_enabled_selected_32x128.tga b/indra/newview/skins/blackdark/textures/button_enabled_selected_32x128.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/button_enabled_selected_32x128.tga rename to indra/newview/skins/blackdark/textures/button_enabled_selected_32x128.tga diff --git a/indra/newview/skins/Blackdark/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga b/indra/newview/skins/blackdark/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga rename to indra/newview/skins/blackdark/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga diff --git a/indra/newview/skins/Blackdark/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga b/indra/newview/skins/blackdark/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga rename to indra/newview/skins/blackdark/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga diff --git a/indra/newview/skins/Blackdark/textures/cam_rotate_in.tga b/indra/newview/skins/blackdark/textures/cam_rotate_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/cam_rotate_in.tga rename to indra/newview/skins/blackdark/textures/cam_rotate_in.tga diff --git a/indra/newview/skins/Blackdark/textures/cam_rotate_out.tga b/indra/newview/skins/blackdark/textures/cam_rotate_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/cam_rotate_out.tga rename to indra/newview/skins/blackdark/textures/cam_rotate_out.tga diff --git a/indra/newview/skins/Blackdark/textures/cam_tracking_in.tga b/indra/newview/skins/blackdark/textures/cam_tracking_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/cam_tracking_in.tga rename to indra/newview/skins/blackdark/textures/cam_tracking_in.tga diff --git a/indra/newview/skins/Blackdark/textures/cam_tracking_out.tga b/indra/newview/skins/blackdark/textures/cam_tracking_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/cam_tracking_out.tga rename to indra/newview/skins/blackdark/textures/cam_tracking_out.tga diff --git a/indra/newview/skins/Blackdark/textures/cam_zoom_minus_in.tga b/indra/newview/skins/blackdark/textures/cam_zoom_minus_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/cam_zoom_minus_in.tga rename to indra/newview/skins/blackdark/textures/cam_zoom_minus_in.tga diff --git a/indra/newview/skins/Blackdark/textures/cam_zoom_out.tga b/indra/newview/skins/blackdark/textures/cam_zoom_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/cam_zoom_out.tga rename to indra/newview/skins/blackdark/textures/cam_zoom_out.tga diff --git a/indra/newview/skins/Blackdark/textures/cam_zoom_plus_in.tga b/indra/newview/skins/blackdark/textures/cam_zoom_plus_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/cam_zoom_plus_in.tga rename to indra/newview/skins/blackdark/textures/cam_zoom_plus_in.tga diff --git a/indra/newview/skins/Blackdark/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga b/indra/newview/skins/blackdark/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga rename to indra/newview/skins/blackdark/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga diff --git a/indra/newview/skins/Blackdark/textures/checkbox_disabled_false.tga b/indra/newview/skins/blackdark/textures/checkbox_disabled_false.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/checkbox_disabled_false.tga rename to indra/newview/skins/blackdark/textures/checkbox_disabled_false.tga diff --git a/indra/newview/skins/Blackdark/textures/checkbox_disabled_true.tga b/indra/newview/skins/blackdark/textures/checkbox_disabled_true.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/checkbox_disabled_true.tga rename to indra/newview/skins/blackdark/textures/checkbox_disabled_true.tga diff --git a/indra/newview/skins/Blackdark/textures/checkbox_enabled_false.tga b/indra/newview/skins/blackdark/textures/checkbox_enabled_false.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/checkbox_enabled_false.tga rename to indra/newview/skins/blackdark/textures/checkbox_enabled_false.tga diff --git a/indra/newview/skins/Blackdark/textures/checkbox_enabled_true.tga b/indra/newview/skins/blackdark/textures/checkbox_enabled_true.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/checkbox_enabled_true.tga rename to indra/newview/skins/blackdark/textures/checkbox_enabled_true.tga diff --git a/indra/newview/skins/Blackdark/textures/circle.tga b/indra/newview/skins/blackdark/textures/circle.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/circle.tga rename to indra/newview/skins/blackdark/textures/circle.tga diff --git a/indra/newview/skins/Blackdark/textures/close_in_blue.tga b/indra/newview/skins/blackdark/textures/close_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/close_in_blue.tga rename to indra/newview/skins/blackdark/textures/close_in_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/close_inactive.tga b/indra/newview/skins/blackdark/textures/close_inactive.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/close_inactive.tga rename to indra/newview/skins/blackdark/textures/close_inactive.tga diff --git a/indra/newview/skins/Blackdark/textures/close_inactive_blue.tga b/indra/newview/skins/blackdark/textures/close_inactive_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/close_inactive_blue.tga rename to indra/newview/skins/blackdark/textures/close_inactive_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/closebox.tga b/indra/newview/skins/blackdark/textures/closebox.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/closebox.tga rename to indra/newview/skins/blackdark/textures/closebox.tga diff --git a/indra/newview/skins/Blackdark/textures/combobox_arrow.tga b/indra/newview/skins/blackdark/textures/combobox_arrow.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/combobox_arrow.tga rename to indra/newview/skins/blackdark/textures/combobox_arrow.tga diff --git a/indra/newview/skins/Blackdark/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c b/indra/newview/skins/blackdark/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c rename to indra/newview/skins/blackdark/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c diff --git a/indra/newview/skins/Blackdark/textures/darkgray.tga b/indra/newview/skins/blackdark/textures/darkgray.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/darkgray.tga rename to indra/newview/skins/blackdark/textures/darkgray.tga diff --git a/indra/newview/skins/Blackdark/textures/default_land_picture.j2c b/indra/newview/skins/blackdark/textures/default_land_picture.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/default_land_picture.j2c rename to indra/newview/skins/blackdark/textures/default_land_picture.j2c diff --git a/indra/newview/skins/Blackdark/textures/default_profile_picture.j2c b/indra/newview/skins/blackdark/textures/default_profile_picture.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/default_profile_picture.j2c rename to indra/newview/skins/blackdark/textures/default_profile_picture.j2c diff --git a/indra/newview/skins/Blackdark/textures/direction_arrow.tga b/indra/newview/skins/blackdark/textures/direction_arrow.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/direction_arrow.tga rename to indra/newview/skins/blackdark/textures/direction_arrow.tga diff --git a/indra/newview/skins/Blackdark/textures/down_arrow.png b/indra/newview/skins/blackdark/textures/down_arrow.png similarity index 100% rename from indra/newview/skins/Blackdark/textures/down_arrow.png rename to indra/newview/skins/blackdark/textures/down_arrow.png diff --git a/indra/newview/skins/Blackdark/textures/eye_button_active.tga b/indra/newview/skins/blackdark/textures/eye_button_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/eye_button_active.tga rename to indra/newview/skins/blackdark/textures/eye_button_active.tga diff --git a/indra/newview/skins/Blackdark/textures/eye_button_inactive.tga b/indra/newview/skins/blackdark/textures/eye_button_inactive.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/eye_button_inactive.tga rename to indra/newview/skins/blackdark/textures/eye_button_inactive.tga diff --git a/indra/newview/skins/Blackdark/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga b/indra/newview/skins/blackdark/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga rename to indra/newview/skins/blackdark/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga diff --git a/indra/newview/skins/Blackdark/textures/ff_edit_mine_button.tga b/indra/newview/skins/blackdark/textures/ff_edit_mine_button.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ff_edit_mine_button.tga rename to indra/newview/skins/blackdark/textures/ff_edit_mine_button.tga diff --git a/indra/newview/skins/Blackdark/textures/ff_edit_theirs_button.tga b/indra/newview/skins/blackdark/textures/ff_edit_theirs_button.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ff_edit_theirs_button.tga rename to indra/newview/skins/blackdark/textures/ff_edit_theirs_button.tga diff --git a/indra/newview/skins/Blackdark/textures/ff_online_status_button.tga b/indra/newview/skins/blackdark/textures/ff_online_status_button.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ff_online_status_button.tga rename to indra/newview/skins/blackdark/textures/ff_online_status_button.tga diff --git a/indra/newview/skins/Blackdark/textures/ff_visible_map_button.tga b/indra/newview/skins/blackdark/textures/ff_visible_map_button.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ff_visible_map_button.tga rename to indra/newview/skins/blackdark/textures/ff_visible_map_button.tga diff --git a/indra/newview/skins/Blackdark/textures/ff_visible_online_button.tga b/indra/newview/skins/blackdark/textures/ff_visible_online_button.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ff_visible_online_button.tga rename to indra/newview/skins/blackdark/textures/ff_visible_online_button.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_btn_left.tga b/indra/newview/skins/blackdark/textures/flyout_btn_left.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_btn_left.tga rename to indra/newview/skins/blackdark/textures/flyout_btn_left.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_btn_left_disabled.tga b/indra/newview/skins/blackdark/textures/flyout_btn_left_disabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_btn_left_disabled.tga rename to indra/newview/skins/blackdark/textures/flyout_btn_left_disabled.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_btn_left_selected.tga b/indra/newview/skins/blackdark/textures/flyout_btn_left_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_btn_left_selected.tga rename to indra/newview/skins/blackdark/textures/flyout_btn_left_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_btn_right.tga b/indra/newview/skins/blackdark/textures/flyout_btn_right.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_btn_right.tga rename to indra/newview/skins/blackdark/textures/flyout_btn_right.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_btn_right_disabled.tga b/indra/newview/skins/blackdark/textures/flyout_btn_right_disabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_btn_right_disabled.tga rename to indra/newview/skins/blackdark/textures/flyout_btn_right_disabled.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_btn_right_selected.tga b/indra/newview/skins/blackdark/textures/flyout_btn_right_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_btn_right_selected.tga rename to indra/newview/skins/blackdark/textures/flyout_btn_right_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_left.tga b/indra/newview/skins/blackdark/textures/flyout_left.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_left.tga rename to indra/newview/skins/blackdark/textures/flyout_left.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_left_disabled.tga b/indra/newview/skins/blackdark/textures/flyout_left_disabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_left_disabled.tga rename to indra/newview/skins/blackdark/textures/flyout_left_disabled.tga diff --git a/indra/newview/skins/Blackdark/textures/flyout_left_selected.tga b/indra/newview/skins/blackdark/textures/flyout_left_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/flyout_left_selected.tga rename to indra/newview/skins/blackdark/textures/flyout_left_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/folder_arrow.tga b/indra/newview/skins/blackdark/textures/folder_arrow.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/folder_arrow.tga rename to indra/newview/skins/blackdark/textures/folder_arrow.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_active-speakers-dot-lvl0.tga b/indra/newview/skins/blackdark/textures/icn_active-speakers-dot-lvl0.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_active-speakers-dot-lvl0.tga rename to indra/newview/skins/blackdark/textures/icn_active-speakers-dot-lvl0.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_active-speakers-dot-lvl1.tga b/indra/newview/skins/blackdark/textures/icn_active-speakers-dot-lvl1.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_active-speakers-dot-lvl1.tga rename to indra/newview/skins/blackdark/textures/icn_active-speakers-dot-lvl1.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_active-speakers-dot-lvl2.tga b/indra/newview/skins/blackdark/textures/icn_active-speakers-dot-lvl2.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_active-speakers-dot-lvl2.tga rename to indra/newview/skins/blackdark/textures/icn_active-speakers-dot-lvl2.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_active-speakers-typing1.tga b/indra/newview/skins/blackdark/textures/icn_active-speakers-typing1.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_active-speakers-typing1.tga rename to indra/newview/skins/blackdark/textures/icn_active-speakers-typing1.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_active-speakers-typing2.tga b/indra/newview/skins/blackdark/textures/icn_active-speakers-typing2.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_active-speakers-typing2.tga rename to indra/newview/skins/blackdark/textures/icn_active-speakers-typing2.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_active-speakers-typing3.tga b/indra/newview/skins/blackdark/textures/icn_active-speakers-typing3.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_active-speakers-typing3.tga rename to indra/newview/skins/blackdark/textures/icn_active-speakers-typing3.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_chatbar.tga b/indra/newview/skins/blackdark/textures/icn_chatbar.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_chatbar.tga rename to indra/newview/skins/blackdark/textures/icn_chatbar.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_clear_lineeditor.tga b/indra/newview/skins/blackdark/textures/icn_clear_lineeditor.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_clear_lineeditor.tga rename to indra/newview/skins/blackdark/textures/icn_clear_lineeditor.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_label_media.tga b/indra/newview/skins/blackdark/textures/icn_label_media.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_label_media.tga rename to indra/newview/skins/blackdark/textures/icn_label_media.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_label_music.tga b/indra/newview/skins/blackdark/textures/icn_label_music.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_label_music.tga rename to indra/newview/skins/blackdark/textures/icn_label_music.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_label_web.tga b/indra/newview/skins/blackdark/textures/icn_label_web.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_label_web.tga rename to indra/newview/skins/blackdark/textures/icn_label_web.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media-pause_active.tga b/indra/newview/skins/blackdark/textures/icn_media-pause_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media-pause_active.tga rename to indra/newview/skins/blackdark/textures/icn_media-pause_active.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media-pause_disabled.tga b/indra/newview/skins/blackdark/textures/icn_media-pause_disabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media-pause_disabled.tga rename to indra/newview/skins/blackdark/textures/icn_media-pause_disabled.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media-pause_enabled.tga b/indra/newview/skins/blackdark/textures/icn_media-pause_enabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media-pause_enabled.tga rename to indra/newview/skins/blackdark/textures/icn_media-pause_enabled.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media-play_enabled.tga b/indra/newview/skins/blackdark/textures/icn_media-play_enabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media-play_enabled.tga rename to indra/newview/skins/blackdark/textures/icn_media-play_enabled.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media-stop_enabled.tga b/indra/newview/skins/blackdark/textures/icn_media-stop_enabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media-stop_enabled.tga rename to indra/newview/skins/blackdark/textures/icn_media-stop_enabled.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media.tga b/indra/newview/skins/blackdark/textures/icn_media.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media.tga rename to indra/newview/skins/blackdark/textures/icn_media.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media_movie.tga b/indra/newview/skins/blackdark/textures/icn_media_movie.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media_movie.tga rename to indra/newview/skins/blackdark/textures/icn_media_movie.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_media_web.tga b/indra/newview/skins/blackdark/textures/icn_media_web.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_media_web.tga rename to indra/newview/skins/blackdark/textures/icn_media_web.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_music.tga b/indra/newview/skins/blackdark/textures/icn_music.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_music.tga rename to indra/newview/skins/blackdark/textures/icn_music.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_pause.tga b/indra/newview/skins/blackdark/textures/icn_pause.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_pause.tga rename to indra/newview/skins/blackdark/textures/icn_pause.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_play.tga b/indra/newview/skins/blackdark/textures/icn_play.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_play.tga rename to indra/newview/skins/blackdark/textures/icn_play.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_rounded-text-field.tga b/indra/newview/skins/blackdark/textures/icn_rounded-text-field.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_rounded-text-field.tga rename to indra/newview/skins/blackdark/textures/icn_rounded-text-field.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_scrollbar.tga b/indra/newview/skins/blackdark/textures/icn_scrollbar.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_scrollbar.tga rename to indra/newview/skins/blackdark/textures/icn_scrollbar.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_scrollbar_bg.tga b/indra/newview/skins/blackdark/textures/icn_scrollbar_bg.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_scrollbar_bg.tga rename to indra/newview/skins/blackdark/textures/icn_scrollbar_bg.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_scrollbar_thumb.tga b/indra/newview/skins/blackdark/textures/icn_scrollbar_thumb.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_scrollbar_thumb.tga rename to indra/newview/skins/blackdark/textures/icn_scrollbar_thumb.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_slide-groove_dark.tga b/indra/newview/skins/blackdark/textures/icn_slide-groove_dark.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_slide-groove_dark.tga rename to indra/newview/skins/blackdark/textures/icn_slide-groove_dark.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_slide-highlight.tga b/indra/newview/skins/blackdark/textures/icn_slide-highlight.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_slide-highlight.tga rename to indra/newview/skins/blackdark/textures/icn_slide-highlight.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_slide-thumb_dark.tga b/indra/newview/skins/blackdark/textures/icn_slide-thumb_dark.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_slide-thumb_dark.tga rename to indra/newview/skins/blackdark/textures/icn_slide-thumb_dark.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_speaker-muted_dark.tga b/indra/newview/skins/blackdark/textures/icn_speaker-muted_dark.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_speaker-muted_dark.tga rename to indra/newview/skins/blackdark/textures/icn_speaker-muted_dark.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_speaker_dark.tga b/indra/newview/skins/blackdark/textures/icn_speaker_dark.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_speaker_dark.tga rename to indra/newview/skins/blackdark/textures/icn_speaker_dark.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_stop.tga b/indra/newview/skins/blackdark/textures/icn_stop.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_stop.tga rename to indra/newview/skins/blackdark/textures/icn_stop.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_build.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_build.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_build.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_build.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_fly.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_fly.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_fly.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_fly.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_inventory.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_inventory.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_inventory.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_inventory.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_map.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_map.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_map.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_map.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_minimap.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_minimap.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_minimap.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_minimap.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_radar.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_radar.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_radar.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_radar.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_search.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_search.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_search.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_search.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_toolbar_snapshot.tga b/indra/newview/skins/blackdark/textures/icn_toolbar_snapshot.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_toolbar_snapshot.tga rename to indra/newview/skins/blackdark/textures/icn_toolbar_snapshot.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice-call-end.tga b/indra/newview/skins/blackdark/textures/icn_voice-call-end.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice-call-end.tga rename to indra/newview/skins/blackdark/textures/icn_voice-call-end.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice-call-start.tga b/indra/newview/skins/blackdark/textures/icn_voice-call-start.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice-call-start.tga rename to indra/newview/skins/blackdark/textures/icn_voice-call-start.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice-groupfocus.tga b/indra/newview/skins/blackdark/textures/icn_voice-groupfocus.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice-groupfocus.tga rename to indra/newview/skins/blackdark/textures/icn_voice-groupfocus.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice-localchat.tga b/indra/newview/skins/blackdark/textures/icn_voice-localchat.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice-localchat.tga rename to indra/newview/skins/blackdark/textures/icn_voice-localchat.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice-pvtfocus.tga b/indra/newview/skins/blackdark/textures/icn_voice-pvtfocus.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice-pvtfocus.tga rename to indra/newview/skins/blackdark/textures/icn_voice-pvtfocus.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice_ptt-off.tga b/indra/newview/skins/blackdark/textures/icn_voice_ptt-off.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice_ptt-off.tga rename to indra/newview/skins/blackdark/textures/icn_voice_ptt-off.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice_ptt-on-lvl1.tga b/indra/newview/skins/blackdark/textures/icn_voice_ptt-on-lvl1.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice_ptt-on-lvl1.tga rename to indra/newview/skins/blackdark/textures/icn_voice_ptt-on-lvl1.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice_ptt-on-lvl2.tga b/indra/newview/skins/blackdark/textures/icn_voice_ptt-on-lvl2.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice_ptt-on-lvl2.tga rename to indra/newview/skins/blackdark/textures/icn_voice_ptt-on-lvl2.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice_ptt-on-lvl3.tga b/indra/newview/skins/blackdark/textures/icn_voice_ptt-on-lvl3.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice_ptt-on-lvl3.tga rename to indra/newview/skins/blackdark/textures/icn_voice_ptt-on-lvl3.tga diff --git a/indra/newview/skins/Blackdark/textures/icn_voice_ptt-on.tga b/indra/newview/skins/blackdark/textures/icn_voice_ptt-on.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icn_voice_ptt-on.tga rename to indra/newview/skins/blackdark/textures/icn_voice_ptt-on.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_auction.tga b/indra/newview/skins/blackdark/textures/icon_auction.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_auction.tga rename to indra/newview/skins/blackdark/textures/icon_auction.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_avatar_offline.tga b/indra/newview/skins/blackdark/textures/icon_avatar_offline.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_avatar_offline.tga rename to indra/newview/skins/blackdark/textures/icon_avatar_offline.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_avatar_online.tga b/indra/newview/skins/blackdark/textures/icon_avatar_online.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_avatar_online.tga rename to indra/newview/skins/blackdark/textures/icon_avatar_online.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_event.tga b/indra/newview/skins/blackdark/textures/icon_event.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_event.tga rename to indra/newview/skins/blackdark/textures/icon_event.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_event_adult.tga b/indra/newview/skins/blackdark/textures/icon_event_adult.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_event_adult.tga rename to indra/newview/skins/blackdark/textures/icon_event_adult.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_event_mature.tga b/indra/newview/skins/blackdark/textures/icon_event_mature.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_event_mature.tga rename to indra/newview/skins/blackdark/textures/icon_event_mature.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_for_sale.tga b/indra/newview/skins/blackdark/textures/icon_for_sale.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_for_sale.tga rename to indra/newview/skins/blackdark/textures/icon_for_sale.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_for_sale_adult.tga b/indra/newview/skins/blackdark/textures/icon_for_sale_adult.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_for_sale_adult.tga rename to indra/newview/skins/blackdark/textures/icon_for_sale_adult.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_group.tga b/indra/newview/skins/blackdark/textures/icon_group.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_group.tga rename to indra/newview/skins/blackdark/textures/icon_group.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_groupnotice.tga b/indra/newview/skins/blackdark/textures/icon_groupnotice.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_groupnotice.tga rename to indra/newview/skins/blackdark/textures/icon_groupnotice.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_groupnoticeinventory.tga b/indra/newview/skins/blackdark/textures/icon_groupnoticeinventory.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_groupnoticeinventory.tga rename to indra/newview/skins/blackdark/textures/icon_groupnoticeinventory.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_lock.tga b/indra/newview/skins/blackdark/textures/icon_lock.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_lock.tga rename to indra/newview/skins/blackdark/textures/icon_lock.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_place.tga b/indra/newview/skins/blackdark/textures/icon_place.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_place.tga rename to indra/newview/skins/blackdark/textures/icon_place.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_popular.tga b/indra/newview/skins/blackdark/textures/icon_popular.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_popular.tga rename to indra/newview/skins/blackdark/textures/icon_popular.tga diff --git a/indra/newview/skins/Blackdark/textures/icon_top_pick.tga b/indra/newview/skins/blackdark/textures/icon_top_pick.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/icon_top_pick.tga rename to indra/newview/skins/blackdark/textures/icon_top_pick.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_animation.tga b/indra/newview/skins/blackdark/textures/inv_folder_animation.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_animation.tga rename to indra/newview/skins/blackdark/textures/inv_folder_animation.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_bodypart.tga b/indra/newview/skins/blackdark/textures/inv_folder_bodypart.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_bodypart.tga rename to indra/newview/skins/blackdark/textures/inv_folder_bodypart.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_callingcard.tga b/indra/newview/skins/blackdark/textures/inv_folder_callingcard.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_callingcard.tga rename to indra/newview/skins/blackdark/textures/inv_folder_callingcard.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_clothing.tga b/indra/newview/skins/blackdark/textures/inv_folder_clothing.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_clothing.tga rename to indra/newview/skins/blackdark/textures/inv_folder_clothing.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_gesture.tga b/indra/newview/skins/blackdark/textures/inv_folder_gesture.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_gesture.tga rename to indra/newview/skins/blackdark/textures/inv_folder_gesture.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_landmark.tga b/indra/newview/skins/blackdark/textures/inv_folder_landmark.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_landmark.tga rename to indra/newview/skins/blackdark/textures/inv_folder_landmark.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_lostandfound.tga b/indra/newview/skins/blackdark/textures/inv_folder_lostandfound.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_lostandfound.tga rename to indra/newview/skins/blackdark/textures/inv_folder_lostandfound.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_notecard.tga b/indra/newview/skins/blackdark/textures/inv_folder_notecard.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_notecard.tga rename to indra/newview/skins/blackdark/textures/inv_folder_notecard.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_object.tga b/indra/newview/skins/blackdark/textures/inv_folder_object.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_object.tga rename to indra/newview/skins/blackdark/textures/inv_folder_object.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_plain_closed.tga b/indra/newview/skins/blackdark/textures/inv_folder_plain_closed.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_plain_closed.tga rename to indra/newview/skins/blackdark/textures/inv_folder_plain_closed.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_plain_open.tga b/indra/newview/skins/blackdark/textures/inv_folder_plain_open.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_plain_open.tga rename to indra/newview/skins/blackdark/textures/inv_folder_plain_open.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_script.tga b/indra/newview/skins/blackdark/textures/inv_folder_script.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_script.tga rename to indra/newview/skins/blackdark/textures/inv_folder_script.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_snapshot.tga b/indra/newview/skins/blackdark/textures/inv_folder_snapshot.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_snapshot.tga rename to indra/newview/skins/blackdark/textures/inv_folder_snapshot.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_sound.tga b/indra/newview/skins/blackdark/textures/inv_folder_sound.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_sound.tga rename to indra/newview/skins/blackdark/textures/inv_folder_sound.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_texture.tga b/indra/newview/skins/blackdark/textures/inv_folder_texture.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_texture.tga rename to indra/newview/skins/blackdark/textures/inv_folder_texture.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_folder_trash.tga b/indra/newview/skins/blackdark/textures/inv_folder_trash.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_folder_trash.tga rename to indra/newview/skins/blackdark/textures/inv_folder_trash.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_animation.tga b/indra/newview/skins/blackdark/textures/inv_item_animation.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_animation.tga rename to indra/newview/skins/blackdark/textures/inv_item_animation.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_attach.tga b/indra/newview/skins/blackdark/textures/inv_item_attach.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_attach.tga rename to indra/newview/skins/blackdark/textures/inv_item_attach.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_callingcard_offline.tga b/indra/newview/skins/blackdark/textures/inv_item_callingcard_offline.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_callingcard_offline.tga rename to indra/newview/skins/blackdark/textures/inv_item_callingcard_offline.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_callingcard_online.tga b/indra/newview/skins/blackdark/textures/inv_item_callingcard_online.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_callingcard_online.tga rename to indra/newview/skins/blackdark/textures/inv_item_callingcard_online.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_clothing.tga b/indra/newview/skins/blackdark/textures/inv_item_clothing.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_clothing.tga rename to indra/newview/skins/blackdark/textures/inv_item_clothing.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_eyes.tga b/indra/newview/skins/blackdark/textures/inv_item_eyes.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_eyes.tga rename to indra/newview/skins/blackdark/textures/inv_item_eyes.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_gesture.tga b/indra/newview/skins/blackdark/textures/inv_item_gesture.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_gesture.tga rename to indra/newview/skins/blackdark/textures/inv_item_gesture.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_gloves.tga b/indra/newview/skins/blackdark/textures/inv_item_gloves.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_gloves.tga rename to indra/newview/skins/blackdark/textures/inv_item_gloves.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_hair.tga b/indra/newview/skins/blackdark/textures/inv_item_hair.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_hair.tga rename to indra/newview/skins/blackdark/textures/inv_item_hair.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_jacket.tga b/indra/newview/skins/blackdark/textures/inv_item_jacket.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_jacket.tga rename to indra/newview/skins/blackdark/textures/inv_item_jacket.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_landmark.tga b/indra/newview/skins/blackdark/textures/inv_item_landmark.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_landmark.tga rename to indra/newview/skins/blackdark/textures/inv_item_landmark.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_landmark_visited.tga b/indra/newview/skins/blackdark/textures/inv_item_landmark_visited.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_landmark_visited.tga rename to indra/newview/skins/blackdark/textures/inv_item_landmark_visited.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_notecard.tga b/indra/newview/skins/blackdark/textures/inv_item_notecard.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_notecard.tga rename to indra/newview/skins/blackdark/textures/inv_item_notecard.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_object.tga b/indra/newview/skins/blackdark/textures/inv_item_object.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_object.tga rename to indra/newview/skins/blackdark/textures/inv_item_object.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_object_multi.tga b/indra/newview/skins/blackdark/textures/inv_item_object_multi.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_object_multi.tga rename to indra/newview/skins/blackdark/textures/inv_item_object_multi.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_pants.tga b/indra/newview/skins/blackdark/textures/inv_item_pants.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_pants.tga rename to indra/newview/skins/blackdark/textures/inv_item_pants.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_script.tga b/indra/newview/skins/blackdark/textures/inv_item_script.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_script.tga rename to indra/newview/skins/blackdark/textures/inv_item_script.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_script_dangerous.tga b/indra/newview/skins/blackdark/textures/inv_item_script_dangerous.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_script_dangerous.tga rename to indra/newview/skins/blackdark/textures/inv_item_script_dangerous.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_shape.tga b/indra/newview/skins/blackdark/textures/inv_item_shape.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_shape.tga rename to indra/newview/skins/blackdark/textures/inv_item_shape.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_shirt.tga b/indra/newview/skins/blackdark/textures/inv_item_shirt.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_shirt.tga rename to indra/newview/skins/blackdark/textures/inv_item_shirt.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_shoes.tga b/indra/newview/skins/blackdark/textures/inv_item_shoes.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_shoes.tga rename to indra/newview/skins/blackdark/textures/inv_item_shoes.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_skin.tga b/indra/newview/skins/blackdark/textures/inv_item_skin.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_skin.tga rename to indra/newview/skins/blackdark/textures/inv_item_skin.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_skirt.tga b/indra/newview/skins/blackdark/textures/inv_item_skirt.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_skirt.tga rename to indra/newview/skins/blackdark/textures/inv_item_skirt.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_snapshot.tga b/indra/newview/skins/blackdark/textures/inv_item_snapshot.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_snapshot.tga rename to indra/newview/skins/blackdark/textures/inv_item_snapshot.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_socks.tga b/indra/newview/skins/blackdark/textures/inv_item_socks.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_socks.tga rename to indra/newview/skins/blackdark/textures/inv_item_socks.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_sound.tga b/indra/newview/skins/blackdark/textures/inv_item_sound.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_sound.tga rename to indra/newview/skins/blackdark/textures/inv_item_sound.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_texture.tga b/indra/newview/skins/blackdark/textures/inv_item_texture.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_texture.tga rename to indra/newview/skins/blackdark/textures/inv_item_texture.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_underpants.tga b/indra/newview/skins/blackdark/textures/inv_item_underpants.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_underpants.tga rename to indra/newview/skins/blackdark/textures/inv_item_underpants.tga diff --git a/indra/newview/skins/Blackdark/textures/inv_item_undershirt.tga b/indra/newview/skins/blackdark/textures/inv_item_undershirt.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/inv_item_undershirt.tga rename to indra/newview/skins/blackdark/textures/inv_item_undershirt.tga diff --git a/indra/newview/skins/Blackdark/textures/lightgray.tga b/indra/newview/skins/blackdark/textures/lightgray.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/lightgray.tga rename to indra/newview/skins/blackdark/textures/lightgray.tga diff --git a/indra/newview/skins/Blackdark/textures/map_avatar_16.tga b/indra/newview/skins/blackdark/textures/map_avatar_16.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_avatar_16.tga rename to indra/newview/skins/blackdark/textures/map_avatar_16.tga diff --git a/indra/newview/skins/Blackdark/textures/map_avatar_8.tga b/indra/newview/skins/blackdark/textures/map_avatar_8.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_avatar_8.tga rename to indra/newview/skins/blackdark/textures/map_avatar_8.tga diff --git a/indra/newview/skins/Blackdark/textures/map_avatar_above_8.tga b/indra/newview/skins/blackdark/textures/map_avatar_above_8.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_avatar_above_8.tga rename to indra/newview/skins/blackdark/textures/map_avatar_above_8.tga diff --git a/indra/newview/skins/Blackdark/textures/map_avatar_below_8.tga b/indra/newview/skins/blackdark/textures/map_avatar_below_8.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_avatar_below_8.tga rename to indra/newview/skins/blackdark/textures/map_avatar_below_8.tga diff --git a/indra/newview/skins/Blackdark/textures/map_avatar_you_8.tga b/indra/newview/skins/blackdark/textures/map_avatar_you_8.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_avatar_you_8.tga rename to indra/newview/skins/blackdark/textures/map_avatar_you_8.tga diff --git a/indra/newview/skins/Blackdark/textures/map_event.tga b/indra/newview/skins/blackdark/textures/map_event.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_event.tga rename to indra/newview/skins/blackdark/textures/map_event.tga diff --git a/indra/newview/skins/Blackdark/textures/map_event_adult.tga b/indra/newview/skins/blackdark/textures/map_event_adult.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_event_adult.tga rename to indra/newview/skins/blackdark/textures/map_event_adult.tga diff --git a/indra/newview/skins/Blackdark/textures/map_event_mature.tga b/indra/newview/skins/blackdark/textures/map_event_mature.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_event_mature.tga rename to indra/newview/skins/blackdark/textures/map_event_mature.tga diff --git a/indra/newview/skins/Blackdark/textures/map_home.tga b/indra/newview/skins/blackdark/textures/map_home.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_home.tga rename to indra/newview/skins/blackdark/textures/map_home.tga diff --git a/indra/newview/skins/Blackdark/textures/map_infohub.tga b/indra/newview/skins/blackdark/textures/map_infohub.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_infohub.tga rename to indra/newview/skins/blackdark/textures/map_infohub.tga diff --git a/indra/newview/skins/Blackdark/textures/map_telehub.tga b/indra/newview/skins/blackdark/textures/map_telehub.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_telehub.tga rename to indra/newview/skins/blackdark/textures/map_telehub.tga diff --git a/indra/newview/skins/Blackdark/textures/map_track_16.tga b/indra/newview/skins/blackdark/textures/map_track_16.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_track_16.tga rename to indra/newview/skins/blackdark/textures/map_track_16.tga diff --git a/indra/newview/skins/Blackdark/textures/map_track_8.tga b/indra/newview/skins/blackdark/textures/map_track_8.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/map_track_8.tga rename to indra/newview/skins/blackdark/textures/map_track_8.tga diff --git a/indra/newview/skins/Blackdark/textures/minimize.tga b/indra/newview/skins/blackdark/textures/minimize.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/minimize.tga rename to indra/newview/skins/blackdark/textures/minimize.tga diff --git a/indra/newview/skins/Blackdark/textures/minimize_inactive.tga b/indra/newview/skins/blackdark/textures/minimize_inactive.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/minimize_inactive.tga rename to indra/newview/skins/blackdark/textures/minimize_inactive.tga diff --git a/indra/newview/skins/Blackdark/textures/minimize_pressed.tga b/indra/newview/skins/blackdark/textures/minimize_pressed.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/minimize_pressed.tga rename to indra/newview/skins/blackdark/textures/minimize_pressed.tga diff --git a/indra/newview/skins/Blackdark/textures/move_backward_in.tga b/indra/newview/skins/blackdark/textures/move_backward_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_backward_in.tga rename to indra/newview/skins/blackdark/textures/move_backward_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_backward_out.tga b/indra/newview/skins/blackdark/textures/move_backward_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_backward_out.tga rename to indra/newview/skins/blackdark/textures/move_backward_out.tga diff --git a/indra/newview/skins/Blackdark/textures/move_down_in.tga b/indra/newview/skins/blackdark/textures/move_down_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_down_in.tga rename to indra/newview/skins/blackdark/textures/move_down_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_down_out.tga b/indra/newview/skins/blackdark/textures/move_down_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_down_out.tga rename to indra/newview/skins/blackdark/textures/move_down_out.tga diff --git a/indra/newview/skins/Blackdark/textures/move_forward_in.tga b/indra/newview/skins/blackdark/textures/move_forward_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_forward_in.tga rename to indra/newview/skins/blackdark/textures/move_forward_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_forward_out.tga b/indra/newview/skins/blackdark/textures/move_forward_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_forward_out.tga rename to indra/newview/skins/blackdark/textures/move_forward_out.tga diff --git a/indra/newview/skins/Blackdark/textures/move_left_in.tga b/indra/newview/skins/blackdark/textures/move_left_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_left_in.tga rename to indra/newview/skins/blackdark/textures/move_left_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_left_out.tga b/indra/newview/skins/blackdark/textures/move_left_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_left_out.tga rename to indra/newview/skins/blackdark/textures/move_left_out.tga diff --git a/indra/newview/skins/Blackdark/textures/move_right_in.tga b/indra/newview/skins/blackdark/textures/move_right_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_right_in.tga rename to indra/newview/skins/blackdark/textures/move_right_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_right_out.tga b/indra/newview/skins/blackdark/textures/move_right_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_right_out.tga rename to indra/newview/skins/blackdark/textures/move_right_out.tga diff --git a/indra/newview/skins/Blackdark/textures/move_turn_left_in.tga b/indra/newview/skins/blackdark/textures/move_turn_left_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_turn_left_in.tga rename to indra/newview/skins/blackdark/textures/move_turn_left_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_turn_left_out.tga b/indra/newview/skins/blackdark/textures/move_turn_left_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_turn_left_out.tga rename to indra/newview/skins/blackdark/textures/move_turn_left_out.tga diff --git a/indra/newview/skins/Blackdark/textures/move_turn_right_in.tga b/indra/newview/skins/blackdark/textures/move_turn_right_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_turn_right_in.tga rename to indra/newview/skins/blackdark/textures/move_turn_right_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_turn_right_out.tga b/indra/newview/skins/blackdark/textures/move_turn_right_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_turn_right_out.tga rename to indra/newview/skins/blackdark/textures/move_turn_right_out.tga diff --git a/indra/newview/skins/Blackdark/textures/move_up_in.tga b/indra/newview/skins/blackdark/textures/move_up_in.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_up_in.tga rename to indra/newview/skins/blackdark/textures/move_up_in.tga diff --git a/indra/newview/skins/Blackdark/textures/move_up_out.tga b/indra/newview/skins/blackdark/textures/move_up_out.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/move_up_out.tga rename to indra/newview/skins/blackdark/textures/move_up_out.tga diff --git a/indra/newview/skins/Blackdark/textures/mute_icon.tga b/indra/newview/skins/blackdark/textures/mute_icon.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/mute_icon.tga rename to indra/newview/skins/blackdark/textures/mute_icon.tga diff --git a/indra/newview/skins/Blackdark/textures/notify_box_icon.tga b/indra/newview/skins/blackdark/textures/notify_box_icon.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/notify_box_icon.tga rename to indra/newview/skins/blackdark/textures/notify_box_icon.tga diff --git a/indra/newview/skins/Blackdark/textures/notify_caution_icon.tga b/indra/newview/skins/blackdark/textures/notify_caution_icon.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/notify_caution_icon.tga rename to indra/newview/skins/blackdark/textures/notify_caution_icon.tga diff --git a/indra/newview/skins/Blackdark/textures/notify_next.png b/indra/newview/skins/blackdark/textures/notify_next.png similarity index 100% rename from indra/newview/skins/Blackdark/textures/notify_next.png rename to indra/newview/skins/blackdark/textures/notify_next.png diff --git a/indra/newview/skins/Blackdark/textures/notify_tip_icon.tga b/indra/newview/skins/blackdark/textures/notify_tip_icon.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/notify_tip_icon.tga rename to indra/newview/skins/blackdark/textures/notify_tip_icon.tga diff --git a/indra/newview/skins/Blackdark/textures/object_cone.tga b/indra/newview/skins/blackdark/textures/object_cone.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_cone.tga rename to indra/newview/skins/blackdark/textures/object_cone.tga diff --git a/indra/newview/skins/Blackdark/textures/object_cone_active.tga b/indra/newview/skins/blackdark/textures/object_cone_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_cone_active.tga rename to indra/newview/skins/blackdark/textures/object_cone_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_cube.tga b/indra/newview/skins/blackdark/textures/object_cube.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_cube.tga rename to indra/newview/skins/blackdark/textures/object_cube.tga diff --git a/indra/newview/skins/Blackdark/textures/object_cube_active.tga b/indra/newview/skins/blackdark/textures/object_cube_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_cube_active.tga rename to indra/newview/skins/blackdark/textures/object_cube_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_cylinder.tga b/indra/newview/skins/blackdark/textures/object_cylinder.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_cylinder.tga rename to indra/newview/skins/blackdark/textures/object_cylinder.tga diff --git a/indra/newview/skins/Blackdark/textures/object_cylinder_active.tga b/indra/newview/skins/blackdark/textures/object_cylinder_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_cylinder_active.tga rename to indra/newview/skins/blackdark/textures/object_cylinder_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_grass.tga b/indra/newview/skins/blackdark/textures/object_grass.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_grass.tga rename to indra/newview/skins/blackdark/textures/object_grass.tga diff --git a/indra/newview/skins/Blackdark/textures/object_grass_active.tga b/indra/newview/skins/blackdark/textures/object_grass_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_grass_active.tga rename to indra/newview/skins/blackdark/textures/object_grass_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_hemi_cone.tga b/indra/newview/skins/blackdark/textures/object_hemi_cone.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_hemi_cone.tga rename to indra/newview/skins/blackdark/textures/object_hemi_cone.tga diff --git a/indra/newview/skins/Blackdark/textures/object_hemi_cone_active.tga b/indra/newview/skins/blackdark/textures/object_hemi_cone_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_hemi_cone_active.tga rename to indra/newview/skins/blackdark/textures/object_hemi_cone_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_hemi_cylinder.tga b/indra/newview/skins/blackdark/textures/object_hemi_cylinder.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_hemi_cylinder.tga rename to indra/newview/skins/blackdark/textures/object_hemi_cylinder.tga diff --git a/indra/newview/skins/Blackdark/textures/object_hemi_cylinder_active.tga b/indra/newview/skins/blackdark/textures/object_hemi_cylinder_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_hemi_cylinder_active.tga rename to indra/newview/skins/blackdark/textures/object_hemi_cylinder_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_hemi_sphere.tga b/indra/newview/skins/blackdark/textures/object_hemi_sphere.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_hemi_sphere.tga rename to indra/newview/skins/blackdark/textures/object_hemi_sphere.tga diff --git a/indra/newview/skins/Blackdark/textures/object_hemi_sphere_active.tga b/indra/newview/skins/blackdark/textures/object_hemi_sphere_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_hemi_sphere_active.tga rename to indra/newview/skins/blackdark/textures/object_hemi_sphere_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_prism.tga b/indra/newview/skins/blackdark/textures/object_prism.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_prism.tga rename to indra/newview/skins/blackdark/textures/object_prism.tga diff --git a/indra/newview/skins/Blackdark/textures/object_prism_active.tga b/indra/newview/skins/blackdark/textures/object_prism_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_prism_active.tga rename to indra/newview/skins/blackdark/textures/object_prism_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_pyramid.tga b/indra/newview/skins/blackdark/textures/object_pyramid.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_pyramid.tga rename to indra/newview/skins/blackdark/textures/object_pyramid.tga diff --git a/indra/newview/skins/Blackdark/textures/object_pyramid_active.tga b/indra/newview/skins/blackdark/textures/object_pyramid_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_pyramid_active.tga rename to indra/newview/skins/blackdark/textures/object_pyramid_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_ring.tga b/indra/newview/skins/blackdark/textures/object_ring.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_ring.tga rename to indra/newview/skins/blackdark/textures/object_ring.tga diff --git a/indra/newview/skins/Blackdark/textures/object_ring_active.tga b/indra/newview/skins/blackdark/textures/object_ring_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_ring_active.tga rename to indra/newview/skins/blackdark/textures/object_ring_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_sphere.tga b/indra/newview/skins/blackdark/textures/object_sphere.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_sphere.tga rename to indra/newview/skins/blackdark/textures/object_sphere.tga diff --git a/indra/newview/skins/Blackdark/textures/object_sphere_active.tga b/indra/newview/skins/blackdark/textures/object_sphere_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_sphere_active.tga rename to indra/newview/skins/blackdark/textures/object_sphere_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_tetrahedron.tga b/indra/newview/skins/blackdark/textures/object_tetrahedron.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_tetrahedron.tga rename to indra/newview/skins/blackdark/textures/object_tetrahedron.tga diff --git a/indra/newview/skins/Blackdark/textures/object_tetrahedron_active.tga b/indra/newview/skins/blackdark/textures/object_tetrahedron_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_tetrahedron_active.tga rename to indra/newview/skins/blackdark/textures/object_tetrahedron_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_torus.tga b/indra/newview/skins/blackdark/textures/object_torus.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_torus.tga rename to indra/newview/skins/blackdark/textures/object_torus.tga diff --git a/indra/newview/skins/Blackdark/textures/object_torus_active.tga b/indra/newview/skins/blackdark/textures/object_torus_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_torus_active.tga rename to indra/newview/skins/blackdark/textures/object_torus_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_tree.tga b/indra/newview/skins/blackdark/textures/object_tree.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_tree.tga rename to indra/newview/skins/blackdark/textures/object_tree.tga diff --git a/indra/newview/skins/Blackdark/textures/object_tree_active.tga b/indra/newview/skins/blackdark/textures/object_tree_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_tree_active.tga rename to indra/newview/skins/blackdark/textures/object_tree_active.tga diff --git a/indra/newview/skins/Blackdark/textures/object_tube.tga b/indra/newview/skins/blackdark/textures/object_tube.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_tube.tga rename to indra/newview/skins/blackdark/textures/object_tube.tga diff --git a/indra/newview/skins/Blackdark/textures/object_tube_active.tga b/indra/newview/skins/blackdark/textures/object_tube_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/object_tube_active.tga rename to indra/newview/skins/blackdark/textures/object_tube_active.tga diff --git a/indra/newview/skins/Blackdark/textures/preview.png b/indra/newview/skins/blackdark/textures/preview.png similarity index 100% rename from indra/newview/skins/Blackdark/textures/preview.png rename to indra/newview/skins/blackdark/textures/preview.png diff --git a/indra/newview/skins/Blackdark/textures/progress_fill.tga b/indra/newview/skins/blackdark/textures/progress_fill.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/progress_fill.tga rename to indra/newview/skins/blackdark/textures/progress_fill.tga diff --git a/indra/newview/skins/Blackdark/textures/progressbar_fill.tga b/indra/newview/skins/blackdark/textures/progressbar_fill.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/progressbar_fill.tga rename to indra/newview/skins/blackdark/textures/progressbar_fill.tga diff --git a/indra/newview/skins/Blackdark/textures/progressbar_track.tga b/indra/newview/skins/blackdark/textures/progressbar_track.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/progressbar_track.tga rename to indra/newview/skins/blackdark/textures/progressbar_track.tga diff --git a/indra/newview/skins/Blackdark/textures/ptt_lock_off.tga b/indra/newview/skins/blackdark/textures/ptt_lock_off.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ptt_lock_off.tga rename to indra/newview/skins/blackdark/textures/ptt_lock_off.tga diff --git a/indra/newview/skins/Blackdark/textures/ptt_lock_on.tga b/indra/newview/skins/blackdark/textures/ptt_lock_on.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/ptt_lock_on.tga rename to indra/newview/skins/blackdark/textures/ptt_lock_on.tga diff --git a/indra/newview/skins/Blackdark/textures/radio_active_false.tga b/indra/newview/skins/blackdark/textures/radio_active_false.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/radio_active_false.tga rename to indra/newview/skins/blackdark/textures/radio_active_false.tga diff --git a/indra/newview/skins/Blackdark/textures/radio_active_true.tga b/indra/newview/skins/blackdark/textures/radio_active_true.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/radio_active_true.tga rename to indra/newview/skins/blackdark/textures/radio_active_true.tga diff --git a/indra/newview/skins/Blackdark/textures/radio_inactive_false.tga b/indra/newview/skins/blackdark/textures/radio_inactive_false.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/radio_inactive_false.tga rename to indra/newview/skins/blackdark/textures/radio_inactive_false.tga diff --git a/indra/newview/skins/Blackdark/textures/radio_inactive_true.tga b/indra/newview/skins/blackdark/textures/radio_inactive_true.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/radio_inactive_true.tga rename to indra/newview/skins/blackdark/textures/radio_inactive_true.tga diff --git a/indra/newview/skins/Blackdark/textures/resize_handle_bottom_right_blue.tga b/indra/newview/skins/blackdark/textures/resize_handle_bottom_right_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/resize_handle_bottom_right_blue.tga rename to indra/newview/skins/blackdark/textures/resize_handle_bottom_right_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/restore.tga b/indra/newview/skins/blackdark/textures/restore.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/restore.tga rename to indra/newview/skins/blackdark/textures/restore.tga diff --git a/indra/newview/skins/Blackdark/textures/restore_inactive.tga b/indra/newview/skins/blackdark/textures/restore_inactive.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/restore_inactive.tga rename to indra/newview/skins/blackdark/textures/restore_inactive.tga diff --git a/indra/newview/skins/Blackdark/textures/restore_pressed.tga b/indra/newview/skins/blackdark/textures/restore_pressed.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/restore_pressed.tga rename to indra/newview/skins/blackdark/textures/restore_pressed.tga diff --git a/indra/newview/skins/Blackdark/textures/rounded_square.j2c b/indra/newview/skins/blackdark/textures/rounded_square.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/rounded_square.j2c rename to indra/newview/skins/blackdark/textures/rounded_square.j2c diff --git a/indra/newview/skins/Blackdark/textures/rounded_square.tga b/indra/newview/skins/blackdark/textures/rounded_square.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/rounded_square.tga rename to indra/newview/skins/blackdark/textures/rounded_square.tga diff --git a/indra/newview/skins/Blackdark/textures/rounded_square_soft.tga b/indra/newview/skins/blackdark/textures/rounded_square_soft.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/rounded_square_soft.tga rename to indra/newview/skins/blackdark/textures/rounded_square_soft.tga diff --git a/indra/newview/skins/Blackdark/textures/script_error.j2c b/indra/newview/skins/blackdark/textures/script_error.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/script_error.j2c rename to indra/newview/skins/blackdark/textures/script_error.j2c diff --git a/indra/newview/skins/Blackdark/textures/script_error.tga b/indra/newview/skins/blackdark/textures/script_error.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/script_error.tga rename to indra/newview/skins/blackdark/textures/script_error.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_down_in_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_down_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_down_in_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_down_in_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_down_out_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_down_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_down_out_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_down_out_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_left_in_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_left_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_left_in_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_left_in_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_left_out_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_left_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_left_out_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_left_out_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_right_in_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_right_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_right_in_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_right_in_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_right_out_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_right_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_right_out_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_right_out_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_up_in_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_up_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_up_in_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_up_in_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/scrollbutton_up_out_blue.tga b/indra/newview/skins/blackdark/textures/scrollbutton_up_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/scrollbutton_up_out_blue.tga rename to indra/newview/skins/blackdark/textures/scrollbutton_up_out_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/sm_rounded_corners_simple.tga b/indra/newview/skins/blackdark/textures/sm_rounded_corners_simple.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/sm_rounded_corners_simple.tga rename to indra/newview/skins/blackdark/textures/sm_rounded_corners_simple.tga diff --git a/indra/newview/skins/Blackdark/textures/spacer24.tga b/indra/newview/skins/blackdark/textures/spacer24.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/spacer24.tga rename to indra/newview/skins/blackdark/textures/spacer24.tga diff --git a/indra/newview/skins/Blackdark/textures/spacer35.tga b/indra/newview/skins/blackdark/textures/spacer35.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/spacer35.tga rename to indra/newview/skins/blackdark/textures/spacer35.tga diff --git a/indra/newview/skins/Blackdark/textures/spin_down_in_blue.tga b/indra/newview/skins/blackdark/textures/spin_down_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/spin_down_in_blue.tga rename to indra/newview/skins/blackdark/textures/spin_down_in_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/spin_down_out_blue.tga b/indra/newview/skins/blackdark/textures/spin_down_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/spin_down_out_blue.tga rename to indra/newview/skins/blackdark/textures/spin_down_out_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/spin_up_in_blue.tga b/indra/newview/skins/blackdark/textures/spin_up_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/spin_up_in_blue.tga rename to indra/newview/skins/blackdark/textures/spin_up_in_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/spin_up_out_blue.tga b/indra/newview/skins/blackdark/textures/spin_up_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/spin_up_out_blue.tga rename to indra/newview/skins/blackdark/textures/spin_up_out_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/square_btn_32x128.tga b/indra/newview/skins/blackdark/textures/square_btn_32x128.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/square_btn_32x128.tga rename to indra/newview/skins/blackdark/textures/square_btn_32x128.tga diff --git a/indra/newview/skins/Blackdark/textures/square_btn_selected_32x128.tga b/indra/newview/skins/blackdark/textures/square_btn_selected_32x128.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/square_btn_selected_32x128.tga rename to indra/newview/skins/blackdark/textures/square_btn_selected_32x128.tga diff --git a/indra/newview/skins/Blackdark/textures/startup_logo.j2c b/indra/newview/skins/blackdark/textures/startup_logo.j2c similarity index 100% rename from indra/newview/skins/Blackdark/textures/startup_logo.j2c rename to indra/newview/skins/blackdark/textures/startup_logo.j2c diff --git a/indra/newview/skins/Blackdark/textures/status_buy_currency.tga b/indra/newview/skins/blackdark/textures/status_buy_currency.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_buy_currency.tga rename to indra/newview/skins/blackdark/textures/status_buy_currency.tga diff --git a/indra/newview/skins/Blackdark/textures/status_buy_currency_pressed.tga b/indra/newview/skins/blackdark/textures/status_buy_currency_pressed.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_buy_currency_pressed.tga rename to indra/newview/skins/blackdark/textures/status_buy_currency_pressed.tga diff --git a/indra/newview/skins/Blackdark/textures/status_buy_land.tga b/indra/newview/skins/blackdark/textures/status_buy_land.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_buy_land.tga rename to indra/newview/skins/blackdark/textures/status_buy_land.tga diff --git a/indra/newview/skins/Blackdark/textures/status_buy_land_pressed.tga b/indra/newview/skins/blackdark/textures/status_buy_land_pressed.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_buy_land_pressed.tga rename to indra/newview/skins/blackdark/textures/status_buy_land_pressed.tga diff --git a/indra/newview/skins/Blackdark/textures/status_health.tga b/indra/newview/skins/blackdark/textures/status_health.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_health.tga rename to indra/newview/skins/blackdark/textures/status_health.tga diff --git a/indra/newview/skins/Blackdark/textures/status_no_build.tga b/indra/newview/skins/blackdark/textures/status_no_build.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_no_build.tga rename to indra/newview/skins/blackdark/textures/status_no_build.tga diff --git a/indra/newview/skins/Blackdark/textures/status_no_fly.tga b/indra/newview/skins/blackdark/textures/status_no_fly.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_no_fly.tga rename to indra/newview/skins/blackdark/textures/status_no_fly.tga diff --git a/indra/newview/skins/Blackdark/textures/status_no_push.tga b/indra/newview/skins/blackdark/textures/status_no_push.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_no_push.tga rename to indra/newview/skins/blackdark/textures/status_no_push.tga diff --git a/indra/newview/skins/Blackdark/textures/status_no_scripts.tga b/indra/newview/skins/blackdark/textures/status_no_scripts.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_no_scripts.tga rename to indra/newview/skins/blackdark/textures/status_no_scripts.tga diff --git a/indra/newview/skins/Blackdark/textures/status_no_voice.tga b/indra/newview/skins/blackdark/textures/status_no_voice.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_no_voice.tga rename to indra/newview/skins/blackdark/textures/status_no_voice.tga diff --git a/indra/newview/skins/Blackdark/textures/status_script_debug.tga b/indra/newview/skins/blackdark/textures/status_script_debug.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_script_debug.tga rename to indra/newview/skins/blackdark/textures/status_script_debug.tga diff --git a/indra/newview/skins/Blackdark/textures/status_search_btn.png b/indra/newview/skins/blackdark/textures/status_search_btn.png similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_search_btn.png rename to indra/newview/skins/blackdark/textures/status_search_btn.png diff --git a/indra/newview/skins/Blackdark/textures/status_search_btn_pressed.png b/indra/newview/skins/blackdark/textures/status_search_btn_pressed.png similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_search_btn_pressed.png rename to indra/newview/skins/blackdark/textures/status_search_btn_pressed.png diff --git a/indra/newview/skins/Blackdark/textures/status_voice.tga b/indra/newview/skins/blackdark/textures/status_voice.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/status_voice.tga rename to indra/newview/skins/blackdark/textures/status_voice.tga diff --git a/indra/newview/skins/Blackdark/textures/tab_bottom_blue.tga b/indra/newview/skins/blackdark/textures/tab_bottom_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tab_bottom_blue.tga rename to indra/newview/skins/blackdark/textures/tab_bottom_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/tab_bottom_selected_blue.tga b/indra/newview/skins/blackdark/textures/tab_bottom_selected_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tab_bottom_selected_blue.tga rename to indra/newview/skins/blackdark/textures/tab_bottom_selected_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/tab_left.tga b/indra/newview/skins/blackdark/textures/tab_left.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tab_left.tga rename to indra/newview/skins/blackdark/textures/tab_left.tga diff --git a/indra/newview/skins/Blackdark/textures/tab_left_selected.tga b/indra/newview/skins/blackdark/textures/tab_left_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tab_left_selected.tga rename to indra/newview/skins/blackdark/textures/tab_left_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/tab_top_blue.tga b/indra/newview/skins/blackdark/textures/tab_top_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tab_top_blue.tga rename to indra/newview/skins/blackdark/textures/tab_top_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/tab_top_selected_blue.tga b/indra/newview/skins/blackdark/textures/tab_top_selected_blue.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tab_top_selected_blue.tga rename to indra/newview/skins/blackdark/textures/tab_top_selected_blue.tga diff --git a/indra/newview/skins/Blackdark/textures/tabarea.tga b/indra/newview/skins/blackdark/textures/tabarea.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tabarea.tga rename to indra/newview/skins/blackdark/textures/tabarea.tga diff --git a/indra/newview/skins/Blackdark/textures/tearoff_pressed.tga b/indra/newview/skins/blackdark/textures/tearoff_pressed.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tearoff_pressed.tga rename to indra/newview/skins/blackdark/textures/tearoff_pressed.tga diff --git a/indra/newview/skins/Blackdark/textures/tearoffbox.tga b/indra/newview/skins/blackdark/textures/tearoffbox.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tearoffbox.tga rename to indra/newview/skins/blackdark/textures/tearoffbox.tga diff --git a/indra/newview/skins/Blackdark/textures/textures.xml b/indra/newview/skins/blackdark/textures/textures.xml similarity index 99% rename from indra/newview/skins/Blackdark/textures/textures.xml rename to indra/newview/skins/blackdark/textures/textures.xml index 5955a8ede..9f617f56b 100644 --- a/indra/newview/skins/Blackdark/textures/textures.xml +++ b/indra/newview/skins/blackdark/textures/textures.xml @@ -78,7 +78,7 @@ - + diff --git a/indra/newview/skins/Blackdark/textures/tool_dozer.tga b/indra/newview/skins/blackdark/textures/tool_dozer.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tool_dozer.tga rename to indra/newview/skins/blackdark/textures/tool_dozer.tga diff --git a/indra/newview/skins/Blackdark/textures/tool_dozer_active.tga b/indra/newview/skins/blackdark/textures/tool_dozer_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tool_dozer_active.tga rename to indra/newview/skins/blackdark/textures/tool_dozer_active.tga diff --git a/indra/newview/skins/Blackdark/textures/tool_zoom.tga b/indra/newview/skins/blackdark/textures/tool_zoom.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tool_zoom.tga rename to indra/newview/skins/blackdark/textures/tool_zoom.tga diff --git a/indra/newview/skins/Blackdark/textures/tool_zoom_active.tga b/indra/newview/skins/blackdark/textures/tool_zoom_active.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/tool_zoom_active.tga rename to indra/newview/skins/blackdark/textures/tool_zoom_active.tga diff --git a/indra/newview/skins/Blackdark/textures/toolbar_bg.tga b/indra/newview/skins/blackdark/textures/toolbar_bg.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/toolbar_bg.tga rename to indra/newview/skins/blackdark/textures/toolbar_bg.tga diff --git a/indra/newview/skins/Blackdark/textures/toolbar_btn_disabled.tga b/indra/newview/skins/blackdark/textures/toolbar_btn_disabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/toolbar_btn_disabled.tga rename to indra/newview/skins/blackdark/textures/toolbar_btn_disabled.tga diff --git a/indra/newview/skins/Blackdark/textures/toolbar_btn_enabled.tga b/indra/newview/skins/blackdark/textures/toolbar_btn_enabled.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/toolbar_btn_enabled.tga rename to indra/newview/skins/blackdark/textures/toolbar_btn_enabled.tga diff --git a/indra/newview/skins/Blackdark/textures/toolbar_btn_selected.tga b/indra/newview/skins/blackdark/textures/toolbar_btn_selected.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/toolbar_btn_selected.tga rename to indra/newview/skins/blackdark/textures/toolbar_btn_selected.tga diff --git a/indra/newview/skins/Blackdark/textures/toolbar_tab.tga b/indra/newview/skins/blackdark/textures/toolbar_tab.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/toolbar_tab.tga rename to indra/newview/skins/blackdark/textures/toolbar_tab.tga diff --git a/indra/newview/skins/Blackdark/textures/up_arrow.png b/indra/newview/skins/blackdark/textures/up_arrow.png similarity index 100% rename from indra/newview/skins/Blackdark/textures/up_arrow.png rename to indra/newview/skins/blackdark/textures/up_arrow.png diff --git a/indra/newview/skins/Blackdark/textures/white.tga b/indra/newview/skins/blackdark/textures/white.tga similarity index 100% rename from indra/newview/skins/Blackdark/textures/white.tga rename to indra/newview/skins/blackdark/textures/white.tga diff --git a/indra/newview/skins/blacklightblue.xml b/indra/newview/skins/blacklightblue.xml index 8ade2a477..984357360 100644 --- a/indra/newview/skins/blacklightblue.xml +++ b/indra/newview/skins/blacklightblue.xml @@ -9,6 +9,6 @@ skin_info folder_name - Blacklightblue + blacklightblue diff --git a/indra/newview/skins/Blacklightblue/License and Credit.txt b/indra/newview/skins/blacklightblue/License and Credit.txt similarity index 100% rename from indra/newview/skins/Blacklightblue/License and Credit.txt rename to indra/newview/skins/blacklightblue/License and Credit.txt diff --git a/indra/newview/skins/Blacklightblue/colors.xml b/indra/newview/skins/blacklightblue/colors.xml similarity index 100% rename from indra/newview/skins/Blacklightblue/colors.xml rename to indra/newview/skins/blacklightblue/colors.xml diff --git a/indra/newview/skins/Blacklightblue/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga b/indra/newview/skins/blacklightblue/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga rename to indra/newview/skins/blacklightblue/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga diff --git a/indra/newview/skins/Blacklightblue/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga b/indra/newview/skins/blacklightblue/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga rename to indra/newview/skins/blacklightblue/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga diff --git a/indra/newview/skins/Blacklightblue/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga b/indra/newview/skins/blacklightblue/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga rename to indra/newview/skins/blacklightblue/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga diff --git a/indra/newview/skins/Blacklightblue/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga b/indra/newview/skins/blacklightblue/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga rename to indra/newview/skins/blacklightblue/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga diff --git a/indra/newview/skins/Blacklightblue/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga b/indra/newview/skins/blacklightblue/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga rename to indra/newview/skins/blacklightblue/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga diff --git a/indra/newview/skins/Blacklightblue/textures/active_speakers.tga b/indra/newview/skins/blacklightblue/textures/active_speakers.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/active_speakers.tga rename to indra/newview/skins/blacklightblue/textures/active_speakers.tga diff --git a/indra/newview/skins/Blacklightblue/textures/active_voice_tab.tga b/indra/newview/skins/blacklightblue/textures/active_voice_tab.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/active_voice_tab.tga rename to indra/newview/skins/blacklightblue/textures/active_voice_tab.tga diff --git a/indra/newview/skins/Blacklightblue/textures/arrow_down.tga b/indra/newview/skins/blacklightblue/textures/arrow_down.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/arrow_down.tga rename to indra/newview/skins/blacklightblue/textures/arrow_down.tga diff --git a/indra/newview/skins/Blacklightblue/textures/arrow_up.tga b/indra/newview/skins/blacklightblue/textures/arrow_up.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/arrow_up.tga rename to indra/newview/skins/blacklightblue/textures/arrow_up.tga diff --git a/indra/newview/skins/Blacklightblue/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga b/indra/newview/skins/blacklightblue/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga rename to indra/newview/skins/blacklightblue/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga diff --git a/indra/newview/skins/Blacklightblue/textures/badge_error.j2c b/indra/newview/skins/blacklightblue/textures/badge_error.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/badge_error.j2c rename to indra/newview/skins/blacklightblue/textures/badge_error.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/badge_note.j2c b/indra/newview/skins/blacklightblue/textures/badge_note.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/badge_note.j2c rename to indra/newview/skins/blacklightblue/textures/badge_note.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/badge_ok.j2c b/indra/newview/skins/blacklightblue/textures/badge_ok.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/badge_ok.j2c rename to indra/newview/skins/blacklightblue/textures/badge_ok.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/badge_warn.j2c b/indra/newview/skins/blacklightblue/textures/badge_warn.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/badge_warn.j2c rename to indra/newview/skins/blacklightblue/textures/badge_warn.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/btn_chatbar.tga b/indra/newview/skins/blacklightblue/textures/btn_chatbar.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/btn_chatbar.tga rename to indra/newview/skins/blacklightblue/textures/btn_chatbar.tga diff --git a/indra/newview/skins/Blacklightblue/textures/btn_chatbar_selected.tga b/indra/newview/skins/blacklightblue/textures/btn_chatbar_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/btn_chatbar_selected.tga rename to indra/newview/skins/blacklightblue/textures/btn_chatbar_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_anim_pause.tga b/indra/newview/skins/blacklightblue/textures/button_anim_pause.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_anim_pause.tga rename to indra/newview/skins/blacklightblue/textures/button_anim_pause.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_anim_pause_selected.tga b/indra/newview/skins/blacklightblue/textures/button_anim_pause_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_anim_pause_selected.tga rename to indra/newview/skins/blacklightblue/textures/button_anim_pause_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_anim_play.tga b/indra/newview/skins/blacklightblue/textures/button_anim_play.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_anim_play.tga rename to indra/newview/skins/blacklightblue/textures/button_anim_play.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_anim_play_selected.tga b/indra/newview/skins/blacklightblue/textures/button_anim_play_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_anim_play_selected.tga rename to indra/newview/skins/blacklightblue/textures/button_anim_play_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_anim_stop.tga b/indra/newview/skins/blacklightblue/textures/button_anim_stop.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_anim_stop.tga rename to indra/newview/skins/blacklightblue/textures/button_anim_stop.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_anim_stop_selected.tga b/indra/newview/skins/blacklightblue/textures/button_anim_stop_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_anim_stop_selected.tga rename to indra/newview/skins/blacklightblue/textures/button_anim_stop_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_disabled_32x128.tga b/indra/newview/skins/blacklightblue/textures/button_disabled_32x128.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_disabled_32x128.tga rename to indra/newview/skins/blacklightblue/textures/button_disabled_32x128.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_enabled_32x128.tga b/indra/newview/skins/blacklightblue/textures/button_enabled_32x128.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_enabled_32x128.tga rename to indra/newview/skins/blacklightblue/textures/button_enabled_32x128.tga diff --git a/indra/newview/skins/Blacklightblue/textures/button_enabled_selected_32x128.tga b/indra/newview/skins/blacklightblue/textures/button_enabled_selected_32x128.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/button_enabled_selected_32x128.tga rename to indra/newview/skins/blacklightblue/textures/button_enabled_selected_32x128.tga diff --git a/indra/newview/skins/Blacklightblue/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga b/indra/newview/skins/blacklightblue/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga rename to indra/newview/skins/blacklightblue/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga diff --git a/indra/newview/skins/Blacklightblue/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga b/indra/newview/skins/blacklightblue/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga rename to indra/newview/skins/blacklightblue/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga diff --git a/indra/newview/skins/Blacklightblue/textures/cam_rotate_in.tga b/indra/newview/skins/blacklightblue/textures/cam_rotate_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/cam_rotate_in.tga rename to indra/newview/skins/blacklightblue/textures/cam_rotate_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/cam_rotate_out.tga b/indra/newview/skins/blacklightblue/textures/cam_rotate_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/cam_rotate_out.tga rename to indra/newview/skins/blacklightblue/textures/cam_rotate_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/cam_tracking_in.tga b/indra/newview/skins/blacklightblue/textures/cam_tracking_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/cam_tracking_in.tga rename to indra/newview/skins/blacklightblue/textures/cam_tracking_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/cam_tracking_out.tga b/indra/newview/skins/blacklightblue/textures/cam_tracking_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/cam_tracking_out.tga rename to indra/newview/skins/blacklightblue/textures/cam_tracking_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/cam_zoom_minus_in.tga b/indra/newview/skins/blacklightblue/textures/cam_zoom_minus_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/cam_zoom_minus_in.tga rename to indra/newview/skins/blacklightblue/textures/cam_zoom_minus_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/cam_zoom_out.tga b/indra/newview/skins/blacklightblue/textures/cam_zoom_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/cam_zoom_out.tga rename to indra/newview/skins/blacklightblue/textures/cam_zoom_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/cam_zoom_plus_in.tga b/indra/newview/skins/blacklightblue/textures/cam_zoom_plus_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/cam_zoom_plus_in.tga rename to indra/newview/skins/blacklightblue/textures/cam_zoom_plus_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga b/indra/newview/skins/blacklightblue/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga rename to indra/newview/skins/blacklightblue/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga diff --git a/indra/newview/skins/Blacklightblue/textures/checkbox_disabled_false.tga b/indra/newview/skins/blacklightblue/textures/checkbox_disabled_false.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/checkbox_disabled_false.tga rename to indra/newview/skins/blacklightblue/textures/checkbox_disabled_false.tga diff --git a/indra/newview/skins/Blacklightblue/textures/checkbox_disabled_true.tga b/indra/newview/skins/blacklightblue/textures/checkbox_disabled_true.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/checkbox_disabled_true.tga rename to indra/newview/skins/blacklightblue/textures/checkbox_disabled_true.tga diff --git a/indra/newview/skins/Blacklightblue/textures/checkbox_enabled_false.tga b/indra/newview/skins/blacklightblue/textures/checkbox_enabled_false.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/checkbox_enabled_false.tga rename to indra/newview/skins/blacklightblue/textures/checkbox_enabled_false.tga diff --git a/indra/newview/skins/Blacklightblue/textures/checkbox_enabled_true.tga b/indra/newview/skins/blacklightblue/textures/checkbox_enabled_true.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/checkbox_enabled_true.tga rename to indra/newview/skins/blacklightblue/textures/checkbox_enabled_true.tga diff --git a/indra/newview/skins/Blacklightblue/textures/close_in_blue.tga b/indra/newview/skins/blacklightblue/textures/close_in_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/close_in_blue.tga rename to indra/newview/skins/blacklightblue/textures/close_in_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/close_inactive_blue.tga b/indra/newview/skins/blacklightblue/textures/close_inactive_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/close_inactive_blue.tga rename to indra/newview/skins/blacklightblue/textures/close_inactive_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/closebox.tga b/indra/newview/skins/blacklightblue/textures/closebox.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/closebox.tga rename to indra/newview/skins/blacklightblue/textures/closebox.tga diff --git a/indra/newview/skins/Blacklightblue/textures/combobox_arrow.tga b/indra/newview/skins/blacklightblue/textures/combobox_arrow.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/combobox_arrow.tga rename to indra/newview/skins/blacklightblue/textures/combobox_arrow.tga diff --git a/indra/newview/skins/Blacklightblue/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c b/indra/newview/skins/blacklightblue/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c rename to indra/newview/skins/blacklightblue/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/default_land_picture.j2c b/indra/newview/skins/blacklightblue/textures/default_land_picture.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/default_land_picture.j2c rename to indra/newview/skins/blacklightblue/textures/default_land_picture.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/default_profile_picture.j2c b/indra/newview/skins/blacklightblue/textures/default_profile_picture.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/default_profile_picture.j2c rename to indra/newview/skins/blacklightblue/textures/default_profile_picture.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/direction_arrow.tga b/indra/newview/skins/blacklightblue/textures/direction_arrow.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/direction_arrow.tga rename to indra/newview/skins/blacklightblue/textures/direction_arrow.tga diff --git a/indra/newview/skins/Blacklightblue/textures/down_arrow.png b/indra/newview/skins/blacklightblue/textures/down_arrow.png similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/down_arrow.png rename to indra/newview/skins/blacklightblue/textures/down_arrow.png diff --git a/indra/newview/skins/Blacklightblue/textures/eye_button_active.tga b/indra/newview/skins/blacklightblue/textures/eye_button_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/eye_button_active.tga rename to indra/newview/skins/blacklightblue/textures/eye_button_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/eye_button_inactive.tga b/indra/newview/skins/blacklightblue/textures/eye_button_inactive.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/eye_button_inactive.tga rename to indra/newview/skins/blacklightblue/textures/eye_button_inactive.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga b/indra/newview/skins/blacklightblue/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga rename to indra/newview/skins/blacklightblue/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff_edit_mine_button.tga b/indra/newview/skins/blacklightblue/textures/ff_edit_mine_button.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff_edit_mine_button.tga rename to indra/newview/skins/blacklightblue/textures/ff_edit_mine_button.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff_edit_theirs_button.tga b/indra/newview/skins/blacklightblue/textures/ff_edit_theirs_button.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff_edit_theirs_button.tga rename to indra/newview/skins/blacklightblue/textures/ff_edit_theirs_button.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff_online_status_button.tga b/indra/newview/skins/blacklightblue/textures/ff_online_status_button.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff_online_status_button.tga rename to indra/newview/skins/blacklightblue/textures/ff_online_status_button.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff_visible_map.tga b/indra/newview/skins/blacklightblue/textures/ff_visible_map.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff_visible_map.tga rename to indra/newview/skins/blacklightblue/textures/ff_visible_map.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff_visible_map_button.tga b/indra/newview/skins/blacklightblue/textures/ff_visible_map_button.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff_visible_map_button.tga rename to indra/newview/skins/blacklightblue/textures/ff_visible_map_button.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff_visible_online.tga b/indra/newview/skins/blacklightblue/textures/ff_visible_online.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff_visible_online.tga rename to indra/newview/skins/blacklightblue/textures/ff_visible_online.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ff_visible_online_button.tga b/indra/newview/skins/blacklightblue/textures/ff_visible_online_button.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ff_visible_online_button.tga rename to indra/newview/skins/blacklightblue/textures/ff_visible_online_button.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_btn_left.tga b/indra/newview/skins/blacklightblue/textures/flyout_btn_left.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_btn_left.tga rename to indra/newview/skins/blacklightblue/textures/flyout_btn_left.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_btn_left_disabled.tga b/indra/newview/skins/blacklightblue/textures/flyout_btn_left_disabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_btn_left_disabled.tga rename to indra/newview/skins/blacklightblue/textures/flyout_btn_left_disabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_btn_left_selected.tga b/indra/newview/skins/blacklightblue/textures/flyout_btn_left_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_btn_left_selected.tga rename to indra/newview/skins/blacklightblue/textures/flyout_btn_left_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_btn_right.tga b/indra/newview/skins/blacklightblue/textures/flyout_btn_right.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_btn_right.tga rename to indra/newview/skins/blacklightblue/textures/flyout_btn_right.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_btn_right_disabled.tga b/indra/newview/skins/blacklightblue/textures/flyout_btn_right_disabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_btn_right_disabled.tga rename to indra/newview/skins/blacklightblue/textures/flyout_btn_right_disabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_btn_right_selected.tga b/indra/newview/skins/blacklightblue/textures/flyout_btn_right_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_btn_right_selected.tga rename to indra/newview/skins/blacklightblue/textures/flyout_btn_right_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_left.tga b/indra/newview/skins/blacklightblue/textures/flyout_left.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_left.tga rename to indra/newview/skins/blacklightblue/textures/flyout_left.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_left_disabled.tga b/indra/newview/skins/blacklightblue/textures/flyout_left_disabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_left_disabled.tga rename to indra/newview/skins/blacklightblue/textures/flyout_left_disabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/flyout_left_selected.tga b/indra/newview/skins/blacklightblue/textures/flyout_left_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/flyout_left_selected.tga rename to indra/newview/skins/blacklightblue/textures/flyout_left_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/folder_arrow.tga b/indra/newview/skins/blacklightblue/textures/folder_arrow.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/folder_arrow.tga rename to indra/newview/skins/blacklightblue/textures/folder_arrow.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_chatbar.tga b/indra/newview/skins/blacklightblue/textures/icn_chatbar.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_chatbar.tga rename to indra/newview/skins/blacklightblue/textures/icn_chatbar.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_label_media.tga b/indra/newview/skins/blacklightblue/textures/icn_label_media.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_label_media.tga rename to indra/newview/skins/blacklightblue/textures/icn_label_media.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_label_music.tga b/indra/newview/skins/blacklightblue/textures/icn_label_music.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_label_music.tga rename to indra/newview/skins/blacklightblue/textures/icn_label_music.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_label_web.tga b/indra/newview/skins/blacklightblue/textures/icn_label_web.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_label_web.tga rename to indra/newview/skins/blacklightblue/textures/icn_label_web.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-pause_active.tga b/indra/newview/skins/blacklightblue/textures/icn_media-pause_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-pause_active.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-pause_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-pause_disabled.tga b/indra/newview/skins/blacklightblue/textures/icn_media-pause_disabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-pause_disabled.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-pause_disabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-pause_enabled.tga b/indra/newview/skins/blacklightblue/textures/icn_media-pause_enabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-pause_enabled.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-pause_enabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-play_active.tga b/indra/newview/skins/blacklightblue/textures/icn_media-play_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-play_active.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-play_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-play_disabled.tga b/indra/newview/skins/blacklightblue/textures/icn_media-play_disabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-play_disabled.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-play_disabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-play_enabled.tga b/indra/newview/skins/blacklightblue/textures/icn_media-play_enabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-play_enabled.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-play_enabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-stop_active.tga b/indra/newview/skins/blacklightblue/textures/icn_media-stop_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-stop_active.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-stop_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-stop_disabled.tga b/indra/newview/skins/blacklightblue/textures/icn_media-stop_disabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-stop_disabled.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-stop_disabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media-stop_enabled.tga b/indra/newview/skins/blacklightblue/textures/icn_media-stop_enabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media-stop_enabled.tga rename to indra/newview/skins/blacklightblue/textures/icn_media-stop_enabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media.tga b/indra/newview/skins/blacklightblue/textures/icn_media.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media.tga rename to indra/newview/skins/blacklightblue/textures/icn_media.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media_movie.tga b/indra/newview/skins/blacklightblue/textures/icn_media_movie.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media_movie.tga rename to indra/newview/skins/blacklightblue/textures/icn_media_movie.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_media_web.tga b/indra/newview/skins/blacklightblue/textures/icn_media_web.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_media_web.tga rename to indra/newview/skins/blacklightblue/textures/icn_media_web.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_music-play.tga b/indra/newview/skins/blacklightblue/textures/icn_music-play.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_music-play.tga rename to indra/newview/skins/blacklightblue/textures/icn_music-play.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_music.tga b/indra/newview/skins/blacklightblue/textures/icn_music.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_music.tga rename to indra/newview/skins/blacklightblue/textures/icn_music.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_pause.tga b/indra/newview/skins/blacklightblue/textures/icn_pause.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_pause.tga rename to indra/newview/skins/blacklightblue/textures/icn_pause.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_play.tga b/indra/newview/skins/blacklightblue/textures/icn_play.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_play.tga rename to indra/newview/skins/blacklightblue/textures/icn_play.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_rounded-text-field.tga b/indra/newview/skins/blacklightblue/textures/icn_rounded-text-field.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_rounded-text-field.tga rename to indra/newview/skins/blacklightblue/textures/icn_rounded-text-field.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_slide-groove_dark.tga b/indra/newview/skins/blacklightblue/textures/icn_slide-groove_dark.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_slide-groove_dark.tga rename to indra/newview/skins/blacklightblue/textures/icn_slide-groove_dark.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_slide-highlight.tga b/indra/newview/skins/blacklightblue/textures/icn_slide-highlight.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_slide-highlight.tga rename to indra/newview/skins/blacklightblue/textures/icn_slide-highlight.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_slide-thumb_dark.tga b/indra/newview/skins/blacklightblue/textures/icn_slide-thumb_dark.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_slide-thumb_dark.tga rename to indra/newview/skins/blacklightblue/textures/icn_slide-thumb_dark.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_speaker-muted_dark.tga b/indra/newview/skins/blacklightblue/textures/icn_speaker-muted_dark.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_speaker-muted_dark.tga rename to indra/newview/skins/blacklightblue/textures/icn_speaker-muted_dark.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_speaker_dark.tga b/indra/newview/skins/blacklightblue/textures/icn_speaker_dark.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_speaker_dark.tga rename to indra/newview/skins/blacklightblue/textures/icn_speaker_dark.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_stop.tga b/indra/newview/skins/blacklightblue/textures/icn_stop.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_stop.tga rename to indra/newview/skins/blacklightblue/textures/icn_stop.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_toolbar_radar.tga b/indra/newview/skins/blacklightblue/textures/icn_toolbar_radar.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_toolbar_radar.tga rename to indra/newview/skins/blacklightblue/textures/icn_toolbar_radar.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice-groupfocus.tga b/indra/newview/skins/blacklightblue/textures/icn_voice-groupfocus.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice-groupfocus.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice-groupfocus.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice-localchat.tga b/indra/newview/skins/blacklightblue/textures/icn_voice-localchat.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice-localchat.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice-localchat.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice-pvtfocus.tga b/indra/newview/skins/blacklightblue/textures/icn_voice-pvtfocus.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice-pvtfocus.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice-pvtfocus.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-off.tga b/indra/newview/skins/blacklightblue/textures/icn_voice_ptt-off.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-off.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice_ptt-off.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on-lvl1.tga b/indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on-lvl1.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on-lvl1.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on-lvl1.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on-lvl2.tga b/indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on-lvl2.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on-lvl2.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on-lvl2.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on-lvl3.tga b/indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on-lvl3.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on-lvl3.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on-lvl3.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on.tga b/indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icn_voice_ptt-on.tga rename to indra/newview/skins/blacklightblue/textures/icn_voice_ptt-on.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_auction.tga b/indra/newview/skins/blacklightblue/textures/icon_auction.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_auction.tga rename to indra/newview/skins/blacklightblue/textures/icon_auction.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_avatar_offline.tga b/indra/newview/skins/blacklightblue/textures/icon_avatar_offline.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_avatar_offline.tga rename to indra/newview/skins/blacklightblue/textures/icon_avatar_offline.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_avatar_online.tga b/indra/newview/skins/blacklightblue/textures/icon_avatar_online.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_avatar_online.tga rename to indra/newview/skins/blacklightblue/textures/icon_avatar_online.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_diurnal.tga b/indra/newview/skins/blacklightblue/textures/icon_diurnal.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_diurnal.tga rename to indra/newview/skins/blacklightblue/textures/icon_diurnal.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_event.tga b/indra/newview/skins/blacklightblue/textures/icon_event.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_event.tga rename to indra/newview/skins/blacklightblue/textures/icon_event.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_event_adult.tga b/indra/newview/skins/blacklightblue/textures/icon_event_adult.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_event_adult.tga rename to indra/newview/skins/blacklightblue/textures/icon_event_adult.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_event_mature.tga b/indra/newview/skins/blacklightblue/textures/icon_event_mature.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_event_mature.tga rename to indra/newview/skins/blacklightblue/textures/icon_event_mature.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_for_sale.tga b/indra/newview/skins/blacklightblue/textures/icon_for_sale.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_for_sale.tga rename to indra/newview/skins/blacklightblue/textures/icon_for_sale.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_for_sale_adult.tga b/indra/newview/skins/blacklightblue/textures/icon_for_sale_adult.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_for_sale_adult.tga rename to indra/newview/skins/blacklightblue/textures/icon_for_sale_adult.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_group.tga b/indra/newview/skins/blacklightblue/textures/icon_group.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_group.tga rename to indra/newview/skins/blacklightblue/textures/icon_group.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_groupnotice.tga b/indra/newview/skins/blacklightblue/textures/icon_groupnotice.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_groupnotice.tga rename to indra/newview/skins/blacklightblue/textures/icon_groupnotice.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_groupnoticeinventory.tga b/indra/newview/skins/blacklightblue/textures/icon_groupnoticeinventory.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_groupnoticeinventory.tga rename to indra/newview/skins/blacklightblue/textures/icon_groupnoticeinventory.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_lock.tga b/indra/newview/skins/blacklightblue/textures/icon_lock.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_lock.tga rename to indra/newview/skins/blacklightblue/textures/icon_lock.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_place.tga b/indra/newview/skins/blacklightblue/textures/icon_place.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_place.tga rename to indra/newview/skins/blacklightblue/textures/icon_place.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_popular.tga b/indra/newview/skins/blacklightblue/textures/icon_popular.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_popular.tga rename to indra/newview/skins/blacklightblue/textures/icon_popular.tga diff --git a/indra/newview/skins/Blacklightblue/textures/icon_top_pick.tga b/indra/newview/skins/blacklightblue/textures/icon_top_pick.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/icon_top_pick.tga rename to indra/newview/skins/blacklightblue/textures/icon_top_pick.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_animation.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_animation.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_animation.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_animation.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_bodypart.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_bodypart.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_bodypart.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_bodypart.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_callingcard.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_callingcard.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_callingcard.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_callingcard.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_clothing.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_clothing.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_clothing.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_clothing.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_gesture.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_gesture.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_gesture.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_gesture.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_landmark.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_landmark.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_landmark.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_landmark.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_lostandfound.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_lostandfound.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_lostandfound.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_lostandfound.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_notecard.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_notecard.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_notecard.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_notecard.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_object.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_object.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_object.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_object.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_plain_closed.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_plain_closed.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_plain_closed.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_plain_closed.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_plain_open.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_plain_open.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_plain_open.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_plain_open.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_script.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_script.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_script.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_script.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_snapshot.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_snapshot.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_snapshot.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_snapshot.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_sound.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_sound.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_sound.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_sound.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_texture.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_texture.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_texture.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_texture.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_folder_trash.tga b/indra/newview/skins/blacklightblue/textures/inv_folder_trash.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_folder_trash.tga rename to indra/newview/skins/blacklightblue/textures/inv_folder_trash.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_animation.tga b/indra/newview/skins/blacklightblue/textures/inv_item_animation.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_animation.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_animation.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_attach.tga b/indra/newview/skins/blacklightblue/textures/inv_item_attach.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_attach.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_attach.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_callingcard_offline.tga b/indra/newview/skins/blacklightblue/textures/inv_item_callingcard_offline.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_callingcard_offline.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_callingcard_offline.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_callingcard_online.tga b/indra/newview/skins/blacklightblue/textures/inv_item_callingcard_online.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_callingcard_online.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_callingcard_online.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_clothing.tga b/indra/newview/skins/blacklightblue/textures/inv_item_clothing.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_clothing.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_clothing.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_eyes.tga b/indra/newview/skins/blacklightblue/textures/inv_item_eyes.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_eyes.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_eyes.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_gesture.tga b/indra/newview/skins/blacklightblue/textures/inv_item_gesture.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_gesture.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_gesture.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_gloves.tga b/indra/newview/skins/blacklightblue/textures/inv_item_gloves.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_gloves.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_gloves.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_hair.tga b/indra/newview/skins/blacklightblue/textures/inv_item_hair.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_hair.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_hair.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_jacket.tga b/indra/newview/skins/blacklightblue/textures/inv_item_jacket.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_jacket.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_jacket.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_landmark.tga b/indra/newview/skins/blacklightblue/textures/inv_item_landmark.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_landmark.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_landmark.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_landmark_visited.tga b/indra/newview/skins/blacklightblue/textures/inv_item_landmark_visited.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_landmark_visited.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_landmark_visited.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_notecard.tga b/indra/newview/skins/blacklightblue/textures/inv_item_notecard.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_notecard.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_notecard.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_object.tga b/indra/newview/skins/blacklightblue/textures/inv_item_object.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_object.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_object.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_object_multi.tga b/indra/newview/skins/blacklightblue/textures/inv_item_object_multi.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_object_multi.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_object_multi.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_pants.tga b/indra/newview/skins/blacklightblue/textures/inv_item_pants.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_pants.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_pants.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_script.tga b/indra/newview/skins/blacklightblue/textures/inv_item_script.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_script.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_script.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_script_dangerous.tga b/indra/newview/skins/blacklightblue/textures/inv_item_script_dangerous.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_script_dangerous.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_script_dangerous.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_shape.tga b/indra/newview/skins/blacklightblue/textures/inv_item_shape.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_shape.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_shape.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_shirt.tga b/indra/newview/skins/blacklightblue/textures/inv_item_shirt.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_shirt.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_shirt.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_shoes.tga b/indra/newview/skins/blacklightblue/textures/inv_item_shoes.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_shoes.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_shoes.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_skin.tga b/indra/newview/skins/blacklightblue/textures/inv_item_skin.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_skin.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_skin.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_skirt.tga b/indra/newview/skins/blacklightblue/textures/inv_item_skirt.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_skirt.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_skirt.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_snapshot.tga b/indra/newview/skins/blacklightblue/textures/inv_item_snapshot.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_snapshot.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_snapshot.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_socks.tga b/indra/newview/skins/blacklightblue/textures/inv_item_socks.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_socks.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_socks.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_sound.tga b/indra/newview/skins/blacklightblue/textures/inv_item_sound.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_sound.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_sound.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_texture.tga b/indra/newview/skins/blacklightblue/textures/inv_item_texture.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_texture.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_texture.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_underpants.tga b/indra/newview/skins/blacklightblue/textures/inv_item_underpants.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_underpants.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_underpants.tga diff --git a/indra/newview/skins/Blacklightblue/textures/inv_item_undershirt.tga b/indra/newview/skins/blacklightblue/textures/inv_item_undershirt.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/inv_item_undershirt.tga rename to indra/newview/skins/blacklightblue/textures/inv_item_undershirt.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_avatar_16.tga b/indra/newview/skins/blacklightblue/textures/map_avatar_16.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_avatar_16.tga rename to indra/newview/skins/blacklightblue/textures/map_avatar_16.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_avatar_8.tga b/indra/newview/skins/blacklightblue/textures/map_avatar_8.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_avatar_8.tga rename to indra/newview/skins/blacklightblue/textures/map_avatar_8.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_avatar_above_8.tga b/indra/newview/skins/blacklightblue/textures/map_avatar_above_8.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_avatar_above_8.tga rename to indra/newview/skins/blacklightblue/textures/map_avatar_above_8.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_avatar_below_8.tga b/indra/newview/skins/blacklightblue/textures/map_avatar_below_8.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_avatar_below_8.tga rename to indra/newview/skins/blacklightblue/textures/map_avatar_below_8.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_avatar_you_8.tga b/indra/newview/skins/blacklightblue/textures/map_avatar_you_8.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_avatar_you_8.tga rename to indra/newview/skins/blacklightblue/textures/map_avatar_you_8.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_event.tga b/indra/newview/skins/blacklightblue/textures/map_event.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_event.tga rename to indra/newview/skins/blacklightblue/textures/map_event.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_event_adult.tga b/indra/newview/skins/blacklightblue/textures/map_event_adult.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_event_adult.tga rename to indra/newview/skins/blacklightblue/textures/map_event_adult.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_event_mature.tga b/indra/newview/skins/blacklightblue/textures/map_event_mature.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_event_mature.tga rename to indra/newview/skins/blacklightblue/textures/map_event_mature.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_home.tga b/indra/newview/skins/blacklightblue/textures/map_home.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_home.tga rename to indra/newview/skins/blacklightblue/textures/map_home.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_infohub.tga b/indra/newview/skins/blacklightblue/textures/map_infohub.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_infohub.tga rename to indra/newview/skins/blacklightblue/textures/map_infohub.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_telehub.tga b/indra/newview/skins/blacklightblue/textures/map_telehub.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_telehub.tga rename to indra/newview/skins/blacklightblue/textures/map_telehub.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_track_16.tga b/indra/newview/skins/blacklightblue/textures/map_track_16.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_track_16.tga rename to indra/newview/skins/blacklightblue/textures/map_track_16.tga diff --git a/indra/newview/skins/Blacklightblue/textures/map_track_8.tga b/indra/newview/skins/blacklightblue/textures/map_track_8.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/map_track_8.tga rename to indra/newview/skins/blacklightblue/textures/map_track_8.tga diff --git a/indra/newview/skins/Blacklightblue/textures/media_icon.tga b/indra/newview/skins/blacklightblue/textures/media_icon.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/media_icon.tga rename to indra/newview/skins/blacklightblue/textures/media_icon.tga diff --git a/indra/newview/skins/Blacklightblue/textures/minimize.tga b/indra/newview/skins/blacklightblue/textures/minimize.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/minimize.tga rename to indra/newview/skins/blacklightblue/textures/minimize.tga diff --git a/indra/newview/skins/Blacklightblue/textures/minimize_inactive.tga b/indra/newview/skins/blacklightblue/textures/minimize_inactive.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/minimize_inactive.tga rename to indra/newview/skins/blacklightblue/textures/minimize_inactive.tga diff --git a/indra/newview/skins/Blacklightblue/textures/minimize_pressed.tga b/indra/newview/skins/blacklightblue/textures/minimize_pressed.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/minimize_pressed.tga rename to indra/newview/skins/blacklightblue/textures/minimize_pressed.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_backward_in.tga b/indra/newview/skins/blacklightblue/textures/move_backward_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_backward_in.tga rename to indra/newview/skins/blacklightblue/textures/move_backward_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_backward_out.tga b/indra/newview/skins/blacklightblue/textures/move_backward_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_backward_out.tga rename to indra/newview/skins/blacklightblue/textures/move_backward_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_down_in.tga b/indra/newview/skins/blacklightblue/textures/move_down_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_down_in.tga rename to indra/newview/skins/blacklightblue/textures/move_down_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_down_out.tga b/indra/newview/skins/blacklightblue/textures/move_down_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_down_out.tga rename to indra/newview/skins/blacklightblue/textures/move_down_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_forward_in.tga b/indra/newview/skins/blacklightblue/textures/move_forward_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_forward_in.tga rename to indra/newview/skins/blacklightblue/textures/move_forward_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_forward_out.tga b/indra/newview/skins/blacklightblue/textures/move_forward_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_forward_out.tga rename to indra/newview/skins/blacklightblue/textures/move_forward_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_left_in.tga b/indra/newview/skins/blacklightblue/textures/move_left_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_left_in.tga rename to indra/newview/skins/blacklightblue/textures/move_left_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_left_out.tga b/indra/newview/skins/blacklightblue/textures/move_left_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_left_out.tga rename to indra/newview/skins/blacklightblue/textures/move_left_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_right_in.tga b/indra/newview/skins/blacklightblue/textures/move_right_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_right_in.tga rename to indra/newview/skins/blacklightblue/textures/move_right_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_right_out.tga b/indra/newview/skins/blacklightblue/textures/move_right_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_right_out.tga rename to indra/newview/skins/blacklightblue/textures/move_right_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_turn_left_in.tga b/indra/newview/skins/blacklightblue/textures/move_turn_left_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_turn_left_in.tga rename to indra/newview/skins/blacklightblue/textures/move_turn_left_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_turn_left_out.tga b/indra/newview/skins/blacklightblue/textures/move_turn_left_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_turn_left_out.tga rename to indra/newview/skins/blacklightblue/textures/move_turn_left_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_turn_right_in.tga b/indra/newview/skins/blacklightblue/textures/move_turn_right_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_turn_right_in.tga rename to indra/newview/skins/blacklightblue/textures/move_turn_right_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_turn_right_out.tga b/indra/newview/skins/blacklightblue/textures/move_turn_right_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_turn_right_out.tga rename to indra/newview/skins/blacklightblue/textures/move_turn_right_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_up_in.tga b/indra/newview/skins/blacklightblue/textures/move_up_in.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_up_in.tga rename to indra/newview/skins/blacklightblue/textures/move_up_in.tga diff --git a/indra/newview/skins/Blacklightblue/textures/move_up_out.tga b/indra/newview/skins/blacklightblue/textures/move_up_out.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/move_up_out.tga rename to indra/newview/skins/blacklightblue/textures/move_up_out.tga diff --git a/indra/newview/skins/Blacklightblue/textures/mute_icon.tga b/indra/newview/skins/blacklightblue/textures/mute_icon.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/mute_icon.tga rename to indra/newview/skins/blacklightblue/textures/mute_icon.tga diff --git a/indra/newview/skins/Blacklightblue/textures/notify_box_icon.tga b/indra/newview/skins/blacklightblue/textures/notify_box_icon.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/notify_box_icon.tga rename to indra/newview/skins/blacklightblue/textures/notify_box_icon.tga diff --git a/indra/newview/skins/Blacklightblue/textures/notify_caution_icon.tga b/indra/newview/skins/blacklightblue/textures/notify_caution_icon.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/notify_caution_icon.tga rename to indra/newview/skins/blacklightblue/textures/notify_caution_icon.tga diff --git a/indra/newview/skins/Blacklightblue/textures/notify_next.png b/indra/newview/skins/blacklightblue/textures/notify_next.png similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/notify_next.png rename to indra/newview/skins/blacklightblue/textures/notify_next.png diff --git a/indra/newview/skins/Blacklightblue/textures/notify_tip_icon.tga b/indra/newview/skins/blacklightblue/textures/notify_tip_icon.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/notify_tip_icon.tga rename to indra/newview/skins/blacklightblue/textures/notify_tip_icon.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_cone.tga b/indra/newview/skins/blacklightblue/textures/object_cone.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_cone.tga rename to indra/newview/skins/blacklightblue/textures/object_cone.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_cone_active.tga b/indra/newview/skins/blacklightblue/textures/object_cone_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_cone_active.tga rename to indra/newview/skins/blacklightblue/textures/object_cone_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_cube.tga b/indra/newview/skins/blacklightblue/textures/object_cube.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_cube.tga rename to indra/newview/skins/blacklightblue/textures/object_cube.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_cube_active.tga b/indra/newview/skins/blacklightblue/textures/object_cube_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_cube_active.tga rename to indra/newview/skins/blacklightblue/textures/object_cube_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_cylinder.tga b/indra/newview/skins/blacklightblue/textures/object_cylinder.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_cylinder.tga rename to indra/newview/skins/blacklightblue/textures/object_cylinder.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_cylinder_active.tga b/indra/newview/skins/blacklightblue/textures/object_cylinder_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_cylinder_active.tga rename to indra/newview/skins/blacklightblue/textures/object_cylinder_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_grass.tga b/indra/newview/skins/blacklightblue/textures/object_grass.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_grass.tga rename to indra/newview/skins/blacklightblue/textures/object_grass.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_grass_active.tga b/indra/newview/skins/blacklightblue/textures/object_grass_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_grass_active.tga rename to indra/newview/skins/blacklightblue/textures/object_grass_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_hemi_cone.tga b/indra/newview/skins/blacklightblue/textures/object_hemi_cone.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_hemi_cone.tga rename to indra/newview/skins/blacklightblue/textures/object_hemi_cone.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_hemi_cone_active.tga b/indra/newview/skins/blacklightblue/textures/object_hemi_cone_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_hemi_cone_active.tga rename to indra/newview/skins/blacklightblue/textures/object_hemi_cone_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_hemi_cylinder.tga b/indra/newview/skins/blacklightblue/textures/object_hemi_cylinder.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_hemi_cylinder.tga rename to indra/newview/skins/blacklightblue/textures/object_hemi_cylinder.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_hemi_cylinder_active.tga b/indra/newview/skins/blacklightblue/textures/object_hemi_cylinder_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_hemi_cylinder_active.tga rename to indra/newview/skins/blacklightblue/textures/object_hemi_cylinder_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_hemi_sphere.tga b/indra/newview/skins/blacklightblue/textures/object_hemi_sphere.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_hemi_sphere.tga rename to indra/newview/skins/blacklightblue/textures/object_hemi_sphere.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_hemi_sphere_active.tga b/indra/newview/skins/blacklightblue/textures/object_hemi_sphere_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_hemi_sphere_active.tga rename to indra/newview/skins/blacklightblue/textures/object_hemi_sphere_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_prism.tga b/indra/newview/skins/blacklightblue/textures/object_prism.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_prism.tga rename to indra/newview/skins/blacklightblue/textures/object_prism.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_prism_active.tga b/indra/newview/skins/blacklightblue/textures/object_prism_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_prism_active.tga rename to indra/newview/skins/blacklightblue/textures/object_prism_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_pyramid.tga b/indra/newview/skins/blacklightblue/textures/object_pyramid.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_pyramid.tga rename to indra/newview/skins/blacklightblue/textures/object_pyramid.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_pyramid_active.tga b/indra/newview/skins/blacklightblue/textures/object_pyramid_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_pyramid_active.tga rename to indra/newview/skins/blacklightblue/textures/object_pyramid_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_ring.tga b/indra/newview/skins/blacklightblue/textures/object_ring.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_ring.tga rename to indra/newview/skins/blacklightblue/textures/object_ring.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_ring_active.tga b/indra/newview/skins/blacklightblue/textures/object_ring_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_ring_active.tga rename to indra/newview/skins/blacklightblue/textures/object_ring_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_sphere.tga b/indra/newview/skins/blacklightblue/textures/object_sphere.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_sphere.tga rename to indra/newview/skins/blacklightblue/textures/object_sphere.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_sphere_active.tga b/indra/newview/skins/blacklightblue/textures/object_sphere_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_sphere_active.tga rename to indra/newview/skins/blacklightblue/textures/object_sphere_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_tetrahedron.tga b/indra/newview/skins/blacklightblue/textures/object_tetrahedron.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_tetrahedron.tga rename to indra/newview/skins/blacklightblue/textures/object_tetrahedron.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_tetrahedron_active.tga b/indra/newview/skins/blacklightblue/textures/object_tetrahedron_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_tetrahedron_active.tga rename to indra/newview/skins/blacklightblue/textures/object_tetrahedron_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_torus.tga b/indra/newview/skins/blacklightblue/textures/object_torus.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_torus.tga rename to indra/newview/skins/blacklightblue/textures/object_torus.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_torus_active.tga b/indra/newview/skins/blacklightblue/textures/object_torus_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_torus_active.tga rename to indra/newview/skins/blacklightblue/textures/object_torus_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_tree.tga b/indra/newview/skins/blacklightblue/textures/object_tree.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_tree.tga rename to indra/newview/skins/blacklightblue/textures/object_tree.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_tree_active.tga b/indra/newview/skins/blacklightblue/textures/object_tree_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_tree_active.tga rename to indra/newview/skins/blacklightblue/textures/object_tree_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_tube.tga b/indra/newview/skins/blacklightblue/textures/object_tube.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_tube.tga rename to indra/newview/skins/blacklightblue/textures/object_tube.tga diff --git a/indra/newview/skins/Blacklightblue/textures/object_tube_active.tga b/indra/newview/skins/blacklightblue/textures/object_tube_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/object_tube_active.tga rename to indra/newview/skins/blacklightblue/textures/object_tube_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/preview.png b/indra/newview/skins/blacklightblue/textures/preview.png similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/preview.png rename to indra/newview/skins/blacklightblue/textures/preview.png diff --git a/indra/newview/skins/Blacklightblue/textures/progress_fill.tga b/indra/newview/skins/blacklightblue/textures/progress_fill.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/progress_fill.tga rename to indra/newview/skins/blacklightblue/textures/progress_fill.tga diff --git a/indra/newview/skins/Blacklightblue/textures/progressbar_fill.tga b/indra/newview/skins/blacklightblue/textures/progressbar_fill.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/progressbar_fill.tga rename to indra/newview/skins/blacklightblue/textures/progressbar_fill.tga diff --git a/indra/newview/skins/Blacklightblue/textures/progressbar_track.tga b/indra/newview/skins/blacklightblue/textures/progressbar_track.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/progressbar_track.tga rename to indra/newview/skins/blacklightblue/textures/progressbar_track.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ptt_lock_off.tga b/indra/newview/skins/blacklightblue/textures/ptt_lock_off.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ptt_lock_off.tga rename to indra/newview/skins/blacklightblue/textures/ptt_lock_off.tga diff --git a/indra/newview/skins/Blacklightblue/textures/ptt_lock_on.tga b/indra/newview/skins/blacklightblue/textures/ptt_lock_on.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/ptt_lock_on.tga rename to indra/newview/skins/blacklightblue/textures/ptt_lock_on.tga diff --git a/indra/newview/skins/Blacklightblue/textures/radio_active_false.tga b/indra/newview/skins/blacklightblue/textures/radio_active_false.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/radio_active_false.tga rename to indra/newview/skins/blacklightblue/textures/radio_active_false.tga diff --git a/indra/newview/skins/Blacklightblue/textures/radio_active_true.tga b/indra/newview/skins/blacklightblue/textures/radio_active_true.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/radio_active_true.tga rename to indra/newview/skins/blacklightblue/textures/radio_active_true.tga diff --git a/indra/newview/skins/Blacklightblue/textures/radio_inactive_false.tga b/indra/newview/skins/blacklightblue/textures/radio_inactive_false.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/radio_inactive_false.tga rename to indra/newview/skins/blacklightblue/textures/radio_inactive_false.tga diff --git a/indra/newview/skins/Blacklightblue/textures/radio_inactive_true.tga b/indra/newview/skins/blacklightblue/textures/radio_inactive_true.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/radio_inactive_true.tga rename to indra/newview/skins/blacklightblue/textures/radio_inactive_true.tga diff --git a/indra/newview/skins/Blacklightblue/textures/resize_handle_bottom_right_blue.tga b/indra/newview/skins/blacklightblue/textures/resize_handle_bottom_right_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/resize_handle_bottom_right_blue.tga rename to indra/newview/skins/blacklightblue/textures/resize_handle_bottom_right_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/restore.tga b/indra/newview/skins/blacklightblue/textures/restore.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/restore.tga rename to indra/newview/skins/blacklightblue/textures/restore.tga diff --git a/indra/newview/skins/Blacklightblue/textures/restore_inactive.tga b/indra/newview/skins/blacklightblue/textures/restore_inactive.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/restore_inactive.tga rename to indra/newview/skins/blacklightblue/textures/restore_inactive.tga diff --git a/indra/newview/skins/Blacklightblue/textures/restore_pressed.tga b/indra/newview/skins/blacklightblue/textures/restore_pressed.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/restore_pressed.tga rename to indra/newview/skins/blacklightblue/textures/restore_pressed.tga diff --git a/indra/newview/skins/Blacklightblue/textures/rounded_square.j2c b/indra/newview/skins/blacklightblue/textures/rounded_square.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/rounded_square.j2c rename to indra/newview/skins/blacklightblue/textures/rounded_square.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/rounded_square.tga b/indra/newview/skins/blacklightblue/textures/rounded_square.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/rounded_square.tga rename to indra/newview/skins/blacklightblue/textures/rounded_square.tga diff --git a/indra/newview/skins/Blacklightblue/textures/rounded_square_soft.tga b/indra/newview/skins/blacklightblue/textures/rounded_square_soft.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/rounded_square_soft.tga rename to indra/newview/skins/blacklightblue/textures/rounded_square_soft.tga diff --git a/indra/newview/skins/Blacklightblue/textures/script_error.j2c b/indra/newview/skins/blacklightblue/textures/script_error.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/script_error.j2c rename to indra/newview/skins/blacklightblue/textures/script_error.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/script_error.tga b/indra/newview/skins/blacklightblue/textures/script_error.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/script_error.tga rename to indra/newview/skins/blacklightblue/textures/script_error.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_down_in_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_down_in_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_down_in_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_down_in_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_down_out_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_down_out_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_down_out_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_down_out_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_left_in_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_left_in_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_left_in_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_left_in_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_left_out_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_left_out_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_left_out_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_left_out_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_right_in_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_right_in_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_right_in_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_right_in_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_right_out_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_right_out_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_right_out_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_right_out_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_up_in_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_up_in_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_up_in_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_up_in_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/scrollbutton_up_out_blue.tga b/indra/newview/skins/blacklightblue/textures/scrollbutton_up_out_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/scrollbutton_up_out_blue.tga rename to indra/newview/skins/blacklightblue/textures/scrollbutton_up_out_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/sm_rounded_corners_simple.tga b/indra/newview/skins/blacklightblue/textures/sm_rounded_corners_simple.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/sm_rounded_corners_simple.tga rename to indra/newview/skins/blacklightblue/textures/sm_rounded_corners_simple.tga diff --git a/indra/newview/skins/Blacklightblue/textures/smicon_warn.tga b/indra/newview/skins/blacklightblue/textures/smicon_warn.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/smicon_warn.tga rename to indra/newview/skins/blacklightblue/textures/smicon_warn.tga diff --git a/indra/newview/skins/Blacklightblue/textures/spacer24.tga b/indra/newview/skins/blacklightblue/textures/spacer24.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/spacer24.tga rename to indra/newview/skins/blacklightblue/textures/spacer24.tga diff --git a/indra/newview/skins/Blacklightblue/textures/spacer35.tga b/indra/newview/skins/blacklightblue/textures/spacer35.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/spacer35.tga rename to indra/newview/skins/blacklightblue/textures/spacer35.tga diff --git a/indra/newview/skins/Blacklightblue/textures/spin_down_in_blue.tga b/indra/newview/skins/blacklightblue/textures/spin_down_in_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/spin_down_in_blue.tga rename to indra/newview/skins/blacklightblue/textures/spin_down_in_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/spin_down_out_blue.tga b/indra/newview/skins/blacklightblue/textures/spin_down_out_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/spin_down_out_blue.tga rename to indra/newview/skins/blacklightblue/textures/spin_down_out_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/spin_up_in_blue.tga b/indra/newview/skins/blacklightblue/textures/spin_up_in_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/spin_up_in_blue.tga rename to indra/newview/skins/blacklightblue/textures/spin_up_in_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/spin_up_out_blue.tga b/indra/newview/skins/blacklightblue/textures/spin_up_out_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/spin_up_out_blue.tga rename to indra/newview/skins/blacklightblue/textures/spin_up_out_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/startup_logo.j2c b/indra/newview/skins/blacklightblue/textures/startup_logo.j2c similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/startup_logo.j2c rename to indra/newview/skins/blacklightblue/textures/startup_logo.j2c diff --git a/indra/newview/skins/Blacklightblue/textures/status_buy_currency.tga b/indra/newview/skins/blacklightblue/textures/status_buy_currency.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_buy_currency.tga rename to indra/newview/skins/blacklightblue/textures/status_buy_currency.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_buy_currency_pressed.tga b/indra/newview/skins/blacklightblue/textures/status_buy_currency_pressed.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_buy_currency_pressed.tga rename to indra/newview/skins/blacklightblue/textures/status_buy_currency_pressed.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_buy_land.tga b/indra/newview/skins/blacklightblue/textures/status_buy_land.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_buy_land.tga rename to indra/newview/skins/blacklightblue/textures/status_buy_land.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_buy_land_pressed.tga b/indra/newview/skins/blacklightblue/textures/status_buy_land_pressed.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_buy_land_pressed.tga rename to indra/newview/skins/blacklightblue/textures/status_buy_land_pressed.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_health.tga b/indra/newview/skins/blacklightblue/textures/status_health.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_health.tga rename to indra/newview/skins/blacklightblue/textures/status_health.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_no_build.tga b/indra/newview/skins/blacklightblue/textures/status_no_build.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_no_build.tga rename to indra/newview/skins/blacklightblue/textures/status_no_build.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_no_fly.tga b/indra/newview/skins/blacklightblue/textures/status_no_fly.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_no_fly.tga rename to indra/newview/skins/blacklightblue/textures/status_no_fly.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_no_push.tga b/indra/newview/skins/blacklightblue/textures/status_no_push.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_no_push.tga rename to indra/newview/skins/blacklightblue/textures/status_no_push.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_no_scripts.tga b/indra/newview/skins/blacklightblue/textures/status_no_scripts.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_no_scripts.tga rename to indra/newview/skins/blacklightblue/textures/status_no_scripts.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_no_voice.tga b/indra/newview/skins/blacklightblue/textures/status_no_voice.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_no_voice.tga rename to indra/newview/skins/blacklightblue/textures/status_no_voice.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_script_debug.tga b/indra/newview/skins/blacklightblue/textures/status_script_debug.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_script_debug.tga rename to indra/newview/skins/blacklightblue/textures/status_script_debug.tga diff --git a/indra/newview/skins/Blacklightblue/textures/status_search_btn.png b/indra/newview/skins/blacklightblue/textures/status_search_btn.png similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_search_btn.png rename to indra/newview/skins/blacklightblue/textures/status_search_btn.png diff --git a/indra/newview/skins/Blacklightblue/textures/status_search_btn_pressed.png b/indra/newview/skins/blacklightblue/textures/status_search_btn_pressed.png similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_search_btn_pressed.png rename to indra/newview/skins/blacklightblue/textures/status_search_btn_pressed.png diff --git a/indra/newview/skins/Blacklightblue/textures/status_voice.tga b/indra/newview/skins/blacklightblue/textures/status_voice.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/status_voice.tga rename to indra/newview/skins/blacklightblue/textures/status_voice.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tab_bottom_blue.tga b/indra/newview/skins/blacklightblue/textures/tab_bottom_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tab_bottom_blue.tga rename to indra/newview/skins/blacklightblue/textures/tab_bottom_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tab_bottom_selected_blue.tga b/indra/newview/skins/blacklightblue/textures/tab_bottom_selected_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tab_bottom_selected_blue.tga rename to indra/newview/skins/blacklightblue/textures/tab_bottom_selected_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tab_left.tga b/indra/newview/skins/blacklightblue/textures/tab_left.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tab_left.tga rename to indra/newview/skins/blacklightblue/textures/tab_left.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tab_left_selected.tga b/indra/newview/skins/blacklightblue/textures/tab_left_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tab_left_selected.tga rename to indra/newview/skins/blacklightblue/textures/tab_left_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tab_top_blue.tga b/indra/newview/skins/blacklightblue/textures/tab_top_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tab_top_blue.tga rename to indra/newview/skins/blacklightblue/textures/tab_top_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tab_top_selected_blue.tga b/indra/newview/skins/blacklightblue/textures/tab_top_selected_blue.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tab_top_selected_blue.tga rename to indra/newview/skins/blacklightblue/textures/tab_top_selected_blue.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tabarea.tga b/indra/newview/skins/blacklightblue/textures/tabarea.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tabarea.tga rename to indra/newview/skins/blacklightblue/textures/tabarea.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tearoff_pressed.tga b/indra/newview/skins/blacklightblue/textures/tearoff_pressed.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tearoff_pressed.tga rename to indra/newview/skins/blacklightblue/textures/tearoff_pressed.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tearoffbox.tga b/indra/newview/skins/blacklightblue/textures/tearoffbox.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tearoffbox.tga rename to indra/newview/skins/blacklightblue/textures/tearoffbox.tga diff --git a/indra/newview/skins/Blacklightblue/textures/textures.xml b/indra/newview/skins/blacklightblue/textures/textures.xml similarity index 99% rename from indra/newview/skins/Blacklightblue/textures/textures.xml rename to indra/newview/skins/blacklightblue/textures/textures.xml index 5955a8ede..9f617f56b 100644 --- a/indra/newview/skins/Blacklightblue/textures/textures.xml +++ b/indra/newview/skins/blacklightblue/textures/textures.xml @@ -78,7 +78,7 @@ - + diff --git a/indra/newview/skins/Blacklightblue/textures/tool_dozer.tga b/indra/newview/skins/blacklightblue/textures/tool_dozer.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tool_dozer.tga rename to indra/newview/skins/blacklightblue/textures/tool_dozer.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tool_dozer_active.tga b/indra/newview/skins/blacklightblue/textures/tool_dozer_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tool_dozer_active.tga rename to indra/newview/skins/blacklightblue/textures/tool_dozer_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tool_zoom.tga b/indra/newview/skins/blacklightblue/textures/tool_zoom.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tool_zoom.tga rename to indra/newview/skins/blacklightblue/textures/tool_zoom.tga diff --git a/indra/newview/skins/Blacklightblue/textures/tool_zoom_active.tga b/indra/newview/skins/blacklightblue/textures/tool_zoom_active.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/tool_zoom_active.tga rename to indra/newview/skins/blacklightblue/textures/tool_zoom_active.tga diff --git a/indra/newview/skins/Blacklightblue/textures/toolbar_bg.tga b/indra/newview/skins/blacklightblue/textures/toolbar_bg.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/toolbar_bg.tga rename to indra/newview/skins/blacklightblue/textures/toolbar_bg.tga diff --git a/indra/newview/skins/Blacklightblue/textures/toolbar_btn_disabled.tga b/indra/newview/skins/blacklightblue/textures/toolbar_btn_disabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/toolbar_btn_disabled.tga rename to indra/newview/skins/blacklightblue/textures/toolbar_btn_disabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/toolbar_btn_enabled.tga b/indra/newview/skins/blacklightblue/textures/toolbar_btn_enabled.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/toolbar_btn_enabled.tga rename to indra/newview/skins/blacklightblue/textures/toolbar_btn_enabled.tga diff --git a/indra/newview/skins/Blacklightblue/textures/toolbar_btn_selected.tga b/indra/newview/skins/blacklightblue/textures/toolbar_btn_selected.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/toolbar_btn_selected.tga rename to indra/newview/skins/blacklightblue/textures/toolbar_btn_selected.tga diff --git a/indra/newview/skins/Blacklightblue/textures/toolbar_tab.tga b/indra/newview/skins/blacklightblue/textures/toolbar_tab.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/toolbar_tab.tga rename to indra/newview/skins/blacklightblue/textures/toolbar_tab.tga diff --git a/indra/newview/skins/Blacklightblue/textures/up_arrow.png b/indra/newview/skins/blacklightblue/textures/up_arrow.png similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/up_arrow.png rename to indra/newview/skins/blacklightblue/textures/up_arrow.png diff --git a/indra/newview/skins/Blacklightblue/textures/up_arrow.tga b/indra/newview/skins/blacklightblue/textures/up_arrow.tga similarity index 100% rename from indra/newview/skins/Blacklightblue/textures/up_arrow.tga rename to indra/newview/skins/blacklightblue/textures/up_arrow.tga diff --git a/indra/newview/skins/blackred.xml b/indra/newview/skins/blackred.xml index 93a2ed074..7ffcac46f 100644 --- a/indra/newview/skins/blackred.xml +++ b/indra/newview/skins/blackred.xml @@ -9,6 +9,6 @@ skin_info folder_name - Blackred + blackred diff --git a/indra/newview/skins/Blackred/License and Credit.txt b/indra/newview/skins/blackred/License and Credit.txt similarity index 100% rename from indra/newview/skins/Blackred/License and Credit.txt rename to indra/newview/skins/blackred/License and Credit.txt diff --git a/indra/newview/skins/Blackred/colors.xml b/indra/newview/skins/blackred/colors.xml similarity index 100% rename from indra/newview/skins/Blackred/colors.xml rename to indra/newview/skins/blackred/colors.xml diff --git a/indra/newview/skins/Blackred/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga b/indra/newview/skins/blackred/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga rename to indra/newview/skins/blackred/textures/0098b015-3daf-4cfe-a72f-915369ea97c2.tga diff --git a/indra/newview/skins/Blackred/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga b/indra/newview/skins/blackred/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga rename to indra/newview/skins/blackred/textures/3c18c87e-5f50-14e2-e744-f44734aa365f.tga diff --git a/indra/newview/skins/Blackred/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga b/indra/newview/skins/blackred/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga rename to indra/newview/skins/blackred/textures/7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b.tga diff --git a/indra/newview/skins/Blackred/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga b/indra/newview/skins/blackred/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga rename to indra/newview/skins/blackred/textures/7dabc040-ec13-2309-ddf7-4f161f6de2f4.tga diff --git a/indra/newview/skins/Blackred/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga b/indra/newview/skins/blackred/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga rename to indra/newview/skins/blackred/textures/9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1.tga diff --git a/indra/newview/skins/Blackred/textures/active_speakers.tga b/indra/newview/skins/blackred/textures/active_speakers.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/active_speakers.tga rename to indra/newview/skins/blackred/textures/active_speakers.tga diff --git a/indra/newview/skins/Blackred/textures/active_voice_tab.tga b/indra/newview/skins/blackred/textures/active_voice_tab.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/active_voice_tab.tga rename to indra/newview/skins/blackred/textures/active_voice_tab.tga diff --git a/indra/newview/skins/Blackred/textures/arrow_down.tga b/indra/newview/skins/blackred/textures/arrow_down.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/arrow_down.tga rename to indra/newview/skins/blackred/textures/arrow_down.tga diff --git a/indra/newview/skins/Blackred/textures/arrow_up.tga b/indra/newview/skins/blackred/textures/arrow_up.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/arrow_up.tga rename to indra/newview/skins/blackred/textures/arrow_up.tga diff --git a/indra/newview/skins/Blackred/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga b/indra/newview/skins/blackred/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga rename to indra/newview/skins/blackred/textures/b4870163-6208-42a9-9801-93133bf9a6cd.tga diff --git a/indra/newview/skins/Blackred/textures/badge_error.j2c b/indra/newview/skins/blackred/textures/badge_error.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/badge_error.j2c rename to indra/newview/skins/blackred/textures/badge_error.j2c diff --git a/indra/newview/skins/Blackred/textures/badge_note.j2c b/indra/newview/skins/blackred/textures/badge_note.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/badge_note.j2c rename to indra/newview/skins/blackred/textures/badge_note.j2c diff --git a/indra/newview/skins/Blackred/textures/badge_ok.j2c b/indra/newview/skins/blackred/textures/badge_ok.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/badge_ok.j2c rename to indra/newview/skins/blackred/textures/badge_ok.j2c diff --git a/indra/newview/skins/Blackred/textures/badge_warn.j2c b/indra/newview/skins/blackred/textures/badge_warn.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/badge_warn.j2c rename to indra/newview/skins/blackred/textures/badge_warn.j2c diff --git a/indra/newview/skins/Blackred/textures/black.tga b/indra/newview/skins/blackred/textures/black.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/black.tga rename to indra/newview/skins/blackred/textures/black.tga diff --git a/indra/newview/skins/Blackred/textures/btn_chatbar.tga b/indra/newview/skins/blackred/textures/btn_chatbar.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/btn_chatbar.tga rename to indra/newview/skins/blackred/textures/btn_chatbar.tga diff --git a/indra/newview/skins/Blackred/textures/btn_chatbar_selected.tga b/indra/newview/skins/blackred/textures/btn_chatbar_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/btn_chatbar_selected.tga rename to indra/newview/skins/blackred/textures/btn_chatbar_selected.tga diff --git a/indra/newview/skins/Blackred/textures/button_anim_pause.tga b/indra/newview/skins/blackred/textures/button_anim_pause.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_anim_pause.tga rename to indra/newview/skins/blackred/textures/button_anim_pause.tga diff --git a/indra/newview/skins/Blackred/textures/button_anim_pause_selected.tga b/indra/newview/skins/blackred/textures/button_anim_pause_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_anim_pause_selected.tga rename to indra/newview/skins/blackred/textures/button_anim_pause_selected.tga diff --git a/indra/newview/skins/Blackred/textures/button_anim_play.tga b/indra/newview/skins/blackred/textures/button_anim_play.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_anim_play.tga rename to indra/newview/skins/blackred/textures/button_anim_play.tga diff --git a/indra/newview/skins/Blackred/textures/button_anim_play_selected.tga b/indra/newview/skins/blackred/textures/button_anim_play_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_anim_play_selected.tga rename to indra/newview/skins/blackred/textures/button_anim_play_selected.tga diff --git a/indra/newview/skins/Blackred/textures/button_anim_stop.tga b/indra/newview/skins/blackred/textures/button_anim_stop.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_anim_stop.tga rename to indra/newview/skins/blackred/textures/button_anim_stop.tga diff --git a/indra/newview/skins/Blackred/textures/button_anim_stop_selected.tga b/indra/newview/skins/blackred/textures/button_anim_stop_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_anim_stop_selected.tga rename to indra/newview/skins/blackred/textures/button_anim_stop_selected.tga diff --git a/indra/newview/skins/Blackred/textures/button_disabled_32x128.tga b/indra/newview/skins/blackred/textures/button_disabled_32x128.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_disabled_32x128.tga rename to indra/newview/skins/blackred/textures/button_disabled_32x128.tga diff --git a/indra/newview/skins/Blackred/textures/button_enabled_32x128.tga b/indra/newview/skins/blackred/textures/button_enabled_32x128.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_enabled_32x128.tga rename to indra/newview/skins/blackred/textures/button_enabled_32x128.tga diff --git a/indra/newview/skins/Blackred/textures/button_enabled_selected_32x128.tga b/indra/newview/skins/blackred/textures/button_enabled_selected_32x128.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/button_enabled_selected_32x128.tga rename to indra/newview/skins/blackred/textures/button_enabled_selected_32x128.tga diff --git a/indra/newview/skins/Blackred/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga b/indra/newview/skins/blackred/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga rename to indra/newview/skins/blackred/textures/c1e21504-f136-451d-b8e9-929037812f1d.tga diff --git a/indra/newview/skins/Blackred/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga b/indra/newview/skins/blackred/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga rename to indra/newview/skins/blackred/textures/c63f124c-6340-4fbf-b59e-0869a44adb64.tga diff --git a/indra/newview/skins/Blackred/textures/cam_rotate_in.tga b/indra/newview/skins/blackred/textures/cam_rotate_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/cam_rotate_in.tga rename to indra/newview/skins/blackred/textures/cam_rotate_in.tga diff --git a/indra/newview/skins/Blackred/textures/cam_rotate_out.tga b/indra/newview/skins/blackred/textures/cam_rotate_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/cam_rotate_out.tga rename to indra/newview/skins/blackred/textures/cam_rotate_out.tga diff --git a/indra/newview/skins/Blackred/textures/cam_tracking_in.tga b/indra/newview/skins/blackred/textures/cam_tracking_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/cam_tracking_in.tga rename to indra/newview/skins/blackred/textures/cam_tracking_in.tga diff --git a/indra/newview/skins/Blackred/textures/cam_tracking_out.tga b/indra/newview/skins/blackred/textures/cam_tracking_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/cam_tracking_out.tga rename to indra/newview/skins/blackred/textures/cam_tracking_out.tga diff --git a/indra/newview/skins/Blackred/textures/cam_zoom_minus_in.tga b/indra/newview/skins/blackred/textures/cam_zoom_minus_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/cam_zoom_minus_in.tga rename to indra/newview/skins/blackred/textures/cam_zoom_minus_in.tga diff --git a/indra/newview/skins/Blackred/textures/cam_zoom_out.tga b/indra/newview/skins/blackred/textures/cam_zoom_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/cam_zoom_out.tga rename to indra/newview/skins/blackred/textures/cam_zoom_out.tga diff --git a/indra/newview/skins/Blackred/textures/cam_zoom_plus_in.tga b/indra/newview/skins/blackred/textures/cam_zoom_plus_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/cam_zoom_plus_in.tga rename to indra/newview/skins/blackred/textures/cam_zoom_plus_in.tga diff --git a/indra/newview/skins/Blackred/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga b/indra/newview/skins/blackred/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga rename to indra/newview/skins/blackred/textures/ce15fd63-b0b6-463c-a37d-ea6393208b3e.tga diff --git a/indra/newview/skins/Blackred/textures/checkbox_disabled_false.tga b/indra/newview/skins/blackred/textures/checkbox_disabled_false.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/checkbox_disabled_false.tga rename to indra/newview/skins/blackred/textures/checkbox_disabled_false.tga diff --git a/indra/newview/skins/Blackred/textures/checkbox_disabled_true.tga b/indra/newview/skins/blackred/textures/checkbox_disabled_true.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/checkbox_disabled_true.tga rename to indra/newview/skins/blackred/textures/checkbox_disabled_true.tga diff --git a/indra/newview/skins/Blackred/textures/checkbox_enabled_false.tga b/indra/newview/skins/blackred/textures/checkbox_enabled_false.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/checkbox_enabled_false.tga rename to indra/newview/skins/blackred/textures/checkbox_enabled_false.tga diff --git a/indra/newview/skins/Blackred/textures/checkbox_enabled_true.tga b/indra/newview/skins/blackred/textures/checkbox_enabled_true.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/checkbox_enabled_true.tga rename to indra/newview/skins/blackred/textures/checkbox_enabled_true.tga diff --git a/indra/newview/skins/Blackred/textures/close_in_blue.tga b/indra/newview/skins/blackred/textures/close_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/close_in_blue.tga rename to indra/newview/skins/blackred/textures/close_in_blue.tga diff --git a/indra/newview/skins/Blackred/textures/close_inactive_blue.tga b/indra/newview/skins/blackred/textures/close_inactive_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/close_inactive_blue.tga rename to indra/newview/skins/blackred/textures/close_inactive_blue.tga diff --git a/indra/newview/skins/Blackred/textures/closebox.tga b/indra/newview/skins/blackred/textures/closebox.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/closebox.tga rename to indra/newview/skins/blackred/textures/closebox.tga diff --git a/indra/newview/skins/Blackred/textures/combobox_arrow.tga b/indra/newview/skins/blackred/textures/combobox_arrow.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/combobox_arrow.tga rename to indra/newview/skins/blackred/textures/combobox_arrow.tga diff --git a/indra/newview/skins/Blackred/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c b/indra/newview/skins/blackred/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c rename to indra/newview/skins/blackred/textures/d07f6eed-b96a-47cd-b51d-400ad4a1c428.j2c diff --git a/indra/newview/skins/Blackred/textures/darkgray.tga b/indra/newview/skins/blackred/textures/darkgray.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/darkgray.tga rename to indra/newview/skins/blackred/textures/darkgray.tga diff --git a/indra/newview/skins/Blackred/textures/default_land_picture.j2c b/indra/newview/skins/blackred/textures/default_land_picture.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/default_land_picture.j2c rename to indra/newview/skins/blackred/textures/default_land_picture.j2c diff --git a/indra/newview/skins/Blackred/textures/default_profile_picture.j2c b/indra/newview/skins/blackred/textures/default_profile_picture.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/default_profile_picture.j2c rename to indra/newview/skins/blackred/textures/default_profile_picture.j2c diff --git a/indra/newview/skins/Blackred/textures/direction_arrow.tga b/indra/newview/skins/blackred/textures/direction_arrow.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/direction_arrow.tga rename to indra/newview/skins/blackred/textures/direction_arrow.tga diff --git a/indra/newview/skins/Blackred/textures/down_arrow.png b/indra/newview/skins/blackred/textures/down_arrow.png similarity index 100% rename from indra/newview/skins/Blackred/textures/down_arrow.png rename to indra/newview/skins/blackred/textures/down_arrow.png diff --git a/indra/newview/skins/Blackred/textures/eye_button_active.tga b/indra/newview/skins/blackred/textures/eye_button_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/eye_button_active.tga rename to indra/newview/skins/blackred/textures/eye_button_active.tga diff --git a/indra/newview/skins/Blackred/textures/eye_button_inactive.tga b/indra/newview/skins/blackred/textures/eye_button_inactive.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/eye_button_inactive.tga rename to indra/newview/skins/blackred/textures/eye_button_inactive.tga diff --git a/indra/newview/skins/Blackred/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga b/indra/newview/skins/blackred/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga rename to indra/newview/skins/blackred/textures/ff9a71eb-7414-4cf8-866e-a701deb7c3cf.tga diff --git a/indra/newview/skins/Blackred/textures/ff_edit_mine_button.tga b/indra/newview/skins/blackred/textures/ff_edit_mine_button.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ff_edit_mine_button.tga rename to indra/newview/skins/blackred/textures/ff_edit_mine_button.tga diff --git a/indra/newview/skins/Blackred/textures/ff_edit_theirs_button.tga b/indra/newview/skins/blackred/textures/ff_edit_theirs_button.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ff_edit_theirs_button.tga rename to indra/newview/skins/blackred/textures/ff_edit_theirs_button.tga diff --git a/indra/newview/skins/Blackred/textures/ff_online_status_button.tga b/indra/newview/skins/blackred/textures/ff_online_status_button.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ff_online_status_button.tga rename to indra/newview/skins/blackred/textures/ff_online_status_button.tga diff --git a/indra/newview/skins/Blackred/textures/ff_visible_map_button.tga b/indra/newview/skins/blackred/textures/ff_visible_map_button.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ff_visible_map_button.tga rename to indra/newview/skins/blackred/textures/ff_visible_map_button.tga diff --git a/indra/newview/skins/Blackred/textures/ff_visible_online_button.tga b/indra/newview/skins/blackred/textures/ff_visible_online_button.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ff_visible_online_button.tga rename to indra/newview/skins/blackred/textures/ff_visible_online_button.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_btn_left.tga b/indra/newview/skins/blackred/textures/flyout_btn_left.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_btn_left.tga rename to indra/newview/skins/blackred/textures/flyout_btn_left.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_btn_left_disabled.tga b/indra/newview/skins/blackred/textures/flyout_btn_left_disabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_btn_left_disabled.tga rename to indra/newview/skins/blackred/textures/flyout_btn_left_disabled.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_btn_left_selected.tga b/indra/newview/skins/blackred/textures/flyout_btn_left_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_btn_left_selected.tga rename to indra/newview/skins/blackred/textures/flyout_btn_left_selected.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_btn_right.tga b/indra/newview/skins/blackred/textures/flyout_btn_right.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_btn_right.tga rename to indra/newview/skins/blackred/textures/flyout_btn_right.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_btn_right_disabled.tga b/indra/newview/skins/blackred/textures/flyout_btn_right_disabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_btn_right_disabled.tga rename to indra/newview/skins/blackred/textures/flyout_btn_right_disabled.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_btn_right_selected.tga b/indra/newview/skins/blackred/textures/flyout_btn_right_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_btn_right_selected.tga rename to indra/newview/skins/blackred/textures/flyout_btn_right_selected.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_left.tga b/indra/newview/skins/blackred/textures/flyout_left.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_left.tga rename to indra/newview/skins/blackred/textures/flyout_left.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_left_disabled.tga b/indra/newview/skins/blackred/textures/flyout_left_disabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_left_disabled.tga rename to indra/newview/skins/blackred/textures/flyout_left_disabled.tga diff --git a/indra/newview/skins/Blackred/textures/flyout_left_selected.tga b/indra/newview/skins/blackred/textures/flyout_left_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/flyout_left_selected.tga rename to indra/newview/skins/blackred/textures/flyout_left_selected.tga diff --git a/indra/newview/skins/Blackred/textures/icn_media-pause_active.tga b/indra/newview/skins/blackred/textures/icn_media-pause_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_media-pause_active.tga rename to indra/newview/skins/blackred/textures/icn_media-pause_active.tga diff --git a/indra/newview/skins/Blackred/textures/icn_media-pause_disabled.tga b/indra/newview/skins/blackred/textures/icn_media-pause_disabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_media-pause_disabled.tga rename to indra/newview/skins/blackred/textures/icn_media-pause_disabled.tga diff --git a/indra/newview/skins/Blackred/textures/icn_media-pause_enabled.tga b/indra/newview/skins/blackred/textures/icn_media-pause_enabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_media-pause_enabled.tga rename to indra/newview/skins/blackred/textures/icn_media-pause_enabled.tga diff --git a/indra/newview/skins/Blackred/textures/icn_media-play_enabled.tga b/indra/newview/skins/blackred/textures/icn_media-play_enabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_media-play_enabled.tga rename to indra/newview/skins/blackred/textures/icn_media-play_enabled.tga diff --git a/indra/newview/skins/Blackred/textures/icn_media-stop_enabled.tga b/indra/newview/skins/blackred/textures/icn_media-stop_enabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_media-stop_enabled.tga rename to indra/newview/skins/blackred/textures/icn_media-stop_enabled.tga diff --git a/indra/newview/skins/Blackred/textures/icn_media.tga b/indra/newview/skins/blackred/textures/icn_media.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_media.tga rename to indra/newview/skins/blackred/textures/icn_media.tga diff --git a/indra/newview/skins/Blackred/textures/icn_music.tga b/indra/newview/skins/blackred/textures/icn_music.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_music.tga rename to indra/newview/skins/blackred/textures/icn_music.tga diff --git a/indra/newview/skins/Blackred/textures/icn_rounded-text-field.tga b/indra/newview/skins/blackred/textures/icn_rounded-text-field.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_rounded-text-field.tga rename to indra/newview/skins/blackred/textures/icn_rounded-text-field.tga diff --git a/indra/newview/skins/Blackred/textures/icn_slide-groove_dark.tga b/indra/newview/skins/blackred/textures/icn_slide-groove_dark.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_slide-groove_dark.tga rename to indra/newview/skins/blackred/textures/icn_slide-groove_dark.tga diff --git a/indra/newview/skins/Blackred/textures/icn_slide-highlight.tga b/indra/newview/skins/blackred/textures/icn_slide-highlight.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_slide-highlight.tga rename to indra/newview/skins/blackred/textures/icn_slide-highlight.tga diff --git a/indra/newview/skins/Blackred/textures/icn_slide-thumb_dark.tga b/indra/newview/skins/blackred/textures/icn_slide-thumb_dark.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_slide-thumb_dark.tga rename to indra/newview/skins/blackred/textures/icn_slide-thumb_dark.tga diff --git a/indra/newview/skins/Blackred/textures/icn_speaker-muted_dark.tga b/indra/newview/skins/blackred/textures/icn_speaker-muted_dark.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_speaker-muted_dark.tga rename to indra/newview/skins/blackred/textures/icn_speaker-muted_dark.tga diff --git a/indra/newview/skins/Blackred/textures/icn_toolbar_radar.tga b/indra/newview/skins/blackred/textures/icn_toolbar_radar.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_toolbar_radar.tga rename to indra/newview/skins/blackred/textures/icn_toolbar_radar.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice-call-end.tga b/indra/newview/skins/blackred/textures/icn_voice-call-end.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice-call-end.tga rename to indra/newview/skins/blackred/textures/icn_voice-call-end.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice-call-start.tga b/indra/newview/skins/blackred/textures/icn_voice-call-start.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice-call-start.tga rename to indra/newview/skins/blackred/textures/icn_voice-call-start.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice-groupfocus.tga b/indra/newview/skins/blackred/textures/icn_voice-groupfocus.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice-groupfocus.tga rename to indra/newview/skins/blackred/textures/icn_voice-groupfocus.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice-localchat.tga b/indra/newview/skins/blackred/textures/icn_voice-localchat.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice-localchat.tga rename to indra/newview/skins/blackred/textures/icn_voice-localchat.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice-pvtfocus.tga b/indra/newview/skins/blackred/textures/icn_voice-pvtfocus.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice-pvtfocus.tga rename to indra/newview/skins/blackred/textures/icn_voice-pvtfocus.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice_ptt-off.tga b/indra/newview/skins/blackred/textures/icn_voice_ptt-off.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice_ptt-off.tga rename to indra/newview/skins/blackred/textures/icn_voice_ptt-off.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice_ptt-on-lvl1.tga b/indra/newview/skins/blackred/textures/icn_voice_ptt-on-lvl1.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice_ptt-on-lvl1.tga rename to indra/newview/skins/blackred/textures/icn_voice_ptt-on-lvl1.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice_ptt-on-lvl2.tga b/indra/newview/skins/blackred/textures/icn_voice_ptt-on-lvl2.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice_ptt-on-lvl2.tga rename to indra/newview/skins/blackred/textures/icn_voice_ptt-on-lvl2.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice_ptt-on-lvl3.tga b/indra/newview/skins/blackred/textures/icn_voice_ptt-on-lvl3.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice_ptt-on-lvl3.tga rename to indra/newview/skins/blackred/textures/icn_voice_ptt-on-lvl3.tga diff --git a/indra/newview/skins/Blackred/textures/icn_voice_ptt-on.tga b/indra/newview/skins/blackred/textures/icn_voice_ptt-on.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icn_voice_ptt-on.tga rename to indra/newview/skins/blackred/textures/icn_voice_ptt-on.tga diff --git a/indra/newview/skins/Blackred/textures/icon_auction.tga b/indra/newview/skins/blackred/textures/icon_auction.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_auction.tga rename to indra/newview/skins/blackred/textures/icon_auction.tga diff --git a/indra/newview/skins/Blackred/textures/icon_avatar_offline.tga b/indra/newview/skins/blackred/textures/icon_avatar_offline.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_avatar_offline.tga rename to indra/newview/skins/blackred/textures/icon_avatar_offline.tga diff --git a/indra/newview/skins/Blackred/textures/icon_avatar_online.tga b/indra/newview/skins/blackred/textures/icon_avatar_online.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_avatar_online.tga rename to indra/newview/skins/blackred/textures/icon_avatar_online.tga diff --git a/indra/newview/skins/Blackred/textures/icon_event.tga b/indra/newview/skins/blackred/textures/icon_event.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_event.tga rename to indra/newview/skins/blackred/textures/icon_event.tga diff --git a/indra/newview/skins/Blackred/textures/icon_event_adult.tga b/indra/newview/skins/blackred/textures/icon_event_adult.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_event_adult.tga rename to indra/newview/skins/blackred/textures/icon_event_adult.tga diff --git a/indra/newview/skins/Blackred/textures/icon_event_mature.tga b/indra/newview/skins/blackred/textures/icon_event_mature.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_event_mature.tga rename to indra/newview/skins/blackred/textures/icon_event_mature.tga diff --git a/indra/newview/skins/Blackred/textures/icon_for_sale.tga b/indra/newview/skins/blackred/textures/icon_for_sale.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_for_sale.tga rename to indra/newview/skins/blackred/textures/icon_for_sale.tga diff --git a/indra/newview/skins/Blackred/textures/icon_for_sale_adult.tga b/indra/newview/skins/blackred/textures/icon_for_sale_adult.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_for_sale_adult.tga rename to indra/newview/skins/blackred/textures/icon_for_sale_adult.tga diff --git a/indra/newview/skins/Blackred/textures/icon_group.tga b/indra/newview/skins/blackred/textures/icon_group.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_group.tga rename to indra/newview/skins/blackred/textures/icon_group.tga diff --git a/indra/newview/skins/Blackred/textures/icon_groupnotice.tga b/indra/newview/skins/blackred/textures/icon_groupnotice.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_groupnotice.tga rename to indra/newview/skins/blackred/textures/icon_groupnotice.tga diff --git a/indra/newview/skins/Blackred/textures/icon_groupnoticeinventory.tga b/indra/newview/skins/blackred/textures/icon_groupnoticeinventory.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_groupnoticeinventory.tga rename to indra/newview/skins/blackred/textures/icon_groupnoticeinventory.tga diff --git a/indra/newview/skins/Blackred/textures/icon_lock.tga b/indra/newview/skins/blackred/textures/icon_lock.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_lock.tga rename to indra/newview/skins/blackred/textures/icon_lock.tga diff --git a/indra/newview/skins/Blackred/textures/icon_place.tga b/indra/newview/skins/blackred/textures/icon_place.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_place.tga rename to indra/newview/skins/blackred/textures/icon_place.tga diff --git a/indra/newview/skins/Blackred/textures/icon_popular.tga b/indra/newview/skins/blackred/textures/icon_popular.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_popular.tga rename to indra/newview/skins/blackred/textures/icon_popular.tga diff --git a/indra/newview/skins/Blackred/textures/icon_top_pick.tga b/indra/newview/skins/blackred/textures/icon_top_pick.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/icon_top_pick.tga rename to indra/newview/skins/blackred/textures/icon_top_pick.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_animation.tga b/indra/newview/skins/blackred/textures/inv_folder_animation.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_animation.tga rename to indra/newview/skins/blackred/textures/inv_folder_animation.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_bodypart.tga b/indra/newview/skins/blackred/textures/inv_folder_bodypart.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_bodypart.tga rename to indra/newview/skins/blackred/textures/inv_folder_bodypart.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_callingcard.tga b/indra/newview/skins/blackred/textures/inv_folder_callingcard.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_callingcard.tga rename to indra/newview/skins/blackred/textures/inv_folder_callingcard.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_clothing.tga b/indra/newview/skins/blackred/textures/inv_folder_clothing.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_clothing.tga rename to indra/newview/skins/blackred/textures/inv_folder_clothing.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_gesture.tga b/indra/newview/skins/blackred/textures/inv_folder_gesture.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_gesture.tga rename to indra/newview/skins/blackred/textures/inv_folder_gesture.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_landmark.tga b/indra/newview/skins/blackred/textures/inv_folder_landmark.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_landmark.tga rename to indra/newview/skins/blackred/textures/inv_folder_landmark.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_lostandfound.tga b/indra/newview/skins/blackred/textures/inv_folder_lostandfound.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_lostandfound.tga rename to indra/newview/skins/blackred/textures/inv_folder_lostandfound.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_notecard.tga b/indra/newview/skins/blackred/textures/inv_folder_notecard.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_notecard.tga rename to indra/newview/skins/blackred/textures/inv_folder_notecard.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_object.tga b/indra/newview/skins/blackred/textures/inv_folder_object.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_object.tga rename to indra/newview/skins/blackred/textures/inv_folder_object.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_plain_closed.tga b/indra/newview/skins/blackred/textures/inv_folder_plain_closed.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_plain_closed.tga rename to indra/newview/skins/blackred/textures/inv_folder_plain_closed.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_plain_open.tga b/indra/newview/skins/blackred/textures/inv_folder_plain_open.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_plain_open.tga rename to indra/newview/skins/blackred/textures/inv_folder_plain_open.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_script.tga b/indra/newview/skins/blackred/textures/inv_folder_script.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_script.tga rename to indra/newview/skins/blackred/textures/inv_folder_script.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_snapshot.tga b/indra/newview/skins/blackred/textures/inv_folder_snapshot.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_snapshot.tga rename to indra/newview/skins/blackred/textures/inv_folder_snapshot.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_sound.tga b/indra/newview/skins/blackred/textures/inv_folder_sound.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_sound.tga rename to indra/newview/skins/blackred/textures/inv_folder_sound.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_texture.tga b/indra/newview/skins/blackred/textures/inv_folder_texture.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_texture.tga rename to indra/newview/skins/blackred/textures/inv_folder_texture.tga diff --git a/indra/newview/skins/Blackred/textures/inv_folder_trash.tga b/indra/newview/skins/blackred/textures/inv_folder_trash.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_folder_trash.tga rename to indra/newview/skins/blackred/textures/inv_folder_trash.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_animation.tga b/indra/newview/skins/blackred/textures/inv_item_animation.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_animation.tga rename to indra/newview/skins/blackred/textures/inv_item_animation.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_attach.tga b/indra/newview/skins/blackred/textures/inv_item_attach.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_attach.tga rename to indra/newview/skins/blackred/textures/inv_item_attach.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_callingcard_offline.tga b/indra/newview/skins/blackred/textures/inv_item_callingcard_offline.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_callingcard_offline.tga rename to indra/newview/skins/blackred/textures/inv_item_callingcard_offline.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_callingcard_online.tga b/indra/newview/skins/blackred/textures/inv_item_callingcard_online.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_callingcard_online.tga rename to indra/newview/skins/blackred/textures/inv_item_callingcard_online.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_clothing.tga b/indra/newview/skins/blackred/textures/inv_item_clothing.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_clothing.tga rename to indra/newview/skins/blackred/textures/inv_item_clothing.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_eyes.tga b/indra/newview/skins/blackred/textures/inv_item_eyes.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_eyes.tga rename to indra/newview/skins/blackred/textures/inv_item_eyes.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_gesture.tga b/indra/newview/skins/blackred/textures/inv_item_gesture.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_gesture.tga rename to indra/newview/skins/blackred/textures/inv_item_gesture.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_gloves.tga b/indra/newview/skins/blackred/textures/inv_item_gloves.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_gloves.tga rename to indra/newview/skins/blackred/textures/inv_item_gloves.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_hair.tga b/indra/newview/skins/blackred/textures/inv_item_hair.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_hair.tga rename to indra/newview/skins/blackred/textures/inv_item_hair.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_jacket.tga b/indra/newview/skins/blackred/textures/inv_item_jacket.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_jacket.tga rename to indra/newview/skins/blackred/textures/inv_item_jacket.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_landmark.tga b/indra/newview/skins/blackred/textures/inv_item_landmark.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_landmark.tga rename to indra/newview/skins/blackred/textures/inv_item_landmark.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_landmark_visited.tga b/indra/newview/skins/blackred/textures/inv_item_landmark_visited.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_landmark_visited.tga rename to indra/newview/skins/blackred/textures/inv_item_landmark_visited.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_notecard.tga b/indra/newview/skins/blackred/textures/inv_item_notecard.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_notecard.tga rename to indra/newview/skins/blackred/textures/inv_item_notecard.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_object.tga b/indra/newview/skins/blackred/textures/inv_item_object.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_object.tga rename to indra/newview/skins/blackred/textures/inv_item_object.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_object_multi.tga b/indra/newview/skins/blackred/textures/inv_item_object_multi.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_object_multi.tga rename to indra/newview/skins/blackred/textures/inv_item_object_multi.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_pants.tga b/indra/newview/skins/blackred/textures/inv_item_pants.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_pants.tga rename to indra/newview/skins/blackred/textures/inv_item_pants.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_script.tga b/indra/newview/skins/blackred/textures/inv_item_script.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_script.tga rename to indra/newview/skins/blackred/textures/inv_item_script.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_script_dangerous.tga b/indra/newview/skins/blackred/textures/inv_item_script_dangerous.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_script_dangerous.tga rename to indra/newview/skins/blackred/textures/inv_item_script_dangerous.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_shape.tga b/indra/newview/skins/blackred/textures/inv_item_shape.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_shape.tga rename to indra/newview/skins/blackred/textures/inv_item_shape.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_shirt.tga b/indra/newview/skins/blackred/textures/inv_item_shirt.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_shirt.tga rename to indra/newview/skins/blackred/textures/inv_item_shirt.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_shoes.tga b/indra/newview/skins/blackred/textures/inv_item_shoes.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_shoes.tga rename to indra/newview/skins/blackred/textures/inv_item_shoes.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_skin.tga b/indra/newview/skins/blackred/textures/inv_item_skin.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_skin.tga rename to indra/newview/skins/blackred/textures/inv_item_skin.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_skirt.tga b/indra/newview/skins/blackred/textures/inv_item_skirt.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_skirt.tga rename to indra/newview/skins/blackred/textures/inv_item_skirt.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_snapshot.tga b/indra/newview/skins/blackred/textures/inv_item_snapshot.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_snapshot.tga rename to indra/newview/skins/blackred/textures/inv_item_snapshot.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_socks.tga b/indra/newview/skins/blackred/textures/inv_item_socks.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_socks.tga rename to indra/newview/skins/blackred/textures/inv_item_socks.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_sound.tga b/indra/newview/skins/blackred/textures/inv_item_sound.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_sound.tga rename to indra/newview/skins/blackred/textures/inv_item_sound.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_texture.tga b/indra/newview/skins/blackred/textures/inv_item_texture.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_texture.tga rename to indra/newview/skins/blackred/textures/inv_item_texture.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_underpants.tga b/indra/newview/skins/blackred/textures/inv_item_underpants.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_underpants.tga rename to indra/newview/skins/blackred/textures/inv_item_underpants.tga diff --git a/indra/newview/skins/Blackred/textures/inv_item_undershirt.tga b/indra/newview/skins/blackred/textures/inv_item_undershirt.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/inv_item_undershirt.tga rename to indra/newview/skins/blackred/textures/inv_item_undershirt.tga diff --git a/indra/newview/skins/Blackred/textures/lightgray.tga b/indra/newview/skins/blackred/textures/lightgray.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/lightgray.tga rename to indra/newview/skins/blackred/textures/lightgray.tga diff --git a/indra/newview/skins/Blackred/textures/map_avatar_16.tga b/indra/newview/skins/blackred/textures/map_avatar_16.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_avatar_16.tga rename to indra/newview/skins/blackred/textures/map_avatar_16.tga diff --git a/indra/newview/skins/Blackred/textures/map_avatar_8.tga b/indra/newview/skins/blackred/textures/map_avatar_8.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_avatar_8.tga rename to indra/newview/skins/blackred/textures/map_avatar_8.tga diff --git a/indra/newview/skins/Blackred/textures/map_avatar_above_8.tga b/indra/newview/skins/blackred/textures/map_avatar_above_8.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_avatar_above_8.tga rename to indra/newview/skins/blackred/textures/map_avatar_above_8.tga diff --git a/indra/newview/skins/Blackred/textures/map_avatar_below_8.tga b/indra/newview/skins/blackred/textures/map_avatar_below_8.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_avatar_below_8.tga rename to indra/newview/skins/blackred/textures/map_avatar_below_8.tga diff --git a/indra/newview/skins/Blackred/textures/map_avatar_you_8.tga b/indra/newview/skins/blackred/textures/map_avatar_you_8.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_avatar_you_8.tga rename to indra/newview/skins/blackred/textures/map_avatar_you_8.tga diff --git a/indra/newview/skins/Blackred/textures/map_event.tga b/indra/newview/skins/blackred/textures/map_event.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_event.tga rename to indra/newview/skins/blackred/textures/map_event.tga diff --git a/indra/newview/skins/Blackred/textures/map_event_adult.tga b/indra/newview/skins/blackred/textures/map_event_adult.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_event_adult.tga rename to indra/newview/skins/blackred/textures/map_event_adult.tga diff --git a/indra/newview/skins/Blackred/textures/map_event_mature.tga b/indra/newview/skins/blackred/textures/map_event_mature.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_event_mature.tga rename to indra/newview/skins/blackred/textures/map_event_mature.tga diff --git a/indra/newview/skins/Blackred/textures/map_home.tga b/indra/newview/skins/blackred/textures/map_home.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_home.tga rename to indra/newview/skins/blackred/textures/map_home.tga diff --git a/indra/newview/skins/Blackred/textures/map_infohub.tga b/indra/newview/skins/blackred/textures/map_infohub.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_infohub.tga rename to indra/newview/skins/blackred/textures/map_infohub.tga diff --git a/indra/newview/skins/Blackred/textures/map_telehub.tga b/indra/newview/skins/blackred/textures/map_telehub.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_telehub.tga rename to indra/newview/skins/blackred/textures/map_telehub.tga diff --git a/indra/newview/skins/Blackred/textures/map_track_16.tga b/indra/newview/skins/blackred/textures/map_track_16.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_track_16.tga rename to indra/newview/skins/blackred/textures/map_track_16.tga diff --git a/indra/newview/skins/Blackred/textures/map_track_8.tga b/indra/newview/skins/blackred/textures/map_track_8.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/map_track_8.tga rename to indra/newview/skins/blackred/textures/map_track_8.tga diff --git a/indra/newview/skins/Blackred/textures/minimize.tga b/indra/newview/skins/blackred/textures/minimize.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/minimize.tga rename to indra/newview/skins/blackred/textures/minimize.tga diff --git a/indra/newview/skins/Blackred/textures/minimize_inactive.tga b/indra/newview/skins/blackred/textures/minimize_inactive.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/minimize_inactive.tga rename to indra/newview/skins/blackred/textures/minimize_inactive.tga diff --git a/indra/newview/skins/Blackred/textures/minimize_pressed.tga b/indra/newview/skins/blackred/textures/minimize_pressed.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/minimize_pressed.tga rename to indra/newview/skins/blackred/textures/minimize_pressed.tga diff --git a/indra/newview/skins/Blackred/textures/move_backward_in.tga b/indra/newview/skins/blackred/textures/move_backward_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_backward_in.tga rename to indra/newview/skins/blackred/textures/move_backward_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_backward_out.tga b/indra/newview/skins/blackred/textures/move_backward_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_backward_out.tga rename to indra/newview/skins/blackred/textures/move_backward_out.tga diff --git a/indra/newview/skins/Blackred/textures/move_down_in.tga b/indra/newview/skins/blackred/textures/move_down_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_down_in.tga rename to indra/newview/skins/blackred/textures/move_down_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_down_out.tga b/indra/newview/skins/blackred/textures/move_down_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_down_out.tga rename to indra/newview/skins/blackred/textures/move_down_out.tga diff --git a/indra/newview/skins/Blackred/textures/move_forward_in.tga b/indra/newview/skins/blackred/textures/move_forward_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_forward_in.tga rename to indra/newview/skins/blackred/textures/move_forward_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_forward_out.tga b/indra/newview/skins/blackred/textures/move_forward_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_forward_out.tga rename to indra/newview/skins/blackred/textures/move_forward_out.tga diff --git a/indra/newview/skins/Blackred/textures/move_left_in.tga b/indra/newview/skins/blackred/textures/move_left_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_left_in.tga rename to indra/newview/skins/blackred/textures/move_left_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_left_out.tga b/indra/newview/skins/blackred/textures/move_left_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_left_out.tga rename to indra/newview/skins/blackred/textures/move_left_out.tga diff --git a/indra/newview/skins/Blackred/textures/move_right_in.tga b/indra/newview/skins/blackred/textures/move_right_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_right_in.tga rename to indra/newview/skins/blackred/textures/move_right_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_right_out.tga b/indra/newview/skins/blackred/textures/move_right_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_right_out.tga rename to indra/newview/skins/blackred/textures/move_right_out.tga diff --git a/indra/newview/skins/Blackred/textures/move_turn_left_in.tga b/indra/newview/skins/blackred/textures/move_turn_left_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_turn_left_in.tga rename to indra/newview/skins/blackred/textures/move_turn_left_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_turn_left_out.tga b/indra/newview/skins/blackred/textures/move_turn_left_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_turn_left_out.tga rename to indra/newview/skins/blackred/textures/move_turn_left_out.tga diff --git a/indra/newview/skins/Blackred/textures/move_turn_right_in.tga b/indra/newview/skins/blackred/textures/move_turn_right_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_turn_right_in.tga rename to indra/newview/skins/blackred/textures/move_turn_right_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_turn_right_out.tga b/indra/newview/skins/blackred/textures/move_turn_right_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_turn_right_out.tga rename to indra/newview/skins/blackred/textures/move_turn_right_out.tga diff --git a/indra/newview/skins/Blackred/textures/move_up_in.tga b/indra/newview/skins/blackred/textures/move_up_in.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_up_in.tga rename to indra/newview/skins/blackred/textures/move_up_in.tga diff --git a/indra/newview/skins/Blackred/textures/move_up_out.tga b/indra/newview/skins/blackred/textures/move_up_out.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/move_up_out.tga rename to indra/newview/skins/blackred/textures/move_up_out.tga diff --git a/indra/newview/skins/Blackred/textures/notify_box_icon.tga b/indra/newview/skins/blackred/textures/notify_box_icon.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/notify_box_icon.tga rename to indra/newview/skins/blackred/textures/notify_box_icon.tga diff --git a/indra/newview/skins/Blackred/textures/notify_caution_icon.tga b/indra/newview/skins/blackred/textures/notify_caution_icon.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/notify_caution_icon.tga rename to indra/newview/skins/blackred/textures/notify_caution_icon.tga diff --git a/indra/newview/skins/Blackred/textures/notify_next.png b/indra/newview/skins/blackred/textures/notify_next.png similarity index 100% rename from indra/newview/skins/Blackred/textures/notify_next.png rename to indra/newview/skins/blackred/textures/notify_next.png diff --git a/indra/newview/skins/Blackred/textures/notify_tip_icon.tga b/indra/newview/skins/blackred/textures/notify_tip_icon.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/notify_tip_icon.tga rename to indra/newview/skins/blackred/textures/notify_tip_icon.tga diff --git a/indra/newview/skins/Blackred/textures/object_cone.tga b/indra/newview/skins/blackred/textures/object_cone.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_cone.tga rename to indra/newview/skins/blackred/textures/object_cone.tga diff --git a/indra/newview/skins/Blackred/textures/object_cone_active.tga b/indra/newview/skins/blackred/textures/object_cone_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_cone_active.tga rename to indra/newview/skins/blackred/textures/object_cone_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_cube.tga b/indra/newview/skins/blackred/textures/object_cube.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_cube.tga rename to indra/newview/skins/blackred/textures/object_cube.tga diff --git a/indra/newview/skins/Blackred/textures/object_cube_active.tga b/indra/newview/skins/blackred/textures/object_cube_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_cube_active.tga rename to indra/newview/skins/blackred/textures/object_cube_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_cylinder.tga b/indra/newview/skins/blackred/textures/object_cylinder.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_cylinder.tga rename to indra/newview/skins/blackred/textures/object_cylinder.tga diff --git a/indra/newview/skins/Blackred/textures/object_cylinder_active.tga b/indra/newview/skins/blackred/textures/object_cylinder_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_cylinder_active.tga rename to indra/newview/skins/blackred/textures/object_cylinder_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_grass.tga b/indra/newview/skins/blackred/textures/object_grass.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_grass.tga rename to indra/newview/skins/blackred/textures/object_grass.tga diff --git a/indra/newview/skins/Blackred/textures/object_grass_active.tga b/indra/newview/skins/blackred/textures/object_grass_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_grass_active.tga rename to indra/newview/skins/blackred/textures/object_grass_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_hemi_cone.tga b/indra/newview/skins/blackred/textures/object_hemi_cone.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_hemi_cone.tga rename to indra/newview/skins/blackred/textures/object_hemi_cone.tga diff --git a/indra/newview/skins/Blackred/textures/object_hemi_cone_active.tga b/indra/newview/skins/blackred/textures/object_hemi_cone_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_hemi_cone_active.tga rename to indra/newview/skins/blackred/textures/object_hemi_cone_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_hemi_cylinder.tga b/indra/newview/skins/blackred/textures/object_hemi_cylinder.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_hemi_cylinder.tga rename to indra/newview/skins/blackred/textures/object_hemi_cylinder.tga diff --git a/indra/newview/skins/Blackred/textures/object_hemi_cylinder_active.tga b/indra/newview/skins/blackred/textures/object_hemi_cylinder_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_hemi_cylinder_active.tga rename to indra/newview/skins/blackred/textures/object_hemi_cylinder_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_hemi_sphere.tga b/indra/newview/skins/blackred/textures/object_hemi_sphere.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_hemi_sphere.tga rename to indra/newview/skins/blackred/textures/object_hemi_sphere.tga diff --git a/indra/newview/skins/Blackred/textures/object_hemi_sphere_active.tga b/indra/newview/skins/blackred/textures/object_hemi_sphere_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_hemi_sphere_active.tga rename to indra/newview/skins/blackred/textures/object_hemi_sphere_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_prism.tga b/indra/newview/skins/blackred/textures/object_prism.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_prism.tga rename to indra/newview/skins/blackred/textures/object_prism.tga diff --git a/indra/newview/skins/Blackred/textures/object_prism_active.tga b/indra/newview/skins/blackred/textures/object_prism_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_prism_active.tga rename to indra/newview/skins/blackred/textures/object_prism_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_pyramid.tga b/indra/newview/skins/blackred/textures/object_pyramid.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_pyramid.tga rename to indra/newview/skins/blackred/textures/object_pyramid.tga diff --git a/indra/newview/skins/Blackred/textures/object_pyramid_active.tga b/indra/newview/skins/blackred/textures/object_pyramid_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_pyramid_active.tga rename to indra/newview/skins/blackred/textures/object_pyramid_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_ring.tga b/indra/newview/skins/blackred/textures/object_ring.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_ring.tga rename to indra/newview/skins/blackred/textures/object_ring.tga diff --git a/indra/newview/skins/Blackred/textures/object_ring_active.tga b/indra/newview/skins/blackred/textures/object_ring_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_ring_active.tga rename to indra/newview/skins/blackred/textures/object_ring_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_sphere.tga b/indra/newview/skins/blackred/textures/object_sphere.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_sphere.tga rename to indra/newview/skins/blackred/textures/object_sphere.tga diff --git a/indra/newview/skins/Blackred/textures/object_sphere_active.tga b/indra/newview/skins/blackred/textures/object_sphere_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_sphere_active.tga rename to indra/newview/skins/blackred/textures/object_sphere_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_tetrahedron.tga b/indra/newview/skins/blackred/textures/object_tetrahedron.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_tetrahedron.tga rename to indra/newview/skins/blackred/textures/object_tetrahedron.tga diff --git a/indra/newview/skins/Blackred/textures/object_tetrahedron_active.tga b/indra/newview/skins/blackred/textures/object_tetrahedron_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_tetrahedron_active.tga rename to indra/newview/skins/blackred/textures/object_tetrahedron_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_torus.tga b/indra/newview/skins/blackred/textures/object_torus.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_torus.tga rename to indra/newview/skins/blackred/textures/object_torus.tga diff --git a/indra/newview/skins/Blackred/textures/object_torus_active.tga b/indra/newview/skins/blackred/textures/object_torus_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_torus_active.tga rename to indra/newview/skins/blackred/textures/object_torus_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_tree.tga b/indra/newview/skins/blackred/textures/object_tree.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_tree.tga rename to indra/newview/skins/blackred/textures/object_tree.tga diff --git a/indra/newview/skins/Blackred/textures/object_tree_active.tga b/indra/newview/skins/blackred/textures/object_tree_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_tree_active.tga rename to indra/newview/skins/blackred/textures/object_tree_active.tga diff --git a/indra/newview/skins/Blackred/textures/object_tube.tga b/indra/newview/skins/blackred/textures/object_tube.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_tube.tga rename to indra/newview/skins/blackred/textures/object_tube.tga diff --git a/indra/newview/skins/Blackred/textures/object_tube_active.tga b/indra/newview/skins/blackred/textures/object_tube_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/object_tube_active.tga rename to indra/newview/skins/blackred/textures/object_tube_active.tga diff --git a/indra/newview/skins/Blackred/textures/preview.png b/indra/newview/skins/blackred/textures/preview.png similarity index 100% rename from indra/newview/skins/Blackred/textures/preview.png rename to indra/newview/skins/blackred/textures/preview.png diff --git a/indra/newview/skins/Blackred/textures/progress_fill.tga b/indra/newview/skins/blackred/textures/progress_fill.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/progress_fill.tga rename to indra/newview/skins/blackred/textures/progress_fill.tga diff --git a/indra/newview/skins/Blackred/textures/progressbar_fill.tga b/indra/newview/skins/blackred/textures/progressbar_fill.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/progressbar_fill.tga rename to indra/newview/skins/blackred/textures/progressbar_fill.tga diff --git a/indra/newview/skins/Blackred/textures/progressbar_track.tga b/indra/newview/skins/blackred/textures/progressbar_track.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/progressbar_track.tga rename to indra/newview/skins/blackred/textures/progressbar_track.tga diff --git a/indra/newview/skins/Blackred/textures/ptt_lock_off.tga b/indra/newview/skins/blackred/textures/ptt_lock_off.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ptt_lock_off.tga rename to indra/newview/skins/blackred/textures/ptt_lock_off.tga diff --git a/indra/newview/skins/Blackred/textures/ptt_lock_on.tga b/indra/newview/skins/blackred/textures/ptt_lock_on.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/ptt_lock_on.tga rename to indra/newview/skins/blackred/textures/ptt_lock_on.tga diff --git a/indra/newview/skins/Blackred/textures/radio_active_false.tga b/indra/newview/skins/blackred/textures/radio_active_false.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/radio_active_false.tga rename to indra/newview/skins/blackred/textures/radio_active_false.tga diff --git a/indra/newview/skins/Blackred/textures/radio_active_true.tga b/indra/newview/skins/blackred/textures/radio_active_true.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/radio_active_true.tga rename to indra/newview/skins/blackred/textures/radio_active_true.tga diff --git a/indra/newview/skins/Blackred/textures/radio_inactive_false.tga b/indra/newview/skins/blackred/textures/radio_inactive_false.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/radio_inactive_false.tga rename to indra/newview/skins/blackred/textures/radio_inactive_false.tga diff --git a/indra/newview/skins/Blackred/textures/radio_inactive_true.tga b/indra/newview/skins/blackred/textures/radio_inactive_true.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/radio_inactive_true.tga rename to indra/newview/skins/blackred/textures/radio_inactive_true.tga diff --git a/indra/newview/skins/Blackred/textures/resize_handle_bottom_right_blue.tga b/indra/newview/skins/blackred/textures/resize_handle_bottom_right_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/resize_handle_bottom_right_blue.tga rename to indra/newview/skins/blackred/textures/resize_handle_bottom_right_blue.tga diff --git a/indra/newview/skins/Blackred/textures/restore.tga b/indra/newview/skins/blackred/textures/restore.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/restore.tga rename to indra/newview/skins/blackred/textures/restore.tga diff --git a/indra/newview/skins/Blackred/textures/restore_inactive.tga b/indra/newview/skins/blackred/textures/restore_inactive.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/restore_inactive.tga rename to indra/newview/skins/blackred/textures/restore_inactive.tga diff --git a/indra/newview/skins/Blackred/textures/restore_pressed.tga b/indra/newview/skins/blackred/textures/restore_pressed.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/restore_pressed.tga rename to indra/newview/skins/blackred/textures/restore_pressed.tga diff --git a/indra/newview/skins/Blackred/textures/rounded_square.j2c b/indra/newview/skins/blackred/textures/rounded_square.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/rounded_square.j2c rename to indra/newview/skins/blackred/textures/rounded_square.j2c diff --git a/indra/newview/skins/Blackred/textures/rounded_square.tga b/indra/newview/skins/blackred/textures/rounded_square.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/rounded_square.tga rename to indra/newview/skins/blackred/textures/rounded_square.tga diff --git a/indra/newview/skins/Blackred/textures/rounded_square_soft.tga b/indra/newview/skins/blackred/textures/rounded_square_soft.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/rounded_square_soft.tga rename to indra/newview/skins/blackred/textures/rounded_square_soft.tga diff --git a/indra/newview/skins/Blackred/textures/script_error.j2c b/indra/newview/skins/blackred/textures/script_error.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/script_error.j2c rename to indra/newview/skins/blackred/textures/script_error.j2c diff --git a/indra/newview/skins/Blackred/textures/script_error.tga b/indra/newview/skins/blackred/textures/script_error.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/script_error.tga rename to indra/newview/skins/blackred/textures/script_error.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_down_in_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_down_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_down_in_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_down_in_blue.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_down_out_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_down_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_down_out_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_down_out_blue.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_left_in_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_left_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_left_in_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_left_in_blue.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_left_out_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_left_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_left_out_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_left_out_blue.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_right_in_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_right_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_right_in_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_right_in_blue.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_right_out_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_right_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_right_out_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_right_out_blue.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_up_in_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_up_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_up_in_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_up_in_blue.tga diff --git a/indra/newview/skins/Blackred/textures/scrollbutton_up_out_blue.tga b/indra/newview/skins/blackred/textures/scrollbutton_up_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/scrollbutton_up_out_blue.tga rename to indra/newview/skins/blackred/textures/scrollbutton_up_out_blue.tga diff --git a/indra/newview/skins/Blackred/textures/sm_rounded_corners_simple.tga b/indra/newview/skins/blackred/textures/sm_rounded_corners_simple.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/sm_rounded_corners_simple.tga rename to indra/newview/skins/blackred/textures/sm_rounded_corners_simple.tga diff --git a/indra/newview/skins/Blackred/textures/spin_down_in_blue.tga b/indra/newview/skins/blackred/textures/spin_down_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/spin_down_in_blue.tga rename to indra/newview/skins/blackred/textures/spin_down_in_blue.tga diff --git a/indra/newview/skins/Blackred/textures/spin_down_out_blue.tga b/indra/newview/skins/blackred/textures/spin_down_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/spin_down_out_blue.tga rename to indra/newview/skins/blackred/textures/spin_down_out_blue.tga diff --git a/indra/newview/skins/Blackred/textures/spin_up_in_blue.tga b/indra/newview/skins/blackred/textures/spin_up_in_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/spin_up_in_blue.tga rename to indra/newview/skins/blackred/textures/spin_up_in_blue.tga diff --git a/indra/newview/skins/Blackred/textures/spin_up_out_blue.tga b/indra/newview/skins/blackred/textures/spin_up_out_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/spin_up_out_blue.tga rename to indra/newview/skins/blackred/textures/spin_up_out_blue.tga diff --git a/indra/newview/skins/Blackred/textures/square_btn_32x128.tga b/indra/newview/skins/blackred/textures/square_btn_32x128.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/square_btn_32x128.tga rename to indra/newview/skins/blackred/textures/square_btn_32x128.tga diff --git a/indra/newview/skins/Blackred/textures/square_btn_selected_32x128.tga b/indra/newview/skins/blackred/textures/square_btn_selected_32x128.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/square_btn_selected_32x128.tga rename to indra/newview/skins/blackred/textures/square_btn_selected_32x128.tga diff --git a/indra/newview/skins/Blackred/textures/startup_logo.j2c b/indra/newview/skins/blackred/textures/startup_logo.j2c similarity index 100% rename from indra/newview/skins/Blackred/textures/startup_logo.j2c rename to indra/newview/skins/blackred/textures/startup_logo.j2c diff --git a/indra/newview/skins/Blackred/textures/status_buy_currency.tga b/indra/newview/skins/blackred/textures/status_buy_currency.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_buy_currency.tga rename to indra/newview/skins/blackred/textures/status_buy_currency.tga diff --git a/indra/newview/skins/Blackred/textures/status_buy_currency_pressed.tga b/indra/newview/skins/blackred/textures/status_buy_currency_pressed.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_buy_currency_pressed.tga rename to indra/newview/skins/blackred/textures/status_buy_currency_pressed.tga diff --git a/indra/newview/skins/Blackred/textures/status_buy_land.tga b/indra/newview/skins/blackred/textures/status_buy_land.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_buy_land.tga rename to indra/newview/skins/blackred/textures/status_buy_land.tga diff --git a/indra/newview/skins/Blackred/textures/status_buy_land_pressed.tga b/indra/newview/skins/blackred/textures/status_buy_land_pressed.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_buy_land_pressed.tga rename to indra/newview/skins/blackred/textures/status_buy_land_pressed.tga diff --git a/indra/newview/skins/Blackred/textures/status_health.tga b/indra/newview/skins/blackred/textures/status_health.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_health.tga rename to indra/newview/skins/blackred/textures/status_health.tga diff --git a/indra/newview/skins/Blackred/textures/status_no_build.tga b/indra/newview/skins/blackred/textures/status_no_build.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_no_build.tga rename to indra/newview/skins/blackred/textures/status_no_build.tga diff --git a/indra/newview/skins/Blackred/textures/status_no_fly.tga b/indra/newview/skins/blackred/textures/status_no_fly.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_no_fly.tga rename to indra/newview/skins/blackred/textures/status_no_fly.tga diff --git a/indra/newview/skins/Blackred/textures/status_no_push.tga b/indra/newview/skins/blackred/textures/status_no_push.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_no_push.tga rename to indra/newview/skins/blackred/textures/status_no_push.tga diff --git a/indra/newview/skins/Blackred/textures/status_no_scripts.tga b/indra/newview/skins/blackred/textures/status_no_scripts.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_no_scripts.tga rename to indra/newview/skins/blackred/textures/status_no_scripts.tga diff --git a/indra/newview/skins/Blackred/textures/status_no_voice.tga b/indra/newview/skins/blackred/textures/status_no_voice.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_no_voice.tga rename to indra/newview/skins/blackred/textures/status_no_voice.tga diff --git a/indra/newview/skins/Blackred/textures/status_script_debug.tga b/indra/newview/skins/blackred/textures/status_script_debug.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_script_debug.tga rename to indra/newview/skins/blackred/textures/status_script_debug.tga diff --git a/indra/newview/skins/Blackred/textures/status_search_btn.png b/indra/newview/skins/blackred/textures/status_search_btn.png similarity index 100% rename from indra/newview/skins/Blackred/textures/status_search_btn.png rename to indra/newview/skins/blackred/textures/status_search_btn.png diff --git a/indra/newview/skins/Blackred/textures/status_search_btn_pressed.png b/indra/newview/skins/blackred/textures/status_search_btn_pressed.png similarity index 100% rename from indra/newview/skins/Blackred/textures/status_search_btn_pressed.png rename to indra/newview/skins/blackred/textures/status_search_btn_pressed.png diff --git a/indra/newview/skins/Blackred/textures/status_voice.tga b/indra/newview/skins/blackred/textures/status_voice.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/status_voice.tga rename to indra/newview/skins/blackred/textures/status_voice.tga diff --git a/indra/newview/skins/Blackred/textures/tab_bottom_blue.tga b/indra/newview/skins/blackred/textures/tab_bottom_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tab_bottom_blue.tga rename to indra/newview/skins/blackred/textures/tab_bottom_blue.tga diff --git a/indra/newview/skins/Blackred/textures/tab_bottom_selected_blue.tga b/indra/newview/skins/blackred/textures/tab_bottom_selected_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tab_bottom_selected_blue.tga rename to indra/newview/skins/blackred/textures/tab_bottom_selected_blue.tga diff --git a/indra/newview/skins/Blackred/textures/tab_left.tga b/indra/newview/skins/blackred/textures/tab_left.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tab_left.tga rename to indra/newview/skins/blackred/textures/tab_left.tga diff --git a/indra/newview/skins/Blackred/textures/tab_left_selected.tga b/indra/newview/skins/blackred/textures/tab_left_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tab_left_selected.tga rename to indra/newview/skins/blackred/textures/tab_left_selected.tga diff --git a/indra/newview/skins/Blackred/textures/tab_top_blue.tga b/indra/newview/skins/blackred/textures/tab_top_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tab_top_blue.tga rename to indra/newview/skins/blackred/textures/tab_top_blue.tga diff --git a/indra/newview/skins/Blackred/textures/tab_top_selected_blue.tga b/indra/newview/skins/blackred/textures/tab_top_selected_blue.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tab_top_selected_blue.tga rename to indra/newview/skins/blackred/textures/tab_top_selected_blue.tga diff --git a/indra/newview/skins/Blackred/textures/tearoff_pressed.tga b/indra/newview/skins/blackred/textures/tearoff_pressed.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tearoff_pressed.tga rename to indra/newview/skins/blackred/textures/tearoff_pressed.tga diff --git a/indra/newview/skins/Blackred/textures/tearoffbox.tga b/indra/newview/skins/blackred/textures/tearoffbox.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tearoffbox.tga rename to indra/newview/skins/blackred/textures/tearoffbox.tga diff --git a/indra/newview/skins/Blackred/textures/textures.xml b/indra/newview/skins/blackred/textures/textures.xml similarity index 99% rename from indra/newview/skins/Blackred/textures/textures.xml rename to indra/newview/skins/blackred/textures/textures.xml index 5955a8ede..9f617f56b 100644 --- a/indra/newview/skins/Blackred/textures/textures.xml +++ b/indra/newview/skins/blackred/textures/textures.xml @@ -78,7 +78,7 @@ - + diff --git a/indra/newview/skins/Blackred/textures/tool_dozer.tga b/indra/newview/skins/blackred/textures/tool_dozer.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tool_dozer.tga rename to indra/newview/skins/blackred/textures/tool_dozer.tga diff --git a/indra/newview/skins/Blackred/textures/tool_dozer_active.tga b/indra/newview/skins/blackred/textures/tool_dozer_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tool_dozer_active.tga rename to indra/newview/skins/blackred/textures/tool_dozer_active.tga diff --git a/indra/newview/skins/Blackred/textures/tool_zoom.tga b/indra/newview/skins/blackred/textures/tool_zoom.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tool_zoom.tga rename to indra/newview/skins/blackred/textures/tool_zoom.tga diff --git a/indra/newview/skins/Blackred/textures/tool_zoom_active.tga b/indra/newview/skins/blackred/textures/tool_zoom_active.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/tool_zoom_active.tga rename to indra/newview/skins/blackred/textures/tool_zoom_active.tga diff --git a/indra/newview/skins/Blackred/textures/toolbar_bg.tga b/indra/newview/skins/blackred/textures/toolbar_bg.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/toolbar_bg.tga rename to indra/newview/skins/blackred/textures/toolbar_bg.tga diff --git a/indra/newview/skins/Blackred/textures/toolbar_btn_disabled.tga b/indra/newview/skins/blackred/textures/toolbar_btn_disabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/toolbar_btn_disabled.tga rename to indra/newview/skins/blackred/textures/toolbar_btn_disabled.tga diff --git a/indra/newview/skins/Blackred/textures/toolbar_btn_enabled.tga b/indra/newview/skins/blackred/textures/toolbar_btn_enabled.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/toolbar_btn_enabled.tga rename to indra/newview/skins/blackred/textures/toolbar_btn_enabled.tga diff --git a/indra/newview/skins/Blackred/textures/toolbar_btn_selected.tga b/indra/newview/skins/blackred/textures/toolbar_btn_selected.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/toolbar_btn_selected.tga rename to indra/newview/skins/blackred/textures/toolbar_btn_selected.tga diff --git a/indra/newview/skins/Blackred/textures/toolbar_tab.tga b/indra/newview/skins/blackred/textures/toolbar_tab.tga similarity index 100% rename from indra/newview/skins/Blackred/textures/toolbar_tab.tga rename to indra/newview/skins/blackred/textures/toolbar_tab.tga diff --git a/indra/newview/skins/Blackred/textures/up_arrow.png b/indra/newview/skins/blackred/textures/up_arrow.png similarity index 100% rename from indra/newview/skins/Blackred/textures/up_arrow.png rename to indra/newview/skins/blackred/textures/up_arrow.png diff --git a/indra/newview/skins/default/colors_base.xml b/indra/newview/skins/default/colors_base.xml index 51d78e833..88469baa7 100644 --- a/indra/newview/skins/default/colors_base.xml +++ b/indra/newview/skins/default/colors_base.xml @@ -223,4 +223,17 @@ + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/textures/Pathfinding_Dirty.png b/indra/newview/skins/default/textures/Pathfinding_Dirty.png new file mode 100644 index 000000000..4ed8c1442 Binary files /dev/null and b/indra/newview/skins/default/textures/Pathfinding_Dirty.png differ diff --git a/indra/newview/skins/default/textures/Pathfinding_Disabled.png b/indra/newview/skins/default/textures/Pathfinding_Disabled.png new file mode 100644 index 000000000..09cb47edd Binary files /dev/null and b/indra/newview/skins/default/textures/Pathfinding_Disabled.png differ diff --git a/indra/newview/skins/default/xui/en-us/floater_about.xml b/indra/newview/skins/default/xui/en-us/floater_about.xml index 6596f818f..151fdb0ec 100644 --- a/indra/newview/skins/default/xui/en-us/floater_about.xml +++ b/indra/newview/skins/default/xui/en-us/floater_about.xml @@ -12,7 +12,7 @@ -Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Aleric Inglewood, Narv Czervik, Tigh MacFanatic, Inusaito Kanya, Sovereign Engineer and Latif Khalifa, with contributions by Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Knolan Falconer, Kadah Coba, Kitty Barnett, McCabe Maxsted, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Thickbrick Sleaford, Wolfspirit Magic, Zauber Parecelsus and others. Singularity is based upon Ascent source code. Credits for Ascent include Hg Beeks, Charley Levenque, Hazim Gazov, Zwagoth Klaar, Qarl Fizz, and others. Ascent is based upon the Inertia source code. +Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Aleric Inglewood, Narv Czervik, Tigh MacFanatic, Inusaito Kanya, Sovereign Engineer and Latif Khalifa, with contributions by Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Kadah Coba, Kitty Barnett, Knolan Falconer, McCabe Maxsted, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Thickbrick Sleaford, Wolfspirit Magic, Zauber Parecelsus and others. Singularity is based upon Ascent source code. Credits for Ascent include Hg Beeks, Charley Levenque, Hazim Gazov, Zwagoth Klaar, Qarl Fizz, and others. Ascent is based upon the Inertia source code. Singularity Viewer includes source code contributions of the following residents: Able Whitman, Adam Marker, Agathos Frascati, Aimee Trescothick, Alejandro Rosenthal, Aleric Inglewood, Alissa Sabre, Angus Boyd, Ann Congrejo, Argent Stonecutter, Asuka Neely, Balp Allen, Benja Kepler, Biancaluce Robbiani, Blakar Ogre, blino Nakamura, Boroondas Gupte, Bulli Schumann, bushing Spatula, Carjay McGinnis, Catherine Pfeffer, Celierra Darling, Cron Stardust, Dale Glass, Drewan Keats, Dylan Haskell, Dzonatas Sol, Eddy Stryker, EponymousDylan Ra, Eva Nowicka, Farallon Greyskin, Feep Larsson, Flemming Congrejo, Fluf Fredriksson, Fractured Crystal, Fremont Cunningham, Geneko Nemeth, Gigs Taggart, Ginko Bayliss, Grazer Kline, Gudmund Shepherd, Hamncheese Omlet, HappySmurf Papp, Henri Beauchamp, Hikkoshi Sakai, Hiro Sommambulist, Hoze Menges, Ian Kas, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Joghert LeSabre, Kage Pixel, Ken March, Kerutsen Sellery, Khyota Wulluf, Kunnis Basiat, Lisa Lowe, Lockhart Cordoso, maciek marksman, Magnus Balczo, Malwina Dollinger, march Korda, Matthew Dowd, McCabe Maxsted, Michelle2 Zenovka, Mm Alder, Mr Greggan, Nicholaz Beresford, Nounouch Hapmouche, Patric Mills, Paul Churchill, Paula Innis, Peekay Semyorka, Peter Lameth, Pf Shan, princess niven, Renault Clio, Ringo Tuxing, Robin Cornelius, Ryozu Kojima, Salahzar Stenvaag, Sammy Frederix, Scrippy Scofield, Seg Baphomet, Sergen Davies, SignpostMarv Martin, Simon Nolan, SpacedOut Frye, Sporked Friis, Stevex Janus, Still Defiant, Strife Onizuka, Tayra Dagostino, TBBle Kurosawa, Teardrops Fall, tenebrous pau, Tharax Ferraris, Thickbrick Sleaford, Thraxis Epsilon, tiamat bingyi, TraductoresAnonimos Alter, Tue Torok, Vadim Bigbear, Vixen Heron, Whoops Babii, Wilton Lundquist, Zarkonnen Decosta, Zi Ree, and Zipherius Turas. diff --git a/indra/newview/skins/default/xui/en-us/floater_asset_text_editor.xml b/indra/newview/skins/default/xui/en-us/floater_asset_text_editor.xml deleted file mode 100644 index 653bb675c..000000000 --- a/indra/newview/skins/default/xui/en-us/floater_asset_text_editor.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - Loading... -