Merge Viewer-Bear

master
Ansariel 2015-10-27 01:31:15 +01:00
commit 68739bc569
90 changed files with 1360 additions and 455 deletions

View File

@ -187,6 +187,7 @@ Ansariel Hiller
STORM-1979
STORM-2105
MAINT-5533
MAINT-5756
Aralara Rajal
Arare Chantilly
CHUIBUG-191
@ -769,6 +770,7 @@ Kitty Barnett
STORM-1905
VWR-24217
STORM-1804
MAINT-5416
Kolor Fall
Komiko Okamoto
Korvel Noh

View File

@ -289,7 +289,7 @@ if (DARWIN)
add_definitions(-DLL_DARWIN=1)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(DARWIN_extra_cstar_flags "-g")
set(DARWIN_extra_cstar_flags "-g -Wno-unused-local-typedef -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# NOTE: it's critical that the optimization flag is put in front.

View File

@ -150,10 +150,10 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1)
# now we only support Xcode 6.0 using 10.9 (Mavericks), minimum OS 10.7 (Lion)
set(XCODE_VERSION 6.0)
# now we only support Xcode 7.0 using 10.11 (El Capitan), minimum OS 10.7 (Lion)
set(XCODE_VERSION 7.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
set(CMAKE_OSX_SYSROOT macosx10.9)
set(CMAKE_OSX_SYSROOT macosx10.11)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL 3)

View File

@ -738,8 +738,11 @@ LLProcess::LLProcess(const LLSDOrParams& params):
{
mPipes.replace(i, new ReadPipeImpl(desc, pipe, FILESLOT(i)));
}
LL_DEBUGS("LLProcess") << "Instantiating " << typeid(mPipes[i]).name()
<< "('" << desc << "')" << LL_ENDL;
// Removed temporaily for Xcode 7 build tests: error was:
// "error: expression with side effects will be evaluated despite
// being used as an operand to 'typeid' [-Werror,-Wpotentially-evaluated-expression]""
//LL_DEBUGS("LLProcess") << "Instantiating " << typeid(mPipes[i]).name()
// << "('" << desc << "')" << LL_ENDL;
}
}

View File

