Compare commits
121 Commits
lodexp
...
archive/V2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea10825c27 | ||
|
|
a8f4b3ed4a | ||
|
|
09133307a1 | ||
|
|
ae50fc4404 | ||
|
|
cff618f67d | ||
|
|
1d90b8624b | ||
|
|
6cf9c3b4ed | ||
|
|
226de66b81 | ||
|
|
89c6f11072 | ||
|
|
41dc9f9751 | ||
|
|
ee2508274e | ||
|
|
4bb68e5a34 | ||
|
|
e3b328a115 | ||
|
|
0dd3e189fc | ||
|
|
a694742522 | ||
|
|
d2f66f9bd0 | ||
|
|
8b12d794c5 | ||
|
|
2dff12433c | ||
|
|
332cfdb532 | ||
|
|
722a1dda04 | ||
|
|
0909a4ddbe | ||
|
|
9a8a28ee1a | ||
|
|
ab35a07f0e | ||
|
|
51133c3894 | ||
|
|
0f0d506928 | ||
|
|
8cf8814f8b | ||
|
|
06f14eae42 | ||
|
|
4f264f0359 | ||
|
|
80db7f58c7 | ||
|
|
04b3dee767 | ||
|
|
b6c0436c1b | ||
|
|
5954e0d71c | ||
|
|
50540049c1 | ||
|
|
2d882e527f | ||
|
|
ac12349a8a | ||
|
|
f7a5394904 | ||
|
|
af203533b3 | ||
|
|
41f42fc741 | ||
|
|
c694d12c93 | ||
|
|
f190644464 | ||
|
|
0b1b7c6618 | ||
|
|
98c2b7e11f | ||
|
|
7b1736ea9d | ||
|
|
673a338bf5 | ||
|
|
d3c91698bf | ||
|
|
ab20e881ce | ||
|
|
41fe5f47e1 | ||
|
|
73cf43cbc9 | ||
|
|
26058999b3 | ||
|
|
8f09dedb1e | ||
|
|
955ca21298 | ||
|
|
25b4452a12 | ||
|
|
5d5231fe8c | ||
|
|
d2291b5903 | ||
|
|
4c068a4a85 | ||
|
|
eded2546fc | ||
|
|
0c2ea7cc9b | ||
|
|
0b9a44a842 | ||
|
|
e81f2ea3be | ||
|
|
cacf87e962 | ||
|
|
c816d25e68 | ||
|
|
2afa251b64 | ||
|
|
a6c802bd86 | ||
|
|
d32f820903 | ||
|
|
c38a47ea48 | ||
|
|
ad19c0209b | ||
|
|
3901893a3a | ||
|
|
d2d53fec7f | ||
|
|
8204ec5565 | ||
|
|
48538fe182 | ||
|
|
2abece1819 | ||
|
|
8018a8842f | ||
|
|
68a95b5b1a | ||
|
|
ef43a87ac0 | ||
|
|
0c2765511e | ||
|
|
1a0387f918 | ||
|
|
b9203e487a | ||
|
|
4f9b8443e2 | ||
|
|
dbd26ddee1 | ||
|
|
4d2dde73d7 | ||
|
|
6cbbe493dd | ||
|
|
8ff0a29f9d | ||
|
|
f30dc32503 | ||
|
|
a35a59d56b | ||
|
|
4d4c49cd24 | ||
|
|
aa1167e4d5 | ||
|
|
9e4bc6754a | ||
|
|
c6fa0be39b | ||
|
|
15a8a86b15 | ||
|
|
125a90e46b | ||
|
|
e9147cb7fb | ||
|
|
db5ba95f58 | ||
|
|
ab8656d5d8 | ||
|
|
711a4fdacd | ||
|
|
156bb5415d | ||
|
|
88fe5d6979 | ||
|
|
4e3501d034 | ||
|
|
b390d74b9c | ||
|
|
fcc98ffe46 | ||
|
|
fd8866c411 | ||
|
|
0d3c91269b | ||
|
|
b952d3f4e6 | ||
|
|
186bd80ba0 | ||
|
|
e6b5811e7e | ||
|
|
344cafcb1b | ||
|
|
3a3805fd18 | ||
|
|
58102daf94 | ||
|
|
753c0b9285 | ||
|
|
ad4d974812 | ||
|
|
3fca56df23 | ||
|
|
b7cc1932f1 | ||
|
|
c17b67399b | ||
|
|
cd7b1e434d | ||
|
|
f9e0b122ae | ||
|
|
7e895d4590 | ||
|
|
6dd9212d16 | ||
|
|
0f038bbffc | ||
|
|
6e437d4188 | ||
|
|
b92dec7530 | ||
|
|
497e63bfb6 | ||
|
|
e756140e1d |
@@ -28,6 +28,7 @@ set(cmake_SOURCE_FILES
|
||||
FindCARes.cmake
|
||||
FindELFIO.cmake
|
||||
FindGooglePerfTools.cmake
|
||||
FindHunSpell.cmake
|
||||
FindMono.cmake
|
||||
FindMT.cmake
|
||||
FindMySQL.cmake
|
||||
@@ -39,6 +40,7 @@ set(cmake_SOURCE_FILES
|
||||
FreeType.cmake
|
||||
GStreamer010Plugin.cmake
|
||||
GooglePerfTools.cmake
|
||||
HUNSPELL.cmake
|
||||
JPEG.cmake
|
||||
LLAddBuildTest.cmake
|
||||
LLAudio.cmake
|
||||
|
||||
@@ -25,6 +25,7 @@ set(all_targets ${all_targets} ${out_targets})
|
||||
|
||||
set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
|
||||
set(debug_files
|
||||
libhunspell.dll
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
@@ -243,6 +244,7 @@ set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
|
||||
set(release_files
|
||||
libtcmalloc_minimal.dll
|
||||
fmod.dll
|
||||
libhunspell.dll
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
|
||||
34
indra/cmake/FindHunSpell.cmake
Normal file
34
indra/cmake/FindHunSpell.cmake
Normal file
@@ -0,0 +1,34 @@
|
||||
FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell.hxx
|
||||
/usr/local/include/hunspell
|
||||
/usr/local/include
|
||||
/usr/include/hunspell
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2)
|
||||
FIND_LIBRARY(HUNSPELL_LIBRARY
|
||||
NAMES ${HUNSPELL_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
|
||||
IF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
|
||||
SET(HUNSPELL_LIBRARIES ${HUNSPELL_LIBRARY})
|
||||
SET(HUNSPELL_FOUND "YES")
|
||||
ELSE(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
|
||||
SET(HUNSPELL_FOUND "NO")
|
||||
ENDIF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
|
||||
|
||||
IF(HUNSPELL_FOUND)
|
||||
IF(NOT HUNSPELL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Hunspell: ${HUNSPELL_LIBRARIES}")
|
||||
ENDIF(NOT HUNSPELL_FIND_QUIETLY)
|
||||
ELSE(HUNSPELL_FOUND)
|
||||
IF(HUNSPELL_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find HunSpell library")
|
||||
ENDIF(HUNSPELL_FIND_REQUIRED)
|
||||
ENDIF(HUNSPELL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
HUNSPELL_LIBRARY
|
||||
HUNSPELL_INCLUDE_DIR
|
||||
)
|
||||
16
indra/cmake/HUNSPELL.cmake
Normal file
16
indra/cmake/HUNSPELL.cmake
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (STANDALONE)
|
||||
include(FindHunSpell)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(hunspell)
|
||||
|
||||
set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/hunspell)
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY hunspell-1.2)
|
||||
else (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY libhunspell)
|
||||
endif (LINUX OR DARWIN)
|
||||
endif (STANDALONE)
|
||||
@@ -518,9 +518,16 @@ class WindowsSetup(PlatformSetup):
|
||||
self.using_express = True
|
||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
||||
break
|
||||
else:
|
||||
print >> sys.stderr, 'Cannot find any Visual Studio installation'
|
||||
sys.exit(1)
|
||||
else:
|
||||
for version in 'vc80 vc90 vc100 vc71'.split():
|
||||
if self.find_visual_studio_express_single(version):
|
||||
self._generator = version
|
||||
self.using_express = True
|
||||
print 'Building with ', self.gens[version]['gen'] , "Express edition"
|
||||
break
|
||||
else:
|
||||
print >> sys.stderr, 'Cannot find any Visual Studio installation'
|
||||
sys.exit(1)
|
||||
return self._generator
|
||||
|
||||
def _set_generator(self, gen):
|
||||
@@ -605,6 +612,28 @@ class WindowsSetup(PlatformSetup):
|
||||
except WindowsError, err:
|
||||
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
|
||||
return ''
|
||||
|
||||
def find_visual_studio_express_single(self, gen=None):
|
||||
if gen is None:
|
||||
gen = self._generator
|
||||
gen = gen.lower()
|
||||
try:
|
||||
import _winreg
|
||||
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s_Config\Setup\VC' %
|
||||
self.gens[gen]['ver'])
|
||||
value_str = (r'ProductDir')
|
||||
print ('Reading VS environment from HKEY_CURRENT_USER\%s\%s' %
|
||||
(key_str, value_str))
|
||||
print key_str
|
||||
|
||||
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER)
|
||||
key = _winreg.OpenKey(reg, key_str)
|
||||
value = _winreg.QueryValueEx(key, value_str)[0]+"IDE"
|
||||
print 'Found: %s' % value
|
||||
return value
|
||||
except WindowsError, err:
|
||||
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
|
||||
return ''
|
||||
|
||||
def get_build_cmd(self):
|
||||
if self.incredibuild:
|
||||
@@ -617,13 +646,15 @@ class WindowsSetup(PlatformSetup):
|
||||
if environment == '':
|
||||
environment = self.find_visual_studio_express()
|
||||
if environment == '':
|
||||
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
|
||||
else:
|
||||
build_dirs=self.build_dirs()
|
||||
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
|
||||
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
|
||||
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
|
||||
exit(0)
|
||||
environment = self.find_visual_studio_express_single()
|
||||
if environment == '':
|
||||
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
|
||||
else:
|
||||
build_dirs=self.build_dirs()
|
||||
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
|
||||
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
|
||||
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
|
||||
exit(0)
|
||||
|
||||
# devenv.com is CLI friendly, devenv.exe... not so much.
|
||||
return ('"%sdevenv.com" %s.sln /build %s' %
|
||||
|
||||
@@ -27,6 +27,7 @@ set(llcommon_SOURCE_FILES
|
||||
llcriticaldamp.cpp
|
||||
llcursortypes.cpp
|
||||
lldate.cpp
|
||||
lldictionary.cpp
|
||||
llerror.cpp
|
||||
llerrorthread.cpp
|
||||
llevent.cpp
|
||||
@@ -106,6 +107,7 @@ set(llcommon_HEADER_FILES
|
||||
lldate.h
|
||||
lldefs.h
|
||||
lldepthstack.h
|
||||
lldictionary.h
|
||||
lldlinked.h
|
||||
lldqueueptr.h
|
||||
llendianswizzle.h
|
||||
|
||||
54
indra/llcommon/lldictionary.cpp
Normal file
54
indra/llcommon/lldictionary.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @file lldictionary.cpp
|
||||
* @brief Lldictionary class header file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2010, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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 "linden_common.h"
|
||||
|
||||
#include "lldictionary.h"
|
||||
|
||||
#include "llstring.h"
|
||||
|
||||
// Define in .cpp file to prevent header include of llstring.h
|
||||
LLDictionaryEntry::LLDictionaryEntry(const std::string &name)
|
||||
: mName(name)
|
||||
{
|
||||
mNameCapitalized = mName;
|
||||
LLStringUtil::replaceChar(mNameCapitalized, '-', ' ');
|
||||
LLStringUtil::replaceChar(mNameCapitalized, '_', ' ');
|
||||
for (U32 i=0; i < mNameCapitalized.size(); i++)
|
||||
{
|
||||
if (i == 0 || mNameCapitalized[i-1] == ' ') // don't change ordering of this statement or crash
|
||||
{
|
||||
mNameCapitalized[i] = toupper(mNameCapitalized[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
103
indra/llcommon/lldictionary.h
Normal file
103
indra/llcommon/lldictionary.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* @file lldictionary.h
|
||||
* @brief Lldictionary class header file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2010, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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_LLDICTIONARY_H
|
||||
#define LL_LLDICTIONARY_H
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
struct LL_COMMON_API LLDictionaryEntry
|
||||
{
|
||||
LLDictionaryEntry(const std::string &name);
|
||||
virtual ~LLDictionaryEntry() {}
|
||||
const std::string mName;
|
||||
std::string mNameCapitalized;
|
||||
};
|
||||
|
||||
template <class Index, class Entry>
|
||||
class LLDictionary : public std::map<Index, Entry *>
|
||||
{
|
||||
public:
|
||||
typedef std::map<Index, Entry *> map_t;
|
||||
typedef typename map_t::iterator iterator_t;
|
||||
typedef typename map_t::const_iterator const_iterator_t;
|
||||
|
||||
LLDictionary() {}
|
||||
virtual ~LLDictionary()
|
||||
{
|
||||
for (iterator_t iter = map_t::begin(); iter != map_t::end(); ++iter)
|
||||
delete (iter->second);
|
||||
}
|
||||
|
||||
const Entry *lookup(Index index) const
|
||||
{
|
||||
const_iterator_t dictionary_iter = map_t::find(index);
|
||||
if (dictionary_iter == map_t::end()) return NULL;
|
||||
return dictionary_iter->second;
|
||||
}
|
||||
const Index lookup(const std::string &name) const
|
||||
{
|
||||
for (const_iterator_t dictionary_iter = map_t::begin();
|
||||
dictionary_iter != map_t::end();
|
||||
dictionary_iter++)
|
||||
{
|
||||
const Entry *entry = dictionary_iter->second;
|
||||
if (entry->mName == name)
|
||||
{
|
||||
return dictionary_iter->first;
|
||||
}
|
||||
}
|
||||
return notFound();
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Index notFound() const
|
||||
{
|
||||
// default is to assert
|
||||
// don't assert -- makes it impossible to work on mesh-development and viewer-development simultaneously
|
||||
// -- davep 2010.10.29
|
||||
//llassert(false);
|
||||
return Index(-1);
|
||||
}
|
||||
void addEntry(Index index, Entry *entry)
|
||||
{
|
||||
if (lookup(index))
|
||||
{
|
||||
llerrs << "Dictionary entry already added (attempted to add duplicate entry)" << llendl;
|
||||
}
|
||||
(*this)[index] = entry;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // LL_LLDICTIONARY_H
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
const S32 LL_VERSION_MAJOR = 1;
|
||||
const S32 LL_VERSION_MINOR = 5;
|
||||
const S32 LL_VERSION_PATCH = 5;
|
||||
const S32 LL_VERSION_BUILD = 0;
|
||||
const S32 LL_VERSION_PATCH = 6;
|
||||
const S32 LL_VERSION_BUILD = 1;
|
||||
|
||||
const char * const LL_CHANNEL = "Singularity";
|
||||
|
||||
|
||||
@@ -248,16 +248,17 @@ U8* LLImageBase::allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 si
|
||||
|
||||
S32 LLImageRaw::sGlobalRawMemory = 0;
|
||||
S32 LLImageRaw::sRawImageCount = 0;
|
||||
S32 LLImageRaw::sRawImageCachedCount = 0;
|
||||
|
||||
LLImageRaw::LLImageRaw()
|
||||
: LLImageBase()
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
++sRawImageCount;
|
||||
}
|
||||
|
||||
LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
|
||||
: LLImageBase()
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE );
|
||||
@@ -266,7 +267,7 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
|
||||
}
|
||||
|
||||
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
|
||||
: LLImageBase()
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
mMemType = LLMemType::MTYPE_IMAGERAW;
|
||||
if(allocateDataSize(width, height, components) && data)
|
||||
@@ -277,7 +278,7 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
|
||||
}
|
||||
|
||||
LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
|
||||
: LLImageBase()
|
||||
: LLImageBase(), mCacheEntries(0)
|
||||
{
|
||||
createFromFile(filename, j2c_lowest_mip_only);
|
||||
}
|
||||
@@ -288,6 +289,7 @@ LLImageRaw::~LLImageRaw()
|
||||
// NOT LLImageRaw::deleteData()
|
||||
deleteData();
|
||||
--sRawImageCount;
|
||||
setInCache(false);
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
||||
@@ -243,6 +243,24 @@ protected:
|
||||
public:
|
||||
static S32 sGlobalRawMemory;
|
||||
static S32 sRawImageCount;
|
||||
|
||||
static S32 sRawImageCachedCount;
|
||||
S32 mCacheEntries;
|
||||
void setInCache(bool in_cache)
|
||||
{
|
||||
if(in_cache)
|
||||
{
|
||||
if(!mCacheEntries)
|
||||
sRawImageCachedCount++;
|
||||
mCacheEntries++;
|
||||
}
|
||||
else if(mCacheEntries)
|
||||
{
|
||||
mCacheEntries--;
|
||||
if(!mCacheEntries)
|
||||
sRawImageCachedCount--;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Compressed representation of image.
|
||||
|
||||
@@ -131,6 +131,7 @@ BOOL LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time)
|
||||
if (! pngWrapper.writePng(raw_image, getData()))
|
||||
{
|
||||
setLastError(pngWrapper.getErrorMessage());
|
||||
deleteData();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -138,6 +139,7 @@ BOOL LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time)
|
||||
if(!reallocateData(pngWrapper.getFinalSize())) //Shrink. Returns NULL on failure.
|
||||
{
|
||||
setLastError("LLImagePNG::encode failed reallocateData");
|
||||
deleteData();
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
@@ -171,7 +171,7 @@ void LLImageDecodeThread::ImageRequest::finishRequest(bool completed)
|
||||
{
|
||||
if (mResponder.notNull())
|
||||
{
|
||||
bool success = completed && mDecodedRaw && (!mNeedsAux || mDecodedAux);
|
||||
bool success = completed && mDecodedRaw && mDecodedImageRaw->getDataSize() && (!mNeedsAux || mDecodedAux);
|
||||
mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux);
|
||||
}
|
||||
// Will automatically be deleted
|
||||
|
||||
@@ -19,6 +19,7 @@ set(llinventory_SOURCE_FILES
|
||||
llcategory.cpp
|
||||
lleconomy.cpp
|
||||
llinventory.cpp
|
||||
llinventorydefines.cpp
|
||||
llinventorytype.cpp
|
||||
lllandmark.cpp
|
||||
llnotecard.cpp
|
||||
@@ -35,6 +36,7 @@ set(llinventory_HEADER_FILES
|
||||
llcategory.h
|
||||
lleconomy.h
|
||||
llinventory.h
|
||||
llinventorydefines.h
|
||||
llinventorytype.h
|
||||
lllandmark.h
|
||||
llnotecard.h
|
||||
|
||||
@@ -64,34 +64,27 @@ static const std::string INV_CREATION_DATE_LABEL("created_at");
|
||||
// key used by agent-inventory-service
|
||||
static const std::string INV_ASSET_TYPE_LABEL_WS("type_default");
|
||||
static const std::string INV_FOLDER_ID_LABEL_WS("category_id");
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function declarations, constants, enums, and typedefs
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
const U8 TASK_INVENTORY_ITEM_KEY = 0;
|
||||
const U8 TASK_INVENTORY_ASSET_KEY = 1;
|
||||
|
||||
const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730");
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLInventoryObject
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLInventoryObject::LLInventoryObject(
|
||||
const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type,
|
||||
const std::string& name) :
|
||||
LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type,
|
||||
const std::string& name) :
|
||||
mUUID(uuid),
|
||||
mParentUUID(parent_uuid),
|
||||
mType(type),
|
||||
mName(name)
|
||||
{
|
||||
LLStringUtil::replaceNonstandardASCII(mName, ' ');
|
||||
LLStringUtil::replaceChar(mName, '|', ' ');
|
||||
LLStringUtil::trim(mName);
|
||||
LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
|
||||
correctInventoryName(mName);
|
||||
}
|
||||
|
||||
LLInventoryObject::LLInventoryObject() :
|
||||
@@ -99,7 +92,7 @@ LLInventoryObject::LLInventoryObject() :
|
||||
{
|
||||
}
|
||||
|
||||
LLInventoryObject::~LLInventoryObject( void )
|
||||
LLInventoryObject::~LLInventoryObject()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -158,12 +151,8 @@ void LLInventoryObject::setUUID(const LLUUID& new_uuid)
|
||||
void LLInventoryObject::rename(const std::string& n)
|
||||
{
|
||||
std::string new_name(n);
|
||||
LLStringUtil::replaceNonstandardASCII(new_name, ' ');
|
||||
LLStringUtil::replaceChar(new_name, '|', ' ');
|
||||
LLStringUtil::trim(new_name);
|
||||
LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN);
|
||||
|
||||
if( new_name != mName )
|
||||
correctInventoryName(new_name);
|
||||
if( !new_name.empty() && new_name != mName )
|
||||
{
|
||||
mName = new_name;
|
||||
}
|
||||
@@ -224,10 +213,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
|
||||
" %254s %254[^|]",
|
||||
keyword, valuestr);
|
||||
mName.assign(valuestr);
|
||||
LLStringUtil::replaceNonstandardASCII(mName, ' ');
|
||||
LLStringUtil::replaceChar(mName, '|', ' ');
|
||||
LLStringUtil::trim(mName);
|
||||
LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
|
||||
correctInventoryName(mName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -287,23 +273,31 @@ void LLInventoryObject::updateServer(BOOL) const
|
||||
llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl;
|
||||
}
|
||||
|
||||
inline
|
||||
void LLInventoryObject::correctInventoryName(std::string& name)
|
||||
{
|
||||
LLStringUtil::replaceNonstandardASCII(name, ' ');
|
||||
LLStringUtil::replaceChar(name, '|', ' ');
|
||||
LLStringUtil::trim(name);
|
||||
LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN);
|
||||
}
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLInventoryItem
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLInventoryItem::LLInventoryItem(
|
||||
const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
const LLPermissions& permissions,
|
||||
const LLUUID& asset_uuid,
|
||||
LLAssetType::EType type,
|
||||
LLInventoryType::EType inv_type,
|
||||
const std::string& name,
|
||||
const std::string& desc,
|
||||
const LLSaleInfo& sale_info,
|
||||
U32 flags,
|
||||
S32 creation_date_utc) :
|
||||
LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
const LLPermissions& permissions,
|
||||
const LLUUID& asset_uuid,
|
||||
LLAssetType::EType type,
|
||||
LLInventoryType::EType inv_type,
|
||||
const std::string& name,
|
||||
const std::string& desc,
|
||||
const LLSaleInfo& sale_info,
|
||||
U32 flags,
|
||||
S32 creation_date_utc) :
|
||||
LLInventoryObject(uuid, parent_uuid, type, name),
|
||||
mPermissions(permissions),
|
||||
mAssetUUID(asset_uuid),
|
||||
@@ -315,6 +309,7 @@ LLInventoryItem::LLInventoryItem(
|
||||
{
|
||||
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
|
||||
LLStringUtil::replaceChar(mDescription, '|', ' ');
|
||||
mPermissions.initMasks(inv_type);
|
||||
}
|
||||
|
||||
LLInventoryItem::LLInventoryItem() :
|
||||
@@ -446,6 +441,9 @@ void LLInventoryItem::setDescription(const std::string& d)
|
||||
void LLInventoryItem::setPermissions(const LLPermissions& perm)
|
||||
{
|
||||
mPermissions = perm;
|
||||
|
||||
// Override permissions to unrestricted if this is a landmark
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
}
|
||||
|
||||
void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type)
|
||||
@@ -463,6 +461,46 @@ void LLInventoryItem::setCreationDate(time_t creation_date_utc)
|
||||
mCreationDate = creation_date_utc;
|
||||
}
|
||||
|
||||
// Currently only used in the Viewer to handle calling cards
|
||||
// where the creator is actually used to store the target.
|
||||
void LLInventoryItem::setCreator(const LLUUID& creator)
|
||||
{
|
||||
mPermissions.setCreator(creator);
|
||||
}
|
||||
|
||||
void LLInventoryItem::accumulatePermissionSlamBits(const LLInventoryItem& old_item)
|
||||
{
|
||||
// Remove any pre-existing II_FLAGS_PERM_OVERWRITE_MASK flags
|
||||
// because we now detect when they should be set.
|
||||
setFlags( old_item.getFlags() | (getFlags() & ~(LLInventoryItemFlags::II_FLAGS_PERM_OVERWRITE_MASK)) );
|
||||
|
||||
// Enforce the PERM_OVERWRITE flags for any masks that are different
|
||||
// but only for AT_OBJECT's since that is the only asset type that can
|
||||
// exist in-world (instead of only in-inventory or in-object-contents).
|
||||
if (LLAssetType::AT_OBJECT == getType())
|
||||
{
|
||||
LLPermissions old_permissions = old_item.getPermissions();
|
||||
U32 flags_to_be_set = 0;
|
||||
if(old_permissions.getMaskNextOwner() != getPermissions().getMaskNextOwner())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
|
||||
}
|
||||
if(old_permissions.getMaskEveryone() != getPermissions().getMaskEveryone())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
|
||||
}
|
||||
if(old_permissions.getMaskGroup() != getPermissions().getMaskGroup())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
|
||||
}
|
||||
LLSaleInfo old_sale_info = old_item.getSaleInfo();
|
||||
if(old_sale_info != getSaleInfo())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
|
||||
}
|
||||
setFlags(getFlags() | flags_to_be_set);
|
||||
}
|
||||
}
|
||||
|
||||
const LLSaleInfo& LLInventoryItem::getSaleInfo() const
|
||||
{
|
||||
@@ -517,6 +555,7 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
|
||||
mType = static_cast<LLAssetType::EType>(type);
|
||||
msg->getS8(block, "InvType", type, block_num);
|
||||
mInventoryType = static_cast<LLInventoryType::EType>(type);
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
msg->getU32Fast(block, _PREHASH_Flags, mFlags, block_num);
|
||||
|
||||
@@ -707,6 +746,9 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
|
||||
lldebugs << "Resetting inventory type for " << mUUID << llendl;
|
||||
mInventoryType = LLInventoryType::defaultForAssetType(mType);
|
||||
}
|
||||
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -746,8 +788,8 @@ BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const
|
||||
fprintf(fp, "\t\tasset_id\t%s\n", uuid_str.c_str());
|
||||
}
|
||||
fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
|
||||
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(inv_type_str) fprintf(fp, "\t\tinv_type\t%s\n", inv_type_str);
|
||||
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(!inv_type_str.empty()) fprintf(fp, "\t\tinv_type\t%s\n", inv_type_str.c_str());
|
||||
fprintf(fp, "\t\tflags\t%08x\n", mFlags);
|
||||
mSaleInfo.exportFile(fp);
|
||||
fprintf(fp, "\t\tname\t%s|\n", mName.c_str());
|
||||
@@ -910,6 +952,9 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
||||
lldebugs << "Resetting inventory type for " << mUUID << llendl;
|
||||
mInventoryType = LLInventoryType::defaultForAssetType(mType);
|
||||
}
|
||||
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -949,8 +994,8 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
|
||||
output_stream << "\t\tasset_id\t" << uuid_str << "\n";
|
||||
}
|
||||
output_stream << "\t\ttype\t" << LLAssetType::lookup(mType) << "\n";
|
||||
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(inv_type_str)
|
||||
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(!inv_type_str.empty())
|
||||
output_stream << "\t\tinv_type\t" << inv_type_str << "\n";
|
||||
std::string buffer;
|
||||
buffer = llformat( "\t\tflags\t%08x\n", mFlags);
|
||||
@@ -966,6 +1011,12 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
|
||||
LLSD LLInventoryItem::asLLSD() const
|
||||
{
|
||||
LLSD sd = LLSD();
|
||||
asLLSD(sd);
|
||||
return sd;
|
||||
}
|
||||
|
||||
void LLInventoryItem::asLLSD( LLSD& sd ) const
|
||||
{
|
||||
sd[INV_ITEM_ID_LABEL] = mUUID;
|
||||
sd[INV_PARENT_ID_LABEL] = mParentUUID;
|
||||
sd[INV_PERMISSIONS_LABEL] = ll_create_sd_from_permissions(mPermissions);
|
||||
@@ -986,8 +1037,8 @@ LLSD LLInventoryItem::asLLSD() const
|
||||
}
|
||||
sd[INV_ASSET_TYPE_LABEL] = LLAssetType::lookup(mType);
|
||||
sd[INV_INVENTORY_TYPE_LABEL] = mInventoryType;
|
||||
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(inv_type_str)
|
||||
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(!inv_type_str.empty())
|
||||
{
|
||||
sd[INV_INVENTORY_TYPE_LABEL] = inv_type_str;
|
||||
}
|
||||
@@ -997,11 +1048,9 @@ LLSD LLInventoryItem::asLLSD() const
|
||||
sd[INV_NAME_LABEL] = mName;
|
||||
sd[INV_DESC_LABEL] = mDescription;
|
||||
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
||||
bool LLInventoryItem::fromLLSD(LLSD& sd)
|
||||
bool LLInventoryItem::fromLLSD(const LLSD& sd)
|
||||
{
|
||||
mInventoryType = LLInventoryType::IT_NONE;
|
||||
mAssetUUID.setNull();
|
||||
@@ -1128,6 +1177,8 @@ bool LLInventoryItem::fromLLSD(LLSD& sd)
|
||||
mInventoryType = LLInventoryType::defaultForAssetType(mType);
|
||||
}
|
||||
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
@@ -1294,23 +1345,19 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
|
||||
// Early exit on an empty binary bucket.
|
||||
if (bin_bucket_size <= 1) return;
|
||||
|
||||
// Convert the bin_bucket into a string.
|
||||
char* item_buffer = new char[bin_bucket_size+1];
|
||||
if ((item_buffer != NULL) && (bin_bucket != NULL))
|
||||
if (NULL == bin_bucket)
|
||||
{
|
||||
memcpy(item_buffer, bin_bucket, bin_bucket_size); /* Flawfinder: ignore */
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "unpackBinaryBucket failed. item_buffer or bin_bucket is Null." << llendl;
|
||||
delete[] item_buffer;
|
||||
llerrs << "unpackBinaryBucket failed. bin_bucket is NULL." << llendl;
|
||||
return;
|
||||
}
|
||||
item_buffer[bin_bucket_size] = '\0';
|
||||
std::string str(item_buffer);
|
||||
|
||||
lldebugs << "item buffer: " << item_buffer << llendl;
|
||||
delete[] item_buffer;
|
||||
// Convert the bin_bucket into a string.
|
||||
std::vector<char> item_buffer(bin_bucket_size+1);
|
||||
memcpy(&item_buffer[0], bin_bucket, bin_bucket_size); /* Flawfinder: ignore */
|
||||
item_buffer[bin_bucket_size] = '\0';
|
||||
std::string str(&item_buffer[0]);
|
||||
|
||||
lldebugs << "item buffer: " << str << llendl;
|
||||
|
||||
// Tokenize the string.
|
||||
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
|
||||
@@ -1385,11 +1432,10 @@ BOOL item_date_sort( LLInventoryItem* a, LLInventoryItem* b )
|
||||
/// Class LLInventoryCategory
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLInventoryCategory::LLInventoryCategory(
|
||||
const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType preferred_type,
|
||||
const std::string& name) :
|
||||
LLInventoryCategory::LLInventoryCategory(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType preferred_type,
|
||||
const std::string& name) :
|
||||
LLInventoryObject(uuid, parent_uuid, LLAssetType::AT_CATEGORY, name),
|
||||
mPreferredType(preferred_type)
|
||||
{
|
||||
@@ -1451,7 +1497,7 @@ void LLInventoryCategory::packMessage(LLMessageSystem* msg) const
|
||||
msg->addStringFast(_PREHASH_Name, mName);
|
||||
}
|
||||
|
||||
bool LLInventoryCategory::fromLLSD(LLSD& sd)
|
||||
bool LLInventoryCategory::fromLLSD(const LLSD& sd)
|
||||
{
|
||||
std::string w;
|
||||
|
||||
|
||||
@@ -33,180 +33,107 @@
|
||||
#ifndef LL_LLINVENTORY_H
|
||||
#define LL_LLINVENTORY_H
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "llassetstorage.h"
|
||||
#include "lldarray.h"
|
||||
#include "llinventorytype.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llpermissions.h"
|
||||
#include "llsaleinfo.h"
|
||||
#include "llsd.h"
|
||||
#include "lluuid.h"
|
||||
#include "llxmlnode.h"
|
||||
|
||||
// consts for Key field in the task inventory update message
|
||||
extern const U8 TASK_INVENTORY_ITEM_KEY;
|
||||
extern const U8 TASK_INVENTORY_ASSET_KEY;
|
||||
|
||||
// anonymous enumeration to specify a max inventory buffer size for
|
||||
// use in packBinaryBucket()
|
||||
enum
|
||||
{
|
||||
MAX_INVENTORY_BUFFER_SIZE = 1024
|
||||
};
|
||||
|
||||
|
||||
class LLMessageSystem;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLInventoryObject
|
||||
//
|
||||
// This is the base class for inventory objects that handles the
|
||||
// common code between items and categories. The 'mParentUUID' member
|
||||
// means the parent category since all inventory objects except each
|
||||
// user's root category are in some category. Each user's root
|
||||
// category will have mParentUUID==LLUUID::null.
|
||||
// Base class for anything in the user's inventory. Handles the common code
|
||||
// between items and categories.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLMessageSystem;
|
||||
|
||||
class LLInventoryObject : public LLRefCount
|
||||
{
|
||||
protected:
|
||||
LLUUID mUUID;
|
||||
LLUUID mParentUUID;
|
||||
LLAssetType::EType mType;
|
||||
std::string mName;
|
||||
public:
|
||||
typedef std::list<LLPointer<LLInventoryObject> > object_list_t;
|
||||
|
||||
protected:
|
||||
virtual ~LLInventoryObject( void );
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type, const std::string& name);
|
||||
LLInventoryObject();
|
||||
LLInventoryObject(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type,
|
||||
const std::string& name);
|
||||
void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
|
||||
protected:
|
||||
virtual ~LLInventoryObject();
|
||||
|
||||
// accessors
|
||||
virtual const LLUUID& getUUID() const;
|
||||
//--------------------------------------------------------------------
|
||||
// Accessors
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual const LLUUID& getUUID() const; // inventoryID that this item points to
|
||||
virtual const LLUUID& getLinkedUUID() const; // inventoryID that this item points to, else this item's inventoryID
|
||||
const LLUUID& getParentUUID() const;
|
||||
virtual const LLUUID& getLinkedUUID() const; // get the inventoryID that this item points to, else this item's inventoryID
|
||||
virtual const std::string& getName() const;
|
||||
virtual LLAssetType::EType getType() const;
|
||||
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
|
||||
BOOL getIsLinkType() const;
|
||||
// mutators - will not call updateServer();
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Mutators
|
||||
// Will not call updateServer
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void setUUID(const LLUUID& new_uuid);
|
||||
virtual void rename(const std::string& new_name);
|
||||
void setParent(const LLUUID& new_parent);
|
||||
void setType(LLAssetType::EType type);
|
||||
|
||||
// file support - implemented here so that a minimal information
|
||||
// set can be transmitted between simulator and viewer.
|
||||
// virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
private:
|
||||
// in place correction for inventory name string
|
||||
void correctInventoryName(std::string& name);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
// Implemented here so that a minimal information set can be transmitted
|
||||
// between simulator and viewer.
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
// virtual methods
|
||||
virtual void removeFromServer();
|
||||
virtual void updateParentOnServer(BOOL) const;
|
||||
virtual void updateServer(BOOL) const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member Variables
|
||||
//--------------------------------------------------------------------
|
||||
protected:
|
||||
LLUUID mUUID;
|
||||
LLUUID mParentUUID; // Parent category. Root categories have LLUUID::NULL.
|
||||
LLAssetType::EType mType;
|
||||
std::string mName;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLInventoryItem
|
||||
//
|
||||
// An inventory item represents something that the current user has in
|
||||
// their inventory.
|
||||
// An item in the current user's inventory.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLInventoryItem : public LLInventoryObject
|
||||
{
|
||||
public:
|
||||
typedef LLDynamicArray<LLPointer<LLInventoryItem> > item_array_t;
|
||||
|
||||
protected:
|
||||
LLPermissions mPermissions;
|
||||
LLUUID mAssetUUID;
|
||||
std::string mDescription;
|
||||
LLSaleInfo mSaleInfo;
|
||||
LLInventoryType::EType mInventoryType;
|
||||
U32 mFlags;
|
||||
time_t mCreationDate; // seconds from 1/1/1970, UTC
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Anonymous enumeration for specifying the inventory item flags.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
// The shared flags at the top are shared among all inventory
|
||||
// types. After that section, all values of flags are type
|
||||
// dependent. The shared flags will start at 2^30 and work
|
||||
// down while item type specific flags will start at 2^0 and
|
||||
// work up.
|
||||
II_FLAGS_NONE = 0,
|
||||
|
||||
|
||||
//
|
||||
// Shared flags
|
||||
//
|
||||
//
|
||||
|
||||
// This value means that the asset has only one reference in
|
||||
// the system. If the inventory item is deleted, or the asset
|
||||
// id updated, then we can remove the old reference.
|
||||
II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
|
||||
|
||||
|
||||
//
|
||||
// Landmark flags
|
||||
//
|
||||
II_FLAGS_LANDMARK_VISITED = 1,
|
||||
|
||||
//
|
||||
// Object flags
|
||||
//
|
||||
|
||||
// flag to indicate that object permissions should have next
|
||||
// owner perm be more restrictive on rez. We bump this into
|
||||
// the second byte of the flags since the low byte is used to
|
||||
// track attachment points.
|
||||
II_FLAGS_OBJECT_SLAM_PERM = 0x100,
|
||||
|
||||
// flag to indicate that the object sale information has been changed.
|
||||
II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
|
||||
|
||||
// These flags specify which permissions masks to overwrite
|
||||
// upon rez. Normally, if no permissions slam (above) or
|
||||
// overwrite flags are set, the asset's permissions are
|
||||
// used and the inventory's permissions are ignored. If
|
||||
// any of these flags are set, the inventory's permissions
|
||||
// take precedence.
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
|
||||
|
||||
// flag to indicate whether an object that is returned is composed
|
||||
// of muiltiple items or not.
|
||||
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
|
||||
|
||||
//
|
||||
// wearables use the low order byte of flags to store the
|
||||
// EWearableType enumeration found in newview/llwearable.h
|
||||
//
|
||||
II_FLAGS_WEARABLES_MASK = 0xff,
|
||||
};
|
||||
|
||||
protected:
|
||||
~LLInventoryItem(); // ref counted
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryItem(const LLUUID& uuid,
|
||||
@@ -226,13 +153,19 @@ public:
|
||||
// is prohibited
|
||||
LLInventoryItem(const LLInventoryItem* other);
|
||||
virtual void copyItem(const LLInventoryItem* other); // LLRefCount requires custom copy
|
||||
|
||||
// As a constructor alternative, the clone() method works like a
|
||||
void generateUUID() { mUUID.generate(); }
|
||||
|
||||
// As a constructor alternative, the clone() method works like a
|
||||
// copy constructor, but gens a new UUID.
|
||||
// It is up to the caller to delete (unref) the item.
|
||||
virtual void cloneItem(LLPointer<LLInventoryItem>& newitem) const;
|
||||
protected:
|
||||
~LLInventoryItem(); // ref counted
|
||||
|
||||
// accessors
|
||||
//--------------------------------------------------------------------
|
||||
// Accessors
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual const LLUUID& getLinkedUUID() const;
|
||||
virtual const LLPermissions& getPermissions() const;
|
||||
virtual const LLUUID& getCreatorUUID() const;
|
||||
@@ -244,8 +177,12 @@ public:
|
||||
virtual time_t getCreationDate() const;
|
||||
virtual U32 getCRC32() const; // really more of a checksum.
|
||||
|
||||
// mutators - will not call updateServer(), and will never fail
|
||||
// (though it may correct to sane values)
|
||||
//--------------------------------------------------------------------
|
||||
// Mutators
|
||||
// Will not call updateServer and will never fail
|
||||
// (though it may correct to sane values)
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void setAssetUUID(const LLUUID& asset_id);
|
||||
void setDescription(const std::string& new_desc);
|
||||
void setSaleInfo(const LLSaleInfo& sale_info);
|
||||
@@ -253,34 +190,56 @@ public:
|
||||
void setInventoryType(LLInventoryType::EType inv_type);
|
||||
void setFlags(U32 flags);
|
||||
void setCreationDate(time_t creation_date_utc);
|
||||
void setCreator(const LLUUID& creator); // only used for calling cards
|
||||
|
||||
// Put this inventory item onto the current outgoing mesage. It
|
||||
// assumes you have already called nextBlock().
|
||||
// Check for changes in permissions masks and sale info
|
||||
// and set the corresponding bits in mFlags.
|
||||
void accumulatePermissionSlamBits(const LLInventoryItem& old_item);
|
||||
|
||||
// Put this inventory item onto the current outgoing mesage.
|
||||
// Assumes you have already called nextBlock().
|
||||
virtual void packMessage(LLMessageSystem* msg) const;
|
||||
|
||||
// unpack returns TRUE if the inventory item came through the
|
||||
// network ok. It uses a simple crc check which is defeatable, but
|
||||
// we want to detect network mangling somehow.
|
||||
virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
|
||||
// file support
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
virtual LLXMLNode *exportFileXML(BOOL include_asset_key = TRUE) const;
|
||||
BOOL importXML(LLXMLNode* node);
|
||||
|
||||
// helper functions
|
||||
//--------------------------------------------------------------------
|
||||
// Helper Functions
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// Pack all information needed to reconstruct this item into the given binary bucket.
|
||||
|
||||
// pack all information needed to reconstruct this item into the given binary bucket.
|
||||
// perm_override is optional
|
||||
S32 packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override = NULL) const;
|
||||
void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size);
|
||||
LLSD asLLSD() const;
|
||||
bool fromLLSD(LLSD& sd);
|
||||
void asLLSD( LLSD& sd ) const;
|
||||
bool fromLLSD(const LLSD& sd);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member Variables
|
||||
//--------------------------------------------------------------------
|
||||
protected:
|
||||
LLPermissions mPermissions;
|
||||
LLUUID mAssetUUID;
|
||||
std::string mDescription;
|
||||
LLSaleInfo mSaleInfo;
|
||||
LLInventoryType::EType mInventoryType;
|
||||
U32 mFlags;
|
||||
time_t mCreationDate; // seconds from 1/1/1970, UTC
|
||||
};
|
||||
|
||||
BOOL item_dictionary_sort(LLInventoryItem* a,LLInventoryItem* b);
|
||||
@@ -300,9 +259,9 @@ class LLInventoryCategory : public LLInventoryObject
|
||||
public:
|
||||
typedef LLDynamicArray<LLPointer<LLInventoryCategory> > cat_array_t;
|
||||
|
||||
protected:
|
||||
~LLInventoryCategory();
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
|
||||
@@ -311,29 +270,39 @@ public:
|
||||
LLInventoryCategory();
|
||||
LLInventoryCategory(const LLInventoryCategory* other);
|
||||
void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy
|
||||
protected:
|
||||
~LLInventoryCategory();
|
||||
|
||||
// accessors and mutators
|
||||
//--------------------------------------------------------------------
|
||||
// Accessors And Mutators
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
LLAssetType::EType getPreferredType() const;
|
||||
void setPreferredType(LLAssetType::EType type);
|
||||
// For messaging system support
|
||||
LLSD asLLSD() const;
|
||||
bool fromLLSD(const LLSD& sd);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Messaging
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual void packMessage(LLMessageSystem* msg) const;
|
||||
virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
|
||||
|
||||
LLSD asLLSD() const;
|
||||
bool fromLLSD(LLSD& sd);
|
||||
|
||||
// file support
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member Variables
|
||||
//--------------------------------------------------------------------
|
||||
protected:
|
||||
// The type of asset that this category was "meant" to hold
|
||||
// (although it may in fact hold any type).
|
||||
LLAssetType::EType mPreferredType;
|
||||
|
||||
LLAssetType::EType mPreferredType; // Type that this category was "meant" to hold (although it may hold any type).
|
||||
};
|
||||
|
||||
|
||||
@@ -404,8 +373,8 @@ struct SetNotForSale
|
||||
if(LLAssetType::AT_OBJECT == item->getType())
|
||||
{
|
||||
U32 flags = item->getFlags();
|
||||
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
|
||||
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
|
||||
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
|
||||
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
|
||||
item->setFlags(flags);
|
||||
}
|
||||
|
||||
|
||||
38
indra/llinventory/llinventorydefines.cpp
Normal file
38
indra/llinventory/llinventorydefines.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @file llinventorydefines.cpp
|
||||
* @brief Implementation of the inventory defines.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2010, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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 "linden_common.h"
|
||||
#include "llinventorydefines.h"
|
||||
|
||||
const U8 TASK_INVENTORY_ITEM_KEY = 0;
|
||||
const U8 TASK_INVENTORY_ASSET_KEY = 1;
|
||||
107
indra/llinventory/llinventorydefines.h
Normal file
107
indra/llinventory/llinventorydefines.h
Normal file
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* @file llinventorydefines.h
|
||||
* @brief LLInventoryDefines
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2010, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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_LLINVENTORYDEFINES_H
|
||||
#define LL_LLINVENTORYDEFINES_H
|
||||
|
||||
// Consts for "key" field in the task inventory update message
|
||||
extern const U8 TASK_INVENTORY_ITEM_KEY;
|
||||
extern const U8 TASK_INVENTORY_ASSET_KEY;
|
||||
|
||||
// Max inventory buffer size (for use in packBinaryBucket)
|
||||
enum
|
||||
{
|
||||
MAX_INVENTORY_BUFFER_SIZE = 1024
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Inventory item flags enums
|
||||
// The shared flags at the top are shared among all inventory
|
||||
// types. After that section, all values of flags are type
|
||||
// dependent. The shared flags will start at 2^30 and work
|
||||
// down while item type specific flags will start at 2^0 and work up.
|
||||
//--------------------------------------------------------------------
|
||||
class LLInventoryItemFlags
|
||||
{
|
||||
public:
|
||||
enum EType
|
||||
{
|
||||
II_FLAGS_NONE = 0,
|
||||
|
||||
II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
|
||||
// The asset has only one reference in the system. If the
|
||||
// inventory item is deleted, or the assetid updated, then we
|
||||
// can remove the old reference.
|
||||
|
||||
II_FLAGS_LANDMARK_VISITED = 1,
|
||||
|
||||
II_FLAGS_OBJECT_SLAM_PERM = 0x100,
|
||||
// Object permissions should have next owner perm be more
|
||||
// restrictive on rez. We bump this into the second byte of the
|
||||
// flags since the low byte is used to track attachment points.
|
||||
|
||||
II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
|
||||
// The object sale information has been changed.
|
||||
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
|
||||
// Specify which permissions masks to overwrite
|
||||
// upon rez. Normally, if no permissions slam (above) or
|
||||
// overwrite flags are set, the asset's permissions are
|
||||
// used and the inventory's permissions are ignored. If
|
||||
// any of these flags are set, the inventory's permissions
|
||||
// take precedence.
|
||||
|
||||
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
|
||||
// Whether a returned object is composed of multiple items.
|
||||
|
||||
II_FLAGS_WEARABLES_MASK = 0xff,
|
||||
// Wearables use the low order byte of flags to store the
|
||||
// LLWearableType::EType enumeration found in newview/llwearable.h
|
||||
|
||||
II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM |
|
||||
II_FLAGS_OBJECT_SLAM_SALE |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER),
|
||||
// These bits need to be cleared whenever the asset_id is updated
|
||||
// on a pre-existing inventory item (DEV-28098 and DEV-30997)
|
||||
};
|
||||
};
|
||||
|
||||
#endif // LL_LLINVENTORYDEFINES_H
|
||||
@@ -33,66 +33,64 @@
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llinventorytype.h"
|
||||
#include "lldictionary.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
static const std::string empty_string;
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLInventoryType
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// Unlike asset type names, not limited to 8 characters.
|
||||
// Need not match asset type names.
|
||||
static const char* INVENTORY_TYPE_NAMES[LLInventoryType::IT_COUNT] =
|
||||
{
|
||||
"texture", // 0
|
||||
"sound",
|
||||
"callcard",
|
||||
"landmark",
|
||||
NULL,
|
||||
NULL, // 5
|
||||
"object",
|
||||
"notecard",
|
||||
"category",
|
||||
"root",
|
||||
"script", // 10
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"snapshot", // 15
|
||||
NULL,
|
||||
"attach",
|
||||
"wearable",
|
||||
"animation",
|
||||
"gesture", // 20
|
||||
struct InventoryEntry : public LLDictionaryEntry
|
||||
{
|
||||
InventoryEntry(const std::string &name, // unlike asset type names, not limited to 8 characters; need not match asset type names
|
||||
const std::string &human_name, // for decoding to human readable form; put any and as many printable characters you want in each one.
|
||||
int num_asset_types = 0, ...)
|
||||
:
|
||||
LLDictionaryEntry(name),
|
||||
mHumanName(human_name)
|
||||
{
|
||||
va_list argp;
|
||||
va_start(argp, num_asset_types);
|
||||
// Read in local textures
|
||||
for (U8 i=0; i < num_asset_types; i++)
|
||||
{
|
||||
LLAssetType::EType t = (LLAssetType::EType)va_arg(argp,int);
|
||||
mAssetTypes.push_back(t);
|
||||
}
|
||||
}
|
||||
|
||||
const std::string mHumanName;
|
||||
typedef std::vector<LLAssetType::EType> asset_vec_t;
|
||||
asset_vec_t mAssetTypes;
|
||||
};
|
||||
|
||||
// This table is meant for decoding to human readable form. Put any
|
||||
// and as many printable characters you want in each one.
|
||||
// See also LLAssetType::mAssetTypeHumanNames
|
||||
static const char* INVENTORY_TYPE_HUMAN_NAMES[LLInventoryType::IT_COUNT] =
|
||||
{
|
||||
"texture", // 0
|
||||
"sound",
|
||||
"calling card",
|
||||
"landmark",
|
||||
NULL,
|
||||
NULL, // 5
|
||||
"object",
|
||||
"note card",
|
||||
"folder",
|
||||
"root",
|
||||
"script", // 10
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"snapshot", // 15
|
||||
NULL,
|
||||
"attachment",
|
||||
"wearable",
|
||||
"animation",
|
||||
"gesture", // 20
|
||||
class LLInventoryDictionary : public LLSingleton<LLInventoryDictionary>,
|
||||
public LLDictionary<LLInventoryType::EType, InventoryEntry>
|
||||
{
|
||||
public:
|
||||
LLInventoryDictionary();
|
||||
};
|
||||
|
||||
LLInventoryDictionary::LLInventoryDictionary()
|
||||
{
|
||||
addEntry(LLInventoryType::IT_TEXTURE, new InventoryEntry("texture", "texture", 1, LLAssetType::AT_TEXTURE));
|
||||
addEntry(LLInventoryType::IT_SOUND, new InventoryEntry("sound", "sound", 1, LLAssetType::AT_SOUND));
|
||||
addEntry(LLInventoryType::IT_CALLINGCARD, new InventoryEntry("callcard", "calling card", 1, LLAssetType::AT_CALLINGCARD));
|
||||
addEntry(LLInventoryType::IT_LANDMARK, new InventoryEntry("landmark", "landmark", 1, LLAssetType::AT_LANDMARK));
|
||||
addEntry(LLInventoryType::IT_OBJECT, new InventoryEntry("object", "object", 1, LLAssetType::AT_OBJECT));
|
||||
addEntry(LLInventoryType::IT_NOTECARD, new InventoryEntry("notecard", "note card", 1, LLAssetType::AT_NOTECARD));
|
||||
addEntry(LLInventoryType::IT_CATEGORY, new InventoryEntry("category", "folder" ));
|
||||
addEntry(LLInventoryType::IT_ROOT_CATEGORY, new InventoryEntry("root", "root" ));
|
||||
addEntry(LLInventoryType::IT_LSL, new InventoryEntry("script", "script", 2, LLAssetType::AT_LSL_TEXT, LLAssetType::AT_LSL_BYTECODE));
|
||||
addEntry(LLInventoryType::IT_SNAPSHOT, new InventoryEntry("snapshot", "snapshot", 1, LLAssetType::AT_TEXTURE));
|
||||
addEntry(LLInventoryType::IT_ATTACHMENT, new InventoryEntry("attach", "attachment", 1, LLAssetType::AT_OBJECT));
|
||||
addEntry(LLInventoryType::IT_WEARABLE, new InventoryEntry("wearable", "wearable", 2, LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART));
|
||||
addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION));
|
||||
addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE));
|
||||
}
|
||||
|
||||
|
||||
// Maps asset types to the default inventory type for that kind of asset.
|
||||
// Thus, "Lost and Found" is a "Category"
|
||||
static const LLInventoryType::EType
|
||||
@@ -149,74 +147,28 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
|
||||
LLInventoryType::IT_NONE // AT_MY_OUTFITS
|
||||
};
|
||||
|
||||
static const int MAX_POSSIBLE_ASSET_TYPES = 2;
|
||||
static const LLAssetType::EType
|
||||
INVENTORY_TO_ASSET_TYPE[LLInventoryType::IT_COUNT][MAX_POSSIBLE_ASSET_TYPES] =
|
||||
{
|
||||
{ LLAssetType::AT_TEXTURE, LLAssetType::AT_NONE }, // IT_TEXTURE
|
||||
{ LLAssetType::AT_SOUND, LLAssetType::AT_NONE }, // IT_SOUND
|
||||
{ LLAssetType::AT_CALLINGCARD, LLAssetType::AT_NONE }, // IT_CALLINGCARD
|
||||
{ LLAssetType::AT_LANDMARK, LLAssetType::AT_NONE }, // IT_LANDMARK
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_OBJECT, LLAssetType::AT_NONE }, // IT_OBJECT
|
||||
{ LLAssetType::AT_NOTECARD, LLAssetType::AT_NONE }, // IT_NOTECARD
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE }, // IT_CATEGORY
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE }, // IT_ROOT_CATEGORY
|
||||
{ LLAssetType::AT_LSL_TEXT, LLAssetType::AT_LSL_BYTECODE }, // IT_LSL
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_TEXTURE, LLAssetType::AT_NONE }, // IT_SNAPSHOT
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_OBJECT, LLAssetType::AT_NONE }, // IT_ATTACHMENT
|
||||
{ LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART }, // IT_WEARABLE
|
||||
{ LLAssetType::AT_ANIMATION, LLAssetType::AT_NONE }, // IT_ANIMATION
|
||||
{ LLAssetType::AT_GESTURE, LLAssetType::AT_NONE }, // IT_GESTURE
|
||||
};
|
||||
|
||||
// static
|
||||
const char* LLInventoryType::lookup(EType type)
|
||||
const std::string &LLInventoryType::lookup(EType type)
|
||||
{
|
||||
if((type >= 0) && (type < IT_COUNT))
|
||||
{
|
||||
return INVENTORY_TYPE_NAMES[S32(type)];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type);
|
||||
if (!entry) return empty_string;
|
||||
return entry->mName;
|
||||
}
|
||||
|
||||
// static
|
||||
LLInventoryType::EType LLInventoryType::lookup(const std::string& name)
|
||||
{
|
||||
for(S32 i = 0; i < IT_COUNT; ++i)
|
||||
{
|
||||
if((INVENTORY_TYPE_NAMES[i])
|
||||
&& (name == INVENTORY_TYPE_NAMES[i]))
|
||||
{
|
||||
// match
|
||||
return (EType)i;
|
||||
}
|
||||
}
|
||||
return IT_NONE;
|
||||
return LLInventoryDictionary::getInstance()->lookup(name);
|
||||
}
|
||||
|
||||
// XUI:translate
|
||||
// translation from a type to a human readable form.
|
||||
// static
|
||||
const char* LLInventoryType::lookupHumanReadable(EType type)
|
||||
const std::string &LLInventoryType::lookupHumanReadable(EType type)
|
||||
{
|
||||
if((type >= 0) && (type < IT_COUNT))
|
||||
{
|
||||
return INVENTORY_TYPE_HUMAN_NAMES[S32(type)];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type);
|
||||
if (!entry) return empty_string;
|
||||
return entry->mHumanName;
|
||||
}
|
||||
|
||||
// return the default inventory for the given asset type.
|
||||
@@ -233,21 +185,40 @@ LLInventoryType::EType LLInventoryType::defaultForAssetType(LLAssetType::EType a
|
||||
}
|
||||
}
|
||||
|
||||
bool inventory_and_asset_types_match(
|
||||
LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type)
|
||||
|
||||
// add any types that we don't want the user to be able to change permissions on.
|
||||
// static
|
||||
bool LLInventoryType::cannotRestrictPermissions(LLInventoryType::EType type)
|
||||
{
|
||||
bool rv = false;
|
||||
if((inventory_type >= 0) && (inventory_type < LLInventoryType::IT_COUNT))
|
||||
switch(type)
|
||||
{
|
||||
for(S32 i = 0; i < MAX_POSSIBLE_ASSET_TYPES; ++i)
|
||||
case IT_CALLINGCARD:
|
||||
case IT_LANDMARK:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type)
|
||||
{
|
||||
// Links can be of any inventory type.
|
||||
if (LLAssetType::lookupIsLinkType(asset_type))
|
||||
return true;
|
||||
|
||||
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(inventory_type);
|
||||
if (!entry) return false;
|
||||
|
||||
for (InventoryEntry::asset_vec_t::const_iterator iter = entry->mAssetTypes.begin();
|
||||
iter != entry->mAssetTypes.end();
|
||||
iter++)
|
||||
{
|
||||
const LLAssetType::EType type = (*iter);
|
||||
if(type == asset_type)
|
||||
{
|
||||
if(INVENTORY_TO_ASSET_TYPE[inventory_type][i] == asset_type)
|
||||
{
|
||||
rv = true;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,14 +74,16 @@ public:
|
||||
|
||||
// machine transation between type and strings
|
||||
static EType lookup(const std::string& name);
|
||||
static const char* lookup(EType type);
|
||||
|
||||
static const std::string &lookup(EType type);
|
||||
// translation from a type to a human readable form.
|
||||
static const char* lookupHumanReadable(EType type);
|
||||
static const std::string &lookupHumanReadable(EType type);
|
||||
|
||||
// return the default inventory for the given asset type.
|
||||
static EType defaultForAssetType(LLAssetType::EType asset_type);
|
||||
|
||||
// true if this type cannot have restricted permissions.
|
||||
static bool cannotRestrictPermissions(EType type);
|
||||
|
||||
private:
|
||||
// don't instantiate or derive one of these objects
|
||||
LLInventoryType( void );
|
||||
@@ -91,8 +93,7 @@ private:
|
||||
// helper function which returns true if inventory type and asset type
|
||||
// are potentially compatible. For example, an attachment must be an
|
||||
// object, but a wearable can be a bodypart or clothing asset.
|
||||
bool inventory_and_asset_types_match(
|
||||
LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type);
|
||||
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
std::pair<LLUUID, U64> LLLandmark::mLocalRegion;
|
||||
LLLandmark::region_map_t LLLandmark::mRegions;
|
||||
LLLandmark::region_callback_t LLLandmark::mRegionCallback;
|
||||
LLLandmark::region_callback_map_t LLLandmark::sRegionCallbackMap;
|
||||
|
||||
LLLandmark::LLLandmark() :
|
||||
mGlobalPositionKnown(false)
|
||||
@@ -177,7 +177,7 @@ void LLLandmark::requestRegionHandle(
|
||||
LLMessageSystem* msg,
|
||||
const LLHost& upstream_host,
|
||||
const LLUUID& region_id,
|
||||
LLRegionHandleCallback* callback)
|
||||
region_handle_callback_t callback)
|
||||
{
|
||||
if(region_id.isNull())
|
||||
{
|
||||
@@ -186,7 +186,7 @@ void LLLandmark::requestRegionHandle(
|
||||
if(callback)
|
||||
{
|
||||
const U64 U64_ZERO = 0;
|
||||
callback->dataReady(region_id, U64_ZERO);
|
||||
callback(region_id, U64_ZERO);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -196,7 +196,7 @@ void LLLandmark::requestRegionHandle(
|
||||
lldebugs << "requestRegionHandle: local" << llendl;
|
||||
if(callback)
|
||||
{
|
||||
callback->dataReady(region_id, mLocalRegion.second);
|
||||
callback(region_id, mLocalRegion.second);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -207,8 +207,8 @@ void LLLandmark::requestRegionHandle(
|
||||
lldebugs << "requestRegionHandle: upstream" << llendl;
|
||||
if(callback)
|
||||
{
|
||||
region_callback_t::value_type vt(region_id, callback);
|
||||
mRegionCallback.insert(vt);
|
||||
region_callback_map_t::value_type vt(region_id, callback);
|
||||
sRegionCallbackMap.insert(vt);
|
||||
}
|
||||
lldebugs << "Landmark requesting information about: "
|
||||
<< region_id << llendl;
|
||||
@@ -221,7 +221,7 @@ void LLLandmark::requestRegionHandle(
|
||||
{
|
||||
// we have the answer locally - just call the callack.
|
||||
lldebugs << "requestRegionHandle: ready" << llendl;
|
||||
callback->dataReady(region_id, (*it).second.mRegionHandle);
|
||||
callback(region_id, (*it).second.mRegionHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,11 +259,11 @@ void LLLandmark::processRegionIDAndHandle(LLMessageSystem* msg, void**)
|
||||
#endif
|
||||
|
||||
// make all the callbacks here.
|
||||
region_callback_t::iterator it;
|
||||
while((it = mRegionCallback.find(region_id)) != mRegionCallback.end())
|
||||
region_callback_map_t::iterator it;
|
||||
while((it = sRegionCallbackMap.find(region_id)) != sRegionCallbackMap.end())
|
||||
{
|
||||
(*it).second->dataReady(region_id, info.mRegionHandle);
|
||||
mRegionCallback.erase(it);
|
||||
(*it).second(region_id, info.mRegionHandle);
|
||||
sRegionCallbackMap.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#define LL_LLLANDMARK_H
|
||||
|
||||
#include <map>
|
||||
#include <boost/function.hpp>
|
||||
#include "llframetimer.h"
|
||||
#include "lluuid.h"
|
||||
#include "v3dmath.h"
|
||||
@@ -42,24 +43,12 @@
|
||||
class LLMessageSystem;
|
||||
class LLHost;
|
||||
|
||||
// virutal base class used for calling back interested parties when a
|
||||
// region handle comes back.
|
||||
class LLRegionHandleCallback
|
||||
{
|
||||
public:
|
||||
LLRegionHandleCallback() {}
|
||||
virtual ~LLRegionHandleCallback() {}
|
||||
virtual bool dataReady(
|
||||
const LLUUID& region_id,
|
||||
const U64& region_handle)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLLandmark
|
||||
{
|
||||
public:
|
||||
// for calling back interested parties when a region handle comes back.
|
||||
typedef boost::function<void(const LLUUID& region_id, const U64& region_handle)> region_handle_callback_t;
|
||||
|
||||
~LLLandmark() {}
|
||||
|
||||
// returns true if the position is known.
|
||||
@@ -90,7 +79,7 @@ public:
|
||||
LLMessageSystem* msg,
|
||||
const LLHost& upstream_host,
|
||||
const LLUUID& region_id,
|
||||
LLRegionHandleCallback* callback);
|
||||
region_handle_callback_t callback);
|
||||
|
||||
// Call this method to create a lookup for this region. This
|
||||
// simplifies a lot of the code.
|
||||
@@ -118,8 +107,8 @@ private:
|
||||
static std::pair<LLUUID, U64> mLocalRegion;
|
||||
typedef std::map<LLUUID, CacheInfo> region_map_t;
|
||||
static region_map_t mRegions;
|
||||
typedef std::multimap<LLUUID, LLRegionHandleCallback*> region_callback_t;
|
||||
static region_callback_t mRegionCallback;
|
||||
typedef std::multimap<LLUUID, region_handle_callback_t> region_callback_map_t;
|
||||
static region_callback_map_t sRegionCallbackMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
#include "llstreamtools.h"
|
||||
|
||||
LLNotecard::LLNotecard(S32 max_text)
|
||||
: mMaxText(max_text)
|
||||
: mMaxText(max_text),
|
||||
mVersion(0),
|
||||
mEmbeddedVersion(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -203,7 +205,7 @@ bool LLNotecard::importStream(std::istream& str)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(text_len > mMaxText)
|
||||
if(text_len > mMaxText || text_len < 0)
|
||||
{
|
||||
llwarns << "Invalid Linden text length: " << text_len << llendl;
|
||||
return FALSE;
|
||||
|
||||
@@ -79,23 +79,25 @@ static const std::string PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] =
|
||||
"shopping",
|
||||
"stage",
|
||||
"other",
|
||||
"rental"
|
||||
};
|
||||
static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] =
|
||||
{
|
||||
"None",
|
||||
"Linden Location",
|
||||
"Adult",
|
||||
"Arts & Culture",
|
||||
"Arts and Culture",
|
||||
"Business",
|
||||
"Educational",
|
||||
"Gaming",
|
||||
"Hangout",
|
||||
"Newcomer Friendly",
|
||||
"Parks & Nature",
|
||||
"Parks and Nature",
|
||||
"Residential",
|
||||
"Shopping",
|
||||
"Stage",
|
||||
"Other",
|
||||
"Rental",
|
||||
"Any", // valid string for parcel searches
|
||||
};
|
||||
|
||||
@@ -195,8 +197,6 @@ void LLParcel::init(const LLUUID &owner_id,
|
||||
mMediaID.setNull();
|
||||
mMediaAutoScale = 0;
|
||||
mMediaLoop = TRUE;
|
||||
mObscureMedia = 1;
|
||||
mObscureMusic = 1;
|
||||
mMediaWidth = 0;
|
||||
mMediaHeight = 0;
|
||||
setMediaCurrentURL(LLStringUtil::null);
|
||||
@@ -692,8 +692,8 @@ void LLParcel::packMessage(LLSD& msg)
|
||||
msg["auto_scale"] = getMediaAutoScale();
|
||||
msg["media_loop"] = getMediaLoop();
|
||||
msg["media_current_url"] = getMediaCurrentURL();
|
||||
msg["obscure_media"] = getObscureMedia();
|
||||
msg["obscure_music"] = getObscureMusic();
|
||||
msg["obscure_media"] = false; // OBSOLETE - no longer used
|
||||
msg["obscure_music"] = false; // OBSOLETE - no longer used
|
||||
msg["media_id"] = getMediaID();
|
||||
msg["media_allow_navigate"] = getMediaAllowNavigate();
|
||||
msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom();
|
||||
@@ -757,16 +757,12 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
|
||||
msg->getS32("MediaData", "MediaWidth", mMediaWidth);
|
||||
msg->getS32("MediaData", "MediaHeight", mMediaHeight);
|
||||
msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop );
|
||||
msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia );
|
||||
msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic );
|
||||
}
|
||||
else
|
||||
{
|
||||
setMediaType(std::string("video/vnd.secondlife.qt.legacy"));
|
||||
setMediaDesc(std::string("No Description available without Server Upgrade"));
|
||||
mMediaLoop = true;
|
||||
mObscureMedia = true;
|
||||
mObscureMusic = true;
|
||||
}
|
||||
|
||||
if(msg->getNumberOfBlocks("MediaLinkSharing") > 0)
|
||||
@@ -1232,8 +1228,6 @@ void LLParcel::clearParcel()
|
||||
setMediaDesc(LLStringUtil::null);
|
||||
setMediaAutoScale(0);
|
||||
setMediaLoop(TRUE);
|
||||
mObscureMedia = 1;
|
||||
mObscureMusic = 1;
|
||||
mMediaWidth = 0;
|
||||
mMediaHeight = 0;
|
||||
setMediaCurrentURL(LLStringUtil::null);
|
||||
|
||||
@@ -170,6 +170,7 @@ public:
|
||||
C_SHOPPING,
|
||||
C_STAGE,
|
||||
C_OTHER,
|
||||
C_RENTAL,
|
||||
C_COUNT,
|
||||
C_ANY = -1 // only useful in queries
|
||||
};
|
||||
@@ -243,8 +244,6 @@ public:
|
||||
void setMediaID(const LLUUID& id) { mMediaID = id; }
|
||||
void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; }
|
||||
void setMediaLoop (U8 loop) { mMediaLoop = loop; }
|
||||
void setObscureMedia( U8 flagIn ) { mObscureMedia = flagIn; }
|
||||
void setObscureMusic( U8 flagIn ) { mObscureMusic = flagIn; }
|
||||
void setMediaWidth(S32 width);
|
||||
void setMediaHeight(S32 height);
|
||||
void setMediaCurrentURL(const std::string& url);
|
||||
@@ -351,8 +350,6 @@ public:
|
||||
U8 getMediaAutoScale() const { return mMediaAutoScale; }
|
||||
U8 getMediaLoop() const { return mMediaLoop; }
|
||||
const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; }
|
||||
U8 getObscureMedia() const { return mObscureMedia; }
|
||||
U8 getObscureMusic() const { return mObscureMusic; }
|
||||
U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; }
|
||||
LLSD getMediaURLFilterList() const { return mMediaURLFilterList; }
|
||||
U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; }
|
||||
@@ -538,7 +535,7 @@ public:
|
||||
|
||||
static bool isAgentBlockedFromParcel(LLParcel* parcelp,
|
||||
const LLUUID& agent_id,
|
||||
const std::vector<LLUUID>& group_ids,
|
||||
const uuid_vec_t& group_ids,
|
||||
const BOOL is_agent_identified,
|
||||
const BOOL is_agent_transacted,
|
||||
const BOOL is_agent_ageverified);
|
||||
@@ -644,8 +641,6 @@ protected:
|
||||
U8 mMediaAutoScale;
|
||||
U8 mMediaLoop;
|
||||
std::string mMediaCurrentURL;
|
||||
U8 mObscureMedia;
|
||||
U8 mObscureMusic;
|
||||
LLUUID mMediaID;
|
||||
U8 mMediaURLFilterEnable;
|
||||
LLSD mMediaURLFilterList;
|
||||
|
||||
@@ -83,6 +83,17 @@ void LLPermissions::initMasks(PermissionMask base, PermissionMask owner,
|
||||
fix();
|
||||
}
|
||||
|
||||
// ! BACKWARDS COMPATIBILITY ! Override masks for inventory types that
|
||||
// no longer can have restricted permissions. This takes care of previous
|
||||
// version landmarks that could have had no copy/mod/transfer bits set.
|
||||
void LLPermissions::initMasks(LLInventoryType::EType type)
|
||||
{
|
||||
if (LLInventoryType::cannotRestrictPermissions(type))
|
||||
{
|
||||
initMasks(PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPermissions::getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const
|
||||
{
|
||||
if(mOwner.notNull())
|
||||
@@ -277,6 +288,17 @@ BOOL LLPermissions::setOwnerAndGroup(
|
||||
return allowed;
|
||||
}
|
||||
|
||||
//Fix for DEV-33917, last owner isn't used much and has little impact on
|
||||
//permissions so it's reasonably safe to do this, however, for now,
|
||||
//limiting the functionality of this routine to objects which are
|
||||
//group owned.
|
||||
void LLPermissions::setLastOwner(const LLUUID& last_owner)
|
||||
{
|
||||
if (isGroupOwned())
|
||||
mLastOwner = last_owner;
|
||||
}
|
||||
|
||||
|
||||
// only call this if you know what you're doing
|
||||
// there are usually perm-bit consequences when the
|
||||
// ownerhsip changes
|
||||
@@ -457,7 +479,7 @@ BOOL LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, B
|
||||
return ownership;
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester, const LLUUID& group) const
|
||||
bool LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester, const LLUUID& group) const
|
||||
{
|
||||
if(requester.isNull())
|
||||
{
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "lluuid.h"
|
||||
#include "llxmlnode.h"
|
||||
#include "reflective.h"
|
||||
#include "llinventorytype.h"
|
||||
|
||||
// prototypes
|
||||
class LLMessageSystem;
|
||||
@@ -129,6 +130,8 @@ public:
|
||||
void initMasks(PermissionMask base, PermissionMask owner,
|
||||
PermissionMask everyone, PermissionMask group,
|
||||
PermissionMask next);
|
||||
// adjust permissions based on inventory type.
|
||||
void initMasks(LLInventoryType::EType type);
|
||||
|
||||
//
|
||||
// ACCESSORS
|
||||
@@ -229,6 +232,9 @@ public:
|
||||
// ownerhsip changes
|
||||
void yesReallySetOwner(const LLUUID& owner, bool group_owned);
|
||||
|
||||
// Last owner doesn't have much in the way of permissions so it's
|
||||
//not too dangerous to do this.
|
||||
void setLastOwner(const LLUUID& last_owner);
|
||||
// saves last owner, sets owner to uuid null, sets group
|
||||
// owned. group_id must be the group of the object (that's who it
|
||||
// is being deeded to) and the object must be group
|
||||
@@ -249,7 +255,11 @@ public:
|
||||
BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
|
||||
BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
|
||||
BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
|
||||
|
||||
|
||||
// This is currently only used in the Viewer to handle calling cards
|
||||
// where the creator is actually used to store the target. Use with care.
|
||||
void setCreator(const LLUUID& creator) { mCreator = creator; }
|
||||
|
||||
//
|
||||
// METHODS
|
||||
//
|
||||
@@ -261,18 +271,18 @@ public:
|
||||
// They also return true if the object isn't owned, or the
|
||||
// requesting agent is a system agent. See llpermissionsflags.h
|
||||
// for bits.
|
||||
BOOL allowOperationBy(PermissionBit op, const LLUUID& agent, const LLUUID& group = LLUUID::null) const;
|
||||
bool allowOperationBy(PermissionBit op, const LLUUID& agent, const LLUUID& group = LLUUID::null) const;
|
||||
|
||||
inline BOOL allowModifyBy(const LLUUID &agent_id) const;
|
||||
inline BOOL allowCopyBy(const LLUUID& agent_id) const;
|
||||
inline BOOL allowMoveBy(const LLUUID& agent_id) const;
|
||||
inline BOOL allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const;
|
||||
inline BOOL allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
|
||||
inline BOOL allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
|
||||
inline bool allowModifyBy(const LLUUID &agent_id) const;
|
||||
inline bool allowCopyBy(const LLUUID& agent_id) const;
|
||||
inline bool allowMoveBy(const LLUUID& agent_id) const;
|
||||
inline bool allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const;
|
||||
inline bool allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
|
||||
inline bool allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
|
||||
|
||||
// This somewhat specialized function is meant for testing if the
|
||||
// current owner is allowed to transfer to the specified agent id.
|
||||
inline BOOL allowTransferTo(const LLUUID &agent_id) const;
|
||||
inline bool allowTransferTo(const LLUUID &agent_id) const;
|
||||
|
||||
//
|
||||
// DEPRECATED.
|
||||
@@ -328,38 +338,38 @@ public:
|
||||
};
|
||||
|
||||
// Inlines
|
||||
BOOL LLPermissions::allowModifyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
bool LLPermissions::allowModifyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
{
|
||||
return allowOperationBy(PERM_MODIFY, agent, group);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowCopyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
bool LLPermissions::allowCopyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
{
|
||||
return allowOperationBy(PERM_COPY, agent, group);
|
||||
}
|
||||
|
||||
|
||||
BOOL LLPermissions::allowMoveBy(const LLUUID& agent, const LLUUID& group) const
|
||||
bool LLPermissions::allowMoveBy(const LLUUID& agent, const LLUUID& group) const
|
||||
{
|
||||
return allowOperationBy(PERM_MOVE, agent, group);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowModifyBy(const LLUUID& agent) const
|
||||
bool LLPermissions::allowModifyBy(const LLUUID& agent) const
|
||||
{
|
||||
return allowOperationBy(PERM_MODIFY, agent, LLUUID::null);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowCopyBy(const LLUUID& agent) const
|
||||
bool LLPermissions::allowCopyBy(const LLUUID& agent) const
|
||||
{
|
||||
return allowOperationBy(PERM_COPY, agent, LLUUID::null);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowMoveBy(const LLUUID& agent) const
|
||||
bool LLPermissions::allowMoveBy(const LLUUID& agent) const
|
||||
{
|
||||
return allowOperationBy(PERM_MOVE, agent, LLUUID::null);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowTransferTo(const LLUUID &agent_id) const
|
||||
bool LLPermissions::allowTransferTo(const LLUUID &agent_id) const
|
||||
{
|
||||
if (mIsGroupOwned)
|
||||
{
|
||||
|
||||
@@ -111,7 +111,7 @@ LLSD LLSaleInfo::asLLSD() const
|
||||
return sd;
|
||||
}
|
||||
|
||||
bool LLSaleInfo::fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
|
||||
bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
|
||||
{
|
||||
const char *w;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
BOOL exportLegacyStream(std::ostream& output_stream) const;
|
||||
LLSD asLLSD() const;
|
||||
operator LLSD() const { return asLLSD(); }
|
||||
bool fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
|
||||
bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
|
||||
BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask);
|
||||
|
||||
LLXMLNode *exportFileXML() const;
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
// Money transaction failure codes
|
||||
const U8 TRANS_FAIL_SIMULATOR_TIMEOUT = 1;
|
||||
const U8 TRANS_FAIL_DATASERVER_TIMEOUT = 2;
|
||||
const U8 TRANS_FAIL_APPLICATION = 3;
|
||||
|
||||
// Codes up to 999 for error conditions
|
||||
const S32 TRANS_NULL = 0;
|
||||
@@ -68,6 +69,11 @@ const S32 TRANS_PARCEL_DIR_FEE = 2003;
|
||||
const S32 TRANS_GROUP_TAX = 2004; // Taxes incurred as part of group membership
|
||||
const S32 TRANS_CLASSIFIED_RENEW = 2005;
|
||||
|
||||
// Codes 2100-2999 reserved for recurring billing services
|
||||
// New codes can be created through an admin interface so may not
|
||||
// automatically end up in the list below :-(
|
||||
// So make sure you check the transaction_description table
|
||||
const S32 TRANS_RECURRING_GENERIC = 2100;
|
||||
// Codes 3000-3999 reserved for inventory transactions
|
||||
const S32 TRANS_GIVE_INVENTORY = 3000;
|
||||
|
||||
@@ -83,6 +89,12 @@ const S32 TRANS_DWELL_BONUS = 5007;
|
||||
const S32 TRANS_PAY_OBJECT = 5008;
|
||||
const S32 TRANS_OBJECT_PAYS = 5009;
|
||||
|
||||
// Codes 5100-5999 reserved for recurring billing transfers between users
|
||||
// New codes can be created through an admin interface so may not
|
||||
// automatically end up in the list below :-(
|
||||
// So make sure you check the transaction_description table
|
||||
const S32 TRANS_RECURRING_GENERIC_USER = 5100;
|
||||
|
||||
// Codes 6000-6999 reserved for group transactions
|
||||
//const S32 TRANS_GROUP_JOIN = 6000; //reserved for future use
|
||||
const S32 TRANS_GROUP_LAND_DEED = 6001;
|
||||
|
||||
@@ -44,7 +44,12 @@
|
||||
#define OCT_ERRS LL_WARNS("OctreeErrors")
|
||||
#endif
|
||||
|
||||
#if LL_DEBUG
|
||||
#define LL_OCTREE_PARANOIA_CHECK 0
|
||||
#else
|
||||
#define LL_OCTREE_PARANOIA_CHECK 0
|
||||
#endif
|
||||
|
||||
#define LL_OCTREE_MAX_CAPACITY 128
|
||||
|
||||
template <class T> class LLOctreeNode;
|
||||
@@ -295,7 +300,7 @@ public:
|
||||
//if this is a redundant insertion, error out (should never happen)
|
||||
if (mData.find(data) != mData.end())
|
||||
{
|
||||
llwarns << "Redundant octree insertion detected. " << data << llendl;
|
||||
llerrs << "Redundant octree insertion detected. " << data << llendl;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@@ -313,16 +318,9 @@ public:
|
||||
child = getChild(i);
|
||||
if (child->isInside(data->getPositionGroup()))
|
||||
{
|
||||
// <edit>
|
||||
// tempfix, test, shitsux
|
||||
//child->insert(data);
|
||||
if(child->getElementCount() < LL_OCTREE_MAX_CAPACITY)
|
||||
{
|
||||
child->insert(data);
|
||||
return false;
|
||||
}
|
||||
//return false;
|
||||
// </edit>
|
||||
llassert(child->getElementCount() <= LL_OCTREE_MAX_CAPACITY);
|
||||
child->insert(data);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
//
|
||||
// Sorry the code is such a mess. JC
|
||||
|
||||
#include "llpreprocessor.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLV4MATH - GNUC
|
||||
|
||||
@@ -3391,7 +3391,8 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
|
||||
std::vector<S32> &segments,
|
||||
const LLVector3& obj_cam_vec,
|
||||
const LLMatrix4& mat,
|
||||
const LLMatrix3& norm_mat)
|
||||
const LLMatrix3& norm_mat,
|
||||
S32 face_mask)
|
||||
{
|
||||
LLMemType m1(LLMemType::MTYPE_VOLUME);
|
||||
|
||||
@@ -3399,12 +3400,17 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
|
||||
normals.clear();
|
||||
segments.clear();
|
||||
|
||||
S32 cur_index = 0;
|
||||
//for each face
|
||||
for (face_list_t::iterator iter = mVolumeFaces.begin();
|
||||
iter != mVolumeFaces.end(); ++iter)
|
||||
{
|
||||
const LLVolumeFace& face = *iter;
|
||||
|
||||
if (!(face_mask & (0x1 << cur_index++)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) {
|
||||
|
||||
}
|
||||
|
||||
@@ -909,7 +909,8 @@ public:
|
||||
std::vector<S32> &segments,
|
||||
const LLVector3& view_vec,
|
||||
const LLMatrix4& mat,
|
||||
const LLMatrix3& norm_mat);
|
||||
const LLMatrix3& norm_mat,
|
||||
S32 face_index);
|
||||
|
||||
//get the face index of the face that intersects with the given line segment at the point
|
||||
//closest to start. Moves end to the point of intersection. Returns -1 if no intersection.
|
||||
|
||||
@@ -45,8 +45,7 @@ F32 LLVolumeLODGroup::mDetailThresholds[NUM_LODS] = {BASE_THRESHOLD,
|
||||
100*BASE_THRESHOLD};
|
||||
|
||||
//static
|
||||
F32 LLVolumeLODGroup::mDetailScales[NUM_LODS] = {1.f, 1.35f, 2.01f, 4.f};
|
||||
// 6, 8, 12, 24 vertices -SG
|
||||
F32 LLVolumeLODGroup::mDetailScales[NUM_LODS] = {1.f, 1.5f, 2.5f, 4.f};
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
@@ -562,14 +562,13 @@ void LLAvatarNameCache::idle()
|
||||
bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id)
|
||||
{
|
||||
const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0;
|
||||
F64 now = LLFrameTimer::getTotalSeconds();
|
||||
F64 expire_time = now - PENDING_TIMEOUT_SECS;
|
||||
|
||||
pending_queue_t::const_iterator it = sPendingQueue.find(agent_id);
|
||||
if (it != sPendingQueue.end())
|
||||
{
|
||||
bool request_expired = (it->second < expire_time);
|
||||
return !request_expired;
|
||||
// in the list of requests in flight, retry if too old
|
||||
F64 expire_time = LLFrameTimer::getTotalSeconds() - PENDING_TIMEOUT_SECS;
|
||||
return it->second > expire_time;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -578,14 +577,12 @@ void LLAvatarNameCache::eraseExpired()
|
||||
{
|
||||
F64 now = LLFrameTimer::getTotalSeconds();
|
||||
cache_t::iterator it = sCache.begin();
|
||||
while (it != sCache.end())
|
||||
for (cache_t::iterator it = sCache.begin(); it != sCache.end(); ++it)
|
||||
{
|
||||
cache_t::iterator cur = it;
|
||||
++it;
|
||||
const LLAvatarName& av_name = cur->second;
|
||||
const LLAvatarName& av_name = it->second;
|
||||
if (av_name.mExpires < now)
|
||||
{
|
||||
sCache.erase(cur);
|
||||
sCache.erase(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1085,8 +1085,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::strin
|
||||
U8 packed_buffer[MAX_TE_BUFFER];
|
||||
U8 *cur_ptr = packed_buffer;
|
||||
|
||||
|
||||
S32 last_face_index = getNumTEs() - 1;
|
||||
S32 last_face_index = llmin((U32) getNumTEs(), MAX_TES) - 1;
|
||||
|
||||
if (client_str == "c228d1cf-4b5d-4ba8-84f4-899a0796aa97") shield = 0;
|
||||
|
||||
@@ -1380,7 +1379,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
|
||||
return retval;
|
||||
}
|
||||
|
||||
face_count = getNumTEs();
|
||||
face_count = llmin((U32) getNumTEs(), MAX_TES);
|
||||
U32 i;
|
||||
|
||||
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_data, 16, face_count, MVT_LLUUID);
|
||||
|
||||
@@ -35,6 +35,7 @@ set(llrender_SOURCE_FILES
|
||||
llpostprocess.cpp
|
||||
llrendersphere.cpp
|
||||
llshadermgr.cpp
|
||||
lltexture.cpp
|
||||
llvertexbuffer.cpp
|
||||
)
|
||||
|
||||
@@ -57,6 +58,7 @@ set(llrender_HEADER_FILES
|
||||
llrender.h
|
||||
llrendersphere.h
|
||||
llshadermgr.h
|
||||
lltexture.h
|
||||
llvertexbuffer.h
|
||||
)
|
||||
|
||||
|
||||
@@ -1079,15 +1079,15 @@ void LLFontGL::clearEmbeddedChars()
|
||||
mEmbeddedChars.clear();
|
||||
}
|
||||
|
||||
void LLFontGL::addEmbeddedChar( llwchar wc, LLImageGL* image, const std::string& label ) const
|
||||
void LLFontGL::addEmbeddedChar( llwchar wc, LLTexture* image, const std::string& label ) const
|
||||
{
|
||||
LLWString wlabel = utf8str_to_wstring(label);
|
||||
addEmbeddedChar(wc, image, wlabel);
|
||||
}
|
||||
|
||||
void LLFontGL::addEmbeddedChar( llwchar wc, LLImageGL* image, const LLWString& wlabel ) const
|
||||
void LLFontGL::addEmbeddedChar( llwchar wc, LLTexture* image, const LLWString& wlabel ) const
|
||||
{
|
||||
embedded_data_t* ext_data = new embedded_data_t(image, wlabel);
|
||||
embedded_data_t* ext_data = new embedded_data_t(image->getGLTexture(), wlabel);
|
||||
mEmbeddedChars[wc] = ext_data;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#define LL_LLFONTGL_H
|
||||
|
||||
#include "llfont.h"
|
||||
#include "llimagegl.h"
|
||||
#include "lltexture.h"
|
||||
#include "v2math.h"
|
||||
#include "llcoord.h"
|
||||
#include "llrect.h"
|
||||
@@ -194,10 +194,10 @@ public:
|
||||
BOOL round = TRUE, BOOL use_embedded = FALSE) const;
|
||||
|
||||
|
||||
LLImageGL *getImageGL() const;
|
||||
LLTexture *getTexture() const;
|
||||
|
||||
void addEmbeddedChar( llwchar wc, LLImageGL* image, const std::string& label) const;
|
||||
void addEmbeddedChar( llwchar wc, LLImageGL* image, const LLWString& label) const;
|
||||
void addEmbeddedChar( llwchar wc, LLTexture* image, const std::string& label) const;
|
||||
void addEmbeddedChar( llwchar wc, LLTexture* image, const LLWString& label) const;
|
||||
void removeEmbeddedChar( llwchar wc ) const;
|
||||
|
||||
static std::string nameFromFont(const LLFontGL* fontp);
|
||||
|
||||
@@ -70,7 +70,7 @@ hasGamma(false), hasLighting(false), calculatesAtmospherics(false)
|
||||
// LLGLSL Shader implementation
|
||||
//===============================
|
||||
LLGLSLShader::LLGLSLShader(S32 shader_class)
|
||||
: mProgramObject(0), mShaderClass(shader_class), mShaderLevel(0), mShaderGroup(SG_DEFAULT)
|
||||
: mProgramObject(0), mShaderClass(shader_class), mActiveTextureChannels(0), mShaderLevel(0), mShaderGroup(SG_DEFAULT), mUniformsDirty(FALSE)
|
||||
{
|
||||
LLShaderMgr::getGlobalShaderList().push_back(this);
|
||||
}
|
||||
|
||||
@@ -238,9 +238,11 @@ public:
|
||||
class LLGLSSpecular
|
||||
{
|
||||
public:
|
||||
F32 mShininess;
|
||||
LLGLSSpecular(const LLColor4& color, F32 shininess)
|
||||
{
|
||||
if (shininess > 0.0f)
|
||||
mShininess = shininess;
|
||||
if (mShininess > 0.0f)
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color.mV);
|
||||
S32 shiny = (S32)(shininess*128.f);
|
||||
@@ -250,8 +252,11 @@ public:
|
||||
}
|
||||
~LLGLSSpecular()
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
|
||||
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
|
||||
if (mShininess > 0.f)
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
|
||||
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ std::list<U32> LLImageGL::sDeadTextureList;
|
||||
BOOL LLImageGL::sGlobalUseAnisotropic = FALSE;
|
||||
F32 LLImageGL::sLastFrameTime = 0.f;
|
||||
BOOL LLImageGL::sAllowReadBackRaw = FALSE ;
|
||||
LLImageGL* LLImageGL::sDefaultGLTexture = NULL ;
|
||||
|
||||
std::set<LLImageGL*> LLImageGL::sImageList;
|
||||
|
||||
@@ -105,9 +106,9 @@ void check_all_images()
|
||||
}
|
||||
}
|
||||
|
||||
void LLImageGL::checkTexSize() const
|
||||
void LLImageGL::checkTexSize(bool forced) const
|
||||
{
|
||||
if (gDebugGL && mTarget == GL_TEXTURE_2D)
|
||||
if ((forced || gDebugGL) && mTarget == GL_TEXTURE_2D)
|
||||
{
|
||||
GLint texname;
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D, &texname);
|
||||
@@ -186,7 +187,6 @@ void LLImageGL::setHighlightTexture(S32 category)
|
||||
}
|
||||
}
|
||||
sHighlightTexturep->createGLTexture(0, image_raw, 0, TRUE, category);
|
||||
sHighlightTexturep->dontDiscard();
|
||||
image_raw = NULL;
|
||||
}
|
||||
|
||||
@@ -272,27 +272,15 @@ void LLImageGL::updateStats(F32 current_time)
|
||||
}
|
||||
|
||||
//static
|
||||
S32 LLImageGL::updateBoundTexMemStatic(const S32 delta, const S32 size, S32 category)
|
||||
S32 LLImageGL::updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 category)
|
||||
{
|
||||
if(gAuditTexture)
|
||||
if(gAuditTexture && ncomponents > 0 && category > -1)
|
||||
{
|
||||
sTextureCurBoundCounter[getTextureCounterIndex(size)]++ ;
|
||||
sTextureCurMemByCategoryBound[category] += delta ;
|
||||
sTextureCurBoundCounter[getTextureCounterIndex(mem / ncomponents)]++ ;
|
||||
sTextureCurMemByCategoryBound[category] += mem ;
|
||||
}
|
||||
|
||||
LLImageGL::sCurBoundTextureMemory += delta ;
|
||||
return LLImageGL::sCurBoundTextureMemory;
|
||||
}
|
||||
|
||||
S32 LLImageGL::updateBoundTexMem()const
|
||||
{
|
||||
if(gAuditTexture)
|
||||
{
|
||||
sTextureCurBoundCounter[getTextureCounterIndex(mTextureMemory / mComponents)]++ ;
|
||||
sTextureCurMemByCategoryBound[mCategory] += mTextureMemory ;
|
||||
}
|
||||
|
||||
LLImageGL::sCurBoundTextureMemory += mTextureMemory ;
|
||||
LLImageGL::sCurBoundTextureMemory += mem ;
|
||||
return LLImageGL::sCurBoundTextureMemory;
|
||||
}
|
||||
|
||||
@@ -301,11 +289,13 @@ S32 LLImageGL::updateBoundTexMem()const
|
||||
//static
|
||||
void LLImageGL::destroyGL(BOOL save_state)
|
||||
{
|
||||
deleteDeadTextures(); //Dump unimportant textures.
|
||||
for (S32 stage = 0; stage < gGLManager.mNumTextureUnits; stage++)
|
||||
{
|
||||
gGL.getTexUnit(stage)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
|
||||
int stored_count = 0;
|
||||
sAllowReadBackRaw = true ;
|
||||
for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
|
||||
iter != sImageList.end(); iter++)
|
||||
@@ -320,18 +310,24 @@ void LLImageGL::destroyGL(BOOL save_state)
|
||||
{
|
||||
glimage->mSaveData = NULL ;
|
||||
}
|
||||
else
|
||||
stored_count++;
|
||||
}
|
||||
|
||||
glimage->destroyGLTexture();
|
||||
stop_glerror();
|
||||
}
|
||||
}
|
||||
llinfos << "Storing " << stored_count << " images..." << llendl;
|
||||
sAllowReadBackRaw = false ;
|
||||
deleteDeadTextures();//Now, actually call glDeleteTextures for everything.
|
||||
}
|
||||
|
||||
//static
|
||||
void LLImageGL::restoreGL()
|
||||
{
|
||||
|
||||
int recovered_count = 0;
|
||||
for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
|
||||
iter != sImageList.end(); iter++)
|
||||
{
|
||||
@@ -346,10 +342,12 @@ void LLImageGL::restoreGL()
|
||||
{
|
||||
glimage->createGLTexture(glimage->mCurrentDiscardLevel, glimage->mSaveData, 0, TRUE, glimage->getCategory());
|
||||
stop_glerror();
|
||||
recovered_count++;
|
||||
}
|
||||
glimage->mSaveData = NULL; // deletes data
|
||||
}
|
||||
}
|
||||
llinfos << "Restored " << recovered_count << " images" << llendl;
|
||||
}
|
||||
|
||||
//static
|
||||
@@ -478,11 +476,7 @@ void LLImageGL::init(BOOL usemipmaps)
|
||||
mMissed = FALSE;
|
||||
#endif
|
||||
|
||||
mCategory = -1 ;
|
||||
|
||||
//LLTexture stuff
|
||||
mDontDiscard = FALSE;
|
||||
mTextureState = NO_DELETE ;
|
||||
mCategory = -1;
|
||||
}
|
||||
|
||||
void LLImageGL::cleanup()
|
||||
@@ -592,7 +586,7 @@ void LLImageGL::forceUpdateBindStats(void) const
|
||||
mLastBindTime = sLastFrameTime;
|
||||
}
|
||||
|
||||
BOOL LLImageGL::updateBindStats() const
|
||||
BOOL LLImageGL::updateBindStats(S32 tex_mem) const
|
||||
{
|
||||
if (mTexName != 0)
|
||||
{
|
||||
@@ -604,32 +598,18 @@ BOOL LLImageGL::updateBindStats() const
|
||||
{
|
||||
// we haven't accounted for this texture yet this frame
|
||||
sUniqueCount++;
|
||||
|
||||
updateBoundTexMem();
|
||||
updateBoundTexMem(tex_mem, mComponents, mCategory);
|
||||
mLastBindTime = sLastFrameTime;
|
||||
|
||||
|
||||
return TRUE ;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
//virtual
|
||||
bool LLImageGL::bindError(const S32 stage) const
|
||||
F32 LLImageGL::getTimePassedSinceLastBound()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//virtual
|
||||
bool LLImageGL::bindDefaultImage(const S32 stage)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLImageGL::forceImmediateUpdate()
|
||||
{
|
||||
return ;
|
||||
return sLastFrameTime - mLastBindTime ;
|
||||
}
|
||||
|
||||
void LLImageGL::setExplicitFormat( LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes )
|
||||
@@ -1184,7 +1164,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
|
||||
|
||||
if(gAuditTexture)
|
||||
{
|
||||
decTextureCounter() ;
|
||||
decTextureCounter(mTextureMemory, mComponents, mCategory) ;
|
||||
}
|
||||
|
||||
LLImageGL::deleteTextures(1, &old_name);
|
||||
@@ -1194,11 +1174,10 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const U8* data_in, BOOL data_
|
||||
|
||||
mTextureMemory = getMipBytes(discard_level);
|
||||
sGlobalTextureMemoryInBytes += mTextureMemory;
|
||||
setActive() ;
|
||||
|
||||
if(gAuditTexture)
|
||||
{
|
||||
incTextureCounter() ;
|
||||
incTextureCounter(mTextureMemory, mComponents, mCategory) ;
|
||||
}
|
||||
// mark this as bound at this point, so we don't throw it out immediately
|
||||
mLastBindTime = sLastFrameTime;
|
||||
@@ -1281,7 +1260,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
|
||||
llverify(gGL.getTexUnit(0)->bindManual(mBindTarget, mTexName));
|
||||
|
||||
//debug code, leave it there commented.
|
||||
//checkTexSize() ;
|
||||
checkTexSize() ;
|
||||
|
||||
LLGLint glwidth = 0;
|
||||
glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_WIDTH, (GLint*)&glwidth);
|
||||
@@ -1398,20 +1377,21 @@ void LLImageGL::destroyGLTexture()
|
||||
{
|
||||
if(gAuditTexture)
|
||||
{
|
||||
decTextureCounter() ;
|
||||
decTextureCounter(mTextureMemory, mComponents, mCategory) ;
|
||||
}
|
||||
sGlobalTextureMemoryInBytes -= mTextureMemory;
|
||||
mTextureMemory = 0;
|
||||
}
|
||||
|
||||
LLImageGL::deleteTextures(1, &mTexName);
|
||||
mTextureState = DELETED ;
|
||||
LLImageGL::deleteTextures(1, &mTexName);
|
||||
mTexName = 0;
|
||||
mCurrentDiscardLevel = -1 ; //invalidate mCurrentDiscardLevel.
|
||||
mGLTextureCreated = FALSE ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void LLImageGL::setAddressMode(LLTexUnit::eTextureAddressMode mode)
|
||||
@@ -1724,59 +1704,6 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLImageGL::isDeleted()
|
||||
{
|
||||
return mTextureState == DELETED ;
|
||||
}
|
||||
|
||||
BOOL LLImageGL::isInactive()
|
||||
{
|
||||
return mTextureState == INACTIVE ;
|
||||
}
|
||||
|
||||
BOOL LLImageGL::isDeletionCandidate()
|
||||
{
|
||||
return mTextureState == DELETION_CANDIDATE ;
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
void LLImageGL::setDeletionCandidate()
|
||||
{
|
||||
if(mTexName && (mTextureState == INACTIVE))
|
||||
{
|
||||
mTextureState = DELETION_CANDIDATE ;
|
||||
}
|
||||
}
|
||||
|
||||
void LLImageGL::forceActive()
|
||||
{
|
||||
mTextureState = ACTIVE ;
|
||||
}
|
||||
|
||||
void LLImageGL::setActive()
|
||||
{
|
||||
if(mTextureState != NO_DELETE)
|
||||
{
|
||||
mTextureState = ACTIVE ;
|
||||
}
|
||||
}
|
||||
|
||||
//set the texture inactive
|
||||
void LLImageGL::setInactive()
|
||||
{
|
||||
if(mTexName && (mTextureState == ACTIVE) && !getBoundRecently())
|
||||
{
|
||||
mTextureState = INACTIVE ;
|
||||
}
|
||||
}
|
||||
|
||||
//set the texture to stay in memory
|
||||
void LLImageGL::setNoDelete()
|
||||
{
|
||||
mTextureState = NO_DELETE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
|
||||
{
|
||||
@@ -1928,26 +1855,21 @@ S32 LLImageGL::getTextureCounterIndex(U32 val)
|
||||
return ret ;
|
||||
}
|
||||
}
|
||||
void LLImageGL::incTextureCounterStatic(U32 val, S32 ncomponents, S32 category)
|
||||
|
||||
//static
|
||||
void LLImageGL::incTextureCounter(U32 val, S32 ncomponents, S32 category)
|
||||
{
|
||||
sTextureLoadedCounter[getTextureCounterIndex(val)]++ ;
|
||||
sTextureMemByCategory[category] += (S32)val * ncomponents ;
|
||||
}
|
||||
void LLImageGL::decTextureCounterStatic(U32 val, S32 ncomponents, S32 category)
|
||||
|
||||
//static
|
||||
void LLImageGL::decTextureCounter(U32 val, S32 ncomponents, S32 category)
|
||||
{
|
||||
sTextureLoadedCounter[getTextureCounterIndex(val)]-- ;
|
||||
sTextureMemByCategory[category] += (S32)val * ncomponents ;
|
||||
}
|
||||
void LLImageGL::incTextureCounter()
|
||||
{
|
||||
sTextureLoadedCounter[getTextureCounterIndex(mTextureMemory / mComponents)]++ ;
|
||||
sTextureMemByCategory[mCategory] += mTextureMemory ;
|
||||
}
|
||||
void LLImageGL::decTextureCounter()
|
||||
{
|
||||
sTextureLoadedCounter[getTextureCounterIndex(mTextureMemory / mComponents)]-- ;
|
||||
sTextureMemByCategory[mCategory] -= mTextureMemory ;
|
||||
}
|
||||
|
||||
void LLImageGL::setCurTexSizebar(S32 index, BOOL set_pick_size)
|
||||
{
|
||||
sCurTexSizeBar = index ;
|
||||
|
||||
@@ -59,7 +59,8 @@ public:
|
||||
static S32 dataFormatBytes(S32 dataformat, S32 width, S32 height);
|
||||
static S32 dataFormatComponents(S32 dataformat);
|
||||
|
||||
BOOL updateBindStats(void) const;
|
||||
BOOL updateBindStats(S32 tex_mem) const ;
|
||||
F32 getTimePassedSinceLastBound();
|
||||
void forceUpdateBindStats(void) const;
|
||||
|
||||
// needs to be called every frame
|
||||
@@ -71,8 +72,7 @@ public:
|
||||
static void dirtyTexOptions();
|
||||
|
||||
// Sometimes called externally for textures not using LLImageGL (should go away...)
|
||||
static S32 updateBoundTexMemStatic(const S32 delta, const S32 size, S32 category) ;
|
||||
S32 updateBoundTexMem()const;
|
||||
static S32 updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 category) ;
|
||||
|
||||
static bool checkSize(S32 width, S32 height);
|
||||
|
||||
@@ -95,11 +95,9 @@ protected:
|
||||
|
||||
public:
|
||||
virtual void dump(); // debugging info to llinfos
|
||||
virtual bool bindError(const S32 stage = 0) const;
|
||||
virtual bool bindDefaultImage(const S32 stage = 0) ;
|
||||
virtual void forceImmediateUpdate() ;
|
||||
|
||||
|
||||
void setSize(S32 width, S32 height, S32 ncomponents);
|
||||
void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;}
|
||||
|
||||
// These 3 functions currently wrap glGenTextures(), glDeleteTextures(), and glTexImage2D()
|
||||
// for tracking purposes and will be deprecated in the future
|
||||
@@ -122,7 +120,6 @@ public:
|
||||
void destroyGLTexture();
|
||||
|
||||
void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
|
||||
void dontDiscard() { mDontDiscard = 1; mTextureState = NO_DELETE; }
|
||||
void setComponents(S8 ncomponents) { mComponents = ncomponents; }
|
||||
|
||||
S32 getDiscardLevel() const { return mCurrentDiscardLevel; }
|
||||
@@ -154,14 +151,12 @@ public:
|
||||
void setGLTextureCreated (bool initialized) { mGLTextureCreated = initialized; }
|
||||
|
||||
BOOL getUseMipMaps() const { return mUseMipMaps; }
|
||||
void setUseMipMaps(BOOL usemips) { mUseMipMaps = usemips; }
|
||||
BOOL getUseDiscard() const { return mUseMipMaps && !mDontDiscard; }
|
||||
BOOL getDontDiscard() const { return mDontDiscard; }
|
||||
void setUseMipMaps(BOOL usemips) { mUseMipMaps = usemips; }
|
||||
|
||||
void updatePickMask(S32 width, S32 height, const U8* data_in);
|
||||
BOOL getMask(const LLVector2 &tc);
|
||||
|
||||
void checkTexSize() const ;
|
||||
void checkTexSize(bool forced = false) const ;
|
||||
|
||||
// Sets the addressing mode used to sample the texture
|
||||
// (such as wrapping, mirrored wrapping, and clamp)
|
||||
@@ -175,17 +170,7 @@ public:
|
||||
void setFilteringOption(LLTexUnit::eTextureFilterOptions option);
|
||||
LLTexUnit::eTextureFilterOptions getFilteringOption(void) const { return mFilterOption; }
|
||||
|
||||
BOOL isDeleted() ;
|
||||
BOOL isInactive() ;
|
||||
BOOL isDeletionCandidate();
|
||||
void setDeletionCandidate() ;
|
||||
void setInactive() ;
|
||||
void setActive() ;
|
||||
void forceActive() ;
|
||||
void setNoDelete() ;
|
||||
|
||||
void setTextureSize(S32 size) {mTextureMemory = size;}
|
||||
protected:
|
||||
LLGLenum getTexTarget()const { return mTarget ;}
|
||||
void init(BOOL usemipmaps);
|
||||
virtual void cleanup(); // Clean up the LLImageGL so it can be reinitialized. Be careful when using this in derived class destructors
|
||||
|
||||
@@ -224,8 +209,7 @@ protected:
|
||||
|
||||
S8 mComponents;
|
||||
S8 mMaxDiscardLevel;
|
||||
S8 mDontDiscard; // Keep full res version of this image (for UI, etc)
|
||||
|
||||
|
||||
bool mTexOptionsDirty;
|
||||
LLTexUnit::eTextureAddressMode mAddressMode; // Defaults to TAM_WRAP
|
||||
LLTexUnit::eTextureFilterOptions mFilterOption; // Defaults to TFO_TRILINEAR
|
||||
@@ -235,17 +219,6 @@ protected:
|
||||
LLGLenum mFormatPrimary; // = GL format (pixel data format)
|
||||
LLGLenum mFormatType;
|
||||
BOOL mFormatSwapBytes;// if true, use glPixelStorei(GL_UNPACK_SWAP_BYTES, 1)
|
||||
|
||||
protected:
|
||||
typedef enum
|
||||
{
|
||||
DELETED = 0, //removed from memory
|
||||
DELETION_CANDIDATE, //ready to be removed from memory
|
||||
INACTIVE, //not be used for the last certain period (i.e., 30 seconds).
|
||||
ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds).
|
||||
NO_DELETE = 99 //stay in memory, can not be removed.
|
||||
} LLGLTexureState;
|
||||
LLGLTexureState mTextureState ;
|
||||
|
||||
// STATICS
|
||||
public:
|
||||
@@ -263,6 +236,8 @@ public:
|
||||
static U32 sBindCount; // Tracks number of texture binds for current frame
|
||||
static U32 sUniqueCount; // Tracks number of unique texture binds for current frame
|
||||
static BOOL sGlobalUseAnisotropic;
|
||||
static LLImageGL* sDefaultGLTexture ;
|
||||
|
||||
#if DEBUG_MISS
|
||||
BOOL mMissed; // Missed on last bind?
|
||||
BOOL getMissed() const { return mMissed; };
|
||||
@@ -300,13 +275,10 @@ public:
|
||||
|
||||
static void setHighlightTexture(S32 category) ;
|
||||
static S32 getTextureCounterIndex(U32 val) ;
|
||||
static void incTextureCounterStatic(U32 val, S32 ncomponents, S32 category) ;
|
||||
static void decTextureCounterStatic(U32 val, S32 ncomponents, S32 category) ;
|
||||
static void incTextureCounter(U32 val, S32 ncomponents, S32 category) ;
|
||||
static void decTextureCounter(U32 val, S32 ncomponents, S32 category) ;
|
||||
static void setCurTexSizebar(S32 index, BOOL set_pick_size = TRUE) ;
|
||||
static void resetCurTexSizebar();
|
||||
|
||||
void incTextureCounter() ;
|
||||
void decTextureCounter() ;
|
||||
//----------------------------------------
|
||||
|
||||
//for debug use: show texture category distribution
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "llcubemap.h"
|
||||
#include "llimagegl.h"
|
||||
#include "llrendertarget.h"
|
||||
#include "lltexture.h"
|
||||
|
||||
LLRender gGL;
|
||||
|
||||
@@ -179,50 +180,86 @@ void LLTexUnit::disable(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind)
|
||||
bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind)
|
||||
{
|
||||
stop_glerror();
|
||||
if (mIndex < 0) return false;
|
||||
|
||||
gGL.flush();
|
||||
|
||||
if (texture == NULL)
|
||||
LLImageGL* gl_tex = NULL ;
|
||||
if (texture == NULL || !(gl_tex = texture->getGLTexture()))
|
||||
{
|
||||
llwarns << "NULL LLTexUnit::bind texture" << llendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!texture->getTexName()) //if texture does not exist
|
||||
{
|
||||
if (texture->isDeleted())
|
||||
{
|
||||
// This will re-generate the texture immediately.
|
||||
texture->forceImmediateUpdate() ;
|
||||
}
|
||||
|
||||
texture->forceUpdateBindStats() ;
|
||||
if (!gl_tex->getTexName()) //if texture does not exist
|
||||
{
|
||||
//if deleted, will re-generate it immediately
|
||||
texture->forceImmediateUpdate() ;
|
||||
|
||||
gl_tex->forceUpdateBindStats() ;
|
||||
return texture->bindDefaultImage(mIndex);
|
||||
}
|
||||
|
||||
//in audit, replace the selected texture by the default one.
|
||||
if(gAuditTexture && for_rendering && LLImageGL::sCurTexPickSize > 0)
|
||||
{
|
||||
if(texture->getWidth() * texture->getHeight() == LLImageGL::sCurTexPickSize)
|
||||
{
|
||||
texture->updateBindStats();
|
||||
gl_tex->updateBindStats(gl_tex->mTextureMemory);
|
||||
return bind(LLImageGL::sHighlightTexturep.get());
|
||||
}
|
||||
}
|
||||
if ((mCurrTexture != gl_tex->getTexName()) || forceBind)
|
||||
{
|
||||
activate();
|
||||
enable(gl_tex->getTarget());
|
||||
mCurrTexture = gl_tex->getTexName();
|
||||
glBindTexture(sGLTextureType[gl_tex->getTarget()], mCurrTexture);
|
||||
if(gl_tex->updateBindStats(gl_tex->mTextureMemory))
|
||||
{
|
||||
texture->setActive() ;
|
||||
texture->updateBindStatsForTester() ;
|
||||
}
|
||||
mHasMipMaps = gl_tex->mHasMipMaps;
|
||||
if (gl_tex->mTexOptionsDirty)
|
||||
{
|
||||
gl_tex->mTexOptionsDirty = false;
|
||||
setTextureAddressMode(gl_tex->mAddressMode);
|
||||
setTextureFilteringOption(gl_tex->mFilterOption);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind)
|
||||
{
|
||||
stop_glerror();
|
||||
if (mIndex < 0) return false;
|
||||
|
||||
if(!texture)
|
||||
{
|
||||
llwarns << "NULL LLTexUnit::bind texture" << llendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!texture->getTexName())
|
||||
{
|
||||
if(LLImageGL::sDefaultGLTexture && LLImageGL::sDefaultGLTexture->getTexName())
|
||||
{
|
||||
return bind(LLImageGL::sDefaultGLTexture) ;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
if ((mCurrTexture != texture->getTexName()) || forceBind)
|
||||
{
|
||||
activate();
|
||||
enable(texture->getTarget());
|
||||
mCurrTexture = texture->getTexName();
|
||||
glBindTexture(sGLTextureType[texture->getTarget()], mCurrTexture);
|
||||
if(texture->updateBindStats())
|
||||
{
|
||||
texture->setActive() ;
|
||||
}
|
||||
texture->updateBindStats(texture->mTextureMemory);
|
||||
mHasMipMaps = texture->mHasMipMaps;
|
||||
if (texture->mTexOptionsDirty)
|
||||
{
|
||||
@@ -255,7 +292,7 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
|
||||
mCurrTexture = cubeMap->mImages[0]->getTexName();
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP_ARB, mCurrTexture);
|
||||
mHasMipMaps = cubeMap->mImages[0]->mHasMipMaps;
|
||||
cubeMap->mImages[0]->updateBindStats();
|
||||
cubeMap->mImages[0]->updateBindStats(cubeMap->mImages[0]->mTextureMemory);
|
||||
if (cubeMap->mImages[0]->mTexOptionsDirty)
|
||||
{
|
||||
cubeMap->mImages[0]->mTexOptionsDirty = false;
|
||||
@@ -795,15 +832,21 @@ void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB
|
||||
{
|
||||
flush();
|
||||
|
||||
mCurrColorMask[0] = writeColorR;
|
||||
mCurrColorMask[1] = writeColorG;
|
||||
mCurrColorMask[2] = writeColorB;
|
||||
if (mCurrColorMask[0] != writeColorR ||
|
||||
mCurrColorMask[1] != writeColorG ||
|
||||
mCurrColorMask[2] != writeColorB ||
|
||||
mCurrColorMask[3] != writeAlpha)
|
||||
{
|
||||
mCurrColorMask[0] = writeColorR;
|
||||
mCurrColorMask[1] = writeColorG;
|
||||
mCurrColorMask[2] = writeColorB;
|
||||
mCurrColorMask[3] = writeAlpha;
|
||||
|
||||
glColorMask(writeColorR ? GL_TRUE : GL_FALSE,
|
||||
writeColorG ? GL_TRUE : GL_FALSE,
|
||||
writeColorB ? GL_TRUE : GL_FALSE,
|
||||
writeAlpha ? GL_TRUE : GL_FALSE);
|
||||
writeColorB ? GL_TRUE : GL_FALSE,
|
||||
writeAlpha ? GL_TRUE : GL_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLRender::setSceneBlendType(eBlendType type)
|
||||
@@ -841,15 +884,19 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
|
||||
{
|
||||
flush();
|
||||
|
||||
mCurrAlphaFunc = func;
|
||||
mCurrAlphaFuncVal = value;
|
||||
if (func == CF_DEFAULT)
|
||||
if (mCurrAlphaFunc != func ||
|
||||
mCurrAlphaFuncVal != value)
|
||||
{
|
||||
glAlphaFunc(GL_GREATER, 0.01f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glAlphaFunc(sGLCompareFunc[func], value);
|
||||
mCurrAlphaFunc = func;
|
||||
mCurrAlphaFuncVal = value;
|
||||
if (func == CF_DEFAULT)
|
||||
{
|
||||
glAlphaFunc(GL_GREATER, 0.01f);
|
||||
}
|
||||
else
|
||||
{
|
||||
glAlphaFunc(sGLCompareFunc[func], value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ class LLVertexBuffer;
|
||||
class LLCubeMap;
|
||||
class LLImageGL;
|
||||
class LLRenderTarget;
|
||||
class LLTexture ;
|
||||
|
||||
class LLTexUnit
|
||||
{
|
||||
@@ -149,6 +150,7 @@ public:
|
||||
// Binds the LLImageGL to this texture unit
|
||||
// (automatically enables the unit for the LLImageGL's texture type)
|
||||
bool bind(LLImageGL* texture, bool for_rendering = false, bool forceBind = false);
|
||||
bool bind(LLTexture* texture, bool for_rendering = false, bool forceBind = false);
|
||||
|
||||
// Binds a cubemap to this texture unit
|
||||
// (automatically enables the texture unit for cubemaps)
|
||||
|
||||
38
indra/llrender/lltexture.cpp
Normal file
38
indra/llrender/lltexture.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @file lltexture.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2000&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2000-2010, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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 "linden_common.h"
|
||||
#include "lltexture.h"
|
||||
|
||||
//virtual
|
||||
LLTexture::~LLTexture()
|
||||
{
|
||||
}
|
||||
80
indra/llrender/lltexture.h
Normal file
80
indra/llrender/lltexture.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @file lltexture.h
|
||||
* @brief LLTexture definition
|
||||
*
|
||||
* This class acts as a wrapper for OpenGL calls.
|
||||
* The goal of this class is to minimize the number of api calls due to legacy rendering
|
||||
* code, to define an interface for a multiple rendering API abstraction of the UI
|
||||
* rendering, and to abstract out direct rendering calls in a way that is cleaner and easier to maintain.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2010, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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_TEXTURE_H
|
||||
#define LL_TEXTURE_H
|
||||
|
||||
#include "llmemory.h"
|
||||
class LLImageGL ;
|
||||
class LLTexUnit ;
|
||||
class LLFontGL ;
|
||||
|
||||
//
|
||||
//this is an abstract class as the parent for the class LLViewerTexture
|
||||
//through the following virtual functions, the class LLViewerTexture can be reached from /llrender.
|
||||
//
|
||||
class LLTexture : public LLRefCount
|
||||
{
|
||||
friend class LLTexUnit ;
|
||||
friend class LLFontGL ;
|
||||
|
||||
protected:
|
||||
virtual ~LLTexture();
|
||||
|
||||
public:
|
||||
LLTexture(){}
|
||||
|
||||
//
|
||||
//interfaces to access LLViewerTexture
|
||||
//
|
||||
virtual S8 getType() const = 0 ;
|
||||
virtual void setKnownDrawSize(S32 width, S32 height) = 0 ;
|
||||
virtual bool bindDefaultImage(const S32 stage = 0) = 0 ;
|
||||
virtual void forceImmediateUpdate() = 0 ;
|
||||
virtual void setActive() = 0 ;
|
||||
virtual S32 getWidth(S32 discard_level = -1) const = 0 ;
|
||||
virtual S32 getHeight(S32 discard_level = -1) const = 0 ;
|
||||
|
||||
private:
|
||||
//note: do not make this function public.
|
||||
virtual LLImageGL* getGLTexture() const = 0 ;
|
||||
|
||||
virtual void updateBindStatsForTester() = 0 ;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1299,7 +1299,31 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask) const
|
||||
|
||||
if ((data_mask & mTypeMask) != data_mask)
|
||||
{
|
||||
llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl;
|
||||
llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask. Missing: ";
|
||||
|
||||
static const char* mask_names[] = {"VERTEX","NORMAL","TEXCOORD0","TEXCOORD1","TEXCOORD2","TEXCOORD3","COLOR","BINORMAL","WEIGHT","CLOTH_WEIGHT"};
|
||||
for(int i = 0; i < 32; ++i)
|
||||
{
|
||||
if((data_mask & (1<<i)) && !(mTypeMask & (1<<i)))
|
||||
{
|
||||
if(i < (sizeof(mask_names)/sizeof(mask_names[0])))
|
||||
llcont << "MAP_" << mask_names[i] << ", ";
|
||||
else
|
||||
llcont << "MAP_UNKNOWN (1<<" << i << "), ";
|
||||
}
|
||||
}
|
||||
llcont << "\n Has: ";
|
||||
for(int i = 0; i < 32; ++i)
|
||||
{
|
||||
if(mTypeMask & (1<<i))
|
||||
{
|
||||
if(i < (sizeof(mask_names)/sizeof(mask_names[0])))
|
||||
llcont << "MASK_" << mask_names[i] << ", ";
|
||||
else
|
||||
llcont << "MAP_UNKNOWN (1<<" << i << "), ";
|
||||
}
|
||||
}
|
||||
llcont << llendl;
|
||||
}
|
||||
|
||||
if (data_mask & MAP_NORMAL)
|
||||
|
||||
@@ -105,7 +105,7 @@ LLComboBox::LLComboBox( const std::string& name, const LLRect &rect, const std::
|
||||
mList->setCommitOnKeyboardMovement(FALSE);
|
||||
addChild(mList);
|
||||
|
||||
mArrowImage = LLUI::sImageProvider->getUIImage("combobox_arrow.tga");
|
||||
mArrowImage = LLUI::getUIImage("combobox_arrow.tga");
|
||||
mButton->setImageOverlay("combobox_arrow.tga", LLFontGL::RIGHT);
|
||||
|
||||
updateLayout();
|
||||
@@ -248,6 +248,8 @@ void LLComboBox::onCommit()
|
||||
mTextEntry->setValue(getSimple());
|
||||
mTextEntry->setTentative(FALSE);
|
||||
}
|
||||
|
||||
setControlValue(getValue());
|
||||
LLUICtrl::onCommit();
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ void LLIconCtrl::setImage(const std::string& image_name)
|
||||
else
|
||||
{
|
||||
mImageName = image_name;
|
||||
mImagep = LLUI::sImageProvider->getUIImage(image_name);
|
||||
mImagep = LLUI::getUIImage(image_name);
|
||||
mImageID.setNull();
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ void LLIconCtrl::setImage(const std::string& image_name)
|
||||
void LLIconCtrl::setImage(const LLUUID& image_id)
|
||||
{
|
||||
mImageName.clear();
|
||||
mImagep = LLUI::sImageProvider->getUIImageByID(image_id);
|
||||
mImagep = LLUI::getUIImageByID(image_id);
|
||||
mImageID = image_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "llui.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llclipboard.h"
|
||||
#include "../newview/lgghunspell_wrapper.h"
|
||||
|
||||
//
|
||||
// Imported globals
|
||||
@@ -118,6 +119,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
|
||||
mLastSelectionY(-1),
|
||||
mLastSelectionStart(-1),
|
||||
mLastSelectionEnd(-1),
|
||||
mLastContextMenuX(-1),
|
||||
mPrevalidateFunc( prevalidate_func ),
|
||||
mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ),
|
||||
mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ),
|
||||
@@ -137,7 +139,8 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
|
||||
mReadOnly(FALSE),
|
||||
mHaveHistory(FALSE),
|
||||
mImage( sImage ),
|
||||
mReplaceNewlinesWithSpaces( TRUE )
|
||||
mReplaceNewlinesWithSpaces( TRUE ),
|
||||
mSpellCheckable( FALSE )
|
||||
{
|
||||
llassert( max_length_bytes > 0 );
|
||||
|
||||
@@ -187,10 +190,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
|
||||
menu->append(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
menu->appendSeparator("Transep");
|
||||
LLMenuGL* translatemenu = new LLMenuGL("Translate To");
|
||||
translatemenu->setCanTearOff(FALSE);
|
||||
|
||||
menu->appendSeparator("Spelsep");
|
||||
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
|
||||
menu->setCanTearOff(FALSE);
|
||||
menu->setVisible(FALSE);
|
||||
@@ -454,6 +454,89 @@ void LLLineEditor::context_copy(void* data)
|
||||
if(line)line->copy();
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::spell_correct(void* data)
|
||||
{
|
||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
||||
LLLineEditor* line = tempBind->origin;
|
||||
if(tempBind && line)
|
||||
{
|
||||
llinfos << ((LLMenuItemCallGL *)(tempBind->menuItem))->getName() << " : " << tempBind->origin->getName() << " : " << tempBind->word << llendl;
|
||||
if(line)line->spellReplace(tempBind);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::spell_show(void * data)
|
||||
{
|
||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
||||
LLLineEditor* line = tempBind->origin;
|
||||
|
||||
if (tempBind && line)
|
||||
{
|
||||
BOOL show = (tempBind->word == "Show Misspellings");
|
||||
glggHunSpell->setSpellCheckHighlight(show);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<S32> LLLineEditor::getMisspelledWordsPositions()
|
||||
{
|
||||
std::vector<S32> thePosesOfBadWords;
|
||||
const LLWString& text = mText.getWString();
|
||||
|
||||
//llinfos << "end of box is at " << cursorloc << " and end of text is at " << text.length() << llendl;
|
||||
S32 wordStart=0;
|
||||
S32 wordEnd=mStartSpellHere;
|
||||
while(wordEnd < mEndSpellHere)
|
||||
{
|
||||
//go through all the chars... XD
|
||||
if( LLTextEditor::isPartOfWord( text[wordEnd] ) )
|
||||
|
||||
{
|
||||
// Select word the cursor is over
|
||||
while ((wordEnd > 0) && LLTextEditor::isPartOfWord(text[wordEnd-1]))
|
||||
{
|
||||
wordEnd--;
|
||||
}
|
||||
wordStart=wordEnd;
|
||||
while ((wordEnd < (S32)text.length()) && LLTextEditor::isPartOfWord( text[wordEnd] ) )
|
||||
{
|
||||
wordEnd++;
|
||||
}
|
||||
//got a word :D
|
||||
std::string selectedWord(std::string(text.begin(),
|
||||
text.end()).substr(wordStart,wordEnd-wordStart));
|
||||
|
||||
if(!glggHunSpell->isSpelledRight(selectedWord))
|
||||
{
|
||||
//misspelled word here, and you have just right clicked on it!
|
||||
//get the center of this word..
|
||||
//S32 center = llround( (wordEnd-wordStart)/2 ) + wordStart;
|
||||
//turn this cursor position into a pixel pos
|
||||
//center = findPixelNearestPos(center-getCursor());
|
||||
|
||||
thePosesOfBadWords.push_back(
|
||||
wordStart);
|
||||
thePosesOfBadWords.push_back(wordEnd);
|
||||
}
|
||||
}
|
||||
wordEnd++;
|
||||
}
|
||||
return thePosesOfBadWords;
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::spell_add(void* data)
|
||||
{
|
||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
||||
if(tempBind)
|
||||
{
|
||||
glggHunSpell->addWordToCustomDictionary(tempBind->word);
|
||||
tempBind->origin->mPrevSpelledText="";//make it update
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::context_paste(void* data)
|
||||
{
|
||||
LLLineEditor* line = (LLLineEditor*)data;
|
||||
@@ -568,6 +651,10 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
setFocus(TRUE);
|
||||
|
||||
//setCursorAtLocalPos( x);
|
||||
S32 wordStart = 0;
|
||||
S32 wordLen = 0;
|
||||
S32 pos = calculateCursorFromMouse(x);
|
||||
|
||||
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
|
||||
if (menu)
|
||||
{
|
||||
@@ -575,7 +662,81 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
{
|
||||
menu->setVisible(FALSE);
|
||||
}
|
||||
for (int i = 0;i<(int)suggestionMenuItems.size();i++)
|
||||
{
|
||||
SpellMenuBind * tempBind = suggestionMenuItems[i];
|
||||
if(tempBind)
|
||||
{
|
||||
menu->remove((LLMenuItemCallGL *)tempBind->menuItem);
|
||||
((LLMenuItemCallGL *)tempBind->menuItem)->die();
|
||||
//delete tempBind->menuItem;
|
||||
//tempBind->menuItem = NULL;
|
||||
delete tempBind;
|
||||
}
|
||||
}
|
||||
suggestionMenuItems.clear();
|
||||
|
||||
// spell_check="true" in xui
|
||||
menu->setItemVisible("Spelsep", !mReadOnly && mSpellCheckable);
|
||||
if (!mReadOnly && mSpellCheckable)
|
||||
{
|
||||
// search for word matches
|
||||
bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
|
||||
if (is_word_part)
|
||||
{
|
||||
const LLWString& text = mText.getWString();
|
||||
std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordLen));
|
||||
|
||||
if (!glggHunSpell->isSpelledRight(selectedWord))
|
||||
{
|
||||
//misspelled word here, and you have just right clicked on it!
|
||||
std::vector<std::string> suggs = glggHunSpell->getSuggestionList(selectedWord);
|
||||
|
||||
for (int i = 0; i<(int)suggs.size() ;i++)
|
||||
{
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
tempStruct->word = suggs[i];
|
||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
||||
tempStruct->wordPositionStart=wordStart;
|
||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
||||
tempStruct->word, spell_correct, NULL, tempStruct);
|
||||
//new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
}
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
tempStruct->word = selectedWord;
|
||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
||||
tempStruct->wordPositionStart=wordStart;
|
||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
||||
"Add Word", spell_add, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
}
|
||||
}
|
||||
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
if (glggHunSpell->getSpellCheckHighlight())
|
||||
{
|
||||
tempStruct->word = "Hide Misspellings";
|
||||
}
|
||||
else
|
||||
{
|
||||
tempStruct->word = "Show Misspellings";
|
||||
}
|
||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
||||
tempStruct->word, spell_show, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
}
|
||||
|
||||
mLastContextMenuX = x;
|
||||
menu->buildDrawLabels();
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
LLMenuGL::showPopup(this, menu, x, y);
|
||||
@@ -892,6 +1053,26 @@ S32 LLLineEditor::nextWordPos(S32 cursorPos) const
|
||||
return cursorPos;
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const
|
||||
{
|
||||
const LLWString& wtext = mText.getWString();
|
||||
S32 pos = at;
|
||||
if (LLTextEditor::isPartOfWord(wtext[pos]))
|
||||
{
|
||||
while ( (pos > 0) && LLTextEditor::isPartOfWord(wtext[pos - 1]) )
|
||||
{
|
||||
pos--;
|
||||
}
|
||||
*word_begin = pos;
|
||||
while ( (pos < (S32)wtext.length()) && LLTextEditor::isPartOfWord(wtext[pos]) )
|
||||
{
|
||||
pos++;
|
||||
}
|
||||
*word_length = pos - *word_begin;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask)
|
||||
{
|
||||
@@ -1046,6 +1227,16 @@ void LLLineEditor::copy()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::spellReplace(SpellMenuBind* spellData)
|
||||
{
|
||||
mText.erase(spellData->wordPositionStart,
|
||||
spellData->wordPositionEnd - spellData->wordPositionStart);
|
||||
insert(spellData->word,spellData->wordPositionStart);
|
||||
mCursorPos+=spellData->word.length() - (spellData->wordPositionEnd-spellData->wordPositionStart);
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::insert(std::string what, S32 wher)
|
||||
{
|
||||
LLLineEditorRollback rollback(this);
|
||||
@@ -1063,6 +1254,7 @@ void LLLineEditor::insert(std::string what, S32 wher)
|
||||
else if( mKeystrokeCallback )
|
||||
mKeystrokeCallback( this, mCallbackUserData );
|
||||
}
|
||||
|
||||
BOOL LLLineEditor::canPaste() const
|
||||
{
|
||||
return !mReadOnly && gClipboard.canPasteString();
|
||||
@@ -1588,6 +1780,57 @@ void LLLineEditor::doDelete()
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::drawMisspelled(LLRect background)
|
||||
{
|
||||
if (!mReadOnly && mSpellCheckable)
|
||||
{
|
||||
S32 newStartSpellHere =mScrollHPos;
|
||||
S32 cursorloc =calculateCursorFromMouse(mMaxHPixels);
|
||||
S32 newStopSpellHere = ( ((S32)mText.length())>cursorloc)?cursorloc:(S32)mText.length();
|
||||
|
||||
F32 elapsed = mSpellTimer.getElapsedTimeF32();
|
||||
if(S32(elapsed / 1) & 1)
|
||||
{
|
||||
if(isSpellDirty()||(newStartSpellHere!=mStartSpellHere)||(newStopSpellHere!=mEndSpellHere))
|
||||
{
|
||||
mStartSpellHere=newStartSpellHere;
|
||||
mEndSpellHere= newStopSpellHere;
|
||||
resetSpellDirty();
|
||||
misspellLocations=getMisspelledWordsPositions();
|
||||
}
|
||||
}
|
||||
|
||||
if (glggHunSpell->getSpellCheckHighlight())
|
||||
{
|
||||
for (int i =0; i<(int)misspellLocations.size(); i++)
|
||||
{
|
||||
S32 wstart =findPixelNearestPos( misspellLocations[i]-getCursor());
|
||||
S32 wend = findPixelNearestPos(misspellLocations[++i]-getCursor());
|
||||
S32 maxw = getRect().getWidth();
|
||||
|
||||
if (wend > maxw)
|
||||
{
|
||||
wend = maxw;
|
||||
}
|
||||
if (wstart > maxw)
|
||||
{
|
||||
wstart = maxw;
|
||||
}
|
||||
gGL.color4ub(255,0,0,200);
|
||||
//3 line zig zags..
|
||||
while (wstart < wend)
|
||||
{
|
||||
gl_line_2d(wstart, background.mBottom-1, wstart+3, background.mBottom+2);
|
||||
gl_line_2d(wstart+3, background.mBottom+2, wstart+6, background.mBottom-1);
|
||||
wstart+=6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void LLLineEditor::draw()
|
||||
{
|
||||
S32 text_len = mText.length();
|
||||
@@ -1776,6 +2019,9 @@ void LLLineEditor::draw()
|
||||
mBorder->setVisible(FALSE); // no more programmatic art.
|
||||
#endif
|
||||
|
||||
drawMisspelled(background);
|
||||
resetSpellDirty();
|
||||
|
||||
// If we're editing...
|
||||
if( gFocusMgr.getKeyboardFocus() == this)
|
||||
{
|
||||
@@ -2455,6 +2701,11 @@ LLView* LLLineEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
|
||||
{
|
||||
line_editor->setCommitOnFocusLost(commit_on_focus_lost);
|
||||
}
|
||||
BOOL spell_checking = FALSE;
|
||||
if (node->getAttributeBOOL("spell_check", spell_checking))
|
||||
{
|
||||
line_editor->setSpellCheckable(spell_checking);
|
||||
}
|
||||
|
||||
line_editor->setColorParameters(node);
|
||||
|
||||
|
||||
@@ -96,6 +96,16 @@ public:
|
||||
/*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char);
|
||||
/*virtual*/ void onMouseCaptureLost();
|
||||
|
||||
struct SpellMenuBind
|
||||
{
|
||||
LLLineEditor* origin;
|
||||
void * menuItem;
|
||||
std::string word;
|
||||
S32 wordPositionStart;
|
||||
S32 wordPositionEnd;
|
||||
};
|
||||
|
||||
virtual void spellReplace(SpellMenuBind* spellData);
|
||||
virtual void insert(std::string what,S32 wher);
|
||||
|
||||
// LLEditMenuHandler overrides
|
||||
@@ -127,8 +137,14 @@ public:
|
||||
static void context_paste(void* data);
|
||||
static void context_delete(void* data);
|
||||
static void context_selectall(void* data);
|
||||
static void spell_correct(void* data);
|
||||
static void spell_show(void* data);
|
||||
static void spell_add(void* data);
|
||||
|
||||
std::vector<S32> getMisspelledWordsPositions();
|
||||
// view overrides
|
||||
virtual void draw();
|
||||
void drawMisspelled(LLRect background);
|
||||
virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE);
|
||||
virtual void onFocusReceived();
|
||||
virtual void onFocusLost();
|
||||
@@ -143,6 +159,8 @@ public:
|
||||
virtual void onCommit();
|
||||
virtual BOOL isDirty() const { return mText.getString() != mPrevText; } // Returns TRUE if user changed value at all
|
||||
virtual void resetDirty() { mPrevText = mText.getString(); } // Clear dirty state
|
||||
virtual BOOL isSpellDirty() const { return mText.getString() != mPrevSpelledText; } // Returns TRUE if user changed value at all
|
||||
virtual void resetSpellDirty() { mPrevSpelledText = mText.getString(); } // Clear dirty state
|
||||
|
||||
// assumes UTF8 text
|
||||
virtual void setValue(const LLSD& value ) { setText(value.asString()); }
|
||||
@@ -178,6 +196,7 @@ public:
|
||||
void setWriteableBgColor( const LLColor4& c ) { mWriteableBgColor = c; }
|
||||
void setReadOnlyBgColor( const LLColor4& c ) { mReadOnlyBgColor = c; }
|
||||
void setFocusBgColor(const LLColor4& c) { mFocusBgColor = c; }
|
||||
void setSpellCheckable(BOOL b) { mSpellCheckable = b; }
|
||||
|
||||
const LLColor4& getFgColor() const { return mFgColor; }
|
||||
const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor; }
|
||||
@@ -194,6 +213,7 @@ public:
|
||||
// get the cursor position of the beginning/end of the prev/next word in the text
|
||||
S32 prevWordPos(S32 cursorPos) const;
|
||||
S32 nextWordPos(S32 cursorPos) const;
|
||||
BOOL getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const;
|
||||
|
||||
BOOL hasSelection() const { return (mSelectionStart != mSelectionEnd); }
|
||||
void startSelection();
|
||||
@@ -268,6 +288,14 @@ protected:
|
||||
LLUIString mText; // The string being edited.
|
||||
std::string mPrevText; // Saved string for 'ESC' revert
|
||||
LLUIString mLabel; // text label that is visible when no user text provided
|
||||
std::string mPrevSpelledText; // saved string so we know whether to respell or not
|
||||
std::vector<S32> misspellLocations; // where all the misspelled words are
|
||||
S32 mStartSpellHere; // the position of the first char on the screen, stored so we know when to update
|
||||
S32 mEndSpellHere; // the location of the last char on the screen
|
||||
BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field
|
||||
LLFrameTimer mSpellTimer;
|
||||
std::vector<SpellMenuBind* > suggestionMenuItems;
|
||||
S32 mLastContextMenuX;
|
||||
|
||||
// line history support:
|
||||
BOOL mHaveHistory; // flag for enabled line history
|
||||
|
||||
@@ -2525,6 +2525,11 @@ BOOL LLMenuGL::handleJumpKey(KEY key)
|
||||
// Add the menu item to this menu.
|
||||
BOOL LLMenuGL::append( LLMenuItemGL* item )
|
||||
{
|
||||
if (mSpilloverMenu)
|
||||
{
|
||||
return mSpilloverMenu->append(item);
|
||||
}
|
||||
|
||||
mItems.push_back( item );
|
||||
addChild( item );
|
||||
arrange();
|
||||
@@ -2572,6 +2577,31 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu )
|
||||
return success;
|
||||
}
|
||||
|
||||
// Remove a menu item from this menu.
|
||||
BOOL LLMenuGL::remove( LLMenuItemGL* item )
|
||||
{
|
||||
if (mSpilloverMenu)
|
||||
{
|
||||
cleanupSpilloverBranch();
|
||||
}
|
||||
|
||||
item_list_t::iterator found_iter = std::find(mItems.begin(), mItems.end(), item);
|
||||
if (found_iter != mItems.end())
|
||||
{
|
||||
mItems.erase(found_iter);
|
||||
}
|
||||
|
||||
removeChild( item );
|
||||
|
||||
// We keep it around in case someone is pointing at it.
|
||||
// The caller can delete it if it's safe.
|
||||
// Note that getMenu() will still not work since its parent isn't a menu.
|
||||
sMenuContainer->addChild( item );
|
||||
|
||||
arrange();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLMenuGL::setEnabledSubMenus(BOOL enable)
|
||||
{
|
||||
setEnabled(enable);
|
||||
@@ -2829,6 +2859,11 @@ void LLMenuGL::updateParent(LLView* parentp)
|
||||
{
|
||||
(*item_iter)->updateBranchParent(parentp);
|
||||
}
|
||||
|
||||
if (mSpilloverMenu)
|
||||
{
|
||||
mSpilloverMenu->updateParent(parentp);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLMenuGL::handleAcceleratorKey(KEY key, MASK mask)
|
||||
|
||||
@@ -442,6 +442,9 @@ public:
|
||||
// Add the menu item to this menu.
|
||||
virtual BOOL append( LLMenuItemGL* item );
|
||||
|
||||
// Remove a menu item from this menu.
|
||||
virtual BOOL remove( LLMenuItemGL* item );
|
||||
|
||||
// *NOTE:Mani - appendNoArrange() should be removed when merging to skinning/viewer2.0
|
||||
// Its added as a fix to a viewer 1.23 bug that has already been address by skinning work.
|
||||
virtual BOOL appendNoArrange( LLMenuItemGL* item );
|
||||
|
||||
@@ -439,7 +439,7 @@ void LLMultiSlider::draw()
|
||||
F32 opacity = getEnabled() ? 1.f : 0.3f;
|
||||
|
||||
// Track
|
||||
LLUIImagePtr thumb_imagep = LLUI::sImageProvider->getUIImage("rounded_square.tga");
|
||||
LLUIImagePtr thumb_imagep = LLUI::getUIImage("rounded_square.tga");
|
||||
|
||||
S32 height_offset = (getRect().getHeight() - MULTI_TRACK_HEIGHT) / 2;
|
||||
LLRect track_rect(0, getRect().getHeight() - height_offset, getRect().getWidth(), height_offset );
|
||||
|
||||
@@ -98,12 +98,12 @@ void LLProgressBar::setPercent(const F32 percent)
|
||||
|
||||
void LLProgressBar::setImageBar( const std::string &bar_name )
|
||||
{
|
||||
mImageBar = LLUI::sImageProvider->getUIImage(bar_name)->getImage();
|
||||
mImageBar = LLUI::getUIImage(bar_name)->getImage();
|
||||
}
|
||||
|
||||
void LLProgressBar::setImageShadow(const std::string &shadow_name)
|
||||
{
|
||||
mImageShadow = LLUI::sImageProvider->getUIImage(shadow_name)->getImage();
|
||||
mImageShadow = LLUI::getUIImage(shadow_name)->getImage();
|
||||
}
|
||||
|
||||
void LLProgressBar::setColorBar(const LLColor4 &c)
|
||||
|
||||
@@ -61,13 +61,13 @@ public:
|
||||
protected:
|
||||
F32 mPercentDone;
|
||||
|
||||
LLPointer<LLImageGL> mImageBar;
|
||||
LLPointer<LLTexture> mImageBar;
|
||||
//LLUUID mImageBarID;
|
||||
//LLString mImageBarName;
|
||||
LLColor4 mColorBar;
|
||||
LLColor4 mColorBar2;
|
||||
|
||||
LLPointer<LLImageGL> mImageShadow;
|
||||
LLPointer<LLTexture> mImageShadow;
|
||||
//LLUUID mImageShadowID;
|
||||
//LLString mImageShadowName;
|
||||
LLColor4 mColorShadow;
|
||||
|
||||
@@ -60,7 +60,7 @@ LLResizeHandle::LLResizeHandle( const std::string& name, const LLRect& rect, S32
|
||||
|
||||
if( RIGHT_BOTTOM == mCorner)
|
||||
{
|
||||
mImage = LLUI::sImageProvider->getUIImage("UIImgResizeBottomRightUUID");
|
||||
mImage = LLUI::getUIImage("UIImgResizeBottomRightUUID");
|
||||
}
|
||||
|
||||
switch( mCorner )
|
||||
|
||||
@@ -509,7 +509,7 @@ void LLScrollbar::draw()
|
||||
|
||||
|
||||
// Draw background and thumb.
|
||||
LLUIImage* rounded_rect_imagep = LLUI::sImageProvider->getUIImage("rounded_square.tga");
|
||||
LLUIImage* rounded_rect_imagep = LLUI::getUIImage("rounded_square.tga");
|
||||
|
||||
if (!rounded_rect_imagep)
|
||||
{
|
||||
|
||||
@@ -132,7 +132,7 @@ void LLScrollListIcon::setValue(const LLSD& value)
|
||||
{
|
||||
// don't use default image specified by LLUUID::null, use no image in that case
|
||||
LLUUID image_id = value.asUUID();
|
||||
mIcon = image_id.notNull() ? LLUI::sImageProvider->getUIImageByID(image_id) : LLUIImagePtr(NULL);
|
||||
mIcon = image_id.notNull() ? LLUI::getUIImageByID(image_id) : LLUIImagePtr(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -325,7 +325,7 @@ LLScrollListText::LLScrollListText( const std::string& text, const LLFontGL* fon
|
||||
// initialize rounded rect image
|
||||
if (!mRoundedRectImage)
|
||||
{
|
||||
mRoundedRectImage = LLUI::sImageProvider->getUIImage("rounded_square.tga");
|
||||
mRoundedRectImage = LLUI::getUIImage("rounded_square.tga");
|
||||
}
|
||||
}
|
||||
//virtual
|
||||
|
||||
@@ -73,9 +73,9 @@ LLSlider::LLSlider(
|
||||
mMouseDownCallback( NULL ),
|
||||
mMouseUpCallback( NULL )
|
||||
{
|
||||
mThumbImage = LLUI::sImageProvider->getUIImage("icn_slide-thumb_dark.tga");
|
||||
mTrackImage = LLUI::sImageProvider->getUIImage("icn_slide-groove_dark.tga");
|
||||
mTrackHighlightImage = LLUI::sImageProvider->getUIImage("icn_slide-highlight.tga");
|
||||
mThumbImage = LLUI::getUIImage("icn_slide-thumb_dark.tga");
|
||||
mTrackImage = LLUI::getUIImage("icn_slide-groove_dark.tga");
|
||||
mTrackHighlightImage = LLUI::getUIImage("icn_slide-highlight.tga");
|
||||
|
||||
// properly handle setting the starting thumb rect
|
||||
// do it this way to handle both the operating-on-settings
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "lluictrl.h"
|
||||
#include "v4color.h"
|
||||
|
||||
class LLImageGL;
|
||||
|
||||
class LLSlider : public LLUICtrl
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "llstring.h"
|
||||
#include "llui.h"
|
||||
|
||||
//#include "llviewerimagelist.h"
|
||||
//#include "llviewertexturelist.h"
|
||||
|
||||
LLStyle::LLStyle()
|
||||
{
|
||||
@@ -166,7 +166,7 @@ LLUIImagePtr LLStyle::getImage() const
|
||||
|
||||
void LLStyle::setImage(const LLUUID& src)
|
||||
{
|
||||
mImagep = LLUI::sImageProvider->getUIImageByID(src);
|
||||
mImagep = LLUI::getUIImageByID(src);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
#include "lltextparser.h"
|
||||
#include <queue>
|
||||
#include "llmenugl.h"
|
||||
#include "../newview/lgghunspell_wrapper.h"
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
static LLRegisterWidget<LLTextEditor> r("simple_text_editor");
|
||||
|
||||
BOOL gDebugTextEditorTips = FALSE;
|
||||
|
||||
//
|
||||
@@ -289,8 +289,11 @@ LLTextEditor::LLTextEditor(
|
||||
mMouseDownY(0),
|
||||
mLastSelectionX(-1),
|
||||
mLastSelectionY(-1),
|
||||
mLastContextMenuX(-1),
|
||||
mLastContextMenuY(-1),
|
||||
mReflowNeeded(FALSE),
|
||||
mScrollNeeded(FALSE)
|
||||
mScrollNeeded(FALSE),
|
||||
mSpellCheckable(FALSE)
|
||||
{
|
||||
mSourceID.generate();
|
||||
|
||||
@@ -354,6 +357,7 @@ LLTextEditor::LLTextEditor(
|
||||
menu->append(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
|
||||
menu->append(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
|
||||
menu->appendSeparator("Spelsep");
|
||||
menu->setCanTearOff(FALSE);
|
||||
menu->setVisible(FALSE);
|
||||
mPopupMenuHandle = menu->getHandle();
|
||||
@@ -387,6 +391,85 @@ void LLTextEditor::context_copy(void* data)
|
||||
LLTextEditor* line = (LLTextEditor*)data;
|
||||
if(line)line->copy();
|
||||
}
|
||||
|
||||
|
||||
void LLTextEditor::spell_correct(void* data)
|
||||
{
|
||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
||||
LLTextEditor* line = tempBind->origin;
|
||||
if(tempBind && line)
|
||||
{
|
||||
llinfos << tempBind->menuItem->getName() << " : " << tempBind->origin->getName() << " : " << tempBind->word << llendl;
|
||||
if(line)line->spellReplace(tempBind);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLTextEditor::spell_show(void * data)
|
||||
{
|
||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
||||
LLTextEditor* line = tempBind->origin;
|
||||
|
||||
if(tempBind && line)
|
||||
{
|
||||
BOOL show = (tempBind->word == "Show Misspellings");
|
||||
glggHunSpell->setSpellCheckHighlight(show);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::vector<S32> LLTextEditor::getMisspelledWordsPositions()
|
||||
{
|
||||
resetSpellDirty();
|
||||
std::vector<S32> thePosesOfBadWords;
|
||||
LLWString& text = mWText;
|
||||
S32 wordStart=0;
|
||||
S32 wordEnd=spellStart;//start at the scroll start
|
||||
while(wordEnd < spellEnd)
|
||||
{
|
||||
//go through all the chars... XD
|
||||
if( LLTextEditor::isPartOfWord( text[wordEnd] ) )
|
||||
{
|
||||
// Select word the cursor is over
|
||||
while ((wordEnd > 0) && LLTextEditor::isPartOfWord(text[wordEnd-1]))
|
||||
{
|
||||
wordEnd--;
|
||||
}
|
||||
wordStart=wordEnd;
|
||||
while ((wordEnd < (S32)text.length()) && LLTextEditor::isPartOfWord( text[wordEnd] ) )
|
||||
{
|
||||
wordEnd++;
|
||||
}
|
||||
//got a word :D
|
||||
|
||||
std::string regText(text.begin(),text.end());
|
||||
std::string selectedWord(regText.substr(wordStart,wordEnd-wordStart));
|
||||
|
||||
if(!glggHunSpell->isSpelledRight(selectedWord))
|
||||
{
|
||||
//misspelled word here, and you have just right clicked on it
|
||||
|
||||
thePosesOfBadWords.push_back(wordStart);
|
||||
thePosesOfBadWords.push_back(wordEnd);
|
||||
}
|
||||
}
|
||||
wordEnd++;
|
||||
}
|
||||
return thePosesOfBadWords;
|
||||
}
|
||||
|
||||
|
||||
void LLTextEditor::spell_add(void* data)
|
||||
{
|
||||
SpellMenuBind* tempBind = (SpellMenuBind*)data;
|
||||
if(tempBind)
|
||||
{
|
||||
glggHunSpell->addWordToCustomDictionary(tempBind->word);
|
||||
tempBind->origin->mPrevSpelledText.erase();//make it update
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLTextEditor::context_paste(void* data)
|
||||
{
|
||||
LLTextEditor* line = (LLTextEditor*)data;
|
||||
@@ -779,6 +862,26 @@ S32 LLTextEditor::nextWordPos(S32 cursorPos) const
|
||||
return cursorPos;
|
||||
}
|
||||
|
||||
BOOL LLTextEditor::getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const
|
||||
{
|
||||
S32 pos = at;
|
||||
if (isPartOfWord(mWText[pos]))
|
||||
{
|
||||
while ( (pos > 0) && isPartOfWord(mWText[pos - 1]) )
|
||||
{
|
||||
pos--;
|
||||
}
|
||||
*word_begin = pos;
|
||||
while ( (pos < getLength()) && isPartOfWord(mWText[pos]) )
|
||||
{
|
||||
pos++;
|
||||
}
|
||||
*word_length = pos - *word_begin;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
S32 LLTextEditor::getLineStart( S32 line ) const
|
||||
{
|
||||
S32 num_lines = getLineCount();
|
||||
@@ -1268,11 +1371,91 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
{
|
||||
setFocus(TRUE);
|
||||
llinfos << "Right mouse click - Opening menu." << llendl;
|
||||
|
||||
//setCursorAtLocalPos( x, y, TRUE );
|
||||
S32 wordStart = 0;
|
||||
S32 wordLen = 0;
|
||||
S32 pos = getCursorPosFromLocalCoord(x,y,TRUE);
|
||||
|
||||
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
|
||||
if (menu)
|
||||
{
|
||||
for(int i = 0;i<(int)suggestionMenuItems.size();i++)
|
||||
{
|
||||
SpellMenuBind * tempBind = suggestionMenuItems[i];
|
||||
if(tempBind)
|
||||
{
|
||||
menu->remove(tempBind->menuItem);
|
||||
tempBind->menuItem->die();
|
||||
//delete tempBind->menuItem;
|
||||
//tempBind->menuItem = NULL;
|
||||
delete tempBind;
|
||||
}
|
||||
}
|
||||
suggestionMenuItems.clear();
|
||||
|
||||
// spell_check="true" in xui
|
||||
menu->setItemVisible("Spelsep", !mReadOnly && mSpellCheckable);
|
||||
if (!mReadOnly && mSpellCheckable)
|
||||
{
|
||||
bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
|
||||
if (is_word_part)
|
||||
{
|
||||
const LLWString &text = mWText;
|
||||
std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordLen));
|
||||
|
||||
if (!glggHunSpell->isSpelledRight(selectedWord))
|
||||
{
|
||||
//misspelled word here, and you have just right clicked on it!
|
||||
std::vector<std::string> suggs = glggHunSpell->getSuggestionList(selectedWord);
|
||||
|
||||
for (int i = 0; i<(int)suggs.size(); i++)
|
||||
{
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
tempStruct->word = suggs[i];
|
||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
||||
tempStruct->wordPositionStart=wordStart;
|
||||
tempStruct->wordY=y;
|
||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
||||
tempStruct->word, spell_correct, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
}
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
tempStruct->word = selectedWord;
|
||||
tempStruct->wordPositionEnd = wordStart + wordLen;
|
||||
tempStruct->wordPositionStart=wordStart;
|
||||
tempStruct->wordY=y;
|
||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
||||
"Add Word", spell_add, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
}
|
||||
}
|
||||
|
||||
SpellMenuBind * tempStruct = new SpellMenuBind;
|
||||
tempStruct->origin = this;
|
||||
if (glggHunSpell->getSpellCheckHighlight())
|
||||
{
|
||||
tempStruct->word = "Hide Misspellings";
|
||||
}
|
||||
else
|
||||
{
|
||||
tempStruct->word = "Show Misspellings";
|
||||
}
|
||||
|
||||
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
|
||||
tempStruct->word, spell_show, NULL, tempStruct);
|
||||
tempStruct->menuItem = suggMenuItem;
|
||||
suggestionMenuItems.push_back(tempStruct);
|
||||
menu->append(suggMenuItem);
|
||||
}
|
||||
mLastContextMenuX = x;
|
||||
mLastContextMenuY = y;
|
||||
menu->buildDrawLabels();
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
LLMenuGL::showPopup(this, menu, x, y);
|
||||
@@ -1971,6 +2154,17 @@ BOOL LLTextEditor::canPaste() const
|
||||
}
|
||||
|
||||
|
||||
void LLTextEditor::spellReplace(SpellMenuBind* spellData)
|
||||
{
|
||||
remove( spellData->wordPositionStart,
|
||||
spellData->wordPositionEnd - spellData->wordPositionStart, TRUE );
|
||||
LLWString clean_string = utf8str_to_wstring(spellData->word);
|
||||
insert(spellData->wordPositionStart, clean_string, FALSE);
|
||||
mCursorPos+=clean_string.length() - (spellData->wordPositionEnd-spellData->wordPositionStart);
|
||||
needsReflow();
|
||||
}
|
||||
|
||||
|
||||
// paste from clipboard
|
||||
void LLTextEditor::paste()
|
||||
{
|
||||
@@ -2823,6 +3017,106 @@ void LLTextEditor::drawSelectionBackground()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLTextEditor::drawMisspelled()
|
||||
{
|
||||
if (!mReadOnly && mSpellCheckable)
|
||||
{
|
||||
if(
|
||||
( ((getLength()<400)||(false)) &&( (S32(mSpellTimer.getElapsedTimeF32() / 1) & 1) ))
|
||||
||
|
||||
(S32(mKeystrokeTimer.getElapsedTimeF32() / 1) & 1)
|
||||
)
|
||||
{
|
||||
S32 newSpellStart = getLineStart(mScrollbar->getDocPos());//start at the scroll start
|
||||
S32 newSpellEnd = getLineStart(mScrollbar->getDocPos() + 1 + mScrollbar->getDocSize()-mScrollbar->getDocPosMax());//end at the end o.o
|
||||
|
||||
if (mScrollbar->getDocPos() == mScrollbar->getDocPosMax())
|
||||
{
|
||||
newSpellEnd = (S32)mWText.length();
|
||||
}
|
||||
if (isSpellDirty() || (newSpellEnd!=spellEnd || newSpellStart!=spellStart))
|
||||
{
|
||||
spellEnd = newSpellEnd;
|
||||
spellStart = newSpellStart;
|
||||
misspellLocations = getMisspelledWordsPositions();
|
||||
}
|
||||
}
|
||||
//draw
|
||||
if (glggHunSpell->getSpellCheckHighlight())
|
||||
{
|
||||
for (int i = 0; i<(int)misspellLocations.size() ;i++)
|
||||
{
|
||||
S32 wstart = misspellLocations[i];
|
||||
S32 wend = misspellLocations[++i];
|
||||
//start curor code mod
|
||||
const LLWString &text = mWText;
|
||||
const S32 text_len = getLength();
|
||||
// Skip through the lines we aren't drawing.
|
||||
S32 search_pos = mScrollbar->getDocPos();
|
||||
S32 num_lines = getLineCount();
|
||||
if (search_pos >= num_lines)
|
||||
{
|
||||
return;
|
||||
}
|
||||
S32 line_start = getLineStart(search_pos);
|
||||
F32 line_height = mGLFont->getLineHeight();
|
||||
F32 text_y = (F32)(mTextRect.mTop) - line_height;
|
||||
|
||||
F32 word_left = 0.f;
|
||||
F32 word_right = 0.f;
|
||||
F32 word_bottom = 0.f;
|
||||
BOOL word_visible = FALSE;
|
||||
|
||||
S32 line_end = 0;
|
||||
// Determine if the cursor is visible and if so what its coordinates are.
|
||||
while( (mTextRect.mBottom <= llround(text_y)) && (search_pos < num_lines))
|
||||
{
|
||||
line_end = text_len + 1;
|
||||
S32 next_line = -1;
|
||||
|
||||
if ((search_pos + 1) < num_lines)
|
||||
{
|
||||
next_line = getLineStart(search_pos + 1);
|
||||
line_end = next_line - 1;
|
||||
}
|
||||
const llwchar* line = text.c_str() + line_start;
|
||||
// Find the cursor and selection bounds
|
||||
if( line_start <= wstart && wend <= line_end )
|
||||
{
|
||||
word_visible = TRUE;
|
||||
word_left = (F32)mTextRect.mLeft + mGLFont->getWidthF32(line, 0, wstart - line_start, mAllowEmbeddedItems )-1.f;
|
||||
word_right = (F32)mTextRect.mLeft + mGLFont->getWidthF32(line, 0, wend - line_start, mAllowEmbeddedItems )+1.f;
|
||||
word_bottom = text_y;
|
||||
break;
|
||||
}
|
||||
// move down one line
|
||||
text_y -= line_height;
|
||||
line_start = next_line;
|
||||
search_pos++;
|
||||
}
|
||||
if (mShowLineNumbers)
|
||||
{
|
||||
word_left += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
|
||||
word_right += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
|
||||
}
|
||||
// Draw the cursor
|
||||
if (word_visible)
|
||||
{
|
||||
//end cursor code mod
|
||||
gGL.color4ub(255,0,0,200);
|
||||
while (word_left<word_right)
|
||||
{
|
||||
gl_line_2d(word_left,word_bottom-2, word_left+3,word_bottom+1);
|
||||
gl_line_2d(word_left+3,word_bottom+1, word_left+6,word_bottom-2);
|
||||
word_left += 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLTextEditor::drawCursor()
|
||||
{
|
||||
if( gFocusMgr.getKeyboardFocus() == this
|
||||
@@ -3305,7 +3599,8 @@ void LLTextEditor::draw()
|
||||
drawPreeditMarker();
|
||||
drawText();
|
||||
drawCursor();
|
||||
|
||||
drawMisspelled();
|
||||
resetSpellDirty();
|
||||
unbindEmbeddedChars(mGLFont);
|
||||
|
||||
//RN: the decision was made to always show the orange border for keyboard focus but do not put an insertion caret
|
||||
@@ -4474,6 +4769,8 @@ void LLTextEditor::setTextEditorParameters(LLXMLNodePtr node)
|
||||
|
||||
node->getAttributeBOOL("track_bottom", mTrackBottom);
|
||||
|
||||
node->getAttributeBOOL("spell_check", mSpellCheckable);
|
||||
|
||||
LLColor4 color;
|
||||
if (LLUICtrlFactory::getAttributeColor(node,"cursor_color", color))
|
||||
{
|
||||
|
||||
@@ -110,7 +110,19 @@ public:
|
||||
virtual void setFocus( BOOL b );
|
||||
virtual BOOL acceptsTextInput() const;
|
||||
virtual BOOL isDirty() const { return( mLastCmd != NULL || (mPristineCmd && (mPristineCmd != mLastCmd)) ); }
|
||||
BOOL isSpellDirty() const { return mWText != mPrevSpelledText; } // Returns TRUE if user changed value at all
|
||||
void resetSpellDirty() { mPrevSpelledText = mWText; } // Clear dirty state
|
||||
|
||||
struct SpellMenuBind
|
||||
{
|
||||
LLTextEditor* origin;
|
||||
LLMenuItemCallGL * menuItem;
|
||||
std::string word;
|
||||
S32 wordPositionStart;
|
||||
S32 wordPositionEnd;
|
||||
S32 wordY;
|
||||
};
|
||||
|
||||
// LLEditMenuHandler interface
|
||||
virtual void undo();
|
||||
virtual BOOL canUndo() const;
|
||||
@@ -123,6 +135,8 @@ public:
|
||||
virtual void paste();
|
||||
virtual BOOL canPaste() const;
|
||||
|
||||
virtual void spellReplace(SpellMenuBind* spellData);
|
||||
|
||||
virtual void updatePrimary();
|
||||
virtual void copyPrimary();
|
||||
virtual void pastePrimary();
|
||||
@@ -140,6 +154,10 @@ public:
|
||||
static void context_paste(void* data);
|
||||
static void context_delete(void* data);
|
||||
static void context_selectall(void* data);
|
||||
static void spell_correct(void* data);
|
||||
static void spell_add(void* data);
|
||||
static void spell_show(void* data);
|
||||
std::vector<S32> getMisspelledWordsPositions();
|
||||
|
||||
void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE);
|
||||
BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE);
|
||||
@@ -206,6 +224,7 @@ public:
|
||||
void setHighlightColor( const LLColor4& color );
|
||||
void setShadowColor( const LLColor4& color );
|
||||
LLColor4 getReadOnlyFgColor() { return mReadOnlyFgColor; }
|
||||
void setSpellCheckable(BOOL b) { mSpellCheckable = b; }
|
||||
|
||||
// Hacky methods to make it into a word-wrapping, potentially scrolling,
|
||||
// read-only text box.
|
||||
@@ -272,7 +291,7 @@ public:
|
||||
const LLTextSegment* getPreviousSegment() const;
|
||||
void getSelectedSegments(std::vector<const LLTextSegment*>& segments) const;
|
||||
|
||||
static bool isPartOfWord(llwchar c) { return (c == '_') || LLStringOps::isAlnum((char)c); }
|
||||
static bool isPartOfWord(llwchar c) { return ( (c == '_') || (c == '\'') || LLStringOps::isAlnum((char)c)); }
|
||||
|
||||
BOOL isReadOnly() { return mReadOnly; }
|
||||
protected:
|
||||
@@ -329,6 +348,7 @@ protected:
|
||||
|
||||
S32 prevWordPos(S32 cursorPos) const;
|
||||
S32 nextWordPos(S32 cursorPos) const;
|
||||
BOOL getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const;
|
||||
|
||||
S32 getLineCount() const { return mLineStartList.size(); }
|
||||
S32 getLineStart( S32 line ) const;
|
||||
@@ -467,6 +487,7 @@ private:
|
||||
void drawBackground();
|
||||
void drawSelectionBackground();
|
||||
void drawCursor();
|
||||
void drawMisspelled();
|
||||
void drawText();
|
||||
void drawClippedSegment(const LLWString &wtext, S32 seg_start, S32 seg_end, F32 x, F32 y, S32 selection_left, S32 selection_right, const LLStyleSP& color, F32* right_x);
|
||||
|
||||
@@ -497,6 +518,12 @@ private:
|
||||
mutable std::string mUTF8Text;
|
||||
mutable BOOL mTextIsUpToDate;
|
||||
|
||||
LLWString mPrevSpelledText; // saved string so we know whether to respell or not
|
||||
S32 spellStart;
|
||||
S32 spellEnd;
|
||||
std::vector<S32> misspellLocations; // where all the mispelled words are
|
||||
BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field
|
||||
|
||||
S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes
|
||||
|
||||
const LLFontGL* mGLFont;
|
||||
@@ -533,11 +560,18 @@ private:
|
||||
}
|
||||
};
|
||||
typedef std::vector<line_info> line_list_t;
|
||||
|
||||
//to keep track of what we have to remove before showing menu
|
||||
std::vector<SpellMenuBind* > suggestionMenuItems;
|
||||
S32 mLastContextMenuX;
|
||||
S32 mLastContextMenuY;
|
||||
|
||||
line_list_t mLineStartList;
|
||||
BOOL mReflowNeeded;
|
||||
BOOL mScrollNeeded;
|
||||
|
||||
LLFrameTimer mKeystrokeTimer;
|
||||
LLFrameTimer mSpellTimer;
|
||||
|
||||
LLColor4 mCursorColor;
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#include "v4color.h"
|
||||
#include "llrender.h"
|
||||
#include "llrect.h"
|
||||
#include "llimagegl.h"
|
||||
#include "lldir.h"
|
||||
#include "llfontgl.h"
|
||||
|
||||
@@ -407,7 +406,7 @@ void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max
|
||||
}
|
||||
|
||||
|
||||
void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect )
|
||||
void gl_draw_image( S32 x, S32 y, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect )
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -417,7 +416,7 @@ void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color, const
|
||||
gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), 0.f, image, color, uv_rect );
|
||||
}
|
||||
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -427,7 +426,7 @@ void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image,
|
||||
gl_draw_scaled_rotated_image( x, y, width, height, 0.f, image, color, uv_rect );
|
||||
}
|
||||
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLImageGL* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -443,7 +442,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border
|
||||
gl_draw_scaled_image_with_border(x, y, width, height, image, color, solid_color, uv_rect, scale_rect);
|
||||
}
|
||||
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect, const LLRectf& scale_rect)
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect, const LLRectf& scale_rect)
|
||||
{
|
||||
stop_glerror();
|
||||
|
||||
@@ -629,12 +628,12 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma
|
||||
}
|
||||
}
|
||||
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), degrees, image, color, uv_rect );
|
||||
}
|
||||
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -680,7 +679,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
||||
}
|
||||
|
||||
|
||||
void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -1559,7 +1558,8 @@ void LLUI::initClass(LLControlGroup* config,
|
||||
LLImageProviderInterface* image_provider,
|
||||
LLUIAudioCallback audio_callback,
|
||||
const LLVector2* scale_factor,
|
||||
const std::string& language)
|
||||
const std::string& language
|
||||
)
|
||||
{
|
||||
sConfigGroup = config;
|
||||
sIgnoresGroup = ignores;
|
||||
@@ -1764,11 +1764,24 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen)
|
||||
glPointToScreen(gl.mRight, gl.mBottom, &screen->mRight, &screen->mBottom);
|
||||
}
|
||||
|
||||
//static
|
||||
LLUIImage* LLUI::getUIImage(const std::string& name)
|
||||
//static
|
||||
LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id, S32 priority)
|
||||
{
|
||||
if (!name.empty())
|
||||
return sImageProvider->getUIImage(name);
|
||||
if (sImageProvider)
|
||||
{
|
||||
return sImageProvider->getUIImageByID(image_id, priority);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
LLPointer<LLUIImage> LLUI::getUIImage(const std::string& name, S32 priority)
|
||||
{
|
||||
if (!name.empty() && sImageProvider)
|
||||
return sImageProvider->getUIImage(name, priority);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -1853,7 +1866,7 @@ LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled)
|
||||
// LLUIImage
|
||||
//
|
||||
|
||||
LLUIImage::LLUIImage(const std::string& name, LLPointer<LLImageGL> image) :
|
||||
LLUIImage::LLUIImage(const std::string& name, LLPointer<LLTexture> image) :
|
||||
mName(name),
|
||||
mImage(image),
|
||||
mScaleRegion(0.f, 1.f, 1.f, 0.f),
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
//#include "llhtmlhelp.h"
|
||||
#include "llgl.h" // *TODO: break this dependency
|
||||
#include <stack>
|
||||
//#include "llimagegl.h"
|
||||
#include "lltexture.h"
|
||||
#include <boost/signal.hpp>
|
||||
|
||||
// LLUIFactory
|
||||
@@ -50,7 +50,6 @@
|
||||
|
||||
class LLColor4;
|
||||
class LLHtmlHelp;
|
||||
class LLImageGL;
|
||||
class LLVector3;
|
||||
class LLVector2;
|
||||
class LLUUID;
|
||||
@@ -91,14 +90,14 @@ void gl_washer_2d(F32 outer_radius, F32 inner_radius, S32 steps, const LLColor4&
|
||||
void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians, F32 end_radians, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color);
|
||||
void gl_washer_spokes_2d(F32 outer_radius, F32 inner_radius, S32 count, const LLColor4& inner_color, const LLColor4& outer_color);
|
||||
|
||||
void gl_draw_image(S32 x, S32 y, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees,LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLImageGL* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_image(S32 x, S32 y, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees,LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
// Flip vertical, used for LLFloaterHTML
|
||||
void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
|
||||
void gl_rect_2d_xor(S32 left, S32 top, S32 right, S32 bottom);
|
||||
void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color, F32 phase = 0.f );
|
||||
@@ -182,7 +181,8 @@ public:
|
||||
static void getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y);
|
||||
static void setScaleFactor(const LLVector2& scale_factor);
|
||||
static void setLineWidth(F32 width);
|
||||
static LLUIImage* getUIImage(const std::string& name);
|
||||
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0);
|
||||
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);
|
||||
static LLVector2 getWindowSize();
|
||||
static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y);
|
||||
static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y);
|
||||
@@ -416,13 +416,13 @@ public:
|
||||
class LLUIImage : public LLRefCount
|
||||
{
|
||||
public:
|
||||
LLUIImage(const std::string& name, LLPointer<LLImageGL> image);
|
||||
LLUIImage(const std::string& name, LLPointer<LLTexture> image);
|
||||
|
||||
void setClipRegion(const LLRectf& region);
|
||||
void setScaleRegion(const LLRectf& region);
|
||||
|
||||
LLPointer<LLImageGL> getImage() { return mImage; }
|
||||
const LLPointer<LLImageGL>& getImage() const { return mImage; }
|
||||
LLPointer<LLTexture> getImage() { return mImage; }
|
||||
const LLPointer<LLTexture>& getImage() const { return mImage; }
|
||||
|
||||
void draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color = UI_VERTEX_COLOR) const;
|
||||
void draw(S32 x, S32 y, const LLColor4& color = UI_VERTEX_COLOR) const;
|
||||
@@ -449,7 +449,7 @@ protected:
|
||||
std::string mName;
|
||||
LLRectf mScaleRegion;
|
||||
LLRectf mClipRegion;
|
||||
LLPointer<LLImageGL> mImage;
|
||||
LLPointer<LLTexture> mImage;
|
||||
BOOL mUniformScaling;
|
||||
BOOL mNoClip;
|
||||
};
|
||||
@@ -597,8 +597,8 @@ public:
|
||||
LLImageProviderInterface() {};
|
||||
virtual ~LLImageProviderInterface() {};
|
||||
|
||||
virtual LLUIImagePtr getUIImage(const std::string& name) = 0;
|
||||
virtual LLUIImagePtr getUIImageByID(const LLUUID& id) = 0;
|
||||
virtual LLUIImagePtr getUIImage(const std::string& name, S32 priority) = 0;
|
||||
virtual LLUIImagePtr getUIImageByID(const LLUUID& id, S32 priority) = 0;
|
||||
virtual void cleanUp() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ void LLViewBorder::setColorsExtended( const LLColor4& shadow_light, const LLColo
|
||||
|
||||
void LLViewBorder::setTexture( const LLUUID &image_id )
|
||||
{
|
||||
mTexture = LLUI::sImageProvider->getUIImageByID(image_id);
|
||||
mTexture = LLUI::getUIImageByID(image_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -563,8 +563,8 @@ void LLDir::setLindenUserDir(const std::string &grid, const std::string &first,
|
||||
{
|
||||
std::string gridlower(grid);
|
||||
LLStringUtil::toLower(gridlower);
|
||||
mPerAccountChatLogsDir += "@";
|
||||
mPerAccountChatLogsDir += gridlower;
|
||||
mLindenUserDir += "@";
|
||||
mLindenUserDir += gridlower;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -235,6 +235,15 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
|
||||
}
|
||||
}
|
||||
|
||||
res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries"));
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
llwarns << "Couldn't create LL_PATH_USER_SETTINGS/dictionaries dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
}
|
||||
|
||||
|
||||
@@ -247,6 +247,15 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name)
|
||||
}
|
||||
}
|
||||
|
||||
res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries"));
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
llwarns << "Couldn't create LL_PATH_USER_SETTINGS/dictionaries dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,16 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
|
||||
llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries"));
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
llwarns << "Couldn't create LL_PATH_USER_SETTINGS/dictionaries dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
}
|
||||
|
||||
|
||||
@@ -2841,8 +2841,16 @@ void LLSplashScreenWin32::updateImpl(const std::string& mesg)
|
||||
{
|
||||
if (!mWindow) return;
|
||||
|
||||
WCHAR w_mesg[1024];
|
||||
mbstowcs(w_mesg, mesg.c_str(), 1024);
|
||||
int output_str_len = MultiByteToWideChar(CP_UTF8, 0, mesg.c_str(), mesg.length(), NULL, 0);
|
||||
if( output_str_len>1024 )
|
||||
return;
|
||||
|
||||
WCHAR w_mesg[1025];//big enought to keep null terminatos
|
||||
|
||||
MultiByteToWideChar (CP_UTF8, 0, mesg.c_str(), mesg.length(), w_mesg, output_str_len);
|
||||
|
||||
//looks like MultiByteToWideChar didn't add null terminator to converted string, see EXT-4858
|
||||
w_mesg[output_str_len] = 0;
|
||||
|
||||
SendDlgItemMessage(mWindow,
|
||||
666, // HACK: text id
|
||||
@@ -2970,78 +2978,6 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url )
|
||||
sei.lpFile = url_utf16.c_str();
|
||||
ShellExecuteEx( &sei );
|
||||
|
||||
//// TODO: LEAVING OLD CODE HERE SO I DON'T BONE OTHER MERGES
|
||||
//// DELETE THIS ONCE THE MERGES ARE DONE
|
||||
|
||||
// Figure out the user's default web browser
|
||||
// HKEY_CLASSES_ROOT\http\shell\open\command
|
||||
/*
|
||||
std::string reg_path_str = gURLProtocolWhitelistHandler[i] + "\\shell\\open\\command";
|
||||
WCHAR reg_path_wstr[256];
|
||||
mbstowcs( reg_path_wstr, reg_path_str.c_str(), LL_ARRAY_SIZE(reg_path_wstr) );
|
||||
|
||||
HKEY key;
|
||||
WCHAR browser_open_wstr[1024];
|
||||
DWORD buffer_length = 1024;
|
||||
RegOpenKeyEx(HKEY_CLASSES_ROOT, reg_path_wstr, 0, KEY_QUERY_VALUE, &key);
|
||||
RegQueryValueEx(key, NULL, NULL, NULL, (LPBYTE)browser_open_wstr, &buffer_length);
|
||||
RegCloseKey(key);
|
||||
|
||||
// Convert to STL string
|
||||
LLWString browser_open_wstring = utf16str_to_wstring(browser_open_wstr);
|
||||
|
||||
if (browser_open_wstring.length() < 2)
|
||||
{
|
||||
LL_WARNS("Window") << "Invalid browser executable in registry " << browser_open_wstring << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
// Extract the process that's supposed to be launched
|
||||
LLWString browser_executable;
|
||||
if (browser_open_wstring[0] == '"')
|
||||
{
|
||||
// executable is quoted, find the matching quote
|
||||
size_t quote_pos = browser_open_wstring.find('"', 1);
|
||||
// copy out the string including both quotes
|
||||
browser_executable = browser_open_wstring.substr(0, quote_pos+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// executable not quoted, find a space
|
||||
size_t space_pos = browser_open_wstring.find(' ', 1);
|
||||
browser_executable = browser_open_wstring.substr(0, space_pos);
|
||||
}
|
||||
|
||||
LL_DEBUGS("Window") << "Browser reg key: " << wstring_to_utf8str(browser_open_wstring) << LL_ENDL;
|
||||
LL_INFOS("Window") << "Browser executable: " << wstring_to_utf8str(browser_executable) << LL_ENDL;
|
||||
|
||||
// Convert URL to wide string for Windows API
|
||||
// Assume URL is UTF8, as can come from scripts
|
||||
LLWString url_wstring = utf8str_to_wstring(escaped_url);
|
||||
llutf16string url_utf16 = wstring_to_utf16str(url_wstring);
|
||||
|
||||
// Convert executable and path to wide string for Windows API
|
||||
llutf16string browser_exec_utf16 = wstring_to_utf16str(browser_executable);
|
||||
|
||||
// ShellExecute returns HINSTANCE for backwards compatiblity.
|
||||
// MS docs say to cast to int and compare to 32.
|
||||
HWND our_window = NULL;
|
||||
LPCWSTR directory_wstr = NULL;
|
||||
int retval = (int) ShellExecute(our_window, // Flawfinder: ignore
|
||||
L"open",
|
||||
browser_exec_utf16.c_str(),
|
||||
url_utf16.c_str(),
|
||||
directory_wstr,
|
||||
SW_SHOWNORMAL);
|
||||
if (retval > 32)
|
||||
{
|
||||
LL_DEBUGS("Window") << "load_url success with " << retval << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS("Window") << "load_url failure with " << retval << LL_ENDL;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -405,7 +405,15 @@ template <> inline void LLCachedControl<LLColor4>::setValue(const LLSD& newvalue
|
||||
else
|
||||
this->mCachedValue = (const LLColor4 &)newvalue;
|
||||
}
|
||||
|
||||
template <> inline void LLCachedControl<U32>::setValue(const LLSD& newvalue)
|
||||
{
|
||||
if(mControl->isType(TYPE_U32) || mControl->isType(TYPE_S32)) //LLSD does not support U32 fully
|
||||
mCachedValue = (U32)newvalue.asInteger();
|
||||
else if(this->mControl->isType(TYPE_F32))
|
||||
mCachedValue = (U32)newvalue.asReal();
|
||||
else
|
||||
mCachedValue = (U32)0; //What to do...
|
||||
}
|
||||
|
||||
//Following is actually defined in newview/llviewercontrol.cpp, but extern access is fine (Unless GCC bites me)
|
||||
template <> eControlType get_control_type<U32>(const U32& in, LLSD& out);
|
||||
|
||||
@@ -9,6 +9,7 @@ include(DirectX)
|
||||
include(ELFIO)
|
||||
include(FMOD)
|
||||
include(OPENAL)
|
||||
include(HUNSPELL)
|
||||
include(FindOpenGL)
|
||||
include(JsonCpp)
|
||||
include(LLAddBuildTest)
|
||||
@@ -43,6 +44,7 @@ endif (WINDOWS)
|
||||
|
||||
include_directories(
|
||||
${DBUSGLIB_INCLUDE_DIRS}
|
||||
${HUNSPELL_INCLUDE_DIR}
|
||||
${ELFIO_INCLUDE_DIR}
|
||||
${JSONCPP_INCLUDE_DIRS}
|
||||
${LLAUDIO_INCLUDE_DIRS}
|
||||
@@ -64,8 +66,12 @@ include_directories(
|
||||
)
|
||||
|
||||
set(viewer_SOURCE_FILES
|
||||
llviewerobjectbackup.cpp
|
||||
slfloatermediafilter.cpp
|
||||
floaterlocalassetbrowse.cpp
|
||||
aoremotectrl.cpp
|
||||
lgghunspell_wrapper.cpp
|
||||
lggdicdownload.cpp
|
||||
floaterao.cpp
|
||||
floatervoicelicense.cpp
|
||||
cofmgr.cpp
|
||||
@@ -73,7 +79,6 @@ set(viewer_SOURCE_FILES
|
||||
ascentfloatercontactgroups.cpp
|
||||
ascentprefssys.cpp
|
||||
ascentprefsvan.cpp
|
||||
ascentuploadbrowser.cpp
|
||||
dhparam.cpp
|
||||
dsaparam.cpp
|
||||
emerald.cpp
|
||||
@@ -183,7 +188,6 @@ set(viewer_SOURCE_FILES
|
||||
llfloatereditui.cpp
|
||||
llfloaterenvsettings.cpp
|
||||
llfloaterevent.cpp
|
||||
llfloaterexport.cpp
|
||||
llfloaterexploreanimations.cpp
|
||||
llfloaterexploresounds.cpp
|
||||
llfloaterfriends.cpp
|
||||
@@ -200,7 +204,6 @@ set(viewer_SOURCE_FILES
|
||||
llfloaterhtmlsimple.cpp
|
||||
llfloaterhud.cpp
|
||||
llfloaterimagepreview.cpp
|
||||
llfloaterimport.cpp
|
||||
llfloaterinspect.cpp
|
||||
llfloaterjoystick.cpp
|
||||
llfloaterlagmeter.cpp
|
||||
@@ -268,7 +271,6 @@ set(viewer_SOURCE_FILES
|
||||
llhudtext.cpp
|
||||
llhudview.cpp
|
||||
llimpanel.cpp
|
||||
llimportobject.cpp
|
||||
llimview.cpp
|
||||
llinventoryactions.cpp
|
||||
llinventorybackup.cpp
|
||||
@@ -346,6 +348,7 @@ set(viewer_SOURCE_FILES
|
||||
llpanelweb.cpp
|
||||
llparcelselection.cpp
|
||||
llpatchvertexarray.cpp
|
||||
llphysicsmotion.cpp
|
||||
llpolymesh.cpp
|
||||
llpolymorph.cpp
|
||||
llprefschat.cpp
|
||||
@@ -426,8 +429,8 @@ set(viewer_SOURCE_FILES
|
||||
llviewerdisplay.cpp
|
||||
llviewergenericmessage.cpp
|
||||
llviewergesture.cpp
|
||||
llviewerimage.cpp
|
||||
llviewerimagelist.cpp
|
||||
#llviewerimage.cpp
|
||||
#llviewerimagelist.cpp
|
||||
llviewerinventory.cpp
|
||||
llviewerjointattachment.cpp
|
||||
llviewerjoint.cpp
|
||||
@@ -457,7 +460,9 @@ set(viewer_SOURCE_FILES
|
||||
llviewershadermgr.cpp
|
||||
llviewerstats.cpp
|
||||
llviewertexteditor.cpp
|
||||
llviewertexture.cpp
|
||||
llviewertextureanim.cpp
|
||||
llviewertexturelist.cpp
|
||||
llviewerthrottle.cpp
|
||||
llviewervisualparam.cpp
|
||||
llviewerwindow.cpp
|
||||
@@ -536,6 +541,8 @@ set(viewer_HEADER_FILES
|
||||
CMakeLists.txt
|
||||
ViewerInstall.cmake
|
||||
|
||||
llviewerobjectbackup.h
|
||||
slfloatermediafilter.h
|
||||
floaterlocalassetbrowse.h
|
||||
aoremotectrl.h
|
||||
floaterao.h
|
||||
@@ -545,7 +552,6 @@ set(viewer_HEADER_FILES
|
||||
ascentfloatercontactgroups.h
|
||||
ascentprefssys.h
|
||||
ascentprefsvan.h
|
||||
ascentuploadbrowser.h
|
||||
emerald.h
|
||||
emeraldboobutils.h
|
||||
dofloaterhex.h
|
||||
@@ -559,6 +565,8 @@ set(viewer_HEADER_FILES
|
||||
hipporestrequest.h
|
||||
hippopanelgrids.h
|
||||
jcfloaterareasearch.h
|
||||
lggdicdownload.h
|
||||
lgghunspell_wrapper.h
|
||||
chatbar_as_cmdline.h
|
||||
qtoolalign.h
|
||||
llagent.h
|
||||
@@ -654,7 +662,6 @@ set(viewer_HEADER_FILES
|
||||
llfloaterdirectory.h
|
||||
llfloatereditui.h
|
||||
llfloaterenvsettings.h
|
||||
llfloaterexport.h
|
||||
llfloaterexploreanimations.h
|
||||
llfloaterexploresounds.h
|
||||
llfloaterevent.h
|
||||
@@ -672,7 +679,6 @@ set(viewer_HEADER_FILES
|
||||
llfloaterhtmlsimple.h
|
||||
llfloaterhud.h
|
||||
llfloaterimagepreview.h
|
||||
llfloaterimport.h
|
||||
llfloaterinspect.h
|
||||
llfloaterjoystick.h
|
||||
llfloaterlagmeter.h
|
||||
@@ -739,7 +745,6 @@ set(viewer_HEADER_FILES
|
||||
llhudtext.h
|
||||
llhudview.h
|
||||
llimpanel.h
|
||||
llimportobject.h
|
||||
llimview.h
|
||||
llinventorybackup.h
|
||||
llinventorybridge.h
|
||||
@@ -818,6 +823,7 @@ set(viewer_HEADER_FILES
|
||||
llpanelweb.h
|
||||
llparcelselection.h
|
||||
llpatchvertexarray.h
|
||||
llphysicsmotion.h
|
||||
llpolymesh.h
|
||||
llpolymorph.h
|
||||
llprefschat.h
|
||||
@@ -902,8 +908,8 @@ set(viewer_HEADER_FILES
|
||||
llviewerdisplay.h
|
||||
llviewergenericmessage.h
|
||||
llviewergesture.h
|
||||
llviewerimage.h
|
||||
llviewerimagelist.h
|
||||
#llviewerimage.h
|
||||
#llviewerimagelist.h
|
||||
llviewerinventory.h
|
||||
llviewerjoint.h
|
||||
llviewerjointattachment.h
|
||||
@@ -931,7 +937,9 @@ set(viewer_HEADER_FILES
|
||||
llviewershadermgr.h
|
||||
llviewerstats.h
|
||||
llviewertexteditor.h
|
||||
llviewertexture.h
|
||||
llviewertextureanim.h
|
||||
llviewertexturelist.h
|
||||
llviewerthrottle.h
|
||||
llviewervisualparam.h
|
||||
llviewerwindow.h
|
||||
@@ -1303,7 +1311,10 @@ add_executable(${VIEWER_BINARY_NAME}
|
||||
MACOSX_BUNDLE
|
||||
${viewer_SOURCE_FILES}
|
||||
)
|
||||
check_message_template(${VIEWER_BINARY_NAME})
|
||||
|
||||
if (!DISABLE_TEMPLATE_CHECK)
|
||||
check_message_template(${VIEWER_BINARY_NAME})
|
||||
endif (!DISABLE_TEMPLATE_CHECK)
|
||||
|
||||
if (LLKDU_LIBRARY)
|
||||
add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
|
||||
@@ -1438,6 +1449,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${XMLRPCEPI_LIBRARIES}
|
||||
${ELFIO_LIBRARIES}
|
||||
${HUNSPELL_LIBRARY}
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1849
indra/newview/app_settings/dictionaries/en_sl.dic
Normal file
1849
indra/newview/app_settings/dictionaries/en_sl.dic
Normal file
File diff suppressed because it is too large
Load Diff
201
indra/newview/app_settings/dictionaries/en_us.aff
Normal file
201
indra/newview/app_settings/dictionaries/en_us.aff
Normal file
@@ -0,0 +1,201 @@
|
||||
SET ISO8859-1
|
||||
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
|
||||
NOSUGGEST !
|
||||
|
||||
# ordinal numbers
|
||||
COMPOUNDMIN 1
|
||||
# only in compounds: 1th, 2th, 3th
|
||||
ONLYINCOMPOUND c
|
||||
# compound rules:
|
||||
# 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
# 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
COMPOUNDRULE 2
|
||||
COMPOUNDRULE n*1t
|
||||
COMPOUNDRULE n*mp
|
||||
WORDCHARS 0123456789
|
||||
|
||||
PFX A Y 1
|
||||
PFX A 0 re .
|
||||
|
||||
PFX I Y 1
|
||||
PFX I 0 in .
|
||||
|
||||
PFX U Y 1
|
||||
PFX U 0 un .
|
||||
|
||||
PFX C Y 1
|
||||
PFX C 0 de .
|
||||
|
||||
PFX E Y 1
|
||||
PFX E 0 dis .
|
||||
|
||||
PFX F Y 1
|
||||
PFX F 0 con .
|
||||
|
||||
PFX K Y 1
|
||||
PFX K 0 pro .
|
||||
|
||||
SFX V N 2
|
||||
SFX V e ive e
|
||||
SFX V 0 ive [^e]
|
||||
|
||||
SFX N Y 3
|
||||
SFX N e ion e
|
||||
SFX N y ication y
|
||||
SFX N 0 en [^ey]
|
||||
|
||||
SFX X Y 3
|
||||
SFX X e ions e
|
||||
SFX X y ications y
|
||||
SFX X 0 ens [^ey]
|
||||
|
||||
SFX H N 2
|
||||
SFX H y ieth y
|
||||
SFX H 0 th [^y]
|
||||
|
||||
SFX Y Y 1
|
||||
SFX Y 0 ly .
|
||||
|
||||
SFX G Y 2
|
||||
SFX G e ing e
|
||||
SFX G 0 ing [^e]
|
||||
|
||||
SFX J Y 2
|
||||
SFX J e ings e
|
||||
SFX J 0 ings [^e]
|
||||
|
||||
SFX D Y 4
|
||||
SFX D 0 d e
|
||||
SFX D y ied [^aeiou]y
|
||||
SFX D 0 ed [^ey]
|
||||
SFX D 0 ed [aeiou]y
|
||||
|
||||
SFX T N 4
|
||||
SFX T 0 st e
|
||||
SFX T y iest [^aeiou]y
|
||||
SFX T 0 est [aeiou]y
|
||||
SFX T 0 est [^ey]
|
||||
|
||||
SFX R Y 4
|
||||
SFX R 0 r e
|
||||
SFX R y ier [^aeiou]y
|
||||
SFX R 0 er [aeiou]y
|
||||
SFX R 0 er [^ey]
|
||||
|
||||
SFX Z Y 4
|
||||
SFX Z 0 rs e
|
||||
SFX Z y iers [^aeiou]y
|
||||
SFX Z 0 ers [aeiou]y
|
||||
SFX Z 0 ers [^ey]
|
||||
|
||||
SFX S Y 4
|
||||
SFX S y ies [^aeiou]y
|
||||
SFX S 0 s [aeiou]y
|
||||
SFX S 0 es [sxzh]
|
||||
SFX S 0 s [^sxzhy]
|
||||
|
||||
SFX P Y 3
|
||||
SFX P y iness [^aeiou]y
|
||||
SFX P 0 ness [aeiou]y
|
||||
SFX P 0 ness [^y]
|
||||
|
||||
SFX M Y 1
|
||||
SFX M 0 's .
|
||||
|
||||
SFX B Y 3
|
||||
SFX B 0 able [^aeiou]
|
||||
SFX B 0 able ee
|
||||
SFX B e able [^aeiou]e
|
||||
|
||||
SFX L Y 1
|
||||
SFX L 0 ment .
|
||||
|
||||
REP 88
|
||||
REP a ei
|
||||
REP ei a
|
||||
REP a ey
|
||||
REP ey a
|
||||
REP ai ie
|
||||
REP ie ai
|
||||
REP are air
|
||||
REP are ear
|
||||
REP are eir
|
||||
REP air are
|
||||
REP air ere
|
||||
REP ere air
|
||||
REP ere ear
|
||||
REP ere eir
|
||||
REP ear are
|
||||
REP ear air
|
||||
REP ear ere
|
||||
REP eir are
|
||||
REP eir ere
|
||||
REP ch te
|
||||
REP te ch
|
||||
REP ch ti
|
||||
REP ti ch
|
||||
REP ch tu
|
||||
REP tu ch
|
||||
REP ch s
|
||||
REP s ch
|
||||
REP ch k
|
||||
REP k ch
|
||||
REP f ph
|
||||
REP ph f
|
||||
REP gh f
|
||||
REP f gh
|
||||
REP i igh
|
||||
REP igh i
|
||||
REP i uy
|
||||
REP uy i
|
||||
REP i ee
|
||||
REP ee i
|
||||
REP j di
|
||||
REP di j
|
||||
REP j gg
|
||||
REP gg j
|
||||
REP j ge
|
||||
REP ge j
|
||||
REP s ti
|
||||
REP ti s
|
||||
REP s ci
|
||||
REP ci s
|
||||
REP k cc
|
||||
REP cc k
|
||||
REP k qu
|
||||
REP qu k
|
||||
REP kw qu
|
||||
REP o eau
|
||||
REP eau o
|
||||
REP o ew
|
||||
REP ew o
|
||||
REP oo ew
|
||||
REP ew oo
|
||||
REP ew ui
|
||||
REP ui ew
|
||||
REP oo ui
|
||||
REP ui oo
|
||||
REP ew u
|
||||
REP u ew
|
||||
REP oo u
|
||||
REP u oo
|
||||
REP u oe
|
||||
REP oe u
|
||||
REP u ieu
|
||||
REP ieu u
|
||||
REP ue ew
|
||||
REP ew ue
|
||||
REP uff ough
|
||||
REP oo ieu
|
||||
REP ieu oo
|
||||
REP ier ear
|
||||
REP ear ier
|
||||
REP ear air
|
||||
REP air ear
|
||||
REP w qu
|
||||
REP qu w
|
||||
REP z ss
|
||||
REP ss z
|
||||
REP shun tion
|
||||
REP shun sion
|
||||
REP shun cion
|
||||
62120
indra/newview/app_settings/dictionaries/en_us.dic
Normal file
62120
indra/newview/app_settings/dictionaries/en_us.dic
Normal file
File diff suppressed because it is too large
Load Diff
@@ -40,14 +40,14 @@ not_at_rot_target not_at_rot_target():Result of LLRotTarget library function cal
|
||||
money money(key id, integer amount):Triggered when L$ is given to task
|
||||
email email(string time, string address, string subj, string message, integer num_left):Triggered when task receives email
|
||||
run_time_permissions run_time_permissions(integer perm):Triggered when an agent grants run time permissions to task
|
||||
attach attach(key id):Triggered when an agent attaches or detaches from agent
|
||||
attach attach(key id):Triggered when task attaches or detaches from agent
|
||||
dataserver dataserver(key queryid, string data):Triggered when task receives asynchronous data
|
||||
moving_start moving_start():Triggered when task begins moving
|
||||
moving_end moving_end():Triggered when task stops moving
|
||||
on_rez on_rez(integer start_param):Triggered when task is rezed in from inventory or another task
|
||||
object_rez object_rez(key id):Triggered when task rezes in another task
|
||||
link_message link_message(integer sender_num, integer num, string str, key id):Triggered when task receives a link message via LLMessageLinked library function call
|
||||
changed changed( integer change ):Triggered various event change the task:(test change with CHANGED_INVENTORY, CHANGED_COLOR, CHANGED_SHAPE, CHANGED_SCALE, CHANGED_TEXTURE, CHANGED_LINK, CHANGED_ALLOWED_DROP, CHANGED_OWNER, CHANGED_REGION, CHANGED_TELEPORT)
|
||||
changed changed( integer change ):Triggered various event change the task:(test change with CHANGED_INVENTORY, CHANGED_COLOR, CHANGED_SHAPE, CHANGED_SCALE, CHANGED_TEXTURE, CHANGED_LINK, CHANGED_ALLOWED_DROP, CHANGED_OWNER, CHANGED_REGION, CHANGED_TELEPORT, CHANGED_REGION_START, CHANGED_MEDIA)
|
||||
remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY)
|
||||
http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests
|
||||
http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL
|
||||
@@ -66,7 +66,9 @@ STATUS_BLOCK_GRAB Passed in the llSetStatus library function. If TRUE, object c
|
||||
STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner
|
||||
STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set
|
||||
STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects
|
||||
AGENT Passed in llSensor library function to look for other Agents
|
||||
AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME
|
||||
AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username
|
||||
AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name
|
||||
ACTIVE Passed in llSensor library function to look for moving objects
|
||||
PASSIVE Passed in llSensor library function to look for objects that aren't moving
|
||||
SCRIPTED Passed in llSensor library function to look for scripted objects
|
||||
@@ -108,6 +110,7 @@ AGENT_TYPING Returned by llGetAgentInfo if the Agent is typing
|
||||
AGENT_CROUCHING Returned by llGetAgentInfo if the Agent is crouching
|
||||
AGENT_BUSY Returned by llGetAgentInfo if the Agent is busy
|
||||
AGENT_ALWAYS_RUN Returned by llGetAgentInfo if the Agent has 'Always Run' enabled
|
||||
AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control
|
||||
|
||||
PSYS_PART_FLAGS
|
||||
PSYS_PART_START_COLOR
|
||||
@@ -319,6 +322,7 @@ CHANGED_OWNER Parameter of changed event handler used to indicate change to tas
|
||||
CHANGED_REGION Parameter of changed event handler used to indicate the region has changed
|
||||
CHANGED_TELEPORT Parameter of changed event handler used to indicate teleport has completed
|
||||
CHANGED_REGION_START Parameter of changed event handler used to indicate the region has been restarted
|
||||
CHANGED_MEDIA Parameter of changed event handler used to indicate that media has changed on a face of the task
|
||||
|
||||
TYPE_INTEGER Indicates that the list entry is holding an integer
|
||||
TYPE_FLOAT Indicates that the list entry is holding an float
|
||||
@@ -351,6 +355,9 @@ PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY
|
||||
PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE
|
||||
PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR
|
||||
PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount
|
||||
PRIM_TEXT For primitive hovertext. Followed by a string, a vector color and a float alpha
|
||||
PRIM_NAME For primitive name (from server v1.40 onwards). Followed by a string.
|
||||
PRIM_DESC For primitive description (from server v1.40 onwards). Followed by a string.
|
||||
|
||||
PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
|
||||
PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
|
||||
@@ -457,6 +464,7 @@ PARCEL_FLAG_ALLOW_LANDMARK Used with llGetParcelFlags to find if a parcel allo
|
||||
PARCEL_FLAG_ALLOW_TERRAFORM Used with llGetParcelFlags to find if a parcel allows anyone to terraform the land
|
||||
PARCEL_FLAG_ALLOW_DAMAGE Used with llGetParcelFlags to find if a parcel allows damage
|
||||
PARCEL_FLAG_ALLOW_CREATE_OBJECTS Used with llGetParcelFlags to find if a parcel allows anyone to create objects
|
||||
PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS Used with llGetParcelFlags to find if a parcel allows group members or objects to create objects
|
||||
PARCEL_FLAG_USE_ACCESS_GROUP Used with llGetParcelFlags to find if a parcel limits access to a group
|
||||
PARCEL_FLAG_USE_ACCESS_LIST Used with llGetParcelFlags to find if a parcel limits access to a list of residents
|
||||
PARCEL_FLAG_USE_BAN_LIST Used with llGetParcelFlags to find if a parcel uses a ban list
|
||||
@@ -507,11 +515,52 @@ CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default act
|
||||
CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked
|
||||
CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked
|
||||
CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked
|
||||
CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked
|
||||
|
||||
TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid.
|
||||
TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid.
|
||||
TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid.
|
||||
|
||||
PRIM_MEDIA_ALT_IMAGE_ENABLE Used with ll{Get,Set}PrimMediaParams to enable the default alt image for media
|
||||
PRIM_MEDIA_CONTROLS Used with ll{Get,Set}PrimMediaParams to determine the controls shown for media
|
||||
PRIM_MEDIA_CURRENT_URL Used with ll{Get,Set}PrimMediaParams to navigate/access the current URL
|
||||
PRIM_MEDIA_HOME_URL Used with ll{Get,Set}PrimMediaParams to access the home URL
|
||||
PRIM_MEDIA_AUTO_LOOP Used with ll{Get,Set}PrimMediaParams to determine if media should auto-loop (if applicable)
|
||||
PRIM_MEDIA_AUTO_PLAY Used with ll{Get,Set}PrimMediaParams to determine if media should start playing as soon as it is created
|
||||
PRIM_MEDIA_AUTO_SCALE Used with ll{Get,Set}PrimMediaParams to determine if media should scale to fit the face it is on
|
||||
PRIM_MEDIA_AUTO_ZOOM Used with ll{Get,Set}PrimMediaParams to determine if the user would zoom in when viewing media
|
||||
PRIM_MEDIA_FIRST_CLICK_INTERACT Used with ll{Get,Set}PrimMediaParams to determine whether the user interacts with media or not when she first clicks it (versus selection)
|
||||
PRIM_MEDIA_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's width in pixels
|
||||
PRIM_MEDIA_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's height in pixels
|
||||
PRIM_MEDIA_WHITELIST_ENABLE Used with ll{Get,Set}PrimMediaParams to determine if the domain whitelist is enabled
|
||||
PRIM_MEDIA_WHITELIST Used with ll{Get,Set}PrimMediaParams to access the media's list of allowable URL prefixes to navigate to
|
||||
PRIM_MEDIA_PERMS_INTERACT Used with ll{Get,Set}PrimMediaParams to determine the permissions for who can interact with the media
|
||||
PRIM_MEDIA_PERMS_CONTROL Used with ll{Get,Set}PrimMediaParams to determine the permissions for who has controls
|
||||
PRIM_MEDIA_PARAM_MAX The value of the largest media param
|
||||
|
||||
PRIM_MEDIA_CONTROLS_STANDARD Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "standard controls"
|
||||
PRIM_MEDIA_CONTROLS_MINI Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "mini controls"
|
||||
|
||||
PRIM_MEDIA_PERM_NONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, no permissions
|
||||
PRIM_MEDIA_PERM_OWNER Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, owner permissions
|
||||
PRIM_MEDIA_PERM_GROUP Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, group permissions
|
||||
PRIM_MEDIA_PERM_ANYONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, anyone has permissions
|
||||
|
||||
PRIM_MEDIA_MAX_URL_LENGTH Used with ll{Get,Set}PrimMediaParams, the maximum length of PRIM_MEDIA_CURRENT_URL or PRIM_MEDIA_HOME_URL
|
||||
PRIM_MEDIA_MAX_WHITELIST_SIZE Used with ll{Get,Set}PrimMediaParams, the maximum length, in bytes, of PRIM_MEDIA_WHITELIST
|
||||
PRIM_MEDIA_MAX_WHITELIST_COUNT Used with ll{Get,Set}PrimMediaParams, the maximum number of items allowed in PRIM_MEDIA_WHITELIST
|
||||
PRIM_MEDIA_MAX_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_WIDTH_PIXELS
|
||||
PRIM_MEDIA_MAX_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_HEIGHT_PIXELS
|
||||
|
||||
STATUS_OK Result of function call was success
|
||||
STATUS_MALFORMED_PARAMS Function was called with malformed params
|
||||
STATUS_TYPE_MISMATCH Argument(s) passed to function had a type mismatch
|
||||
STATUS_BOUNDS_ERROR Argument(s) passed to function had a bounds error
|
||||
STATUS_NOT_FOUND Object or other item was not found
|
||||
STATUS_NOT_SUPPORTED Feature not supported
|
||||
STATUS_INTERNAL_ERROR An internal error occurred
|
||||
STATUS_WHITELIST_FAILED URL failed to pass whitelist
|
||||
|
||||
WL_WATER_COLOR Windlight Water Colour
|
||||
WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent
|
||||
WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier
|
||||
@@ -532,6 +581,7 @@ WL_DENSITY_MULTIPLIER Windlight Density Multiplier
|
||||
WL_DISTANCE_MULTIPLIER Windlight Distance Multiplier
|
||||
WL_MAX_ALTITUDE Windlight Max Altitude
|
||||
WL_SUN_MOON_COLOR Windlight Sun/Moon Colour
|
||||
WL_SUN_MOON_POSITION Windlight Sun/Moon Position
|
||||
WL_AMBIENT Windlight Ambient Colour
|
||||
WL_EAST_ANGLE Windlight Sun/Position East
|
||||
WL_SUN_GLOW_FOCUS Windlight Sun Glow Focus
|
||||
@@ -554,7 +604,8 @@ WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds
|
||||
NULL_KEY Indicates an empty key
|
||||
EOF Indicates the last line of a notecard was read
|
||||
TEXTURE_BLANK UUID for the "Blank" texture
|
||||
TEXTURE_DEFAULT UUID for the "Default Media" texture
|
||||
TEXTURE_DEFAULT Alias for TEXTURE_PLYWOOD
|
||||
TEXTURE_MEDIA UUID for the "Default Media" texture
|
||||
TEXTURE_PLYWOOD UUID for the default "Plywood" texture
|
||||
TEXTURE_TRANSPARENT UUID for the "White - Transparent" texture
|
||||
|
||||
@@ -593,9 +644,11 @@ return Leave current function or event handler
|
||||
# Comment
|
||||
[one_sided_delimiter .8, .3, .15]
|
||||
// Comment:Non-functional commentary or disabled code
|
||||
[two_sided_delimiter .8, .3, .15]
|
||||
/* */ Comment:Non-functional commentary or disabled code
|
||||
|
||||
# String literals
|
||||
[two_sided_delimiter 0, .2, 0]
|
||||
" String literal
|
||||
[two_sided_delimiter_esc 0, .2, 0]
|
||||
" " String literal
|
||||
|
||||
#functions are supplied by the program now.
|
||||
|
||||
@@ -9,6 +9,106 @@
|
||||
<string>settings_rlv.xml</string>
|
||||
</array>
|
||||
|
||||
<key>SpellDownloadURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Base url for download dictionaries</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://app.singularityviewer.org/dict/</string>
|
||||
</map>
|
||||
<key>SpellDisplay</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Turn on to highlight misspelled text in line edit boxes</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SpellInstalled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>The list of installed dictionaries</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>EN_SL</string>
|
||||
</map>
|
||||
<key>SpellBase</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>The base dictionary to spell check with</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>English (United States of America)</string>
|
||||
</map>
|
||||
|
||||
<key>ScriptsCanShowUI</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allow LSL calls (such as LLMapDestination) to spawn viewer UI</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FloaterObjectBackuptRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for the object backup floater</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>MediaEnableFilter</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable media domain filtering</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MediaFilterRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for Media Filter floater</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>100</integer>
|
||||
<integer>100</integer>
|
||||
<integer>100</integer>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>UseServersideWindlightSettings</key>
|
||||
<map>
|
||||
@@ -1684,6 +1784,17 @@
|
||||
<key>Value</key>
|
||||
<integer>2</integer>
|
||||
</map>
|
||||
<key>AvatarPhysics</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable avatar wearable physics.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AvatarSex</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -8787,6 +8898,17 @@
|
||||
<key>Value</key>
|
||||
<integer>35</integer>
|
||||
</map>
|
||||
<key>RenderAvatarPhysicsLODFactor</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Controls level of detail of avatar physics (such as breast physics).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<integer>1.0</integer>
|
||||
</map>
|
||||
<key>RenderAvatarInvisible</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -10904,7 +11026,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>ShowStartLocation</key>
|
||||
<map>
|
||||
@@ -12955,7 +13077,7 @@
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>VectorizePerfTest</key>
|
||||
<map>
|
||||
|
||||
@@ -663,7 +663,7 @@
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>LogFileNamewithDate</key>
|
||||
<map>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Add Date Stamp to chat and IM Logs with format chat-YYYY-MM-DD and 'IM file name'-YYYY-MM. To view old logs goto ..\Second Life\[login name]</string>
|
||||
<key>Persist</key>
|
||||
@@ -672,6 +672,6 @@
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
@@ -68,17 +68,6 @@
|
||||
<key>Value</key>
|
||||
<real>2.0</real>
|
||||
</map>
|
||||
<key>SHHighResSnapshotForceTile</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Force tiling of snapshots (enables AA and supersampling)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>SHHighResSnapshotSuperSample</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -91,5 +80,93 @@
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
|
||||
</map>
|
||||
<key>SGBlockGeneralSpam</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable automatic general spam blocking</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SGBlockCardSpam</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable automatic calling card spam blocking</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SGBlockChatSpam</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable automatic chat spam blocking</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SGBlockDialogSpam</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable automatic dialog spam blocking</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>SGSpamTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Time of Evalulating spam. (Default: 1.000)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>SGSpamCount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of items spammed per time period in SGSpamTime. (Default: 4)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<real>4</real>
|
||||
</map>
|
||||
<key>SGChatSpamTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Time of Evalulating spam. (Default: 1.000)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>SGChatSpamCount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of items spammed per time set in SGSpamTime. (Default: 10)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<real>10.0</real>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#version 120
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
uniform float glowStrength;
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2DRect RenderTexture;
|
||||
uniform float bloomStrength;
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2DRect RenderTexture;
|
||||
uniform float brightness;
|
||||
uniform float contrast;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2DRect RenderTexture;
|
||||
uniform float extractLow;
|
||||
uniform float extractHigh;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2DRect RenderTexture;
|
||||
uniform int horizontalPass;
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2DRect RenderTexture;
|
||||
uniform sampler2D NoiseTexture;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2DRect RenderTexture;
|
||||
|
||||
void main(void)
|
||||
|
||||
@@ -48,67 +48,11 @@
|
||||
#include "llwind.h"
|
||||
#include "llviewernetwork.h"
|
||||
#include "pipeline.h"
|
||||
|
||||
//System page ------------------------------------------------------------------------------ -HgB
|
||||
class LLPrefsAscentSysImpl : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPrefsAscentSysImpl();
|
||||
/*virtual*/ ~LLPrefsAscentSysImpl() { };
|
||||
|
||||
virtual void refresh();
|
||||
|
||||
void apply();
|
||||
void cancel();
|
||||
|
||||
private:
|
||||
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
|
||||
void refreshValues();
|
||||
//General -----------------------------------------------------------------------------
|
||||
BOOL mDoubleClickTeleport;
|
||||
BOOL mResetCameraAfterTP;
|
||||
BOOL mOffsetTPByUserHeight;
|
||||
BOOL mPreviewAnimInWorld;
|
||||
BOOL mSaveScriptsAsMono;
|
||||
BOOL mAlwaysRezInGroup;
|
||||
//Disable Teleport Progress
|
||||
//Disable Logout progress
|
||||
//always show Build
|
||||
BOOL mAlwaysShowFly;
|
||||
//Disable camera minimum distance
|
||||
BOOL mPowerUser;
|
||||
BOOL mUseSystemFolder;
|
||||
BOOL mUploadToSystem;
|
||||
//Chat/IM -----------------------------------------------------------------------------
|
||||
BOOL mHideNotificationsInChat;
|
||||
BOOL mPlayTypingSound;
|
||||
BOOL mHideTypingNotification;
|
||||
BOOL mEnableMUPose;
|
||||
BOOL mEnableOOCAutoClose;
|
||||
U32 mLinksForChattingObjects;
|
||||
U32 mTimeFormat;
|
||||
U32 mDateFormat;
|
||||
BOOL mSecondsInChatAndIMs;
|
||||
//Performance -------------------------------------------------------------------------
|
||||
BOOL mFetchInventoryOnLogin;
|
||||
BOOL mEnableLLWind;
|
||||
BOOL mEnableClouds;
|
||||
BOOL mEnableClassicClouds;
|
||||
BOOL mSpeedRez;
|
||||
U32 mSpeedRezInterval;
|
||||
//Command Line ------------------------------------------------------------------------
|
||||
//Privacy -----------------------------------------------------------------------------
|
||||
BOOL mBroadcastViewerEffects;
|
||||
BOOL mDisablePointAtAndBeam;
|
||||
BOOL mPrivateLookAt;
|
||||
BOOL mShowLookAt;
|
||||
BOOL mRevokePermsOnStandUp;
|
||||
BOOL mDisableClickSit;
|
||||
};
|
||||
#include "lgghunspell_wrapper.h"
|
||||
|
||||
|
||||
LLPrefsAscentSysImpl::LLPrefsAscentSysImpl()
|
||||
: LLPanel(std::string("Ascent"))
|
||||
|
||||
LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");
|
||||
childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
|
||||
@@ -117,18 +61,28 @@ LLPrefsAscentSysImpl::LLPrefsAscentSysImpl()
|
||||
childSetCommitCallback("show_look_at_check", onCommitCheckBox, this);
|
||||
childSetCommitCallback("enable_clouds", onCommitCheckBox, this);
|
||||
|
||||
childSetCommitCallback("SpellBase", onSpellBaseComboBoxCommit, this);
|
||||
childSetAction("EmSpell_EditCustom", onSpellEditCustom, this);
|
||||
childSetAction("EmSpell_GetMore", onSpellGetMore, this);
|
||||
childSetAction("EmSpell_Add", onSpellAdd, this);
|
||||
childSetAction("EmSpell_Remove", onSpellRemove, this);
|
||||
|
||||
refreshValues();
|
||||
refresh();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
LLPrefsAscentSys::~LLPrefsAscentSys()
|
||||
{
|
||||
LLPrefsAscentSysImpl* self = (LLPrefsAscentSysImpl*)user_data;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
LLPrefsAscentSys* self = (LLPrefsAscentSys*)user_data;
|
||||
|
||||
llinfos << "Change to " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl;
|
||||
|
||||
if (ctrl->getControlName() == "SpeedRez")
|
||||
if (ctrl->getName() == "speed_rez_check") // Why is this one getControlName() and the rest are getName()?
|
||||
{
|
||||
bool enabled = self->childGetValue("speed_rez_check").asBoolean();
|
||||
self->childSetEnabled("speed_rez_interval", enabled);
|
||||
@@ -158,7 +112,51 @@ void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
}
|
||||
}
|
||||
|
||||
void LLPrefsAscentSysImpl::refreshValues()
|
||||
void LLPrefsAscentSys::onSpellAdd(void* data)
|
||||
{
|
||||
LLPrefsAscentSys* self = (LLPrefsAscentSys*)data;
|
||||
|
||||
if(self)
|
||||
{
|
||||
glggHunSpell->addButton(self->childGetValue("EmSpell_Avail").asString());
|
||||
}
|
||||
|
||||
self->refresh();
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::onSpellRemove(void* data)
|
||||
{
|
||||
LLPrefsAscentSys* self = (LLPrefsAscentSys*)data;
|
||||
|
||||
if(self)
|
||||
{
|
||||
glggHunSpell->removeButton(self->childGetValue("EmSpell_Installed").asString());
|
||||
}
|
||||
|
||||
self->refresh();
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::onSpellGetMore(void* data)
|
||||
{
|
||||
glggHunSpell->getMoreButton(data);
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::onSpellEditCustom(void* data)
|
||||
{
|
||||
glggHunSpell->editCustomButton();
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLComboBox* box = (LLComboBox*)ctrl;
|
||||
|
||||
if (box)
|
||||
{
|
||||
glggHunSpell->newDictSelection(box->getValue().asString());
|
||||
}
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::refreshValues()
|
||||
{
|
||||
//General -----------------------------------------------------------------------------
|
||||
mDoubleClickTeleport = gSavedSettings.getBOOL("DoubleClickTeleport");
|
||||
@@ -204,9 +202,11 @@ void LLPrefsAscentSysImpl::refreshValues()
|
||||
mShowLookAt = LLHUDEffectLookAt::sDebugLookAt;
|
||||
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
|
||||
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
|
||||
//Text Options ------------------------------------------------------------------------
|
||||
mSpellDisplay = gSavedSettings.getBOOL("SpellDisplay");
|
||||
}
|
||||
|
||||
void LLPrefsAscentSysImpl::refresh()
|
||||
void LLPrefsAscentSys::refresh()
|
||||
{
|
||||
//General -----------------------------------------------------------------------------
|
||||
childSetValue("double_click_teleport_check", mDoubleClickTeleport);
|
||||
@@ -309,9 +309,59 @@ void LLPrefsAscentSysImpl::refresh()
|
||||
childSetValue("show_look_at_check", mShowLookAt);
|
||||
childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp);
|
||||
childSetValue("disable_click_sit_check", mDisableClickSit);
|
||||
|
||||
//Text Options ------------------------------------------------------------------------
|
||||
combo = getChild<LLComboBox>("SpellBase");
|
||||
|
||||
if (combo != NULL)
|
||||
{
|
||||
combo->removeall();
|
||||
std::vector<std::string> names = glggHunSpell->getDicts();
|
||||
|
||||
for (int i = 0; i < (int)names.size(); i++)
|
||||
{
|
||||
combo->add(names[i]);
|
||||
}
|
||||
|
||||
combo->setSimple(gSavedSettings.getString("SpellBase"));
|
||||
}
|
||||
|
||||
combo = getChild<LLComboBox>("EmSpell_Avail");
|
||||
|
||||
if (combo != NULL)
|
||||
{
|
||||
combo->removeall();
|
||||
|
||||
combo->add("");
|
||||
std::vector<std::string> names = glggHunSpell->getAvailDicts();
|
||||
|
||||
for (int i = 0; i < (int)names.size(); i++)
|
||||
{
|
||||
combo->add(names[i]);
|
||||
}
|
||||
|
||||
combo->setSimple(std::string(""));
|
||||
}
|
||||
|
||||
combo = getChild<LLComboBox>("EmSpell_Installed");
|
||||
|
||||
if (combo != NULL)
|
||||
{
|
||||
combo->removeall();
|
||||
|
||||
combo->add("");
|
||||
std::vector<std::string> names = glggHunSpell->getInstalledDicts();
|
||||
|
||||
for (int i = 0; i < (int)names.size(); i++)
|
||||
{
|
||||
combo->add(names[i]);
|
||||
}
|
||||
|
||||
combo->setSimple(std::string(""));
|
||||
}
|
||||
}
|
||||
|
||||
void LLPrefsAscentSysImpl::cancel()
|
||||
void LLPrefsAscentSys::cancel()
|
||||
{
|
||||
//General -----------------------------------------------------------------------------
|
||||
childSetValue("double_click_teleport_check", mDoubleClickTeleport);
|
||||
@@ -359,9 +409,12 @@ void LLPrefsAscentSysImpl::cancel()
|
||||
childSetValue("enable_classic_clouds", mEnableClassicClouds);
|
||||
|
||||
gLLWindEnabled = mEnableLLWind;
|
||||
|
||||
//Text Options ------------------------------------------------------------------------
|
||||
childSetValue("SpellDisplay", mSpellDisplay);
|
||||
}
|
||||
|
||||
void LLPrefsAscentSysImpl::apply()
|
||||
void LLPrefsAscentSys::apply()
|
||||
{
|
||||
std::string short_date, long_date, short_time, long_time, timestamp;
|
||||
|
||||
@@ -394,7 +447,7 @@ void LLPrefsAscentSysImpl::apply()
|
||||
//Missing the echo/log option.
|
||||
gSavedSettings.setBOOL("PlayTypingSound", childGetValue("play_typing_sound_check"));
|
||||
gSavedSettings.setBOOL("AscentHideTypingNotification", childGetValue("hide_typing_check"));
|
||||
gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean());
|
||||
gSavedPerAccountSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean());
|
||||
gSavedSettings.setBOOL("AscentAllowMUpose", childGetValue("allow_mu_pose_check").asBoolean());
|
||||
gSavedSettings.setBOOL("AscentAutoCloseOOC", childGetValue("close_ooc_check").asBoolean());
|
||||
//gSavedSettings.setU32("LinksForChattingObjects", childGetValue("objects_link"). );
|
||||
@@ -500,30 +553,3 @@ void LLPrefsAscentSysImpl::apply()
|
||||
refreshValues();
|
||||
refresh();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
: impl(* new LLPrefsAscentSysImpl())
|
||||
{
|
||||
}
|
||||
|
||||
LLPrefsAscentSys::~LLPrefsAscentSys()
|
||||
{
|
||||
delete &impl;
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::apply()
|
||||
{
|
||||
impl.apply();
|
||||
}
|
||||
|
||||
void LLPrefsAscentSys::cancel()
|
||||
{
|
||||
impl.cancel();
|
||||
}
|
||||
|
||||
LLPanel* LLPrefsAscentSys::getPanel()
|
||||
{
|
||||
return &impl;
|
||||
}
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
#ifndef ASCENTPREFSSYS_H
|
||||
#define ASCENTPREFSSYS_H
|
||||
|
||||
class LLPanel;
|
||||
class LLPrefsAscentSysImpl;
|
||||
|
||||
class LLPrefsAscentSys
|
||||
#include "llpanel.h"
|
||||
|
||||
|
||||
class LLPrefsAscentSys : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPrefsAscentSys();
|
||||
@@ -43,11 +44,60 @@ public:
|
||||
|
||||
void apply();
|
||||
void cancel();
|
||||
void refresh();
|
||||
|
||||
LLPanel* getPanel();
|
||||
|
||||
protected:
|
||||
LLPrefsAscentSysImpl& impl;
|
||||
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
|
||||
static void onSpellAdd(void* data);
|
||||
static void onSpellRemove(void* data);
|
||||
static void onSpellGetMore(void* data);
|
||||
static void onSpellEditCustom(void* data);
|
||||
static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata);
|
||||
void refreshValues();
|
||||
//General -----------------------------------------------------------------------------
|
||||
BOOL mDoubleClickTeleport;
|
||||
BOOL mResetCameraAfterTP;
|
||||
BOOL mOffsetTPByUserHeight;
|
||||
BOOL mPreviewAnimInWorld;
|
||||
BOOL mSaveScriptsAsMono;
|
||||
BOOL mAlwaysRezInGroup;
|
||||
//Disable Teleport Progress
|
||||
//Disable Logout progress
|
||||
//always show Build
|
||||
BOOL mAlwaysShowFly;
|
||||
//Disable camera minimum distance
|
||||
BOOL mPowerUser;
|
||||
BOOL mUseSystemFolder;
|
||||
BOOL mUploadToSystem;
|
||||
//Chat/IM -----------------------------------------------------------------------------
|
||||
BOOL mHideNotificationsInChat;
|
||||
BOOL mPlayTypingSound;
|
||||
BOOL mHideTypingNotification;
|
||||
BOOL mEnableMUPose;
|
||||
BOOL mEnableOOCAutoClose;
|
||||
U32 mLinksForChattingObjects;
|
||||
U32 mTimeFormat;
|
||||
U32 mDateFormat;
|
||||
BOOL mSecondsInChatAndIMs;
|
||||
//Performance -------------------------------------------------------------------------
|
||||
BOOL mFetchInventoryOnLogin;
|
||||
BOOL mEnableLLWind;
|
||||
BOOL mEnableClouds;
|
||||
BOOL mEnableClassicClouds;
|
||||
BOOL mSpeedRez;
|
||||
U32 mSpeedRezInterval;
|
||||
//Command Line ------------------------------------------------------------------------
|
||||
//Privacy -----------------------------------------------------------------------------
|
||||
BOOL mBroadcastViewerEffects;
|
||||
BOOL mDisablePointAtAndBeam;
|
||||
BOOL mPrivateLookAt;
|
||||
BOOL mShowLookAt;
|
||||
BOOL mRevokePermsOnStandUp;
|
||||
BOOL mDisableClickSit;
|
||||
//Text Options ------------------------------------------------------------------------
|
||||
BOOL mSpellDisplay;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,366 +0,0 @@
|
||||
/**
|
||||
* @file ascentuploadbrowser.h
|
||||
* @Author Duncan Garrett (Hg Beeks)
|
||||
* Meant as a replacement to using a system file browser for uploads.
|
||||
*
|
||||
* Created August 27 2010
|
||||
*
|
||||
* ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* k ilu bye
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "ascentuploadbrowser.h"
|
||||
|
||||
//UI Elements
|
||||
#include "llbutton.h" //Buttons
|
||||
#include "llcombobox.h" //Combo dropdowns
|
||||
#include "llscrolllistctrl.h" //List box for filenames
|
||||
#include "lluictrlfactory.h" //Loads the XUI
|
||||
|
||||
// project includes
|
||||
#include "llresmgr.h"
|
||||
#include "llsdserialize.h" //XML Parsing - Probably not needed
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function declarations, constants, enums, and typedefs
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLSD ASFloaterUploadBrowser::mUploaderSettings;
|
||||
ASFloaterUploadBrowser* ASFloaterUploadBrowser::sInstance = NULL;
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class ASFloaterUploadBrowser
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// Default constructor
|
||||
ASFloaterUploadBrowser::ASFloaterUploadBrowser()
|
||||
: LLFloater(std::string("floater_upload_browser"),
|
||||
std::string("FloaterUploadRect"),
|
||||
LLStringUtil::null)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_upload_browser.xml");
|
||||
|
||||
mUploaderSettings.clear();
|
||||
mUploaderSettings = gSavedSettings.getLLSD("AscentUploadSettings");
|
||||
|
||||
mPathName = mUploaderSettings["ActivePath"].asString();
|
||||
if (mPathName == "None")
|
||||
mPathName = gDirUtilp->getExecutableDir();
|
||||
mFilterType = "None";
|
||||
|
||||
|
||||
//File list ------------------------------------------------------
|
||||
mFileList = getChild<LLScrollListCtrl>("file_list");
|
||||
childSetCommitCallback("file_list", onClickFile, this);
|
||||
childSetDoubleClickCallback("file_list", onDoubleClick);
|
||||
|
||||
//Above File List ------------------------------------------------
|
||||
|
||||
mBookmarkCombo = getChild<LLComboBox>("bookmark_combo");
|
||||
S32 index;
|
||||
for (index = 0; index < mUploaderSettings["Bookmarks"].size(); index++)
|
||||
{
|
||||
std::string bookmark = mUploaderSettings["Bookmarks"][index].asString();
|
||||
if (bookmark != "")
|
||||
mBookmarkCombo->add(bookmark, ADD_BOTTOM);
|
||||
}
|
||||
|
||||
mDriveCombo = getChild<LLComboBox>("drive_combo");
|
||||
childSetCommitCallback("drive_combo", onChangeDrives, this);
|
||||
//This is so unbelievably shitty I can't handle it -HgB
|
||||
std::string drive_letters[] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; //Oh my god it's somehow worse now -HgB
|
||||
|
||||
mDriveCombo->removeall();
|
||||
for (index = 0; index < 26; index++)
|
||||
{
|
||||
std::string dir = drive_letters[index] + ":";
|
||||
S32 file_count = gDirUtilp->countFilesInDir(dir + gDirUtilp->getDirDelimiter(), "*.*");
|
||||
if(file_count)
|
||||
{
|
||||
mDriveCombo->add(dir, ADD_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
childSetAction("directory_button", onClickFilepathGoto, this);
|
||||
childSetCommitCallback("dir_path", onDirCommit, (void*)this);
|
||||
//Below File List ------------------------------------------------
|
||||
childSetCommitCallback("file_filter_combo", onUpdateFilter, this);
|
||||
|
||||
|
||||
refresh();
|
||||
mFileList->sortByColumn(std::string("file_name"), TRUE);
|
||||
mFileList->sortByColumn(std::string("file_type"), TRUE);
|
||||
childHide("multiple_uploads_label");
|
||||
childHide("bad_image_text");
|
||||
}
|
||||
|
||||
// Destroys the object
|
||||
ASFloaterUploadBrowser::~ASFloaterUploadBrowser()
|
||||
{
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onDirCommit(LLUICtrl* ctrl, void* data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
|
||||
if (panelp)
|
||||
{
|
||||
panelp->onClickFilepathGoto(data);
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::updateBrowser(void* data, std::string new_path)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
|
||||
if ((new_path != panelp->mPathName)||(new_path == ""))
|
||||
{
|
||||
panelp->mPathName = new_path;
|
||||
panelp->refresh();
|
||||
panelp->mFileList->selectFirstItem();
|
||||
panelp->childSetValue("asset_name", "");
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void ASFloaterUploadBrowser::onClickFilepathGoto(void* data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
|
||||
std::string new_path = panelp->childGetValue("dir_path");
|
||||
panelp->updateBrowser(data, new_path);
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onClickFile(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
panelp->refreshUploadOptions();
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onChangeDrives(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
if (panelp->mDriveCombo->getSelectedValue().asString() != panelp->mFilterType)
|
||||
{
|
||||
panelp->updateBrowser(user_data, panelp->mDriveCombo->getSelectedValue().asString());
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onUpdateFilter(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
LLComboBox* combo = panelp->getChild<LLComboBox>("file_filter_combo");
|
||||
if (combo->getSelectedValue().asString() != panelp->mFilterType)
|
||||
{
|
||||
panelp->mFilterType = "";
|
||||
panelp->mFilterType = combo->getSelectedValue().asString();
|
||||
panelp->updateBrowser(user_data, "");
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::refreshUploadOptions()
|
||||
{
|
||||
if (!mFileList->isEmpty())
|
||||
{
|
||||
if(!mFileList->getSelectedIDs().count())
|
||||
{
|
||||
llinfos << "No selection, clearing field." << llendl;
|
||||
childSetValue("asset_name", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_FILE)
|
||||
{
|
||||
std::string name;
|
||||
bool show_tex = false;
|
||||
bool show_snd = false;
|
||||
bool show_anm = false;
|
||||
bool show_multiple = false;
|
||||
if (mFileList->getAllSelected().size() > 1)
|
||||
{
|
||||
|
||||
llinfos << "Selected multiple files." << llendl;
|
||||
name = "(Multiple)";
|
||||
show_multiple = true;
|
||||
/*LLButton* expand_button = getChild<LLButton>("expand_collapse_btn");
|
||||
expand_button->setLabelArg("[COST]", std::string(mFileList->getAllSelected().size() * 10));*/
|
||||
childSetValue("multiple_uploads_label", "Multiple files selected. Total cost is: " + llformat("%d", mFileList->getAllSelected().size() * 10));
|
||||
}
|
||||
else
|
||||
{
|
||||
int type = mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger();
|
||||
llinfos << "Selected a file, type" << type << llendl;
|
||||
if (type == FILE_TEXTURE)
|
||||
{
|
||||
show_tex = true;
|
||||
}
|
||||
else if (type == FILE_SOUND)
|
||||
{
|
||||
show_snd = true;
|
||||
}
|
||||
else if (type == FILE_ANIMATION)
|
||||
{
|
||||
show_anm = true;
|
||||
}
|
||||
name = mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
|
||||
|
||||
}
|
||||
childSetVisible("texture_preview_label", (show_tex && !show_multiple));
|
||||
childSetVisible("texture_preview_combo", (show_tex && !show_multiple));
|
||||
childSetVisible("multiple_uploads_label", show_multiple);
|
||||
childSetValue("asset_name", name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onDoubleClick(void* user_data)
|
||||
{
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
panelp->handleDoubleClick();
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::handleDoubleClick()
|
||||
{
|
||||
if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_PARENT)
|
||||
{
|
||||
S32 dirLimiterIndex = mPathName.find_last_of(gDirUtilp->getDirDelimiter());
|
||||
mPathName = mPathName.substr(0, dirLimiterIndex);
|
||||
refresh();
|
||||
mFileList->selectFirstItem();
|
||||
}
|
||||
else if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_FOLDER)
|
||||
{
|
||||
//Make sure that it's an actual folder so you don't get stuck - Specifically meant for files with no extension. -HgB
|
||||
std::string new_path = mPathName + gDirUtilp->getDirDelimiter() + mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
|
||||
S32 file_count = gDirUtilp->countFilesInDir(new_path, "*.*");
|
||||
if(!file_count)
|
||||
return;
|
||||
mPathName = mPathName + gDirUtilp->getDirDelimiter() + mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
|
||||
refresh();
|
||||
mFileList->selectFirstItem();
|
||||
|
||||
}
|
||||
childSetValue("asset_name", "");
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::refresh()
|
||||
{
|
||||
std::string filename;
|
||||
std::string fullPath = mPathName + gDirUtilp->getDirDelimiter();
|
||||
mFileList->deselectAllItems();
|
||||
mFileList->deleteAllItems();
|
||||
childSetValue("dir_path", gDirUtilp->getDirName(fullPath));
|
||||
mUploaderSettings["ActivePath"] = mPathName;
|
||||
gSavedSettings.setLLSD("AscentUploadSettings", mUploaderSettings);
|
||||
gDirUtilp->getNextFileInDir(gDirUtilp->getChatLogsDir(),"*", filename, false); //Clears the last file
|
||||
bool found = true;
|
||||
S32 file_count = 0;
|
||||
while(found)
|
||||
{
|
||||
found = gDirUtilp->getNextFileInDir(fullPath, "*.*", filename, false);
|
||||
if(found)
|
||||
{
|
||||
S32 periodIndex = filename.find_last_of(".");
|
||||
std::string extension = filename.substr(periodIndex + 1, filename.length() - 1);
|
||||
std::string extensionL = utf8str_tolower(extension);
|
||||
LLSD element;
|
||||
element["path"] = mPathName + filename;
|
||||
|
||||
LLSD& filename_column = element["columns"][LIST_FILE_NAME];
|
||||
filename_column["column"] = "file_name";
|
||||
filename_column["font"] = "SANSSERIF";
|
||||
filename_column["font-style"] = "NORMAL";
|
||||
|
||||
LLSD& filetype_column = element["columns"][LIST_FILE_TYPE];
|
||||
filetype_column["column"] = "file_type";
|
||||
filetype_column["type"] = "number";
|
||||
|
||||
LLSD& assettype_column = element["columns"][LIST_ASSET_TYPE];
|
||||
assettype_column["column"] = "asset_type";
|
||||
assettype_column["type"] = "number";
|
||||
|
||||
LLSD& invtype_column = element["columns"][LIST_INVENTORY_TYPE];
|
||||
invtype_column["column"] = "icon_inventory_type";
|
||||
invtype_column["type"] = "icon";
|
||||
invtype_column["value"] = "inv_folder_trash.tga";
|
||||
|
||||
|
||||
if (((extensionL == "jpeg")||(extensionL == "jpg")||(extensionL == "tga")
|
||||
||(extensionL == "png")||(extensionL == "bmp"))&&((mFilterType == "None")||(mFilterType == "Texture")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_texture.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = FILE_TEXTURE;
|
||||
assettype_column["value"] = LIST_TYPE_FILE;
|
||||
|
||||
}
|
||||
else if ((extensionL == "wav")&&((mFilterType == "None")||(mFilterType == "Sound")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_sound.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = FILE_SOUND;
|
||||
assettype_column["value"] = LIST_TYPE_FILE;
|
||||
}
|
||||
else if (((extensionL == "bvh")||(extensionL == "anim"))&&((mFilterType == "None")||(mFilterType == "Animation")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_animation.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = FILE_ANIMATION;
|
||||
assettype_column["value"] = LIST_TYPE_FILE;
|
||||
}
|
||||
else if ((extension == filename.substr(0, filename.length() - 1))&&(filename != "."))
|
||||
{
|
||||
std::string test_path = mPathName + gDirUtilp->getDirDelimiter() + filename + gDirUtilp->getDirDelimiter();
|
||||
S32 file_count = gDirUtilp->countFilesInDir(test_path, "*.*");
|
||||
if(file_count)
|
||||
{
|
||||
invtype_column["value"] = "inv_folder_plain_closed.tga";
|
||||
filename_column["value"] = filename;
|
||||
filetype_column["value"] = FOLDER;
|
||||
assettype_column["value"] = LIST_TYPE_FOLDER;
|
||||
}
|
||||
}
|
||||
else if (filename == "..")
|
||||
{
|
||||
invtype_column["value"] = "inv_folder_plain_open.tga";
|
||||
filename_column["value"] = filename;
|
||||
filetype_column["value"] = FOLDER;
|
||||
assettype_column["value"] = LIST_TYPE_PARENT;
|
||||
}
|
||||
if (invtype_column["value"].asString() != "inv_folder_trash.tga")
|
||||
{
|
||||
mFileList->addElement(element, ADD_BOTTOM);
|
||||
if (assettype_column["value"].asInteger() == LIST_TYPE_FILE)
|
||||
{
|
||||
file_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string result;
|
||||
LLResMgr::getInstance()->getIntegerString(result, file_count);
|
||||
if (result == "")
|
||||
result = "0";
|
||||
childSetTextArg("result_label", "[COUNT]", result);
|
||||
|
||||
mFileList->sortItems();
|
||||
llinfos << "Total files loaded: " << result << "." << llendl;
|
||||
}
|
||||
|
||||
// static
|
||||
void ASFloaterUploadBrowser::show(void*)
|
||||
{
|
||||
if (!sInstance)
|
||||
{
|
||||
sInstance = new ASFloaterUploadBrowser();
|
||||
}
|
||||
|
||||
sInstance->open(); /*Flawfinder: ignore*/
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/**
|
||||
* @file ascentuploadbrowser.h
|
||||
* @Author Duncan Garrett
|
||||
* Meant as a replacement to using Windows' file browser for uploads.
|
||||
*
|
||||
* Created August 27 2010
|
||||
*
|
||||
* ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* k ilu bye
|
||||
*/
|
||||
|
||||
#ifndef ASCENT_UPLOAD_BROWSER
|
||||
#define ASCENT_UPLOAD_BROWSER
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llcombobox.h"
|
||||
|
||||
class LLScrollListCtrl;
|
||||
|
||||
class ASFloaterUploadBrowser : public LLFloater
|
||||
{
|
||||
public:
|
||||
using LLFloater::handleDoubleClick;
|
||||
|
||||
ASFloaterUploadBrowser();
|
||||
virtual ~ASFloaterUploadBrowser();
|
||||
//File list
|
||||
static void onClickFile(LLUICtrl* ctrl, void* user_data);
|
||||
static void onUpdateFilter(LLUICtrl* ctrl, void* user_data);
|
||||
static void onDoubleClick(void* user_data);
|
||||
static void onDirCommit (LLUICtrl* ctrl, void* data);
|
||||
static void onChangeDrives(LLUICtrl* ctrl, void* user_data);
|
||||
static void onClickFilepathGoto(void* data);
|
||||
|
||||
void updateBrowser(void* data, std::string new_path);
|
||||
void refresh();
|
||||
void refreshUploadOptions();
|
||||
void handleDoubleClick();
|
||||
static void show(void*);
|
||||
|
||||
std::vector<LLSD> datas;
|
||||
|
||||
private:
|
||||
static LLSD mUploaderSettings;
|
||||
static ASFloaterUploadBrowser* sInstance;
|
||||
enum FILE_COLUMN_ORDER
|
||||
{
|
||||
LIST_FILE_TYPE,
|
||||
LIST_ASSET_TYPE,
|
||||
LIST_INVENTORY_TYPE,
|
||||
LIST_FILE_NAME,
|
||||
LIST_DATA
|
||||
};
|
||||
enum FILE_TYPE_ORDER
|
||||
{
|
||||
LIST_TYPE_PARENT,
|
||||
LIST_TYPE_FOLDER,
|
||||
LIST_TYPE_FILE
|
||||
};
|
||||
enum FILE_TYPE
|
||||
{
|
||||
FOLDER,
|
||||
FILE_TEXTURE,
|
||||
FILE_SOUND,
|
||||
FILE_ANIMATION
|
||||
};
|
||||
LLScrollListCtrl* mFileList;
|
||||
LLComboBox* mDriveCombo;
|
||||
LLComboBox* mBookmarkCombo;
|
||||
|
||||
std::string mPathName;
|
||||
std::string mFilterType;
|
||||
};
|
||||
|
||||
|
||||
#endif // ASCENT_UPLOAD_BROWSER
|
||||
@@ -2923,6 +2923,8 @@
|
||||
id="40"
|
||||
group="1"
|
||||
name="Male_Head"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
@@ -3508,6 +3510,8 @@
|
||||
id="104"
|
||||
group="1"
|
||||
name="Big_Belly_Torso"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_morph>
|
||||
@@ -3824,6 +3828,8 @@
|
||||
id="855"
|
||||
group="1"
|
||||
name="Love_Handles"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-1"
|
||||
value_max="2">
|
||||
@@ -3879,6 +3885,8 @@
|
||||
id="100"
|
||||
group="1"
|
||||
name="Male_Torso"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
label_min="Male_Torso"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
@@ -4047,9 +4055,66 @@
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<!--
|
||||
#end morph targets
|
||||
-->
|
||||
<!--
|
||||
#############
|
||||
# physics morphs (not user controlled)
|
||||
#############
|
||||
-->
|
||||
<param
|
||||
id="1200"
|
||||
group="1"
|
||||
sex="female"
|
||||
name="Breast_Physics_UpDown_Driven"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-3"
|
||||
value_max="3">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1201"
|
||||
group="1"
|
||||
sex="female"
|
||||
name="Breast_Physics_InOut_Driven"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-1.25"
|
||||
value_max="1.25">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1204"
|
||||
group="1"
|
||||
name="Belly_Physics_Torso_UpDown_Driven"
|
||||
wearable="physics"
|
||||
cross_wearable="true"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1207"
|
||||
group="1"
|
||||
name="Breast_Physics_LeftRight_Driven"
|
||||
wearable="physics"
|
||||
cross_wearable="true"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-2"
|
||||
value_max="2">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<!--
|
||||
#end morph targets
|
||||
-->
|
||||
</mesh>
|
||||
|
||||
<mesh
|
||||
@@ -4103,11 +4168,14 @@
|
||||
id="156"
|
||||
group="1"
|
||||
name="Big_Belly_Legs"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
|
||||
<param
|
||||
id="151"
|
||||
group="1"
|
||||
@@ -4499,6 +4567,8 @@
|
||||
id="854"
|
||||
group="1"
|
||||
name="Saddlebags"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_min="-.5"
|
||||
value_max="3">
|
||||
<param_morph>
|
||||
@@ -4537,15 +4607,62 @@
|
||||
id="153"
|
||||
group="1"
|
||||
name="Male_Legs"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<!--
|
||||
#end morph targets
|
||||
-->
|
||||
</mesh>
|
||||
<!--
|
||||
#############
|
||||
# physics morphs (not user controlled)
|
||||
#############
|
||||
-->
|
||||
<param
|
||||
id="1202"
|
||||
group="1"
|
||||
name="Belly_Physics_Legs_UpDown_Driven"
|
||||
wearable="physics"
|
||||
cross_wearable="true"
|
||||
edit_group="driven"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
|
||||
<param
|
||||
id="1205"
|
||||
group="1"
|
||||
name="Butt_Physics_UpDown_Driven"
|
||||
wearable="physics"
|
||||
cross_wearable="true"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1206"
|
||||
group="1"
|
||||
name="Butt_Physics_LeftRight_Driven"
|
||||
wearable="physics"
|
||||
cross_wearable="true"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<!--
|
||||
#end morph targets
|
||||
-->
|
||||
|
||||
</mesh>
|
||||
|
||||
<mesh
|
||||
type="lowerBodyMesh"
|
||||
@@ -4818,6 +4935,7 @@
|
||||
name="skirt_bowlegs"
|
||||
label="legs skirt"
|
||||
wearable="skirt"
|
||||
edit_group="driven"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0">
|
||||
@@ -4828,6 +4946,8 @@
|
||||
id="852"
|
||||
group="1"
|
||||
name="skirt_bigbutt"
|
||||
wearable="skirt"
|
||||
edit_group="driven"
|
||||
label="bigbutt skirt"
|
||||
label_min="less"
|
||||
label_max="more"
|
||||
@@ -4840,6 +4960,8 @@
|
||||
id="849"
|
||||
group="1"
|
||||
name="skirt_belly"
|
||||
wearable="skirt"
|
||||
edit_group="driven"
|
||||
label="big belly skirt"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
@@ -4849,6 +4971,8 @@
|
||||
<param
|
||||
id="850"
|
||||
group="1"
|
||||
wearable="skirt"
|
||||
edit_group="driven"
|
||||
name="skirt_saddlebags"
|
||||
value_min="-.5"
|
||||
value_max="3">
|
||||
@@ -4859,6 +4983,8 @@
|
||||
id="851"
|
||||
group="1"
|
||||
name="skirt_chubby"
|
||||
wearable="skirt"
|
||||
edit_group="driven"
|
||||
label_min="less"
|
||||
label_max="more"
|
||||
value_min="0"
|
||||
@@ -4871,6 +4997,8 @@
|
||||
id="856"
|
||||
group="1"
|
||||
name="skirt_lovehandles"
|
||||
wearable="skirt"
|
||||
edit_group="driven"
|
||||
label_min="less"
|
||||
label_max="more"
|
||||
value_min="-1"
|
||||
@@ -4888,11 +5016,32 @@
|
||||
id="857"
|
||||
group="1"
|
||||
name="skirt_male"
|
||||
wearable="skirt"
|
||||
edit_group="driven"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
</mesh>
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
<!--
|
||||
#############
|
||||
# physics morphs (not user controlled)
|
||||
#############
|
||||
-->
|
||||
<param
|
||||
id="1203"
|
||||
group="1"
|
||||
name="Belly_Physics_Skirt_UpDown_Driven"
|
||||
wearable="physics"
|
||||
cross_wearable="true"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
||||
</mesh>
|
||||
|
||||
<mesh
|
||||
type="skirtMesh"
|
||||
@@ -5564,6 +5713,7 @@
|
||||
<param
|
||||
id="1003"
|
||||
group="1"
|
||||
wearable="hair"
|
||||
edit_group="driven"
|
||||
name="Eyebrow Density"
|
||||
value_min="0"
|
||||
@@ -6212,6 +6362,7 @@
|
||||
id="1005"
|
||||
sex="male"
|
||||
group="1"
|
||||
wearable="hair"
|
||||
edit_group="driven"
|
||||
name="Sideburns"
|
||||
value_min="0"
|
||||
@@ -6226,6 +6377,7 @@
|
||||
id="1007"
|
||||
sex="male"
|
||||
group="1"
|
||||
wearable="hair"
|
||||
edit_group="driven"
|
||||
name="Moustache"
|
||||
value_min="0"
|
||||
@@ -6240,6 +6392,7 @@
|
||||
id="1009"
|
||||
sex="male"
|
||||
group="1"
|
||||
wearable="hair"
|
||||
edit_group="driven"
|
||||
name="Soulpatch"
|
||||
value_min="0"
|
||||
@@ -6254,6 +6407,7 @@
|
||||
id="1011"
|
||||
sex="male"
|
||||
group="1"
|
||||
wearable="hair"
|
||||
edit_group="driven"
|
||||
name="Chin Curtains"
|
||||
value_min="0"
|
||||
@@ -9050,7 +9204,7 @@
|
||||
wearable="skin"
|
||||
edit_group="skin_facedetail"
|
||||
edit_group_order="3"
|
||||
name="wrinkles"
|
||||
name="Wrinkles"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_min="0"
|
||||
@@ -11150,6 +11304,523 @@
|
||||
</param_driver>
|
||||
</param>
|
||||
|
||||
<!-- ==PHYSICS PARAMETERS======================================= -->
|
||||
|
||||
<param
|
||||
id="1100"
|
||||
group="1"
|
||||
sex="female"
|
||||
wearable="physics"
|
||||
name="Breast_Physics_UpDown_Controller"
|
||||
label="Breast Physics UpDown Controller"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1200" />
|
||||
</param_driver>
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1101"
|
||||
group="1"
|
||||
sex="female"
|
||||
wearable="physics"
|
||||
name="Breast_Physics_InOut_Controller"
|
||||
label="Breast Physics InOut Controller"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1201" />
|
||||
</param_driver>
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1102"
|
||||
group="1"
|
||||
wearable="physics"
|
||||
name="Belly_Physics_UpDown_Controller"
|
||||
label="Belly Physics UpDown Controller"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1202" />
|
||||
<driven
|
||||
id="1203" />
|
||||
<driven
|
||||
id="1204" />
|
||||
</param_driver>
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1103"
|
||||
group="1"
|
||||
wearable="shape"
|
||||
name="Butt_Physics_UpDown_Controller"
|
||||
label="Butt Physics UpDown Controller"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1205" />
|
||||
</param_driver>
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1104"
|
||||
group="1"
|
||||
wearable="shape"
|
||||
name="Butt_Physics_LeftRight_Controller"
|
||||
label="Butt Physics LeftRight Controller"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1206" />
|
||||
</param_driver>
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="1105"
|
||||
group="1"
|
||||
wearable="shape"
|
||||
name="Breast_Physics_LeftRight_Controller"
|
||||
label="Breast Physics LeftRight Controller"
|
||||
value_min="-1"
|
||||
value_max="1"
|
||||
value_default="0">
|
||||
<param_driver>
|
||||
<driven
|
||||
id="1207" />
|
||||
</param_driver>
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10000"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_Mass"
|
||||
label="Breast Mass"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default=".1"
|
||||
value_min=".1"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10001"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_Gravity"
|
||||
label="Breast Gravity"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="30">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10002"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_Drag"
|
||||
label="Breast Drag"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default="1"
|
||||
value_min="0"
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10003"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_UpDown_Max_Effect"
|
||||
label="Max Effect"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_updown"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="3">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10004"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_UpDown_Spring"
|
||||
label="Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_updown"
|
||||
value_default="10"
|
||||
value_min="0"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10005"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_UpDown_Gain"
|
||||
label="Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_updown"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10006"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_UpDown_Damping"
|
||||
label="Damping"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_updown"
|
||||
value_default=".2"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10007"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_InOut_Max_Effect"
|
||||
label="Max Effect"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_inout"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="3">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10008"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_InOut_Spring"
|
||||
label="Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_inout"
|
||||
value_default="10"
|
||||
value_min="0"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10009"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_InOut_Gain"
|
||||
label="Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_inout"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10010"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_InOut_Damping"
|
||||
label="Damping"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_inout"
|
||||
value_default=".2"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10011"
|
||||
group="0"
|
||||
name="Belly_Physics_Mass"
|
||||
label="Belly Mass"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default=".1"
|
||||
value_min=".1"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10012"
|
||||
group="0"
|
||||
name="Belly_Physics_Gravity"
|
||||
label="Belly Gravity"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="30">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10013"
|
||||
group="0"
|
||||
name="Belly_Physics_Drag"
|
||||
label="Belly Drag"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default="1"
|
||||
value_min="0"
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10014"
|
||||
group="0"
|
||||
name="Belly_Physics_UpDown_Max_Effect"
|
||||
label="Max Effect"
|
||||
wearable="physics"
|
||||
edit_group="physics_belly_updown"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="3">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10015"
|
||||
group="0"
|
||||
name="Belly_Physics_UpDown_Spring"
|
||||
label="Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics_belly_updown"
|
||||
value_default="10"
|
||||
value_min="0"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10016"
|
||||
group="0"
|
||||
name="Belly_Physics_UpDown_Gain"
|
||||
label="Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics_belly_updown"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10017"
|
||||
group="0"
|
||||
name="Belly_Physics_UpDown_Damping"
|
||||
label="Damping"
|
||||
wearable="physics"
|
||||
edit_group="physics_belly_updown"
|
||||
value_default=".2"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10018"
|
||||
group="0"
|
||||
name="Butt_Physics_Mass"
|
||||
label="Butt Mass"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default=".1"
|
||||
value_min=".1"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10019"
|
||||
group="0"
|
||||
name="Butt_Physics_Gravity"
|
||||
label="Butt Gravity"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="30">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10020"
|
||||
group="0"
|
||||
name="Butt_Physics_Drag"
|
||||
label="Butt Drag"
|
||||
wearable="physics"
|
||||
edit_group="physics_advanced"
|
||||
value_default="1"
|
||||
value_min="0"
|
||||
value_max="10">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10021"
|
||||
group="0"
|
||||
name="Butt_Physics_UpDown_Max_Effect"
|
||||
label="Max Effect"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_updown"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="3">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10022"
|
||||
group="0"
|
||||
name="Butt_Physics_UpDown_Spring"
|
||||
label="Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_updown"
|
||||
value_default="10"
|
||||
value_min="0"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10023"
|
||||
group="0"
|
||||
name="Butt_Physics_UpDown_Gain"
|
||||
label="Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_updown"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10024"
|
||||
group="0"
|
||||
name="Butt_Physics_UpDown_Damping"
|
||||
label="Damping"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_updown"
|
||||
value_default=".2"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10025"
|
||||
group="0"
|
||||
name="Butt_Physics_LeftRight_Max_Effect"
|
||||
label="Max Effect"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_leftright"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="3">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10026"
|
||||
group="0"
|
||||
name="Butt_Physics_LeftRight_Spring"
|
||||
label="Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_leftright"
|
||||
value_default="10"
|
||||
value_min="0"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10027"
|
||||
group="0"
|
||||
name="Butt_Physics_LeftRight_Gain"
|
||||
label="Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_leftright"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10028"
|
||||
group="0"
|
||||
name="Butt_Physics_LeftRight_Damping"
|
||||
label="Damping"
|
||||
wearable="physics"
|
||||
edit_group="physics_butt_leftright"
|
||||
value_default=".2"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
|
||||
<param
|
||||
id="10029"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_LeftRight_Max_Effect"
|
||||
label="Max Effect"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_leftright"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max="3">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10030"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_LeftRight_Spring"
|
||||
label="Spring"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_leftright"
|
||||
value_default="10"
|
||||
value_min="0"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10031"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_LeftRight_Gain"
|
||||
label="Gain"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_leftright"
|
||||
value_default="10"
|
||||
value_min="1"
|
||||
value_max="100">
|
||||
<param_driver />
|
||||
</param>
|
||||
<param
|
||||
id="10032"
|
||||
group="0"
|
||||
sex="female"
|
||||
name="Breast_Physics_LeftRight_Damping"
|
||||
label="Damping"
|
||||
wearable="physics"
|
||||
edit_group="physics_breasts_leftright"
|
||||
value_default=".2"
|
||||
value_min="0"
|
||||
value_max="1">
|
||||
<param_driver />
|
||||
</param>
|
||||
</driver_parameters>
|
||||
</linden_avatar>
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ BOOL DOFloaterHex::postBuild(void)
|
||||
|
||||
// static
|
||||
void DOFloaterHex::imageCallback(BOOL success,
|
||||
LLViewerImage *src_vi,
|
||||
LLViewerFetchedTexture *src_vi,
|
||||
LLImageRaw* src,
|
||||
LLImageRaw* aux_src,
|
||||
S32 discard_level,
|
||||
@@ -179,7 +179,7 @@ void DOFloaterHex::imageCallback(BOOL success,
|
||||
}
|
||||
else
|
||||
{
|
||||
src_vi->setBoostLevel(LLViewerImageBoostLevel::BOOST_UI);
|
||||
src_vi->setBoostLevel(LLViewerTexture::BOOST_UI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "llfloater.h"
|
||||
#include "dohexeditor.h"
|
||||
#include "llinventory.h"
|
||||
#include "llviewerimage.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llassettype.h"
|
||||
|
||||
class DOFloaterHex
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
BOOL postBuild(void);
|
||||
void close(bool app_quitting);
|
||||
static void imageCallback(BOOL success,
|
||||
LLViewerImage *src_vi,
|
||||
LLViewerFetchedTexture *src_vi,
|
||||
LLImageRaw* src,
|
||||
LLImageRaw* aux_src,
|
||||
S32 discard_level,
|
||||
|
||||
@@ -53,9 +53,11 @@ WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderUseFBO 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderFastAlpha 1 1
|
||||
|
||||
//
|
||||
// Low Graphics Settings
|
||||
@@ -63,10 +65,10 @@ RenderShaderLightingMaxLevel 1 3
|
||||
list Low
|
||||
RenderAnisotropic 1 0
|
||||
RenderAvatarCloth 1 0
|
||||
RenderAvatarLODFactor 1 0.5
|
||||
RenderAvatarLODFactor 1 0.25
|
||||
RenderAvatarVP 1 0
|
||||
RenderFarClip 1 64
|
||||
RenderFlexTimeFactor 1 0.5
|
||||
RenderFlexTimeFactor 1 0.1
|
||||
RenderGlowResolutionPow 1 8
|
||||
RenderLightingDetail 1 0
|
||||
RenderMaxPartCount 1 1024
|
||||
@@ -74,13 +76,16 @@ RenderObjectBump 1 0
|
||||
RenderReflectionDetail 1 0
|
||||
RenderTerrainDetail 1 0
|
||||
RenderTerrainLODFactor 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderTreeLODFactor 1 0.25
|
||||
RenderUseImpostors 1 1
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
RenderVolumeLODFactor 1 0.5
|
||||
RenderWaterReflections 1 0
|
||||
VertexShaderEnable 1 0
|
||||
WindLightUseAtmosShaders 1 0
|
||||
WLSkyDetail 1 48
|
||||
RenderUseFBO 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderFastAlpha 0 0
|
||||
|
||||
//
|
||||
// Mid Graphics Settings
|
||||
@@ -91,7 +96,7 @@ RenderAvatarCloth 1 0
|
||||
RenderAvatarLODFactor 1 0.5
|
||||
RenderAvatarVP 1 1
|
||||
RenderFarClip 1 96
|
||||
RenderFlexTimeFactor 1 1.0
|
||||
RenderFlexTimeFactor 1 0.5
|
||||
RenderGlowResolutionPow 1 8
|
||||
RenderLightingDetail 1 1
|
||||
RenderMaxPartCount 1 2048
|
||||
@@ -106,6 +111,10 @@ RenderWaterReflections 1 0
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
WLSkyDetail 1 48
|
||||
RenderUseFBO 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderFastAlpha 1 0
|
||||
|
||||
|
||||
//
|
||||
// High Graphics Settings (purty)
|
||||
@@ -131,6 +140,10 @@ RenderWaterReflections 1 0
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 48
|
||||
RenderUseFBO 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderFastAlpha 1 0
|
||||
|
||||
|
||||
//
|
||||
// Ultra graphics (REALLY PURTY!)
|
||||
@@ -156,6 +169,9 @@ RenderWaterReflections 1 1
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
RenderUseFBO 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderFastAlpha 1 1
|
||||
|
||||
//
|
||||
// Class Unknown Hardware (unknown)
|
||||
|
||||
@@ -53,7 +53,11 @@ WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderUseFBO 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderFastAlpha 1 1
|
||||
|
||||
//
|
||||
// Low Graphics Settings
|
||||
@@ -61,10 +65,10 @@ RenderTextureMemoryMultiple 1 1.0
|
||||
list Low
|
||||
RenderAnisotropic 1 0
|
||||
RenderAvatarCloth 1 0
|
||||
RenderAvatarLODFactor 1 0.5
|
||||
RenderAvatarLODFactor 1 0.25
|
||||
RenderAvatarVP 1 0
|
||||
RenderFarClip 1 64
|
||||
RenderFlexTimeFactor 1 0.5
|
||||
RenderFlexTimeFactor 1 0.1
|
||||
RenderGlowResolutionPow 1 8
|
||||
RenderLightingDetail 1 0
|
||||
RenderMaxPartCount 1 1024
|
||||
@@ -72,13 +76,16 @@ RenderObjectBump 1 0
|
||||
RenderReflectionDetail 1 0
|
||||
RenderTerrainDetail 1 0
|
||||
RenderTerrainLODFactor 1 1
|
||||
RenderTreeLODFactor 1 0.5
|
||||
RenderTreeLODFactor 1 0.25
|
||||
RenderUseImpostors 1 1
|
||||
RenderVolumeLODFactor 1 1.125
|
||||
RenderVolumeLODFactor 1 0.5
|
||||
RenderWaterReflections 1 0
|
||||
VertexShaderEnable 1 0
|
||||
WindLightUseAtmosShaders 1 0
|
||||
WLSkyDetail 1 48
|
||||
RenderUseFBO 0 0
|
||||
RenderDeferred 0 0
|
||||
RenderFastAlpha 0 0
|
||||
|
||||
//
|
||||
// Mid Graphics Settings
|
||||
@@ -89,7 +96,7 @@ RenderAvatarCloth 1 0
|
||||
RenderAvatarLODFactor 1 0.5
|
||||
RenderAvatarVP 1 1
|
||||
RenderFarClip 1 96
|
||||
RenderFlexTimeFactor 1 1.0
|
||||
RenderFlexTimeFactor 1 0.5
|
||||
RenderGlowResolutionPow 1 8
|
||||
RenderLightingDetail 1 1
|
||||
RenderMaxPartCount 1 2048
|
||||
@@ -104,6 +111,10 @@ RenderWaterReflections 1 0
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 0
|
||||
WLSkyDetail 1 48
|
||||
RenderUseFBO 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderFastAlpha 1 0
|
||||
|
||||
|
||||
//
|
||||
// High Graphics Settings (purty)
|
||||
@@ -129,6 +140,10 @@ RenderWaterReflections 1 0
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 48
|
||||
RenderUseFBO 1 0
|
||||
RenderDeferred 1 0
|
||||
RenderFastAlpha 1 0
|
||||
|
||||
|
||||
//
|
||||
// Ultra graphics (REALLY PURTY!)
|
||||
@@ -154,6 +169,10 @@ RenderWaterReflections 1 1
|
||||
VertexShaderEnable 1 1
|
||||
WindLightUseAtmosShaders 1 1
|
||||
WLSkyDetail 1 128
|
||||
RenderUseFBO 1 1
|
||||
RenderDeferred 1 1
|
||||
RenderFastAlpha 1 1
|
||||
|
||||
|
||||
//
|
||||
// Class Unknown Hardware (unknown)
|
||||
@@ -219,6 +238,9 @@ RenderUseImpostors 0 0
|
||||
RenderVBOEnable 1 0
|
||||
RenderWaterReflections 0 0
|
||||
WindLightUseAtmosShaders 0 0
|
||||
RenderUseFBO 1 0
|
||||
RenderDeferred 1 0
|
||||
|
||||
|
||||
//
|
||||
// CPU based feature masks
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user