Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git
Conflicts: indra/newview/llviewerobject.cpp
This commit is contained in:
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
* text=auto
|
||||
@@ -41,7 +41,9 @@ if (WINDOWS)
|
||||
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /arch:SSE2 /fp:fast"
|
||||
CACHE STRING "C compiler release options" FORCE)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LARGEADDRESSAWARE")
|
||||
if(NOT CMAKE_EXE_LINKER_FLAGS_RELEASE MATCHES LARGEADDRESSAWARE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LARGEADDRESSAWARE")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "")
|
||||
@@ -68,8 +70,7 @@ if (WINDOWS)
|
||||
"${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C++ compiler release options" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE
|
||||
"${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
|
||||
CACHE STRING "C compiler release options" FORCE)
|
||||
"${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "C compiler release options" FORCE)
|
||||
add_definitions(
|
||||
/Zc:wchar_t-
|
||||
)
|
||||
|
||||
@@ -40,3 +40,11 @@ link_directories(
|
||||
${VORBISFILE_LIBRARY_DIRS}
|
||||
${OGG_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(LLAUDIO_VORBIS_LIBRARIES
|
||||
${VORBISENC_LIBRARIES}
|
||||
${VORBISFILE_LIBRARIES}
|
||||
${VORBIS_LIBRARIES}
|
||||
${OGG_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
@@ -7,10 +7,8 @@ set(Boost_FIND_REQUIRED ON)
|
||||
if (STANDALONE)
|
||||
include(FindBoost)
|
||||
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
find_package(Boost 1.40.0 COMPONENTS date_time filesystem program_options regex system thread wave)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
|
||||
@@ -18,36 +16,36 @@ 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_PROGRAM_OPTIONS_LIBRARY
|
||||
# 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_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
set(Boost_REGEX_LIBRARY
|
||||
optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
|
||||
|
||||
elseif (DARWIN)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system)
|
||||
set(Boost_FILESYSTEM_LIBRARY boost_filesystem)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
|
||||
set(Boost_REGEX_LIBRARY boost_regex)
|
||||
set(Boost_SYSTEM_LIBRARY boost_system)
|
||||
elseif (LINUX)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
set(Boost_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(Boost_REGEX_LIBRARY boost_regex-mt)
|
||||
set(Boost_SYSTEM_LIBRARY boost_system-mt)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -8,7 +8,7 @@ if(INSTALL_PROPRIETARY)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
|
||||
find_library(FMODEX_LIBRARY
|
||||
NAMES fmodex fmodex_vc fmodexL_vc
|
||||
NAMES fmodex fmodexL fmodex_vc fmodexL_vc
|
||||
PATHS
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}
|
||||
@@ -26,26 +26,25 @@ if (NOT FMODEX_LIBRARY)
|
||||
${FMODEX_SDK_DIR}
|
||||
)
|
||||
|
||||
|
||||
endif(FMODEX_SDK_DIR)
|
||||
if(WINDOWS AND NOT FMODEX_LIBRARY)
|
||||
set(FMODEX_PROG_DIR "$ENV{PROGRAMFILES}/FMOD SoundSystem/FMOD Programmers API Windows")
|
||||
find_library(FMODEX_LIBRARY
|
||||
fmodex_vc fmodexL_vc
|
||||
set(FMODEX_PROG_DIR "$ENV{PROGRAMFILES}/FMOD SoundSystem/FMOD Programmers API Windows")
|
||||
find_library(FMODEX_LIBRARY
|
||||
fmodex_vc fmodexL_vc
|
||||
PATHS
|
||||
${FMODEX_PROG_DIR}/api/lib
|
||||
${FMODEX_PROG_DIR}/api
|
||||
${FMODEX_PROG_DIR}
|
||||
${FMODEX_PROG_DIR}/api
|
||||
${FMODEX_PROG_DIR}
|
||||
)
|
||||
if(FMODEX_LIBRARY)
|
||||
message(STATUS "Found fmodex in ${FMODEX_PROG_DIR}")
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR})
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR} CACHE PATH "Path to the FMOD Ex SDK." FORCE)
|
||||
endif(FMODEX_LIBRARY)
|
||||
if(FMODEX_LIBRARY)
|
||||
message(STATUS "Found fmodex in ${FMODEX_PROG_DIR}")
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR})
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR} CACHE PATH "Path to the FMOD Ex SDK." FORCE)
|
||||
endif(FMODEX_LIBRARY)
|
||||
endif(WINDOWS AND NOT FMODEX_LIBRARY)
|
||||
endif (NOT FMODEX_LIBRARY)
|
||||
|
||||
find_path(FMODEX_INCLUDE_DIR fmod.h
|
||||
find_path(FMODEX_INCLUDE_DIR fmod.hpp
|
||||
${LIBS_PREBUILT_DIR}/include/fmodex
|
||||
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/fmodex
|
||||
${FMODEX_SDK_DIR}/api/inc
|
||||
@@ -53,6 +52,11 @@ find_path(FMODEX_INCLUDE_DIR fmod.h
|
||||
${FMODEX_SDK_DIR}
|
||||
)
|
||||
|
||||
if(DARWIN)
|
||||
set(FMODEX_ORIG_LIBRARY "${FMODEX_LIBRARY}")
|
||||
set(FMODEX_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/libfmodex.dylib")
|
||||
endif(DARWIN)
|
||||
|
||||
if (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
|
||||
set(FMODEX ON CACHE BOOL "Use closed source FMOD Ex sound library.")
|
||||
else (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR)
|
||||
|
||||
@@ -5,7 +5,7 @@ FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell.hxx
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2)
|
||||
SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2 hunspell-1.3)
|
||||
FIND_LIBRARY(HUNSPELL_LIBRARY
|
||||
NAMES ${HUNSPELL_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
|
||||
@@ -8,5 +8,5 @@ set(LLVFS_INCLUDE_DIRS
|
||||
|
||||
set(LLVFS_LIBRARIES
|
||||
llvfs
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -111,10 +111,4 @@ list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES})
|
||||
|
||||
add_library (llaudio ${llaudio_SOURCE_FILES})
|
||||
add_dependencies(llaudio prepare)
|
||||
target_link_libraries(
|
||||
llaudio
|
||||
${VORBISENC_LIBRARIES}
|
||||
${VORBISFILE_LIBRARIES}
|
||||
${VORBIS_LIBRARIES}
|
||||
${OGG_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ LLAudioStreamManagerFMODEX::LLAudioStreamManagerFMODEX(FMOD::System *system, con
|
||||
exinfo.cbsize = sizeof(exinfo);
|
||||
exinfo.suggestedsoundtype = FMOD_SOUND_TYPE_OGGVORBIS; //Hint to speed up loading.*/
|
||||
|
||||
FMOD_RESULT result = mSystem->createStream(url.c_str(), FMOD_2D | FMOD_NONBLOCKING | FMOD_IGNORETAGS, 0, &mInternetStream);
|
||||
FMOD_RESULT result = mSystem->createStream(url.c_str(), FMOD_2D | FMOD_NONBLOCKING | FMOD_MPEGSEARCH | FMOD_IGNORETAGS, 0, &mInternetStream);
|
||||
|
||||
if (result!= FMOD_OK)
|
||||
{
|
||||
|
||||
@@ -265,7 +265,7 @@ target_link_libraries(
|
||||
${EXPAT_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${CWDEBUG_LIBRARIES}
|
||||
${CORESERVICES_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -182,6 +182,11 @@ std::string LLFastTimer::sLogName = "";
|
||||
BOOL LLFastTimer::sMetricLog = FALSE;
|
||||
LLMutex* LLFastTimer::sLogLock = NULL;
|
||||
std::queue<LLSD> LLFastTimer::sLogQueue;
|
||||
const int LLFastTimer::NamedTimer::HISTORY_NUM = 300;
|
||||
|
||||
#if LL_WINDOWS
|
||||
#define USE_RDTSC 1
|
||||
#endif
|
||||
|
||||
std::vector<LLFastTimer::FrameState>* LLFastTimer::sTimerInfos = NULL;
|
||||
U64 LLFastTimer::sTimerCycles = 0;
|
||||
@@ -380,7 +385,9 @@ void LLFastTimer::updateCachedPointers()
|
||||
}
|
||||
|
||||
// See lltimer.cpp.
|
||||
#if LL_LINUX || LL_DARWIN || LL_SOLARIS
|
||||
#if USE_RDTSC
|
||||
std::string LLFastTimer::sClockType = "rdtsc";
|
||||
#elif LL_LINUX || LL_DARWIN || LL_SOLARIS
|
||||
std::string LLFastTimer::sClockType = "gettimeofday";
|
||||
#elif LL_WINDOWS
|
||||
std::string LLFastTimer::sClockType = "QueryPerformanceCounter";
|
||||
@@ -391,6 +398,9 @@ std::string LLFastTimer::sClockType = "QueryPerformanceCounter";
|
||||
//static
|
||||
U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
|
||||
{
|
||||
#if USE_RDTSC
|
||||
static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency()*1000000.0);
|
||||
#else
|
||||
static bool firstcall = true;
|
||||
static U64 sCPUClockFrequency;
|
||||
if (firstcall)
|
||||
@@ -398,6 +408,7 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
|
||||
sCPUClockFrequency = calc_clock_frequency();
|
||||
firstcall = false;
|
||||
}
|
||||
#endif
|
||||
return sCPUClockFrequency >> 8;
|
||||
}
|
||||
|
||||
@@ -425,16 +436,12 @@ LLFastTimer::NamedTimer::NamedTimer(const std::string& name)
|
||||
mFrameStateIndex = frame_state_list.size();
|
||||
getFrameStateList().push_back(FrameState(this));
|
||||
|
||||
mCountHistory = new U32[HISTORY_NUM];
|
||||
memset(mCountHistory, 0, sizeof(U32) * HISTORY_NUM);
|
||||
mCallHistory = new U32[HISTORY_NUM];
|
||||
memset(mCallHistory, 0, sizeof(U32) * HISTORY_NUM);
|
||||
mCountHistory.resize(HISTORY_NUM);
|
||||
mCallHistory.resize(HISTORY_NUM);
|
||||
}
|
||||
|
||||
LLFastTimer::NamedTimer::~NamedTimer()
|
||||
{
|
||||
delete[] mCountHistory;
|
||||
delete[] mCallHistory;
|
||||
}
|
||||
|
||||
std::string LLFastTimer::NamedTimer::getToolTip(S32 history_idx)
|
||||
@@ -627,10 +634,12 @@ void LLFastTimer::NamedTimer::accumulateTimings()
|
||||
// update timer history
|
||||
int hidx = cur_frame % HISTORY_NUM;
|
||||
|
||||
int weight = llmin(100, cur_frame);
|
||||
|
||||
timerp->mCountHistory[hidx] = timerp->mTotalTimeCounter;
|
||||
timerp->mCountAverage = ((U64)timerp->mCountAverage * cur_frame + timerp->mTotalTimeCounter) / (cur_frame+1);
|
||||
timerp->mCountAverage = ((F64)timerp->mCountAverage * weight + (F64)timerp->mTotalTimeCounter) / (weight+1);
|
||||
timerp->mCallHistory[hidx] = timerp->getFrameState().mCalls;
|
||||
timerp->mCallAverage = ((U64)timerp->mCallAverage * cur_frame + timerp->getFrameState().mCalls) / (cur_frame+1);
|
||||
timerp->mCallAverage = ((F64)timerp->mCallAverage * weight + (F64)timerp->getFrameState().mCalls) / (weight+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -766,8 +775,10 @@ void LLFastTimer::NamedTimer::reset()
|
||||
|
||||
timer.mCountAverage = 0;
|
||||
timer.mCallAverage = 0;
|
||||
memset(timer.mCountHistory, 0, sizeof(U32) * HISTORY_NUM);
|
||||
memset(timer.mCallHistory, 0, sizeof(U32) * HISTORY_NUM);
|
||||
timer.mCountHistory.clear();
|
||||
timer.mCountHistory.resize(HISTORY_NUM);
|
||||
timer.mCallHistory.clear();
|
||||
timer.mCallHistory.resize(HISTORY_NUM);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -846,7 +857,8 @@ void LLFastTimer::nextFrame()
|
||||
if (!sPauseHistory)
|
||||
{
|
||||
NamedTimer::processTimes();
|
||||
sLastFrameIndex = sCurFrameIndex++;
|
||||
sLastFrameIndex = sCurFrameIndex;
|
||||
++sCurFrameIndex;
|
||||
}
|
||||
|
||||
// get ready for next frame
|
||||
@@ -937,6 +949,38 @@ LLFastTimer::LLFastTimer(LLFastTimer::FrameState* state)
|
||||
// Important note: These implementations must be FAST!
|
||||
//
|
||||
|
||||
#if USE_RDTSC
|
||||
U32 LLFastTimer::getCPUClockCount32()
|
||||
{
|
||||
U32 ret_val;
|
||||
__asm
|
||||
{
|
||||
_emit 0x0f
|
||||
_emit 0x31
|
||||
shr eax,8
|
||||
shl edx,24
|
||||
or eax, edx
|
||||
mov dword ptr [ret_val], eax
|
||||
}
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
// return full timer value, *not* shifted by 8 bits
|
||||
U64 LLFastTimer::getCPUClockCount64()
|
||||
{
|
||||
U64 ret_val;
|
||||
__asm
|
||||
{
|
||||
_emit 0x0f
|
||||
_emit 0x31
|
||||
mov eax,eax
|
||||
mov edx,edx
|
||||
mov dword ptr [ret_val+4], edx
|
||||
mov dword ptr [ret_val], eax
|
||||
}
|
||||
return ret_val;
|
||||
}
|
||||
#else
|
||||
//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp
|
||||
// These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures.
|
||||
U32 LLFastTimer::getCPUClockCount32()
|
||||
@@ -948,4 +992,4 @@ U64 LLFastTimer::getCPUClockCount64()
|
||||
{
|
||||
return get_clock_count();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
public:
|
||||
~NamedTimer();
|
||||
|
||||
enum { HISTORY_NUM = 300 };
|
||||
static const int HISTORY_NUM;
|
||||
|
||||
const std::string& getName() const { return mName; }
|
||||
NamedTimer* getParent() const { return mParent; }
|
||||
@@ -82,8 +82,8 @@ public:
|
||||
void setCollapsed(bool collapsed) { mCollapsed = collapsed; }
|
||||
bool getCollapsed() const { return mCollapsed; }
|
||||
|
||||
U32 getCountAverage() const; //{ return mCountAverage }
|
||||
U32 getCallAverage() const; //{ return mCallAverage }
|
||||
U32 getCountAverage() const;
|
||||
U32 getCallAverage() const;
|
||||
|
||||
U32 getHistoricalCount(S32 history_index = 0) const;
|
||||
U32 getHistoricalCalls(S32 history_index = 0) const;
|
||||
@@ -122,11 +122,11 @@ public:
|
||||
|
||||
U32 mTotalTimeCounter;
|
||||
|
||||
U32 mCountAverage;
|
||||
U32 mCallAverage;
|
||||
F64 mCountAverage;
|
||||
F64 mCallAverage;
|
||||
|
||||
U32* mCountHistory;
|
||||
U32* mCallHistory;
|
||||
std::vector<U32> mCountHistory;
|
||||
std::vector<U32> mCallHistory;
|
||||
|
||||
// tree structure
|
||||
NamedTimer* mParent; // NamedTimer of caller(parent)
|
||||
@@ -258,11 +258,10 @@ public:
|
||||
static CurTimerData sCurTimerData;
|
||||
static std::string sClockType;
|
||||
|
||||
public:
|
||||
private:
|
||||
static U32 getCPUClockCount32();
|
||||
static U64 getCPUClockCount64();
|
||||
|
||||
private:
|
||||
static S32 sCurFrameIndex;
|
||||
static S32 sLastFrameIndex;
|
||||
static U64 sLastFrameTime;
|
||||
|
||||
@@ -53,7 +53,7 @@ std::string ll_safe_string(const char* in)
|
||||
|
||||
std::string ll_safe_string(const char* in, S32 maxlen)
|
||||
{
|
||||
if(in) return std::string(in, maxlen);
|
||||
if(in && maxlen > 0) return std::string(in, maxlen);
|
||||
return std::string();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
const S32 LL_VERSION_MAJOR = 1;
|
||||
const S32 LL_VERSION_MINOR = 7;
|
||||
const S32 LL_VERSION_PATCH = 0;
|
||||
const S32 LL_VERSION_PATCH = 2;
|
||||
const S32 LL_VERSION_BUILD = ${vBUILD};
|
||||
|
||||
const char * const LL_CHANNEL = "${VIEWER_CHANNEL}";
|
||||
|
||||
@@ -40,7 +40,7 @@ const F32 MAX_OBJECT_Z = 4096.f; // should match REGION_HEIGHT_METERS, Pre-hav
|
||||
const F32 MIN_OBJECT_Z = -256.f;
|
||||
const F32 DEFAULT_MAX_PRIM_SCALE = 256.f;
|
||||
const F32 DEFAULT_MAX_PRIM_SCALE_NO_MESH = DEFAULT_MAX_PRIM_SCALE;
|
||||
const F32 MIN_PRIM_SCALE = 0.01f;
|
||||
//const F32 MIN_PRIM_SCALE = 0.01f;
|
||||
const F32 MAX_PRIM_SCALE = 65536.f; // something very high but not near FLT_MAX
|
||||
|
||||
class LLXform
|
||||
|
||||
@@ -1048,6 +1048,7 @@ char const* const _PREHASH_SimIP = LLMessageStringTable::getInstance()->getStrin
|
||||
char const* const _PREHASH_GodID = LLMessageStringTable::getInstance()->getString("GodID");
|
||||
char const* const _PREHASH_TeleportMinPrice = LLMessageStringTable::getInstance()->getString("TeleportMinPrice");
|
||||
char const* const _PREHASH_VoteItem = LLMessageStringTable::getInstance()->getString("VoteItem");
|
||||
char const* const _PREHASH_ObjectRotation = LLMessageStringTable::getInstance()->getString("ObjectRotation");
|
||||
char const* const _PREHASH_SitRotation = LLMessageStringTable::getInstance()->getString("SitRotation");
|
||||
char const* const _PREHASH_SnapSelection = LLMessageStringTable::getInstance()->getString("SnapSelection");
|
||||
char const* const _PREHASH_SoundTrigger = LLMessageStringTable::getInstance()->getString("SoundTrigger");
|
||||
|
||||
@@ -1048,6 +1048,7 @@ extern char const* const _PREHASH_SimIP;
|
||||
extern char const* const _PREHASH_GodID;
|
||||
extern char const* const _PREHASH_TeleportMinPrice;
|
||||
extern char const* const _PREHASH_VoteItem;
|
||||
extern char const* const _PREHASH_ObjectRotation;
|
||||
extern char const* const _PREHASH_SitRotation;
|
||||
extern char const* const _PREHASH_SnapSelection;
|
||||
extern char const* const _PREHASH_SoundTrigger;
|
||||
|
||||
@@ -52,7 +52,14 @@ add_executable(SLPlugin
|
||||
set_target_properties(SLPlugin
|
||||
PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/slplugin_info.plist
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
set_target_properties(SLPlugin
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/OPT:NOREF"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_link_libraries(SLPlugin
|
||||
${LLPLUGIN_LIBRARIES}
|
||||
|
||||
@@ -64,7 +64,7 @@ void LLFontBitmapCache::init(S32 num_components,
|
||||
|
||||
LLImageRaw *LLFontBitmapCache::getImageRaw(U32 bitmap_num) const
|
||||
{
|
||||
if ((bitmap_num < 0) || (bitmap_num >= mImageRawVec.size()))
|
||||
if (bitmap_num >= mImageRawVec.size())
|
||||
return NULL;
|
||||
|
||||
return mImageRawVec[bitmap_num];
|
||||
@@ -72,7 +72,7 @@ LLImageRaw *LLFontBitmapCache::getImageRaw(U32 bitmap_num) const
|
||||
|
||||
LLImageGL *LLFontBitmapCache::getImageGL(U32 bitmap_num) const
|
||||
{
|
||||
if ((bitmap_num < 0) || (bitmap_num >= mImageGLVec.size()))
|
||||
if (bitmap_num >= mImageGLVec.size())
|
||||
return NULL;
|
||||
|
||||
return mImageGLVec[bitmap_num];
|
||||
|
||||
@@ -244,14 +244,16 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes,
|
||||
|
||||
BOOL LLGLSLShader::attachObject(std::string object)
|
||||
{
|
||||
if (LLShaderMgr::instance()->mShaderObjects.count(object) > 0)
|
||||
std::multimap<std::string, LLShaderMgr::CachedObjectInfo>::iterator it = LLShaderMgr::instance()->mShaderObjects.begin();
|
||||
for(; it!=LLShaderMgr::instance()->mShaderObjects.end(); it++)
|
||||
{
|
||||
stop_glerror();
|
||||
glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mShaderObjects[object]);
|
||||
stop_glerror();
|
||||
return TRUE;
|
||||
if((*it).first == object)
|
||||
{
|
||||
glAttachObjectARB(mProgramObject, (*it).second.mHandle);
|
||||
stop_glerror();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("ShaderLoading") << "Attempting to attach shader object that hasn't been compiled: " << object << LL_ENDL;
|
||||
return FALSE;
|
||||
@@ -262,6 +264,20 @@ void LLGLSLShader::attachObject(GLhandleARB object)
|
||||
{
|
||||
if (object != 0)
|
||||
{
|
||||
std::multimap<std::string, LLShaderMgr::CachedObjectInfo>::iterator it = LLShaderMgr::instance()->mShaderObjects.begin();
|
||||
for(; it!=LLShaderMgr::instance()->mShaderObjects.end(); it++)
|
||||
{
|
||||
if((*it).second.mHandle == object)
|
||||
{
|
||||
LL_DEBUGS("ShaderLoading") << "Attached: " << (*it).first << llendl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(it == LLShaderMgr::instance()->mShaderObjects.end())
|
||||
{
|
||||
LL_WARNS("ShaderLoading") << "Attached unknown shader!" << llendl;
|
||||
}
|
||||
|
||||
stop_glerror();
|
||||
glAttachObjectARB(mProgramObject, object);
|
||||
stop_glerror();
|
||||
|
||||
@@ -59,7 +59,6 @@ protected:
|
||||
LLGLEnable mColorMaterial;
|
||||
LLGLDisable mAlphaTest, mBlend, mCullFace, mDither, mFog,
|
||||
mLineSmooth, mLineStipple, mNormalize, mPolygonSmooth,
|
||||
mTextureGenQ, mTextureGenR, mTextureGenS, mTextureGenT,
|
||||
mGLMultisample;
|
||||
public:
|
||||
LLGLSDefault()
|
||||
@@ -76,10 +75,6 @@ public:
|
||||
mLineStipple(GL_LINE_STIPPLE),
|
||||
mNormalize(GL_NORMALIZE),
|
||||
mPolygonSmooth(GL_POLYGON_SMOOTH),
|
||||
mTextureGenQ(GL_TEXTURE_GEN_Q),
|
||||
mTextureGenR(GL_TEXTURE_GEN_R),
|
||||
mTextureGenS(GL_TEXTURE_GEN_S),
|
||||
mTextureGenT(GL_TEXTURE_GEN_T),
|
||||
mGLMultisample(GL_MULTISAMPLE_ARB)
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -557,7 +557,7 @@ bool LLImageGL::checkSize(S32 width, S32 height)
|
||||
return check_power_of_two(width) && check_power_of_two(height);
|
||||
}
|
||||
|
||||
void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents)
|
||||
void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level)
|
||||
{
|
||||
if (width != mWidth || height != mHeight || ncomponents != mComponents)
|
||||
{
|
||||
@@ -590,6 +590,11 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents)
|
||||
width >>= 1;
|
||||
height >>= 1;
|
||||
}
|
||||
if(discard_level > 0)
|
||||
{
|
||||
mMaxDiscardLevel = llmax(mMaxDiscardLevel, (S8)discard_level);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1254,7 +1259,6 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
|
||||
llassert(mCurrentDiscardLevel >= 0);
|
||||
discard_level = mCurrentDiscardLevel;
|
||||
}
|
||||
discard_level = llclamp(discard_level, 0, (S32)mMaxDiscardLevel);
|
||||
|
||||
// Actual image width/height = raw image width/height * 2^discard_level
|
||||
S32 raw_w = imageraw->getWidth() ;
|
||||
@@ -1263,7 +1267,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
|
||||
S32 h = raw_h << discard_level;
|
||||
|
||||
// setSize may call destroyGLTexture if the size does not match
|
||||
setSize(w, h, imageraw->getComponents());
|
||||
setSize(w, h, imageraw->getComponents(), discard_level);
|
||||
|
||||
if( !mHasExplicitFormat )
|
||||
{
|
||||
@@ -1323,7 +1327,6 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
|
||||
llassert(mCurrentDiscardLevel >= 0);
|
||||
discard_level = mCurrentDiscardLevel;
|
||||
}
|
||||
discard_level = llclamp(discard_level, 0, (S32)mMaxDiscardLevel);
|
||||
|
||||
if (mTexName != 0 && discard_level == mCurrentDiscardLevel)
|
||||
{
|
||||
@@ -1818,6 +1821,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
|
||||
llassert(w%2 == 0);
|
||||
llassert(h%2 == 0);
|
||||
const GLubyte* rowstart = ((const GLubyte*) data_in) + mAlphaOffset;
|
||||
|
||||
for (U32 y = 0; y < h; y+=2)
|
||||
{
|
||||
const GLubyte* current = rowstart;
|
||||
|
||||
@@ -100,7 +100,7 @@ protected:
|
||||
public:
|
||||
virtual void dump(); // debugging info to llinfos
|
||||
|
||||
void setSize(S32 width, S32 height, S32 ncomponents);
|
||||
void setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1);
|
||||
void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;}
|
||||
void setAllowCompression(bool allow) { mAllowCompression = allow; }
|
||||
|
||||
|
||||
@@ -1451,6 +1451,16 @@ void LLRender::matrixMode(U32 mode)
|
||||
mMatrixMode = mode;
|
||||
}
|
||||
|
||||
U32 LLRender::getMatrixMode()
|
||||
{
|
||||
if (mMatrixMode >= MM_TEXTURE0 && mMatrixMode <= MM_TEXTURE3)
|
||||
{ //always return MM_TEXTURE if current matrix mode points at any texture matrix
|
||||
return MM_TEXTURE;
|
||||
}
|
||||
return mMatrixMode;
|
||||
}
|
||||
|
||||
|
||||
void LLRender::loadIdentity()
|
||||
{
|
||||
flush();
|
||||
|
||||
@@ -345,6 +345,7 @@ public:
|
||||
void loadIdentity();
|
||||
void multMatrix(const GLfloat* m);
|
||||
void matrixMode(U32 mode);
|
||||
U32 getMatrixMode();
|
||||
|
||||
const glh::matrix4f& getModelviewMatrix();
|
||||
const glh::matrix4f& getProjectionMatrix();
|
||||
|
||||
@@ -389,9 +389,6 @@ void LLRenderTarget::release()
|
||||
|
||||
if (mTex.size() > 0)
|
||||
{
|
||||
//Release before delete.
|
||||
for (U32 i = 0; i < mTex.size(); ++i)
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i, LLTexUnit::getInternalType(mUsage), 0, 0);
|
||||
sBytesAllocated -= mResX*mResY*4*mTex.size();
|
||||
LLImageGL::deleteTextures(mUsage, mInternalFormat[0], 0, mTex.size(), &mTex[0], true);
|
||||
mTex.clear();
|
||||
@@ -778,11 +775,8 @@ bool LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth
|
||||
//Restrict to valid sample count
|
||||
{
|
||||
mSamples = samples;
|
||||
mSamples = llmin(mSamples, (U32)4); //Cap to prevent memory bloat.
|
||||
mSamples = llmin(mSamples, (U32) gGLManager.mMaxIntegerSamples);//GL_RGBA
|
||||
|
||||
if(depth && !stencil)
|
||||
mSamples = llmin(mSamples, (U32) gGLManager.mMaxSamples); //GL_DEPTH_COMPONENT16_ARB
|
||||
//mSamples = llmin(mSamples, (U32)4); //Cap to prevent memory bloat.
|
||||
mSamples = llmin(mSamples, (U32) gGLManager.mMaxSamples);
|
||||
}
|
||||
|
||||
if (mSamples <= 1)
|
||||
|
||||
@@ -525,6 +525,14 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns)
|
||||
|
||||
GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, S32 texture_index_channels)
|
||||
{
|
||||
std::pair<std::multimap<std::string, CachedObjectInfo >::iterator, std::multimap<std::string, CachedObjectInfo>::iterator> range;
|
||||
range = mShaderObjects.equal_range(filename);
|
||||
for (std::multimap<std::string, CachedObjectInfo>::iterator it = range.first; it != range.second;++it)
|
||||
{
|
||||
if((*it).second.mLevel == shader_level && (*it).second.mType == type)
|
||||
return (*it).second.mHandle;
|
||||
}
|
||||
|
||||
GLenum error = GL_NO_ERROR;
|
||||
if (gDebugGL)
|
||||
{
|
||||
@@ -679,7 +687,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
||||
|
||||
vec4 diffuseLookup(vec2 texcoord)
|
||||
{
|
||||
switch (vary_texture_index))
|
||||
switch (vary_texture_index.r))
|
||||
{
|
||||
case 0: ret = texture2D(tex0, texcoord); break;
|
||||
case 1: ret = texture2D(tex1, texcoord); break;
|
||||
@@ -703,7 +711,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
||||
|
||||
if (texture_index_channels > 1)
|
||||
{
|
||||
text[count++] = strdup("VARYING_FLAT int vary_texture_index;\n");
|
||||
text[count++] = strdup("VARYING_FLAT ivec4 vary_texture_index;\n");
|
||||
}
|
||||
|
||||
text[count++] = strdup("vec4 diffuseLookup(vec2 texcoord)\n");
|
||||
@@ -717,11 +725,11 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
||||
}
|
||||
else if (major_version > 1 || minor_version >= 30)
|
||||
{ //switches are supported in GLSL 1.30 and later
|
||||
if (gGLManager.mIsNVIDIA)
|
||||
{ //switches are unreliable on some NVIDIA drivers
|
||||
if (gGLManager.mIsNVIDIA || (gGLManager.mIsATI && gGLManager.mGLVersion < 3.3f))
|
||||
{ //switches are unreliable on old drivers
|
||||
for (S32 i = 0; i < texture_index_channels; ++i)
|
||||
{
|
||||
std::string if_string = llformat("\t%sif (vary_texture_index == %d) { return texture2D(tex%d, texcoord); }\n", i > 0 ? "else " : "", i, i);
|
||||
std::string if_string = llformat("\t%sif (vary_texture_index.r == %d) { return texture2D(tex%d, texcoord); }\n", i > 0 ? "else " : "", i, i);
|
||||
text[count++] = strdup(if_string.c_str());
|
||||
}
|
||||
text[count++] = strdup("\treturn vec4(1,0,1,1);\n");
|
||||
@@ -730,13 +738,13 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
||||
else
|
||||
{
|
||||
text[count++] = strdup("\tvec4 ret = vec4(1,0,1,1);\n");
|
||||
text[count++] = strdup("\tswitch (vary_texture_index)\n");
|
||||
text[count++] = strdup("\tswitch (vary_texture_index.r)\n");
|
||||
text[count++] = strdup("\t{\n");
|
||||
|
||||
//switch body
|
||||
for (S32 i = 0; i < texture_index_channels; ++i)
|
||||
{
|
||||
std::string case_str = llformat("\t\tcase %d: return texture2D(tex%d, texcoord);\n", i, i);
|
||||
std::string case_str = llformat("\t\tcase %d: ret = texture2D(tex%d, texcoord); break;\n", i, i);
|
||||
text[count++] = strdup(case_str.c_str());
|
||||
}
|
||||
|
||||
@@ -888,7 +896,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
||||
if (ret)
|
||||
{
|
||||
// Add shader file to map
|
||||
mShaderObjects[filename] = ret;
|
||||
mShaderObjects.insert(make_pair(filename,CachedObjectInfo(ret,try_gpu_class,type)));
|
||||
shader_level = try_gpu_class;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -185,8 +185,16 @@ public:
|
||||
virtual void updateShaderUniforms(LLGLSLShader * shader) = 0; // Pure Virtual
|
||||
|
||||
public:
|
||||
struct CachedObjectInfo
|
||||
{
|
||||
CachedObjectInfo(GLhandleARB handle, U32 level, GLenum type) :
|
||||
mHandle(handle), mLevel(level), mType(type) {}
|
||||
GLhandleARB mHandle; //Actual handle of the opengl shader object.
|
||||
U32 mLevel; //Level /might/ not be needed, but it's stored to ensure there's no change in behavior.
|
||||
GLenum mType; //GL_VERTEX_SHADER_ARB or GL_FRAGMENT_SHADER_ARB. Tracked because some utility shaders can be loaded as both types (carefully).
|
||||
};
|
||||
// Map of shader names to compiled
|
||||
std::map<std::string, GLhandleARB> mShaderObjects;
|
||||
std::multimap<std::string, CachedObjectInfo > mShaderObjects; //Singu Note: Packing more info here. Doing such provides capability to skip unneeded duplicate loading..
|
||||
|
||||
//global (reserved slot) shader parameters
|
||||
std::vector<std::string> mReservedAttribs;
|
||||
|
||||
@@ -1249,7 +1249,7 @@ void LLVertexBuffer::setupVertexArray()
|
||||
1, //TYPE_WEIGHT,
|
||||
4, //TYPE_WEIGHT4,
|
||||
4, //TYPE_CLOTHWEIGHT,
|
||||
1, //TYPE_TEXTURE_INDEX
|
||||
4, //TYPE_TEXTURE_INDEX
|
||||
};
|
||||
|
||||
U32 attrib_type[] =
|
||||
@@ -1266,7 +1266,7 @@ void LLVertexBuffer::setupVertexArray()
|
||||
GL_FLOAT, //TYPE_WEIGHT,
|
||||
GL_FLOAT, //TYPE_WEIGHT4,
|
||||
GL_FLOAT, //TYPE_CLOTHWEIGHT,
|
||||
GL_UNSIGNED_INT, //TYPE_TEXTURE_INDEX
|
||||
GL_UNSIGNED_BYTE, //TYPE_TEXTURE_INDEX
|
||||
};
|
||||
|
||||
bool attrib_integer[] =
|
||||
@@ -2313,7 +2313,7 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
|
||||
#if !LL_DARWIN
|
||||
S32 loc = TYPE_TEXTURE_INDEX;
|
||||
void *ptr = (void*) (base + mOffsets[TYPE_VERTEX] + 12);
|
||||
glVertexAttribIPointer(loc, 1, GL_UNSIGNED_INT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
|
||||
glVertexAttribIPointer(loc, 4, GL_UNSIGNED_BYTE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
|
||||
#endif
|
||||
}
|
||||
if (data_mask & MAP_VERTEX)
|
||||
|
||||
@@ -69,6 +69,12 @@ LLModalDialog::~LLModalDialog()
|
||||
{
|
||||
gFocusMgr.unlockFocus();
|
||||
}
|
||||
|
||||
std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this);
|
||||
if (iter != sModalStack.end())
|
||||
{
|
||||
llerrs << "Attempt to delete dialog while still in sModalStack!" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
@@ -91,6 +97,8 @@ void LLModalDialog::startModal()
|
||||
{
|
||||
if (mModal)
|
||||
{
|
||||
|
||||
|
||||
// If Modal, Hide the active modal dialog
|
||||
if (!sModalStack.empty())
|
||||
{
|
||||
@@ -103,6 +111,14 @@ void LLModalDialog::startModal()
|
||||
gFocusMgr.setTopCtrl( this );
|
||||
setFocus(TRUE);
|
||||
|
||||
std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this);
|
||||
if (iter != sModalStack.end())
|
||||
{
|
||||
sModalStack.erase(iter);
|
||||
llwarns << "Dialog already on modal stack" << llendl;
|
||||
//TODO: incvestigate in which specific cases it happens, cause that's not good! -SG
|
||||
}
|
||||
|
||||
sModalStack.push_front( this );
|
||||
}
|
||||
|
||||
@@ -314,5 +330,16 @@ void LLModalDialog::onAppFocusGained()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LLModalDialog::shutdownModals()
|
||||
{
|
||||
// This method is only for use during app shutdown. ~LLModalDialog()
|
||||
// checks sModalStack, and if the dialog instance is still there, it
|
||||
// crumps with "Attempt to delete dialog while still in sModalStack!" But
|
||||
// at app shutdown, all bets are off. If the user asks to shut down the
|
||||
// app, we shouldn't have to care WHAT's open. Put differently, if a modal
|
||||
// dialog is so crucial that we can't let the user terminate until s/he
|
||||
// addresses it, we should reject a termination request. The current state
|
||||
// of affairs is that we accept it, but then produce an llerrs popup that
|
||||
// simply makes our software look unreliable.
|
||||
sModalStack.clear();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,8 @@ public:
|
||||
static void onAppFocusGained();
|
||||
|
||||
static S32 activeCount() { return sModalStack.size(); }
|
||||
|
||||
static void shutdownModals();
|
||||
|
||||
protected:
|
||||
void centerOnScreen();
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ LLMultiFloater::LLMultiFloater(
|
||||
{
|
||||
mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH);
|
||||
}
|
||||
mTabContainer->setCommitCallback(boost::bind(&LLMultiFloater::onTabSelected, this));
|
||||
|
||||
addChild(mTabContainer);
|
||||
}
|
||||
@@ -114,6 +115,7 @@ LLMultiFloater::LLMultiFloater(
|
||||
{
|
||||
mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH);
|
||||
}
|
||||
mTabContainer->setCommitCallback(boost::bind(&LLMultiFloater::onTabSelected, this));
|
||||
|
||||
addChild(mTabContainer);
|
||||
|
||||
@@ -482,7 +484,7 @@ void LLMultiFloater::setCanResize(BOOL can_resize)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLMultiFloater::postBuild()
|
||||
/*BOOL LLMultiFloater::postBuild()
|
||||
{
|
||||
// remember any original xml minimum size
|
||||
getResizeLimits(&mOrigMinWidth, &mOrigMinHeight);
|
||||
@@ -501,7 +503,7 @@ BOOL LLMultiFloater::postBuild()
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}*/
|
||||
|
||||
void LLMultiFloater::updateResizeLimits()
|
||||
{
|
||||
|
||||
@@ -45,7 +45,6 @@ public:
|
||||
LLMultiFloater(const std::string& name, const std::string& rect_control, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE);
|
||||
virtual ~LLMultiFloater() {};
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual LLXMLNodePtr getXML(bool save_children = true) const;
|
||||
/*virtual*/ void open(); /* Flawfinder: ignore */
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
@@ -63,8 +63,8 @@ add_library (llvfs ${llvfs_SOURCE_FILES})
|
||||
add_dependencies(llvfs prepare)
|
||||
|
||||
target_link_libraries(llvfs
|
||||
${BOOST_FILESYSTEM_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
)
|
||||
|
||||
if (DARWIN)
|
||||
|
||||
@@ -387,6 +387,8 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
|
||||
mhDC = NULL;
|
||||
mhRC = NULL;
|
||||
|
||||
llinfos<<"Desired FSAA Samples = "<<mFSAASamples<<llendl;
|
||||
|
||||
// Initialize the keyboard
|
||||
gKeyboard = new LLKeyboardWin32();
|
||||
gKeyboard->setCallbacks(callbacks);
|
||||
@@ -1274,21 +1276,155 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
|
||||
|
||||
LL_INFOS("Window") << "pixel formats done." << llendl ;
|
||||
|
||||
S32 swap_method = 0;
|
||||
S32 cur_format = num_formats-1;
|
||||
GLint swap_query = WGL_SWAP_METHOD_ARB;
|
||||
|
||||
BOOL found_format = FALSE;
|
||||
|
||||
while (!found_format && wglGetPixelFormatAttribivARB(mhDC, pixel_format, 0, 1, &swap_query, &swap_method))
|
||||
/*for(int i = 0; i <= num_formats-1; ++i)
|
||||
{
|
||||
if (swap_method == WGL_SWAP_UNDEFINED_ARB || cur_format <= 0)
|
||||
GLint query[] = { WGL_SAMPLE_BUFFERS_ARB,
|
||||
WGL_SAMPLES_ARB,
|
||||
WGL_NUMBER_PIXEL_FORMATS_ARB,
|
||||
WGL_DRAW_TO_WINDOW_ARB,
|
||||
WGL_DRAW_TO_BITMAP_ARB,
|
||||
WGL_ACCELERATION_ARB,
|
||||
WGL_NEED_PALETTE_ARB,
|
||||
WGL_NEED_SYSTEM_PALETTE_ARB,
|
||||
WGL_SWAP_LAYER_BUFFERS_ARB,
|
||||
WGL_SWAP_METHOD_ARB,
|
||||
WGL_NUMBER_OVERLAYS_ARB,
|
||||
WGL_NUMBER_UNDERLAYS_ARB,
|
||||
WGL_TRANSPARENT_ARB,
|
||||
WGL_TRANSPARENT_RED_VALUE_ARB,
|
||||
WGL_TRANSPARENT_GREEN_VALUE_ARB,
|
||||
WGL_TRANSPARENT_BLUE_VALUE_ARB,
|
||||
WGL_TRANSPARENT_ALPHA_VALUE_ARB,
|
||||
WGL_TRANSPARENT_INDEX_VALUE_ARB,
|
||||
WGL_SHARE_DEPTH_ARB,
|
||||
WGL_SHARE_STENCIL_ARB,
|
||||
WGL_SHARE_ACCUM_ARB,
|
||||
WGL_SUPPORT_GDI_ARB,
|
||||
WGL_SUPPORT_OPENGL_ARB,
|
||||
WGL_DOUBLE_BUFFER_ARB,
|
||||
WGL_STEREO_ARB,
|
||||
WGL_PIXEL_TYPE_ARB,
|
||||
WGL_COLOR_BITS_ARB,
|
||||
WGL_RED_BITS_ARB,
|
||||
WGL_RED_SHIFT_ARB,
|
||||
WGL_GREEN_BITS_ARB,
|
||||
WGL_GREEN_SHIFT_ARB,
|
||||
WGL_BLUE_BITS_ARB,
|
||||
WGL_BLUE_SHIFT_ARB,
|
||||
WGL_ALPHA_BITS_ARB,
|
||||
WGL_ALPHA_SHIFT_ARB,
|
||||
WGL_ACCUM_BITS_ARB,
|
||||
WGL_ACCUM_RED_BITS_ARB,
|
||||
WGL_ACCUM_GREEN_BITS_ARB,
|
||||
WGL_ACCUM_BLUE_BITS_ARB,
|
||||
WGL_ACCUM_ALPHA_BITS_ARB,
|
||||
WGL_DEPTH_BITS_ARB,
|
||||
WGL_STENCIL_BITS_ARB,
|
||||
WGL_AUX_BUFFERS_ARB};
|
||||
std::string names[] = { "WGL_SAMPLE_BUFFERS_ARB",
|
||||
"WGL_SAMPLES_ARB",
|
||||
"WGL_NUMBER_PIXEL_FORMATS_ARB",
|
||||
"WGL_DRAW_TO_WINDOW_ARB",
|
||||
"WGL_DRAW_TO_BITMAP_ARB",
|
||||
"WGL_ACCELERATION_ARB",
|
||||
"WGL_NEED_PALETTE_ARB",
|
||||
"WGL_NEED_SYSTEM_PALETTE_ARB",
|
||||
"WGL_SWAP_LAYER_BUFFERS_ARB",
|
||||
"WGL_SWAP_METHOD_ARB",
|
||||
"WGL_NUMBER_OVERLAYS_ARB",
|
||||
"WGL_NUMBER_UNDERLAYS_ARB",
|
||||
"WGL_TRANSPARENT_ARB",
|
||||
"WGL_TRANSPARENT_RED_VALUE_ARB",
|
||||
"WGL_TRANSPARENT_GREEN_VALUE_ARB",
|
||||
"WGL_TRANSPARENT_BLUE_VALUE_ARB",
|
||||
"WGL_TRANSPARENT_ALPHA_VALUE_ARB",
|
||||
"WGL_TRANSPARENT_INDEX_VALUE_ARB",
|
||||
"WGL_SHARE_DEPTH_ARB",
|
||||
"WGL_SHARE_STENCIL_ARB",
|
||||
"WGL_SHARE_ACCUM_ARB",
|
||||
"WGL_SUPPORT_GDI_ARB",
|
||||
"WGL_SUPPORT_OPENGL_ARB",
|
||||
"WGL_DOUBLE_BUFFER_ARB",
|
||||
"WGL_STEREO_ARB",
|
||||
"WGL_PIXEL_TYPE_ARB",
|
||||
"WGL_COLOR_BITS_ARB",
|
||||
"WGL_RED_BITS_ARB",
|
||||
"WGL_RED_SHIFT_ARB",
|
||||
"WGL_GREEN_BITS_ARB",
|
||||
"WGL_GREEN_SHIFT_ARB",
|
||||
"WGL_BLUE_BITS_ARB",
|
||||
"WGL_BLUE_SHIFT_ARB",
|
||||
"WGL_ALPHA_BITS_ARB",
|
||||
"WGL_ALPHA_SHIFT_ARB",
|
||||
"WGL_ACCUM_BITS_ARB",
|
||||
"WGL_ACCUM_RED_BITS_ARB",
|
||||
"WGL_ACCUM_GREEN_BITS_ARB",
|
||||
"WGL_ACCUM_BLUE_BITS_ARB",
|
||||
"WGL_ACCUM_ALPHA_BITS_ARB",
|
||||
"WGL_DEPTH_BITS_ARB",
|
||||
"WGL_STENCIL_BITS_ARB",
|
||||
"WGL_AUX_BUFFERS_ARB"};
|
||||
S32 results[sizeof(query)/sizeof(query[0])]={0};
|
||||
|
||||
if(wglGetPixelFormatAttribivARB(mhDC, pixel_formats[i], 0, sizeof(query)/sizeof(query[0]), query, results))
|
||||
{
|
||||
llinfos << i << ":" << llendl;
|
||||
for(int j = 0; j < sizeof(query)/sizeof(query[0]); ++j)
|
||||
{
|
||||
switch(results[j])
|
||||
{
|
||||
case WGL_NO_ACCELERATION_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_NO_ACCELERATION_ARB" << llendl;
|
||||
break;
|
||||
case WGL_GENERIC_ACCELERATION_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_GENERIC_ACCELERATION_ARB" << llendl;
|
||||
break;
|
||||
case WGL_FULL_ACCELERATION_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_FULL_ACCELERATION_ARB" << llendl;
|
||||
break;
|
||||
case WGL_SWAP_EXCHANGE_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_SWAP_EXCHANGE_ARB" << llendl;
|
||||
break;
|
||||
case WGL_SWAP_COPY_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_SWAP_COPY_ARB" << llendl;
|
||||
break;
|
||||
case WGL_SWAP_UNDEFINED_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_SWAP_UNDEFINED_ARB" << llendl;
|
||||
break;
|
||||
case WGL_TYPE_RGBA_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_TYPE_RGBA_ARB" << llendl;
|
||||
break;
|
||||
case WGL_TYPE_COLORINDEX_ARB:
|
||||
llinfos << " " << names[j] << " = " << "WGL_TYPE_COLORINDEX_ARB" << llendl;
|
||||
break;
|
||||
default:
|
||||
llinfos << " " << names[j] << " = " << results[j] << llendl;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//Singu note: Reversed order of this loop. Generally, choosepixelformat returns an array with the closer matches towards the start.
|
||||
S32 swap_method = 0;
|
||||
S32 cur_format = 0;//num_formats-1;
|
||||
GLint swap_query = WGL_SWAP_METHOD_ARB;
|
||||
BOOL found_format = FALSE;
|
||||
while (!found_format && wglGetPixelFormatAttribivARB(mhDC, pixel_formats[cur_format], 0, 1, &swap_query, &swap_method))
|
||||
{
|
||||
if (swap_method == WGL_SWAP_UNDEFINED_ARB /*|| cur_format <= 0*/)
|
||||
{
|
||||
found_format = TRUE;
|
||||
}
|
||||
else if(cur_format >= num_formats-1)
|
||||
{
|
||||
cur_format = 0;
|
||||
found_format = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
--cur_format;
|
||||
//--cur_format;
|
||||
++cur_format;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1495,6 +1631,10 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
|
||||
swapBuffers();
|
||||
}
|
||||
|
||||
int buf = 0;
|
||||
glGetIntegerv(GL_SAMPLES, &buf);
|
||||
llinfos << "Acquired FSAA Samples = " << buf << llendl;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,12 +56,6 @@ void parse_string();
|
||||
|
||||
#define ECHO do { } while (0)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" { int yylex( void ); }
|
||||
extern "C" { int yyparse( void ); }
|
||||
extern "C" { int yyerror(const char *fmt, ...); }
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
%%
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
#include "linden_common.h"
|
||||
#include "lscript_tree.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int yylex(void);
|
||||
int yyparse( void );
|
||||
int yyerror(const char *fmt, ...);
|
||||
@@ -19,10 +15,6 @@
|
||||
#pragma warning (disable : 4702) // warning C4702: unreachable code
|
||||
#pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
%}
|
||||
|
||||
%union
|
||||
|
||||
@@ -8,17 +8,14 @@ include(DBusGlib)
|
||||
include(DirectX)
|
||||
include(ELFIO)
|
||||
if(FMODEX)
|
||||
include(FMODEX)
|
||||
if(FMODEX)
|
||||
set(FMOD OFF)
|
||||
endif(FMODEX)
|
||||
include(FMODEX)
|
||||
set(FMOD OFF)
|
||||
else(FMODEX)
|
||||
include(FMOD)
|
||||
endif(FMODEX)
|
||||
if(NOT FMODEX)
|
||||
include(FMOD)
|
||||
endif(NOT FMODEX)
|
||||
include(OPENAL)
|
||||
include(Hunspell)
|
||||
include(FindOpenGL)
|
||||
include(Hunspell)
|
||||
#include(JsonCpp)
|
||||
include(LLAddBuildTest)
|
||||
include(LLAudio)
|
||||
@@ -76,40 +73,28 @@ include_directories(
|
||||
)
|
||||
|
||||
set(viewer_SOURCE_FILES
|
||||
sgmemstat.cpp
|
||||
sgversion.cpp
|
||||
llviewerobjectbackup.cpp
|
||||
slfloatermediafilter.cpp
|
||||
floaterlocalassetbrowse.cpp
|
||||
aoremotectrl.cpp
|
||||
lgghunspell_wrapper.cpp
|
||||
lggdicdownload.cpp
|
||||
floaterao.cpp
|
||||
floatervoicelicense.cpp
|
||||
lldaycyclemanager.cpp
|
||||
llenvmanager.cpp
|
||||
llwlhandlers.cpp
|
||||
llregioninfomodel.cpp
|
||||
m7wlinterface.cpp
|
||||
ascentfloatercontactgroups.cpp
|
||||
ascentkeyword.cpp
|
||||
ascentprefschat.cpp
|
||||
ascentprefssys.cpp
|
||||
ascentprefsvan.cpp
|
||||
chatbar_as_cmdline.cpp
|
||||
emeraldboobutils.cpp
|
||||
floatersculptpreview.cpp
|
||||
floaterao.cpp
|
||||
floaterlocalassetbrowse.cpp
|
||||
floatervoicelicense.cpp
|
||||
hbfloatergrouptitles.cpp
|
||||
hgfloatertexteditor.cpp
|
||||
hippogridmanager.cpp
|
||||
hippofloaterxml.cpp
|
||||
hippogridmanager.cpp
|
||||
hippolimits.cpp
|
||||
hipporestrequest.cpp
|
||||
hippopanelgrids.cpp
|
||||
importtracker.cpp
|
||||
hipporestrequest.cpp
|
||||
importtracker.cpp
|
||||
jcfloaterareasearch.cpp
|
||||
chatbar_as_cmdline.cpp
|
||||
qtoolalign.cpp
|
||||
NACLantispam.cpp
|
||||
lggdicdownload.cpp
|
||||
lgghunspell_wrapper.cpp
|
||||
llaccountingcostmanager.cpp
|
||||
llagent.cpp
|
||||
llagentaccess.cpp
|
||||
@@ -124,8 +109,8 @@ set(viewer_SOURCE_FILES
|
||||
llappearancemgr.cpp
|
||||
llappviewer.cpp
|
||||
llassetconverter.cpp
|
||||
llassetuploadresponders.cpp
|
||||
llassetuploadqueue.cpp
|
||||
llassetuploadresponders.cpp
|
||||
llattachmentsmgr.cpp
|
||||
llaudiosourcevo.cpp
|
||||
llavatarpropertiesprocessor.cpp
|
||||
@@ -149,6 +134,7 @@ set(viewer_SOURCE_FILES
|
||||
llcontainerview.cpp
|
||||
llcurrencyuimanager.cpp
|
||||
llcylinder.cpp
|
||||
lldaycyclemanager.cpp
|
||||
lldebugmessagebox.cpp
|
||||
lldebugview.cpp
|
||||
lldelayedgestureerror.cpp
|
||||
@@ -165,9 +151,10 @@ set(viewer_SOURCE_FILES
|
||||
lldrawpoolwater.cpp
|
||||
lldrawpoolwlsky.cpp
|
||||
lldriverparam.cpp
|
||||
lldroptarget.cpp
|
||||
lldroptarget.cpp
|
||||
lldynamictexture.cpp
|
||||
llemote.cpp
|
||||
llenvmanager.cpp
|
||||
lleventinfo.cpp
|
||||
lleventnotifier.cpp
|
||||
lleventpoll.cpp
|
||||
@@ -187,13 +174,11 @@ set(viewer_SOURCE_FILES
|
||||
llfloateravatartextures.cpp
|
||||
llfloaterbeacons.cpp
|
||||
llfloaterblacklist.cpp
|
||||
llviewerdisplayname.cpp
|
||||
llfloaterdisplayname.cpp
|
||||
llfloaterbuildoptions.cpp
|
||||
llfloaterbulkpermission.cpp
|
||||
llfloaterbump.cpp
|
||||
llfloaterbuycontents.cpp
|
||||
llfloaterbuy.cpp
|
||||
llfloaterbuycontents.cpp
|
||||
llfloaterbuycurrency.cpp
|
||||
llfloaterbuyland.cpp
|
||||
llfloatercamera.cpp
|
||||
@@ -204,6 +189,7 @@ set(viewer_SOURCE_FILES
|
||||
llfloatercustomize.cpp
|
||||
llfloaterdaycycle.cpp
|
||||
llfloaterdirectory.cpp
|
||||
llfloaterdisplayname.cpp
|
||||
llfloatereditui.cpp
|
||||
llfloaterenvsettings.cpp
|
||||
llfloaterevent.cpp
|
||||
@@ -218,7 +204,6 @@ set(viewer_SOURCE_FILES
|
||||
llfloatergroups.cpp
|
||||
llfloaterhandler.cpp
|
||||
llfloaterhtmlcurrency.cpp
|
||||
llfloatermediabrowser.cpp
|
||||
llfloaterhtmlsimple.cpp
|
||||
llfloaterhud.cpp
|
||||
llfloaterimagepreview.cpp
|
||||
@@ -229,6 +214,7 @@ set(viewer_SOURCE_FILES
|
||||
llfloaterlandholdings.cpp
|
||||
llfloaterlandmark.cpp
|
||||
llfloatermap.cpp
|
||||
llfloatermediabrowser.cpp
|
||||
llfloatermemleak.cpp
|
||||
llfloatermodeluploadbase.cpp
|
||||
llfloatermute.cpp
|
||||
@@ -247,8 +233,8 @@ set(viewer_SOURCE_FILES
|
||||
llfloaterregiondebugconsole.cpp
|
||||
llfloaterregioninfo.cpp
|
||||
llfloaterreporter.cpp
|
||||
llfloatersearchreplace.cpp
|
||||
llfloaterscriptdebug.cpp
|
||||
llfloatersearchreplace.cpp
|
||||
llfloatersellland.cpp
|
||||
llfloatersettingsdebug.cpp
|
||||
llfloatersnapshot.cpp
|
||||
@@ -280,8 +266,8 @@ set(viewer_SOURCE_FILES
|
||||
llgroupnotify.cpp
|
||||
llhomelocationresponder.cpp
|
||||
llhoverview.cpp
|
||||
llhudeffectbeam.cpp
|
||||
llhudeffect.cpp
|
||||
llhudeffectbeam.cpp
|
||||
llhudeffectlookat.cpp
|
||||
llhudeffectpointat.cpp
|
||||
llhudeffecttrail.cpp
|
||||
@@ -307,17 +293,18 @@ set(viewer_SOURCE_FILES
|
||||
llinventorypanel.cpp
|
||||
lljoystickbutton.cpp
|
||||
lllandmarklist.cpp
|
||||
lllocaltextureobject.cpp
|
||||
lllocalinventory.cpp
|
||||
lllocaltextureobject.cpp
|
||||
lllogchat.cpp
|
||||
llloginhandler.cpp
|
||||
llsavedlogins.cpp
|
||||
llmainlooprepeater.cpp
|
||||
llmanip.cpp
|
||||
llmaniprotate.cpp
|
||||
llmanipscale.cpp
|
||||
llmaniptranslate.cpp
|
||||
llmapresponders.cpp
|
||||
llmarketplacenotifications.cpp
|
||||
llmediactrl.cpp
|
||||
llmediaremotectrl.cpp
|
||||
llmemoryview.cpp
|
||||
llmenucommands.cpp
|
||||
@@ -338,7 +325,6 @@ set(viewer_SOURCE_FILES
|
||||
llpanelavatar.cpp
|
||||
llpanelclassified.cpp
|
||||
llpanelcontents.cpp
|
||||
llpaneleditwearable.cpp
|
||||
llpaneldebug.cpp
|
||||
llpaneldirbrowser.cpp
|
||||
llpaneldirclassified.cpp
|
||||
@@ -348,8 +334,9 @@ set(viewer_SOURCE_FILES
|
||||
llpaneldirland.cpp
|
||||
llpaneldirpeople.cpp
|
||||
llpaneldirplaces.cpp
|
||||
llpaneldirpopular.cpp
|
||||
llpaneldisplay.cpp
|
||||
llpaneldirpopular.cpp
|
||||
llpaneleditwearable.cpp
|
||||
llpanelevent.cpp
|
||||
llpanelface.cpp
|
||||
llpanelgeneral.cpp
|
||||
@@ -361,7 +348,6 @@ set(viewer_SOURCE_FILES
|
||||
llpanelgrouproles.cpp
|
||||
llpanelgroupvoting.cpp
|
||||
llpanelinput.cpp
|
||||
llpanelobjectinventory.cpp
|
||||
llpanelland.cpp
|
||||
llpanellandaudio.cpp
|
||||
llpanellandmedia.cpp
|
||||
@@ -369,11 +355,12 @@ set(viewer_SOURCE_FILES
|
||||
llpanellandoptions.cpp
|
||||
llpanellogin.cpp
|
||||
llpanelmaininventory.cpp
|
||||
llpanelmorph.cpp
|
||||
llpanelmediahud.cpp
|
||||
llpanelmorph.cpp
|
||||
llpanelmsgs.cpp
|
||||
llpanelnetwork.cpp
|
||||
llpanelobject.cpp
|
||||
llpanelobjectinventory.cpp
|
||||
llpanelpathfindingrebakenavmesh.cpp
|
||||
llpanelpermissions.cpp
|
||||
llpanelpick.cpp
|
||||
@@ -399,8 +386,8 @@ set(viewer_SOURCE_FILES
|
||||
llprefschat.cpp
|
||||
llprefsim.cpp
|
||||
llprefsvoice.cpp
|
||||
llpreviewanim.cpp
|
||||
llpreview.cpp
|
||||
llpreviewanim.cpp
|
||||
llpreviewgesture.cpp
|
||||
llpreviewlandmark.cpp
|
||||
llpreviewnotecard.cpp
|
||||
@@ -409,8 +396,10 @@ set(viewer_SOURCE_FILES
|
||||
llpreviewtexture.cpp
|
||||
llproductinforequest.cpp
|
||||
llprogressview.cpp
|
||||
llregioninfomodel.cpp
|
||||
llregionposition.cpp
|
||||
llremoteparcelrequest.cpp
|
||||
llsavedlogins.cpp
|
||||
llsavedsettingsglue.cpp
|
||||
llscrollingpanelparam.cpp
|
||||
llscrollingpanelparambase.cpp
|
||||
@@ -438,10 +427,10 @@ set(viewer_SOURCE_FILES
|
||||
lltexturestats.cpp
|
||||
lltexturestatsuploader.cpp
|
||||
lltextureview.cpp
|
||||
lltool.cpp
|
||||
lltoolbar.cpp
|
||||
lltoolbrush.cpp
|
||||
lltoolcomp.cpp
|
||||
lltool.cpp
|
||||
lltooldraganddrop.cpp
|
||||
lltoolface.cpp
|
||||
lltoolfocus.cpp
|
||||
@@ -460,7 +449,7 @@ set(viewer_SOURCE_FILES
|
||||
lltoolview.cpp
|
||||
lltracker.cpp
|
||||
lluploaddialog.cpp
|
||||
lluploadfloaterobservers.cpp
|
||||
lluploadfloaterobservers.cpp
|
||||
llurl.cpp
|
||||
llurldispatcher.cpp
|
||||
llurlhistory.cpp
|
||||
@@ -476,6 +465,7 @@ set(viewer_SOURCE_FILES
|
||||
llviewercamera.cpp
|
||||
llviewercontrol.cpp
|
||||
llviewerdisplay.cpp
|
||||
llviewerdisplayname.cpp
|
||||
llviewerfoldertype.cpp
|
||||
llviewergenericmessage.cpp
|
||||
llviewergesture.cpp
|
||||
@@ -487,15 +477,16 @@ set(viewer_SOURCE_FILES
|
||||
llviewerkeyboard.cpp
|
||||
llviewerlayer.cpp
|
||||
llviewermedia.cpp
|
||||
llviewermediaeventemitter.cpp
|
||||
llviewermediaobserver.cpp
|
||||
llviewermediafocus.cpp
|
||||
llviewermedia_streamingaudio.cpp
|
||||
llviewermediaeventemitter.cpp
|
||||
llviewermediafocus.cpp
|
||||
llviewermediaobserver.cpp
|
||||
llviewermenu.cpp
|
||||
llviewermenufile.cpp
|
||||
llviewermessage.cpp
|
||||
llviewernetwork.cpp
|
||||
llviewerobject.cpp
|
||||
llviewerobjectbackup.cpp
|
||||
llviewerobjectlist.cpp
|
||||
llviewerparcelmedia.cpp
|
||||
llviewerparcelmediaautoplay.cpp
|
||||
@@ -542,32 +533,37 @@ set(viewer_SOURCE_FILES
|
||||
llwearablelist.cpp
|
||||
llwearabletype.cpp
|
||||
llweb.cpp
|
||||
llmediactrl.cpp
|
||||
llwind.cpp
|
||||
llwlanimator.cpp
|
||||
llwldaycycle.cpp
|
||||
llwlhandlers.cpp
|
||||
llwlparammanager.cpp
|
||||
llwlparamset.cpp
|
||||
llworld.cpp
|
||||
llworldmap.cpp
|
||||
llworldmipmap.cpp
|
||||
llmapresponders.cpp
|
||||
llworldmapview.cpp
|
||||
llxmlrpctransaction.cpp
|
||||
m7wlinterface.cpp
|
||||
NACLantispam.cpp
|
||||
noise.cpp
|
||||
pipeline.cpp
|
||||
scriptcounter.cpp
|
||||
wlfPanel_AdvSettings.cpp
|
||||
rlvhandler.cpp
|
||||
rlvhelper.cpp
|
||||
qtoolalign.cpp
|
||||
rlvcommon.cpp
|
||||
rlvlocks.cpp
|
||||
rlvinventory.cpp
|
||||
rlvextensions.cpp
|
||||
rlvfloaterbehaviour.cpp
|
||||
rlvhandler.cpp
|
||||
rlvhelper.cpp
|
||||
rlvinventory.cpp
|
||||
rlvlocks.cpp
|
||||
rlvui.cpp
|
||||
shcommandhandler.cpp
|
||||
shfloatermediaticker.cpp
|
||||
scriptcounter.cpp
|
||||
sgmemstat.cpp
|
||||
sgversion.cpp
|
||||
shcommandhandler.cpp
|
||||
shfloatermediaticker.cpp
|
||||
slfloatermediafilter.cpp
|
||||
wlfPanel_AdvSettings.cpp
|
||||
)
|
||||
|
||||
# This gets renamed in the packaging step
|
||||
@@ -577,41 +573,28 @@ set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
|
||||
set(viewer_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
ViewerInstall.cmake
|
||||
|
||||
NACLantispam.h
|
||||
sgmemstat.h
|
||||
sgversion.h
|
||||
llviewerobjectbackup.h
|
||||
slfloatermediafilter.h
|
||||
floaterlocalassetbrowse.h
|
||||
aoremotectrl.h
|
||||
floaterao.h
|
||||
floatervoicelicense.h
|
||||
lldaycyclemanager.h
|
||||
llenvmanager.h
|
||||
llwlhandlers.h
|
||||
llregioninfomodel.h
|
||||
m7wlinterface.h
|
||||
ascentfloatercontactgroups.h
|
||||
ascentkeyword.h
|
||||
ascentprefschat.h
|
||||
ascentprefssys.h
|
||||
ascentprefsvan.h
|
||||
chatbar_as_cmdline.h
|
||||
emeraldboobutils.h
|
||||
floatersculptpreview.h
|
||||
floaterao.h
|
||||
floaterlocalassetbrowse.h
|
||||
floatervoicelicense.h
|
||||
hbfloatergrouptitles.h
|
||||
hgfloatertexteditor.h
|
||||
hippogridmanager.h
|
||||
hippofloaterxml.h
|
||||
hippogridmanager.h
|
||||
hippolimits.h
|
||||
hipporestrequest.h
|
||||
hippopanelgrids.h
|
||||
importtracker.h
|
||||
hipporestrequest.h
|
||||
importtracker.h
|
||||
jcfloaterareasearch.h
|
||||
lggdicdownload.h
|
||||
lgghunspell_wrapper.h
|
||||
chatbar_as_cmdline.h
|
||||
qtoolalign.h
|
||||
llaccountingcostmanager.h
|
||||
llagent.h
|
||||
llagentaccess.h
|
||||
@@ -627,8 +610,8 @@ set(viewer_HEADER_FILES
|
||||
llappearancemgr.h
|
||||
llappviewer.h
|
||||
llassetconverter.h
|
||||
llassetuploadresponders.h
|
||||
llassetuploadqueue.h
|
||||
llassetuploadresponders.h
|
||||
llattachmentsmgr.h
|
||||
llaudiosourcevo.h
|
||||
llavatarpropertiesprocessor.h
|
||||
@@ -652,6 +635,7 @@ set(viewer_HEADER_FILES
|
||||
llcontainerview.h
|
||||
llcurrencyuimanager.h
|
||||
llcylinder.h
|
||||
lldaycyclemanager.h
|
||||
lldebugmessagebox.h
|
||||
lldebugview.h
|
||||
lldelayedgestureerror.h
|
||||
@@ -668,9 +652,10 @@ set(viewer_HEADER_FILES
|
||||
lldrawpoolwater.h
|
||||
lldrawpoolwlsky.h
|
||||
lldriverparam.h
|
||||
lldroptarget.h
|
||||
lldroptarget.h
|
||||
lldynamictexture.h
|
||||
llemote.h
|
||||
llenvmanager.h
|
||||
lleventinfo.h
|
||||
lleventnotifier.h
|
||||
lleventpoll.h
|
||||
@@ -690,8 +675,6 @@ set(viewer_HEADER_FILES
|
||||
llfloateravatartextures.h
|
||||
llfloaterbeacons.h
|
||||
llfloaterblacklist.h
|
||||
llviewerdisplayname.h
|
||||
llfloaterdisplayname.h
|
||||
llfloaterbuildoptions.h
|
||||
llfloaterbulkpermission.h
|
||||
llfloaterbump.h
|
||||
@@ -707,6 +690,7 @@ set(viewer_HEADER_FILES
|
||||
llfloatercustomize.h
|
||||
llfloaterdaycycle.h
|
||||
llfloaterdirectory.h
|
||||
llfloaterdisplayname.h
|
||||
llfloatereditui.h
|
||||
llfloaterenvsettings.h
|
||||
llfloaterexploreanimations.h
|
||||
@@ -721,7 +705,6 @@ set(viewer_HEADER_FILES
|
||||
llfloatergroups.h
|
||||
llfloaterhandler.h
|
||||
llfloaterhtmlcurrency.h
|
||||
llfloatermediabrowser.h
|
||||
llfloaterhtmlsimple.h
|
||||
llfloaterhud.h
|
||||
llfloaterimagepreview.h
|
||||
@@ -732,6 +715,7 @@ set(viewer_HEADER_FILES
|
||||
llfloaterlandholdings.h
|
||||
llfloaterlandmark.h
|
||||
llfloatermap.h
|
||||
llfloatermediabrowser.h
|
||||
llfloatermemleak.h
|
||||
llfloatermodeluploadbase.h
|
||||
llfloatermute.h
|
||||
@@ -742,16 +726,16 @@ set(viewer_HEADER_FILES
|
||||
llfloateropenobject.h
|
||||
llfloaterparcel.h
|
||||
llfloaterpermissionsmgr.h
|
||||
llfloaterperms.h
|
||||
llfloaterpostcard.h
|
||||
llfloaterpostprocess.h
|
||||
llfloaterpreference.h
|
||||
llfloaterperms.h
|
||||
llfloaterproperties.h
|
||||
llfloaterregiondebugconsole.h
|
||||
llfloaterregioninfo.h
|
||||
llfloaterreporter.h
|
||||
llfloatersearchreplace.h
|
||||
llfloaterscriptdebug.h
|
||||
llfloatersearchreplace.h
|
||||
llfloatersellland.h
|
||||
llfloatersettingsdebug.h
|
||||
llfloatersnapshot.h
|
||||
@@ -810,17 +794,18 @@ set(viewer_HEADER_FILES
|
||||
lljoystickbutton.h
|
||||
lllandmarklist.h
|
||||
lllightconstants.h
|
||||
lllocaltextureobject.h
|
||||
lllocalinventory.h
|
||||
lllocaltextureobject.h
|
||||
lllogchat.h
|
||||
llloginhandler.h
|
||||
llsavedlogins.h
|
||||
llmainlooprepeater.h
|
||||
llmanip.h
|
||||
llmaniprotate.h
|
||||
llmanipscale.h
|
||||
llmaniptranslate.h
|
||||
llmapresponders.h
|
||||
llmarketplacenotifications.h
|
||||
llmediactrl.h
|
||||
llmediaremotectrl.h
|
||||
llmemoryview.h
|
||||
llmenucommands.h
|
||||
@@ -841,7 +826,6 @@ set(viewer_HEADER_FILES
|
||||
llpanelavatar.h
|
||||
llpanelclassified.h
|
||||
llpanelcontents.h
|
||||
llpaneleditwearable.h
|
||||
llpaneldebug.h
|
||||
llpaneldirbrowser.h
|
||||
llpaneldirclassified.h
|
||||
@@ -853,6 +837,7 @@ set(viewer_HEADER_FILES
|
||||
llpaneldirplaces.h
|
||||
llpaneldirpopular.h
|
||||
llpaneldisplay.h
|
||||
llpaneleditwearable.h
|
||||
llpanelevent.h
|
||||
llpanelface.h
|
||||
llpanelgeneral.h
|
||||
@@ -864,7 +849,6 @@ set(viewer_HEADER_FILES
|
||||
llpanelgrouproles.h
|
||||
llpanelgroupvoting.h
|
||||
llpanelinput.h
|
||||
llpanelobjectinventory.h
|
||||
llpanelland.h
|
||||
llpanellandaudio.h
|
||||
llpanellandmedia.h
|
||||
@@ -872,11 +856,12 @@ set(viewer_HEADER_FILES
|
||||
llpanellandoptions.h
|
||||
llpanellogin.h
|
||||
llpanelmaininventory.h
|
||||
llpanelmorph.h
|
||||
llpanelmediahud.h
|
||||
llpanelmorph.h
|
||||
llpanelmsgs.h
|
||||
llpanelnetwork.h
|
||||
llpanelobject.h
|
||||
llpanelobjectinventory.h
|
||||
llpanelpathfindingrebakenavmesh.h
|
||||
llpanelpermissions.h
|
||||
llpanelpick.h
|
||||
@@ -912,9 +897,11 @@ set(viewer_HEADER_FILES
|
||||
llpreviewtexture.h
|
||||
llproductinforequest.h
|
||||
llprogressview.h
|
||||
llregioninfomodel.h
|
||||
llregionposition.h
|
||||
llremoteparcelrequest.h
|
||||
llresourcedata.h
|
||||
llsavedlogins.h
|
||||
llsavedsettingsglue.h
|
||||
llscrollingpanelparam.h
|
||||
llscrollingpanelparambase.h
|
||||
@@ -967,7 +954,7 @@ set(viewer_HEADER_FILES
|
||||
lltranslate.h
|
||||
lluiconstants.h
|
||||
lluploaddialog.h
|
||||
lluploadfloaterobservers.h
|
||||
lluploadfloaterobservers.h
|
||||
llurl.h
|
||||
llurldispatcher.h
|
||||
llurlhistory.h
|
||||
@@ -983,6 +970,7 @@ set(viewer_HEADER_FILES
|
||||
llviewercamera.h
|
||||
llviewercontrol.h
|
||||
llviewerdisplay.h
|
||||
llviewerdisplayname.h
|
||||
llviewerfoldertype.h
|
||||
llviewergenericmessage.h
|
||||
llviewergesture.h
|
||||
@@ -995,13 +983,14 @@ set(viewer_HEADER_FILES
|
||||
llviewerlayer.h
|
||||
llviewermedia.h
|
||||
llviewermediaeventemitter.h
|
||||
llviewermediaobserver.h
|
||||
llviewermediafocus.h
|
||||
llviewermediaobserver.h
|
||||
llviewermenu.h
|
||||
llviewermenufile.h
|
||||
llviewermessage.h
|
||||
llviewernetwork.h
|
||||
llviewerobject.h
|
||||
llviewerobjectbackup.h
|
||||
llviewerobjectlist.h
|
||||
llviewerparcelmedia.h
|
||||
llviewerparcelmediaautoplay.h
|
||||
@@ -1050,38 +1039,43 @@ set(viewer_HEADER_FILES
|
||||
llwearablelist.h
|
||||
llwearabletype.h
|
||||
llweb.h
|
||||
llmediactrl.h
|
||||
llwind.h
|
||||
llwindebug.h
|
||||
llwlanimator.h
|
||||
llwldaycycle.h
|
||||
llwlhandlers.h
|
||||
llwlparammanager.h
|
||||
llwlparamset.h
|
||||
llworld.h
|
||||
llworldmap.h
|
||||
llworldmipmap.h
|
||||
llmapresponders.h
|
||||
llworldmapview.h
|
||||
llxmlrpctransaction.h
|
||||
m7wlinterface.h
|
||||
macmain.h
|
||||
NACLantispam.h
|
||||
noise.h
|
||||
pipeline.h
|
||||
qtoolalign.h
|
||||
randgauss.h
|
||||
rlvcommon.h
|
||||
rlvdefines.h
|
||||
rlvextensions.h
|
||||
rlvfloaterbehaviour.h
|
||||
rlvhandler.h
|
||||
rlvhelper.h
|
||||
rlvinventory.h
|
||||
rlvlocks.h
|
||||
rlvui.h
|
||||
scriptcounter.h
|
||||
sgmemstat.h
|
||||
sgversion.h
|
||||
shcommandhandler.h
|
||||
shfloatermediaticker.h
|
||||
slfloatermediafilter.h
|
||||
VertexCache.h
|
||||
VorbisFramework.h
|
||||
wlfPanel_AdvSettings.h
|
||||
rlvdefines.h
|
||||
rlvhandler.h
|
||||
rlvhelper.h
|
||||
rlvcommon.h
|
||||
rlvlocks.h
|
||||
rlvinventory.h
|
||||
rlvextensions.h
|
||||
rlvfloaterbehaviour.h
|
||||
rlvui.h
|
||||
shcommandhandler.h
|
||||
shfloatermediaticker.h
|
||||
)
|
||||
|
||||
source_group("CMake Rules" FILES ViewerInstall.cmake)
|
||||
@@ -1144,16 +1138,16 @@ if (WINDOWS)
|
||||
llappviewerwin32.h
|
||||
llwindebug.h
|
||||
)
|
||||
|
||||
|
||||
# precompiled header configuration
|
||||
# llviewerprecompiledheaders.cpp generates
|
||||
# the .pch file.
|
||||
# All sources added to viewer_SOURCE_FILES
|
||||
# All sources added to viewer_SOURCE_FILES
|
||||
# at this point use it.
|
||||
set_source_files_properties(llviewerprecompiledheaders.cpp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h"
|
||||
)
|
||||
)
|
||||
foreach( src_file ${viewer_SOURCE_FILES} )
|
||||
set_source_files_properties(
|
||||
${src_file}
|
||||
@@ -1195,13 +1189,13 @@ if (WINDOWS)
|
||||
${ARTWORK_DIR}/res/snowglobe_icon.BMP
|
||||
${ARTWORK_DIR}/res/snowglobe_icon.ico
|
||||
${ARTWORK_DIR}/res/resource.h
|
||||
${ARTWORK_DIR}/res/toolbuy.cur
|
||||
${ARTWORK_DIR}/res/toolopen.cur
|
||||
${ARTWORK_DIR}/res/toolpay.cur
|
||||
${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
|
||||
)
|
||||
|
||||
@@ -1281,20 +1275,16 @@ endif (WINDOWS)
|
||||
|
||||
# Add the xui files. This is handy for searching for xui elements
|
||||
# from within the IDE.
|
||||
|
||||
file(GLOB viewer_XUI_FILE_GLOB_LIST
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skins/default/xui/en-us/*.xml)
|
||||
|
||||
set(viewer_XUI_FILES
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skins/default/colors.xml
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skins/default/colors_base.xml
|
||||
|
||||
|
||||
|
||||
)
|
||||
|
||||
file(GLOB viewer_XUI_FILE_GLOB_LIST
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/skins/default/xui/en-us/*.xml)
|
||||
list(APPEND viewer_XUI_FILES ${viewer_XUI_FILE_GLOB_LIST})
|
||||
|
||||
|
||||
|
||||
list(SORT viewer_XUI_FILES)
|
||||
|
||||
source_group("XUI Files" FILES ${viewer_XUI_FILES})
|
||||
@@ -1382,9 +1372,6 @@ if (FMOD OR FMODEX)
|
||||
if(FMOD)
|
||||
set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp)
|
||||
add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES})
|
||||
if (FMODEX)
|
||||
set(fmodwrapper_needed_LIBRARIES ${FMODEX_LIBRARY} ${CARBON_LIBRARY})
|
||||
endif (FMODEX)
|
||||
if (FMOD)
|
||||
set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY} ${CARBON_LIBRARY})
|
||||
endif (FMOD)
|
||||
@@ -1449,21 +1436,21 @@ if (WINDOWS)
|
||||
set(release_flags "/MAP:Release/${VIEWER_BINARY_NAME}.map")
|
||||
endif()
|
||||
|
||||
if (FMOD)
|
||||
if(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "${MANIFEST_LIBRARIES}|${FMOD_BINARY_DIR}/fmod.dll")
|
||||
else(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "--extra_libraries=${FMOD_BINARY_DIR}/fmod.dll")
|
||||
endif(MANIFEST_LIBRARIES)
|
||||
endif (FMOD)
|
||||
if (FMODEX)
|
||||
if(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "${MANIFEST_LIBRARIES}|${FMODEX_BINARY_DIR}/fmodex.dll")
|
||||
else(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "--extra_libraries=${FMODEX_BINARY_DIR}/fmodex.dll")
|
||||
endif(MANIFEST_LIBRARIES)
|
||||
set(EXTRA_LINKER_FLAGS "/DELAYLOAD:fmodex.dll")
|
||||
endif (FMODEX)
|
||||
if (FMOD)
|
||||
if(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "${MANIFEST_LIBRARIES}|${FMOD_BINARY_DIR}/fmod.dll")
|
||||
else(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "--extra_libraries=${FMOD_BINARY_DIR}/fmod.dll")
|
||||
endif(MANIFEST_LIBRARIES)
|
||||
endif (FMOD)
|
||||
if (FMODEX)
|
||||
if(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "${MANIFEST_LIBRARIES}|${FMODEX_BINARY_DIR}/fmodex.dll")
|
||||
else(MANIFEST_LIBRARIES)
|
||||
set(MANIFEST_LIBRARIES "--extra_libraries=${FMODEX_BINARY_DIR}/fmodex.dll")
|
||||
endif(MANIFEST_LIBRARIES)
|
||||
set(EXTRA_LINKER_FLAGS "/DELAYLOAD:fmodex.dll")
|
||||
endif (FMODEX)
|
||||
|
||||
set_target_properties(${VIEWER_BINARY_NAME}
|
||||
PROPERTIES
|
||||
@@ -1478,11 +1465,11 @@ endif (FMODEX)
|
||||
TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe
|
||||
ARGS
|
||||
--solution
|
||||
--solution
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln
|
||||
--workingdir
|
||||
${VIEWER_BINARY_NAME}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging."
|
||||
)
|
||||
endif (NOT UNATTENDED)
|
||||
@@ -1508,30 +1495,32 @@ endif (FMODEX)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message.xml
|
||||
COMMENT "Copying message.xml to the runtime folder."
|
||||
)
|
||||
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} copy_win_libs)
|
||||
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
|
||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
|
||||
|
||||
add_custom_command(
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
||||
--grid=${GRID}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
|
||||
${MANIFEST_LIBRARIES}
|
||||
DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
DEPENDS
|
||||
${VIEWER_BINARY_NAME}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker)
|
||||
@@ -1542,9 +1531,16 @@ endif (FMODEX)
|
||||
endif (PACKAGE)
|
||||
endif (WINDOWS)
|
||||
|
||||
# *NOTE - this list is very sensitive to ordering, test carefully on all
|
||||
# platforms if you change the releative order of the entries here.
|
||||
# In particular, cmake 2.6.4 (when buidling with linux/makefile generators)
|
||||
# appears to sometimes de-duplicate redundantly listed dependencies improperly.
|
||||
# To work around this, higher level modules should be listed before the modules
|
||||
# that they depend upon. -brad
|
||||
target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${GOOGLE_PERFTOOLS_LIBRARIES}
|
||||
${LLAUDIO_LIBRARIES}
|
||||
${LLAUDIO_VORBIS_LIBRARIES}
|
||||
${LLCHARACTER_LIBRARIES}
|
||||
${LLIMAGE_LIBRARIES}
|
||||
${LLIMAGEJ2COJ_LIBRARIES}
|
||||
@@ -1564,13 +1560,13 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${NDOF_LIBRARY}
|
||||
${viewer_LIBRARIES}
|
||||
${BOOST_FILESYSTEM_LIBRARY}
|
||||
${BOOST_PROGRAM_OPTIONS_LIBRARY}
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${DBUSGLIB_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${FMODWRAPPER_LIBRARY}
|
||||
${FMODWRAPPER_LIBRARY} # must come after LLAudio
|
||||
${APRUTIL_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${JSONCPP_LIBRARIES}
|
||||
@@ -1606,21 +1602,23 @@ if (LINUX)
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
--standalone=${STANDALONE}
|
||||
--grid=${GRID}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--installer_name=${product}
|
||||
--arch=${ARCH}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
|
||||
--buildtype=${CMAKE_BUILD_TYPE}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
|
||||
--grid=${GRID}
|
||||
--installer_name=${product}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--standalone=${STANDALONE}
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
|
||||
${MANIFEST_LIBRARIES}
|
||||
DEPENDS secondlife-stripped ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
DEPENDS
|
||||
secondlife-stripped
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer010 media_plugin_webkit basic_plugin_filepicker)
|
||||
@@ -1652,22 +1650,31 @@ if (DARWIN)
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
--grid=${GRID}
|
||||
--actions=copy
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
|
||||
--buildtype=${CMAKE_BUILD_TYPE}
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
|
||||
--grid=${GRID}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker)
|
||||
|
||||
if (FMODEX)
|
||||
add_custom_command(OUTPUT "${FMODEX_LIBRARY}"
|
||||
COMMAND cp "${FMODEX_ORIG_LIBRARY}" "${FMODEX_LIBRARY}"
|
||||
COMMAND install_name_tool -id "@executable_path/../Resources/libfmodex.dylib" ${FMODEX_LIBRARY}
|
||||
DEPENDS "${FMODEX_ORIG_LIBRARY}")
|
||||
add_custom_target(fmodex_modified_library DEPENDS "${FMODEX_LIBRARY}")
|
||||
add_dependencies(${VIEWER_BINARY_NAME} fmodex_modified_library)
|
||||
endif (FMODEX)
|
||||
|
||||
if (PACKAGE)
|
||||
add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
|
||||
add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
|
||||
add_dependencies(package mac-updater mac-crash-logger)
|
||||
|
||||
add_custom_command(
|
||||
@@ -1675,38 +1682,38 @@ if (DARWIN)
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
--grid=${GRID}
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
|
||||
--buildtype=${CMAKE_BUILD_TYPE}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
|
||||
--grid=${GRID}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
|
||||
# Viewer-Development doesn't have this duplicate of the above command, here..
|
||||
# this may be a botched merge, but Mac seems to be picky, so I'm leaving it ~Liru
|
||||
add_custom_command(
|
||||
TARGET package POST_BUILD
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
--grid=${GRID}
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--artwork=${ARTWORK_DIR}
|
||||
--branding_id=${VIEWER_BRANDING_ID}
|
||||
--build=${CMAKE_CURRENT_BINARY_DIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
|
||||
--buildtype=${CMAKE_BUILD_TYPE}
|
||||
--channel=${VIEWER_CHANNEL}
|
||||
--configuration=${CMAKE_CFG_INTDIR}
|
||||
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
|
||||
--grid=${GRID}
|
||||
--login_channel=${VIEWER_LOGIN_CHANNEL}
|
||||
--source=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
|
||||
)
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llagent.h"
|
||||
#include "lltrans.h"
|
||||
#include <time.h>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
U32 NACLAntiSpamRegistry::globalAmount;
|
||||
U32 NACLAntiSpamRegistry::globalTime;
|
||||
@@ -28,6 +30,7 @@ NACLAntiSpamQueue* NACLAntiSpamRegistry::queues[NACLAntiSpamRegistry::QUEUE_MAX]
|
||||
std::tr1::unordered_map<std::string,NACLAntiSpamQueueEntry*> NACLAntiSpamRegistry::globalEntries;
|
||||
std::tr1::unordered_map<std::string,NACLAntiSpamQueueEntry*>::iterator NACLAntiSpamRegistry::it2;
|
||||
|
||||
// The following sounds will be ignored for purposes of spam protection. They have been gathered from wiki documentation of frequent official sounds.
|
||||
const std::string COLLISION_SOUNDS[] ={"dce5fdd4-afe4-4ea1-822f-dd52cac46b08","51011582-fbca-4580-ae9e-1a5593f094ec","68d62208-e257-4d0c-bbe2-20c9ea9760bb","75872e8c-bc39-451b-9b0b-042d7ba36cba","6a45ba0b-5775-4ea8-8513-26008a17f873","992a6d1b-8c77-40e0-9495-4098ce539694","2de4da5a-faf8-46be-bac6-c4d74f1e5767","6e3fb0f7-6d9c-42ca-b86b-1122ff562d7d","14209133-4961-4acc-9649-53fc38ee1667","bc4a4348-cfcc-4e5e-908e-8a52a8915fe6","9e5c1297-6eed-40c0-825a-d9bcd86e3193","e534761c-1894-4b61-b20c-658a6fb68157","8761f73f-6cf9-4186-8aaa-0948ed002db1","874a26fd-142f-4173-8c5b-890cd846c74d","0e24a717-b97e-4b77-9c94-b59a5a88b2da","75cf3ade-9a5b-4c4d-bb35-f9799bda7fb2","153c8bf7-fb89-4d89-b263-47e58b1b4774","55c3e0ce-275a-46fa-82ff-e0465f5e8703","24babf58-7156-4841-9a3f-761bdbb8e237","aca261d8-e145-4610-9e20-9eff990f2c12","0642fba6-5dcf-4d62-8e7b-94dbb529d117","25a863e8-dc42-4e8a-a357-e76422ace9b5","9538f37c-456e-4047-81be-6435045608d4","8c0f84c3-9afd-4396-b5f5-9bca2c911c20","be582e5d-b123-41a2-a150-454c39e961c8","c70141d4-ba06-41ea-bcbc-35ea81cb8335","7d1826f4-24c4-4aac-8c2e-eff45df37783","063c97d3-033a-4e9b-98d8-05c8074922cb","00000000-0000-0000-0000-000000000120"};
|
||||
const int COLLISION_SOUNDS_SIZE=29;
|
||||
|
||||
@@ -45,11 +48,11 @@ void NACLAntiSpamQueueEntry::clearEntry()
|
||||
entryAmount=0;
|
||||
blocked=false;
|
||||
}
|
||||
U32 NACLAntiSpamQueueEntry::getEntryAmount()
|
||||
U32 NACLAntiSpamQueueEntry::getEntryAmount() const
|
||||
{
|
||||
return entryAmount;
|
||||
}
|
||||
U32 NACLAntiSpamQueueEntry::getEntryTime()
|
||||
U32 NACLAntiSpamQueueEntry::getEntryTime() const
|
||||
{
|
||||
return entryTime;
|
||||
}
|
||||
@@ -65,7 +68,7 @@ void NACLAntiSpamQueueEntry::setBlocked()
|
||||
{
|
||||
blocked=true;
|
||||
}
|
||||
bool NACLAntiSpamQueueEntry::getBlocked()
|
||||
bool NACLAntiSpamQueueEntry::getBlocked() const
|
||||
{
|
||||
return blocked;
|
||||
}
|
||||
@@ -85,6 +88,14 @@ void NACLAntiSpamQueue::setTime(U32 time)
|
||||
{
|
||||
queueTime=time;
|
||||
}
|
||||
U32 NACLAntiSpamQueue::getAmount() const
|
||||
{
|
||||
return queueAmount;
|
||||
}
|
||||
U32 NACLAntiSpamQueue::getTime() const
|
||||
{
|
||||
return queueTime;
|
||||
}
|
||||
void NACLAntiSpamQueue::clearEntries()
|
||||
{
|
||||
for(it = entries.begin(); it != entries.end(); it++)
|
||||
@@ -110,7 +121,10 @@ void NACLAntiSpamQueue::blockEntry(LLUUID& source)
|
||||
entries[source.asString()]->setBlocked();
|
||||
}
|
||||
int NACLAntiSpamQueue::checkEntry(LLUUID& name, U32 multiplier)
|
||||
// Returns 0 if unblocked/disabled, 1 if check results in a new block, 2 if by an existing block
|
||||
{
|
||||
static LLCachedControl<bool> enabled(gSavedSettings,"AntiSpamEnabled",false);
|
||||
if(!enabled) return 0;
|
||||
it=entries.find(name.asString());
|
||||
if(it != entries.end())
|
||||
{
|
||||
@@ -139,6 +153,7 @@ int NACLAntiSpamQueue::checkEntry(LLUUID& name, U32 multiplier)
|
||||
}
|
||||
else
|
||||
{
|
||||
//lldebugs << "[antispam] New queue entry:" << name.asString() << llendl;
|
||||
entries[name.asString()]=new NACLAntiSpamQueueEntry();
|
||||
entries[name.asString()]->updateEntryAmount();
|
||||
entries[name.asString()]->updateEntryTime();
|
||||
@@ -152,8 +167,8 @@ static const char* QUEUE_NAME[NACLAntiSpamRegistry::QUEUE_MAX] = {
|
||||
"Chat",
|
||||
"Inventory",
|
||||
"Instant Message",
|
||||
"Calling Card",
|
||||
"Sound",
|
||||
"calling card",
|
||||
"sound",
|
||||
"Sound Preload",
|
||||
"Script Dialog",
|
||||
"Teleport"};
|
||||
@@ -169,12 +184,14 @@ NACLAntiSpamRegistry::NACLAntiSpamRegistry(U32 time, U32 amount)
|
||||
queues[queue] = new NACLAntiSpamQueue(time,amount);
|
||||
}
|
||||
}
|
||||
//static
|
||||
const char* NACLAntiSpamRegistry::getQueueName(U32 queue_id)
|
||||
{
|
||||
if(queue_id >= QUEUE_MAX)
|
||||
return "Unknown";
|
||||
return QUEUE_NAME[queue_id];
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::registerQueues(U32 time, U32 amount)
|
||||
{
|
||||
globalTime=time;
|
||||
@@ -186,73 +203,81 @@ void NACLAntiSpamRegistry::registerQueues(U32 time, U32 amount)
|
||||
queues[queue] = new NACLAntiSpamQueue(time,amount);
|
||||
}
|
||||
}
|
||||
void NACLAntiSpamRegistry::registerQueue(U32 name, U32 time, U32 amount)
|
||||
//static
|
||||
/*void NACLAntiSpamRegistry::registerQueue(U32 name, U32 time, U32 amount)
|
||||
{
|
||||
/*
|
||||
it=queues.find(name);
|
||||
if(it == queues.end())
|
||||
{
|
||||
queues[name]=new NACLAntiSpamQueue(time,amount);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}*/
|
||||
//static
|
||||
void NACLAntiSpamRegistry::setRegisteredQueueTime(U32 name, U32 time)
|
||||
{
|
||||
if(name >= QUEUE_MAX || queues[name] == 0)
|
||||
{
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to use a antispam queue that was not created or was outside of the reasonable range of queues. Queue: " << getQueueName(name) << llendl;
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to set time of antispam queue that was outside of the reasonable range of queues or not created. Queue: " << getQueueName(name) << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
queues[name]->setTime(time);
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::setRegisteredQueueAmount(U32 name, U32 amount)
|
||||
{
|
||||
if(name >= QUEUE_MAX || queues[name] == 0)
|
||||
{
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to use a antispam queue that was not created or was outside of the reasonable range of queues. Queue: " << getQueueName(name) << llendl;
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to set amount for antispam queue that was outside of the reasonable range of queues or not created. Queue: " << getQueueName(name) << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
queues[name]->setAmount(amount);
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::setAllQueueTimes(U32 time)
|
||||
{
|
||||
globalTime=time;
|
||||
for(int queue = 0; queue < QUEUE_MAX; ++queue)
|
||||
queues[queue]->setTime(time);
|
||||
if( queues[queue] )
|
||||
queues[queue]->setTime(time);
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::setAllQueueAmounts(U32 amount)
|
||||
{
|
||||
globalAmount=amount;
|
||||
for(int queue = 0; queue < QUEUE_MAX; ++queue)
|
||||
{
|
||||
if(!queues[queue]) continue;
|
||||
if(queue == QUEUE_SOUND || queue == QUEUE_SOUND_PRELOAD)
|
||||
queues[queue]->setAmount(amount*5);
|
||||
else
|
||||
queues[queue]->setAmount(amount);
|
||||
}
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::clearRegisteredQueue(U32 name)
|
||||
{
|
||||
if(name >= QUEUE_MAX || queues[name] == 0)
|
||||
{
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to use a antispam queue that was not created or was outside of the reasonable range of queues. Queue: " << getQueueName(name) << llendl;
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to clear antispam queue that was outside of the reasonable range of queues or not created. Queue: " << getQueueName(name) << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
queues[name]->clearEntries();
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::purgeRegisteredQueue(U32 name)
|
||||
{
|
||||
if(name >= QUEUE_MAX || queues[name] == 0)
|
||||
{
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to use a antispam queue that was not created or was outside of the reasonable range of queues. Queue: " << getQueueName(name) << llendl;
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to purge antispam queue that was outside of the reasonable range of queues or not created. Queue: " << getQueueName(name) << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
queues[name]->purgeEntries();
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::blockOnQueue(U32 name, LLUUID& source)
|
||||
{
|
||||
if(bGlobalQueue)
|
||||
@@ -263,12 +288,13 @@ void NACLAntiSpamRegistry::blockOnQueue(U32 name, LLUUID& source)
|
||||
{
|
||||
if(name >= QUEUE_MAX || queues[name] == 0)
|
||||
{
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to use a antispam queue that was not created or was outside of the reasonable range of queues. Queue: " << getQueueName(name) << llendl;
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to use a antispam queue that was outside of the reasonable range of queues or not created. Queue: " << getQueueName(name) << llendl;
|
||||
return;
|
||||
}
|
||||
queues[name]->blockEntry(source);
|
||||
}
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::blockGlobalEntry(LLUUID& source)
|
||||
{
|
||||
it2=globalEntries.find(source.asString());
|
||||
@@ -278,13 +304,13 @@ void NACLAntiSpamRegistry::blockGlobalEntry(LLUUID& source)
|
||||
}
|
||||
globalEntries[source.asString()]->setBlocked();
|
||||
}
|
||||
//static
|
||||
bool NACLAntiSpamRegistry::checkQueue(U32 name, LLUUID& source, U32 multiplier)
|
||||
//returns true if blocked
|
||||
{
|
||||
if(source.isNull()) return false;
|
||||
if(gAgent.getID() == source) return false;
|
||||
if(source.isNull() || gAgent.getID() == source) return false;
|
||||
LLViewerObject *obj=gObjectList.findObject(source);
|
||||
if(obj)
|
||||
if(obj->permYouOwner()) return false;
|
||||
if(obj && obj->permYouOwner()) return false;
|
||||
|
||||
int result;
|
||||
if(bGlobalQueue)
|
||||
@@ -295,45 +321,50 @@ bool NACLAntiSpamRegistry::checkQueue(U32 name, LLUUID& source, U32 multiplier)
|
||||
{
|
||||
if(name >= QUEUE_MAX || queues[name] == 0)
|
||||
{
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to use a antispam queue that was not created or was outside of the reasonable range of queues. Queue: " << getQueueName(name) << llendl;
|
||||
LL_ERRS("AntiSpam") << "CODE BUG: Attempting to check antispam queue that was outside of the reasonable range of queues or not created. Queue: " << getQueueName(name) << llendl;
|
||||
return false;
|
||||
}
|
||||
result=queues[name]->checkEntry(source,multiplier);
|
||||
}
|
||||
if(result==0)
|
||||
{
|
||||
if(result == 0) //Safe
|
||||
return false;
|
||||
}
|
||||
else if(result==2)
|
||||
else if(result == 2) //Previously blocked
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else //Just blocked!
|
||||
{
|
||||
if(gSavedSettings.getBOOL("AntiSpamNotify"))
|
||||
{
|
||||
LLSD args;
|
||||
args["MESSAGE"] = std::string(getQueueName(name))+": Blocked object "+source.asString();
|
||||
LLNotificationsUtil::add("SystemMessageTip", args);
|
||||
LLSD args;
|
||||
args["SOURCE"] = source.asString().c_str();
|
||||
args["TYPE"] = LLTrans::getString(getQueueName(name));
|
||||
args["AMOUNT"] = boost::lexical_cast<std::string>(multiplier * queues[name]->getAmount());
|
||||
args["TIME"] = boost::lexical_cast<std::string>(queues[name]->getTime());
|
||||
LLNotificationsUtil::add("AntiSpamBlock", args);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Global queue stoof
|
||||
//static
|
||||
void NACLAntiSpamRegistry::setGlobalQueue(bool value)
|
||||
{
|
||||
NACLAntiSpamRegistry::purgeAllQueues();
|
||||
bGlobalQueue=value;
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::setGlobalAmount(U32 amount)
|
||||
{
|
||||
globalAmount=amount;
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::setGlobalTime(U32 time)
|
||||
{
|
||||
globalTime=time;
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::clearAllQueues()
|
||||
{
|
||||
if(bGlobalQueue)
|
||||
@@ -341,9 +372,10 @@ void NACLAntiSpamRegistry::clearAllQueues()
|
||||
else
|
||||
for(int queue = 0; queue < QUEUE_MAX; ++queue)
|
||||
{
|
||||
queues[queue]->clearEntries();
|
||||
if(queues[queue]) queues[queue]->clearEntries();
|
||||
}
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::purgeAllQueues()
|
||||
{
|
||||
if(bGlobalQueue)
|
||||
@@ -351,11 +383,15 @@ void NACLAntiSpamRegistry::purgeAllQueues()
|
||||
else
|
||||
for(int queue = 0; queue < QUEUE_MAX; ++queue)
|
||||
{
|
||||
queues[queue]->purgeEntries();
|
||||
if(queues[queue]) queues[queue]->purgeEntries();
|
||||
}
|
||||
llinfos << "AntiSpam Queues Purged" << llendl;
|
||||
}
|
||||
//static
|
||||
int NACLAntiSpamRegistry::checkGlobalEntry(LLUUID& name, U32 multiplier)
|
||||
{
|
||||
static LLCachedControl<bool> enabled(gSavedSettings,"AntiSpamEnabled",false);
|
||||
if(!enabled) return 0;
|
||||
it2=globalEntries.find(name.asString());
|
||||
if(it2 != globalEntries.end())
|
||||
{
|
||||
@@ -387,6 +423,7 @@ int NACLAntiSpamRegistry::checkGlobalEntry(LLUUID& name, U32 multiplier)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::clearGlobalEntries()
|
||||
{
|
||||
for(it2 = globalEntries.begin(); it2 != globalEntries.end(); it2++)
|
||||
@@ -394,6 +431,7 @@ void NACLAntiSpamRegistry::clearGlobalEntries()
|
||||
it2->second->clearEntry();
|
||||
}
|
||||
}
|
||||
//static
|
||||
void NACLAntiSpamRegistry::purgeGlobalEntries()
|
||||
{
|
||||
for(it2 = globalEntries.begin(); it2 != globalEntries.end(); it2++)
|
||||
@@ -403,16 +441,21 @@ void NACLAntiSpamRegistry::purgeGlobalEntries()
|
||||
}
|
||||
globalEntries.clear();
|
||||
}
|
||||
|
||||
//Handlers
|
||||
//static
|
||||
bool NACLAntiSpamRegistry::handleNaclAntiSpamGlobalQueueChanged(const LLSD& newvalue)
|
||||
{
|
||||
setGlobalQueue(newvalue.asBoolean());
|
||||
return true;
|
||||
}
|
||||
//static
|
||||
bool NACLAntiSpamRegistry::handleNaclAntiSpamTimeChanged(const LLSD& newvalue)
|
||||
{
|
||||
setAllQueueTimes(newvalue.asInteger());
|
||||
return true;
|
||||
}
|
||||
//static
|
||||
bool NACLAntiSpamRegistry::handleNaclAntiSpamAmountChanged(const LLSD& newvalue)
|
||||
{
|
||||
setAllQueueAmounts(newvalue.asInteger());
|
||||
|
||||
@@ -25,11 +25,11 @@ class NACLAntiSpamQueueEntry
|
||||
protected:
|
||||
NACLAntiSpamQueueEntry();
|
||||
void clearEntry();
|
||||
U32 getEntryAmount();
|
||||
U32 getEntryTime();
|
||||
U32 getEntryAmount() const;
|
||||
U32 getEntryTime() const;
|
||||
void updateEntryAmount();
|
||||
void updateEntryTime();
|
||||
bool getBlocked();
|
||||
bool getBlocked() const;
|
||||
void setBlocked();
|
||||
private:
|
||||
U32 entryAmount;
|
||||
@@ -39,6 +39,9 @@ private:
|
||||
class NACLAntiSpamQueue
|
||||
{
|
||||
friend class NACLAntiSpamRegistry;
|
||||
public:
|
||||
U32 getAmount() const;
|
||||
U32 getTime() const;
|
||||
protected:
|
||||
NACLAntiSpamQueue(U32 time, U32 amount);
|
||||
void setAmount(U32 amount);
|
||||
@@ -58,7 +61,7 @@ class NACLAntiSpamRegistry
|
||||
public:
|
||||
NACLAntiSpamRegistry(U32 time=2, U32 amount=10);
|
||||
static void registerQueues(U32 time=2, U32 amount=10);
|
||||
static void registerQueue(U32 name, U32 time, U32 amount);
|
||||
// static void registerQueue(U32 name, U32 time, U32 amount);
|
||||
static void setRegisteredQueueTime(U32 name, U32 time);
|
||||
static void setRegisteredQueueAmount(U32 name,U32 amount);
|
||||
static void setAllQueueTimes(U32 amount);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<array>
|
||||
|
||||
<map>
|
||||
<key>default_grids_version</key><string>20</string>
|
||||
<key>default_grids_version</key><string>21</string>
|
||||
</map>
|
||||
|
||||
<!-- Second Life -->
|
||||
@@ -38,6 +38,23 @@
|
||||
<key>auto_update</key><boolean>0</boolean>
|
||||
</map>
|
||||
|
||||
<!-- OSGrid -->
|
||||
<map>
|
||||
<key>auto_update</key> <boolean>0</boolean>
|
||||
<key>gridname</key> <string>OSGrid</string>
|
||||
<key>gridnick</key> <string>osgrid</string>
|
||||
<key>helperuri</key> <string>http://helper.osgrid.org/</string>
|
||||
<key>inventory_links</key> <boolean>0</boolean>
|
||||
<key>loginpage</key> <string>http://www.osgrid.org/splash/</string>
|
||||
<key>loginuri</key> <string>http://login.osgrid.org/</string>
|
||||
<key>password</key> <string>http://www.osgrid.org/</string>
|
||||
<key>platform</key> <string>OpenSim</string>
|
||||
<key>register</key> <string>http://www.osgrid.org/</string>
|
||||
<key>render_compat</key> <boolean>1</boolean>
|
||||
<key>search</key> <string />
|
||||
<key>support</key> <string>http://www.osgrid.org/</string>
|
||||
<key>website</key> <string>http://www.osgrid.org/</string>
|
||||
</map>
|
||||
|
||||
<!-- Local Host -->
|
||||
<map>
|
||||
|
||||
@@ -8,6 +8,41 @@
|
||||
<string>settings_sh.xml</string>
|
||||
<string>settings_rlv.xml</string>
|
||||
</array>
|
||||
|
||||
<key>SGAllowRiggedMeshSelection</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allow selection of your worn rigged meshes in build mode</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>SGShiftCrouchToggle</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allow crouch toggle by holding shift</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SGServerVersionChangedNotification</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Notify when going to a simulator of different version</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<key>SianaRenderDeferredInvisiprim</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -905,6 +940,17 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AntiSpamEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>When false, antispam, not relating to dialog blocking, will be turned off.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AntiSpamFriendshipOffers</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -996,7 +1042,7 @@
|
||||
<key>_NACL_AntiSpamGlobalQueue</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Collect spamtypes together, instead of individually counting them</string>
|
||||
<string>Collect spamtypes together, instead of individually counting them; Use in cases of extreme spam, only.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -1007,7 +1053,7 @@
|
||||
<key>_NACL_AntiSpamTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Time in seconds for spamtype to accumulate the _NACL_AntiSpamAmount and be blocked</string>
|
||||
<string>Time in seconds for spamtype to accumulate to more than _NACL_AntiSpamAmount and be blocked</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -1018,7 +1064,7 @@
|
||||
<key>_NACL_AntiSpamAmount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Amount of spamtype to be reached before the blocking will occur.</string>
|
||||
<string>Count of spamtype to be reached during _NACL_AntiSpamTime before the spam blocking will occur.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
@@ -1029,35 +1075,35 @@
|
||||
<key>_NACL_AntiSpamSoundMulti</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string> </string>
|
||||
<string>Multiplier for _NACL_AntiSpamTime for sounds heard in _NACL_AntiSpamTime interval needed to trigger a block, since sounds are more common than messages</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>20</integer>
|
||||
<integer>100</integer>
|
||||
</map>
|
||||
<key>_NACL_AntiSpamNewlines</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>How many newlines a message can have before it's considered spam.</string>
|
||||
<string>How many newlines a message is allowed to have without being considered spam.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>20</integer>
|
||||
<integer>70</integer>
|
||||
</map>
|
||||
<key>_NACL_AntiSpamSoundPreloadMulti</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string> </string>
|
||||
<string>Multiplier for _NACL_AntiSpamTime for sounds preloaded in _NACL_AntiSpamTime interval needed to trigger a block, since sound preloads are more common than messages</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>20</integer>
|
||||
<integer>100</integer>
|
||||
</map>
|
||||
<!-- Vanilla SL settings that are now optionally Account-Specific -->
|
||||
<key>AgentChatColor</key>
|
||||
@@ -11973,7 +12019,7 @@
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>32</integer>
|
||||
<integer>128</integer>
|
||||
</map>
|
||||
<key>RunBtnState</key>
|
||||
<map>
|
||||
|
||||
@@ -3,6 +3,20 @@
|
||||
<map>
|
||||
<!-- Ascent's Optionally Account-Specific Settings -->
|
||||
|
||||
<key>SGDetachBridge</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Force detach phoenix, firestorm, whatever bridge may be there on attachment point 127</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<key>IsCOA</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
|
||||
<key>SGDisableChatAnimation</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
#ifdef DEFINE_GL_FRAGCOLOR
|
||||
out vec4 gl_FragColor;
|
||||
out vec4 frag_color;
|
||||
#else
|
||||
#define frag_color gl_FragColor
|
||||
#endif
|
||||
|
||||
uniform sampler2DRect tex0;
|
||||
@@ -18,6 +20,6 @@ VARYING vec2 vary_texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 color = pow(floor(pow(vec3(texture2D(tex0, vary_texcoord0.st)),vec3(.6)) * layerCount)/layerCount,vec3(1.66666));
|
||||
gl_FragColor = vec4(color, 1.0);
|
||||
vec3 color = pow(floor(pow(vec3(texture2DRect(tex0, vary_texcoord0.st)),vec3(.6)) * layerCount)/layerCount,vec3(1.66666));
|
||||
frag_color = vec4(color, 1.0);
|
||||
}
|
||||
|
||||
@@ -8,9 +8,12 @@
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
#ifdef DEFINE_GL_FRAGCOLOR
|
||||
out vec4 gl_FragColor;
|
||||
out vec4 frag_color;
|
||||
#else
|
||||
#define frag_color gl_FragColor
|
||||
#endif
|
||||
|
||||
|
||||
uniform sampler2DRect tex0;
|
||||
uniform float brightness;
|
||||
uniform float contrast;
|
||||
@@ -38,5 +41,5 @@ void main(void)
|
||||
/// Modulate saturation
|
||||
color = mix(vec3(dot(color, lumWeights)), color, saturation);
|
||||
|
||||
gl_FragColor = vec4(color, 1.0);
|
||||
frag_color = vec4(color, 1.0);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
#ifdef DEFINE_GL_FRAGCOLOR
|
||||
out vec4 gl_FragColor;
|
||||
out vec4 frag_color;
|
||||
#else
|
||||
#define frag_color gl_FragColor
|
||||
#endif
|
||||
|
||||
uniform sampler2DRect tex0;
|
||||
@@ -31,5 +33,5 @@ void main(void)
|
||||
color += weight.z * vec3(texture2DRect(tex0, vec2(vary_texcoord0.s,vary_texcoord0.t+offset.t)));
|
||||
color += weight.z * vec3(texture2DRect(tex0, vec2(vary_texcoord0.s,vary_texcoord0.t-offset.t)));
|
||||
}
|
||||
gl_FragColor = vec4(color.xyz,1.0);
|
||||
}
|
||||
frag_color = vec4(color.xyz,1.0);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
#ifdef DEFINE_GL_FRAGCOLOR
|
||||
out vec4 gl_FragColor;
|
||||
out vec4 frag_color;
|
||||
#else
|
||||
#define frag_color gl_FragColor
|
||||
#endif
|
||||
|
||||
uniform sampler2DRect tex0;
|
||||
@@ -48,5 +50,5 @@ void main(void)
|
||||
|
||||
outColor += noiseValue;
|
||||
|
||||
gl_FragColor = vec4(outColor, 1.0);
|
||||
frag_color = vec4(outColor, 1.0);
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
ATTRIBUTE int texture_index;
|
||||
ATTRIBUTE ivec4 texture_index;
|
||||
|
||||
VARYING_FLAT int vary_texture_index;
|
||||
VARYING_FLAT ivec4 vary_texture_index;
|
||||
|
||||
void passTextureIndex()
|
||||
{
|
||||
|
||||
@@ -1,141 +1,141 @@
|
||||
<llsd>
|
||||
<map>
|
||||
<key>ambient</key>
|
||||
<array>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
</array>
|
||||
<key>blue_density</key>
|
||||
<array>
|
||||
<real>2</real>
|
||||
<real>2</real>
|
||||
<real>2</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>blue_horizon</key>
|
||||
<array>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
</array>
|
||||
<key>cloud_color</key>
|
||||
<array>
|
||||
<real>0.2113494873046875</real>
|
||||
<real>0.22654294967651367</real>
|
||||
<real>0.2339630126953125</real>
|
||||
<real>0.2339630126953125</real>
|
||||
</array>
|
||||
<key>cloud_pos_density1</key>
|
||||
<array>
|
||||
<real>1.6884100437164307</real>
|
||||
<real>0.52609699964523315</real>
|
||||
<real>1</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>cloud_pos_density2</key>
|
||||
<array>
|
||||
<real>1.6884100437164307</real>
|
||||
<real>0.52609699964523315</real>
|
||||
<real>0.125</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>cloud_scale</key>
|
||||
<array>
|
||||
<real>0.18000000715255737</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>cloud_scroll_rate</key>
|
||||
<array>
|
||||
<real>10.199999809265137</real>
|
||||
<real>10.01099967956543</real>
|
||||
</array>
|
||||
<key>cloud_shadow</key>
|
||||
<array>
|
||||
<real>0.28999999165534973</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>density_multiplier</key>
|
||||
<array>
|
||||
<real>0.00011000000085914508</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>distance_multiplier</key>
|
||||
<array>
|
||||
<real>100</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>east_angle</key>
|
||||
<real>0</real>
|
||||
<key>enable_cloud_scroll</key>
|
||||
<array>
|
||||
<boolean>1</boolean>
|
||||
<boolean>1</boolean>
|
||||
</array>
|
||||
<key>gamma</key>
|
||||
<array>
|
||||
<real>0.070000000298023224</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>glow</key>
|
||||
<array>
|
||||
<real>20</real>
|
||||
<real>0.0010000000474974513</real>
|
||||
<real>-0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>haze_density</key>
|
||||
<array>
|
||||
<real>4</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>haze_horizon</key>
|
||||
<array>
|
||||
<real>0</real>
|
||||
<real>0.19915600121021271</real>
|
||||
<real>0.19915600121021271</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>lightnorm</key>
|
||||
<array>
|
||||
<real>-0</real>
|
||||
<real>0.85491091012954712</real>
|
||||
<real>0.51877486705780029</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>max_y</key>
|
||||
<array>
|
||||
<real>240</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>preset_num</key>
|
||||
<integer>22</integer>
|
||||
<key>star_brightness</key>
|
||||
<real>1.4800000190734863</real>
|
||||
<key>sun_angle</key>
|
||||
<real>4.1669716835021973</real>
|
||||
<key>sunlight_color</key>
|
||||
<array>
|
||||
<real>0.7084808349609375</real>
|
||||
<real>0.8618316650390625</real>
|
||||
<real>0.83307838439941406</real>
|
||||
<real>0.2872772216796875</real>
|
||||
</array>
|
||||
</map>
|
||||
</llsd>
|
||||
<llsd>
|
||||
<map>
|
||||
<key>ambient</key>
|
||||
<array>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
</array>
|
||||
<key>blue_density</key>
|
||||
<array>
|
||||
<real>2</real>
|
||||
<real>2</real>
|
||||
<real>2</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>blue_horizon</key>
|
||||
<array>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
</array>
|
||||
<key>cloud_color</key>
|
||||
<array>
|
||||
<real>0.2113494873046875</real>
|
||||
<real>0.22654294967651367</real>
|
||||
<real>0.2339630126953125</real>
|
||||
<real>0.2339630126953125</real>
|
||||
</array>
|
||||
<key>cloud_pos_density1</key>
|
||||
<array>
|
||||
<real>1.6884100437164307</real>
|
||||
<real>0.52609699964523315</real>
|
||||
<real>1</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>cloud_pos_density2</key>
|
||||
<array>
|
||||
<real>1.6884100437164307</real>
|
||||
<real>0.52609699964523315</real>
|
||||
<real>0.125</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>cloud_scale</key>
|
||||
<array>
|
||||
<real>0.18000000715255737</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>cloud_scroll_rate</key>
|
||||
<array>
|
||||
<real>10.199999809265137</real>
|
||||
<real>10.01099967956543</real>
|
||||
</array>
|
||||
<key>cloud_shadow</key>
|
||||
<array>
|
||||
<real>0.28999999165534973</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>density_multiplier</key>
|
||||
<array>
|
||||
<real>0.00011000000085914508</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>distance_multiplier</key>
|
||||
<array>
|
||||
<real>100</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>east_angle</key>
|
||||
<real>0</real>
|
||||
<key>enable_cloud_scroll</key>
|
||||
<array>
|
||||
<boolean>1</boolean>
|
||||
<boolean>1</boolean>
|
||||
</array>
|
||||
<key>gamma</key>
|
||||
<array>
|
||||
<real>0.070000000298023224</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>glow</key>
|
||||
<array>
|
||||
<real>20</real>
|
||||
<real>0.0010000000474974513</real>
|
||||
<real>-0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>haze_density</key>
|
||||
<array>
|
||||
<real>4</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>haze_horizon</key>
|
||||
<array>
|
||||
<real>0</real>
|
||||
<real>0.19915600121021271</real>
|
||||
<real>0.19915600121021271</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>lightnorm</key>
|
||||
<array>
|
||||
<real>-0</real>
|
||||
<real>0.85491091012954712</real>
|
||||
<real>0.51877486705780029</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>max_y</key>
|
||||
<array>
|
||||
<real>240</real>
|
||||
<real>0</real>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>preset_num</key>
|
||||
<integer>22</integer>
|
||||
<key>star_brightness</key>
|
||||
<real>1.4800000190734863</real>
|
||||
<key>sun_angle</key>
|
||||
<real>4.1669716835021973</real>
|
||||
<key>sunlight_color</key>
|
||||
<array>
|
||||
<real>0.7084808349609375</real>
|
||||
<real>0.8618316650390625</real>
|
||||
<real>0.83307838439941406</real>
|
||||
<real>0.2872772216796875</real>
|
||||
</array>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
@@ -1,77 +1,77 @@
|
||||
- Orac - Black fog 1
|
||||
- Orac - Black fog 2
|
||||
- Orac - Drawing blue
|
||||
- Orac - Drawing extreme
|
||||
- Orac - Drawing green
|
||||
- Orac - Drawing red
|
||||
- Orac - Drawing underground comic
|
||||
- Orac - fog
|
||||
- Orac - gray
|
||||
- Orac - green
|
||||
AnaLu - outdoor city night
|
||||
AnaLutetia - AvatarOpt(2)
|
||||
AnaLutetia - AvatarOpt2 whiter
|
||||
AnaLutetia - outdoor
|
||||
AnaLutetia - Studio Light
|
||||
AnaLutetia - STUDIO2
|
||||
AnaLutetia - STUDIO3
|
||||
AnaLutetia-default
|
||||
AnaLutetia-outdoor2(2)
|
||||
AnaLutetia
|
||||
B5-ShadowDancing
|
||||
CB'%s %Rouge 1
|
||||
CB'%s %Rouge 2
|
||||
CB'%s %Rouge 3
|
||||
CB'%s %Rouge 4
|
||||
CB'%s %Rouge 5
|
||||
CB'%s %Rouge 6
|
||||
Fairy blue (Paulina)
|
||||
Fairy dark blue (Paulina)
|
||||
Fairy light pink (Paulina)
|
||||
Fairy warm pinks (Paulina)
|
||||
PaperSnow
|
||||
Places Abracadabra
|
||||
Places Abracadabra2
|
||||
Places Abracadabra3
|
||||
Places alirium
|
||||
Places Annamaria
|
||||
Places Astryls Wild
|
||||
Places Babbage
|
||||
Places Beach Cay Surreal
|
||||
Places Beach Cay
|
||||
Places Bentham
|
||||
Places Cornfield
|
||||
Places Cromac
|
||||
Places Crucible
|
||||
Places District8
|
||||
Places Duskwood
|
||||
Places Eridu
|
||||
Places Erie
|
||||
Places Eugene 2
|
||||
Places Eugene BL
|
||||
Places Greed
|
||||
Places Greed2
|
||||
Places Imagine
|
||||
Places Kingsport
|
||||
Places Kunming
|
||||
Places Las Legunas
|
||||
Places Legacies
|
||||
Places Midian
|
||||
Places Mother
|
||||
Places Old New York
|
||||
Places Paris 2
|
||||
Places Paris
|
||||
Places Pathfinder
|
||||
Places Sand
|
||||
Places Terre Des Mortes
|
||||
Places Urbania
|
||||
Places Wiccan
|
||||
Places-Embryo
|
||||
StrawberrySingh.com - Closeups
|
||||
Sunset Pink (Paulina)
|
||||
Surreal - Brazil (Paulina)
|
||||
Surreal - Fire (Paulina)
|
||||
Surreal - Flirt (Paulina)
|
||||
Surreal - Night (Paulina)
|
||||
Surreal - Summer (Paulina)
|
||||
- Orac - Black fog 1
|
||||
- Orac - Black fog 2
|
||||
- Orac - Drawing blue
|
||||
- Orac - Drawing extreme
|
||||
- Orac - Drawing green
|
||||
- Orac - Drawing red
|
||||
- Orac - Drawing underground comic
|
||||
- Orac - fog
|
||||
- Orac - gray
|
||||
- Orac - green
|
||||
AnaLu - outdoor city night
|
||||
AnaLutetia - AvatarOpt(2)
|
||||
AnaLutetia - AvatarOpt2 whiter
|
||||
AnaLutetia - outdoor
|
||||
AnaLutetia - Studio Light
|
||||
AnaLutetia - STUDIO2
|
||||
AnaLutetia - STUDIO3
|
||||
AnaLutetia-default
|
||||
AnaLutetia-outdoor2(2)
|
||||
AnaLutetia
|
||||
B5-ShadowDancing
|
||||
CB'%s %Rouge 1
|
||||
CB'%s %Rouge 2
|
||||
CB'%s %Rouge 3
|
||||
CB'%s %Rouge 4
|
||||
CB'%s %Rouge 5
|
||||
CB'%s %Rouge 6
|
||||
Fairy blue (Paulina)
|
||||
Fairy dark blue (Paulina)
|
||||
Fairy light pink (Paulina)
|
||||
Fairy warm pinks (Paulina)
|
||||
PaperSnow
|
||||
Places Abracadabra
|
||||
Places Abracadabra2
|
||||
Places Abracadabra3
|
||||
Places alirium
|
||||
Places Annamaria
|
||||
Places Astryls Wild
|
||||
Places Babbage
|
||||
Places Beach Cay Surreal
|
||||
Places Beach Cay
|
||||
Places Bentham
|
||||
Places Cornfield
|
||||
Places Cromac
|
||||
Places Crucible
|
||||
Places District8
|
||||
Places Duskwood
|
||||
Places Eridu
|
||||
Places Erie
|
||||
Places Eugene 2
|
||||
Places Eugene BL
|
||||
Places Greed
|
||||
Places Greed2
|
||||
Places Imagine
|
||||
Places Kingsport
|
||||
Places Kunming
|
||||
Places Las Legunas
|
||||
Places Legacies
|
||||
Places Midian
|
||||
Places Mother
|
||||
Places Old New York
|
||||
Places Paris 2
|
||||
Places Paris
|
||||
Places Pathfinder
|
||||
Places Sand
|
||||
Places Terre Des Mortes
|
||||
Places Urbania
|
||||
Places Wiccan
|
||||
Places-Embryo
|
||||
StrawberrySingh.com - Closeups
|
||||
Sunset Pink (Paulina)
|
||||
Surreal - Brazil (Paulina)
|
||||
Surreal - Fire (Paulina)
|
||||
Surreal - Flirt (Paulina)
|
||||
Surreal - Night (Paulina)
|
||||
Surreal - Summer (Paulina)
|
||||
wastelands
|
||||
@@ -1,43 +1,43 @@
|
||||
<llsd>
|
||||
<map>
|
||||
<key>blurMultiplier</key>
|
||||
<real>0.13400000333786011</real>
|
||||
<key>fresnelOffset</key>
|
||||
<real>0.53999996185302734</real>
|
||||
<key>fresnelScale</key>
|
||||
<real>0.61000001430511475</real>
|
||||
<key>normScale</key>
|
||||
<array>
|
||||
<real>5.8000001907348633</real>
|
||||
<real>1.7000000476837158</real>
|
||||
<real>5.5</real>
|
||||
</array>
|
||||
<key>normalMap</key>
|
||||
<uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
|
||||
<key>scaleAbove</key>
|
||||
<real>0.079999998211860657</real>
|
||||
<key>scaleBelow</key>
|
||||
<real>0.39999997615814209</real>
|
||||
<key>underWaterFogMod</key>
|
||||
<real>1</real>
|
||||
<key>waterFogColor</key>
|
||||
<array>
|
||||
<real>0.019683837890625</real>
|
||||
<real>0.027191162109375</real>
|
||||
<real>0.027191162109375</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>waterFogDensity</key>
|
||||
<real>59.714115142822266</real>
|
||||
<key>wave1Dir</key>
|
||||
<array>
|
||||
<real>0.099999904632568359</real>
|
||||
<real>-0.3600001335144043</real>
|
||||
</array>
|
||||
<key>wave2Dir</key>
|
||||
<array>
|
||||
<real>0.099999904632568359</real>
|
||||
<real>-0.67000001668930054</real>
|
||||
</array>
|
||||
</map>
|
||||
</llsd>
|
||||
<llsd>
|
||||
<map>
|
||||
<key>blurMultiplier</key>
|
||||
<real>0.13400000333786011</real>
|
||||
<key>fresnelOffset</key>
|
||||
<real>0.53999996185302734</real>
|
||||
<key>fresnelScale</key>
|
||||
<real>0.61000001430511475</real>
|
||||
<key>normScale</key>
|
||||
<array>
|
||||
<real>5.8000001907348633</real>
|
||||
<real>1.7000000476837158</real>
|
||||
<real>5.5</real>
|
||||
</array>
|
||||
<key>normalMap</key>
|
||||
<uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
|
||||
<key>scaleAbove</key>
|
||||
<real>0.079999998211860657</real>
|
||||
<key>scaleBelow</key>
|
||||
<real>0.39999997615814209</real>
|
||||
<key>underWaterFogMod</key>
|
||||
<real>1</real>
|
||||
<key>waterFogColor</key>
|
||||
<array>
|
||||
<real>0.019683837890625</real>
|
||||
<real>0.027191162109375</real>
|
||||
<real>0.027191162109375</real>
|
||||
<real>1</real>
|
||||
</array>
|
||||
<key>waterFogDensity</key>
|
||||
<real>59.714115142822266</real>
|
||||
<key>wave1Dir</key>
|
||||
<array>
|
||||
<real>0.099999904632568359</real>
|
||||
<real>-0.3600001335144043</real>
|
||||
</array>
|
||||
<key>wave2Dir</key>
|
||||
<array>
|
||||
<real>0.099999904632568359</real>
|
||||
<real>-0.67000001668930054</real>
|
||||
</array>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
@@ -96,6 +96,7 @@ LLPrefsAscentChat::LLPrefsAscentChat()
|
||||
|
||||
childSetEnabled("reset_antispam", started);
|
||||
childSetCommitCallback("reset_antispam", onCommitResetAS, this);
|
||||
childSetCommitCallback("enable_as", onCommitEnableAS, this);
|
||||
childSetCommitCallback("antispam_checkbox", onCommitDialogBlock, this);
|
||||
|
||||
childSetCommitCallback("KeywordsOn", onCommitKeywords, this);
|
||||
@@ -250,6 +251,20 @@ void LLPrefsAscentChat::onCommitResetAS(LLUICtrl*, void*)
|
||||
NACLAntiSpamRegistry::purgeAllQueues();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentChat::onCommitEnableAS(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
LLPrefsAscentChat* self = (LLPrefsAscentChat*)user_data;
|
||||
bool enabled = ctrl->getValue().asBoolean();
|
||||
self->childSetEnabled("spammsg_checkbox", enabled);
|
||||
self->childSetEnabled("antispamtime", enabled);
|
||||
self->childSetEnabled("antispamamount", enabled);
|
||||
self->childSetEnabled("antispamsoundmulti", enabled);
|
||||
self->childSetEnabled("antispamsoundpreloadmulti", enabled);
|
||||
self->childSetEnabled("antispamnewlines", enabled);
|
||||
self->childSetEnabled("Notify On Spam", enabled);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentChat::onCommitDialogBlock(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
@@ -344,6 +359,7 @@ void LLPrefsAscentChat::refreshValues()
|
||||
mIMResponseText = gSavedPerAccountSettings.getString("AscentInstantMessageResponse");
|
||||
|
||||
//Spam --------------------------------------------------------------------------------
|
||||
mEnableAS = gSavedSettings.getBOOL("AntiSpamEnabled");
|
||||
mGlobalQueue = gSavedSettings.getBOOL("_NACL_AntiSpamGlobalQueue");
|
||||
mChatSpamCount = gSavedSettings.getU32("_NACL_AntiSpamAmount");
|
||||
mChatSpamTime = gSavedSettings.getU32("_NACL_AntiSpamTime");
|
||||
@@ -404,6 +420,15 @@ void LLPrefsAscentChat::refresh()
|
||||
childSetText("im_response", wstring_to_utf8str(auto_response));
|
||||
|
||||
//Antispam ------------------------------------------------------------------------
|
||||
// sensitivity tuners
|
||||
childSetEnabled("spammsg_checkbox", mEnableAS);
|
||||
childSetEnabled("antispamtime", mEnableAS);
|
||||
childSetEnabled("antispamamount", mEnableAS);
|
||||
childSetEnabled("antispamsoundmulti", mEnableAS);
|
||||
childSetEnabled("antispamsoundpreloadmulti", mEnableAS);
|
||||
childSetEnabled("antispamnewlines", mEnableAS);
|
||||
childSetEnabled("Notify On Spam", mEnableAS);
|
||||
// dialog blocking tuners
|
||||
childSetEnabled("Block All Dialogs From", !mBlockDialogSpam);
|
||||
childSetEnabled("Alerts", !mBlockDialogSpam);
|
||||
childSetEnabled("Friendship Offers", !mBlockDialogSpam);
|
||||
@@ -549,6 +574,7 @@ void LLPrefsAscentChat::cancel()
|
||||
gSavedPerAccountSettings.setString("AscentInstantMessageResponse", mIMResponseText);
|
||||
|
||||
//Spam --------------------------------------------------------------------------------
|
||||
gSavedSettings.setBOOL("AntiSpamEnabled", mEnableAS);
|
||||
gSavedSettings.setBOOL("_NACL_AntiSpamGlobalQueue", mGlobalQueue);
|
||||
gSavedSettings.setU32("_NACL_AntiSpamAmount", mChatSpamCount);
|
||||
gSavedSettings.setU32("_NACL_AntiSpamTime", mChatSpamTime);
|
||||
|
||||
@@ -57,6 +57,7 @@ protected:
|
||||
static void onCommitTimeDate(LLUICtrl* ctrl, void *userdata);
|
||||
static void onCommitAutoResponse(LLUICtrl* ctrl, void* user_data);
|
||||
static void onCommitResetAS(LLUICtrl*,void*);
|
||||
static void onCommitEnableAS(LLUICtrl*, void*);
|
||||
static void onCommitDialogBlock(LLUICtrl*, void*);
|
||||
static void onCommitKeywords(LLUICtrl* ctrl, void* user_data);
|
||||
|
||||
@@ -86,6 +87,7 @@ protected:
|
||||
std::string mIMResponseText;
|
||||
|
||||
//Spam --------------------------------------------------------------------------------
|
||||
BOOL mEnableAS;
|
||||
BOOL mGlobalQueue;
|
||||
U32 mChatSpamCount;
|
||||
U32 mChatSpamTime;
|
||||
|
||||
@@ -298,6 +298,7 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt");
|
||||
mShowLookAt = gSavedSettings.getBOOL("AscentShowLookAt");
|
||||
mQuietSnapshotsToDisk = gSavedSettings.getBOOL("QuietSnapshotsToDisk");
|
||||
mDetachBridge = gSavedSettings.getBOOL("SGDetachBridge");
|
||||
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
|
||||
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
|
||||
mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps");
|
||||
@@ -445,6 +446,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("PrivateLookAt", mPrivateLookAt);
|
||||
gSavedSettings.setBOOL("AscentShowLookAt", mShowLookAt);
|
||||
gSavedSettings.setBOOL("QuietSnapshotsToDisk", mQuietSnapshotsToDisk);
|
||||
gSavedSettings.setBOOL("SGDetachBridge", mDetachBridge);
|
||||
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
|
||||
gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit);
|
||||
gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps);
|
||||
|
||||
@@ -99,6 +99,7 @@ protected:
|
||||
BOOL mPrivateLookAt;
|
||||
BOOL mShowLookAt;
|
||||
BOOL mQuietSnapshotsToDisk;
|
||||
BOOL mDetachBridge;
|
||||
BOOL mRevokePermsOnStandUp;
|
||||
BOOL mDisableClickSit;
|
||||
BOOL mDisplayScriptJumps;
|
||||
|
||||
@@ -1,893 +0,0 @@
|
||||
/**
|
||||
* @file LLFloaterSculptPreview.cpp
|
||||
* @brief LLFloaterSculptPreview class implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2004-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 "floatersculptpreview.h"
|
||||
|
||||
#include "llimagebmp.h"
|
||||
#include "llimagetga.h"
|
||||
#include "llimagejpeg.h"
|
||||
#include "llimagepng.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcombobox.h"
|
||||
#include "lldrawable.h"
|
||||
#include "lldrawpoolavatar.h"
|
||||
#include "llrender.h"
|
||||
#include "llface.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llui.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "pipeline.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewershadermgr.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llstring.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
//static
|
||||
S32 LLFloaterSculptPreview::sUploadAmount = 10;
|
||||
|
||||
const S32 PREVIEW_BORDER_WIDTH = 2;
|
||||
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
|
||||
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
|
||||
const S32 PREF_BUTTON_HEIGHT = 0;
|
||||
const S32 PREVIEW_TEXTURE_HEIGHT = 512;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLFloaterSculptPreview()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLFloaterSculptPreview::LLFloaterSculptPreview(LLImageRaw* src) :
|
||||
//LLFloaterNameDesc(filename),
|
||||
mAvatarPreview(NULL),
|
||||
mSculptedPreview(NULL)
|
||||
{
|
||||
mLastMouseX = 0;
|
||||
mLastMouseY = 0;
|
||||
mImagep = NULL ;
|
||||
mRawImagep = src;
|
||||
}
|
||||
|
||||
LLFloaterSculptPreview* LLFloaterSculptPreview::show(LLImageRaw* src)
|
||||
{
|
||||
LLFloaterSculptPreview* floaterp = new LLFloaterSculptPreview(src);
|
||||
|
||||
llinfos << (floaterp->mRawImagep.notNull() ? "has raw image" : "no raw image") << llendl;
|
||||
//floaterp->loadImage(src);
|
||||
// Builds and adds to gFloaterView
|
||||
LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_sculpt_preview.xml");
|
||||
|
||||
gFloaterView->addChild(floaterp);
|
||||
floaterp->open(); /*Flawfinder: ignore*/
|
||||
|
||||
gFloaterView->adjustToFitScreen(floaterp, FALSE);
|
||||
|
||||
llinfos << "build and adjusted" << llendl;
|
||||
return floaterp;
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// postBuild()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLFloaterSculptPreview::postBuild()
|
||||
{
|
||||
childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount));
|
||||
|
||||
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
|
||||
if (iface)
|
||||
{
|
||||
iface->selectFirstItem();
|
||||
}
|
||||
childSetCommitCallback("clothing_type_combo", onPreviewTypeCommit, this);
|
||||
|
||||
mPreviewRect.set(PREVIEW_HPAD,
|
||||
PREVIEW_TEXTURE_HEIGHT,
|
||||
getRect().getWidth() - PREVIEW_HPAD,
|
||||
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
|
||||
|
||||
childHide("bad_image_text");
|
||||
|
||||
if (mRawImagep.notNull() && gAgent.getRegion() != NULL)
|
||||
{
|
||||
mAvatarPreview = new LLPreviewAvatar(256, 256);
|
||||
mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE);
|
||||
|
||||
mSculptedPreview = new LLPreviewSculpted(256, 256);
|
||||
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
|
||||
|
||||
if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)
|
||||
childEnable("lossless_check");
|
||||
|
||||
childSetValue("temp_check",FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
mAvatarPreview = NULL;
|
||||
mSculptedPreview = NULL;
|
||||
childShow("bad_image_text");
|
||||
childDisable("clothing_type_combo");
|
||||
childDisable("ok_btn");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLFloaterSculptPreview()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLFloaterSculptPreview::~LLFloaterSculptPreview()
|
||||
{
|
||||
clearAllPreviewTextures();
|
||||
|
||||
mRawImagep = NULL;
|
||||
mAvatarPreview = NULL;
|
||||
mSculptedPreview = NULL;
|
||||
|
||||
mImagep = NULL ;
|
||||
}
|
||||
|
||||
//static
|
||||
//-----------------------------------------------------------------------------
|
||||
// onPreviewTypeCommit()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLFloaterSculptPreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLFloaterSculptPreview *fp =(LLFloaterSculptPreview *)userdata;
|
||||
|
||||
if (!fp->mAvatarPreview || !fp->mSculptedPreview)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
S32 which_mode = 0;
|
||||
|
||||
LLCtrlSelectionInterface* iface = fp->childGetSelectionInterface("clothing_type_combo");
|
||||
if (iface)
|
||||
{
|
||||
which_mode = iface->getFirstSelectedIndex();
|
||||
}
|
||||
|
||||
switch(which_mode)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
fp->mAvatarPreview->setPreviewTarget("mSkull", "mHairMesh0", fp->mRawImagep, 0.4f, FALSE);
|
||||
break;
|
||||
case 2:
|
||||
fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, FALSE);
|
||||
break;
|
||||
case 3:
|
||||
fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.0f, FALSE);
|
||||
break;
|
||||
case 4:
|
||||
fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, FALSE);
|
||||
break;
|
||||
case 5:
|
||||
fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, TRUE);
|
||||
break;
|
||||
case 6:
|
||||
fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.2f, TRUE);
|
||||
break;
|
||||
case 7:
|
||||
fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, TRUE);
|
||||
break;
|
||||
case 8:
|
||||
fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mSkirtMesh0", fp->mRawImagep, 1.3f, FALSE);
|
||||
break;
|
||||
case 9:
|
||||
fp->mSculptedPreview->setPreviewTarget(fp->mRawImagep, 2.0f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fp->mAvatarPreview->refresh();
|
||||
fp->mSculptedPreview->refresh();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// clearAllPreviewTextures()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLFloaterSculptPreview::clearAllPreviewTextures()
|
||||
{
|
||||
if (mAvatarPreview)
|
||||
{
|
||||
mAvatarPreview->clearPreviewTexture("mHairMesh0");
|
||||
mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0");
|
||||
mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0");
|
||||
mAvatarPreview->clearPreviewTexture("mHeadMesh0");
|
||||
mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0");
|
||||
mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0");
|
||||
mAvatarPreview->clearPreviewTexture("mSkirtMesh0");
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// draw()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLFloaterSculptPreview::draw()
|
||||
{
|
||||
LLFloater::draw();
|
||||
LLRect r = getRect();
|
||||
|
||||
if (mRawImagep.notNull())
|
||||
{
|
||||
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
|
||||
U32 selected = 0;
|
||||
if (iface)
|
||||
selected = iface->getFirstSelectedIndex();
|
||||
|
||||
if (selected <= 0)
|
||||
{
|
||||
gl_rect_2d_checkerboard(calcScreenRect(),mPreviewRect);
|
||||
LLGLDisable gls_alpha(GL_ALPHA_TEST);
|
||||
|
||||
if(mImagep.notNull())
|
||||
{
|
||||
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName());
|
||||
}
|
||||
else
|
||||
{
|
||||
mImagep = LLViewerTextureManager::getLocalTexture(mRawImagep.get(), FALSE) ;
|
||||
|
||||
gGL.getTexUnit(0)->unbind(mImagep->getTarget()) ;
|
||||
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName());
|
||||
stop_glerror();
|
||||
|
||||
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
|
||||
|
||||
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
if (mAvatarPreview)
|
||||
{
|
||||
mAvatarPreview->setTexture(mImagep->getTexName());
|
||||
mSculptedPreview->setTexture(mImagep->getTexName());
|
||||
}
|
||||
}
|
||||
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
gGL.begin( LLRender::QUADS );
|
||||
{
|
||||
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mBottom);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
}
|
||||
gGL.end();
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
stop_glerror();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((mAvatarPreview) && (mSculptedPreview))
|
||||
{
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
|
||||
if (selected == 9)
|
||||
{
|
||||
gGL.getTexUnit(0)->bind(mSculptedPreview);
|
||||
}
|
||||
else
|
||||
{
|
||||
gGL.getTexUnit(0)->bind(mAvatarPreview);
|
||||
}
|
||||
|
||||
gGL.begin( LLRender::QUADS );
|
||||
{
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
}
|
||||
gGL.end();
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// handleMouseDown()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLFloaterSculptPreview::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (mPreviewRect.pointInRect(x, y))
|
||||
{
|
||||
bringToFront( x, y );
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
gViewerWindow->hideCursor();
|
||||
mLastMouseX = x;
|
||||
mLastMouseY = y;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return LLFloater::handleMouseDown(x, y, mask);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// handleMouseUp()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLFloaterSculptPreview::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
gFocusMgr.setMouseCapture(FALSE);
|
||||
gViewerWindow->showCursor();
|
||||
return LLFloater::handleMouseUp(x, y, mask);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// handleHover()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLFloaterSculptPreview::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
MASK local_mask = mask & ~MASK_ALT;
|
||||
|
||||
if (mAvatarPreview && hasMouseCapture())
|
||||
{
|
||||
if (local_mask == MASK_PAN)
|
||||
{
|
||||
// pan here
|
||||
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
|
||||
if (iface && iface->getFirstSelectedIndex() <= 0)
|
||||
{
|
||||
mPreviewImageRect.translate((F32)(x - mLastMouseX) * -0.005f * mPreviewImageRect.getWidth(),
|
||||
(F32)(y - mLastMouseY) * -0.005f * mPreviewImageRect.getHeight());
|
||||
}
|
||||
else
|
||||
{
|
||||
mAvatarPreview->pan((F32)(x - mLastMouseX) * -0.005f, (F32)(y - mLastMouseY) * -0.005f);
|
||||
mSculptedPreview->pan((F32)(x - mLastMouseX) * -0.005f, (F32)(y - mLastMouseY) * -0.005f);
|
||||
}
|
||||
}
|
||||
else if (local_mask == MASK_ORBIT)
|
||||
{
|
||||
F32 yaw_radians = (F32)(x - mLastMouseX) * -0.01f;
|
||||
F32 pitch_radians = (F32)(y - mLastMouseY) * 0.02f;
|
||||
|
||||
mAvatarPreview->rotate(yaw_radians, pitch_radians);
|
||||
mSculptedPreview->rotate(yaw_radians, pitch_radians);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
|
||||
if (iface && iface->getFirstSelectedIndex() <= 0)
|
||||
{
|
||||
F32 zoom_amt = (F32)(y - mLastMouseY) * -0.002f;
|
||||
mPreviewImageRect.stretch(zoom_amt);
|
||||
}
|
||||
else
|
||||
{
|
||||
F32 yaw_radians = (F32)(x - mLastMouseX) * -0.01f;
|
||||
F32 zoom_amt = (F32)(y - mLastMouseY) * 0.02f;
|
||||
|
||||
mAvatarPreview->rotate(yaw_radians, 0.f);
|
||||
mAvatarPreview->zoom(zoom_amt);
|
||||
mSculptedPreview->rotate(yaw_radians, 0.f);
|
||||
mSculptedPreview->zoom(zoom_amt);
|
||||
}
|
||||
}
|
||||
|
||||
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
|
||||
if (iface && iface->getFirstSelectedIndex() <= 0)
|
||||
{
|
||||
if (mPreviewImageRect.getWidth() > 1.f)
|
||||
{
|
||||
mPreviewImageRect.stretch((1.f - mPreviewImageRect.getWidth()) * 0.5f);
|
||||
}
|
||||
else if (mPreviewImageRect.getWidth() < 0.1f)
|
||||
{
|
||||
mPreviewImageRect.stretch((0.1f - mPreviewImageRect.getWidth()) * 0.5f);
|
||||
}
|
||||
|
||||
if (mPreviewImageRect.getHeight() > 1.f)
|
||||
{
|
||||
mPreviewImageRect.stretch((1.f - mPreviewImageRect.getHeight()) * 0.5f);
|
||||
}
|
||||
else if (mPreviewImageRect.getHeight() < 0.1f)
|
||||
{
|
||||
mPreviewImageRect.stretch((0.1f - mPreviewImageRect.getHeight()) * 0.5f);
|
||||
}
|
||||
|
||||
if (mPreviewImageRect.mLeft < 0.f)
|
||||
{
|
||||
mPreviewImageRect.translate(-mPreviewImageRect.mLeft, 0.f);
|
||||
}
|
||||
else if (mPreviewImageRect.mRight > 1.f)
|
||||
{
|
||||
mPreviewImageRect.translate(1.f - mPreviewImageRect.mRight, 0.f);
|
||||
}
|
||||
|
||||
if (mPreviewImageRect.mBottom < 0.f)
|
||||
{
|
||||
mPreviewImageRect.translate(0.f, -mPreviewImageRect.mBottom);
|
||||
}
|
||||
else if (mPreviewImageRect.mTop > 1.f)
|
||||
{
|
||||
mPreviewImageRect.translate(0.f, 1.f - mPreviewImageRect.mTop);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mAvatarPreview->refresh();
|
||||
mSculptedPreview->refresh();
|
||||
}
|
||||
|
||||
LLUI::setMousePositionLocal(this, mLastMouseX, mLastMouseY);
|
||||
}
|
||||
|
||||
if (!mPreviewRect.pointInRect(x, y) || !mAvatarPreview || !mSculptedPreview)
|
||||
{
|
||||
return LLFloater::handleHover(x, y, mask);
|
||||
}
|
||||
else if (local_mask == MASK_ORBIT)
|
||||
{
|
||||
gViewerWindow->setCursor(UI_CURSOR_TOOLCAMERA);
|
||||
}
|
||||
else if (local_mask == MASK_PAN)
|
||||
{
|
||||
gViewerWindow->setCursor(UI_CURSOR_TOOLPAN);
|
||||
}
|
||||
else
|
||||
{
|
||||
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// handleScrollWheel()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLFloaterSculptPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
if (mPreviewRect.pointInRect(x, y) && mAvatarPreview)
|
||||
{
|
||||
mAvatarPreview->zoom((F32)clicks * -0.2f);
|
||||
mAvatarPreview->refresh();
|
||||
|
||||
mSculptedPreview->zoom((F32)clicks * -0.2f);
|
||||
mSculptedPreview->refresh();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// onMouseCaptureLost()
|
||||
//-----------------------------------------------------------------------------
|
||||
// static
|
||||
void LLFloaterSculptPreview::onMouseCaptureLostImagePreview(LLMouseHandler* handler)
|
||||
{
|
||||
gViewerWindow->showCursor();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPreviewAvatar
|
||||
//-----------------------------------------------------------------------------
|
||||
LLPreviewAvatar::LLPreviewAvatar(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
|
||||
{
|
||||
mNeedsUpdate = TRUE;
|
||||
mTargetJoint = NULL;
|
||||
mTargetMesh = NULL;
|
||||
mCameraDistance = 0.f;
|
||||
mCameraYaw = 0.f;
|
||||
mCameraPitch = 0.f;
|
||||
mCameraZoom = 1.f;
|
||||
|
||||
mDummyAvatar = (LLVOAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion());
|
||||
mDummyAvatar->createDrawable(&gPipeline);
|
||||
mDummyAvatar->mIsDummy = TRUE;
|
||||
mDummyAvatar->mSpecialRenderMode = 2;
|
||||
mDummyAvatar->setPositionAgent(LLVector3::zero);
|
||||
mDummyAvatar->slamPosition();
|
||||
mDummyAvatar->updateJointLODs();
|
||||
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
|
||||
// gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
|
||||
|
||||
mTextureName = 0;
|
||||
}
|
||||
|
||||
|
||||
LLPreviewAvatar::~LLPreviewAvatar()
|
||||
{
|
||||
mDummyAvatar->markDead();
|
||||
}
|
||||
|
||||
|
||||
void LLPreviewAvatar::setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male)
|
||||
{
|
||||
mTargetJoint = mDummyAvatar->mRoot.findJoint(joint_name);
|
||||
// clear out existing test mesh
|
||||
if (mTargetMesh)
|
||||
{
|
||||
mTargetMesh->setTestTexture(0);
|
||||
}
|
||||
|
||||
if (male)
|
||||
{
|
||||
mDummyAvatar->setVisualParamWeight( "male", 1.f );
|
||||
mDummyAvatar->updateVisualParams();
|
||||
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
|
||||
}
|
||||
else
|
||||
{
|
||||
mDummyAvatar->setVisualParamWeight( "male", 0.f );
|
||||
mDummyAvatar->updateVisualParams();
|
||||
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
|
||||
}
|
||||
mDummyAvatar->mRoot.setVisible(FALSE, TRUE);
|
||||
|
||||
mTargetMesh = (LLViewerJointMesh*)mDummyAvatar->mRoot.findJoint(mesh_name);
|
||||
mTargetMesh->setTestTexture(mTextureName);
|
||||
mTargetMesh->setVisible(TRUE, FALSE);
|
||||
mCameraDistance = distance;
|
||||
mCameraZoom = 1.f;
|
||||
mCameraPitch = 0.f;
|
||||
mCameraYaw = 0.f;
|
||||
mCameraOffset.clearVec();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// clearPreviewTexture()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPreviewAvatar::clearPreviewTexture(const std::string& mesh_name)
|
||||
{
|
||||
if (mDummyAvatar)
|
||||
{
|
||||
LLViewerJointMesh *mesh = (LLViewerJointMesh*)mDummyAvatar->mRoot.findJoint(mesh_name);
|
||||
// clear out existing test mesh
|
||||
if (mesh)
|
||||
{
|
||||
mesh->setTestTexture(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// update()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLPreviewAvatar::render()
|
||||
{
|
||||
mNeedsUpdate = FALSE;
|
||||
LLVOAvatar* avatarp = mDummyAvatar;
|
||||
|
||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.pushMatrix();
|
||||
gGL.loadIdentity();
|
||||
gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
gGL.loadIdentity();
|
||||
|
||||
LLGLSUIDefault def;
|
||||
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
|
||||
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
gUIProgram.bind();
|
||||
}
|
||||
|
||||
gl_rect_2d_simple( mFullWidth, mFullHeight );
|
||||
|
||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.popMatrix();
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.popMatrix();
|
||||
|
||||
gGL.flush();
|
||||
LLVector3 target_pos = mTargetJoint->getWorldPosition();
|
||||
|
||||
LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) *
|
||||
LLQuaternion(mCameraYaw, LLVector3::z_axis);
|
||||
|
||||
LLQuaternion av_rot = avatarp->mPelvisp->getWorldRotation() * camera_rot;
|
||||
LLViewerCamera::getInstance()->setOriginAndLookAt(
|
||||
target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera
|
||||
LLVector3::z_axis, // up
|
||||
target_pos + (mCameraOffset * av_rot) ); // point of interest
|
||||
|
||||
stop_glerror();
|
||||
|
||||
LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / mFullHeight);
|
||||
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
|
||||
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
avatarp->updateLOD();
|
||||
|
||||
|
||||
if (avatarp->mDrawable.notNull())
|
||||
{
|
||||
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE);
|
||||
// make sure alpha=0 shows avatar material color
|
||||
LLGLDisable no_blend(GL_BLEND);
|
||||
|
||||
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
|
||||
gPipeline.enableLightsPreview();
|
||||
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
|
||||
}
|
||||
|
||||
gGL.color4f(1,1,1,1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// refresh()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPreviewAvatar::refresh()
|
||||
{
|
||||
mNeedsUpdate = TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// rotate()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPreviewAvatar::rotate(F32 yaw_radians, F32 pitch_radians)
|
||||
{
|
||||
mCameraYaw = mCameraYaw + yaw_radians;
|
||||
|
||||
mCameraPitch = llclamp(mCameraPitch + pitch_radians, -0.95f * F_PI_BY_TWO, 0.95f * F_PI_BY_TWO);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// zoom()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPreviewAvatar::zoom(F32 zoom_amt)
|
||||
{
|
||||
mCameraZoom = llclamp(mCameraZoom + zoom_amt, 0.5f, 20.f);
|
||||
}
|
||||
|
||||
void LLPreviewAvatar::pan(F32 right, F32 up)
|
||||
{
|
||||
mCameraOffset.mV[VY] = llclamp(mCameraOffset.mV[VY] + right * mCameraDistance / mCameraZoom, -1.f, 1.f);
|
||||
mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f);
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPreviewSculpted
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
LLPreviewSculpted::LLPreviewSculpted(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
|
||||
{
|
||||
mNeedsUpdate = TRUE;
|
||||
mCameraDistance = 0.f;
|
||||
mCameraYaw = 0.f;
|
||||
mCameraPitch = 0.f;
|
||||
mCameraZoom = 1.f;
|
||||
mTextureName = 0;
|
||||
|
||||
LLVolumeParams volume_params;
|
||||
volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE);
|
||||
volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_SPHERE);
|
||||
|
||||
F32 const HIGHEST_LOD = 4.0f;
|
||||
mVolume = new LLVolume(volume_params, HIGHEST_LOD);
|
||||
}
|
||||
|
||||
|
||||
LLPreviewSculpted::~LLPreviewSculpted()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void LLPreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
|
||||
{
|
||||
mCameraDistance = distance;
|
||||
mCameraZoom = 1.f;
|
||||
mCameraPitch = 0.f;
|
||||
mCameraYaw = 0.f;
|
||||
mCameraOffset.clearVec();
|
||||
|
||||
if (imagep)
|
||||
{
|
||||
mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0);
|
||||
}
|
||||
|
||||
const LLVolumeFace &vf = mVolume->getVolumeFace(0);
|
||||
U32 num_indices = vf.mNumIndices;
|
||||
U32 num_vertices = vf.mNumVertices;
|
||||
|
||||
mVertexBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0, 0);
|
||||
mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE);
|
||||
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
LLStrider<LLVector3> normal_strider;
|
||||
LLStrider<LLVector2> tc_strider;
|
||||
LLStrider<U16> index_strider;
|
||||
|
||||
mVertexBuffer->getVertexStrider(vertex_strider);
|
||||
mVertexBuffer->getNormalStrider(normal_strider);
|
||||
mVertexBuffer->getTexCoord0Strider(tc_strider);
|
||||
mVertexBuffer->getIndexStrider(index_strider);
|
||||
|
||||
// build vertices and normals
|
||||
LLStrider<LLVector3> pos;
|
||||
pos = (LLVector3*) vf.mPositions; pos.setStride(16);
|
||||
LLStrider<LLVector3> norm;
|
||||
norm = (LLVector3*) vf.mNormals; norm.setStride(16);
|
||||
LLStrider<LLVector2> tc;
|
||||
tc = (LLVector2*) vf.mTexCoords; tc.setStride(8);
|
||||
for (U32 i = 0; (S32)i < num_vertices; i++)
|
||||
{
|
||||
*(vertex_strider++) = *pos++;
|
||||
LLVector3 normal = *norm++;
|
||||
normal.normalize();
|
||||
*(normal_strider++) = normal;
|
||||
*(tc_strider++) = *tc++;
|
||||
}
|
||||
|
||||
// build indices
|
||||
for (U16 i = 0; i < num_indices; i++)
|
||||
{
|
||||
*(index_strider++) = vf.mIndices[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// render()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLPreviewSculpted::render()
|
||||
{
|
||||
mNeedsUpdate = FALSE;
|
||||
|
||||
LLGLSUIDefault def;
|
||||
LLGLDisable no_blend(GL_BLEND);
|
||||
LLGLEnable cull(GL_CULL_FACE);
|
||||
LLGLDepthTest depth(GL_TRUE);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.pushMatrix();
|
||||
gGL.loadIdentity();
|
||||
gGL.ortho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
gGL.loadIdentity();
|
||||
|
||||
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
|
||||
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
gUIProgram.bind();
|
||||
}
|
||||
|
||||
gl_rect_2d_simple( mFullWidth, mFullHeight );
|
||||
|
||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||
gGL.popMatrix();
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.popMatrix();
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
LLVector3 target_pos(0, 0, 0);
|
||||
|
||||
LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) *
|
||||
LLQuaternion(mCameraYaw, LLVector3::z_axis);
|
||||
|
||||
LLQuaternion av_rot = camera_rot;
|
||||
LLViewerCamera::getInstance()->setOriginAndLookAt(
|
||||
target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera
|
||||
LLVector3::z_axis, // up
|
||||
target_pos + (mCameraOffset * av_rot) ); // point of interest
|
||||
|
||||
stop_glerror();
|
||||
|
||||
LLViewerCamera::getInstance()->setAspect((F32) mFullWidth / mFullHeight);
|
||||
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
|
||||
LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
|
||||
|
||||
const LLVolumeFace &vf = mVolume->getVolumeFace(0);
|
||||
U32 num_indices = vf.mNumIndices;
|
||||
|
||||
gPipeline.enableLightsAvatar();
|
||||
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
gObjectPreviewProgram.bind();
|
||||
}
|
||||
gGL.pushMatrix();
|
||||
const F32 SCALE = 1.25f;
|
||||
gGL.scalef(SCALE, SCALE, SCALE);
|
||||
const F32 BRIGHTNESS = 0.9f;
|
||||
gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS);
|
||||
|
||||
mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0);
|
||||
mVertexBuffer->draw(LLRender::TRIANGLES, num_indices, 0);
|
||||
|
||||
gGL.popMatrix();
|
||||
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
gObjectPreviewProgram.unbind();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// refresh()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPreviewSculpted::refresh()
|
||||
{
|
||||
mNeedsUpdate = TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// rotate()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPreviewSculpted::rotate(F32 yaw_radians, F32 pitch_radians)
|
||||
{
|
||||
mCameraYaw = mCameraYaw + yaw_radians;
|
||||
|
||||
mCameraPitch = llclamp(mCameraPitch + pitch_radians, -0.95f * F_PI_BY_TWO, 0.95f * F_PI_BY_TWO);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// zoom()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPreviewSculpted::zoom(F32 zoom_amt)
|
||||
{
|
||||
mCameraZoom = llclamp(mCameraZoom + zoom_amt, 0.5f, 20.f);
|
||||
}
|
||||
|
||||
void LLPreviewSculpted::pan(F32 right, F32 up)
|
||||
{
|
||||
mCameraOffset.mV[VY] = llclamp(mCameraOffset.mV[VY] + right * mCameraDistance / mCameraZoom, -1.f, 1.f);
|
||||
mCameraOffset.mV[VZ] = llclamp(mCameraOffset.mV[VZ] + up * mCameraDistance / mCameraZoom, -1.f, 1.f);
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
/**
|
||||
* @file LLFloaterSculptPreview.h
|
||||
* @brief LLFloaterSculptPreview class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2004-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$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFloaterSculptPreview_H
|
||||
#define LL_LLFloaterSculptPreview_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llresizehandle.h"
|
||||
#include "lldynamictexture.h"
|
||||
#include "llquaternion.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
||||
class LLComboBox;
|
||||
class LLJoint;
|
||||
class LLViewerJointMesh;
|
||||
class LLVOAvatar;
|
||||
class LLTextBox;
|
||||
class LLVertexBuffer;
|
||||
|
||||
class LLPreviewSculpted : public LLViewerDynamicTexture
|
||||
{
|
||||
public:
|
||||
LLPreviewSculpted(S32 width, S32 height);
|
||||
virtual ~LLPreviewSculpted();
|
||||
|
||||
void setPreviewTarget(LLImageRaw *imagep, F32 distance);
|
||||
void setTexture(U32 name) { mTextureName = name; }
|
||||
|
||||
BOOL render();
|
||||
void refresh();
|
||||
void rotate(F32 yaw_radians, F32 pitch_radians);
|
||||
void zoom(F32 zoom_amt);
|
||||
void pan(F32 right, F32 up);
|
||||
virtual BOOL needsRender() { return mNeedsUpdate; }
|
||||
|
||||
protected:
|
||||
BOOL mNeedsUpdate;
|
||||
U32 mTextureName;
|
||||
F32 mCameraDistance;
|
||||
F32 mCameraYaw;
|
||||
F32 mCameraPitch;
|
||||
F32 mCameraZoom;
|
||||
LLVector3 mCameraOffset;
|
||||
LLPointer<LLVolume> mVolume;
|
||||
LLPointer<LLVertexBuffer> mVertexBuffer;
|
||||
};
|
||||
|
||||
|
||||
class LLPreviewAvatar : public LLViewerDynamicTexture
|
||||
{
|
||||
public:
|
||||
LLPreviewAvatar(S32 width, S32 height);
|
||||
virtual ~LLPreviewAvatar();
|
||||
|
||||
void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male);
|
||||
void setTexture(U32 name) { mTextureName = name; }
|
||||
void clearPreviewTexture(const std::string& mesh_name);
|
||||
|
||||
BOOL render();
|
||||
void refresh();
|
||||
void rotate(F32 yaw_radians, F32 pitch_radians);
|
||||
void zoom(F32 zoom_amt);
|
||||
void pan(F32 right, F32 up);
|
||||
virtual BOOL needsRender() { return mNeedsUpdate; }
|
||||
|
||||
protected:
|
||||
BOOL mNeedsUpdate;
|
||||
LLJoint* mTargetJoint;
|
||||
LLViewerJointMesh* mTargetMesh;
|
||||
F32 mCameraDistance;
|
||||
F32 mCameraYaw;
|
||||
F32 mCameraPitch;
|
||||
F32 mCameraZoom;
|
||||
LLVector3 mCameraOffset;
|
||||
LLPointer<LLVOAvatar> mDummyAvatar;
|
||||
U32 mTextureName;
|
||||
};
|
||||
|
||||
class LLFloaterSculptPreview : public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterSculptPreview(LLImageRaw* src);
|
||||
virtual ~LLFloaterSculptPreview();
|
||||
static LLFloaterSculptPreview* show(LLImageRaw* src);
|
||||
virtual BOOL postBuild();
|
||||
|
||||
BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
|
||||
|
||||
static void onMouseCaptureLostImagePreview(LLMouseHandler*);
|
||||
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
|
||||
|
||||
void clearAllPreviewTextures();
|
||||
|
||||
protected:
|
||||
static void onPreviewTypeCommit(LLUICtrl*,void*);
|
||||
void draw();
|
||||
bool loadImage(LLImageRaw* src);
|
||||
|
||||
LLPointer<LLImageRaw> mRawImagep;
|
||||
LLPointer<LLPreviewAvatar> mAvatarPreview;
|
||||
LLPointer<LLPreviewSculpted> mSculptedPreview;
|
||||
S32 mLastMouseX;
|
||||
S32 mLastMouseY;
|
||||
LLRect mPreviewRect;
|
||||
LLRectf mPreviewImageRect;
|
||||
LLPointer<LLViewerTexture> mImagep ;
|
||||
LLViewerObject* tmpvolume;
|
||||
|
||||
static S32 sUploadAmount;
|
||||
};
|
||||
|
||||
#endif // LL_LLFloaterSculptPreview_H
|
||||
@@ -35,10 +35,12 @@ void HippoLimits::setOpenSimLimits()
|
||||
mMaxHeight = 10000.0f;
|
||||
if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) {
|
||||
llinfos << "Using rendering compatible OpenSim limits." << llendl;
|
||||
mMinPrimScale = 0.01f;
|
||||
mMinHoleSize = 0.05f;
|
||||
mMaxHollow = 0.95f;
|
||||
} else {
|
||||
llinfos << "Using Hippo OpenSim limits." << llendl;
|
||||
mMinPrimScale = 0.001f;
|
||||
mMinHoleSize = 0.01f;
|
||||
mMaxHollow = 0.99f;
|
||||
}
|
||||
@@ -57,6 +59,7 @@ void HippoLimits::setSecondLifeLimits()
|
||||
mMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS;
|
||||
}
|
||||
|
||||
mMinPrimScale = 0.01f;
|
||||
mMaxHeight = 4096.0f;
|
||||
mMinHoleSize = 0.05f;
|
||||
mMaxHollow = 0.95f;
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
float getMinHoleSize() const { return mMinHoleSize; }
|
||||
float getMaxHollow() const { return mMaxHollow; }
|
||||
float getMaxPrimScale() const { return mMaxPrimScale; }
|
||||
float getMinPrimScale() const { return mMinPrimScale; }
|
||||
|
||||
void setLimits();
|
||||
|
||||
@@ -22,6 +23,7 @@ private:
|
||||
float mMinHoleSize;
|
||||
float mMaxHollow;
|
||||
float mMaxPrimScale;
|
||||
float mMinPrimScale;
|
||||
|
||||
void setOpenSimLimits();
|
||||
void setSecondLifeLimits();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,7 @@
|
||||
#include "llagentui.h"
|
||||
#include "llanimationstates.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llcapabilitylistener.h"
|
||||
#include "llconsole.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llfirstuse.h"
|
||||
@@ -70,6 +71,7 @@
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoavatarself.h"
|
||||
@@ -77,21 +79,20 @@
|
||||
#include "llworldmap.h"
|
||||
|
||||
//Misc non-standard includes
|
||||
#include "llviewerregion.h"
|
||||
#include "llurldispatcher.h"
|
||||
#include "llimview.h" //For gIMMgr
|
||||
//Floaters
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloatermap.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterdirectory.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llfloaterland.h"
|
||||
#include "llfloatermap.h"
|
||||
#include "llfloatermute.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
|
||||
#include "lluictrlfactory.h" //For LLUICtrlFactory::getLayeredXMLNode
|
||||
|
||||
@@ -121,7 +122,6 @@ const F64 CHAT_AGE_FAST_RATE = 3.0;
|
||||
const F32 MIN_FIDGET_TIME = 8.f; // seconds
|
||||
const F32 MAX_FIDGET_TIME = 20.f; // seconds
|
||||
|
||||
|
||||
// The agent instance.
|
||||
LLAgent gAgent;
|
||||
std::string gAuthString;
|
||||
@@ -130,7 +130,7 @@ std::string gAuthString;
|
||||
LLUUID gReSitTargetID;
|
||||
LLVector3 gReSitOffset;
|
||||
// </edit>
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
// Statics
|
||||
//
|
||||
|
||||
@@ -247,6 +247,7 @@ LLAgent::LLAgent() :
|
||||
mFirstLogin(FALSE),
|
||||
mGenderChosen(FALSE),
|
||||
mAppearanceSerialNum(0),
|
||||
|
||||
mMouselookModeInSignal(NULL),
|
||||
mMouselookModeOutSignal(NULL),
|
||||
mPendingLure(NULL)
|
||||
@@ -310,7 +311,6 @@ LLAgent::~LLAgent()
|
||||
mEffectColor = NULL;
|
||||
}
|
||||
|
||||
|
||||
// Handle any actions that need to be performed when the main app gains focus
|
||||
// (such as through alt-tab).
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -481,7 +481,7 @@ void LLAgent::movePitch(F32 mag)
|
||||
|
||||
if (mag > 0)
|
||||
{
|
||||
setControlFlags(AGENT_CONTROL_PITCH_POS );
|
||||
setControlFlags(AGENT_CONTROL_PITCH_POS);
|
||||
}
|
||||
else if (mag < 0)
|
||||
{
|
||||
@@ -535,8 +535,6 @@ BOOL LLAgent::getPhantom()
|
||||
return exlPhantom;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// setFlying()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -665,9 +663,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
|
||||
<< " located at " << ip << llendl;
|
||||
if (mRegionp)
|
||||
{
|
||||
// NaCl - Antispam Registry
|
||||
NACLAntiSpamRegistry::purgeAllQueues();
|
||||
// NaCl End
|
||||
// NaCl - Antispam Registry
|
||||
NACLAntiSpamRegistry::purgeAllQueues();
|
||||
// NaCl End
|
||||
|
||||
// We've changed regions, we're now going to change our agent coordinate frame.
|
||||
mAgentOriginGlobal = regionp->getOriginGlobal();
|
||||
@@ -1713,7 +1711,6 @@ void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32
|
||||
gAgentCamera.updateLookAt(mouse_x, mouse_y);
|
||||
}
|
||||
|
||||
|
||||
// friends and operators
|
||||
|
||||
std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
|
||||
@@ -2201,6 +2198,33 @@ void LLAgent::setStartPosition( U32 location_id )
|
||||
}
|
||||
}
|
||||
|
||||
struct HomeLocationMapper: public LLCapabilityListener::CapabilityMapper
|
||||
{
|
||||
// No reply message expected
|
||||
HomeLocationMapper(): LLCapabilityListener::CapabilityMapper("HomeLocation") {}
|
||||
virtual void buildMessage(LLMessageSystem* msg,
|
||||
const LLUUID& agentID,
|
||||
const LLUUID& sessionID,
|
||||
const std::string& capabilityName,
|
||||
const LLSD& payload) const
|
||||
{
|
||||
msg->newMessageFast(_PREHASH_SetStartLocationRequest);
|
||||
msg->nextBlockFast( _PREHASH_AgentData);
|
||||
msg->addUUIDFast(_PREHASH_AgentID, agentID);
|
||||
msg->addUUIDFast(_PREHASH_SessionID, sessionID);
|
||||
msg->nextBlockFast( _PREHASH_StartLocationData);
|
||||
// corrected by sim
|
||||
msg->addStringFast(_PREHASH_SimName, "");
|
||||
msg->addU32Fast(_PREHASH_LocationID, payload["HomeLocation"]["LocationId"].asInteger());
|
||||
msg->addVector3Fast(_PREHASH_LocationPos,
|
||||
ll_vector3_from_sdmap(payload["HomeLocation"]["LocationPos"]));
|
||||
msg->addVector3Fast(_PREHASH_LocationLookAt,
|
||||
ll_vector3_from_sdmap(payload["HomeLocation"]["LocationLookAt"]));
|
||||
}
|
||||
};
|
||||
// Need an instance of this class so it will self-register
|
||||
static HomeLocationMapper homeLocationMapper;
|
||||
|
||||
void LLAgent::requestStopMotion( LLMotion* motion )
|
||||
{
|
||||
// Notify all avatars that a motion has stopped.
|
||||
@@ -2372,7 +2396,7 @@ bool LLAgent::sendMaturityPreferenceToServer(int preferredMaturity)
|
||||
{
|
||||
access_prefs["max"] = "A";
|
||||
}
|
||||
|
||||
|
||||
LLSD body = LLSD::emptyMap();
|
||||
body["access_prefs"] = access_prefs;
|
||||
llinfos << "Sending access prefs update to " << (access_prefs["max"].asString()) << " via capability to: "
|
||||
@@ -2782,7 +2806,6 @@ BOOL LLAgent::allowOperation(PermissionBit op,
|
||||
return perm.allowOperationBy(op, agent_proxy, group_proxy);
|
||||
}
|
||||
|
||||
|
||||
void LLAgent::getName(std::string& name)
|
||||
{
|
||||
name.clear();
|
||||
@@ -3470,7 +3493,7 @@ bool LLAgent::teleportCore(bool is_local)
|
||||
|
||||
// hide land floater too - it'll be out of date
|
||||
LLFloaterLand::hideInstance();
|
||||
|
||||
|
||||
LLViewerParcelMgr::getInstance()->deselectLand();
|
||||
LLViewerMediaFocus::getInstance()->setFocusFace(false, NULL, 0, NULL);
|
||||
|
||||
@@ -3728,8 +3751,7 @@ void LLAgent::setTeleportState(ETeleportState state)
|
||||
}
|
||||
|
||||
switch (mTeleportState)
|
||||
|
||||
{
|
||||
{
|
||||
case TELEPORT_NONE:
|
||||
mbTeleportKeepsLookAt = false;
|
||||
break;
|
||||
@@ -3996,10 +4018,10 @@ void LLAgent::sendAgentSetAppearance()
|
||||
break;
|
||||
}
|
||||
msg->nextBlockFast(_PREHASH_VisualParam );
|
||||
|
||||
// We don't send the param ids. Instead, we assume that the receiver has the same params in the same sequence.
|
||||
const F32 param_value = param->getWeight();
|
||||
const U8 new_weight = F32_to_U8(param_value, param->getMinWeight(), param->getMaxWeight());
|
||||
|
||||
msg->addU8Fast(_PREHASH_ParamValue, new_weight );
|
||||
transmitted_params++;
|
||||
}
|
||||
@@ -4016,7 +4038,7 @@ void LLAgent::sendAgentDataUpdateRequest()
|
||||
{
|
||||
gMessageSystem->newMessageFast(_PREHASH_AgentDataUpdateRequest);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
|
||||
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
sendReliableMessage();
|
||||
}
|
||||
@@ -4208,4 +4230,3 @@ LLAgentQueryManager::~LLAgentQueryManager()
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
||||
|
||||
@@ -88,6 +88,9 @@ void LLAttachmentsMgr::onIdle(void *)
|
||||
|
||||
void LLAttachmentsMgr::onIdle()
|
||||
{
|
||||
if(!gAgent.getRegion())
|
||||
return;
|
||||
|
||||
S32 obj_count = mPendingAttachments.size();
|
||||
if (obj_count == 0)
|
||||
{
|
||||
|
||||
@@ -1598,16 +1598,18 @@ void LLDrawPoolInvisible::renderDeferred( S32 pass )
|
||||
}
|
||||
|
||||
LLFastTimer t(FTM_RENDER_INVISIBLE);
|
||||
|
||||
|
||||
gOcclusionProgram.bind();
|
||||
|
||||
U32 invisi_mask = LLVertexBuffer::MAP_VERTEX;
|
||||
glStencilMask(0);
|
||||
glStencilOp(GL_ZERO, GL_KEEP, GL_REPLACE);
|
||||
gGL.setColorMask(false, false);
|
||||
pushBatches(LLRenderPass::PASS_INVISIBLE, invisi_mask, FALSE);
|
||||
gGL.setColorMask(true, true);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
glStencilMask(0xFFFFFFFF);
|
||||
|
||||
gOcclusionProgram.unbind();
|
||||
|
||||
if (gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))
|
||||
{
|
||||
beginShiny(true);
|
||||
|
||||
@@ -575,6 +575,8 @@ void LLDrawPoolTerrain::renderFull4TU()
|
||||
gGL.loadIdentity();
|
||||
gGL.translatef(-1.f, 0.f, 0.f);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
|
||||
// Set alpha texture and do lighting modulation
|
||||
gGL.getTexUnit(3)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_PREV_COLOR, LLTexUnit::TBS_VERT_COLOR);
|
||||
gGL.getTexUnit(3)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
|
||||
@@ -722,6 +724,7 @@ void LLDrawPoolTerrain::renderFull2TU()
|
||||
gGL.matrixMode(LLRender::MM_TEXTURE);
|
||||
gGL.loadIdentity();
|
||||
gGL.translatef(-1.f, 0.f, 0.f);
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
|
||||
// Care about alpha only
|
||||
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
|
||||
@@ -761,7 +764,7 @@ void LLDrawPoolTerrain::renderFull2TU()
|
||||
gGL.matrixMode(LLRender::MM_TEXTURE);
|
||||
gGL.loadIdentity();
|
||||
gGL.translatef(-2.f, 0.f, 0.f);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
// Care about alpha only
|
||||
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR);
|
||||
gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_TEX_ALPHA);
|
||||
|
||||
@@ -758,6 +758,9 @@ static void xform4a(LLVector4a &tex_coord, const LLVector4a& trans, const LLVect
|
||||
|
||||
bool less_than_max_mag(const LLVector4a& vec)
|
||||
{
|
||||
#if 1
|
||||
return true;
|
||||
#else
|
||||
LLVector4a MAX_MAG;
|
||||
MAX_MAG.splat(1024.f*1024.f);
|
||||
|
||||
@@ -767,6 +770,7 @@ bool less_than_max_mag(const LLVector4a& vec)
|
||||
S32 lt = val.lessThan(MAX_MAG).getGatheredBits() & 0x7;
|
||||
|
||||
return lt == 0x7;
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
|
||||
@@ -1635,8 +1639,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
if (!do_xform)
|
||||
{
|
||||
LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM);
|
||||
S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF;
|
||||
LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, tc_size);
|
||||
LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1857,12 +1860,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
|
||||
LLVector4a texIdx;
|
||||
|
||||
S32 index = mTextureIndex < 255 ? mTextureIndex : 0;
|
||||
U8 index = mTextureIndex < 255 ? mTextureIndex : 0;
|
||||
|
||||
F32 val = 0.f;
|
||||
S32* vp = (S32*) &val;
|
||||
*vp = index;
|
||||
|
||||
U8* vp = (U8*) &val;
|
||||
vp[0] = index;
|
||||
vp[1] = 0;
|
||||
vp[2] = 0;
|
||||
vp[3] = 0;
|
||||
|
||||
llassert(index <= LLGLSLShader::sIndexedTextureChannels-1);
|
||||
|
||||
LLVector4Logical mask;
|
||||
|
||||
@@ -103,6 +103,10 @@ LLFastTimerView::LLFastTimerView(const std::string& name, const LLRect& rect)
|
||||
FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount();
|
||||
mPrintStats = -1;
|
||||
mAverageCyclesPerTimer = 0;
|
||||
// <FS:LO> Making the ledgend part of fast timers scrollable
|
||||
mOverLegend = false;
|
||||
mScrollOffset = 0;
|
||||
// </FS:LO>
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_fast_timers.xml");
|
||||
}
|
||||
|
||||
@@ -258,6 +262,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
|
||||
}
|
||||
mHoverTimer = NULL;
|
||||
mHoverID = NULL;
|
||||
mOverLegend = false; // <FS:LO> Making the ledgend part of fast timers scrollable
|
||||
|
||||
if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y))
|
||||
{
|
||||
@@ -311,6 +316,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
mHoverID = timer_id;
|
||||
}
|
||||
mOverLegend = true; // <FS:LO> Making the ledgend part of fast timers scrollable
|
||||
}
|
||||
|
||||
return LLFloater::handleHover(x, y, mask);
|
||||
@@ -358,10 +364,36 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* stic
|
||||
|
||||
BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
LLFastTimer::sPauseHistory = TRUE;
|
||||
mScrollIndex = llclamp( mScrollIndex + clicks,
|
||||
0,
|
||||
llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
|
||||
//LLFastTimer::sPauseHistory = TRUE;
|
||||
//mScrollIndex = llclamp( mScrollIndex + clicks,
|
||||
//0,
|
||||
//llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
|
||||
// <FS:LO> Making the ledgend part of fast timers scrollable
|
||||
if(mOverLegend)
|
||||
{
|
||||
mScrollOffset += clicks;
|
||||
S32 count = 0;
|
||||
for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
|
||||
it != timer_tree_iterator_t();
|
||||
++it)
|
||||
{
|
||||
count++;
|
||||
LLFastTimer::NamedTimer* idp = (*it);
|
||||
if (idp->getCollapsed())
|
||||
{
|
||||
it.skipDescendants();
|
||||
}
|
||||
}
|
||||
mScrollOffset = llclamp(mScrollOffset,0,count-5);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFastTimer::sPauseHistory = TRUE;
|
||||
mScrollIndex = llclamp( mScrollIndex + clicks,
|
||||
0,
|
||||
llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
|
||||
}
|
||||
// </FS:LO>
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -479,11 +511,23 @@ void LLFastTimerView::draw()
|
||||
S32 cur_line = 0;
|
||||
ft_display_idx.clear();
|
||||
std::map<LLFastTimer::NamedTimer*, S32> display_line;
|
||||
S32 mScrollOffset_tmp = mScrollOffset; // <FS:LO> Making the ledgend part of fast timers scrollable
|
||||
for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
|
||||
it != timer_tree_iterator_t();
|
||||
++it)
|
||||
{
|
||||
LLFastTimer::NamedTimer* idp = (*it);
|
||||
// <FS:LO> Making the ledgend part of fast timers scrollable
|
||||
if(mScrollOffset_tmp)
|
||||
{
|
||||
--mScrollOffset_tmp;
|
||||
if (idp->getCollapsed())
|
||||
{
|
||||
it.skipDescendants();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// </FS:LO>
|
||||
display_line[idp] = cur_line;
|
||||
ft_display_idx.push_back(idp);
|
||||
cur_line++;
|
||||
|
||||
@@ -99,6 +99,11 @@ private:
|
||||
S32 mPrintStats;
|
||||
S32 mAverageCyclesPerTimer;
|
||||
LLRect mGraphRect;
|
||||
|
||||
// <FS:LO> Making the ledgend part of fast timers scrollable
|
||||
bool mOverLegend;
|
||||
S32 mScrollOffset;
|
||||
// </FS:LO>
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
#include "llfloateractivespeakers.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llimview.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
@@ -44,12 +46,10 @@
|
||||
#include "lltextbox.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llimpanel.h" // LLVoiceChannel
|
||||
#include "llsdutil.h"
|
||||
#include "llimview.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llworld.h"
|
||||
#include "llappviewer.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
@@ -90,9 +90,7 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const std::string& name, const ESpeakerTy
|
||||
mDisplayName = name;
|
||||
mLegacyName = name;
|
||||
}
|
||||
|
||||
gVoiceClient->setUserVolume(id, LLMuteList::getInstance()->getSavedResidentVolume(id));
|
||||
|
||||
mActivityTimer.reset(SPEAKER_TIMEOUT);
|
||||
}
|
||||
|
||||
@@ -104,7 +102,7 @@ void LLSpeaker::lookupName()
|
||||
// [/Ansariel: Display name support]
|
||||
}
|
||||
|
||||
//static
|
||||
//static
|
||||
// [Ansariel: Display name support]
|
||||
void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_name, void* user_data)
|
||||
// [/Ansariel: Display name support]
|
||||
@@ -122,12 +120,12 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_
|
||||
case 2 : speaker_ptr->mDisplayName = avatar_name.mDisplayName; break;
|
||||
default : speaker_ptr->mDisplayName = avatar_name.getLegacyName(); break;
|
||||
}
|
||||
|
||||
|
||||
// Also set the legacy name. We will need it to initiate a new
|
||||
// IM session.
|
||||
speaker_ptr->mLegacyName = LLCacheName::cleanFullName(avatar_name.getLegacyName());
|
||||
// [/Ansariel: Display name support]
|
||||
|
||||
|
||||
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g
|
||||
// TODO-RLVa: this seems to get called per frame which is very likely an LL bug that will eventuall get fixed
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
@@ -500,7 +498,7 @@ void LLPanelActiveSpeakers::refreshSpeakers()
|
||||
}
|
||||
|
||||
LLColor4 icon_color;
|
||||
|
||||
|
||||
if (speakerp->mStatus == LLSpeaker::STATUS_MUTED)
|
||||
{
|
||||
icon_cell->setValue(mute_icon_image);
|
||||
@@ -605,7 +603,7 @@ void LLPanelActiveSpeakers::refreshSpeakers()
|
||||
speaking_status_cell->setValue(speaking_order_sort_string);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// we potentially modified the sort order by touching the list items
|
||||
mSpeakerList->setSorted(FALSE);
|
||||
|
||||
@@ -860,25 +858,25 @@ void LLPanelActiveSpeakers::onModeratorMuteVoice(LLUICtrl* ctrl, void* user_data
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
LLFloaterIMPanel* floaterp;
|
||||
|
||||
floaterp = gIMMgr->findFloaterBySession(mSessionID);
|
||||
|
||||
if ( floaterp )
|
||||
{
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"not_a_moderator");
|
||||
"not_a_mod_error");
|
||||
}
|
||||
else
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"generic");
|
||||
"generic_request_error");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -925,25 +923,25 @@ void LLPanelActiveSpeakers::onModeratorMuteText(LLUICtrl* ctrl, void* user_data)
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
LLFloaterIMPanel* floaterp;
|
||||
|
||||
floaterp = gIMMgr->findFloaterBySession(mSessionID);
|
||||
|
||||
if ( floaterp )
|
||||
{
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"not_a_moderator");
|
||||
"not_a_mod_error");
|
||||
}
|
||||
else
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
"generic");
|
||||
"generic_request_error");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1194,6 +1192,9 @@ void LLSpeakerMgr::updateSpeakerList()
|
||||
|
||||
const LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)
|
||||
{
|
||||
//In some conditions map causes crash if it is empty(Windows only), adding check (EK)
|
||||
if (mSpeakers.size() == 0)
|
||||
return NULL;
|
||||
speaker_map_t::iterator found_it = mSpeakers.find(speaker_id);
|
||||
if (found_it == mSpeakers.end())
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* @file llfloateranimpreview.cpp
|
||||
* @brief LLFloaterAnimPreview class implementation
|
||||
*
|
||||
@@ -1430,17 +1430,18 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata)
|
||||
}
|
||||
else
|
||||
// </edit>
|
||||
|
||||
upload_new_resource(floaterp->mTransactionID, // tid
|
||||
{
|
||||
upload_new_resource(floaterp->mTransactionID, // tid
|
||||
LLAssetType::AT_ANIMATION,
|
||||
name,
|
||||
desc,
|
||||
0,
|
||||
LLFolderType::FT_ANIMATION,
|
||||
LLFolderType::FT_NONE,
|
||||
LLInventoryType::IT_ANIMATION,
|
||||
LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
|
||||
name,
|
||||
callback, expected_upload_cost, userdata);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
#include "llsurface.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
#include "lltransfertargetfile.h"
|
||||
#include "lltransfersourcefile.h"
|
||||
@@ -172,6 +173,7 @@ LLFloaterGodTools::~LLFloaterGodTools()
|
||||
// children automatically deleted
|
||||
}
|
||||
|
||||
|
||||
U32 LLFloaterGodTools::computeRegionFlags() const
|
||||
{
|
||||
U32 flags = gAgent.getRegion()->getRegionFlags();
|
||||
@@ -245,14 +247,16 @@ void LLFloaterGodTools::showPanel(const std::string& panel_name)
|
||||
void LLFloaterGodTools::onTabChanged(LLUICtrl* ctrl, const LLSD& param)
|
||||
{
|
||||
LLPanel* panel = (LLPanel*)ctrl->getChildView(param.asString(),false,false);
|
||||
if(panel)
|
||||
if (panel)
|
||||
panel->setFocus(TRUE);
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
|
||||
{
|
||||
llassert(msg);
|
||||
if (!msg) return;
|
||||
|
||||
//const S32 SIM_NAME_BUF = 256;
|
||||
U32 region_flags;
|
||||
U8 sim_access;
|
||||
@@ -307,12 +311,12 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
|
||||
regionp->setBillableFactor(billable_factor);
|
||||
}
|
||||
|
||||
if (!sGodTools) return;
|
||||
|
||||
// push values to god tools, if available
|
||||
if (sGodTools
|
||||
if ( gAgent.isGodlike()
|
||||
&& sGodTools->mPanelRegionTools
|
||||
&& sGodTools->mPanelObjectTools
|
||||
&& msg
|
||||
&& gAgent.isGodlike())
|
||||
&& sGodTools->mPanelObjectTools)
|
||||
{
|
||||
LLPanelRegionTools* rtool = sGodTools->mPanelRegionTools;
|
||||
sGodTools->mCurrentHost = host;
|
||||
@@ -371,6 +375,8 @@ void LLFloaterGodTools::sendRegionInfoRequest()
|
||||
|
||||
void LLFloaterGodTools::sendGodUpdateRegionInfo()
|
||||
{
|
||||
if (!sGodTools) return;
|
||||
|
||||
LLViewerRegion *regionp = gAgent.getRegion();
|
||||
if (gAgent.isGodlike()
|
||||
&& sGodTools->mPanelRegionTools
|
||||
@@ -777,9 +783,7 @@ void LLPanelRegionTools::setPricePerMeter(S32 price)
|
||||
// static
|
||||
void LLPanelRegionTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
if (sGodTools
|
||||
&& userdata
|
||||
&& gAgent.isGodlike())
|
||||
if (sGodTools && userdata && gAgent.isGodlike())
|
||||
{
|
||||
LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
|
||||
region_tools->childEnable("Apply");
|
||||
@@ -803,9 +807,7 @@ void LLPanelRegionTools::onChangePrelude(LLUICtrl* ctrl, void* data)
|
||||
// static
|
||||
void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
|
||||
{
|
||||
if (sGodTools
|
||||
&& userdata
|
||||
&& gAgent.isGodlike())
|
||||
if (sGodTools && userdata && gAgent.isGodlike())
|
||||
{
|
||||
LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
|
||||
region_tools->childEnable("Apply");
|
||||
@@ -815,10 +817,9 @@ void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
|
||||
//static
|
||||
void LLPanelRegionTools::onRefresh(void* userdata)
|
||||
{
|
||||
if(!sGodTools) return;
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
if (region
|
||||
&& sGodTools
|
||||
&& gAgent.isGodlike())
|
||||
if (region && gAgent.isGodlike())
|
||||
{
|
||||
sGodTools->sendRegionInfoRequest();
|
||||
}
|
||||
@@ -827,11 +828,9 @@ void LLPanelRegionTools::onRefresh(void* userdata)
|
||||
// static
|
||||
void LLPanelRegionTools::onApplyChanges(void* userdata)
|
||||
{
|
||||
if(!sGodTools) return;
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
if (region
|
||||
&& sGodTools
|
||||
&& userdata
|
||||
&& gAgent.isGodlike())
|
||||
if (region && userdata && gAgent.isGodlike())
|
||||
{
|
||||
LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
|
||||
|
||||
@@ -840,19 +839,19 @@ void LLPanelRegionTools::onApplyChanges(void* userdata)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
// static
|
||||
void LLPanelRegionTools::onBakeTerrain(void *userdata)
|
||||
{
|
||||
LLPanelRequestTools::sendRequest("terrain", "bake", gAgent.getRegionHost());
|
||||
}
|
||||
|
||||
// static
|
||||
// static
|
||||
void LLPanelRegionTools::onRevertTerrain(void *userdata)
|
||||
{
|
||||
LLPanelRequestTools::sendRequest("terrain", "revert", gAgent.getRegionHost());
|
||||
}
|
||||
|
||||
// static
|
||||
// static
|
||||
void LLPanelRegionTools::onSwapTerrain(void *userdata)
|
||||
{
|
||||
LLPanelRequestTools::sendRequest("terrain", "swap", gAgent.getRegionHost());
|
||||
@@ -953,7 +952,6 @@ bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
@@ -1027,7 +1025,8 @@ bool LLPanelGridTools::flushMapVisibilityCachesConfirm(const LLSD& notification,
|
||||
|
||||
// Default constructor
|
||||
LLPanelObjectTools::LLPanelObjectTools(const std::string& title)
|
||||
: LLPanel(title), mTargetAvatar()
|
||||
: LLPanel(title),
|
||||
mTargetAvatar()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1063,7 +1062,7 @@ void LLPanelObjectTools::setTargetAvatar(const LLUUID &target_id)
|
||||
mTargetAvatar = target_id;
|
||||
if (target_id.isNull())
|
||||
{
|
||||
childSetValue("target_avatar_name", "(no target)");
|
||||
childSetValue("target_avatar_name", getString("no_target"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1146,8 +1145,9 @@ void LLPanelObjectTools::enableAllWidgets()
|
||||
// static
|
||||
void LLPanelObjectTools::onGetTopColliders(void* userdata)
|
||||
{
|
||||
if (sGodTools
|
||||
&& gAgent.isGodlike())
|
||||
if(!sGodTools) return;
|
||||
|
||||
if (gAgent.isGodlike())
|
||||
{
|
||||
LLFloaterTopObjects::show();
|
||||
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_COLLIDERS);
|
||||
@@ -1158,8 +1158,9 @@ void LLPanelObjectTools::onGetTopColliders(void* userdata)
|
||||
// static
|
||||
void LLPanelObjectTools::onGetTopScripts(void* userdata)
|
||||
{
|
||||
if (sGodTools
|
||||
&& gAgent.isGodlike())
|
||||
if(!sGodTools) return;
|
||||
|
||||
if (gAgent.isGodlike())
|
||||
{
|
||||
LLFloaterTopObjects::show();
|
||||
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_SCRIPTS);
|
||||
@@ -1170,8 +1171,7 @@ void LLPanelObjectTools::onGetTopScripts(void* userdata)
|
||||
// static
|
||||
void LLPanelObjectTools::onGetScriptDigest(void* userdata)
|
||||
{
|
||||
if (sGodTools
|
||||
&& gAgent.isGodlike())
|
||||
if (sGodTools && gAgent.isGodlike())
|
||||
{
|
||||
// get the list of scripts and number of occurences of each
|
||||
// (useful for finding self-replicating objects)
|
||||
@@ -1281,7 +1281,10 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
|
||||
LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
|
||||
|
||||
panelp->mTargetAvatar = owner_id;
|
||||
std::string name = "Object " + node->mName + " owned by " + owner_name;
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[OBJECT]"] = node->mName;
|
||||
args["[OWNER]"] = owner_name;
|
||||
std::string name = LLTrans::getString("GodToolsObjectOwnedBy", args);
|
||||
panelp->childSetValue("target_avatar_name", name);
|
||||
}
|
||||
|
||||
@@ -1295,11 +1298,10 @@ void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names,
|
||||
object_tools->refresh();
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLPanelObjectTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
if (sGodTools
|
||||
if (sGodTools
|
||||
&& userdata
|
||||
&& gAgent.isGodlike())
|
||||
{
|
||||
@@ -1311,15 +1313,12 @@ void LLPanelObjectTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
|
||||
// static
|
||||
void LLPanelObjectTools::onApplyChanges(void* userdata)
|
||||
{
|
||||
if(!sGodTools) return;
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
if (region
|
||||
&& sGodTools
|
||||
&& userdata
|
||||
&& gAgent.isGodlike())
|
||||
if (region && userdata && gAgent.isGodlike())
|
||||
{
|
||||
LLPanelObjectTools* object_tools = (LLPanelObjectTools*) userdata;
|
||||
// TODO -- implement this
|
||||
|
||||
object_tools->childDisable("Apply");
|
||||
sGodTools->sendGodUpdateRegionInfo();
|
||||
}
|
||||
|
||||
@@ -111,6 +111,7 @@ BOOL LLFloaterImagePreview::postBuild()
|
||||
}
|
||||
|
||||
childSetLabelArg("ok_btn", "[UPLOADFEE]", gHippoGridManager->getConnectedGrid()->getUploadFee());
|
||||
childSetAction("ok_btn", onBtnOK, this);
|
||||
|
||||
LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo");
|
||||
if (iface)
|
||||
@@ -757,9 +758,13 @@ BOOL LLImagePreviewAvatar::render()
|
||||
// make sure alpha=0 shows avatar material color
|
||||
LLGLDisable no_blend(GL_BLEND);
|
||||
|
||||
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
|
||||
gPipeline.enableLightsPreview();
|
||||
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
|
||||
LLFace* face = avatarp->mDrawable->getFace(0);
|
||||
if (face)
|
||||
{
|
||||
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)face->getPool();
|
||||
gPipeline.enableLightsPreview();
|
||||
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
|
||||
}
|
||||
}
|
||||
|
||||
gGL.color4f(1,1,1,1);
|
||||
|
||||
@@ -2260,8 +2260,8 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
||||
BOOL allow_damage = !self->mCheckSafe->get();
|
||||
BOOL allow_fly = self->mCheckFly->get();
|
||||
BOOL allow_landmark = self->mCheckLandmark->get();
|
||||
BOOL allow_group_scripts = self->mCheckGroupScripts->get() || self->mCheckOtherScripts->get();
|
||||
BOOL allow_other_scripts = self->mCheckOtherScripts->get();
|
||||
BOOL allow_group_scripts = self->mCheckGroupScripts->get() || allow_other_scripts;
|
||||
BOOL allow_publish = FALSE;
|
||||
BOOL mature_publish = self->mMatureCtrl->get();
|
||||
BOOL push_restriction = self->mPushRestrictionCtrl->get();
|
||||
@@ -2424,7 +2424,7 @@ void LLPanelLandAccess::refresh()
|
||||
mListAccess->deleteAllItems();
|
||||
if (mListBanned)
|
||||
mListBanned->deleteAllItems();
|
||||
|
||||
|
||||
LLParcel *parcel = mParcel->getParcel();
|
||||
|
||||
// Display options
|
||||
|
||||
@@ -157,7 +157,10 @@ BOOL LLFloaterNameDesc::postBuild()
|
||||
|
||||
// OK button
|
||||
childSetLabelArg("ok_btn", "[UPLOADFEE]", gHippoGridManager->getConnectedGrid()->getUploadFee());
|
||||
childSetAction("ok_btn", onBtnOK, this);
|
||||
if (exten == "wav")
|
||||
{
|
||||
childSetAction("ok_btn", onBtnOK, this);
|
||||
}
|
||||
setDefaultBtn("ok_btn");
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -165,6 +165,7 @@ bool estate_dispatch_initialized = false;
|
||||
//S32 LLFloaterRegionInfo::sRequestSerial = 0;
|
||||
LLUUID LLFloaterRegionInfo::sRequestInvoice;
|
||||
|
||||
|
||||
LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", NULL, FALSE);
|
||||
@@ -176,26 +177,6 @@ BOOL LLFloaterRegionInfo::postBuild()
|
||||
|
||||
// contruct the panels
|
||||
LLPanelRegionInfo* panel;
|
||||
panel = new LLPanelRegionGeneralInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), TRUE);
|
||||
|
||||
panel = new LLPanelRegionDebugInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
|
||||
|
||||
panel = new LLPanelRegionTextureInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
|
||||
|
||||
panel = new LLPanelRegionTerrainInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
|
||||
|
||||
panel = new LLPanelEstateInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_estate.xml");
|
||||
@@ -206,6 +187,26 @@ BOOL LLFloaterRegionInfo::postBuild()
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_covenant.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
|
||||
|
||||
panel = new LLPanelRegionGeneralInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), TRUE);
|
||||
|
||||
panel = new LLPanelRegionTerrainInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
|
||||
|
||||
panel = new LLPanelRegionTextureInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
|
||||
|
||||
panel = new LLPanelRegionDebugInfo;
|
||||
mInfoPanels.push_back(panel);
|
||||
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.xml");
|
||||
mTab->addTabPanel(panel, panel->getLabel(), FALSE);
|
||||
|
||||
gMessageSystem->setHandlerFunc(
|
||||
"EstateOwnerMessage",
|
||||
&processEstateOwnerRequest);
|
||||
@@ -331,6 +332,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
|
||||
msg->getSize("RegionInfo2", "ProductName") > 0)
|
||||
{
|
||||
msg->getString("RegionInfo2", "ProductName", sim_type);
|
||||
LLTrans::findString(sim_type, sim_type); // try localizing sim product name
|
||||
}
|
||||
|
||||
// GENERAL PANEL
|
||||
@@ -1234,6 +1236,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region)
|
||||
return LLPanelRegionInfo::refreshFromRegion(region);
|
||||
}
|
||||
|
||||
|
||||
// virtual
|
||||
BOOL LLPanelRegionTerrainInfo::sendUpdate()
|
||||
{
|
||||
@@ -1390,6 +1393,7 @@ bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, con
|
||||
strings.push_back("bake");
|
||||
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
|
||||
sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1669,26 +1673,29 @@ bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& re
|
||||
std::string all_estates_text()
|
||||
{
|
||||
LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
|
||||
if (!panel) return "(error)";
|
||||
if (!panel) return "(" + LLTrans::getString("RegionInfoError") + ")";
|
||||
|
||||
LLStringUtil::format_map_t args;
|
||||
std::string owner = panel->getOwnerName();
|
||||
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (gAgent.isGodlike())
|
||||
{
|
||||
return llformat("all estates\nowned by %s", owner.c_str());
|
||||
args["[OWNER]"] = owner.c_str();
|
||||
return LLTrans::getString("RegionInfoAllEstatesOwnedBy", args);
|
||||
}
|
||||
else if (region && region->getOwner() == gAgent.getID())
|
||||
{
|
||||
return "all estates you own";
|
||||
return LLTrans::getString("RegionInfoAllEstatesYouOwn");
|
||||
}
|
||||
else if (region && region->isEstateManager())
|
||||
{
|
||||
return llformat("all estates that\nyou manage for %s", owner.c_str());
|
||||
args["[OWNER]"] = owner.c_str();
|
||||
return LLTrans::getString("RegionInfoAllEstatesYouManage", args);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "(error)";
|
||||
return "(" + LLTrans::getString("RegionInfoError") + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2254,6 +2261,7 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con
|
||||
LLFloaterRegionInfo::nextInvoice();
|
||||
commitEstateInfoDataserver();
|
||||
}
|
||||
|
||||
// we don't want to do this because we'll get it automatically from the sim
|
||||
// after the spaceserver processes it
|
||||
// else
|
||||
@@ -2723,7 +2731,6 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)
|
||||
region_landtype->setText(region->getLocalizedSimProductName());
|
||||
}
|
||||
|
||||
|
||||
// let the parent class handle the general data collection.
|
||||
bool rv = LLPanelRegionInfo::refreshFromRegion(region);
|
||||
LLMessageSystem *msg = gMessageSystem;
|
||||
@@ -2863,7 +2870,7 @@ void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
|
||||
else
|
||||
{
|
||||
mAssetStatus = ASSET_LOADED;
|
||||
setCovenantTextEditor("There is no Covenant provided for this Estate.");
|
||||
setCovenantTextEditor(LLTrans::getString("RegionNoCovenant"));
|
||||
sendChangeCovenantID(LLUUID::null);
|
||||
}
|
||||
}
|
||||
@@ -3179,9 +3186,10 @@ bool LLDispatchSetEstateAccess::operator()(
|
||||
totalAllowedAgents += allowed_agent_name_list->getItemCount();
|
||||
}
|
||||
|
||||
std::string msg = llformat("Allowed residents: (%d, max %d)",
|
||||
totalAllowedAgents,
|
||||
ESTATE_MAX_ACCESS_IDS);
|
||||
LLStringUtil::format_map_t args;
|
||||
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));
|
||||
|
||||
if (allowed_agent_name_list)
|
||||
@@ -3203,9 +3211,10 @@ bool LLDispatchSetEstateAccess::operator()(
|
||||
LLNameListCtrl* allowed_group_name_list;
|
||||
allowed_group_name_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
|
||||
|
||||
std::string msg = llformat("Allowed groups: (%d, max %d)",
|
||||
num_allowed_groups,
|
||||
(S32) ESTATE_MAX_GROUP_IDS);
|
||||
LLStringUtil::format_map_t args;
|
||||
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));
|
||||
|
||||
if (allowed_group_name_list)
|
||||
|
||||
@@ -75,11 +75,11 @@
|
||||
#include "lltoolplacer.h"
|
||||
#include "lltoolselectland.h"
|
||||
#include "llui.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerjoystick.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerjoystick.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llmeshrepository.h"
|
||||
|
||||
@@ -101,7 +101,9 @@ const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] =
|
||||
std::string("Content"), // PANEL_CONTENTS,
|
||||
};
|
||||
|
||||
|
||||
// Local prototypes
|
||||
void commit_grid_mode(LLUICtrl *ctrl, void*);
|
||||
void commit_select_component(LLUICtrl *ctrl, void *data);
|
||||
void click_show_more(void*);
|
||||
void click_popup_info(void*);
|
||||
@@ -117,8 +119,7 @@ void click_apply_to_selection(void*);
|
||||
void commit_radio_zoom(LLUICtrl *, void*);
|
||||
void commit_radio_orbit(LLUICtrl *, void*);
|
||||
void commit_radio_pan(LLUICtrl *, void*);
|
||||
void commit_grid_mode(LLUICtrl *, void*);
|
||||
void commit_slider_zoom(LLUICtrl *, void*);
|
||||
void commit_slider_zoom(LLUICtrl *ctrl, void*);
|
||||
void commit_select_tool(LLUICtrl *ctrl, void *data);
|
||||
|
||||
|
||||
@@ -212,7 +213,6 @@ LLPCode toolData[]={
|
||||
|
||||
BOOL LLFloaterTools::postBuild()
|
||||
{
|
||||
|
||||
// Hide until tool selected
|
||||
setVisible(FALSE);
|
||||
|
||||
@@ -223,59 +223,60 @@ BOOL LLFloaterTools::postBuild()
|
||||
getDragHandle()->setEnabled( !gSavedSettings.getBOOL("ToolboxAutoMove") );
|
||||
|
||||
LLRect rect;
|
||||
mBtnFocus = getChild<LLButton>("button focus");//btn;
|
||||
mBtnFocus = getChild<LLButton>("button focus");//btn;
|
||||
childSetAction("button focus",LLFloaterTools::setEditTool, (void*)LLToolCamera::getInstance());
|
||||
mBtnMove = getChild<LLButton>("button move");
|
||||
mBtnMove = getChild<LLButton>("button move");
|
||||
childSetAction("button move",LLFloaterTools::setEditTool, (void*)LLToolGrab::getInstance());
|
||||
mBtnEdit = getChild<LLButton>("button edit");
|
||||
mBtnEdit = getChild<LLButton>("button edit");
|
||||
childSetAction("button edit",LLFloaterTools::setEditTool, (void*)LLToolCompTranslate::getInstance());
|
||||
mBtnCreate = getChild<LLButton>("button create");
|
||||
mBtnCreate = getChild<LLButton>("button create");
|
||||
childSetAction("button create",LLFloaterTools::setEditTool, (void*)LLToolCompCreate::getInstance());
|
||||
mBtnLand = getChild<LLButton>("button land" );
|
||||
mBtnLand = getChild<LLButton>("button land" );
|
||||
childSetAction("button land",LLFloaterTools::setEditTool, (void*)LLToolSelectLand::getInstance());
|
||||
mTextStatus = getChild<LLTextBox>("text status");
|
||||
mTextStatus = getChild<LLTextBox>("text status");
|
||||
|
||||
childSetCommitCallback("slider zoom",commit_slider_zoom,this);
|
||||
|
||||
mRadioZoom = getChild<LLCheckBoxCtrl>("radio zoom");
|
||||
mRadioZoom = getChild<LLCheckBoxCtrl>("radio zoom");
|
||||
childSetCommitCallback("radio zoom",commit_radio_zoom,this);
|
||||
mRadioOrbit = getChild<LLCheckBoxCtrl>("radio orbit");
|
||||
mRadioOrbit = getChild<LLCheckBoxCtrl>("radio orbit");
|
||||
childSetCommitCallback("radio orbit",commit_radio_orbit,this);
|
||||
mRadioPan = getChild<LLCheckBoxCtrl>("radio pan");
|
||||
mRadioPan = getChild<LLCheckBoxCtrl>("radio pan");
|
||||
childSetCommitCallback("radio pan",commit_radio_pan,this);
|
||||
|
||||
mRadioMove = getChild<LLCheckBoxCtrl>("radio move");
|
||||
mRadioMove = getChild<LLCheckBoxCtrl>("radio move");
|
||||
childSetCommitCallback("radio move",click_popup_grab_drag,this);
|
||||
mRadioLift = getChild<LLCheckBoxCtrl>("radio lift");
|
||||
mRadioLift = getChild<LLCheckBoxCtrl>("radio lift");
|
||||
childSetCommitCallback("radio lift",click_popup_grab_lift,this);
|
||||
mRadioSpin = getChild<LLCheckBoxCtrl>("radio spin");
|
||||
mRadioSpin = getChild<LLCheckBoxCtrl>("radio spin");
|
||||
childSetCommitCallback("radio spin",click_popup_grab_spin,NULL);
|
||||
mRadioPosition = getChild<LLCheckBoxCtrl>("radio position");
|
||||
mRadioPosition = getChild<LLCheckBoxCtrl>("radio position");
|
||||
childSetCommitCallback("radio position",commit_select_tool,NULL);
|
||||
mRadioRotate = getChild<LLCheckBoxCtrl>("radio rotate");
|
||||
mRadioRotate = getChild<LLCheckBoxCtrl>("radio rotate");
|
||||
childSetCommitCallback("radio rotate",commit_select_tool,NULL);
|
||||
mRadioStretch = getChild<LLCheckBoxCtrl>("radio stretch");
|
||||
mRadioStretch = getChild<LLCheckBoxCtrl>("radio stretch");
|
||||
childSetCommitCallback("radio stretch",commit_select_tool,NULL);
|
||||
mRadioSelectFace = getChild<LLCheckBoxCtrl>("radio select face");
|
||||
mRadioSelectFace = getChild<LLCheckBoxCtrl>("radio select face");
|
||||
childSetCommitCallback("radio select face",commit_select_tool,NULL);
|
||||
mRadioAlign = getChild<LLCheckBoxCtrl>("radio align");
|
||||
mRadioAlign = getChild<LLCheckBoxCtrl>("radio align");
|
||||
childSetCommitCallback("radio align",commit_select_tool,NULL);
|
||||
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
|
||||
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
|
||||
childSetValue("checkbox edit linked parts",(BOOL)gSavedSettings.getBOOL("EditLinkedParts"));
|
||||
childSetCommitCallback("checkbox edit linked parts",commit_select_component,this);
|
||||
mCheckSnapToGrid = getChild<LLCheckBoxCtrl>("checkbox snap to grid");
|
||||
mCheckSnapToGrid = getChild<LLCheckBoxCtrl>("checkbox snap to grid");
|
||||
childSetValue("checkbox snap to grid",(BOOL)gSavedSettings.getBOOL("SnapEnabled"));
|
||||
mBtnGridOptions = getChild<LLButton>("Options...");
|
||||
mBtnGridOptions = getChild<LLButton>("Options...");
|
||||
childSetAction("Options...",onClickGridOptions, this);
|
||||
mCheckStretchUniform = getChild<LLCheckBoxCtrl>("checkbox uniform");
|
||||
mCheckStretchUniform = getChild<LLCheckBoxCtrl>("checkbox uniform");
|
||||
childSetValue("checkbox uniform",(BOOL)gSavedSettings.getBOOL("ScaleUniform"));
|
||||
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
|
||||
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
|
||||
childSetValue("checkbox stretch textures",(BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
|
||||
mCheckLimitDrag = getChild<LLCheckBoxCtrl>("checkbox limit drag distance");
|
||||
mCheckLimitDrag = getChild<LLCheckBoxCtrl>("checkbox limit drag distance");
|
||||
childSetValue("checkbox limit drag distance",(BOOL)gSavedSettings.getBOOL("LimitDragDistance"));
|
||||
mTextGridMode = getChild<LLTextBox>("text ruler mode");
|
||||
mComboGridMode = getChild<LLComboBox>("combobox grid mode");
|
||||
mTextGridMode = getChild<LLTextBox>("text ruler mode");
|
||||
mComboGridMode = getChild<LLComboBox>("combobox grid mode");
|
||||
childSetCommitCallback("combobox grid mode",commit_grid_mode, this);
|
||||
|
||||
//
|
||||
// Create Buttons
|
||||
//
|
||||
@@ -287,9 +288,7 @@ BOOL LLFloaterTools::postBuild()
|
||||
{
|
||||
found->setClickedCallback(boost::bind(&LLFloaterTools::setObjectType, toolData[t]));
|
||||
mButtons.push_back( found );
|
||||
}
|
||||
else
|
||||
{
|
||||
}else{
|
||||
llwarns << "Tool button not found! DOA Pending." << llendl;
|
||||
}
|
||||
}
|
||||
@@ -320,14 +319,14 @@ BOOL LLFloaterTools::postBuild()
|
||||
mBtnApplyToSelection = getChild<LLButton>("button apply to selection");
|
||||
childSetAction("button apply to selection",click_apply_to_selection, (void*)0);
|
||||
|
||||
mSliderDozerSize = getChild<LLSlider>("slider brush size");
|
||||
mSliderDozerSize = getChild<LLSlider>("slider brush size");
|
||||
childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0);
|
||||
childSetValue( "slider brush size", gSavedSettings.getF32("LandBrushSize"));
|
||||
|
||||
mSliderDozerForce = getChild<LLSlider>("slider force");
|
||||
|
||||
mSliderDozerForce = getChild<LLSlider>("slider force");
|
||||
childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0);
|
||||
// the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here
|
||||
childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce")));
|
||||
childSetValue("slider force", log10(gSavedSettings.getF32("LandBrushForce")));
|
||||
|
||||
mTab = getChild<LLTabContainer>("Object Info Tabs");
|
||||
if(mTab)
|
||||
@@ -491,7 +490,7 @@ void LLFloaterTools::refresh()
|
||||
{
|
||||
value_string = "0"; // An unlinked prim is "link 0".
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
children.push_front(selected->getRootEdit()); // need root in the list too
|
||||
S32 index = 0;
|
||||
@@ -514,7 +513,7 @@ void LLFloaterTools::refresh()
|
||||
}
|
||||
childSetTextArg("link_num_obj_count", "[DESC]", desc_string);
|
||||
childSetTextArg("link_num_obj_count", "[NUM]", value_string);
|
||||
|
||||
|
||||
LLStringUtil::format_map_t selection_args;
|
||||
selection_args["COUNT"] = llformat("%.1d", (S32)prim_count);
|
||||
if(gMeshRepo.meshRezEnabled())
|
||||
@@ -597,7 +596,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
|
||||
childSetVisible("slider zoom", focus_visible);
|
||||
childSetEnabled("slider zoom", gCameraBtnZoom);
|
||||
|
||||
mRadioZoom ->set( !gCameraBtnOrbit &&
|
||||
mRadioZoom ->set(!gCameraBtnOrbit &&
|
||||
!gCameraBtnPan &&
|
||||
!(mask == MASK_ORBIT) &&
|
||||
!(mask == (MASK_ORBIT | MASK_ALT)) &&
|
||||
@@ -684,21 +683,21 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
|
||||
|
||||
switch (mObjectSelection->getSelectType())
|
||||
{
|
||||
case SELECT_TYPE_HUD:
|
||||
mComboGridMode->add(getString("grid_screen_text"));
|
||||
mComboGridMode->add(getString("grid_local_text"));
|
||||
//mComboGridMode->add(getString("grid_reference_text"));
|
||||
break;
|
||||
case SELECT_TYPE_WORLD:
|
||||
mComboGridMode->add(getString("grid_world_text"));
|
||||
mComboGridMode->add(getString("grid_local_text"));
|
||||
mComboGridMode->add(getString("grid_reference_text"));
|
||||
break;
|
||||
case SELECT_TYPE_ATTACHMENT:
|
||||
mComboGridMode->add(getString("grid_attachment_text"));
|
||||
mComboGridMode->add(getString("grid_local_text"));
|
||||
mComboGridMode->add(getString("grid_reference_text"));
|
||||
break;
|
||||
case SELECT_TYPE_HUD:
|
||||
mComboGridMode->add(getString("grid_screen_text"));
|
||||
mComboGridMode->add(getString("grid_local_text"));
|
||||
//mComboGridMode->add(getString("grid_reference_text"));
|
||||
break;
|
||||
case SELECT_TYPE_WORLD:
|
||||
mComboGridMode->add(getString("grid_world_text"));
|
||||
mComboGridMode->add(getString("grid_local_text"));
|
||||
mComboGridMode->add(getString("grid_reference_text"));
|
||||
break;
|
||||
case SELECT_TYPE_ATTACHMENT:
|
||||
mComboGridMode->add(getString("grid_attachment_text"));
|
||||
mComboGridMode->add(getString("grid_local_text"));
|
||||
mComboGridMode->add(getString("grid_reference_text"));
|
||||
break;
|
||||
}
|
||||
|
||||
mComboGridMode->setCurrentByIndex(index);
|
||||
@@ -832,8 +831,8 @@ void LLFloaterTools::onOpen()
|
||||
mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
|
||||
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
|
||||
|
||||
// gMenuBarView->setItemVisible(std::string("Tools"), TRUE);
|
||||
// gMenuBarView->arrange();
|
||||
//gMenuBarView->setItemVisible(std::string("Tools"), TRUE);
|
||||
//gMenuBarView->arrange();
|
||||
}
|
||||
|
||||
// virtual
|
||||
@@ -868,7 +867,7 @@ void LLFloaterTools::onClose(bool app_quitting)
|
||||
// so manually reset tool to default (pie menu tool)
|
||||
LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// Switch back to mouselook toolset
|
||||
LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset);
|
||||
@@ -963,10 +962,7 @@ void commit_slider_dozer_force(LLUICtrl *ctrl, void*)
|
||||
gSavedSettings.setF32("LandBrushForce", dozer_force);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void click_apply_to_selection(void* user)
|
||||
void click_apply_to_selection(void*)
|
||||
{
|
||||
LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal();
|
||||
}
|
||||
@@ -1028,13 +1024,6 @@ void commit_select_component(LLUICtrl *ctrl, void *data)
|
||||
}
|
||||
}
|
||||
|
||||
void commit_grid_mode(LLUICtrl *ctrl, void *data)
|
||||
{
|
||||
LLComboBox* combo = (LLComboBox*)ctrl;
|
||||
|
||||
LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterTools::setObjectType( LLPCode pcode )
|
||||
{
|
||||
@@ -1043,6 +1032,13 @@ void LLFloaterTools::setObjectType( LLPCode pcode )
|
||||
gFocusMgr.setMouseCapture(NULL);
|
||||
}
|
||||
|
||||
void commit_grid_mode(LLUICtrl *ctrl, void *data)
|
||||
{
|
||||
LLComboBox* combo = (LLComboBox*)ctrl;
|
||||
|
||||
LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterTools::onClickGridOptions(void* data)
|
||||
{
|
||||
@@ -1069,25 +1065,25 @@ void LLFloaterTools::onSelectTreesGrass(LLUICtrl*, void*)
|
||||
{
|
||||
const std::string &selected = gFloaterTools->mComboTreesGrass->getValue();
|
||||
LLPCode pcode = LLToolPlacer::getObjectType();
|
||||
if (pcode == LL_PCODE_LEGACY_TREE)
|
||||
if (pcode == LL_PCODE_LEGACY_TREE)
|
||||
{
|
||||
gSavedSettings.setString("LastTree", selected);
|
||||
}
|
||||
else if (pcode == LL_PCODE_LEGACY_GRASS)
|
||||
}
|
||||
else if (pcode == LL_PCODE_LEGACY_GRASS)
|
||||
{
|
||||
gSavedSettings.setString("LastGrass", selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterTools::updateTreeGrassCombo(bool visible)
|
||||
{
|
||||
LLTextBox* tree_grass_label = getChild<LLTextBox>("tree_grass_label");
|
||||
if (visible)
|
||||
if (visible)
|
||||
{
|
||||
LLPCode pcode = LLToolPlacer::getObjectType();
|
||||
std::map<std::string, S32>::iterator it, end;
|
||||
std::string selected;
|
||||
if (pcode == LL_PCODE_LEGACY_TREE)
|
||||
if (pcode == LL_PCODE_LEGACY_TREE)
|
||||
{
|
||||
tree_grass_label->setVisible(visible);
|
||||
LLButton* button = getChild<LLButton>("ToolTree");
|
||||
@@ -1096,8 +1092,8 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
|
||||
selected = gSavedSettings.getString("LastTree");
|
||||
it = LLVOTree::sSpeciesNames.begin();
|
||||
end = LLVOTree::sSpeciesNames.end();
|
||||
}
|
||||
else if (pcode == LL_PCODE_LEGACY_GRASS)
|
||||
}
|
||||
else if (pcode == LL_PCODE_LEGACY_GRASS)
|
||||
{
|
||||
tree_grass_label->setVisible(visible);
|
||||
LLButton* button = getChild<LLButton>("ToolGrass");
|
||||
@@ -1106,8 +1102,8 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
|
||||
selected = gSavedSettings.getString("LastGrass");
|
||||
it = LLVOGrass::sSpeciesNames.begin();
|
||||
end = LLVOGrass::sSpeciesNames.end();
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
mComboTreesGrass->removeall();
|
||||
mComboTreesGrass->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label
|
||||
@@ -1122,7 +1118,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
|
||||
|
||||
int select = 0, i = 0;
|
||||
|
||||
while (it != end)
|
||||
while (it != end)
|
||||
{
|
||||
const std::string &species = it->first;
|
||||
mComboTreesGrass->add(species); ++i;
|
||||
|
||||
@@ -38,18 +38,18 @@
|
||||
#include "llparcelselection.h"
|
||||
|
||||
class LLButton;
|
||||
class LLTextBox;
|
||||
class LLTool;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLTabContainer;
|
||||
class LLComboBox;
|
||||
class LLPanelPermissions;
|
||||
class LLPanelObject;
|
||||
class LLPanelVolume;
|
||||
class LLPanelContents;
|
||||
class LLPanelFace;
|
||||
class LLPanelLandInfo;
|
||||
class LLComboBox;
|
||||
class LLSlider;
|
||||
class LLTabContainer;
|
||||
class LLTextBox;
|
||||
class LLTool;
|
||||
class LLParcelSelection;
|
||||
class LLObjectSelection;
|
||||
|
||||
@@ -72,8 +72,10 @@ public:
|
||||
virtual ~LLFloaterTools();
|
||||
|
||||
virtual void onOpen();
|
||||
virtual void onClose(bool app_quitting);
|
||||
virtual BOOL canClose();
|
||||
virtual void onClose(bool app_quitting);
|
||||
/*virtual*/ void draw();
|
||||
virtual void onFocusReceived();
|
||||
|
||||
// call this once per frame to handle visibility, rect location,
|
||||
// button highlights, etc.
|
||||
@@ -93,24 +95,20 @@ public:
|
||||
PANEL_COUNT
|
||||
};
|
||||
|
||||
/*virtual*/ void draw();
|
||||
|
||||
void dirty();
|
||||
void showPanel(EInfoPanel panel);
|
||||
|
||||
void setStatusText(const std::string& text);
|
||||
virtual void onFocusReceived();
|
||||
static void setEditTool(void* data);
|
||||
void saveLastTool();
|
||||
private:
|
||||
|
||||
private:
|
||||
void refresh();
|
||||
|
||||
static void setObjectType( LLPCode pcode );
|
||||
static void onClickGridOptions(void* data);
|
||||
|
||||
public:
|
||||
|
||||
LLButton *mBtnFocus;
|
||||
LLButton *mBtnMove;
|
||||
LLButton *mBtnEdit;
|
||||
@@ -146,6 +144,7 @@ public:
|
||||
LLCheckBoxCtrl* mCheckStretchTexture;
|
||||
LLCheckBoxCtrl* mCheckLimitDrag;
|
||||
|
||||
|
||||
LLButton *mBtnRotateLeft;
|
||||
LLButton *mBtnRotateReset;
|
||||
LLButton *mBtnRotateRight;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file llfloaternamedesc.h
|
||||
* @brief LLFloaterNameDesc class definition
|
||||
* @file llfloaterurlentry.h
|
||||
* @brief LLFloaterURLEntry class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
||||
*
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltracker.h"
|
||||
#include "lltrans.h"
|
||||
#include "llurldispatcher.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewerregion.h"
|
||||
@@ -1625,7 +1626,8 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
|
||||
}
|
||||
else
|
||||
{
|
||||
list->addCommentText(std::string("None found."));
|
||||
// if we found nothing, say "none"
|
||||
list->addCommentText(LLTrans::getString("worldmap_results_none_found"));
|
||||
list->operateOnAll(LLCtrlListInterface::OP_DESELECT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,11 +67,14 @@
|
||||
#include "llresmgr.h"
|
||||
#include "pipeline.h"
|
||||
#include "llspatialpartition.h"
|
||||
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// Height of the yellow selection highlight posts for land
|
||||
const F32 PARCEL_POST_HEIGHT = 0.666f;
|
||||
|
||||
// Returns true if you got at least one object
|
||||
void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
@@ -708,29 +711,27 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
|
||||
x2 = x1 + PARCEL_GRID_STEP_METERS;
|
||||
y2 = y1;
|
||||
|
||||
{
|
||||
dy = (pos_y - y1) + DIST_OFFSET;
|
||||
|
||||
if (pos_x < x1)
|
||||
dx = pos_x - x1;
|
||||
else if (pos_x > x2)
|
||||
dx = pos_x - x2;
|
||||
else
|
||||
dx = 0;
|
||||
|
||||
dist = dx*dx+dy*dy;
|
||||
dy = (pos_y - y1) + DIST_OFFSET;
|
||||
|
||||
if (dist < MIN_DIST_SQ)
|
||||
alpha = MAX_ALPHA;
|
||||
else if (dist > MAX_DIST_SQ)
|
||||
alpha = 0.0f;
|
||||
else
|
||||
alpha = 30/dist;
|
||||
if (pos_x < x1)
|
||||
dx = pos_x - x1;
|
||||
else if (pos_x > x2)
|
||||
dx = pos_x - x2;
|
||||
else
|
||||
dx = 0;
|
||||
|
||||
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
||||
dist = dx*dx+dy*dy;
|
||||
|
||||
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
||||
}
|
||||
if (dist < MIN_DIST_SQ)
|
||||
alpha = MAX_ALPHA;
|
||||
else if (dist > MAX_DIST_SQ)
|
||||
alpha = 0.0f;
|
||||
else
|
||||
alpha = 30/dist;
|
||||
|
||||
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
||||
|
||||
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
||||
|
||||
if ((pos_y - y1) < 0) direction = SOUTH_MASK;
|
||||
else direction = NORTH_MASK;
|
||||
@@ -748,29 +749,27 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
|
||||
x2 = x1;
|
||||
y2 = y1 + PARCEL_GRID_STEP_METERS;
|
||||
|
||||
{
|
||||
dx = (pos_x - x1) + DIST_OFFSET;
|
||||
|
||||
if (pos_y < y1)
|
||||
dy = pos_y - y1;
|
||||
else if (pos_y > y2)
|
||||
dy = pos_y - y2;
|
||||
else
|
||||
dy = 0;
|
||||
dx = (pos_x - x1) + DIST_OFFSET;
|
||||
|
||||
dist = dx*dx+dy*dy;
|
||||
|
||||
if (dist < MIN_DIST_SQ)
|
||||
alpha = MAX_ALPHA;
|
||||
else if (dist > MAX_DIST_SQ)
|
||||
alpha = 0.0f;
|
||||
else
|
||||
alpha = 30/dist;
|
||||
if (pos_y < y1)
|
||||
dy = pos_y - y1;
|
||||
else if (pos_y > y2)
|
||||
dy = pos_y - y2;
|
||||
else
|
||||
dy = 0;
|
||||
|
||||
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
||||
dist = dx*dx+dy*dy;
|
||||
|
||||
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
||||
}
|
||||
if (dist < MIN_DIST_SQ)
|
||||
alpha = MAX_ALPHA;
|
||||
else if (dist > MAX_DIST_SQ)
|
||||
alpha = 0.0f;
|
||||
else
|
||||
alpha = 30/dist;
|
||||
|
||||
alpha = llclamp(alpha, 0.0f, MAX_ALPHA);
|
||||
|
||||
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
||||
|
||||
if ((pos_x - x1) > 0) direction = WEST_MASK;
|
||||
else direction = EAST_MASK;
|
||||
@@ -927,4 +926,3 @@ void LLViewerObjectList::renderObjectBeacons()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ public:
|
||||
void setAlpha(F32 alpha);
|
||||
void setZCompare(const BOOL zcompare);
|
||||
void setDoFade(const BOOL do_fade);
|
||||
bool getDoFade() const { return mDoFade; }
|
||||
// void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; }
|
||||
|
||||
// mMaxLines of -1 means unlimited lines.
|
||||
|
||||
@@ -50,19 +50,20 @@
|
||||
#include "llchat.h"
|
||||
#include "llconsole.h"
|
||||
#include "llfloater.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llimview.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llinventory.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llfloateractivespeakers.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterchat.h"
|
||||
#include "llfloatergroupinfo.h"
|
||||
#include "llimview.h"
|
||||
#include "llinventory.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llnotify.h"
|
||||
#include "llresmgr.h"
|
||||
#include "lltrans.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "llviewertexteditor.h"
|
||||
#include "llviewermessage.h"
|
||||
@@ -2544,7 +2545,7 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string
|
||||
// add log end message
|
||||
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
|
||||
{
|
||||
message = LLFloaterChat::getInstance()->getString("IM_logging_string");
|
||||
message = LLFloaterChat::getInstance()->getString("IM_end_log_string");
|
||||
}
|
||||
break;
|
||||
case LLLogChat::LOG_LINE:
|
||||
@@ -2562,19 +2563,8 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string
|
||||
void LLFloaterIMPanel::showSessionStartError(
|
||||
const std::string& error_string)
|
||||
{
|
||||
//the error strings etc. should be really be static and local
|
||||
//to this file instead of in the LLFloaterIM
|
||||
//but they were in llimview.cpp first and unfortunately
|
||||
//some translations into non English languages already occurred
|
||||
//thus making it a tad harder to change over to a
|
||||
//"correct" solution. The best solution
|
||||
//would be to store all of the misc. strings into
|
||||
//their own XML file which would be read in by any LLIMPanel
|
||||
//post build function instead of repeating the same info
|
||||
//in the group, adhoc and normal IM xml files.
|
||||
LLSD args;
|
||||
args["REASON"] =
|
||||
LLFloaterIM::sErrorStringsMap[error_string];
|
||||
args["REASON"] = LLTrans::getString(error_string);
|
||||
args["RECIPIENT"] = getTitle();
|
||||
|
||||
LLSD payload;
|
||||
@@ -2592,13 +2582,14 @@ void LLFloaterIMPanel::showSessionEventError(
|
||||
const std::string& error_string)
|
||||
{
|
||||
LLSD args;
|
||||
std::string recipient = getTitle();
|
||||
std::string reason = LLFloaterIM::sErrorStringsMap[error_string];
|
||||
boost::replace_all(reason, "[RECIPIENT]", recipient);
|
||||
std::string event = LLFloaterIM::sEventStringsMap[event_string];
|
||||
boost::replace_all(event, "[RECIPIENT]", recipient);
|
||||
args["REASON"] = reason;
|
||||
args["EVENT"] = event;
|
||||
LLStringUtil::format_map_t event_args;
|
||||
|
||||
event_args["RECIPIENT"] = getTitle();
|
||||
|
||||
args["REASON"] =
|
||||
LLTrans::getString(error_string);
|
||||
args["EVENT"] =
|
||||
LLTrans::getString(event_string, event_args);
|
||||
|
||||
LLNotifications::instance().add(
|
||||
"ChatterBoxSessionEventError",
|
||||
@@ -2611,7 +2602,7 @@ void LLFloaterIMPanel::showSessionForceClose(
|
||||
LLSD args;
|
||||
|
||||
args["NAME"] = getTitle();
|
||||
args["REASON"] = LLFloaterIM::sForceCloseSessionMap[reason_string];
|
||||
args["REASON"] = LLTrans::getString(reason_string);
|
||||
|
||||
LLSD payload;
|
||||
payload["session_id"] = mSessionUUID;
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "llhttpclient.h"
|
||||
#include "llsdutil_math.h"
|
||||
#include "llstring.h"
|
||||
#include "lltrans.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "llagent.h"
|
||||
@@ -81,19 +82,6 @@
|
||||
//
|
||||
LLIMMgr* gIMMgr = NULL;
|
||||
|
||||
//
|
||||
// Statics
|
||||
//
|
||||
// *FIXME: make these all either UIStrings or Strings
|
||||
static std::string sOnlyUserMessage;
|
||||
static LLUIString sOfflineMessage;
|
||||
static std::string sMutedMessage;
|
||||
static LLUIString sInviteMessage;
|
||||
|
||||
std::map<std::string,std::string> LLFloaterIM::sEventStringsMap;
|
||||
std::map<std::string,std::string> LLFloaterIM::sErrorStringsMap;
|
||||
std::map<std::string,std::string> LLFloaterIM::sForceCloseSessionMap;
|
||||
|
||||
//
|
||||
// Helper Functions
|
||||
//
|
||||
@@ -172,18 +160,16 @@ public:
|
||||
gIMMgr->clearPendingAgentListUpdates(mSessionID);
|
||||
gIMMgr->clearPendingInvitation(mSessionID);
|
||||
|
||||
LLFloaterIMPanel* floaterp =
|
||||
gIMMgr->findFloaterBySession(mSessionID);
|
||||
LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(mSessionID);
|
||||
|
||||
if ( floaterp )
|
||||
{
|
||||
if ( 404 == statusNum )
|
||||
{
|
||||
std::string error_string;
|
||||
error_string = "does not exist";
|
||||
error_string = "session_does_not_exist_error";
|
||||
|
||||
floaterp->showSessionStartError(
|
||||
error_string);
|
||||
floaterp->showSessionStartError(error_string);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,86 +236,6 @@ LLFloaterIM::LLFloaterIM()
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_im.xml");
|
||||
}
|
||||
|
||||
BOOL LLFloaterIM::postBuild()
|
||||
{
|
||||
// IM session initiation warnings
|
||||
sOnlyUserMessage = getString("only_user_message");
|
||||
sOfflineMessage = getString("offline_message");
|
||||
sMutedMessage = getString("muted_message");
|
||||
|
||||
sInviteMessage = getString("invite_message");
|
||||
|
||||
if ( sErrorStringsMap.find("generic") == sErrorStringsMap.end() )
|
||||
{
|
||||
sErrorStringsMap["generic"] =
|
||||
getString("generic_request_error");
|
||||
}
|
||||
|
||||
if ( sErrorStringsMap.find("unverified") ==
|
||||
sErrorStringsMap.end() )
|
||||
{
|
||||
sErrorStringsMap["unverified"] =
|
||||
getString("insufficient_perms_error");
|
||||
}
|
||||
|
||||
if ( sErrorStringsMap.end() ==
|
||||
sErrorStringsMap.find("no_ability") )
|
||||
{
|
||||
sErrorStringsMap["no_ability"] =
|
||||
getString("no_ability_error");
|
||||
}
|
||||
|
||||
if ( sErrorStringsMap.end() ==
|
||||
sErrorStringsMap.find("muted") )
|
||||
{
|
||||
sErrorStringsMap["muted"] =
|
||||
getString("muted_error");
|
||||
}
|
||||
|
||||
if ( sErrorStringsMap.end() ==
|
||||
sErrorStringsMap.find("not_a_moderator") )
|
||||
{
|
||||
sErrorStringsMap["not_a_moderator"] =
|
||||
getString("not_a_mod_error");
|
||||
}
|
||||
|
||||
if ( sErrorStringsMap.end() ==
|
||||
sErrorStringsMap.find("does not exist") )
|
||||
{
|
||||
sErrorStringsMap["does not exist"] =
|
||||
getString("session_does_not_exist_error");
|
||||
}
|
||||
|
||||
if ( sEventStringsMap.end() == sEventStringsMap.find("add") )
|
||||
{
|
||||
sEventStringsMap["add"] =
|
||||
getString("add_session_event");
|
||||
}
|
||||
|
||||
if ( sEventStringsMap.end() == sEventStringsMap.find("message") )
|
||||
{
|
||||
sEventStringsMap["message"] =
|
||||
getString("message_session_event");
|
||||
}
|
||||
|
||||
|
||||
if ( sForceCloseSessionMap.end() ==
|
||||
sForceCloseSessionMap.find("removed") )
|
||||
{
|
||||
sForceCloseSessionMap["removed"] =
|
||||
getString("removed_from_group");
|
||||
}
|
||||
|
||||
if ( sForceCloseSessionMap.end() ==
|
||||
sForceCloseSessionMap.find("no ability") )
|
||||
{
|
||||
sForceCloseSessionMap["no ability"] =
|
||||
getString("close_on_no_ability");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLIMViewFriendObserver
|
||||
//
|
||||
@@ -645,10 +551,10 @@ void LLIMMgr::addMessage(
|
||||
{
|
||||
// *TODO:translate (low priority, god ability)
|
||||
std::ostringstream bonus_info;
|
||||
bonus_info << "*** parent estate: "
|
||||
bonus_info << LLTrans::getString("***")+ " "+ LLTrans::getString("IMParentEstate") + LLTrans::getString(":") + " "
|
||||
<< parent_estate_id
|
||||
<< ((parent_estate_id == 1) ? ", mainland" : "")
|
||||
<< ((parent_estate_id == 5) ? ", teen" : "");
|
||||
<< ((parent_estate_id == 1) ? LLTrans::getString(",") + LLTrans::getString("IMMainland") : "")
|
||||
<< ((parent_estate_id == 5) ? LLTrans::getString(",") + LLTrans::getString ("IMTeen") : "");
|
||||
|
||||
// once we have web-services (or something) which returns
|
||||
// information about a region id, we can print this out
|
||||
@@ -717,23 +623,20 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
|
||||
// null session id means near me (chat history)
|
||||
if (session_id.isNull())
|
||||
{
|
||||
LLFloaterChat* floaterp = LLFloaterChat::getInstance();
|
||||
|
||||
message = floaterp->getString(message_name);
|
||||
message = LLTrans::getString(message_name);
|
||||
message.setArgs(args);
|
||||
|
||||
LLChat chat(message);
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
|
||||
LLFloaterChat::getInstance()->addChatHistory(chat);
|
||||
}
|
||||
else // going to IM session
|
||||
{
|
||||
LLFloaterIMPanel* floaterp = findFloaterBySession(session_id);
|
||||
if (floaterp)
|
||||
message = LLTrans::getString(message_name + "-im");
|
||||
message.setArgs(args);
|
||||
if (hasSession(session_id))
|
||||
{
|
||||
message = floaterp->getString(message_name);
|
||||
message.setArgs(args);
|
||||
|
||||
gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString());
|
||||
}
|
||||
}
|
||||
@@ -764,7 +667,7 @@ int LLIMMgr::getIMUnreadCount()
|
||||
}
|
||||
|
||||
// This method returns TRUE if the local viewer has a session
|
||||
// currently open keyed to the uuid.
|
||||
// currently open keyed to the uuid.
|
||||
BOOL LLIMMgr::isIMSessionOpen(const LLUUID& uuid)
|
||||
{
|
||||
LLFloaterIMPanel* floater = findFloaterBySession(uuid);
|
||||
@@ -780,12 +683,14 @@ LLUUID LLIMMgr::addP2PSession(const std::string& name,
|
||||
LLUUID session_id = addSession(name, IM_NOTHING_SPECIAL, other_participant_id);
|
||||
|
||||
LLFloaterIMPanel* floater = findFloaterBySession(session_id);
|
||||
if(floater)
|
||||
if (floater)
|
||||
{
|
||||
LLVoiceChannelP2P* voice_channelp = (LLVoiceChannelP2P*)floater->getVoiceChannel();
|
||||
voice_channelp->setSessionHandle(voice_session_handle, caller_uri);
|
||||
LLVoiceChannelP2P* voice_channel = dynamic_cast<LLVoiceChannelP2P*>(floater->getVoiceChannel());
|
||||
if (voice_channel)
|
||||
{
|
||||
voice_channel->setSessionHandle(voice_session_handle, caller_uri);
|
||||
}
|
||||
}
|
||||
|
||||
return session_id;
|
||||
}
|
||||
|
||||
@@ -951,7 +856,7 @@ void LLIMMgr::inviteToSession(
|
||||
payload["session_handle"] = session_handle;
|
||||
payload["session_uri"] = session_uri;
|
||||
payload["notify_box_type"] = notify_box_type;
|
||||
|
||||
|
||||
LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id);
|
||||
if (channelp && channelp->callStarted())
|
||||
{
|
||||
@@ -962,17 +867,13 @@ void LLIMMgr::inviteToSession(
|
||||
|
||||
if (type == IM_SESSION_P2P_INVITE || ad_hoc_invite)
|
||||
{
|
||||
// is the inviter a friend?
|
||||
if (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)
|
||||
if ( // we're rejecting non-friend voice calls and this isn't a friend
|
||||
(gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL))
|
||||
)
|
||||
{
|
||||
// if not, and we are ignoring voice invites from non-friends
|
||||
// then silently decline
|
||||
if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
|
||||
{
|
||||
// invite not from a friend, so decline
|
||||
LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 1);
|
||||
return;
|
||||
}
|
||||
// silently decline the call
|
||||
LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -980,7 +881,8 @@ void LLIMMgr::inviteToSession(
|
||||
{
|
||||
if (caller_name.empty())
|
||||
{
|
||||
gCacheName->get(caller_id, true, boost::bind(&LLIMMgr::onInviteNameLookup,_1,_2,_3,payload));
|
||||
gCacheName->get(caller_id, true, // voice
|
||||
boost::bind(&LLIMMgr::onInviteNameLookup, _1, _2, _3, payload));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -998,7 +900,7 @@ void LLIMMgr::inviteToSession(
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
//static
|
||||
void LLIMMgr::onInviteNameLookup(const LLUUID& id, const std::string& full_name, bool is_group, LLSD payload)
|
||||
{
|
||||
payload["caller_name"] = full_name;
|
||||
@@ -1234,7 +1136,8 @@ void LLIMMgr::noteOfflineUsers(
|
||||
S32 count = ids.count();
|
||||
if(count == 0)
|
||||
{
|
||||
floater->addHistoryLine(sOnlyUserMessage, gSavedSettings.getColor4("SystemChatColor"));
|
||||
const std::string& only_user = LLTrans::getString("only_user_message");
|
||||
floater->addHistoryLine(only_user, gSavedSettings.getColor4("SystemChatColor"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1244,10 +1147,11 @@ void LLIMMgr::noteOfflineUsers(
|
||||
{
|
||||
info = at.getBuddyInfo(ids.get(i));
|
||||
std::string full_name;
|
||||
if(info && !info->isOnline()
|
||||
&& gCacheName->getFullName(ids.get(i), full_name))
|
||||
if (info
|
||||
&& !info->isOnline()
|
||||
&& gCacheName->getFullName(ids.get(i), full_name))
|
||||
{
|
||||
LLUIString offline = sOfflineMessage;
|
||||
LLUIString offline = LLTrans::getString("offline_message");
|
||||
offline.setArg("[NAME]", full_name);
|
||||
floater->addHistoryLine(offline, gSavedSettings.getColor4("SystemChatColor"));
|
||||
}
|
||||
@@ -1272,7 +1176,8 @@ void LLIMMgr::noteMutedUsers(LLFloaterIMPanel* floater,
|
||||
{
|
||||
if( ml->isMuted(ids.get(i)) )
|
||||
{
|
||||
LLUIString muted = sMutedMessage;
|
||||
LLUIString muted = LLTrans::getString("muted_message");
|
||||
|
||||
floater->addHistoryLine(muted);
|
||||
break;
|
||||
}
|
||||
@@ -1474,10 +1379,8 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
//throw an error dialog and close the temp session's
|
||||
//floater
|
||||
LLFloaterIMPanel* floater =
|
||||
gIMMgr->findFloaterBySession(temp_session_id);
|
||||
//throw an error dialog and close the temp session's floater
|
||||
LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(temp_session_id);
|
||||
|
||||
if ( floater )
|
||||
{
|
||||
|
||||
@@ -221,7 +221,7 @@ private:
|
||||
std::list<LLUUID> mIgnoreGroupList;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
S32 getIgnoreGroupListCount() { return mIgnoreGroupList.size(); }
|
||||
};
|
||||
|
||||
@@ -230,11 +230,6 @@ class LLFloaterIM : public LLMultiFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterIM();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
static std::map<std::string,std::string> sEventStringsMap;
|
||||
static std::map<std::string,std::string> sErrorStringsMap;
|
||||
static std::map<std::string,std::string> sForceCloseSessionMap;
|
||||
};
|
||||
|
||||
// Globals
|
||||
|
||||
@@ -94,13 +94,6 @@ const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] =
|
||||
LLManip::LL_FACE_NEGZ
|
||||
};
|
||||
|
||||
|
||||
F32 get_default_max_prim_scale(bool is_flora)
|
||||
{
|
||||
//CF: both scales are 256, so what?, I now use gridmanagersetting
|
||||
return gHippoLimits->getMaxPrimScale();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLManipScale::setUniform(BOOL b)
|
||||
{
|
||||
@@ -966,8 +959,11 @@ void LLManipScale::dragCorner( S32 x, S32 y )
|
||||
mInSnapRegime = FALSE;
|
||||
}
|
||||
|
||||
F32 max_scale_factor = get_default_max_prim_scale() / MIN_PRIM_SCALE;
|
||||
F32 min_scale_factor = MIN_PRIM_SCALE / get_default_max_prim_scale();
|
||||
F32 max_prim_scale = gHippoLimits->getMaxPrimScale();
|
||||
F32 min_prim_scale = gHippoLimits->getMinPrimScale();
|
||||
|
||||
F32 max_scale_factor = max_prim_scale / min_prim_scale;
|
||||
F32 min_scale_factor = min_prim_scale / max_prim_scale;
|
||||
|
||||
// find max and min scale factors that will make biggest object hit max absolute scale and smallest object hit min absolute scale
|
||||
for (LLObjectSelection::iterator iter = mObjectSelection->begin();
|
||||
@@ -982,10 +978,10 @@ void LLManipScale::dragCorner( S32 x, S32 y )
|
||||
{
|
||||
const LLVector3& scale = selectNode->mSavedScale;
|
||||
|
||||
F32 cur_max_scale_factor = llmin( get_default_max_prim_scale(LLPickInfo::isFlora(cur)) / scale.mV[VX], get_default_max_prim_scale(LLPickInfo::isFlora(cur)) / scale.mV[VY], get_default_max_prim_scale(LLPickInfo::isFlora(cur)) / scale.mV[VZ] );
|
||||
F32 cur_max_scale_factor = llmin( max_prim_scale / scale.mV[VX], max_prim_scale / scale.mV[VY], max_prim_scale / scale.mV[VZ] );
|
||||
max_scale_factor = llmin( max_scale_factor, cur_max_scale_factor );
|
||||
|
||||
F32 cur_min_scale_factor = llmax( MIN_PRIM_SCALE / scale.mV[VX], MIN_PRIM_SCALE / scale.mV[VY], MIN_PRIM_SCALE / scale.mV[VZ] );
|
||||
F32 cur_min_scale_factor = llmax( min_prim_scale / scale.mV[VX], min_prim_scale / scale.mV[VY], min_prim_scale / scale.mV[VZ] );
|
||||
min_scale_factor = llmax( min_scale_factor, cur_min_scale_factor );
|
||||
}
|
||||
}
|
||||
@@ -1288,7 +1284,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto
|
||||
|
||||
F32 denom = axis * dir_local;
|
||||
F32 desired_delta_size = is_approx_zero(denom) ? 0.f : (delta_local_mag / denom); // in meters
|
||||
F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, MIN_PRIM_SCALE, get_default_max_prim_scale(LLPickInfo::isFlora(cur)));
|
||||
F32 desired_scale = llclamp(selectNode->mSavedScale.mV[axis_index] + desired_delta_size, gHippoLimits->getMinPrimScale(), gHippoLimits->getMaxPrimScale());
|
||||
// propagate scale constraint back to position offset
|
||||
desired_delta_size = desired_scale - selectNode->mSavedScale.mV[axis_index]; // propagate constraint back to position
|
||||
|
||||
@@ -1989,7 +1985,7 @@ F32 LLManipScale::partToMaxScale( S32 part, const LLBBox &bbox ) const
|
||||
max_extent = bbox_extents.mV[i];
|
||||
}
|
||||
}
|
||||
max_scale_factor = bbox_extents.magVec() * get_default_max_prim_scale() / max_extent;
|
||||
max_scale_factor = bbox_extents.magVec() * gHippoLimits->getMaxPrimScale() / max_extent;
|
||||
|
||||
if (getUniform())
|
||||
{
|
||||
@@ -2004,7 +2000,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const
|
||||
{
|
||||
LLVector3 bbox_extents = unitVectorToLocalBBoxExtent( partToUnitVector( part ), bbox );
|
||||
bbox_extents.abs();
|
||||
F32 min_extent = get_default_max_prim_scale();
|
||||
F32 min_extent = gHippoLimits->getMaxPrimScale();
|
||||
for (U32 i = VX; i <= VZ; i++)
|
||||
{
|
||||
if (bbox_extents.mV[i] > 0.f && bbox_extents.mV[i] < min_extent)
|
||||
@@ -2012,7 +2008,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const
|
||||
min_extent = bbox_extents.mV[i];
|
||||
}
|
||||
}
|
||||
F32 min_scale_factor = bbox_extents.magVec() * MIN_PRIM_SCALE / min_extent;
|
||||
F32 min_scale_factor = bbox_extents.magVec() * gHippoLimits->getMinPrimScale() / min_extent;
|
||||
|
||||
if (getUniform())
|
||||
{
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
#include "llbbox.h"
|
||||
|
||||
|
||||
F32 get_default_max_prim_scale(bool is_flora = false);
|
||||
|
||||
class LLToolComposite;
|
||||
class LLColor4;
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ void LLMediaRemoteCtrl::enableMediaButtons()
|
||||
LLButton* music_stop_btn = mMusicStopBtn;
|
||||
LLButton* music_pause_btn = mMusicPauseBtn;
|
||||
LLButton* media_play_btn = mMediaPlayBtn;
|
||||
LLButton* media_stop_btn = mMediaPlayBtn;
|
||||
LLButton* media_stop_btn = mMediaStopBtn;
|
||||
LLButton* media_pause_btn = mMediaPauseBtn;
|
||||
LLIconCtrl* media_icon = mMediaIcon;
|
||||
|
||||
|
||||
@@ -1104,19 +1104,24 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat
|
||||
mMeshHeader[mesh_id] = header;
|
||||
}
|
||||
|
||||
|
||||
LLMutexLock lock(mMutex); // <FS:ND/> FIRE-7182, make sure only one thread access mPendingLOD at the same time.
|
||||
|
||||
//check for pending requests
|
||||
pending_lod_map::iterator iter = mPendingLOD.find(mesh_params);
|
||||
if (iter != mPendingLOD.end())
|
||||
{
|
||||
LLMutexLock lock(mMutex);
|
||||
// LLMutexLock lock(mMutex); <FS:ND/> FIRE-7182, lock was moved up, before calling mPendingLOD.find
|
||||
for (U32 i = 0; i < iter->second.size(); ++i)
|
||||
{
|
||||
LODRequest req(mesh_params, iter->second[i]);
|
||||
mLODReqQ.push(req);
|
||||
LLMeshRepository::sLODProcessing++;
|
||||
}
|
||||
|
||||
mPendingLOD.erase(iter); // <FS:ND/> FIRE-7182, only call erase if iter is really valid.
|
||||
}
|
||||
mPendingLOD.erase(iter);
|
||||
// mPendingLOD.erase(iter); // <FS:ND/> avoid crash by moving erase up.
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
public:
|
||||
Matcher(){}
|
||||
virtual ~Matcher() {}
|
||||
virtual BOOL matches(const LLNotificationPtr) const = 0;
|
||||
virtual bool matches(const LLNotificationPtr) const = 0;
|
||||
};
|
||||
// Walks the list and removes any stacked messages for which the given matcher returns TRUE.
|
||||
// Useful when muting people and things in order to clear out any similar previously queued messages.
|
||||
|
||||
@@ -336,7 +336,7 @@ void LLPanelClassified::processProperties(void* data, EAvatarProcessorType type)
|
||||
LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
|
||||
if(c_info && mClassifiedID == c_info->classified_id)
|
||||
{
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this);
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(LLUUID::null, this);
|
||||
|
||||
// "Location text" is actually the original
|
||||
// name that owner gave the parcel, and the location.
|
||||
@@ -571,7 +571,7 @@ void LLPanelClassified::sendClassifiedInfoRequest()
|
||||
{
|
||||
if (mClassifiedID != mRequestedID)
|
||||
{
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(mCreatorID, this);
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID::null, this);
|
||||
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(mClassifiedID);
|
||||
|
||||
mDataRequested = TRUE;
|
||||
|
||||
@@ -876,6 +876,10 @@ void LLPanelDisplay::cancel()
|
||||
|
||||
void LLPanelDisplay::apply()
|
||||
{
|
||||
U32 fsaa_value = childGetValue("fsaa").asInteger();
|
||||
bool apply_fsaa_change = !gSavedSettings.getBOOL("RenderUseFBO") && (mFSAASamples != fsaa_value);
|
||||
gSavedSettings.setU32("RenderFSAASamples", fsaa_value);
|
||||
|
||||
applyResolution();
|
||||
|
||||
// Only set window size if we're not in fullscreen mode
|
||||
@@ -887,7 +891,7 @@ void LLPanelDisplay::apply()
|
||||
// Hardware tab
|
||||
//Still do a bit of voodoo here. V2 forces restart to change FSAA with FBOs off.
|
||||
//Let's not do that, and instead do pre-V2 FSAA change handling for that particular case
|
||||
if(!LLRenderTarget::sUseFBO && (mFSAASamples != (U32)childGetValue("fsaa").asInteger()))
|
||||
if(apply_fsaa_change)
|
||||
{
|
||||
bool logged_in = (LLStartUp::getStartupState() >= STATE_STARTED);
|
||||
LLWindow* window = gViewerWindow->getWindow();
|
||||
|
||||
@@ -1105,7 +1105,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
|
||||
|
||||
text.append(1, '\n');
|
||||
|
||||
text.append(llformat("%-24s %6d\n", "Total", total_amount));
|
||||
text.append(llformat("%-24s %6d\n", LLTrans::getString("GroupMoneyTotal").c_str(), total_amount));
|
||||
|
||||
if ( mImplementationp->mTextEditorp )
|
||||
{
|
||||
@@ -1227,7 +1227,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
|
||||
S32 transactions = msg->getNumberOfBlocksFast(_PREHASH_HistoryData);
|
||||
if (transactions == 0)
|
||||
{
|
||||
text.append("(none)");
|
||||
text.append(LLTrans::getString("none_text"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1252,22 +1252,22 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
|
||||
switch(type)
|
||||
{
|
||||
case TRANS_OBJECT_SALE:
|
||||
verb = "bought";
|
||||
verb = LLTrans::getString("GroupMoneyBought").c_str();
|
||||
break;
|
||||
case TRANS_GIFT:
|
||||
verb = "paid you";
|
||||
verb = LLTrans::getString("GroupMoneyPaidYou").c_str();
|
||||
break;
|
||||
case TRANS_PAY_OBJECT:
|
||||
verb = "paid into";
|
||||
verb = LLTrans::getString("GroupMoneyPaidInto").c_str();
|
||||
break;
|
||||
case TRANS_LAND_PASS_SALE:
|
||||
verb = "bought pass to";
|
||||
verb = LLTrans::getString("GroupMoneyBoughtPassTo").c_str();
|
||||
break;
|
||||
case TRANS_EVENT_FEE:
|
||||
verb = "paid fee for event";
|
||||
verb = LLTrans::getString("GroupMoneyPaidFeeForEvent").c_str();
|
||||
break;
|
||||
case TRANS_EVENT_PRIZE:
|
||||
verb = "paid prize for event";
|
||||
verb = LLTrans::getString("GroupMoneyPaidPrizeForEvent").c_str();
|
||||
break;
|
||||
default:
|
||||
verb = "";
|
||||
@@ -1429,15 +1429,18 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
|
||||
return;
|
||||
}
|
||||
|
||||
text.append("Summary for this week, beginning on ");
|
||||
text.append(LLTrans::getString("SummaryForTheWeek"));
|
||||
|
||||
text.append(start_date);
|
||||
text.append(". ");
|
||||
|
||||
if (current_interval == 0)
|
||||
{
|
||||
text.append("The next stipend day is ");
|
||||
text.append(LLTrans::getString("NextStipendDay"));
|
||||
|
||||
text.append(next_stipend_date);
|
||||
text.append("\n\n");
|
||||
text.append(llformat("%-24s%s%6d\n", "Balance",
|
||||
text.append(".\n\n");
|
||||
text.append(llformat("%-24s%s%6d\n", LLTrans::getString("GroupMoneyBalance").c_str(),
|
||||
gHippoGridManager->getConnectedGrid()->getCurrencySymbol().c_str(),
|
||||
balance));
|
||||
text.append(1, '\n');
|
||||
@@ -1445,15 +1448,15 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
|
||||
|
||||
// [DEV-29503] Hide the individual info since
|
||||
// non_exempt_member here is a wrong choice to calculate individual shares.
|
||||
// text.append( " Group Individual Share\n");
|
||||
// text.append(llformat( "%-24s %6d %6d \n", "Credits", total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members)));
|
||||
// text.append(llformat( "%-24s %6d %6d \n", "Debits", total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members)));
|
||||
// text.append(llformat( "%-24s %6d %6d \n", "Total", total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members)));
|
||||
// text.append( LLTrans::getString("GroupIndividualShare"));
|
||||
// text.append(llformat( "%-24s %6d %6d \n", LLTrans::getString("GroupMoneyCredits").c_str(), total_credits, (S32)floor((F32)total_credits/(F32)non_exempt_members)));
|
||||
// text.append(llformat( "%-24s %6d %6d \n", LLTrans::getString("GroupMoneyDebits").c_str(), total_debits, (S32)floor((F32)total_debits/(F32)non_exempt_members)));
|
||||
// text.append(llformat( "%-24s %6d %6d \n", LLTrans::getString("GroupMoneyTotal").c_str(), total_credits + total_debits, (S32)floor((F32)(total_credits + total_debits)/(F32)non_exempt_members)));
|
||||
|
||||
text.append( " Group\n");
|
||||
text.append(llformat( "%-24s %6d\n", "Credits", total_credits));
|
||||
text.append(llformat( "%-24s %6d\n", "Debits", total_debits));
|
||||
text.append(llformat( "%-24s %6d\n", "Total", total_credits + total_debits));
|
||||
text.append(llformat( "%s\n", LLTrans::getString("GroupColumn").c_str()));
|
||||
text.append(llformat( "%-24s %6d\n", LLTrans::getString("GroupMoneyCredits").c_str(), total_credits));
|
||||
text.append(llformat( "%-24s %6d\n", LLTrans::getString("GroupMoneyDebits").c_str(), total_debits));
|
||||
text.append(llformat( "%-24s %6d\n", LLTrans::getString("GroupMoneyTotal").c_str(), total_credits + total_debits));
|
||||
|
||||
if ( mImplementationp->mTextEditorp )
|
||||
{
|
||||
|
||||
@@ -115,15 +115,6 @@ enum {
|
||||
MI_VOLUME_COUNT
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
MI_HOLE_SAME,
|
||||
MI_HOLE_CIRCLE,
|
||||
@@ -377,11 +368,6 @@ BOOL LLPanelObject::postBuild()
|
||||
childSetCommitCallback("sculpt mirror control", onCommitSculptType, this);
|
||||
mCtrlSculptInvert = getChild<LLCheckBoxCtrl>("sculpt invert control");
|
||||
childSetCommitCallback("sculpt invert control", onCommitSculptType, this);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Start with everyone disabled
|
||||
clearCtrls();
|
||||
@@ -455,7 +441,7 @@ void LLPanelObject::getState( )
|
||||
}
|
||||
|
||||
LLCalc* calcp = LLCalc::getInstance();
|
||||
|
||||
|
||||
LLVOVolume *volobjp = NULL;
|
||||
if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME))
|
||||
{
|
||||
@@ -477,7 +463,7 @@ void LLPanelObject::getState( )
|
||||
}
|
||||
|
||||
// can move or rotate only linked group with move permissions, or sub-object with move and modify perms
|
||||
BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
|
||||
BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
|
||||
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"));
|
||||
|
||||
@@ -527,8 +513,12 @@ void LLPanelObject::getState( )
|
||||
mCtrlPosX->setEnabled(enable_move);
|
||||
mCtrlPosY->setEnabled(enable_move);
|
||||
mCtrlPosZ->setEnabled(enable_move);
|
||||
mBtnLinkObj->setEnabled((enable_move && !single_volume));
|
||||
mBtnUnlinkObj->setEnabled((enable_move && (selected_count > 1)));
|
||||
mBtnLinkObj->setEnabled(LLSelectMgr::getInstance()->enableLinkObjects());
|
||||
LLViewerObject* linkset_parent = objectp->getSubParent()? objectp->getSubParent() : objectp;
|
||||
mBtnUnlinkObj->setEnabled(
|
||||
LLSelectMgr::getInstance()->enableUnlinkObjects()
|
||||
&& (linkset_parent->numChildren() >= 1)
|
||||
&& LLSelectMgr::getInstance()->getSelection()->getRootObjectCount()<=1);
|
||||
mBtnCopyPos->setEnabled(enable_move);
|
||||
mBtnPastePos->setEnabled(enable_move);
|
||||
mBtnPastePosClip->setEnabled(enable_move);
|
||||
@@ -563,6 +553,9 @@ void LLPanelObject::getState( )
|
||||
mCtrlScaleX->setMaxValue(gHippoLimits->getMaxPrimScale());
|
||||
mCtrlScaleY->setMaxValue(gHippoLimits->getMaxPrimScale());
|
||||
mCtrlScaleZ->setMaxValue(gHippoLimits->getMaxPrimScale());
|
||||
mCtrlScaleX->setMinValue(gHippoLimits->getMinPrimScale());
|
||||
mCtrlScaleY->setMinValue(gHippoLimits->getMinPrimScale());
|
||||
mCtrlScaleZ->setMinValue(gHippoLimits->getMinPrimScale());
|
||||
|
||||
LLQuaternion object_rot = objectp->getRotationEdit();
|
||||
object_rot.getEulerAngles(&(mCurEulerDegrees.mV[VX]), &(mCurEulerDegrees.mV[VY]), &(mCurEulerDegrees.mV[VZ]));
|
||||
@@ -623,6 +616,7 @@ void LLPanelObject::getState( )
|
||||
childSetVisible("select_single", TRUE);
|
||||
childSetEnabled("select_single", TRUE);
|
||||
}
|
||||
|
||||
BOOL is_flexible = volobjp && volobjp->isFlexible();
|
||||
BOOL is_permanent = root_objectp->flagObjectPermanent();
|
||||
BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
|
||||
@@ -1231,19 +1225,13 @@ void LLPanelObject::getState( )
|
||||
default:
|
||||
if (editable)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mSpinScaleX->set( 1.f - scale_x );
|
||||
mSpinScaleY->set( 1.f - scale_y );
|
||||
mSpinScaleX->setMinValue(-1.f);
|
||||
mSpinScaleX->setMaxValue(1.f);
|
||||
mSpinScaleY->setMinValue(-1.f);
|
||||
mSpinScaleY->setMaxValue(1.f);
|
||||
|
||||
// Torus' Hole Size is Box/Cyl/Prism's Taper
|
||||
calcp->setVar(LLCalc::X_TAPER, 1.f - scale_x);
|
||||
calcp->setVar(LLCalc::Y_TAPER, 1.f - scale_y);
|
||||
@@ -1403,7 +1391,9 @@ void LLPanelObject::getState( )
|
||||
// sculpt texture
|
||||
if (selected_item == MI_SCULPT)
|
||||
{
|
||||
LLUUID id;
|
||||
|
||||
|
||||
LLUUID id;
|
||||
LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
|
||||
|
||||
|
||||
@@ -1414,10 +1404,11 @@ void LLPanelObject::getState( )
|
||||
mSculptTextureRevert = sculpt_params->getSculptTexture();
|
||||
mSculptTypeRevert = sculpt_params->getSculptType();
|
||||
}
|
||||
|
||||
U8 sculpt_type = sculpt_params->getSculptType();
|
||||
U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK;
|
||||
BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
|
||||
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
|
||||
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
|
||||
isMesh = (sculpt_stitching == LL_SCULPT_TYPE_MESH);
|
||||
|
||||
LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control");
|
||||
@@ -1465,7 +1456,7 @@ void LLPanelObject::getState( )
|
||||
|
||||
mCtrlSculptMirror->setVisible(sculpt_texture_visible && !isMesh);
|
||||
mCtrlSculptInvert->setVisible(sculpt_texture_visible && !isMesh);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
mObject = objectp;
|
||||
@@ -1473,7 +1464,7 @@ void LLPanelObject::getState( )
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLPanelObject::precommitValidate( LLUICtrl* ctrl, void* userdata )
|
||||
bool LLPanelObject::precommitValidate( const LLSD& data )
|
||||
{
|
||||
// TODO: Richard will fill this in later.
|
||||
return TRUE; // FALSE means that validation failed and new value should not be commited.
|
||||
@@ -1612,86 +1603,6 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
|
||||
U8 path;
|
||||
switch ( selected_type )
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case MI_CYLINDER:
|
||||
profile = LL_PCODE_PROFILE_CIRCLE;
|
||||
path = LL_PCODE_PATH_LINE;
|
||||
@@ -1900,7 +1811,7 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
|
||||
// Scale X,Y
|
||||
F32 scale_x = mSpinScaleX->get();
|
||||
F32 scale_y = mSpinScaleY->get();
|
||||
// <edit>
|
||||
// <edit>
|
||||
//if ( was_selected_type == MI_BOX || was_selected_type == MI_CYLINDER || was_selected_type == MI_PRISM)
|
||||
if ( was_selected_type == MI_BOX || was_selected_type == MI_CYLINDER || was_selected_type == MI_PRISM ||
|
||||
was_selected_type == MI_SPHERE ||
|
||||
@@ -1934,7 +1845,6 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
|
||||
// Revolutions
|
||||
F32 revolutions = mSpinRevolutions->get();
|
||||
|
||||
|
||||
if ( selected_type == MI_SPHERE )
|
||||
{
|
||||
// Snap values to valid sphere parameters.
|
||||
@@ -2140,7 +2050,7 @@ void LLPanelObject::sendPosition(BOOL btn_down)
|
||||
|
||||
LLVector3 newpos(mCtrlPosX->get(), mCtrlPosY->get(), mCtrlPosZ->get());
|
||||
LLViewerRegion* regionp = mObject->getRegion();
|
||||
|
||||
|
||||
// Clamp the Z height
|
||||
const F32 height = newpos.mV[VZ];
|
||||
const F32 min_height = LLWorld::getInstance()->getMinAllowedZ(mObject, mObject->getPositionGlobal());
|
||||
@@ -2633,9 +2543,9 @@ void LLPanelObject::onPasteSize(void* user_data)
|
||||
|
||||
LLPanelObject* self = (LLPanelObject*) user_data;
|
||||
LLCalc* calcp = LLCalc::getInstance();
|
||||
mClipboardSize.mV[VX] = llclamp(mClipboardSize.mV[VX], 0.01f, gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VY] = llclamp(mClipboardSize.mV[VY], 0.01f, gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VZ] = llclamp(mClipboardSize.mV[VZ], 0.01f, gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VX] = llclamp(mClipboardSize.mV[VX], gHippoLimits->getMinPrimScale(), gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VY] = llclamp(mClipboardSize.mV[VY], gHippoLimits->getMinPrimScale(), gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VZ] = llclamp(mClipboardSize.mV[VZ], gHippoLimits->getMinPrimScale(), gHippoLimits->getMaxPrimScale());
|
||||
|
||||
self->mCtrlScaleX->set( mClipboardSize.mV[VX] );
|
||||
self->mCtrlScaleY->set( mClipboardSize.mV[VY] );
|
||||
@@ -2716,9 +2626,9 @@ void LLPanelObject::onPasteSizeClip(void* user_data)
|
||||
std::string stringVec = wstring_to_utf8str(temp_string);
|
||||
if(!getvectorfromclip(stringVec, &mClipboardSize)) return;
|
||||
|
||||
mClipboardSize.mV[VX] = llclamp(mClipboardSize.mV[VX], 0.01f, gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VY] = llclamp(mClipboardSize.mV[VY], 0.01f, gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VZ] = llclamp(mClipboardSize.mV[VZ], 0.01f, gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VX] = llclamp(mClipboardSize.mV[VX], gHippoLimits->getMinPrimScale(), gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VY] = llclamp(mClipboardSize.mV[VY], gHippoLimits->getMinPrimScale(), gHippoLimits->getMaxPrimScale());
|
||||
mClipboardSize.mV[VZ] = llclamp(mClipboardSize.mV[VZ], gHippoLimits->getMinPrimScale(), gHippoLimits->getMaxPrimScale());
|
||||
|
||||
self->mCtrlScaleX->set( mClipboardSize.mV[VX] );
|
||||
self->mCtrlScaleY->set( mClipboardSize.mV[VY] );
|
||||
|
||||
@@ -63,15 +63,15 @@ public:
|
||||
|
||||
void refresh();
|
||||
|
||||
static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata);
|
||||
static bool precommitValidate(const LLSD& data);
|
||||
|
||||
static void onCommitLock(LLUICtrl *ctrl, void *data);
|
||||
static void onCommitPosition( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitScale( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitRotation( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTemporary( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitPhantom( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
static void onLinkObj( void* user_data);
|
||||
static void onUnlinkObj( void* user_data);
|
||||
@@ -86,8 +86,8 @@ public:
|
||||
static void onPasteRotClip( void* user_data);
|
||||
static void onCopyParams( void* user_data);
|
||||
static void onPasteParams( void* user_data);
|
||||
|
||||
static void onCommitParametric( LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
static void onCommitParametric(LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
static void onCommitMaterial( LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
static void onSelectSculpt( LLUICtrl* ctrl, void* userdata);
|
||||
static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
|
||||
static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
|
||||
|
||||
|
||||
static void onClickBuildConstants(void *);
|
||||
static const LLUUID& findItemID(const LLUUID& asset_id);
|
||||
|
||||
@@ -109,23 +109,23 @@ protected:
|
||||
void sendIsPhysical();
|
||||
void sendIsTemporary();
|
||||
void sendIsPhantom();
|
||||
|
||||
void sendSculpt();
|
||||
|
||||
void getVolumeParams(LLVolumeParams& volume_params);
|
||||
|
||||
protected:
|
||||
|
||||
static LLVector3 mClipboardPos;
|
||||
static LLVector3 mClipboardSize;
|
||||
static LLVector3 mClipboardRot;
|
||||
static LLVolumeParams mClipboardVolumeParams;
|
||||
static BOOL hasParamClipboard;
|
||||
|
||||
|
||||
S32 mComboMaterialItemCount;
|
||||
|
||||
LLTextBox* mLabelMaterial;
|
||||
LLComboBox* mComboMaterial;
|
||||
|
||||
|
||||
// Per-object options
|
||||
LLTextBox* mLabelBaseType;
|
||||
LLComboBox* mComboBaseType;
|
||||
@@ -189,15 +189,15 @@ protected:
|
||||
LLButton *mBtnCopyPos;
|
||||
LLButton *mBtnPastePos;
|
||||
LLButton *mBtnPastePosClip;
|
||||
|
||||
|
||||
LLButton *mBtnCopySize;
|
||||
LLButton *mBtnPasteSize;
|
||||
LLButton *mBtnPasteSizeClip;
|
||||
|
||||
|
||||
LLButton *mBtnCopyRot;
|
||||
LLButton *mBtnPasteRot;
|
||||
LLButton *mBtnPasteRotClip;
|
||||
|
||||
|
||||
LLButton *mBtnCopyParams;
|
||||
LLButton *mBtnPasteParams;
|
||||
|
||||
@@ -212,9 +212,6 @@ protected:
|
||||
LLCheckBoxCtrl *mCtrlSculptMirror;
|
||||
LLCheckBoxCtrl *mCtrlSculptInvert;
|
||||
|
||||
|
||||
|
||||
|
||||
LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
|
||||
BOOL mIsPhysical; // to avoid sending "physical" when not changed
|
||||
BOOL mIsTemporary; // to avoid sending "temporary" when not changed
|
||||
|
||||
@@ -94,8 +94,8 @@ public:
|
||||
LLTaskInvFVBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
U32 flags=0);
|
||||
virtual ~LLTaskInvFVBridge( ) {}
|
||||
U32 flags=0);
|
||||
virtual ~LLTaskInvFVBridge() {}
|
||||
|
||||
virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; }
|
||||
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
|
||||
@@ -243,9 +243,9 @@ void LLTaskInvFVBridge::buyItem()
|
||||
if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS)
|
||||
{
|
||||
U32 next_owner_mask = perm.getMaskNextOwner();
|
||||
args["MODIFYPERM"] = LLNotifications::instance().getGlobalString((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo");
|
||||
args["COPYPERM"] = LLNotifications::instance().getGlobalString((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo");
|
||||
args["RESELLPERM"] = LLNotifications::instance().getGlobalString((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo");
|
||||
args["MODIFYPERM"] = LLTrans::getString((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo");
|
||||
args["COPYPERM"] = LLTrans::getString((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo");
|
||||
args["RESELLPERM"] = LLTrans::getString((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo");
|
||||
}
|
||||
|
||||
std::string alertdesc;
|
||||
@@ -318,10 +318,18 @@ const std::string& LLTaskInvFVBridge::getName() const
|
||||
const std::string& LLTaskInvFVBridge::getDisplayName() const
|
||||
{
|
||||
LLInventoryItem* item = findItem();
|
||||
|
||||
if(item)
|
||||
{
|
||||
mDisplayName.assign(item->getName());
|
||||
|
||||
// Localize "New Script", "New Script 1", "New Script 2", etc.
|
||||
if (item->getType() == LLAssetType::AT_LSL_TEXT &&
|
||||
LLStringUtil::startsWith(item->getName(), "New Script"))
|
||||
{
|
||||
LLStringUtil::replaceString(mDisplayName, "New Script", LLTrans::getString("PanelContentsNewScript"));
|
||||
}
|
||||
|
||||
const LLPermissions& perm(item->getPermissions());
|
||||
BOOL copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE);
|
||||
BOOL mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE);
|
||||
@@ -677,7 +685,9 @@ void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string actio
|
||||
{
|
||||
if (price > 0 && price > gStatusBar->getBalance())
|
||||
{
|
||||
LLFloaterBuyCurrency::buyCurrency("This costs", price);
|
||||
LLStringUtil::format_map_t args;
|
||||
args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
|
||||
LLFloaterBuyCurrency::buyCurrency( LLTrans::getString("this_costs", args), price );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -723,7 +733,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
else
|
||||
{
|
||||
std::ostringstream info;
|
||||
info << "Buy for " << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << price;
|
||||
info << LLTrans::getString("Buyfor") << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << price;
|
||||
label.assign(info.str());
|
||||
}
|
||||
|
||||
@@ -1013,8 +1023,8 @@ class LLTaskSoundBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskSoundBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
|
||||
virtual BOOL canOpenItem() const { return TRUE; }
|
||||
@@ -1086,7 +1096,7 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
else
|
||||
{
|
||||
std::ostringstream info;
|
||||
info << "Buy for " << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << price;
|
||||
info << LLTrans::getString("Buyfor") << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << price;
|
||||
label.assign(info.str());
|
||||
}
|
||||
|
||||
@@ -1121,6 +1131,7 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
}
|
||||
|
||||
items.push_back(std::string("Task Play"));
|
||||
|
||||
/*menu.addSeparator();
|
||||
menu.append(new LLMenuItemCallGL("Play",
|
||||
&LLTaskSoundBridge::playSound,
|
||||
@@ -1138,8 +1149,8 @@ class LLTaskLandmarkBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskLandmarkBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -44,16 +44,15 @@
|
||||
#include "llmaterialtable.h"
|
||||
#include "llpermissionsflags.h"
|
||||
#include "llstring.h"
|
||||
#include "lltrans.h"
|
||||
#include "llvolume.h"
|
||||
#include "m3math.h"
|
||||
#include "material_codes.h"
|
||||
|
||||
// project includes
|
||||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcolorswatch.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llfocusmgr.h"
|
||||
@@ -67,6 +66,7 @@
|
||||
#include "lltool.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltrans.h"
|
||||
#include "llui.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llviewerregion.h"
|
||||
@@ -75,16 +75,16 @@
|
||||
#include "llworld.h"
|
||||
#include "pipeline.h"
|
||||
#include "llviewershadermgr.h"
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include "lldrawpool.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lltexturectrl.h"
|
||||
|
||||
// For mesh physics
|
||||
#include "llagent.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llmeshrepository.h"
|
||||
|
||||
#include "llnotificationsutil.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
// "Features" Tab
|
||||
@@ -189,7 +189,7 @@ BOOL LLPanelVolume::postBuild()
|
||||
}
|
||||
|
||||
LLPanelVolume::LLPanelVolume(const std::string& name)
|
||||
: LLPanel(name)
|
||||
: LLPanel(name)
|
||||
{
|
||||
setMouseOpaque(FALSE);
|
||||
|
||||
@@ -460,7 +460,7 @@ void LLPanelVolume::getState( )
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLPanelVolume::precommitValidate(LLUICtrl* ctrl,void* userdata)
|
||||
bool LLPanelVolume::precommitValidate( const LLSD& data )
|
||||
{
|
||||
// TODO: Richard will fill this in later.
|
||||
return TRUE; // FALSE means that validation failed and new value should not be commited.
|
||||
@@ -487,7 +487,7 @@ void LLPanelVolume::refresh()
|
||||
getChildView("Light Focus")->setVisible( visible);
|
||||
getChildView("Light Ambiance")->setVisible( visible);
|
||||
getChildView("light texture control")->setVisible( visible);
|
||||
|
||||
|
||||
bool enable_mesh = false;
|
||||
|
||||
LLSD sim_features;
|
||||
@@ -693,7 +693,6 @@ void LLPanelVolume::onLightSelectColor(LLUICtrl* ctrl, void* userdata)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLPanelVolume::onLightSelectTexture(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLPanelVolume* self = (LLPanelVolume*) userdata;
|
||||
@@ -768,6 +767,8 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
|
||||
//self->getChildView("Light Ambiance")->setEnabled(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
void sendIsLight();
|
||||
void sendIsFlexible();
|
||||
|
||||
static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata);
|
||||
static bool precommitValidate(const LLSD& data);
|
||||
|
||||
static void onCommitIsLight( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitLight( LLUICtrl* ctrl, void* userdata);
|
||||
@@ -91,6 +91,7 @@ protected:
|
||||
void sendPhysicsDensity(LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
void handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse);
|
||||
|
||||
/*
|
||||
LLTextBox* mLabelSelectSingleMessage;
|
||||
// Light
|
||||
@@ -116,6 +117,7 @@ protected:
|
||||
LLPointer<LLViewerObject> mObject;
|
||||
LLPointer<LLViewerObject> mRootObject;
|
||||
LLTextBox* mComboPhysicsShapeLabel;
|
||||
|
||||
LLComboBox* mComboPhysicsShapeType;
|
||||
LLSpinCtrl* mSpinPhysicsGravity;
|
||||
LLSpinCtrl* mSpinPhysicsFriction;
|
||||
|
||||
@@ -563,6 +563,7 @@ void LLMultiPreview::open() /*Flawfinder: ignore*/
|
||||
{
|
||||
frontmost_preview->loadAsset();
|
||||
}
|
||||
LLMultiFloater::postBuild();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "llinventory.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llresmgr.h"
|
||||
#include "lltrans.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltextureview.h"
|
||||
#include "llui.h"
|
||||
@@ -56,13 +57,13 @@
|
||||
const S32 PREVIEW_TEXTURE_MIN_WIDTH = 300;
|
||||
const S32 PREVIEW_TEXTURE_MIN_HEIGHT = 120;
|
||||
|
||||
const F32 PREVIEW_TEXTURE_MAX_ASPECT = 200.f;
|
||||
const F32 PREVIEW_TEXTURE_MIN_ASPECT = 0.005f;
|
||||
|
||||
const S32 CLIENT_RECT_VPAD = 4;
|
||||
|
||||
const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f;
|
||||
|
||||
const F32 PREVIEW_TEXTURE_MAX_ASPECT = 200.f;
|
||||
const F32 PREVIEW_TEXTURE_MIN_ASPECT = 0.005f;
|
||||
|
||||
LLPreviewTexture * LLPreviewTexture::sInstance;
|
||||
LLPreviewTexture::LLPreviewTexture(const std::string& name,
|
||||
const LLRect& rect,
|
||||
@@ -163,8 +164,11 @@ LLPreviewTexture::~LLPreviewTexture()
|
||||
{
|
||||
getWindow()->decBusyCount();
|
||||
}
|
||||
mImage->setBoostLevel(mImageOldBoostLevel);
|
||||
mImage = NULL;
|
||||
if(mImage)
|
||||
{
|
||||
mImage->setBoostLevel(mImageOldBoostLevel);
|
||||
mImage = NULL;
|
||||
}
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
@@ -185,14 +189,12 @@ void LLPreviewTexture::init()
|
||||
{
|
||||
childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this);
|
||||
}
|
||||
|
||||
else if (mShowKeepDiscard)
|
||||
{
|
||||
childSetAction("Keep",onKeepBtn,this);
|
||||
childSetAction("Discard",onDiscardBtn,this);
|
||||
}
|
||||
|
||||
else
|
||||
else
|
||||
{
|
||||
// If the buttons are hidden move stuff down to use the space.
|
||||
|
||||
@@ -233,7 +235,7 @@ void LLPreviewTexture::init()
|
||||
childSetText("uuid", getItemID().asString());
|
||||
childSetText("uploader", getItemCreatorName());
|
||||
childSetText("uploadtime", getItemCreationDate());
|
||||
childSetText("alphanote", std::string("Loading..."));
|
||||
childSetText("alphanote", LLTrans::getString("LoadingData"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,12 +289,12 @@ void LLPreviewTexture::draw()
|
||||
if (!mImage->getIsAlphaMask())
|
||||
{
|
||||
childSetColor("alphanote", LLColor4::green);
|
||||
childSetText("alphanote", std::string("No Alpha"));
|
||||
childSetText("alphanote", getString("No Alpha"));
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetColor("alphanote", LLColor4::red);
|
||||
childSetText("alphanote", std::string("Has Alpha"));
|
||||
childSetText("alphanote", getString("Has Alpha"));
|
||||
}
|
||||
mAlphaMaskResult = mImage->getIsAlphaMask();
|
||||
}
|
||||
@@ -320,8 +322,7 @@ void LLPreviewTexture::draw()
|
||||
|
||||
if( mLoadingFullImage )
|
||||
{
|
||||
// *TODO: Translate
|
||||
LLFontGL::getFontSansSerif()->renderUTF8(std::string("Receiving:"), 0,
|
||||
LLFontGL::getFontSansSerif()->renderUTF8(LLTrans::getString("Receiving"), 0,
|
||||
interior.mLeft + 4,
|
||||
interior.mBottom + 4,
|
||||
LLColor4::white, LLFontGL::LEFT, LLFontGL::BOTTOM,
|
||||
@@ -357,8 +358,7 @@ void LLPreviewTexture::draw()
|
||||
}
|
||||
else if(!mSavedFileTimer.hasExpired())
|
||||
{
|
||||
// *TODO: Translate
|
||||
LLFontGL::getFontSansSerif()->renderUTF8(std::string("File Saved"), 0,
|
||||
LLFontGL::getFontSansSerif()->renderUTF8(LLTrans::getString("FileSaved"), 0,
|
||||
interior.mLeft + 4,
|
||||
interior.mBottom + 4,
|
||||
LLColor4::white, LLFontGL::LEFT, LLFontGL::BOTTOM,
|
||||
@@ -367,6 +367,7 @@ void LLPreviewTexture::draw()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -408,6 +409,7 @@ void LLPreviewTexture::saveAs_continued(LLViewerInventoryItem const* item, AIFil
|
||||
mSaveFileName = filepicker->getFilename();
|
||||
mLoadingFullImage = TRUE;
|
||||
getWindow()->incBusyCount();
|
||||
|
||||
mImage->forceToSaveRawImage(0) ;//re-fetch the raw image if the old one is removed.
|
||||
mImage->setLoadedCallback( LLPreviewTexture::onFileLoadedForSave,
|
||||
0, TRUE, FALSE, new LLUUID( mItemUUID ), &mCallbackTextureList );
|
||||
@@ -497,7 +499,7 @@ std::string LLPreviewTexture::getItemCreationDate()
|
||||
timeToFormattedString(item->getCreationDate(), gSavedSettings.getString("TimestampFormat"), time);
|
||||
return time;
|
||||
}
|
||||
return "Unknown";
|
||||
return getString("Unknown");
|
||||
}
|
||||
|
||||
std::string LLPreviewTexture::getItemCreatorName()
|
||||
@@ -510,7 +512,7 @@ std::string LLPreviewTexture::getItemCreatorName()
|
||||
mCreatorKey = item->getCreatorUUID();
|
||||
return name;
|
||||
}
|
||||
return "Unknown";
|
||||
return getString("Unknown");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
|
||||
// don't include an avatar.
|
||||
LLViewerObject* root = obj;
|
||||
|
||||
while(!root->isAvatar() && root->getParent() && !root->isJointChild())
|
||||
while(!root->isAvatar() && root->getParent())
|
||||
{
|
||||
LLViewerObject* parent = (LLViewerObject*)root->getParent();
|
||||
if (parent->isAvatar())
|
||||
@@ -704,7 +704,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s
|
||||
// don't include an avatar.
|
||||
LLViewerObject* root = object;
|
||||
|
||||
while(!root->isAvatar() && root->getParent() && !root->isJointChild())
|
||||
while(!root->isAvatar() && root->getParent())
|
||||
{
|
||||
LLViewerObject* parent = (LLViewerObject*)root->getParent();
|
||||
if (parent->isAvatar())
|
||||
@@ -1419,7 +1419,7 @@ void LLSelectMgr::promoteSelectionToRoot()
|
||||
}
|
||||
|
||||
LLViewerObject* parentp = object;
|
||||
while(parentp->getParent() && !(parentp->isRootEdit() || parentp->isJointChild()))
|
||||
while(parentp->getParent() && !(parentp->isRootEdit()))
|
||||
{
|
||||
parentp = (LLViewerObject*)parentp->getParent();
|
||||
}
|
||||
@@ -4468,8 +4468,7 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor
|
||||
virtual bool apply(LLViewerObject* object)
|
||||
{
|
||||
if ( object->permModify() && // preemptive permissions check
|
||||
object->isRoot() && // don't send for child objects
|
||||
!object->isJointChild())
|
||||
object->isRoot()) // don't send for child objects
|
||||
{
|
||||
object->setFlags( mFlags, mState);
|
||||
}
|
||||
@@ -5485,6 +5484,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
gGL.loadUIIdentity();
|
||||
gGL.loadIdentity();
|
||||
gGL.loadMatrix(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame
|
||||
gGL.translatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f);
|
||||
@@ -5577,6 +5578,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
@@ -5899,8 +5901,8 @@ void pushWireframe(LLDrawable* drawable)
|
||||
|
||||
if (drawable->isState(LLDrawable::RIGGED))
|
||||
{
|
||||
vobj->updateRiggedVolume();
|
||||
volume = vobj->getRiggedVolume();
|
||||
vobj->updateRiggedVolume();
|
||||
volume = vobj->getRiggedVolume();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5942,6 +5944,8 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
|
||||
gDebugProgram.bind();
|
||||
}
|
||||
|
||||
static LLCachedControl<U32> mode("OutlineMode",0);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
|
||||
@@ -5962,10 +5966,12 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
|
||||
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
|
||||
//Singu Note: Diverges from v3. If sRenderHiddenSelections set, draw non-z-culled wireframe, else draw occluded 'thick' wireframe to create an outline.
|
||||
if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible())
|
||||
{
|
||||
gGL.blendFunc(LLRender::BF_SOURCE_COLOR, LLRender::BF_ONE);
|
||||
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL);
|
||||
|
||||
if (shader)
|
||||
{
|
||||
gGL.diffuseColor4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f);
|
||||
@@ -5987,18 +5993,21 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
|
||||
pushWireframe(drawable);
|
||||
}
|
||||
}
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLGLEnable cull_face(GL_CULL_FACE);
|
||||
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
|
||||
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
gGL.diffuseColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
|
||||
glPolygonOffset(3.f, 3.f);
|
||||
glLineWidth(3.f);
|
||||
pushWireframe(drawable);
|
||||
glLineWidth(1.f);
|
||||
}
|
||||
|
||||
gGL.flush();
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
|
||||
gGL.diffuseColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
|
||||
|
||||
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
|
||||
glPolygonOffset(3.f, 3.f);
|
||||
glLineWidth(3.f);
|
||||
pushWireframe(drawable);
|
||||
glLineWidth(1.f);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
gGL.popMatrix();
|
||||
|
||||
@@ -6054,6 +6063,9 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
gGL.loadUIIdentity();
|
||||
|
||||
if (!is_hud_object)
|
||||
{
|
||||
gGL.loadIdentity();
|
||||
@@ -6170,6 +6182,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
|
||||
gGL.flush();
|
||||
}
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
|
||||
if (shader)
|
||||
{
|
||||
@@ -6302,8 +6315,6 @@ void LLSelectMgr::updateSelectionCenter()
|
||||
// matches the root prim's (affecting the orientation of the manipulators).
|
||||
bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(TRUE))->getBoundingBoxAgent() );
|
||||
|
||||
std::vector < LLViewerObject *> jointed_objects;
|
||||
|
||||
for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
|
||||
iter != mSelectedObjects->end(); iter++)
|
||||
{
|
||||
@@ -6321,17 +6332,11 @@ void LLSelectMgr::updateSelectionCenter()
|
||||
}
|
||||
|
||||
bbox.addBBoxAgent( object->getBoundingBoxAgent() );
|
||||
|
||||
if (object->isJointChild())
|
||||
{
|
||||
jointed_objects.push_back(object);
|
||||
}
|
||||
}
|
||||
|
||||
LLVector3 bbox_center_agent = bbox.getCenterAgent();
|
||||
mSelectionCenterGlobal = gAgent.getPosGlobalFromAgent(bbox_center_agent);
|
||||
mSelectionBBox = bbox;
|
||||
|
||||
}
|
||||
|
||||
if ( !(gAgentID == LLUUID::null))
|
||||
@@ -6625,19 +6630,19 @@ void LLSelectMgr::setAgentHUDZoom(F32 target_zoom, F32 current_zoom)
|
||||
bool LLObjectSelection::is_root::operator()(LLSelectNode *node)
|
||||
{
|
||||
LLViewerObject* object = node->getObject();
|
||||
return (object != NULL) && !node->mIndividualSelection && (object->isRootEdit() || object->isJointChild());
|
||||
return (object != NULL) && !node->mIndividualSelection && (object->isRootEdit());
|
||||
}
|
||||
|
||||
bool LLObjectSelection::is_valid_root::operator()(LLSelectNode *node)
|
||||
{
|
||||
LLViewerObject* object = node->getObject();
|
||||
return (object != NULL) && node->mValid && !node->mIndividualSelection && (object->isRootEdit() || object->isJointChild());
|
||||
return (object != NULL) && node->mValid && !node->mIndividualSelection && (object->isRootEdit());
|
||||
}
|
||||
|
||||
bool LLObjectSelection::is_root_object::operator()(LLSelectNode *node)
|
||||
{
|
||||
LLViewerObject* object = node->getObject();
|
||||
return (object != NULL) && (object->isRootEdit() || object->isJointChild());
|
||||
return (object != NULL) && (object->isRootEdit());
|
||||
}
|
||||
|
||||
LLObjectSelection::LLObjectSelection() :
|
||||
|
||||
@@ -1103,6 +1103,7 @@ LLTextureCtrl::LLTextureCtrl(
|
||||
LLFontGL::getFontSansSerifSmall() );
|
||||
mTentativeLabel->setHAlign( LLFontGL::HCENTER );
|
||||
mTentativeLabel->setFollowsAll();
|
||||
mTentativeLabel->setMouseOpaque(FALSE);
|
||||
addChild( mTentativeLabel );
|
||||
|
||||
LLRect border_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user