@ -705,77 +705,102 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type)
BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
{
BOOL res = TRUE;
mTotalUniformSize = 0;
mActiveTextureChannels = 0;
mUniform.clear();
mUniformMap.clear();
mUniformNameMap.clear();
mTexture.clear();
mValue.clear();
//initialize arrays
U32 numUniforms = (uniforms == NULL) ? 0 : uniforms->size();
mUniform.resize(numUniforms + LLShaderMgr::instance()->mReservedUniforms.size(), -1);
mTexture.resize(numUniforms + LLShaderMgr::instance()->mReservedUniforms.size(), -1);
bind();
BOOL res = TRUE;
//get the number of active uniforms
GLint activeCount;
glGetObjectParameterivARB(mProgramObject, GL_OBJECT_ACTIVE_UNIFORMS_ARB, &activeCount);
mTotalUniformSize = 0;
mActiveTextureChannels = 0;
mUniform.clear();
mUniformMap.clear();
mUniformNameMap.clear();
mTexture.clear();
mValue.clear();
//initialize arrays
U32 numUniforms = (uniforms == NULL) ? 0 : uniforms->size();
mUniform.resize(numUniforms + LLShaderMgr::instance()->mReservedUniforms.size(), -1);
mTexture.resize(numUniforms + LLShaderMgr::instance()->mReservedUniforms.size(), -1);
bind();
//get the number of active uniforms
GLint activeCount;
glGetObjectParameterivARB(mProgramObject, GL_OBJECT_ACTIVE_UNIFORMS_ARB, &activeCount);
//........................................................................................................................................
//........................................................................................
/*
EXPLANATION:
This is part of code is temporary because as the final result the mapUniform() should be rewrited.
But it's a huge a volume of work which is need to be a more carefully performed for avoid possible
This is part of code is temporary because as the final result the mapUniform() should be rewrited.
But it's a huge a volume of work which is need to be a more carefully performed for avoid possible
regression's (i.e. it should be formalized a separate ticket in JIRA).
RESON:
The reason of this code is that SL engine is very sensitive to fact that "diffuseMap" should be appear
first as uniform parameter which is should get 0-"texture channel" index (see mapUniformTextureChannel() and mActiveTextureChannels)
The reason of this code is that SL engine is very sensitive to fact that "diffuseMap" should be appear
first as uniform parameter which is should get 0-"texture channel" index (see mapUniformTextureChannel() and mActiveTextureChannels)
it influence to which is texture matrix will be updated during rendering.
But, order of indexe's of uniform variables is not defined and GLSL compiler can change it as want
, even if the "diffuseMap" will be appear and use first in shader code.
As example where this situation appear see: "Deferred Material Shader 28/29/30/31"
And tickets: MAINT-4165, MAINT-4839
And tickets: MAINT-4165, MAINT-4839, MAINT-3568
*/
S32 diffuseMap = glGetUniformLocationARB(mProgramObject, "diffuseMap");
S32 bumpMap = glGetUniformLocationARB(mProgramObject, "bumpMap");
S32 environmentMap = glGetUniformLocationARB(mProgramObject, "environmentMap");
std::set<S32> skip_index;
if(diffuseMap != -1 && bumpMap != -1)
if (-1 != diffuseMap && (-1 != bumpMap || -1 != environmentMap))
{
GLenum type;
GLsizei length;
GLint size = -1;
char name[1024];
char name[1024];
diffuseMap = bumpMap = environmentMap = -1;
//diffuse map
for (S32 i = 0; i < activeCount; i++)
{
name[0] = 0;
name[0] = '\0';
glGetActiveUniformARB(mProgramObject, i, 1024, &length, &size, &type, (GLcharARB *)name);
if(std::string(name) == "diffuseMap") {
if (-1 == diffuseMap && std::string(name) == "diffuseMap")
{
diffuseMap = i;
continue;
}
if(std::string(name) == "bumpMap") {
if (-1 == bumpMap && std::string(name) == "bumpMap")
{
bumpMap = i;
continue;
}
if (-1 == environmentMap && std::string(name) == "environmentMap")
{
environmentMap = i;
continue;
}
}
if(bumpMap < diffuseMap)
bool bumpLessDiff = bumpMap < diffuseMap && -1 != bumpMap;
bool envLessDiff = environmentMap < diffuseMap && -1 != environmentMap;
if (bumpLessDiff && envLessDiff)
{
mapUniform(diffuseMap, uniforms);
mapUniform(bumpMap, uniforms);
mapUniform(environmentMap, uniforms);
skip_index.insert(diffuseMap);
skip_index.insert(bumpMap);
skip_index.insert(environmentMap);
}
else if (bumpLessDiff)
{
mapUniform(diffuseMap, uniforms);
mapUniform(bumpMap, uniforms);
@ -783,26 +808,35 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
skip_index.insert(diffuseMap);
skip_index.insert(bumpMap);
}
else if (envLessDiff)
{
mapUniform(diffuseMap, uniforms);
mapUniform(environmentMap, uniforms);
skip_index.insert(diffuseMap);
skip_index.insert(environmentMap);
}
}
//........................................................................................
for (S32 i = 0; i < activeCount; i++)
{
for (S32 i = 0; i < activeCount; i++)
{
//........................................................................................
if(skip_index.end() != skip_index.find(i)) continue;
if (skip_index.end() != skip_index.find(i)) continue;
//........................................................................................
mapUniform(i, uniforms);
}
mapUniform(i, uniforms);
}
//........................................................................................................................................
unbind();
unbind();
LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << LL_ENDL;
return res;
LL_DEBUGS("ShaderLoading") << "Total Uniform Size: " << mTotalUniformSize << LL_ENDL;
return res;
}
BOOL LLGLSLShader::link(BOOL suppress_errors)
{
BOOL success = LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);

View File

@ -319,7 +319,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group
}
color_group = getColorGroup(group);
LL_INFOS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL;
LL_DEBUGS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL;
if (tokens.isMap())
{
@ -354,7 +354,14 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group
switch (token_type)
{
case LLKeywordToken::TT_CONSTANT:
color_group = getColorGroup(group + "-" + getAttribute("type"));
if (getAttribute("type").length() > 0)
{
color_group = getColorGroup(group + "-" + getAttribute("type"));
}
else
{
color_group = getColorGroup(group);
}
tooltip = "Type: " + getAttribute("type") + ", Value: " + getAttribute("value");
break;
case LLKeywordToken::TT_EVENT:

View File

@ -523,7 +523,10 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const
//
LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL()
{
mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?\\/\\S*",
mPattern = boost::regex("((http://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com)"
"|"
"(https://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?))"
"\\/\\S*",
boost::regex::perl|boost::regex::icase);
mIcon = "Hand";

View File

@ -45,11 +45,8 @@ LLUrlRegistry::LLUrlRegistry()
// [/RLVa:KB]
// Urls are matched in the order that they were registered
// <FS:Ansariel> Fix the "nolink>" fail; Fix from Alchemy viewer, courtesy of Drake Arconis
//registerUrl(new LLUrlEntryNoLink());
mUrlEntryNoLink = new LLUrlEntryNoLink();
registerUrl(mUrlEntryNoLink);
// </FS:Ansariel>
mUrlEntryIcon = new LLUrlEntryIcon();
registerUrl(mUrlEntryIcon);
mLLUrlEntryInvalidSLURL = new LLUrlEntryInvalidSLURL();
@ -276,7 +273,6 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
// did we find a match? if so, return its details in the match object
if (match_entry)
{
// Skip if link is an email with an empty username (starting with @). See MAINT-5371.
if (match_start > 0 && text.substr(match_start - 1, 1) == "@")
return false;
@ -285,7 +281,8 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
std::string url = text.substr(match_start, match_end - match_start + 1);
LLUrlEntryBase *stripped_entry = NULL;
if(LLStringUtil::containsNonprintable(url))
if((match_entry != mUrlEntryNoLink) && (match_entry != mUrlEntryHTTPLabel) && (match_entry !=mUrlEntrySLLabel)
&& LLStringUtil::containsNonprintable(url))
{
LLStringUtil::stripNonprintable(url);

View File

@ -98,7 +98,6 @@ private:
LLUrlEntryBase* mLLUrlEntryInvalidSLURL;
LLUrlEntryBase* mUrlEntryHTTPLabel;
LLUrlEntryBase* mUrlEntrySLLabel;
// <FS:Ansariel> Fix the "nolink>" fail; Fix from Alchemy viewer, courtesy of Drake Arconis
LLUrlEntryBase* mUrlEntryNoLink;
// <FS:Ansariel> Normalize only trusted URL
LLUrlEntryBase* mUrlEntryTrustedUrl;

View File

@ -838,17 +838,21 @@ namespace tut
"search something https://marketplace.secondlife.com/products/search on marketplace and test the https",
"https://marketplace.secondlife.com/products/search");
testRegex("match urls with port", url,
"let's specify some port http://secondlife.com:888/status",
"http://secondlife.com:888/status");
testRegex("match HTTPS urls with port", url,
"let's specify some port https://secondlife.com:888/status",
"https://secondlife.com:888/status");
testRegex("don't match HTTP urls with port", url,
"let's specify some port for HTTP http://secondlife.com:888/status",
"");
testRegex("don't match urls w/o protocol", url,
"looks like an url something www.marketplace.secondlife.com/products but no https prefix",
"");
testRegex("but with a protocol www is fine", url,
"so let's add a protocol http://www.marketplace.secondlife.com:8888/products",
"http://www.marketplace.secondlife.com:8888/products");
"so let's add a protocol https://www.marketplace.secondlife.com:8888/products",
"https://www.marketplace.secondlife.com:8888/products");
testRegex("don't match urls w/o protocol", url,
"and even no www something secondlife.com/status",

View File

@ -248,7 +248,11 @@ attributedStringInfo getSegments(NSAttributedString *str)
// {
// [glContext setValues:(const GLint*)1 forParameter:NSOpenGLCPSwapInterval];
// } else {
// [glContext setValues:(const GLint*)0 forParameter:NSOpenGLCPSwapInterval];
// // supress this error after move to Xcode 7:
// // error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
// // Tried using ObjC 'nonnull' keyword as per SO article but didn't build
// GLint swapInterval=0;
// [glContext setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
// }
GLint glVsync = 0;

View File

@ -2314,6 +2314,15 @@
<key>tooltip</key>
<string>Gets the attachment point to which the object is attached.\nReturns 0 if the object is not an attachment (or is an avatar, etc).</string>
</map>
<key>OBJECT_BODY_SHAPE_TYPE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>26</integer>
<key>tooltip</key>
<string>This is a flag used with llGetObjectDetails to get the body type of the avatar, based on shape data.\nIf no data is available, -1.0 is returned.\nThis is normally between 0 and 1.0, with 0.5 and larger considered 'male'</string>
</map>
<key>OBJECT_CHARACTER_TIME</key>
<map>
<key>type</key>
@ -2323,6 +2332,15 @@
<key>tooltip</key>
<string>Units in seconds</string>
</map>
<key>OBJECT_CLICK_ACTION</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>28</integer>
<key>tooltip</key>
<string>This is a flag used with llGetObjectDetails to get the click action.\nThe default is 0</string>
</map>
<key>OBJECT_CREATOR</key>
<map>
<key>type</key>
@ -2350,6 +2368,24 @@
<key>tooltip</key>
<string>Gets the prims's group key. If id is an avatar, a NULL_KEY is returned.</string>
</map>
<key>OBJECT_HOVER_HEIGHT</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>25</integer>
<key>tooltip</key>
<string>This is a flag used with llGetObjectDetails to get hover height of the avatar\nIf no data is available, 0.0 is returned.</string>
</map>
<key>OBJECT_LAST_OWNER_ID</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>27</integer>
<key>tooltip</key>
<string>Gets the object's last owner ID.</string>
</map>
<key>OBJECT_NAME</key>
<map>
<key>type</key>
@ -3277,6 +3313,51 @@
<key>tooltip</key>
<string>Play animation going forwards, then backwards.</string>
</map>
<key>PRIM_ALPHA_MODE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>38</integer>
<key>tooltip</key>
<string>Prim parameter for materials using integer face, integer alpha_mode, integer alpha_cutoff.\nDefines how the alpha channel of the diffuse texture should be rendered.\nValid options for alpha_mode are PRIM_ALPHA_MODE_BLEND, _NONE, _MASK, and _EMISSIVE.\nalpha_cutoff is used only for PRIM_ALPHA_MODE_MASK.</string>
</map>
<key>PRIM_ALPHA_MODE_NONE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>0</integer>
<key>tooltip</key>
<string>Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be ignored.</string>
</map>
<key>PRIM_ALPHA_MODE_BLEND</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>1</integer>
<key>tooltip</key>
<string>Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be rendered as alpha-blended.</string>
</map>
<key>PRIM_ALPHA_MODE_MASK</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>2</integer>
<key>tooltip</key>
<string>Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be rendered as fully opaque for alpha values above alpha_cutoff and fully transparent otherwise.</string>
</map>
<key>PRIM_ALPHA_MODE_EMISSIVE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>3</integer>
<key>tooltip</key>
<string>Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be rendered as an emissivity mask.</string>
</map>
<key>PRIM_BUMP_BARK</key>
<map>
<key>type</key>
@ -3882,6 +3963,15 @@
<key>tooltip</key>
<string/>
</map>
<key>PRIM_NORMAL</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>37</integer>
<key>tooltip</key>
<string>Prim parameter for materials using integer face, string texture, vector repeats, vector offsets, float rotation_in_radians</string>
</map>
<key>PRIM_OMEGA</key>
<map>
<key>type</key>
@ -4108,6 +4198,15 @@
<key>tooltip</key>
<string/>
</map>
<key>PRIM_SPECULAR</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>36</integer>
<key>tooltip</key>
<string>Prim parameter for materials using integer face, string texture, vector repeats, vector offsets, float rotation_in_radians, vector color, integer glossy, integer environment</string>
</map>
<key>PRIM_TEMP_ON_REZ</key>
<map>
<key>type</key>
@ -5020,6 +5119,15 @@
<key>tooltip</key>
<string/>
</map>
<key>REGION_FLAG_BLOCK_FLYOVER</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<string>0x8000000</string>
<key>tooltip</key>
<string/>
</map>
<key>REGION_FLAG_BLOCK_TERRAFORM</key>
<map>
<key>type</key>
@ -5979,6 +6087,177 @@
<key>tooltip</key>
<string/>
</map>
<key>XP_ERROR_EXPERIENCES_DISABLED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>2</integer>
<key>tooltip</key>
<string>The region currently has experiences disabled.</string>
</map>
<key>XP_ERROR_EXPERIENCE_DISABLED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>8</integer>
<key>tooltip</key>
<string>The experience owner has temporarily disabled the experience.</string>
</map>
<key>XP_ERROR_EXPERIENCE_SUSPENDED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>9</integer>
<key>tooltip</key>
<string>The experience has been suspended by Linden Customer Support.</string>
</map>
<key>XP_ERROR_INVALID_EXPERIENCE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>7</integer>
<key>tooltip</key>
<string>The script is associated with an experience that no longer exists.</string>
</map>
<key>XP_ERROR_INVALID_PARAMETERS</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>3</integer>
<key>tooltip</key>
<string>One of the string arguments was too big to fit in the key-value store.</string>
</map>
<key>XP_ERROR_KEY_NOT_FOUND</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>14</integer>
<key>tooltip</key>
<string>The requested key does not exist.</string>
</map>
<key>XP_ERROR_MATURITY_EXCEEDED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>16</integer>
<key>tooltip</key>
<string>The content rating of the experience exceeds that of the region.</string>
</map>
<key>XP_ERROR_NONE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>0</integer>
<key>tooltip</key>
<string>No error was detected.</string>
</map>
<key>XP_ERROR_NOT_FOUND</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>6</integer>
<key>tooltip</key>
<string>The sim was unable to verify the validity of the experience. Retrying after a short wait is advised.</string>
</map>
<key>XP_ERROR_NOT_PERMITTED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>4</integer>
<key>tooltip</key>
<string>This experience is not allowed to run by the requested agent.</string>
</map>
<key>XP_ERROR_NOT_PERMITTED_LAND</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>17</integer>
<key>tooltip</key>
<string>This experience is not allowed to run on the current region.</string>
</map>
<key>XP_ERROR_NO_EXPERIENCE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>5</integer>
<key>tooltip</key>
<string>This script is not associated with an experience.</string>
</map>
<key>XP_ERROR_QUOTA_EXCEEDED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>11</integer>
<key>tooltip</key>
<string>An attempted write data to the key-value store failed due to the data quota being met.</string>
</map>
<key>LSL_XP_ERROR_REQUEST_PERM_TIMEOUT</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>18</integer>
<key>tooltip</key>
<string>The request for experience permissions was ignored and timed out.</string>
</map>
<key>XP_ERROR_RETRY_UPDATE</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>15</integer>
<key>tooltip</key>
<string>A checked update failed due to an out of date request.</string>
</map>
<key>XP_ERROR_STORAGE_EXCEPTION</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>13</integer>
<key>tooltip</key>
<string>Unable to communicate with the key-value store.</string>
</map>
<key>XP_ERROR_STORE_DISABLED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>12</integer>
<key>tooltip</key>
<string>The key-value store is currently disabled on this region.</string>
</map>
<key>XP_ERROR_THROTTLED</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>1</integer>
<key>tooltip</key>
<string>The call failed due to too many recent calls.</string>
</map>
<key>XP_ERROR_UNKNOWN_ERROR</key>
<map>
<key>type</key>
<string>integer</string>
<key>value</key>
<integer>10</integer>
<key>tooltip</key>
<string>Other unknown error.</string>
</map>
<key>ZERO_ROTATION</key>
<map>
<key>type</key>
@ -6280,6 +6559,34 @@
<string>This event is triggered when an email sent to this script arrives.
The number remaining tells how many more emails are known to be still pending.</string>
</map>
<key>experience_permissions</key>
<map>
<key>arguments</key>
<map>
<key>agent_id</key>
<map>
<key>type</key>
<string>key</string>
<key>tooltip</key>
<string>ID of the agent approving permission for the Experience.</string>
</map>
</map>
</map>
<key>experience_permissions_denied</key>
<map>
<key>arguments</key>
<map>
<key>agent_id</key>
<map>
<key>type</key>
<string>key</string>
<key>tooltip</key>
<string>ID of the agent denying permission for the Experience.</string>
</map>
</map>
<key>tooltip</key>
<string>One of the XP_ERROR_... constants describing the reason why the Experience permissions were denied for the agent.</string>
</map>
<key>http_request</key>
<map>
<key>arguments</key>
@ -6965,6 +7272,29 @@
<key>tooltip</key>
<string>Adjusts the volume (0.0 - 1.0) of the currently playing attached sound.\nThis function has no effect on sounds started with llTriggerSound.</string>
</map>
<key>llAgentInExperience</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>integer</string>
<key>arguments</key>
<map>
<key>AgentID</key>
<map>
<key>type</key>
<string>key</string>
<key>tooltip</key>
<string></string>
</map>
</map>
<key>tooltip</key>
<string>
Returns TRUE if the agent is in the Experience and the Experience can run in the current location.
</string>
</map>
<key>llAllowInventoryDrop</key>
<map>
<key>energy</key>
@ -7696,6 +8026,36 @@
<key>tooltip</key>
<string>Convert link-set to AI/Physics character.\nCreates a path-finding entity, known as a "character", from the object containing the script. Required to activate use of path-finding functions.\nOptions is a list of key/value pairs.</string>
</map>
<key>llCreateKeyValue</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>key</string>
<key>arguments</key>
<map>
<key>Key</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string></string>
</map>
<key>Value</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string></string>
</map>
</map>
<key>tooltip</key>
<string>
Starts an asychronous transaction to create a key-value pair. Will fail with XP_ERROR_STORAGE_EXCEPTION if the key already exists. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value passed to the function.
</string>
</map>
<key>llCreateLink</key>
<map>
<key>energy</key>
@ -7751,6 +8111,21 @@
<key>tooltip</key>
<string>Create a list from a string of comma separated values specified in Text.</string>
</map>
<key>llDataSizeKeyValue</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>key</string>
<key>arguments</key>
<undef/>
<key>tooltip</key>
<string>
Starts an asychronous transaction the request the used and total amount of data allocated for the Experience. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the the amount in use and the third item will be the total available.
</string>
</map>
<key>llDeleteCharacter</key>
<map>
<key>energy</key>
@ -7764,6 +8139,29 @@
<key>tooltip</key>
<string>Convert link-set from AI/Physics character to Physics object.\nConvert the current link-set back to a standard object, removing all path-finding properties.</string>
</map>
<key>llDeleteKeyValue</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>key</string>
<key>arguments</key>
<map>
<key>Key</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string></string>
</map>
</map>
<key>tooltip</key>
<string>
Starts an asychronous transaction to delete a key-value pair. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value associated with the key.
</string>
</map>
<key>llDeleteSubList</key>
<map>
<key>energy</key>
@ -8915,7 +9313,30 @@
<key>arguments</key>
<undef/>
<key>tooltip</key>
<string>Returns the object's attachment point, or 0 if not attached.\nReturns the object attachment point, or 0 if not attached.</string>
<string>Returns the object's attachment point, or 0 if not attached.</string>
</map>
<key>llGetAttachedList</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>list</string>
<key>arguments</key>
<array>
<map>
<key>ID</key>
<map>
<key>type</key>
<string>key</string>
<key>tooltip</key>
<string>Avatar to get attachments</string>
</map>
</map>
</array>
<key>tooltip</key>
<string>Returns a list of keys of all visible (not HUD) attachments on the avatar identified by the ID argument</string>
</map>
<key>llGetBoundingBox</key>
<map>
@ -9119,6 +9540,52 @@
<key>tooltip</key>
<string>Returns a string with the requested data about the region.</string>
</map>
<key>llGetExperienceDetails</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>list</string>
<key>arguments</key>
<map>
<key>ExperienceID</key>
<map>
<key>type</key>
<string>key</string>
<key>tooltip</key>
<string>May be NULL_KEY to retrieve the details for the script's Experience</string>
</map>
</map>
<key>tooltip</key>
<string>
Returns a list with the following Experience properties: [Experience Name, Owner ID, Group ID, Experience ID, State, State Message]. State is an integer corresponding to one of the constants XP_ERROR_... and State Message is the string returned by llGetExperienceErrorMessage for that integer.
</string>
</map>
<key>llGetExperienceErrorMessage</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>string</string>
<key>arguments</key>
<map>
<key>Error</key>
<map>
<key>type</key>
<string>integer</string>
<key>tooltip</key>
<string>An Experience error code to translate.</string>
</map>
</map>
<key>tooltip</key>
<string>
Returns a string describing the error code passed or the string corresponding with XP_ERROR_UNKNOWN_ERROR if the value is not a valid Experience error code.
</string>
</map>
<key>llGetForce</key>
<map>
<key>energy</key>
@ -11446,6 +11913,51 @@
<key>tooltip</key>
<string>Returns the name of the prim or avatar specified by ID. The ID must be a valid rezzed prim or avatar key in the current simulator, otherwise an empty string is returned.\nFor avatars, the returned name is the legacy name</string>
</map>
<key>llKeyCountKeyValue</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>key</string>
<key>arguments</key>
<undef/>
<key>tooltip</key>
<string>
Starts an asychronous transaction the request the number of keys in the data store. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will the the number of keys in the system.
</string>
</map>
<key>llKeysKeyValue</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>key</string>
<key>arguments</key>
<map>
<key>First</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string>Index of the first key to return.</string>
</map>
<key>Count</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string>The number of keys to return.</string>
</map>
</map>
<key>tooltip</key>
<string>
Starts an asychronous transaction the request a number of keys from the data store. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. The error XP_ERROR_KEY_NOT_FOUND is returned if First is greater than or equal to the number of keys in the data store. In the success case the subsequent items will be the keys requested. The number of keys returned may be less than requested if the return value is too large or if there is not enough keys remaining. The order keys are returned is not guaranteed but is stable between subsequent calls as long as no keys are added or removed. Because the keys are returned in a comma-delimited list it is not recommended to use commas in key names if this function is used.
</string>
</map>
<key>llLinkParticleSystem</key>
<map>
<key>energy</key>
@ -13577,6 +14089,29 @@
<key>tooltip</key>
<string>Applies Impulse and AngularImpulse to ObjectID.\nApplies the supplied impulse and angular impulse to the object specified.</string>
</map>
<key>llReadKeyValue</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>key</string>
<key>arguments</key>
<map>
<key>Key</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string></string>
</map>
</map>
<key>tooltip</key>
<string>
Starts an asychronous transaction to retrieve the value associated with the key given. Will fail with XP_ERROR_KEY_NOT_FOUND if the key does not exist. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value associated with the key.
</string>
</map>
<key>llRefreshPrimURL</key>
<map>
<key>energy</key>
@ -13997,6 +14532,36 @@
<key>tooltip</key>
<string>Requests the display name of the agent. When the display name is available the dataserver event will be raised.\nThe avatar identified does not need to be in the same region or online at the time of the request.\nReturns a key that is used to identify the dataserver event when it is raised.</string>
</map>
<key>llRequestExperiencePermissions</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>void</string>
<key>arguments</key>
<map>
<key>AvatarID</key>
<map>
<key>type</key>
<string>key</string>
<key>tooltip</key>
<string/>
</map>
<key>unused</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string>Not used, should be &quot;&quot;</string>
</map>
</map>
<key>tooltip</key>
<string>
Ask the agent for permission to participate in an experience. This request is similar to llRequestPermissions with the following permissions: PERMISSION_TAKE_CONTROLS, PERMISSION_TRIGGER_ANIMATION, PERMISSION_ATTACH, PERMISSION_TRACK_CAMERA, PERMISSION_CONTROL_CAMERA and PERMISSION_TELEPORT. However, unlike llRequestPermissions the decision to allow or block the request is persistent and applies to all scripts using the experience grid wide. Subsequent calls to llRequestExperiencePermissions from scripts in the experience will receive the same response automatically with no user interaction. One of experience_permissions or experience_permissions_denied will be generated in response to this call. Outstanding permission requests will be lost if the script is derezzed, moved to another region or reset.
</string>
</map>
<key>llRequestInventoryData</key>
<map>
<key>energy</key>
@ -17913,6 +18478,50 @@
<key>tooltip</key>
<string>Updates settings for a pathfinding character.</string>
</map>
<key>llUpdateKeyValue</key>
<map>
<key>energy</key>
<real>10.0</real>
<key>sleep</key>
<real>0.0</real>
<key>return</key>
<string>key</string>
<key>arguments</key>
<map>
<key>Key</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string></string>
</map>
<key>Value</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string></string>
</map>
<key>Checked</key>
<map>
<key>type</key>
<string>integer</string>
<key>tooltip</key>
<string></string>
</map>
<key>OriginalValue</key>
<map>
<key>type</key>
<string>string</string>
<key>tooltip</key>
<string></string>
</map>
</map>
<key>tooltip</key>
<string>
Starts an asychronous transaction to update the value associated with the key given. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value associated with the key. If Checked is 1 the existing value in the data store must match the OriginalValue passed or XP_ERROR_RETRY_UPDATE will be returned. If Checked is 0 the key will be created if necessary.
</string>
</map>
<key>llVecDist</key>
<map>
<key>energy</key>

View File

@ -3240,6 +3240,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>ChatShowIcons</key>
<map>
<key>Comment</key>
<string>Show/hide people icons in chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>CheesyBeacon</key>
<map>
<key>Comment</key>
@ -13672,6 +13683,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>1</integer>
</map>
<key>GlobalShowIconsOverride</key>
<map>
<key>Comment</key>
<string>Show/hide people icons in any list. This option should be set back to 0 when icons are enabled locally for the lists</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FriendsSortOrder</key>
<map>
<key>Comment</key>

View File

@ -248,7 +248,7 @@ FSParticipantList::FSParticipantList(LLSpeakerMgr* data_source,
if (use_context_menu && can_toggle_icons)
{
mAvatarList->setShowIcons("ParticipantListShowIcons");
mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList));
mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&FSParticipantList::onParticipantListIconToggle, this));
}
//Lets fill avatarList with existing speakers
@ -475,6 +475,14 @@ void FSParticipantList::onAvalineCallerRemoved(const LLUUID& participant_id)
mSpeakerMgr->removeAvalineSpeaker(participant_id);
}
void FSParticipantList::onParticipantListIconToggle()
{
std::string param = mAvatarList->getIconParamName();
gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride")));
gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride")));
mAvatarList->setIconsVisible(gSavedSettings.getBOOL(param));
}
void FSParticipantList::setSortOrder(EParticipantSortOrder order)
{
const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder");

View File

@ -263,6 +263,8 @@ private:
void onAvalineCallerFound(const LLUUID& participant_id);
void onAvalineCallerRemoved(const LLUUID& participant_id);
void onParticipantListIconToggle();
/**
* Adjusts passed participant to work properly.
*

View File

@ -289,12 +289,24 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
if (param == "speak")
{
if ( gAgent.isVoiceConnected() &&
// FS::LO FIRE-5564: Speak button disabled in private call when entering no-voice parcel
// LLViewerParcelMgr::getInstance()->allowAgentVoice() &&
( LLViewerParcelMgr::getInstance()->allowAgentVoice() ||
LLVoiceChannel::getCurrentVoiceChannel()->isActive() ) &&
! LLVoiceClient::getInstance()->inTuningMode() )
bool allow_agent_voice = false;
LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel();
if (channel != NULL)
{
if (channel->getSessionName().empty() && channel->getSessionID().isNull())
{
// default channel
allow_agent_voice = LLViewerParcelMgr::getInstance()->allowAgentVoice();
}
else
{
allow_agent_voice = channel->isActive() && channel->callStarted();
}
}
if (gAgent.isVoiceConnected() &&
allow_agent_voice &&
!LLVoiceClient::getInstance()->inTuningMode())
{
retval = true;
}

View File

@ -1162,7 +1162,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
if (mismatched == 0 && !update_inventory)
{
LL_DEBUGS("Avatar") << "no changes, bailing out" << LL_ENDL;
mCOFChangeInProgress = false;
notifyLoadingFinished();
return;
}
@ -1219,7 +1219,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
if (mismatched == 0)
{
LL_DEBUGS("Avatar") << "inventory updated, wearable assets not changed, bailing out" << LL_ENDL;
mCOFChangeInProgress = false;
notifyLoadingFinished();
return;
}

View File

@ -1980,7 +1980,7 @@ bool LLAppearanceMgr::canAddWearables(const uuid_vec_t& item_ids)
{
++n_clothes;
}
else if (item->getType() == LLAssetType::AT_BODYPART)
else if (item->getType() == LLAssetType::AT_BODYPART || item->getType() == LLAssetType::AT_GESTURE)
{
return isAgentAvatarValid();
}

View File

@ -694,7 +694,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
case LLAssetType::AT_NOTECARD:
{
// Update the UI with the new asset.
LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(item_id));
LLSD floater_key;
floater_key["taskid"] = task_id;
floater_key["itemid"] = item_id;
LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", floater_key);
if(nc)
{
// *HACK: we have to delete the asset in the VFS so

View File

@ -71,21 +71,20 @@ LLAvatarListItem* LLAvatarList::getAvatarListItem(const LLUUID& id)
return (LLAvatarListItem*)getItemByValue(id);
}
void LLAvatarList::toggleIcons()
void LLAvatarList::setIconsVisible(bool visible)
{
if (!mIgnoreGlobalIcons)
if (visible == mShowIcons) // nothing to be done here.
return;
// Save the new value for new items to use.
mShowIcons = visible;
// Show/hide icons for all existing items.
std::vector<LLPanel*> items;
getItems(items);
for (std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
{
// Save the new value for new items to use.
mShowIcons = !mShowIcons;
gSavedSettings.setBOOL(mIconParamName, mShowIcons);
// Show/hide avatar icons for all existing items.
std::vector<LLPanel*> items;
getItems(items);
for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
{
static_cast<LLAvatarListItem*>(*it)->setAvatarIconVisible(mShowIcons);
}
static_cast<LLAvatarListItem*>(*it)->setAvatarIconVisible(mShowIcons);
}
}
@ -389,6 +388,8 @@ void LLAvatarList::draw()
updateAvatarNames();
}
setIconsVisible(gSavedSettings.getBOOL(mIconParamName) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"));
if (mDirty)
refresh();

View File

@ -80,7 +80,7 @@ public:
void setSessionID(const LLUUID& session_id) { mSessionID = session_id; }
const LLUUID& getSessionID() { return mSessionID; }
void toggleIcons();
void setIconsVisible(bool visible);
void setSpeakingIndicatorsVisible(bool visible);
void setItemHeight(S32 height);
void showPermissions(bool visible);

View File

@ -572,7 +572,7 @@ protected:
showSystemContextMenu(x,y);
if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_AGENT)
showAvatarContextMenu(x,y);
if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_OBJECT && SYSTEM_FROM != mFrom)
if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_OBJECT)
showObjectContextMenu(x,y);
}

View File

@ -503,7 +503,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
const LLAssetType::EType item_type = item->getType();
if (item_type == LLAssetType::AT_CLOTHING) continue;
LLPanelInventoryListItemBase* item_panel = NULL;
if (item_type == LLAssetType::AT_OBJECT)
if (item_type == LLAssetType::AT_OBJECT || item_type == LLAssetType::AT_GESTURE)
{
item_panel = buildAttachemntListItem(item);
mAttachments->addItem(item_panel, item->getUUID(), ADD_BOTTOM, false);

View File

@ -87,7 +87,8 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes
mHasArrow(true),
mIsInActiveVoiceChannel(false),
mFlashStateOn(false),
mFlashStarted(false)
mFlashStarted(false),
mShowIcons(true)
{
mFlashTimer = new LLFlashTimer();
}
@ -175,7 +176,7 @@ BOOL LLConversationViewSession::postBuild()
if (session)
{
LLAvatarIconCtrl* icon = mItemPanel->getChild<LLAvatarIconCtrl>("avatar_icon");
icon->setVisible(true);
icon->setVisible(mShowIcons);
icon->setValue(session->mOtherParticipantID);
mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true);
mHasArrow = false;
@ -428,6 +429,49 @@ void LLConversationViewSession::showVoiceIndicator(bool visible)
requestArrange();
}
void LLConversationViewSession::setIconsVisible(bool visible)
{
if (visible == mShowIcons) // nothing to be done here.
return;
// Save the new value for new items to use.
mShowIcons = visible;
// Show/hide icons for the 1-n-1 chat.
LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem());
if (vmi)
{
switch (vmi->getType())
{
case LLConversationItem::CONV_PARTICIPANT:
case LLConversationItem::CONV_SESSION_1_ON_1:
{
LLIconCtrl* icon = mItemPanel->getChild<LLIconCtrl>("avatar_icon");
icon->setVisible(mShowIcons);
break;
}
/*
case LLConversationItem::CONV_SESSION_AD_HOC:
case LLConversationItem::CONV_SESSION_GROUP:
{
LLIconCtrl* icon = mItemPanel->getChild<LLIconCtrl>("group_icon");
icon->setVisible(mShowIcons);
break;
}
*/
default:
break;
}
}
// Show/hide icons for all existing items.
items_t::const_iterator iter;
for (iter = getItemsBegin(); iter != getItemsEnd(); iter++)
{
dynamic_cast<LLConversationViewParticipant*>(*iter)->setAvatarIconVisible(mShowIcons);
}
}
void LLConversationViewSession::refresh()
{
// Refresh the session view from its model data
@ -460,6 +504,9 @@ void LLConversationViewSession::refresh()
}
}
}
setIconsVisible(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"));
requestArrange();
// Do the regular upstream refresh
LLFolderViewFolder::refresh();
@ -511,7 +558,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti
LLAvatarIconCtrl::Params avatar_icon_params(params.avatar_icon());
applyXUILayout(avatar_icon_params, this);
LLAvatarIconCtrl * avatarIcon = LLUICtrlFactory::create<LLAvatarIconCtrl>(avatar_icon_params);
addChild(avatarIcon);
addChild(avatarIcon);
LLButton::Params info_button_params(params.info_button());
applyXUILayout(info_button_params, this);
@ -527,6 +574,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti
BOOL LLConversationViewParticipant::postBuild()
{
mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
mAvatarIcon->setVisible(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"));
mInfoBtn = getChild<LLButton>("info_btn");
mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this));
@ -590,12 +638,12 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height)
S32 arranged = LLFolderViewItem::arrange(width, height);
//Adjusts the avatar icon based upon the indentation
LLRect avatarRect(getIndentation(),
mAvatarIcon->getRect().mTop,
getIndentation() + mAvatarIcon->getRect().getWidth(),
mAvatarIcon->getRect().mBottom);
mAvatarIcon->setShape(avatarRect);
LLRect avatarRect(getIndentation(),
mAvatarIcon->getRect().mTop,
getIndentation() + mAvatarIcon->getRect().getWidth(),
mAvatarIcon->getRect().mBottom);
mAvatarIcon->setShape(avatarRect);
//Since dimensions changed, adjust the children (info button, speaker indicator)
updateChildren();
@ -667,7 +715,7 @@ void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask)
S32 LLConversationViewParticipant::getLabelXPos()
{
return getIndentation() + mAvatarIcon->getRect().getWidth() + mIconPad;
return getIndentation() + (mAvatarIcon->getVisible() ? mAvatarIcon->getRect().getWidth() : 0) + mIconPad;
}
// static
@ -746,6 +794,19 @@ void LLConversationViewParticipant::hideSpeakingIndicator()
mSpeakingIndicator->setVisible(false);
}
void LLConversationViewParticipant::setAvatarIconVisible(bool visible)
{
// Already done? Then do nothing.
if (mAvatarIcon->getVisible() == (BOOL)visible)
{
return;
}
// Show/hide avatar icon.
mAvatarIcon->setVisible(visible);
updateChildren();
}
// EOF
#endif

View File

@ -85,7 +85,7 @@ public:
LLConversationViewParticipant* findParticipant(const LLUUID& participant_id);
void showVoiceIndicator(bool visible);
void setIconsVisible(bool visible);
virtual void refresh();
/*virtual*/ void setFlashState(bool flash_state);
@ -112,6 +112,8 @@ private:
bool mIsInActiveVoiceChannel;
bool mShowIcons;
LLVoiceClientStatusObserver* mVoiceClientObserver;
boost::signals2::connection mActiveVoiceChannelConnection;
@ -147,6 +149,7 @@ public:
/*virtual*/ S32 getLabelXPos();
/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
void hideSpeakingIndicator();
void setAvatarIconVisible(bool visible);
protected:
friend class LLUICtrlFactory;

View File

@ -236,24 +236,7 @@ void LLDrawPoolTerrain::render(S32 pass)
if (showParcelOwners)
// </FS:Ansariel>
{
if (mVertexShaderLevel > 1)
{ //use fullbright shader for highlighting
LLGLSLShader* old_shader = sShader;
sShader->unbind();
sShader = &gHighlightProgram;
sShader->bind();
gGL.diffuseColor4f(1,1,1,1);
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
sShader = old_shader;
sShader->bind();
}
else
{
gPipeline.disableLights();
renderOwnership();
}
hilightParcelOwners();
}
}
@ -281,7 +264,15 @@ void LLDrawPoolTerrain::renderDeferred(S32 pass)
{
return;
}
renderFullShader();
// Special-case for land ownership feedback
if (gSavedSettings.getBOOL("ShowParcelOwners"))
{
hilightParcelOwners();
}
}
void LLDrawPoolTerrain::beginShadowPass(S32 pass)
@ -470,6 +461,28 @@ void LLDrawPoolTerrain::renderFullShader()
gGL.matrixMode(LLRender::MM_MODELVIEW);
}
void LLDrawPoolTerrain::hilightParcelOwners()
{
if (mVertexShaderLevel > 1)
{ //use fullbright shader for highlighting
LLGLSLShader* old_shader = sShader;
sShader->unbind();
sShader = &gHighlightProgram;
sShader->bind();
gGL.diffuseColor4f(1, 1, 1, 1);
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
sShader = old_shader;
sShader->bind();
}
else
{
gPipeline.disableLights();
renderOwnership();
}
}
void LLDrawPoolTerrain::renderFull4TU()
{
// Hack! Get the region that this draw pool is rendering from!

View File

@ -76,6 +76,7 @@ public:
static S32 sDetailMode;
static F32 sDetailScale; // meters per texture
protected:
void renderSimple();
void renderOwnership();
@ -84,6 +85,9 @@ protected:
void renderFull4TU();
void renderFullShader();
void drawLoop();
private:
void hilightParcelOwners();
};
#endif // LL_LLDRAWPOOLSIMPLE_H

View File

@ -237,6 +237,7 @@ LLExpandableTextBox::LLExpandableTextBox(const Params& p)
LLTextBoxEx::Params textbox_params = p.textbox;
textbox_params.rect(rc);
mTextBox = LLUICtrlFactory::create<LLTextBoxEx>(textbox_params);
mTextBox->setContentTrusted(false);
mScroll->addChild(mTextBox);
updateTextBoxRect();
@ -260,6 +261,11 @@ void LLExpandableTextBox::draw()
LLUICtrl::draw();
}
void LLExpandableTextBox::setContentTrusted(bool trusted_content)
{
mTextBox->setContentTrusted(trusted_content);
}
void LLExpandableTextBox::collapseIfPosChanged()
{
if(mExpanded)

View File

@ -194,6 +194,8 @@ protected:
*/
virtual S32 recalculateTextDelta(S32 text_delta);
void setContentTrusted(bool trusted_content);
protected:
std::string mText;

View File

@ -51,10 +51,18 @@ void ExperienceAssociationResponder::fetchAssociatedExperience(LLSD& request, ca
LLViewerObject* object = gObjectList.findObject(request["object-id"]);
if (!object)
{
LL_WARNS() << "Failed to find object with ID " << request["object-id"] << " in fetchAssociatedExperience" << LL_ENDL;
return;
LL_DEBUGS() << "Object with ID " << request["object-id"] << " not found via gObjectList.findObject() in fetchAssociatedExperience" << LL_ENDL;
LL_DEBUGS() << "Using gAgent.getRegion() instead of object->getRegion()" << LL_ENDL;
}
LLViewerRegion* region = NULL;
if (object)
{
region = object->getRegion();
}
else
{
region = gAgent.getRegion();
}
LLViewerRegion* region = object->getRegion();
if (region)
{
std::string lookup_url=region->getCapability("GetMetadata");
@ -66,6 +74,10 @@ void ExperienceAssociationResponder::fetchAssociatedExperience(LLSD& request, ca
LLHTTPClient::post(lookup_url, request, new ExperienceAssociationResponder(callback));
}
}
else
{
LL_WARNS() << "Failed to lookup region in fetchAssociatedExperience. Fetch request not sent." << LL_ENDL;
}
}
void ExperienceAssociationResponder::httpFailure()

View File

@ -112,6 +112,7 @@ void LLExperienceLog::handleExperienceMessage(LLSD& message)
}
message["Time"] = time_of_day;
mEvents[day].append(message);
mEventsToSave[day].append(message);
mSignals(message);
}
@ -180,9 +181,8 @@ void LLExperienceLog::notify( LLSD& message )
void LLExperienceLog::saveEvents()
{
eraseExpired();
std::string filename = getFilename();
LLSD settings = LLSD::emptyMap().with("Events", mEvents);
LLSD settings = LLSD::emptyMap().with("Events", mEventsToSave);
settings["MaxDays"] = (int)mMaxDays;
settings["Notify"] = mNotifyNewEvent;
@ -217,9 +217,8 @@ void LLExperienceLog::loadEvents()
if(mMaxDays > 0 && settings.has("Events"))
{
mEvents = settings["Events"];
mEventsToSave = mEvents;
}
eraseExpired();
}
LLExperienceLog::~LLExperienceLog()
@ -235,6 +234,26 @@ void LLExperienceLog::eraseExpired()
}
}
bool LLExperienceLog::isNotExpired(std::string& date)
{
LLDate event_date;
S32 month, day, year;
S32 matched = sscanf(date.c_str(), "%d-%d-%d", &year, &month, &day);
if (matched != 3) return false;
event_date.fromYMDHMS(year, month, day);
const U32 seconds_in_day = 24 * 60 * 60;
S32 curr_year = 0, curr_month = 0, curr_day = 0;
LLDate curr_date = LLDate::now();
curr_date.split(&curr_year, &curr_month, &curr_day);
curr_date.fromYMDHMS(curr_year, curr_month, curr_day); // Set hour, min, and sec to 0
LLDate boundary_date = LLDate(curr_date.secondsSinceEpoch() - seconds_in_day*getMaxDays());
return event_date >= boundary_date;
}
const LLSD& LLExperienceLog::getEvents() const
{
return mEvents;
@ -248,10 +267,6 @@ void LLExperienceLog::clear()
void LLExperienceLog::setMaxDays( U32 val )
{
mMaxDays = val;
if(mMaxDays > 0)
{
eraseExpired();
}
}
LLExperienceLog::callback_connection_t LLExperienceLog::addUpdateSignal( const callback_slot_t& cb )

View File

@ -59,6 +59,8 @@ public:
static void notify(LLSD& message);
static std::string getFilename();
static std::string getPermissionString(const LLSD& message, const std::string& base);
void setEventsToSave(LLSD new_events){mEventsToSave = new_events; }
bool isNotExpired(std::string& date);
protected:
LLExperienceLog();
void handleExperienceMessage(LLSD& message);
@ -68,7 +70,10 @@ protected:
void saveEvents();
void eraseExpired();
LLSD mEvents;
LLSD mEventsToSave;
callback_signal_t mSignals;
callback_connection_t mNotifyConnection;
U32 mMaxDays;

View File

@ -676,11 +676,12 @@ void LLFavoritesBarCtrl::changed(U32 mask)
LLInventoryModel::cat_array_t cats;
LLIsType is_type(LLAssetType::AT_LANDMARK);
gInventory.collectDescendentsIf(mFavoriteFolderId, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
{
LLFavoritesOrderStorage::instance().getSLURL((*i)->getAssetUUID());
}
updateButtons();
if (!mItemsChangedTimer.getStarted())
{
@ -772,7 +773,11 @@ void LLFavoritesBarCtrl::updateButtons()
if(mGetPrevItems)
{
LLFavoritesOrderStorage::instance().mPrevFavorites = mItems;
for (LLInventoryModel::item_array_t::iterator it = mItems.begin(); it != mItems.end(); it++)
{
LLFavoritesOrderStorage::instance().mFavoriteNames[(*it)->getUUID()]= (*it)->getName();
}
LLFavoritesOrderStorage::instance().mPrevFavorites = mItems;
mGetPrevItems = false;
}
@ -802,7 +807,7 @@ void LLFavoritesBarCtrl::updateButtons()
const LLViewerInventoryItem *item = mItems[first_changed_item_index].get();
if (item)
{
// an child's order and mItems should be same
// an child's order and mItems should be same
if (button->getLandmarkId() != item->getUUID() // sort order has been changed
|| button->getLabelSelected() != item->getName() // favorite's name has been changed
|| button->getRect().mRight < rightest_point) // favbar's width has been changed
@ -1860,10 +1865,20 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)
gInventory.collectDescendentsIf(favorite_folder, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
std::sort(items.begin(), items.end(), LLFavoritesSort());
bool name_changed = false;
if((items != mPrevFavorites) || pref_changed)
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++)
{
std::string filename = getStoredFavoritesFilename();
if(mFavoriteNames[(*it)->getUUID()] != ((*it)->getName()))
{
mFavoriteNames[(*it)->getUUID()] = (*it)->getName();
name_changed = true;
}
}
if((items != mPrevFavorites) || name_changed || pref_changed)
{
std::string filename = getStoredFavoritesFilename();
if (!filename.empty())
{
llifstream in_file;

View File

@ -225,6 +225,7 @@ public:
const static S32 NO_INDEX;
static bool mSaveOnExit;
bool mUpdateRequired;
std::map<LLUUID,std::string> mFavoriteNames;
private:
friend class LLSingleton<LLFavoritesOrderStorage>;

View File

@ -925,6 +925,11 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata)
{
setSortOrderParticipants(LLConversationFilter::SO_DISTANCE);
}
if ("view_icons" == command)
{
gSavedSettings.setBOOL("ChatShowIcons", !(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride")));
gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL("ChatShowIcons") && gSavedSettings.getBOOL("GlobalShowIconsOverride")));
}
if ("chat_preferences" == command)
{
LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences");
@ -975,6 +980,10 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata)
{
return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE);
}
if ("view_icons" == command)
{
return gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride");
}
if ("Translating.Enabled" == command)
{
return gSavedPerAccountSettings.getBOOL("TranslatingEnabled");

View File

@ -2652,6 +2652,112 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
shader->bind();
}
}
void LLModelPreview::genModelBBox()
{
LLVector3 min, max;
min = this->mModelLoader->mExtents[0];
max = this->mModelLoader->mExtents[1];
std::vector<LLVector3> v_list;
v_list.resize(4);
std::map<U8, std::vector<LLVector3> > face_list;
// Face 0
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
v_list[1] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
v_list[2] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
face_list.insert(std::pair<U8, std::vector<LLVector3> >(0, v_list));
// Face 1
v_list[0] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
v_list[1] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
face_list.insert(std::pair<U8, std::vector<LLVector3> >(1, v_list));
// Face 2
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], max.mV[VZ]);
v_list[3] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
face_list.insert(std::pair<U8, std::vector<LLVector3> >(2, v_list));
// Face 3
v_list[0] = LLVector3(min.mV[VX], max.mV[VY], max.mV[VZ]);
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
v_list[2] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
v_list[3] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
face_list.insert(std::pair<U8, std::vector<LLVector3> >(3, v_list));
// Face 4
v_list[0] = LLVector3(min.mV[VX], min.mV[VY], max.mV[VZ]);
v_list[1] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
v_list[2] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
v_list[3] = LLVector3(max.mV[VX], min.mV[VY], max.mV[VZ]);
face_list.insert(std::pair<U8, std::vector<LLVector3> >(4, v_list));
// Face 5
v_list[0] = LLVector3(min.mV[VX], min.mV[VY], min.mV[VZ]);
v_list[1] = LLVector3(min.mV[VX], max.mV[VY], min.mV[VZ]);
v_list[2] = LLVector3(max.mV[VX], max.mV[VY], min.mV[VZ]);
v_list[3] = LLVector3(max.mV[VX], min.mV[VY], min.mV[VZ]);
face_list.insert(std::pair<U8, std::vector<LLVector3> >(5, v_list));
U16 Idx[] = { 0, 1, 2, 3, 0, 2, };
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
buff->allocateBuffer(4, 6, true);
LLStrider<LLVector3> pos;
LLStrider<U16> idx;
LLStrider<LLVector3> norm;
LLStrider<LLVector2> tc;
buff->getVertexStrider(pos);
buff->getIndexStrider(idx);
buff->getNormalStrider(norm);
buff->getTexCoord0Strider(tc);
for (U32 i = 0; i < 6; ++i)
{
idx[i] = Idx[i];
}
LLVolumeParams volume_params;
volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
LLModel* mdl = new LLModel(volume_params, 0.f);
mdl->mLabel = "BBOX"; // please adopt name from high LOD (mBaseModel) or from original model otherwise it breaks search mechanics which is name based
mdl->setNumVolumeFaces(6);
for (U8 i = 0; i < 6; ++i)
{
for (U8 j = 0; j < 4; ++j)
{
pos[j] = face_list[i][j];
}
mdl->setVolumeFaceData(i, pos, norm, tc, idx, buff->getNumVerts(), buff->getNumIndices());
}
if (validate_model(mdl))
{
LLMatrix4 mat;
std::map<std::string, LLImportMaterial> materials;
std::vector<LLModelInstance> instance_list;
instance_list.push_back(LLModelInstance(mdl, mdl->mLabel, mat, materials));
for (S32 i = LLModel::LOD_HIGH - 1; i >= 0; i--)
{
mModel[i].clear();
mModel[i].push_back(mdl);
mScene[i].clear();
mScene[i].insert(std::pair<LLMatrix4, std::vector<LLModelInstance> >(mat, instance_list));
}
}
}
void LLModelPreview::updateStatusMessages()
{

View File

@ -265,6 +265,7 @@ public:
void loadModel(std::string filename, S32 lod, bool force_disable_slm = false);
void loadModelCallback(S32 lod);
void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
void genModelBBox(); // Generate just a model BBox if we can't generate proper LOD
void generateNormals();
void restoreNormals();
U32 calcResourceCost();

View File

@ -441,6 +441,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mLandImpactsObserver(NULL),
mDirty(TRUE),
mHasSelection(TRUE),
mNeedMediaTitle(TRUE)
{
gFloaterTools = this;
@ -725,7 +726,14 @@ void LLFloaterTools::refresh()
void LLFloaterTools::draw()
{
if (mDirty)
BOOL has_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
if(!has_selection && (mHasSelection != has_selection))
{
mDirty = TRUE;
}
mHasSelection = has_selection;
if (mDirty)
{
refresh();
mDirty = FALSE;

View File

@ -223,6 +223,7 @@ public:
private:
BOOL mDirty;
BOOL mHasSelection;
BOOL mOrginalShowHighlight; //Phoenix:KC
BOOL mOpen; //Phoenix:KC

View File

@ -132,25 +132,32 @@ void LLFloaterTopObjects::setMode(U32 mode)
// static
void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data)
{
LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
if(!instance) return;
// Make sure dialog is on screen
LLFloaterReg::showInstance("top_objects");
instance->handleReply(msg, data);
//HACK: for some reason sometimes top scripts originally comes back
//with no results even though they're there
if (!instance->mObjectListIDs.size() && !instance->mInitialized)
LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
if(instance && instance->isInVisibleChain())
{
instance->handleReply(msg, data);
//HACK: for some reason sometimes top scripts originally comes back
//with no results even though they're there
if (!instance->mObjectListIDs.size() && !instance->mInitialized)
{
instance->onRefresh();
instance->mInitialized = TRUE;
}
}
else
{
instance->onRefresh();
instance->mInitialized = TRUE;
LLFloaterRegionInfo* region_info_floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
if(region_info_floater)
{
region_info_floater->enableTopButtons();
}
}
}
void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
U32 request_flags;
U32 request_flags;
U32 total_count;
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_RequestFlags, request_flags);

View File

@ -320,7 +320,11 @@ BOOL LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0) // YES
{
return perform_cutToClipboard();
const LLInventoryObject* obj = gInventory.getObject(mUUID);
LLUUID parent_uuid = obj->getParentUUID();
BOOL result = perform_cutToClipboard();
gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid);
return result;
}
return FALSE;
}

View File

@ -749,18 +749,20 @@ void LLManipRotate::renderActiveRing( F32 radius, F32 width, const LLColor4& fro
void LLManipRotate::renderSnapGuides()
{
LLVector3 grid_origin;
LLVector3 grid_scale;
LLQuaternion grid_rotation;
LLVector3 constraint_axis = getConstraintAxis();
LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale);
if (!gSavedSettings.getBOOL("SnapEnabled"))
static LLCachedControl<bool> snap_enabled(gSavedSettings, "SnapEnabled", true);
if (!snap_enabled)
{
return;
}
LLVector3 grid_origin;
LLVector3 grid_scale;
LLQuaternion grid_rotation;
LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale, true);
LLVector3 constraint_axis = getConstraintAxis();
LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter );
LLVector3 cam_at_axis;
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
@ -1294,7 +1296,7 @@ LLVector3 LLManipRotate::getConstraintAxis()
else
{
S32 axis_dir = mManipPart - LL_ROT_X;
if ((axis_dir >= 0) && (axis_dir < 3))
if ((axis_dir >= LL_NO_PART) && (axis_dir < LL_Z_ARROW))
{
axis.mV[axis_dir] = 1.f;
}

View File

@ -54,7 +54,6 @@ LLPanelExperienceLog::LLPanelExperienceLog( )
buildFromFile("panel_experience_log.xml");
}
BOOL LLPanelExperienceLog::postBuild( void )
{
LLExperienceLog* log = LLExperienceLog::getInstance();
@ -112,7 +111,7 @@ void LLPanelExperienceLog::refresh()
int itemsToSkip = mPageSize*mCurrentPage;
int items = 0;
bool moreItems = false;
LLSD events_to_save = events;
if (!events.emptyMap())
{
LLSD::map_const_iterator day = events.endMap();
@ -120,6 +119,13 @@ void LLPanelExperienceLog::refresh()
{
--day;
const LLSD& dayArray = day->second;
std::string date = day->first;
if(!LLExperienceLog::instance().isNotExpired(date))
{
events_to_save.erase(day->first);
continue;
}
int size = dayArray.size();
if(itemsToSkip > size)
{
@ -164,6 +170,7 @@ void LLPanelExperienceLog::refresh()
}
} while (day != events.beginMap());
}
LLExperienceLog::getInstance()->setEventsToSave(events_to_save);
if(waiting)
{
mEventList->deleteAllItems();
@ -237,12 +244,8 @@ void LLPanelExperienceLog::notifyChanged()
void LLPanelExperienceLog::logSizeChanged()
{
int value = (int)(getChild<LLSpinCtrl>("logsizespinner")->get());
bool dirty = value > 0 && value < LLExperienceLog::instance().getMaxDays();
LLExperienceLog::instance().setMaxDays(value);
if(dirty)
{
refresh();
}
refresh();
}
void LLPanelExperienceLog::onSelectionChanged()

View File

@ -49,6 +49,7 @@
#include "llmaterialmgr.h"
#include "llmediaentry.h"
#include "llnotificationsutil.h"
#include "llradiogroup.h"
#include "llresmgr.h"
#include "llselectmgr.h"
#include "llspinctrl.h"
@ -92,10 +93,10 @@ std::string USE_TEXTURE;
LLRender::eTexIndex LLPanelFace::getTextureChannelToEdit()
{
LLComboBox* combobox_matmedia = getChild<LLComboBox>("combobox matmedia");
LLComboBox* combobox_mattype = getChild<LLComboBox>("combobox mattype");
LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
LLRender::eTexIndex channel_to_edit = (combobox_matmedia && combobox_matmedia->getCurrentIndex() == MATMEDIA_MATERIAL) ?
(combobox_mattype ? (LLRender::eTexIndex)combobox_mattype->getCurrentIndex() : LLRender::DIFFUSE_MAP) : LLRender::DIFFUSE_MAP;
(radio_mat_type ? (LLRender::eTexIndex)radio_mat_type->getSelectedIndex() : LLRender::DIFFUSE_MAP) : LLRender::DIFFUSE_MAP;
channel_to_edit = (channel_to_edit == LLRender::NORMAL_MAP) ? (getCurrentNormalMap().isNull() ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit;
channel_to_edit = (channel_to_edit == LLRender::SPECULAR_MAP) ? (getCurrentSpecularMap().isNull() ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit;
@ -262,7 +263,6 @@ BOOL LLPanelFace::postBuild()
//LLComboBox* mComboTexGen;
//LLComboBox* mComboMatMedia;
//LLComboBox* mComboMatType;
//LLCheckBoxCtrl *mCheckFullbright;
@ -383,12 +383,12 @@ BOOL LLPanelFace::postBuild()
mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
}
mComboMatType = getChild<LLComboBox>("combobox mattype");
if(mComboMatType)
{
mComboMatType->setCommitCallback(LLPanelFace::onCommitMaterialType, this);
mComboMatType->selectNthItem(MATTYPE_DIFFUSE);
}
mRadioMatType = getChild<LLRadioGroup>("radio_material_type");
if(mRadioMatType)
{
mRadioMatType->setCommitCallback(LLPanelFace::onCommitMaterialType, this);
mRadioMatType->selectNthItem(MATTYPE_DIFFUSE);
}
mCtrlGlow = getChild<LLSpinCtrl>("glow");
if(mCtrlGlow)
@ -786,20 +786,21 @@ void LLPanelFace::updateUI()
}
mComboMatMedia->setEnabled(editable);
//LLComboBox* combobox_mattype = getChild<LLComboBox>("combobox mattype");
if (mComboMatType)
//LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
if(mRadioMatType)
{
if (mComboMatType->getCurrentIndex() < MATTYPE_DIFFUSE)
{
mComboMatType->selectNthItem(MATTYPE_DIFFUSE);
}
if (mRadioMatType->getSelectedIndex() < MATTYPE_DIFFUSE)
{
mRadioMatType->selectNthItem(MATTYPE_DIFFUSE);
}
}
else
{
LL_WARNS("Materials") << "failed getChild for 'combobox mattype'" << LL_ENDL;
LL_WARNS("Materials") << "failed getChild for 'radio_material_type'" << LL_ENDL;
}
mComboMatType->setEnabled(editable);
mRadioMatType->setEnabled(editable);
updateVisibility();
bool identical = true; // true because it is anded below
@ -1329,8 +1330,7 @@ void LLPanelFace::updateUI()
BOOL identical_repeats = true;
F32 repeats = 1.0f;
U32 material_type = (mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? mComboMatType->getCurrentIndex() : MATTYPE_DIFFUSE;
U32 material_type = (mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? mRadioMatType->getSelectedIndex() : MATTYPE_DIFFUSE;
LLSelectMgr::getInstance()->setTextureChannel(LLRender::eTexIndex(material_type));
switch (material_type)
@ -1601,23 +1601,22 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
void LLPanelFace::updateVisibility()
{
LLComboBox* combo_matmedia = getChild<LLComboBox>("combobox matmedia");
LLComboBox* combo_mattype = getChild<LLComboBox>("combobox mattype");
LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
LLComboBox* combo_shininess = getChild<LLComboBox>("combobox shininess");
LLComboBox* combo_bumpiness = getChild<LLComboBox>("combobox bumpiness");
if (!combo_mattype || !combo_matmedia || !combo_shininess || !combo_bumpiness)
if (!radio_mat_type || !combo_matmedia || !combo_shininess || !combo_bumpiness)
{
LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL;
return;
}
U32 materials_media = combo_matmedia->getCurrentIndex();
U32 material_type = combo_mattype->getCurrentIndex();
U32 material_type = radio_mat_type->getSelectedIndex();
bool show_media = (materials_media == MATMEDIA_MEDIA) && combo_matmedia->getEnabled();
bool show_texture = (show_media || ((material_type == MATTYPE_DIFFUSE) && combo_matmedia->getEnabled()));
bool show_bumpiness = (!show_media) && (material_type == MATTYPE_NORMAL) && combo_matmedia->getEnabled();
bool show_shininess = (!show_media) && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled();
getChildView("combobox mattype")->setVisible(!show_media);
getChildView("radio_material_type")->setVisible(!show_media);
// <FS:CR> FIRE-11407 - Be consistant and hide this with the other controls
//getChildView("rptctrl")->setVisible(true);
getChildView("rptctrl")->setVisible(combo_matmedia->getEnabled());
// and other additions...
getChildView("flipTextureScaleU")->setVisible(combo_matmedia->getEnabled());
@ -1747,9 +1746,9 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
}
LLComboBox* combo_matmedia = getChild<LLComboBox>("combobox matmedia");
LLComboBox* combo_mattype = getChild<LLComboBox>("combobox mattype");
LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
U32 materials_media = combo_matmedia->getCurrentIndex();
U32 material_type = combo_mattype->getCurrentIndex();
U32 material_type = radio_mat_type->getSelectedIndex();
bool show_media = (materials_media == MATMEDIA_MEDIA) && combo_matmedia->getEnabled();
bool show_shininess = (!show_media) && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled();
U32 shiny_value = comboShiny->getCurrentIndex();
@ -1831,11 +1830,11 @@ void LLPanelFace::updateAlphaControls()
mat_media = mComboMatMedia->getCurrentIndex();
}
//LLComboBox* combobox_mattype = getChild<LLComboBox>("combobox mattype");
U32 mat_type = MATTYPE_DIFFUSE;
if (mComboMatType)
//LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
if(mRadioMatType)
{
mat_type = mComboMatType->getCurrentIndex();
mat_type = mRadioMatType->getSelectedIndex();
}
show_alphactrls = show_alphactrls && (mat_media == MATMEDIA_MATERIAL);
@ -2130,12 +2129,11 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
LLUICtrl* repeats_ctrl = self->getChild<LLUICtrl>("rptctrl");
LLComboBox* combo_matmedia = self->getChild<LLComboBox>("combobox matmedia");
LLComboBox* combo_mattype = self->getChild<LLComboBox>("combobox mattype");
LLRadioGroup* radio_mat_type = self->getChild<LLRadioGroup>("radio_material_type");
U32 materials_media = combo_matmedia->getCurrentIndex();
U32 material_type = (materials_media == MATMEDIA_MATERIAL) ? combo_mattype->getCurrentIndex() : 0;
U32 material_type = (materials_media == MATMEDIA_MATERIAL) ? radio_mat_type->getSelectedIndex() : 0;
F32 repeats_per_meter = repeats_ctrl->getValue().asReal();
F32 obj_scale_s = 1.0f;
@ -2259,11 +2257,13 @@ void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata)
void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)
{
LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL;
if (!mComboMatType)
//LLRadioGroup* radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
//if(radio_mat_type)
if (!mRadioMatType)
{
return;
return;
}
U32 mattype = mComboMatType->getCurrentIndex();
U32 mattype = mRadioMatType->getSelectedIndex();
std::string which_control="texture control";
switch (mattype)
{

View File

@ -40,6 +40,7 @@ class LLColorSwatchCtrl;
class LLComboBox;
class LLInventoryItem;
class LLLineEditor;
class LLRadioGroup;
class LLSpinCtrl;
class LLTextBox;
class LLTextureCtrl;
@ -263,7 +264,7 @@ private:
LLComboBox* mComboTexGen;
LLComboBox* mComboMatMedia;
LLComboBox* mComboMatType;
LLRadioGroup* mRadioMatType;
LLCheckBoxCtrl *mCheckFullbright;

View File

@ -1015,7 +1015,11 @@ void LLTaskTextureBridge::openItem()
LLPreviewTexture* preview = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
if(preview)
{
preview->setAuxItem(findItem());
LLInventoryItem* item = findItem();
if(item)
{
preview->setAuxItem(item);
}
preview->setObjectID(mPanel->getTaskUUID());
}
}
@ -1305,7 +1309,10 @@ void LLTaskNotecardBridge::openItem()
|| object->permModify()
|| gAgent.isGodlike())
{
LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES);
LLSD floater_key;
floater_key["taskid"] = mPanel->getTaskUUID();
floater_key["itemid"] = mUUID;
LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", floater_key, TAKE_FOCUS_YES);
if (preview)
{
preview->setObjectID(mPanel->getTaskUUID());

View File

@ -1066,6 +1066,9 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
case LLAssetType::AT_BODYPART:
applyListViewFilter(LVIT_BODYPART);
break;
case LLAssetType::AT_GESTURE:
applyListViewFilter(LVIT_GESTURES);
break;
case LLAssetType::AT_CLOTHING:
default:
applyListViewFilter(LVIT_CLOTHING);

View File

@ -80,6 +80,7 @@ public:
{
LVIT_ALL = 0,
LVIT_CLOTHING,
LVIT_GESTURES,
LVIT_BODYPART,
LVIT_ATTACHMENT,
LVIT_SHAPE,

View File

@ -1495,8 +1495,12 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata)
}
else if (chosen_item == "view_icons")
{
mAllFriendList->toggleIcons();
mOnlineFriendList->toggleIcons();
std::string param = mAllFriendList->getIconParamName();
gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride")));
gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride")));
gSavedSettings.setBOOL(mOnlineFriendList->getIconParamName(), gSavedSettings.getBOOL(param));
mAllFriendList->setIconsVisible(gSavedSettings.getBOOL(param));
mOnlineFriendList->setIconsVisible(gSavedSettings.getBOOL(param));
}
else if (chosen_item == "view_permissions")
{
@ -1532,7 +1536,10 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata)
}
else if (chosen_item == "view_icons")
{
mNearbyList->toggleIcons();
std::string param = mNearbyList->getIconParamName();
gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride")));
gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride")));
mNearbyList->setIconsVisible(gSavedSettings.getBOOL(param));
}
else if (chosen_item == "sort_distance")
{
@ -1551,6 +1558,8 @@ bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata)
return sort_order == E_SORT_BY_NAME;
if (item == "sort_distance")
return sort_order == E_SORT_BY_DISTANCE;
if (item == "view_icons")
return gSavedSettings.getBOOL(mNearbyList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride");
return false;
}
@ -1569,7 +1578,10 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata)
}
else if (chosen_item == "view_icons")
{
mRecentList->toggleIcons();
std::string param = mRecentList->getIconParamName();
gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride")));
gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride")));
mRecentList->setIconsVisible(gSavedSettings.getBOOL(param));
}
}
@ -1582,6 +1594,8 @@ bool LLPanelPeople::onFriendsViewSortMenuItemCheck(const LLSD& userdata)
return sort_order == E_SORT_BY_NAME;
if (item == "sort_status")
return sort_order == E_SORT_BY_STATUS;
if (item == "view_icons")
return gSavedSettings.getBOOL(mAllFriendList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride");
// <FS:Ansariel> FIRE-5283: Sort by username
if (item == "sort_username")
return sort_order == E_SORT_BY_USERNAME;
@ -1599,6 +1613,8 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata)
return sort_order == E_SORT_BY_MOST_RECENT;
if (item == "sort_name")
return sort_order == E_SORT_BY_NAME;
if (item == "view_icons")
return gSavedSettings.getBOOL(mRecentList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride");
return false;
}

View File

@ -148,6 +148,9 @@ BOOL LLPanelPickInfo::postBuild()
mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight();
mScrollingPanelWidth = mScrollingPanel->getRect().getWidth();
LLTextEditor* text_desc = getChild<LLTextEditor>(XML_DESC);
text_desc->setContentTrusted(false);
return TRUE;
}

View File

@ -223,7 +223,7 @@ void LLPanelPlaceInfo::setErrorStatus(S32 status, const std::string& reason)
// virtual
void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
{
if(parcel_data.snapshot_id.notNull())
if(mSnapshotCtrl)
{
mSnapshotCtrl->setImageAssetID(parcel_data.snapshot_id);
}

View File

@ -242,6 +242,8 @@ void LLPanelPlaceProfile::resetLocation()
mSubdivideText->setValue(loading);
mResaleText->setValue(loading);
mSaleToText->setValue(loading);
getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(TRUE);
}
// virtual
@ -556,6 +558,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
F32 dwell;
BOOL for_sale;
vpm->getDisplayInfo(&area, &claim_price, &rent_price, &for_sale, &dwell);
mForSalePanel->setVisible(for_sale);
if (for_sale)
{
const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
@ -574,8 +577,6 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
mSaleToText->setText(getString("anyone"));
}
mForSalePanel->setVisible(for_sale);
// <FS:ND> getString returns a temporary, taking the c_str will point to a location that is destroyed.
// const U8* sign = (U8*)getString("price_text").c_str();
@ -644,6 +645,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
mYouAreHerePanel->setVisible(is_current_parcel && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)));
// [/RLVa:KB]
getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale);
mAccordionCtrl->arrange();
}
void LLPanelPlaceProfile::updateEstateName(const std::string& name)

View File

@ -168,7 +168,7 @@ protected:
{
bp_selected = true;
}
else if (type == LLAssetType::AT_OBJECT)
else if (type == LLAssetType::AT_OBJECT || type == LLAssetType::AT_GESTURE)
{
attachments_selected = true;
}

View File

@ -262,6 +262,7 @@ void LLPreviewNotecard::loadAsset()
else
{
LLHost source_sim = LLHost::invalid;
LLSD* user_data = new LLSD();
if (mObjectUUID.notNull())
{
LLViewerObject *objectp = gObjectList.findObject(mObjectUUID);
@ -280,7 +281,13 @@ void LLPreviewNotecard::loadAsset()
mAssetStatus = PREVIEW_ASSET_LOADED;
return;
}
user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID);
}
else
{
user_data = new LLSD(mItemUUID);
}
gAssetStorage->getInvItemAsset(source_sim,
gAgent.getID(),
gAgent.getSessionID(),
@ -290,7 +297,7 @@ void LLPreviewNotecard::loadAsset()
item->getAssetUUID(),
item->getType(),
&onLoadComplete,
(void*)new LLUUID(mItemUUID),
(void*)user_data,
TRUE);
mAssetStatus = PREVIEW_ASSET_LOADING;
}
@ -333,9 +340,8 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
void* user_data, S32 status, LLExtStat ext_status)
{
LL_INFOS() << "LLPreviewNotecard::onLoadComplete()" << LL_ENDL;
LLUUID* item_id = (LLUUID*)user_data;
LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(*item_id));
LLSD* floater_key = (LLSD*)user_data;
LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", *floater_key);
if( preview )
{
if(0 == status)
@ -395,7 +401,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
preview->mAssetStatus = PREVIEW_ASSET_ERROR;
}
}
delete item_id;
delete floater_key;
}
// static

View File

@ -1285,7 +1285,7 @@ void LLSelectMgr::setGridMode(EGridMode mode)
updateSelectionCenter();
}
void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &scale)
void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &scale, bool for_snap_guides)
{
mGridObjects.cleanupNodes();
@ -1310,7 +1310,15 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
}
else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull())
{
mGridRotation = first_grid_object->getRenderRotation();
LLSelectNode *node = mSelectedObjects->findNode(first_grid_object);
if (!for_snap_guides && node)
{
mGridRotation = node->mSavedRotation;
}
else
{
mGridRotation = first_grid_object->getRenderRotation();
}
LLVector4a min_extents(F32_MAX);
LLVector4a max_extents(-F32_MAX);

View File

@ -591,7 +591,7 @@ public:
void clearGridObjects();
void setGridMode(EGridMode mode);
EGridMode getGridMode() { return mGridMode; }
void getGrid(LLVector3& origin, LLQuaternion& rotation, LLVector3 &scale);
void getGrid(LLVector3& origin, LLQuaternion& rotation, LLVector3 &scale, bool for_snap_guides = false);
BOOL getTEMode() { return mTEMode; }
void setTEMode(BOOL b) { mTEMode = b; }

View File

@ -467,7 +467,10 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare
if (old_rect.getWidth() != width || old_rect.getHeight() != height)
{
LL_DEBUGS() << "window reshaped, updating thumbnail" << LL_ENDL;
updateSnapshot(TRUE);
if (mViewContainer && mViewContainer->isInVisibleChain())
{
updateSnapshot(TRUE);
}
}
}

View File

@ -3855,16 +3855,10 @@ public:
LLVector4a *mTangent;
LLDrawable* mHit;
BOOL mPickTransparent;
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL mPickRigged;
// [/SL:KB]
// LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent,
// S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged,
S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [/SL:KB]
S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
: mStart(start),
mEnd(end),
mFaceHit(face_hit),
@ -3873,11 +3867,8 @@ public:
mNormal(normal),
mTangent(tangent),
mHit(NULL),
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
mPickTransparent(pick_transparent),
mPickRigged(pick_rigged)
// [/SL:KB]
// mPickTransparent(pick_transparent)
{
}
@ -4015,15 +4006,9 @@ public:
if (vobj->isAvatar())
{
LLVOAvatar* avatar = (LLVOAvatar*) vobj;
// if (avatar->isSelf() && LLFloater::isVisible(gFloaterTools))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if ( (mPickRigged) || ((avatar->isSelf()) && (LLFloater::isVisible(gFloaterTools))) )
// [/SL:KB]
if ((mPickRigged) || ((avatar->isSelf()) && (LLFloater::isVisible(gFloaterTools))))
{
// LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent);
// [/SL:KB]
if (hit)
{
mEnd = intersection;
@ -4039,10 +4024,7 @@ public:
}
}
// if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent))
// [/SL:KB]
{
mEnd = intersection; // shorten ray so we only find CLOSER hits
if (mIntersection)
@ -4060,10 +4042,8 @@ public:
} LL_ALIGN_POSTFIX(16);
LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_transparent,
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit, // return the face hit
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
@ -4072,10 +4052,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co
)
{
// LLOctreeIntersect intersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLOctreeIntersect intersect(start, end, pick_transparent, pick_rigged, face_hit, intersection, tex_coord, normal, tangent);
// [/SL:KB]
LLDrawable* drawable = intersect.check(mOctree);
return drawable;

View File

@ -386,9 +386,7 @@ public:
LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@ -43,6 +43,7 @@ LLSysWellItem::LLSysWellItem(const Params& p) : LLPanel(p),
mTitle = getChild<LLTextBox>("title");
mCloseBtn = getChild<LLButton>("close_btn");
mTitle->setContentTrusted(false);
mTitle->setValue(p.title);
mCloseBtn->setClickedCallback(boost::bind(&LLSysWellItem::onClickCloseBtn,this));

View File

@ -111,6 +111,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi
LLStringUtil::format(timeStr, substitution);
LLViewerTextEditor* pMessageText = getChild<LLViewerTextEditor>("message");
pMessageText->setContentTrusted(false);
pMessageText->clear();
LLStyle::Params style;

View File

@ -872,7 +872,7 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE, FALSE));
// [/SL:KB]
// pick(gViewerWindow->pickImmediate(x, y, FALSE));
// pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE));
}
else
{
@ -880,7 +880,7 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE, FALSE);
// [/SL:KB]
// gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE);
// gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE);
}
*acceptance = mLastAccept;

View File

@ -136,7 +136,10 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
// <FS:Ansariel> Viewer-Bear merge (MAINT-5416: select rigged attachments): Since LL swapped parameter order, we need to take account of that or we produce fail like LL did :)
//gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE);
gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE, TRUE);
// <FS:Ansariel>
return TRUE;
}

View File

@ -115,7 +115,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
mMouseDownY = y;
//left mouse down always picks transparent
// mPick = gViewerWindow->pickImmediate(x, y, TRUE);
// mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE, FALSE);
// [/SL:KB]
@ -593,7 +593,7 @@ void LLToolPie::selectionPropertiesReceived()
BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
{
// mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE);
// mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE, FALSE);
// [/SL:KB]
@ -662,7 +662,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
else
{
// perform a separate pick that detects transparent objects since they respond to 1-click actions
// LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE);
// LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE, FALSE);
// [/SL:KB]

View File

@ -117,7 +117,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
// Viewer-side pick to find the right sim to create the object on.
// First find the surface the object will be created on.
// LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE);
// LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE, FALSE);
// [/SL:KB]

View File

@ -70,7 +70,7 @@ BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE, FALSE);
// [/SL:KB]
// mPick = gViewerWindow->pickImmediate(x, y, TRUE);
// mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE);
// Pass mousedown to agent
LLTool::handleMouseDown(x, y, mask);

View File

@ -71,7 +71,7 @@ void dialog_refresh_all(void);
BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask)
{
// handlePick(gViewerWindow->pickImmediate(x, y, TRUE));
// handlePick(gViewerWindow->pickImmediate(x, y, TRUE, FALSE));
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
handlePick(gViewerWindow->pickImmediate(x, y, TRUE, FALSE, FALSE));
// [/SL:KB]

View File

@ -4192,9 +4192,7 @@ LLViewerObject* LLViewerObject::getRootEdit() const
BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,

View File

@ -271,9 +271,7 @@ public:
virtual BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@ -1216,7 +1216,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (prim_media_dnd_enabled)
{
// LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/ );
// LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/, FALSE );
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/, FALSE, FALSE);
// [/SL:KB]
@ -3360,7 +3360,6 @@ void LLViewerWindow::updateUI()
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST))
{
gDebugRaycastFaceHit = -1;
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE,
&gDebugRaycastFaceHit,
&gDebugRaycastIntersection,
@ -3369,15 +3368,6 @@ void LLViewerWindow::updateUI()
&gDebugRaycastTangent,
&gDebugRaycastStart,
&gDebugRaycastEnd);
// [/SL:KB]
// gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
// &gDebugRaycastFaceHit,
// &gDebugRaycastIntersection,
// &gDebugRaycastTexCoord,
// &gDebugRaycastNormal,
// &gDebugRaycastBinormal,
// &gDebugRaycastStart,
// &gDebugRaycastEnd);
gDebugRaycastParticle = gPipeline.lineSegmentIntersectParticle(gDebugRaycastStart, gDebugRaycastEnd, &gDebugRaycastParticleIntersection, NULL);
}
@ -4214,11 +4204,8 @@ void LLViewerWindow::pickAsync( S32 x,
MASK mask,
void (*callback)(const LLPickInfo& info),
BOOL pick_transparent,
// BOOL pick_unselectable)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_unselectable,
BOOL pick_rigged)
// [/SL:KB]
BOOL pick_rigged,
BOOL pick_unselectable)
{
BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
@ -4228,10 +4215,7 @@ void LLViewerWindow::pickAsync( S32 x,
pick_transparent = TRUE;
}
// LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, pick_unselectable, callback);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, pick_rigged, TRUE, pick_unselectable, callback);
// [/SL:KB]
LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback);
schedulePick(pick_info);
}
@ -4287,10 +4271,7 @@ void LLViewerWindow::returnEmptyPicks()
}
// Performs the GL object/land pick.
//LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_particle)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_particle, BOOL pick_rigged)
// [/SL:KB]
LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle)
{
BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha)
@ -4302,10 +4283,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans
// shortcut queueing in mPicks and just update mLastPick in place
MASK key_mask = gKeyboard->currentMask(TRUE);
//mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, FALSE, NULL);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, pick_rigged, TRUE, FALSE, NULL);
// [/SL:KB]
mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, TRUE, FALSE, NULL);
mLastPick.fetchResults();
return mLastPick;
@ -4341,9 +4319,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
LLViewerObject *this_object,
S32 this_face,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit,
LLVector4a *intersection,
LLVector2 *uv,
@ -4414,25 +4390,16 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
{
if (this_object->isHUDAttachment()) // is a HUD object?
{
// if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent,
// face_hit, intersection, uv, normal, tangent))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, pick_rigged,
face_hit, intersection, uv, normal, tangent))
// [/SL:KB]
{
found = this_object;
}
}
else // is a world object
{
// if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent,
// face_hit, intersection, uv, normal, tangent))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged,
face_hit, intersection, uv, normal, tangent))
// [/SL:KB]
{
found = this_object;
}
@ -4452,13 +4419,8 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
// [/RLVa:KB]
if (!found) // if not found in HUD, look in world:
{
// found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent,
// face_hit, intersection, uv, normal, tangent);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged,
face_hit, intersection, uv, normal, tangent);
// [/SL:KB]
if (found && !pick_transparent)
{
gDebugRaycastIntersection = *intersection;
@ -5913,21 +5875,16 @@ LLPickInfo::LLPickInfo()
mBinormal(),
mHUDIcon(NULL),
mPickTransparent(FALSE),
// mPickParticle(FALSE)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
mPickParticle(FALSE),
mPickRigged(FALSE)
// [/SL:KB]
mPickRigged(FALSE),
mPickParticle(FALSE)
{
}
LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
BOOL pick_transparent,
BOOL pick_rigged,
BOOL pick_particle,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
BOOL pick_uv_coords,
BOOL pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info))
@ -5945,12 +5902,9 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
mBinormal(),
mHUDIcon(NULL),
mPickTransparent(pick_transparent),
mPickRigged(pick_rigged),
mPickParticle(pick_particle),
// mPickUnselectable(pick_unselectable)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
mPickUnselectable(pick_unselectable),
mPickRigged(pick_rigged)
// [/SL:KB]
mPickUnselectable(pick_unselectable)
{
}
@ -5978,14 +5932,9 @@ void LLPickInfo::fetchResults()
delta.setSub(intersection, origin);
icon_dist = delta.getLength3().getF32();
}
// LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f,
// NULL, -1, mPickTransparent, &face_hit,
// &intersection, &uv, &normal, &binormal);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f,
NULL, -1, mPickTransparent, mPickRigged, &face_hit,
&intersection, &uv, &normal, &tangent, &start, &end);
// [/SL:KB]
mPickPt = mMousePt;
@ -6128,14 +6077,6 @@ void LLPickInfo::getSurfaceInfo()
if (objectp)
{
// if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
// objectp, -1, mPickTransparent,
// &mObjectFace,
// &mIntersection,
// &mSTCoords,
// &mNormal,
// &mBinormal))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
objectp, -1, mPickTransparent, mPickRigged,
&mObjectFace,
@ -6143,7 +6084,6 @@ void LLPickInfo::getSurfaceInfo()
&mSTCoords,
&normal,
&tangent))
// [/SL:KB]
{
// if we succeeded with the intersect above, compute the texture coordinates:

View File

@ -90,10 +90,8 @@ public:
LLPickInfo(const LLCoordGL& mouse_pos,
MASK keyboard_mask,
BOOL pick_transparent,
BOOL pick_particle,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
BOOL pick_particle,
BOOL pick_surface_info,
BOOL pick_unselectable,
void (*pick_callback)(const LLPickInfo& pick_info));
@ -127,11 +125,9 @@ public:
LLVector4 mTangent;
LLVector3 mBinormal;
BOOL mPickTransparent;
BOOL mPickRigged;
BOOL mPickParticle;
BOOL mPickUnselectable;
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL mPickRigged;
// [/SL:KB]
void getSurfaceInfo();
private:
@ -371,23 +367,14 @@ public:
void performPick();
void returnEmptyPicks();
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
void pickAsync( S32 x,
S32 y_from_bot,
MASK mask,
void (*callback)(const LLPickInfo& pick_info),
BOOL pick_transparent = FALSE,
BOOL pick_unselectable = FALSE,
BOOL pick_rigged = FALSE);
LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE, BOOL pick_rigged = FALSE);
// [/SL:KB]
// void pickAsync( S32 x,
// S32 y_from_bot,
// MASK mask,
// void (*callback)(const LLPickInfo& pick_info),
// BOOL pick_transparent = FALSE,
// BOOL pick_unselectable = FALSE);
// LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE);
BOOL pick_rigged = FALSE,
BOOL pick_unselectable = FALSE);
LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE);
LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth,
LLVector4a* intersection);
@ -395,9 +382,7 @@ public:
LLViewerObject *this_object = NULL,
S32 this_face = -1,
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL,
LLVector4a *intersection = NULL,
LLVector2 *uv = NULL,

View File

@ -1588,9 +1588,7 @@ void LLVOAvatar::renderJoints()
BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@ -1697,9 +1695,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
S32 face,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit,
LLVector4a* intersection,
LLVector2* tex_coord,
@ -1737,10 +1733,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
{
LLViewerObject* attached_object = (*attachment_iter);
// if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, tangent))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
// [/SL:KB]
{
local_end = local_intersection;
if (intersection)

View File

@ -166,9 +166,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@ -177,9 +175,7 @@ public:
LLViewerObject* lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@ -814,12 +814,8 @@ void LLVOGrass::updateDrawable(BOOL force_damped)
}
// virtual
//BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
// LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [/SL:KB]
{
BOOL ret = FALSE;
if (!mbCanSelect ||

View File

@ -78,9 +78,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@ -936,12 +936,8 @@ void LLVOSurfacePatch::getGeomSizesEast(const S32 stride, const S32 east_stride,
}
}
//BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
// LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [/SL:KB]
{

View File

@ -84,9 +84,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@ -1121,13 +1121,8 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
mDrawable->setPositionGroup(pos);
}
//BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
// LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [/SL:KB]
{
if (!lineSegmentBoundingBox(start, end))

View File

@ -108,9 +108,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@ -3966,13 +3966,8 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const
}
//BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
// LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp,
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
// [/SL:KB]
{
if (!mbCanSelect
|| mDrawable->isDead()
@ -3989,15 +3984,12 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
if (mDrawable->isState(LLDrawable::RIGGED))
{
// if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf())
if ((pick_rigged) || ((getAvatar()->isSelf()) && (LLFloater::isVisible(gFloaterTools))))
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
if ( (pick_rigged) || ( getAvatar() && getAvatar()->isSelf() && (LLFloater::isVisible(gFloaterTools))) )
// [/SL:KB]
{
// updateRiggedVolume();
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
updateRiggedVolume(true);
// [/SL:KB]
volume = mRiggedVolume;
transform = false;
}
@ -4176,13 +4168,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
bool LLVOVolume::treatAsRigged()
{
// return LLFloater::isVisible(gFloaterTools) &&
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
return isSelected() &&
// [/SL:KB]
isAttachment() &&
// getAvatar() &&
// getAvatar()->isSelf() &&
isAttachment() &&
mDrawable.notNull() &&
mDrawable->isState(LLDrawable::RIGGED);
}
@ -4201,18 +4188,12 @@ void LLVOVolume::clearRiggedVolume()
}
}
//void LLVOVolume::updateRiggedVolume()
// [SL:KB]
void LLVOVolume::updateRiggedVolume(bool force_update)
// [/SL:KB]
{
//Update mRiggedVolume to match current animation frame of avatar.
//Also update position/size in octree.
// if (!treatAsRigged())
// [SL:KB]
if ( (!force_update) && (!treatAsRigged()) )
// [/SL:KB]
if ((!force_update) && (!treatAsRigged()))
{
clearRiggedVolume();

View File

@ -141,9 +141,7 @@ public:
/*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged = FALSE,
// [/SL:KB]
S32* face_hit = NULL, // which face was hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point
@ -316,10 +314,7 @@ public:
//rigged volume update (for raycasting)
// void updateRiggedVolume();
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
void updateRiggedVolume(bool force_update = false);
// [/SL:KB]
LLRiggedVolume* getRiggedVolume();
//returns true if volume should be treated as a rigged volume

View File

@ -35,6 +35,7 @@
#include "llappearancemgr.h"
#include "llinventoryfunctions.h"
#include "llinventoryicon.h"
#include "llgesturemgr.h"
#include "lltransutil.h"
#include "llviewerattachmenu.h"
// [SL:KB] - Patch: Inventory-AttachmentEdit - Checked: 2010-09-04 (Catznip-2.2.0a) | Added: Catznip-2.1.2a
@ -62,7 +63,8 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat,
{
if((item->getType() == LLAssetType::AT_CLOTHING)
|| (item->getType() == LLAssetType::AT_BODYPART)
|| (item->getType() == LLAssetType::AT_OBJECT))
|| (item->getType() == LLAssetType::AT_OBJECT)
|| (item->getType() == LLAssetType::AT_GESTURE))
{
return TRUE;
}
@ -498,6 +500,7 @@ LLWearableItemTypeNameComparator::LLWearableItemTypeNameComparator()
mWearableOrder[LLAssetType::AT_CLOTHING] = LLWearableTypeOrder(ORDER_RANK_1, false, false);
mWearableOrder[LLAssetType::AT_OBJECT] = LLWearableTypeOrder(ORDER_RANK_2, true, true);
mWearableOrder[LLAssetType::AT_BODYPART] = LLWearableTypeOrder(ORDER_RANK_3, false, true);
mWearableOrder[LLAssetType::AT_GESTURE] = LLWearableTypeOrder(ORDER_RANK_4, true, false);
}
void LLWearableItemTypeNameComparator::setOrder(LLAssetType::EType items_of_type, LLWearableItemTypeNameComparator::ETypeListOrder order_priority, bool sort_asset_items_by_name, bool sort_wearable_items_by_name)
@ -1070,6 +1073,10 @@ void LLWearableItemsList::ContextMenu::updateMask(U32& mask, LLAssetType::EType
{
mask |= MASK_ATTACHMENT;
}
else if (at == LLAssetType::AT_GESTURE)
{
mask |= MASK_GESTURE;
}
else
{
mask |= MASK_UNKNOWN;

View File

@ -310,6 +310,7 @@ public:
ORDER_RANK_1 = 1,
ORDER_RANK_2,
ORDER_RANK_3,
ORDER_RANK_4,
ORDER_RANK_UNKNOWN
};
@ -419,7 +420,8 @@ public:
MASK_CLOTHING = 0x01,
MASK_BODYPART = 0x02,
MASK_ATTACHMENT = 0x04,
MASK_UNKNOWN = 0x08,
MASK_GESTURE = 0x08,
MASK_UNKNOWN = 0x16,
};
/* virtual */ LLContextMenu* createMenu();

View File

@ -7171,10 +7171,8 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start,
}
LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_transparent,
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit,
LLVector4a* intersection, // return the intersection point
LLVector2* tex_coord, // return the texture coordinates of the intersection point
@ -7206,10 +7204,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
LLSpatialPartition* part = region->getSpatialPartition(j);
if (part && hasRenderType(part->mDrawableType))
{
// LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent);
// [/SL:KB]
if (hit)
{
drawable = hit;
@ -7266,10 +7261,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE);
if (part && hasRenderType(part->mDrawableType))
{
// LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent);
// [/SL:KB]
if (hit)
{
LLVector4a delta;
@ -7357,10 +7349,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD);
if (part)
{
// LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent);
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, face_hit, intersection, tex_coord, normal, tangent);
// [/SL:KB]
if (hit)
{
drawable = hit;

View File

@ -183,9 +183,7 @@ public:
//get the object between start and end that's closest to start.
LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end,
BOOL pick_transparent,
// [SL:KB] - Patch: UI-PickRiggedAttachment | Checked: 2012-07-12 (Catznip-3.3)
BOOL pick_rigged,
// [/SL:KB]
S32* face_hit, // return the face hit
LLVector4a* intersection = NULL, // return the intersection point
LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point

View File

@ -59,6 +59,19 @@
function="IMFloaterContainer.Check"
parameter="sort_participants_by_recent" />
</menu_item_check>
<menu_item_separator
layout="topleft" />
<menu_item_check
label="View people icons"
layout="topleft"
name="view_icons">
<on_click
function="IMFloaterContainer.Action"
parameter="view_icons" />
<on_check
function="IMFloaterContainer.Check"
parameter="view_icons" />
</menu_item_check>
<menu_item_separator
layout="topleft" />
<menu_item_call

View File

@ -39,8 +39,8 @@
function="People.Friends.ViewSort.Action"
parameter="view_icons" />
<menu_item_check.on_check
function="CheckControl"
parameter="FriendsListShowIcons" />
function="People.Friends.ViewSort.CheckItem"
parameter="view_icons" />
</menu_item_check>
<menu_item_check name="view_permissions" label="View Permissions Granted">
<menu_item_check.on_click

View File

@ -39,8 +39,8 @@
function="People.Nearby.ViewSort.Action"
parameter="view_icons" />
<menu_item_check.on_check
function="CheckControl"
parameter="NearbyListShowIcons" />
function="People.Nearby.ViewSort.CheckItem"
parameter="view_icons"/>
</menu_item_check>
<menu_item_check name ="view_map" label="View Map">
<menu_item_check.on_check

View File

@ -29,7 +29,7 @@
function="People.Recent.ViewSort.Action"
parameter="view_icons" />
<menu_item_check.on_check
function="CheckControl"
parameter="RecentListShowIcons" />
function="People.Recent.ViewSort.CheckItem"
parameter="view_icons" />
</menu_item_check>
</toggleable_menu>

View File

@ -117,26 +117,37 @@
name="Media"
value="Media" />
</combo_box>
<combo_box
height="23"
layout="topleft"
left_pad="10"
name="combobox mattype"
top_delta="0"
width="155">
<combo_box.item
label="Texture (diffuse)"
name="Texture (diffuse)"
value="Texture (diffuse)" />
<combo_box.item
label="Bumpiness (normal)"
name="Bumpiness (normal)"
value="Bumpiness (normal)" />
<combo_box.item
label="Shininess (specular)"
name="Shininess (specular)"
value="Shininess (specular)" />
</combo_box>
<radio_group
control_name="ComboMaterialType"
height="50"
layout="topleft"
left_pad="20"
top_delta="-10"
width="150"
visible = "false"
name="radio_material_type">
<radio_item
label="Texture (diffuse)"
name="Texture (diffuse)"
top="0"
layout="topleft"
height="16"
value="0"/>
<radio_item
label="Bumpiness (normal)"
layout="topleft"
top_pad="1"
height="16"
name="Bumpiness (normal)"
value="1"/>
<radio_item
label="Shininess (specular)"
name="Shininess (specular)"
height="16"
layout="topleft"
top_pad="1"
value="2"/>
</radio_group>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
@ -148,7 +159,7 @@
left="10"
name="texture control"
tool_tip="Click to choose a picture"
top_pad="8"
top_pad="7"
width="64" />
<text
type="string"
@ -520,7 +531,7 @@
left="10"
name="tex gen"
text_readonly_color="LabelDisabledColor"
top_pad="60"
top_pad="40"
width="140">
Mapping
</text>