Merge with phoenix-firestorm-lgpl

master
Nicky 2019-09-08 01:42:11 +02:00
commit 222d049ef2
245 changed files with 4095 additions and 1244 deletions

View File

@ -38,6 +38,7 @@ ab632018105ccfdf8a9e5ea1a8302badd58b686e Firestorm_5.0.1_Release
6eb3eb572c053c7c7b83287b2a57dbb57442a011 Firestorm_5.1.7_Release
8888a131acad19c49fcff1ad2cf75c54c8a41bb8 Firestorm_6.0.1_Beta
ba5e1592f3a79317a3ebac441ee5946a81b97fab Firestorm_6.0.2_Release
7b5a98fba31fa019bddb3ae900c6dd94604bc8be Firestorm_6.2.4_Release
bb38ff1a763738609e1b3cada6d15fa61e5e84b9 2.1.1-release
003dd9461bfa479049afcc34545ab3431b147c7c v2start
52d96ad3d39be29147c5b2181b3bb46af6164f0e alpha-3
@ -591,3 +592,5 @@ a3143db58a0f6b005232bf9018e7fef17ff9ec90 6.1.0-release
706bdc7e25c6e6b8fb56f4a13fcce2936e70a79c 6.2.1-release
ec09daf1899c1c01c4ba0ba950fae572f2a612a8 6.2.2-release
ab2ec5c5423b277d23fd0511ce50c15123ff2e03 6.2.3-release
67297f9902857e357570c44722ad84de3aff974e 6.2.4-release
9777aec6dc4a30a24537297ac040861ce16b82ae 6.3.0-release

View File

@ -23,8 +23,8 @@ To build firestorm:
autobuild build -A64 -c ReleaseFS
Other examples:
autobuild configure -A64 -c ReleaseFS # basic configuration step, don't build, just configure
autobuild configure -A64 -c ReleaseFS -- --clean # clean the output area first, then configure
autobuild configure -A64 -c ReleaseFS # basic configuration step, don't build, just configure
autobuild configure -A64 -c ReleaseFS -- --clean # clean the output area first, then configure
autobuild configure -A64 -c ReleaseFS -- --chan Private-Yourname # configure with a custom channel
autobuild build -A64 -c ReleaseFS --no-configure # default quick rebuild

View File

@ -1006,11 +1006,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>46c6881c26c05d9ab0c2b3bb7c4697f8</string>
<string>0fcdc89c60271eda1fb37879b0c4a373</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>file:///opt/firestorm/fmodstudio-2.00.01-darwin-191591326.tar.bz2</string>
<string>file:///opt/firestorm/fmodstudio-2.00.03-darwin-192401637.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -1020,11 +1020,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>9111641e2b915c64529ed9624c1e9eb7</string>
<string>09f22b6a3ac41739073418bb6b8544d6</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>file:///opt/firestorm/fmodstudio-2.00.01-linux64-191601723.tar.bz2</string>
<string>file:///opt/firestorm/fmodstudio-2.00.03-linux64-192401637.tar.bz2</string>
</map>
<key>name</key>
<string>linux64</string>
@ -1034,11 +1034,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>f44299c9cf9c4224c6aee350284c3175</string>
<string>a0d1821154e7ce5c418e3cdc2f26f3fc</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.01-windows-191591202.tar.bz2</string>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.03-windows-192171947.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -1048,18 +1048,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>fd45c9663bbd413f779b3bd5ad6f3567</string>
<string>b98d2da1ed02f8ba218de414a83d0edc</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.01-windows64-191591204.tar.bz2</string>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.03-windows64-192171948.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>2.00.01</string>
<string>2.00.03</string>
</map>
<key>fmodex</key>
<map>

View File

@ -1 +1 @@

View File

@ -1504,6 +1504,21 @@ BOOL LLAvatarAppearance::teToColorParams( ETextureIndex te, U32 *param_name )
param_name[0] = 1071; //"tattoo_red";
param_name[1] = 1072; //"tattoo_green";
param_name[2] = 1073; //"tattoo_blue";
break;
case TEX_HEAD_UNIVERSAL_TATTOO:
case TEX_UPPER_UNIVERSAL_TATTOO:
case TEX_LOWER_UNIVERSAL_TATTOO:
case TEX_SKIRT_TATTOO:
case TEX_HAIR_TATTOO:
case TEX_EYES_TATTOO:
case TEX_LEFT_ARM_TATTOO:
case TEX_LEFT_LEG_TATTOO:
case TEX_AUX1_TATTOO:
case TEX_AUX2_TATTOO:
case TEX_AUX3_TATTOO:
param_name[0] = 1238; //"tattoo_universal_red";
param_name[1] = 1239; //"tattoo_universal_green";
param_name[2] = 1240; //"tattoo_universal_blue";
break;
default:

View File

@ -26,9 +26,10 @@
#include "linden_common.h"
#include "llavatarappearancedefines.h"
#include "indra_constants.h"
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH = 512;
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT = 512;
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH = 1024;
const S32 LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT = 1024;
const S32 LLAvatarAppearanceDefines::IMPOSTOR_PERIOD = 2;
using namespace LLAvatarAppearanceDefines;
@ -65,12 +66,30 @@ LLAvatarAppearanceDictionary::Textures::Textures()
addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO));
addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL));
addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD, "head"));
addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER, "upper"));
addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER, "lower"));
addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", FALSE, BAKED_EYES, "eyes"));
addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", FALSE, BAKED_HAIR, "hair"));
addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", FALSE, BAKED_SKIRT, "skirt"));
addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", FALSE, BAKED_LEFT_ARM, "leftarm"));
addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", FALSE, BAKED_LEFT_LEG, "leftleg"));
addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", FALSE, BAKED_AUX1, "aux1"));
addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", FALSE, BAKED_AUX2, "aux2"));
addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", FALSE, BAKED_AUX3, "aux3"));
}
LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()
@ -78,35 +97,60 @@ LLAvatarAppearanceDictionary::BakedTextures::BakedTextures()
// Baked textures
addEntry(BAKED_HEAD, new BakedEntry(TEX_HEAD_BAKED,
"head", "a4b9dc38-e13b-4df9-b284-751efb0566ff",
3, TEX_HEAD_BODYPAINT, TEX_HEAD_TATTOO, TEX_HEAD_ALPHA,
5, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_HAIR, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA));
4, TEX_HEAD_BODYPAINT, TEX_HEAD_TATTOO, TEX_HEAD_ALPHA, TEX_HEAD_UNIVERSAL_TATTOO,
6, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_HAIR, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA, LLWearableType::WT_UNIVERSAL));
addEntry(BAKED_UPPER, new BakedEntry(TEX_UPPER_BAKED,
"upper_body", "5943ff64-d26c-4a90-a8c0-d61f56bd98d4",
7, TEX_UPPER_SHIRT,TEX_UPPER_BODYPAINT, TEX_UPPER_JACKET,
TEX_UPPER_GLOVES, TEX_UPPER_UNDERSHIRT, TEX_UPPER_TATTOO, TEX_UPPER_ALPHA,
8, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_SHIRT, LLWearableType::WT_JACKET, LLWearableType::WT_GLOVES, LLWearableType::WT_UNDERSHIRT, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA));
8, TEX_UPPER_SHIRT,TEX_UPPER_BODYPAINT, TEX_UPPER_JACKET,
TEX_UPPER_GLOVES, TEX_UPPER_UNDERSHIRT, TEX_UPPER_TATTOO, TEX_UPPER_ALPHA, TEX_UPPER_UNIVERSAL_TATTOO,
9, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_SHIRT, LLWearableType::WT_JACKET, LLWearableType::WT_GLOVES, LLWearableType::WT_UNDERSHIRT, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA, LLWearableType::WT_UNIVERSAL));
addEntry(BAKED_LOWER, new BakedEntry(TEX_LOWER_BAKED,
"lower_body", "2944ee70-90a7-425d-a5fb-d749c782ed7d",
8, TEX_LOWER_PANTS,TEX_LOWER_BODYPAINT,TEX_LOWER_SHOES, TEX_LOWER_SOCKS,
TEX_LOWER_JACKET, TEX_LOWER_UNDERPANTS, TEX_LOWER_TATTOO, TEX_LOWER_ALPHA,
9, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_PANTS, LLWearableType::WT_SHOES, LLWearableType::WT_SOCKS, LLWearableType::WT_JACKET, LLWearableType::WT_UNDERPANTS, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA));
9, TEX_LOWER_PANTS,TEX_LOWER_BODYPAINT,TEX_LOWER_SHOES, TEX_LOWER_SOCKS,
TEX_LOWER_JACKET, TEX_LOWER_UNDERPANTS, TEX_LOWER_TATTOO, TEX_LOWER_ALPHA, TEX_LOWER_UNIVERSAL_TATTOO,
10, LLWearableType::WT_SHAPE, LLWearableType::WT_SKIN, LLWearableType::WT_PANTS, LLWearableType::WT_SHOES, LLWearableType::WT_SOCKS, LLWearableType::WT_JACKET, LLWearableType::WT_UNDERPANTS, LLWearableType::WT_TATTOO, LLWearableType::WT_ALPHA, LLWearableType::WT_UNIVERSAL));
addEntry(BAKED_EYES, new BakedEntry(TEX_EYES_BAKED,
"eyes", "27b1bc0f-979f-4b13-95fe-b981c2ba9788",
2, TEX_EYES_IRIS, TEX_EYES_ALPHA,
2, LLWearableType::WT_EYES, LLWearableType::WT_ALPHA));
3, TEX_EYES_IRIS, TEX_EYES_TATTOO, TEX_EYES_ALPHA,
3, LLWearableType::WT_EYES, LLWearableType::WT_UNIVERSAL, LLWearableType::WT_ALPHA));
addEntry(BAKED_SKIRT, new BakedEntry(TEX_SKIRT_BAKED,
"skirt", "03e7e8cb-1368-483b-b6f3-74850838ba63",
1, TEX_SKIRT,
1, LLWearableType::WT_SKIRT));
2, TEX_SKIRT, TEX_SKIRT_TATTOO,
2, LLWearableType::WT_SKIRT, LLWearableType::WT_UNIVERSAL ));
addEntry(BAKED_HAIR, new BakedEntry(TEX_HAIR_BAKED,
"hair", "a60e85a9-74e8-48d8-8a2d-8129f28d9b61",
2, TEX_HAIR, TEX_HAIR_ALPHA,
2, LLWearableType::WT_HAIR, LLWearableType::WT_ALPHA));
3, TEX_HAIR, TEX_HAIR_TATTOO, TEX_HAIR_ALPHA,
3, LLWearableType::WT_HAIR, LLWearableType::WT_UNIVERSAL, LLWearableType::WT_ALPHA));
addEntry(BAKED_LEFT_ARM, new BakedEntry(TEX_LEFT_ARM_BAKED,
"leftarm", "9f39febf-22d7-0087-79d1-e9e8c6c9ed19",
1, TEX_LEFT_ARM_TATTOO,
1, LLWearableType::WT_UNIVERSAL));
addEntry(BAKED_LEFT_LEG, new BakedEntry(TEX_LEFT_LEG_BAKED,
"leftleg", "054a7a58-8ed5-6386-0add-3b636fb28b78",
1, TEX_LEFT_LEG_TATTOO,
1, LLWearableType::WT_UNIVERSAL));
addEntry(BAKED_AUX1, new BakedEntry(TEX_AUX1_BAKED,
"aux1", "790c11be-b25c-c17e-b4d2-6a4ad786b752",
1, TEX_AUX1_TATTOO,
1, LLWearableType::WT_UNIVERSAL));
addEntry(BAKED_AUX2, new BakedEntry(TEX_AUX2_BAKED,
"aux2", "d78c478f-48c7-5928-5864-8d99fb1f521e",
1, TEX_AUX2_TATTOO,
1, LLWearableType::WT_UNIVERSAL));
addEntry(BAKED_AUX3, new BakedEntry(TEX_AUX3_BAKED,
"aux3", "6a95dd53-edd9-aac8-f6d3-27ed99f3c3eb",
1, TEX_AUX3_TATTOO,
1, LLWearableType::WT_UNIVERSAL));
}
LLAvatarAppearanceDictionary::MeshEntries::MeshEntries()
@ -267,3 +311,113 @@ LLWearableType::EType LLAvatarAppearanceDictionary::getTEWearableType(ETextureIn
{
return getInstance()->getTexture(index)->mWearableType;
}
// static
BOOL LLAvatarAppearanceDictionary::isBakedImageId(const LLUUID& id)
{
if ((id == IMG_USE_BAKED_EYES) || (id == IMG_USE_BAKED_HAIR) || (id == IMG_USE_BAKED_HEAD) || (id == IMG_USE_BAKED_LOWER) || (id == IMG_USE_BAKED_SKIRT) || (id == IMG_USE_BAKED_UPPER)
|| (id == IMG_USE_BAKED_LEFTARM) || (id == IMG_USE_BAKED_LEFTLEG) || (id == IMG_USE_BAKED_AUX1) || (id == IMG_USE_BAKED_AUX2) || (id == IMG_USE_BAKED_AUX3) )
{
return TRUE;
}
return FALSE;
}
// static
EBakedTextureIndex LLAvatarAppearanceDictionary::assetIdToBakedTextureIndex(const LLUUID& id)
{
if (id == IMG_USE_BAKED_EYES)
{
return BAKED_EYES;
}
else if (id == IMG_USE_BAKED_HAIR)
{
return BAKED_HAIR;
}
else if (id == IMG_USE_BAKED_HEAD)
{
return BAKED_HEAD;
}
else if (id == IMG_USE_BAKED_LOWER)
{
return BAKED_LOWER;
}
else if (id == IMG_USE_BAKED_SKIRT)
{
return BAKED_SKIRT;
}
else if (id == IMG_USE_BAKED_UPPER)
{
return BAKED_UPPER;
}
else if (id == IMG_USE_BAKED_LEFTARM)
{
return BAKED_LEFT_ARM;
}
else if (id == IMG_USE_BAKED_LEFTLEG)
{
return BAKED_LEFT_LEG;
}
else if (id == IMG_USE_BAKED_AUX1)
{
return BAKED_AUX1;
}
else if (id == IMG_USE_BAKED_AUX2)
{
return BAKED_AUX2;
}
else if (id == IMG_USE_BAKED_AUX3)
{
return BAKED_AUX3;
}
return BAKED_NUM_INDICES;
}
//static
LLUUID LLAvatarAppearanceDictionary::localTextureIndexToMagicId(ETextureIndex t)
{
LLUUID id = LLUUID::null;
switch (t)
{
case LLAvatarAppearanceDefines::TEX_HEAD_BAKED:
id = IMG_USE_BAKED_HEAD;
break;
case LLAvatarAppearanceDefines::TEX_UPPER_BAKED:
id = IMG_USE_BAKED_UPPER;
break;
case LLAvatarAppearanceDefines::TEX_LOWER_BAKED:
id = IMG_USE_BAKED_LOWER;
break;
case LLAvatarAppearanceDefines::TEX_EYES_BAKED:
id = IMG_USE_BAKED_EYES;
break;
case LLAvatarAppearanceDefines::TEX_SKIRT_BAKED:
id = IMG_USE_BAKED_SKIRT;
break;
case LLAvatarAppearanceDefines::TEX_HAIR_BAKED:
id = IMG_USE_BAKED_HAIR;
break;
case LLAvatarAppearanceDefines::TEX_LEFT_ARM_BAKED:
id = IMG_USE_BAKED_LEFTARM;
break;
case LLAvatarAppearanceDefines::TEX_LEFT_LEG_BAKED:
id = IMG_USE_BAKED_LEFTLEG;
break;
case LLAvatarAppearanceDefines::TEX_AUX1_BAKED:
id = IMG_USE_BAKED_AUX1;
break;
case LLAvatarAppearanceDefines::TEX_AUX2_BAKED:
id = IMG_USE_BAKED_AUX2;
break;
case LLAvatarAppearanceDefines::TEX_AUX3_BAKED:
id = IMG_USE_BAKED_AUX3;
break;
default:
break;
}
return id;
}

View File

@ -78,6 +78,22 @@ enum ETextureIndex
TEX_HEAD_TATTOO,
TEX_UPPER_TATTOO,
TEX_LOWER_TATTOO,
TEX_HEAD_UNIVERSAL_TATTOO,
TEX_UPPER_UNIVERSAL_TATTOO,
TEX_LOWER_UNIVERSAL_TATTOO,
TEX_SKIRT_TATTOO,
TEX_HAIR_TATTOO,
TEX_EYES_TATTOO,
TEX_LEFT_ARM_TATTOO,
TEX_LEFT_LEG_TATTOO,
TEX_AUX1_TATTOO,
TEX_AUX2_TATTOO,
TEX_AUX3_TATTOO,
TEX_LEFT_ARM_BAKED, // Pre-composited
TEX_LEFT_LEG_BAKED, // Pre-composited
TEX_AUX1_BAKED, // Pre-composited
TEX_AUX2_BAKED, // Pre-composited
TEX_AUX3_BAKED, // Pre-composited
TEX_NUM_INDICES
};
@ -89,6 +105,11 @@ enum EBakedTextureIndex
BAKED_EYES,
BAKED_SKIRT,
BAKED_HAIR,
BAKED_LEFT_ARM,
BAKED_LEFT_LEG,
BAKED_AUX1,
BAKED_AUX2,
BAKED_AUX3,
BAKED_NUM_INDICES
};
@ -223,6 +244,10 @@ public:
// Given a texture entry, determine which wearable type owns it.
static LLWearableType::EType getTEWearableType(ETextureIndex index);
static BOOL isBakedImageId(const LLUUID& id);
static EBakedTextureIndex assetIdToBakedTextureIndex(const LLUUID& id);
static LLUUID localTextureIndexToMagicId(ETextureIndex t);
}; // End LLAvatarAppearanceDictionary
} // End namespace LLAvatarAppearanceDefines

View File

@ -44,6 +44,7 @@
#include "llvertexbuffer.h"
#include "llviewervisualparam.h"
#include "llfasttimer.h"
#include "llrendertarget.h" // <FS:ND/> For copyContents
//#include "../tools/imdebug/imdebug.h"
@ -1577,28 +1578,19 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
alpha_data = new U8[width * height];
mAlphaCache[cache_index] = alpha_data;
// <FS:ND> Tentative fix for BUG-225655/FIRE-24049.
// Using glReadPixels breaks the driver on 64 bit.
// Not sure yet why, as eg it works perfectly fine to capture the logout snapshot or for DebugShowColor.
// Disable this for now for review. as arguably having the risk for a wrong local (temporary)
// bake is better than not being able to login at all.
// No perfect solution though, but seems we're getting too close to release for a 100% perfect solution :(
bool skipReadPixels = LLRender::sNsightDebugSupport;
#if ADDRESS_SIZE == 64
skipReadPixels = gGLManager.mIsIntel;
#endif
// nSight doesn't support use of glReadPixels
// if (!LLRender::sNsightDebugSupport)
if (!skipReadPixels)
// <//FS:ND>
if (!LLRender::sNsightDebugSupport)
{
// <FS:Ansariel> Format GL_ALPHA is invalid for glReadPixels
//glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data);
U8* alpha_buffer = new U8[width * height * 4];
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, alpha_buffer);
if (!LLRenderTarget::getCurrentBoundTarget())
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, alpha_buffer);
else
LLRenderTarget::getCurrentBoundTarget()->copyContents(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, alpha_buffer);
for (S32 i = 0; i < width * height; ++i)
{
alpha_data[i] = alpha_buffer[i * 4 + 3];
@ -1606,7 +1598,6 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
delete[] alpha_buffer;
// </FS:Ansariel>
}
else{ memset( alpha_data, 0, width*height ); } // <FS:ND/> Maybe at least clear the buffer if not filling it?
}
getTexLayerSet()->getAvatarAppearance()->dirtyMesh();

View File

@ -97,6 +97,7 @@ LLWearableDictionary::LLWearableDictionary()
addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry("universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));

View File

@ -63,7 +63,8 @@ public:
WT_ALPHA = 13,
WT_TATTOO = 14,
WT_PHYSICS = 15,
WT_COUNT = 16,
WT_UNIVERSAL = 16,
WT_COUNT = 17,
WT_INVALID = 255,
WT_NONE = -1,

View File

@ -132,7 +132,7 @@ LLAudioEngine_FMODEX::LLAudioEngine_FMODEX(bool enable_profiler)
mSystem = NULL;
mEnableProfiler = enable_profiler;
mWindDSPDesc = new FMOD_DSP_DESCRIPTION();
mSelectedDeviceUUID == LLUUID::null; // <FS:Ansariel> Output device selection
mSelectedDeviceUUID = LLUUID::null; // <FS:Ansariel> Output device selection
}

View File

@ -72,3 +72,15 @@ const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // V
const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
const LLUUID IMG_USE_BAKED_HEAD ("5a9f4a74-30f2-821c-b88d-70499d3e7183");
const LLUUID IMG_USE_BAKED_UPPER ("ae2de45c-d252-50b8-5c6e-19f39ce79317");
const LLUUID IMG_USE_BAKED_LOWER ("24daea5f-0539-cfcf-047f-fbc40b2786ba");
const LLUUID IMG_USE_BAKED_EYES ("52cc6bb6-2ee5-e632-d3ad-50197b1dcb8a");
const LLUUID IMG_USE_BAKED_SKIRT ("43529ce8-7faa-ad92-165a-bc4078371687");
const LLUUID IMG_USE_BAKED_HAIR ("09aac1fb-6bce-0bee-7d44-caac6dbb6c63");
const LLUUID IMG_USE_BAKED_LEFTARM ("ff62763f-d60a-9855-890b-0c96f8f8cd98");
const LLUUID IMG_USE_BAKED_LEFTLEG ("8e915e25-31d1-cc95-ae08-d58a47488251");
const LLUUID IMG_USE_BAKED_AUX1 ("9742065b-19b5-297c-858a-29711d539043");
const LLUUID IMG_USE_BAKED_AUX2 ("03642e83-2bd1-4eb9-34b4-4c47ed586d2d");
const LLUUID IMG_USE_BAKED_AUX3 ("edd51b77-fc10-ce7a-4b3d-011dfc349e4f");

View File

@ -210,6 +210,18 @@ LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL;
LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL;
LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_HEAD;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_UPPER;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_LOWER;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_EYES;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_SKIRT;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_HAIR;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_LEFTARM;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_LEFTLEG;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX1;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX2;
LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX3;
LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;

View File

@ -101,6 +101,7 @@ public:
ICONNAME_CLOTHING_SKIRT,
ICONNAME_CLOTHING_ALPHA,
ICONNAME_CLOTHING_TATTOO,
ICONNAME_CLOTHING_UNIVERSAL,
ICONNAME_ANIMATION,
ICONNAME_GESTURE,

View File

@ -5287,6 +5287,28 @@ bool LLVolumeFace::cacheOptimize()
llassert(!mOptimized);
mOptimized = TRUE;
// <FS:ND> FIRE-23370/BUG-8801/MAIN-5060
// cacheOptimize will destroy triangles. This is due to LLVCacheVertexData pointing to vertices in the vector vertex_data.
// Once vertex_data is sorted (std::sort(triangle_data.begin(), triangle_data.end()) ) this will invalidate those pointers and
// LLVCacheVertexData suddenly does point to unrelated vertices. It is an interesting fact that this is no problem for the
// windows version.
//
// To solve the issue with the pointer invalidation it would make sense to use a std::vector< U16 > for triangle indices, sort this
// using
// std::sort( v.begin(), v.end(), [&triangle_data](U16 rhs, U16 lhs ){ return triangle_data[rhs].mScore > triangle_data[lhs].mScore; }
// Then access all LLVCacheTriangleData> via triangle_data[ v[ idx ] ].
//
// This will help indeed with the destroyed triangles; but the result will still not be perfect and there are problems with alpha due to
// what looks like z order.
//
// It is peculiar that none of this happens when compiling with MSVC.
// Sadly for Linux it seems to be a decision between two evils
// - Disable cacheOptimize and have correct meshes but potentially a bit of less FPS.
// - Enable/fix cacheOptimize, potentially have a bit higher FPS but broken meshes.
//
// Having meshes correctly seems to be a bit of a lesser evil. Then do some wider testing on different systems to test for any other potential sideeffects.
#ifndef LL_LINUX
LLVCacheLRU cache;
if (mNumVertices < 3)
@ -5512,6 +5534,8 @@ bool LLVolumeFace::cacheOptimize()
//std::string result = llformat("ACMR pre/post: %.3f/%.3f -- %d triangles %d breaks", pre_acmr, post_acmr, mNumIndices/3, breaks);
//LL_INFOS() << result << LL_ENDL;
#endif // <FS:ND/>
return true;
}

View File

@ -1053,14 +1053,26 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa
}
//assign exception faces to cur_ptr
if (exception_faces >= (0x1 << 7))
if (exception_faces >= ((U64)0x1 << 7))
{
if (exception_faces >= (0x1 << 14))
if (exception_faces >= ((U64)0x1 << 14))
{
if (exception_faces >= (0x1 << 21))
if (exception_faces >= ((U64)0x1 << 21))
{
if (exception_faces >= (0x1 << 28))
if (exception_faces >= ((U64)0x1 << 28))
{
if (exception_faces >= ((U64)0x1 << 35))
{
if (exception_faces >= ((U64)0x1 << 42))
{
if (exception_faces >= ((U64)0x1 << 49))
{
*cur_ptr++ = (U8)(((exception_faces >> 49) & 0x7F) | 0x80);
}
*cur_ptr++ = (U8)(((exception_faces >> 42) & 0x7F) | 0x80);
}
*cur_ptr++ = (U8)(((exception_faces >> 35) & 0x7F) | 0x80);
}
*cur_ptr++ = (U8)(((exception_faces >> 28) & 0x7F) | 0x80);
}
*cur_ptr++ = (U8)(((exception_faces >> 21) & 0x7F) | 0x80);
@ -1069,6 +1081,7 @@ S32 LLPrimitive::packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_fa
}
*cur_ptr++ = (U8)(((exception_faces >> 7) & 0x7F) | 0x80);
}
*cur_ptr++ = (U8)(exception_faces & 0x7F);
@ -1128,7 +1141,7 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat
// Includes information about image ID, color, scale S,T, offset S,T and rotation
BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
{
const U32 MAX_TES = 32;
const U32 MAX_TES = 45;
U8 image_ids[MAX_TES*16];
U8 colors[MAX_TES*4];
@ -1214,7 +1227,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
{
const U32 MAX_TES = 32;
const U32 MAX_TES = 45;
U8 image_ids[MAX_TES*16];
U8 colors[MAX_TES*4];
@ -1327,6 +1340,8 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name
mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, block_num, LLTEContents::MAX_TE_BUFFER);
}
tec.face_count = llmin((U32)getNumTEs(),(U32)LLTEContents::MAX_TES);
U8 *cur_ptr = tec.packed_buffer;
@ -1399,6 +1414,8 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec)
retval |= setTEColor(i, color);
}
return retval;
@ -1417,7 +1434,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
{
// use a negative block_num to indicate a single-block read (a non-variable block)
S32 retval = 0;
const U32 MAX_TES = 32;
const U32 MAX_TES = 45;
// Avoid construction of 32 UUIDs per call
static LLUUID image_ids[MAX_TES];

View File

@ -327,7 +327,7 @@ public:
// - Vir
struct LLTEContents
{
static const U32 MAX_TES = 32;
static const U32 MAX_TES = 45;
U8 image_data[MAX_TES*16];
U8 colors[MAX_TES*4];

View File

@ -639,5 +639,133 @@ void LLRenderTarget::getViewport(S32* viewport)
viewport[3] = mResY;
}
// <FS:ND> Determine version of intel driver. We know anything >= 24 is problematic with glReadPixels
#if LL_WINDOWS && ADDRESS_SIZE == 64
U32 getIntelDriverVersionMajor()
{
if (!gGLManager.mIsIntel)
return 0;
std::string strVersion = gGLManager.mDriverVersionVendorString;
auto i = strVersion.find("Build ");
if (i != std::string::npos)
{
i += sizeof("Build");
while (isspace(strVersion[i]) && strVersion[i])
++i;
auto start = i;
while (strVersion[i] != '.' && strVersion[i])
i++;
if( strVersion[i] )
{
std::string strMajor(strVersion.begin() + start, strVersion.begin() + i);
U32 version = 0;
if (LLStringUtil::convertToU32(strMajor, version))
return version;
}
}
return 0;
}
#endif
//</FD>ND>
// <FS:ND> Copy the contents of this FBO into memory
void LLRenderTarget::copyContents(S32 x, S32 y, S32 w, S32 h, U32 format, U32 type, U8 *buffer)
{
#if LL_WINDOWS && ADDRESS_SIZE == 64
// <FS:ND> If not Intel or driver < 24.*, be done with it
if (!gGLManager.mIsIntel || getIntelDriverVersionMajor() < 24)
{
glReadPixels(x, y, w, h, (GLenum)format, (GLenum)type, buffer);
return;
}
std::vector< GLenum > vErrors;
// BUG-225655/FIRE-24049 some drivers (Intel 64 bit >= 24.* are behaving buggy when glReadPixels is called
if (mFBO)
{
// When a FBO is bound unbind/rebind it.
vErrors.push_back(glGetError());
glBindFramebuffer(GL_FRAMEBUFFER, 0);
vErrors.push_back(glGetError());
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
vErrors.push_back(glGetError());
glReadPixels(x, y, w, h, (GLenum)format, (GLenum)type, buffer);
vErrors.push_back(glGetError());
}
else
{
llassert_always(type == GL_UNSIGNED_BYTE);
llassert_always(format == GL_RGBA || format == GL_ALPHA);
if (mUsage != LLTexUnit::TT_TEXTURE && mUsage != LLTexUnit::TT_RECT_TEXTURE )
{
LL_WARNS() << "Expected type TT_TEXTURE or TT_RECT_TEXTURE got 0x" << std::setw(8) << std::setfill('0') << std::hex << LLTexUnit::getInternalType(mUsage) <<
" internal type 0x" << std::setw(8) << std::setfill('0') << std::hex << mUsage << LL_ENDL;
}
// When using no FBO and avoid glReadPixels altogether, instead bind the texture and call glGetTexImage
vErrors.push_back(glGetError());
flush();
vErrors.push_back(glGetError());
gGL.getTexUnit(0)->bind(this);
vErrors.push_back(glGetError());
std::string sBuffer(mResX*mResY * 4, 0);
// Would be nice if GL_ALPHA would be allowed for glGetTexImage
glGetTexImage(LLTexUnit::getInternalType(mUsage), 0, GL_RGBA, GL_UNSIGNED_BYTE, &sBuffer[0]);
vErrors.push_back(glGetError());
// Now copy out the data.
// n.b. in case of:
// format == GL_RGBA && x == 0 ** y == 0 and w == mResX && h == mResY
// would could safe all this and glGetTexImage right into buffer
U8 const *pBuffer = reinterpret_cast<U8 const*>(sBuffer.c_str());
pBuffer += (y * mResX * 4); // Adjust to skip to requested y coord
pBuffer += x * 4; // Skip to requested x coord
if (format == GL_RGBA)
{
for (S32 i = y; i < h; ++i)
{
std::memcpy(buffer, pBuffer, w * 4);
pBuffer += mResX * 4; // Skip one full row, row is already x adjusted
buffer += w * 4;
}
}
else if (format == GL_ALPHA)
{
for (S32 i = y; i < h; ++i)
{
for (S32 j = 0; j < w; ++j)
{
*buffer = pBuffer[3];
++buffer;
pBuffer += 4;
}
pBuffer += (mResX - w) * 4; // Skip to end of row
pBuffer += x * 4; // Skip to requested x coordinate again
}
}
gGL.getTexUnit(0)->disable();
vErrors.push_back(glGetError());
}
std::stringstream strm;
for (GLenum err : vErrors )
strm << "0x" << std::hex << (U32)err << " ";
if (vErrors.end() != std::find_if(vErrors.begin(), vErrors.end(), [](GLenum err){return err != GL_NO_ERROR; }))
{
LL_WARNS() << "GL error occured: " << strm.str() << LL_ENDL;
}
#else
// <FS:ND> Every other OS just gets glReadPixels
glReadPixels(x, y, w, h, (GLenum)format, (GLenum)type, buffer);
#endif
}
// </FS:ND>

View File

@ -160,6 +160,10 @@ protected:
LLTexUnit::eTextureType mUsage;
static LLRenderTarget* sBoundTarget;
// <FS:ND> Copy the contents of this FBO into memory
public:
void copyContents(S32 x, S32 y, S32 w, S32 h, U32 format, U32 type, U8 *buffer);
// </FS:ND>
};
#endif

View File

@ -263,10 +263,14 @@ void LLUI::dirtyRect(LLRect rect)
//static
void LLUI::setMousePositionScreen(S32 x, S32 y)
{
S32 screen_x, screen_y;
screen_x = ll_round((F32)x * getScaleFactor().mV[VX]);
screen_y = ll_round((F32)y * getScaleFactor().mV[VY]);
#if defined(LL_DARWIN)
S32 screen_x = ll_round(((F32)x * getScaleFactor().mV[VX]) / LLView::getWindow()->getSystemUISize());
S32 screen_y = ll_round(((F32)y * getScaleFactor().mV[VY]) / LLView::getWindow()->getSystemUISize());
#else
S32 screen_x = ll_round((F32)x * getScaleFactor().mV[VX]);
S32 screen_y = ll_round((F32)y * getScaleFactor().mV[VY]);
#endif
LLView::getWindow()->setCursorPosition(LLCoordGL(screen_x, screen_y).convert());
}

View File

@ -524,9 +524,9 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const
//
LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL()
{
mPattern = boost::regex("((http://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com)"
mPattern = boost::regex("((http://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com)"
"|"
"(https://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?))"
"(https://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(:\\d{1,5})?))"
"\\/\\S*",
boost::regex::perl|boost::regex::icase);
@ -568,7 +568,7 @@ std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const
//
LLUrlEntrySimpleSecondlifeURL::LLUrlEntrySimpleSecondlifeURL()
{
mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(?!\\S)",
mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(?!\\S)",
boost::regex::perl|boost::regex::icase);
mIcon = "Hand";
@ -1358,6 +1358,25 @@ std::string LLUrlEntryTeleport::getLocation(const std::string &url) const
return ::getStringAfterToken(url, "app/teleport/");
}
// <FS:Ansariel> Wear folder SLUrl
///
/// FSUrlEntryWear Describes wear folder SLURL, e.g.
/// secondlife:///app/wear_folder/?folder_id=bedd047e-a3d7-23e6-57bc-1ef367d848e7
///
FSUrlEntryWear::FSUrlEntryWear()
{
mPattern = boost::regex("(hop|secondlife|inworldz|iw):///app/wear_folder/\\S+",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slapp.xml";
mTooltip = LLTrans::getString("TooltipFSUrlEntryWear");
}
std::string FSUrlEntryWear::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
{
return LLTrans::getString("FSUrlEntryWearLabel");
}
// </FS:Ansariel>
//
// LLUrlEntrySL Describes a generic SLURL, e.g., a Url that starts
// with secondlife:// (used as a catch-all for cases not matched above)

View File

@ -499,6 +499,20 @@ public:
/*virtual*/ std::string getLocation(const std::string &url) const;
};
// <FS:Ansariel> Wear folder SLUrl
///
/// FSUrlEntryWear Describes wear folder SLURL, e.g.
/// secondlife:///app/wear_folder/?folder_id=bedd047e-a3d7-23e6-57bc-1ef367d848e7
///
class FSUrlEntryWear : public LLUrlEntryBase
{
public:
FSUrlEntryWear();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
};
// </FS:Ansariel>
// <FS:Ansariel> FS Help SLUrl
///
/// FSHelpDebugUrlEntrySL Describes a Firestorm Help SLURL, e.g.

View File

@ -41,7 +41,7 @@ LLUrlRegistry::LLUrlRegistry()
{
// mUrlEntry.reserve(20);
// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
mUrlEntry.reserve(27);
mUrlEntry.reserve(28);
// [/RLVa:KB]
// Urls are matched in the order that they were registered
@ -84,6 +84,9 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntryInventory());
registerUrl(new LLUrlEntryExperienceProfile());
registerUrl(new FSHelpDebugUrlEntrySL()); // <FS:Ansariel> FS Help SLUrl
// <FS:Ansariel> Wear folder SLUrl
mUrlEntryWear = new FSUrlEntryWear();
registerUrl(mUrlEntryWear);
//LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,
//so it should be registered in the end of list
registerUrl(new LLUrlEntrySL());
@ -268,6 +271,13 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
match_start = start;
match_end = end;
match_entry = url_entry;
// <FS:Ansariel> Wear folder SLUrl
if (mUrlEntryWear == *it)
{
break;
}
// </FS:Ansariel>
}
}
}

View File

@ -98,6 +98,8 @@ private:
LLUrlEntryBase* mUrlEntryNoLink;
// <FS:Ansariel> Normalize only trusted URL
LLUrlEntryBase* mUrlEntryTrustedUrl;
// <FS:Ansariel> Wear folder SLUrl
LLUrlEntryBase* mUrlEntryWear;
};
#endif

View File

@ -501,7 +501,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
dullahan::dullahan_settings settings;
settings.accept_language_list = mHostLanguage;
settings.background_color = 0xff282828;
settings.background_color = 0xffffffff;
settings.cache_enabled = true;
settings.cache_path = mCachePath;
settings.cookie_store_path = mCookiePath;

View File

@ -218,9 +218,7 @@ set(viewer_SOURCE_FILES
lggbeamscolors.cpp
lggcontactsets.cpp
lfsimfeaturehandler.cpp
llfloaterdisplayname.cpp
llpanelopenregionsettings.cpp
llviewerdisplayname.cpp
# <FS:Ansariel> [Legacy Bake]
llagentwearablesfetch.cpp
@ -350,6 +348,7 @@ set(viewer_SOURCE_FILES
llfloaterdeleteenvpreset.cpp
llfloaterdeleteprefpreset.cpp
llfloaterdestinations.cpp
llfloaterdisplayname.cpp
llfloatereditdaycycle.cpp
llfloatereditsky.cpp
llfloatereditwater.cpp
@ -756,6 +755,7 @@ set(viewer_SOURCE_FILES
llviewercontrol.cpp
llviewercontrollistener.cpp
llviewerdisplay.cpp
llviewerdisplayname.cpp
llviewerfloaterreg.cpp
llviewerfoldertype.cpp
llviewergenericmessage.cpp
@ -978,8 +978,6 @@ set(viewer_HEADER_FILES
lggbeamscolors.h
lggcontactsets.h
lfsimfeaturehandler.h
llfloaterdisplayname.h
llviewerdisplayname.h
# <FS:Ansariel> [Legacy Bake]
llagentwearablesfetch.h
@ -1110,6 +1108,7 @@ set(viewer_HEADER_FILES
llfloaterdeleteprefpreset.h
llfloaterdeleteenvpreset.h
llfloaterdestinations.h
llfloaterdisplayname.h
llfloatereditdaycycle.h
llfloatereditsky.h
llfloatereditwater.h
@ -1511,6 +1510,7 @@ set(viewer_HEADER_FILES
llviewercontrol.h
llviewercontrollistener.h
llviewerdisplay.h
llviewerdisplayname.h
llviewerfloaterreg.h
llviewerfoldertype.h
llviewergenericmessage.h

View File

@ -1 +1 @@
6.2.5
6.3.1

View File

@ -191,15 +191,37 @@ void AOEngine::setLastOverriddenMotion(const LLUUID& motion)
BOOL AOEngine::foreignAnimations(const LLUUID& seat)
{
LL_DEBUGS("AOEngine") << "Checking for foreign animation on seat " << seat << LL_ENDL;
for (LLVOAvatar::AnimSourceIterator sourceIterator = gAgentAvatarp->mAnimationSources.begin();
sourceIterator != gAgentAvatarp->mAnimationSources.end(); ++sourceIterator)
{
LL_DEBUGS("AOEngine") << "Source " << sourceIterator->first << " runs animation " << sourceIterator->second << LL_ENDL;
if (sourceIterator->first != gAgentID)
{
if (seat.isNull() || sourceIterator->first == seat)
// special case when the AO gets disabled while sitting
if (seat.isNull())
{
return TRUE;
}
// find the source object where the animation came from
LLViewerObject* source=gObjectList.findObject(sourceIterator->first);
// proceed if it's not an attachment
if(!source->isAttachment())
{
// get the source's root prim
LLViewerObject* sourceRoot=dynamic_cast<LLViewerObject*>(source->getRoot());
// if the root prim is the same as the animation source, report back as TRUE
if (sourceRoot && source->getID() == seat)
{
LL_DEBUGS("AOEngine") << "foreign animation " << sourceIterator->second << " found on seat." << LL_ENDL;
return TRUE;
}
}
}
}
return FALSE;
@ -600,10 +622,6 @@ const LLUUID AOEngine::override(const LLUUID& pMotion, BOOL start)
{
stopAllSitVariants();
}
LL_DEBUGS("AOEngine") << "stopping cycle timer for motion " << gAnimLibrary.animationName(motion) <<
" using animation " << animation <<
" in state " << state->mName << LL_ENDL;
}
return animation;
@ -1628,6 +1646,17 @@ void AOEngine::setSmart(AOSet* set, BOOL yes)
{
set->setSmart(yes);
set->setDirty(TRUE);
if (yes)
{
// make sure to restart the sit cancel timer to fix sit overrides when the object we are
// sitting on is playing its own animation
const LLViewerObject* agentRoot = dynamic_cast<LLViewerObject*>(gAgentAvatarp->getRoot());
if (agentRoot && agentRoot->getID() != gAgentID)
{
mSitCancelTimer.oneShot();
}
}
}
void AOEngine::setDisableStands(AOSet* set, BOOL yes)

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1091,7 +1091,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat("Zdrop cannot work if the folder is inside another folder.");
}
}
catch (std::out_of_range)
catch (std::out_of_range&)
{
report_to_nearby_chat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied.");
report_to_nearby_chat("Valid command: Zdrop (rezzed prim UUID) (source inventory folder name)");
@ -1165,7 +1165,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat("Ztake cannot work if the folder is inside another folder.");
}
}
catch (std::out_of_range)
catch (std::out_of_range&)
{
report_to_nearby_chat("Please specify a destination folder in your inventory.");
}
@ -1234,7 +1234,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat("The packager cannot work if the folder is inside another folder.");
}
}
catch (std::out_of_range)
catch (std::out_of_range&)
{
report_to_nearby_chat("Please specify a destination folder in your inventory.");
}
@ -1314,7 +1314,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat("The packager cannot work if the folder is inside another folder.");
}
}
catch (std::out_of_range)
catch (std::out_of_range&)
{
report_to_nearby_chat("Please specify a destination folder in your inventory.");
}
@ -1365,7 +1365,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat("The packager cannot work if the folder is inside another folder.");
}
}
catch (std::out_of_range)
catch (std::out_of_range&)
{
report_to_nearby_chat("Please specify a destination folder in your inventory.");
}
@ -1445,7 +1445,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat("The packager cannot work if the folder is inside another folder.");
}
}
catch (std::out_of_range)
catch (std::out_of_range&)
{
report_to_nearby_chat("Please specify a destination folder in your inventory.");
}
@ -1488,7 +1488,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat("Mtake cannot work if the folder is inside another folder.");
}
}
catch (std::out_of_range)
catch (std::out_of_range&)
{
report_to_nearby_chat("Please specify a destination folder in your inventory.");
}

View File

@ -70,13 +70,13 @@
#include "llviewerregion.h"
#include "llvoiceclient.h"
static LLPanelInjector<FSPanelProfileSecondLife> t_panel_profile_secondlife("panel_profile_secondlife");
static LLPanelInjector<FSPanelProfileWeb> t_panel_web("panel_profile_web");
static LLPanelInjector<FSPanelProfileInterests> t_panel_interests("panel_profile_interests");
static LLPanelInjector<FSPanelProfilePicks> t_panel_picks("panel_profile_picks");
static LLPanelInjector<FSPanelProfileFirstLife> t_panel_firstlife("panel_profile_firstlife");
static LLPanelInjector<FSPanelAvatarNotes> t_panel_notes("panel_profile_notes");
static LLPanelInjector<FSPanelProfile> t_panel_profile("panel_profile");
static LLPanelInjector<FSPanelProfileSecondLife> t_panel_fs_profile_secondlife("panel_fs_profile_secondlife");
static LLPanelInjector<FSPanelProfileWeb> t_panel_fs_web("panel_fs_profile_web");
static LLPanelInjector<FSPanelProfileInterests> t_panel_fs_interests("panel_fs_profile_interests");
static LLPanelInjector<FSPanelProfilePicks> t_panel_fs_picks("panel_fs_profile_picks");
static LLPanelInjector<FSPanelProfileFirstLife> t_panel_fs_firstlife("panel_fs_profile_firstlife");
static LLPanelInjector<FSPanelAvatarNotes> t_panel_fs_notes("panel_fs_profile_notes");
static LLPanelInjector<FSPanelProfile> t_panel_fs_profile("panel_fs_profile");
static const std::string PANEL_SECONDLIFE = "panel_profile_secondlife";
static const std::string PANEL_WEB = "panel_profile_web";
@ -1179,7 +1179,7 @@ FSPanelPick::FSPanelPick()
FSPanelPick* FSPanelPick::create()
{
FSPanelPick* panel = new FSPanelPick();
panel->buildFromFile("panel_profile_pick.xml");
panel->buildFromFile("panel_fs_profile_pick.xml");
return panel;
}

View File

@ -59,7 +59,7 @@ static const std::string CLASSIFIED_NAME("classified_name");
static FSDispatchClassifiedClickThrough sClassifiedClickThrough;
static LLPanelInjector<FSPanelClassifieds> t_panel_classifieds("panel_profile_classified");
static LLPanelInjector<FSPanelClassifieds> t_panel_fs_classifieds("panel_fs_profile_classified");
//////////////////////////////////////////////////////////////////////////

View File

@ -24,6 +24,7 @@
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llagent.h"

View File

@ -1700,6 +1700,12 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con
{
if (type == LLWearableType::WT_INVALID || type == LLWearableType::WT_NONE) return;
if (type == LLWearableType::WT_UNIVERSAL && !gAgent.getRegion()->bakesOnMeshEnabled())
{
LL_WARNS("Inventory") << "Can't create WT_UNIVERSAL type " << LL_ENDL;
return;
}
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
LLAssetType::EType asset_type = wearable->getAssetType();
LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE;

View File

@ -1366,25 +1366,6 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
items = new_items;
}
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2015-06-30 (Catznip-3.7)
static void removeDuplicateWearableItemsByAssetID(LLInventoryModel::item_array_t& items)
{
std::set<LLUUID> idsAsset;
items.erase(std::remove_if(items.begin(), items.end(),
[&idsAsset](const LLViewerInventoryItem* pItem)
{
if (pItem->isWearableType())
{
const LLUUID& idAsset = pItem->getAssetUUID();
if ( (idAsset.notNull()) && (idsAsset.end() != idsAsset.find(idAsset)) )
return true;
idsAsset.insert(idAsset);
}
return false;
}), items.end());
}
// [/SL:KB]
//=========================================================================
const std::string LLAppearanceMgr::sExpectedTextureName = "OutfitPreview";
@ -2271,9 +2252,6 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
// [/RLVa:KB]
// Reduce wearables to max of one per type.
removeDuplicateItems(wear_items);
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
removeDuplicateWearableItemsByAssetID(wear_items);
// [/SL:KB]
filterWearableItems(wear_items, 0, LLAgentWearables::MAX_CLOTHING_LAYERS);
// - Attachments: include COF contents only if appending.
@ -2687,10 +2665,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
removeDuplicateItems(gest_items);
filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_LAYERS, LLAgentWearables::MAX_CLOTHING_LAYERS);
// [/SL:KB]
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
// Wearing two wearables that share the same asset causes some issues
removeDuplicateWearableItemsByAssetID(wear_items);
// [/SL:KB]
dumpItemArray(wear_items,"asset_dump: wear_item");
dumpItemArray(obj_items,"asset_dump: obj_item");
@ -3219,13 +3193,6 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item,
// MULTI-WEARABLES: make sure we don't go over clothing limits
remove_inventory_item(inv_item->getUUID(), cb);
}
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
else if ( (vitem->getWearableType() == wearable_type) && (vitem->getAssetUUID() == inv_item->getAssetUUID()) )
{
// Only allow one wearable per unique asset
linked_already = true;
}
// [/SL:KB]
}
}

View File

@ -470,7 +470,7 @@ LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id)
//<FS:KC legacy profiles>
if (!gSavedSettings.getBOOL("FSUseWebProfiles"))
{
FSFloaterProfile* browser = LLFloaterReg::findTypedInstance<FSFloaterProfile>("floater_profile", LLSD().with("id", id));
FSFloaterProfile* browser = LLFloaterReg::findTypedInstance<FSFloaterProfile>("fs_floater_profile", LLSD().with("id", id));
return browser;
}
//</FS:KC legacy profiles>
@ -494,7 +494,7 @@ void LLAvatarActions::showProfileLegacy(const LLUUID& id)
{
if (id.notNull())
{
LLFloaterReg::showInstance("floater_profile", LLSD().with("id", id));
LLFloaterReg::showInstance("fs_floater_profile", LLSD().with("id", id));
}
}
//</FS:KC legacy profiles>
@ -743,7 +743,10 @@ void LLAvatarActions::share(const LLUUID& id)
LLSD key;
LLFloaterSidePanelContainer::showPanel("inventory", key);
LLFloaterReg::showInstance("im_container");
// <FS:Ansariel> [FS Communication UI]
//LLFloaterReg::showInstance("im_container");
LLFloaterReg::showInstance("fs_im_container");
// </FS:Ansariel> [FS Communication UI]
LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,id);

View File

@ -125,11 +125,16 @@ BOOL LLViewerDynamicTexture::render()
//-----------------------------------------------------------------------------
void LLViewerDynamicTexture::preRender(BOOL clear_depth)
{
// <FS:Beq> changes to support higher resolution rendering in the preview
////only images up to 512x512 are supported
//llassert(mFullHeight <= 512);
//llassert(mFullWidth <= 512);
gPipeline.allocatePhysicsBuffer();
llassert(mFullWidth <= static_cast<S32>(gPipeline.mPhysicsDisplay.getWidth()));
llassert(mFullHeight <= static_cast<S32>(gPipeline.mPhysicsDisplay.getHeight()));
if (gGLManager.mHasFramebufferObject && gPipeline.mPhysicsDisplay.isComplete() && !gGLManager.mIsATI)
// </FS:Beq>
{ //using offscreen render target, just use the bottom left corner
mOrigin.set(0, 0);
}
@ -216,9 +221,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
return TRUE;
}
// <FS:Beq> changes to support higher resolution rendering in the preview
// bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI;
bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mPhysicsDisplay.isComplete() && !gGLManager.mIsATI;
if (use_fbo)
{
// gPipeline.mWaterDis.bindTarget();
gPipeline.mPhysicsDisplay.bindTarget();
}
// </FS:Beq>
@ -257,7 +265,10 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
if (use_fbo)
{
// <FS:Beq> changes to support higher resolution rendering in the preview
// gPipeline.mWaterDis.flush();
gPipeline.mPhysicsDisplay.flush();
// </FS:Beq>
}
return ret;

View File

@ -1125,7 +1125,7 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po
// Returns the necessary texture transform to align this face's TE to align_to's TE
bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offset,
LLVector2* res_st_scale, F32* res_st_rot) const
LLVector2* res_st_scale, F32* res_st_rot, LLRender::eTexIndex map) const
{
if (!align_to)
{
@ -1138,6 +1138,43 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs
return false;
}
F32 map_rot = 0.f, map_scaleS = 0.f, map_scaleT = 0.f, map_offsS = 0.f, map_offsT = 0.f;
switch (map)
{
case LLRender::DIFFUSE_MAP:
map_rot = orig_tep->getRotation();
map_scaleS = orig_tep->mScaleS;
map_scaleT = orig_tep->mScaleT;
map_offsS = orig_tep->mOffsetS;
map_offsT = orig_tep->mOffsetT;
break;
case LLRender::NORMAL_MAP:
if (orig_tep->getMaterialParams()->getNormalID().isNull())
{
return false;
}
map_rot = orig_tep->getMaterialParams()->getNormalRotation();
map_scaleS = orig_tep->getMaterialParams()->getNormalRepeatX();
map_scaleT = orig_tep->getMaterialParams()->getNormalRepeatY();
map_offsS = orig_tep->getMaterialParams()->getNormalOffsetX();
map_offsT = orig_tep->getMaterialParams()->getNormalOffsetY();
break;
case LLRender::SPECULAR_MAP:
if (orig_tep->getMaterialParams()->getSpecularID().isNull())
{
return false;
}
map_rot = orig_tep->getMaterialParams()->getSpecularRotation();
map_scaleS = orig_tep->getMaterialParams()->getSpecularRepeatX();
map_scaleT = orig_tep->getMaterialParams()->getSpecularRepeatY();
map_offsS = orig_tep->getMaterialParams()->getSpecularOffsetX();
map_offsT = orig_tep->getMaterialParams()->getSpecularOffsetY();
break;
default: /*make compiler happy*/
break;
}
LLVector3 orig_pos, this_pos;
LLQuaternion orig_face_rot, this_face_rot;
F32 orig_proj_scale, this_proj_scale;
@ -1145,7 +1182,7 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs
getPlanarProjectedParams(&this_face_rot, &this_pos, &this_proj_scale);
// The rotation of "this face's" texture:
LLQuaternion orig_st_rot = LLQuaternion(orig_tep->getRotation(), LLVector3::z_axis) * orig_face_rot;
LLQuaternion orig_st_rot = LLQuaternion(map_rot, LLVector3::z_axis) * orig_face_rot;
LLQuaternion this_st_rot = orig_st_rot * ~this_face_rot;
F32 x_ang, y_ang, z_ang;
this_st_rot.getEulerAngles(&x_ang, &y_ang, &z_ang);
@ -1153,10 +1190,10 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs
// Offset and scale of "this face's" texture:
LLVector3 centers_dist = (this_pos - orig_pos) * ~orig_st_rot;
LLVector3 st_scale(orig_tep->mScaleS, orig_tep->mScaleT, 1.f);
LLVector3 st_scale(map_scaleS, map_scaleT, 1.f);
st_scale *= orig_proj_scale;
centers_dist.scaleVec(st_scale);
LLVector2 orig_st_offset(orig_tep->mOffsetS, orig_tep->mOffsetT);
LLVector2 orig_st_offset(map_offsS, map_offsT);
*res_st_offset = orig_st_offset + (LLVector2)centers_dist;
res_st_offset->mV[VX] -= (S32)res_st_offset->mV[VX];

View File

@ -115,7 +115,7 @@ public:
LLVector2 surfaceToTexture(LLVector2 surface_coord, const LLVector4a& position, const LLVector4a& normal);
void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const;
bool calcAlignedPlanarTE(const LLFace* align_to, LLVector2* st_offset,
LLVector2* st_scale, F32* st_rot) const;
LLVector2* st_scale, F32* st_rot, LLRender::eTexIndex map = LLRender::DIFFUSE_MAP) const;
U32 getState() const { return mState; }
void setState(U32 state) { mState |= state; }

View File

@ -527,7 +527,7 @@ void LLFloaterPay::onGive(give_money_ptr info)
// <FS:Ansariel> FIRE-16092: Make payment confirmation customizable
//if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount)
if (gSavedSettings.getBOOL("FSConfirmPayments") && amount > gSavedSettings.getS32("FSPaymentConfirmationThreshold") && gStatusBar && gStatusBar->getBalance() > amount)
if (gSavedSettings.getBOOL("FSConfirmPayments") && amount > gSavedSettings.getS32("FSPaymentConfirmationThreshold") && gStatusBar && gStatusBar->getBalance() >= amount)
// </FS:Ansariel>
{
LLUUID payee_id = LLUUID::null;
@ -553,11 +553,26 @@ void LLFloaterPay::onGive(give_money_ptr info)
payee_id = floater->mTargetUUID;
}
LLSD args;
args["TARGET"] = LLSLURL(is_group ? "group" : "agent", payee_id, "completename").getSLURLString();
args["AMOUNT"] = amount;
// <FS:Ansariel> FIRE-24208: Skip notification if paying yourself
//LLSD args;
//args["TARGET"] = LLSLURL(is_group ? "group" : "agent", payee_id, "completename").getSLURLString();
//args["AMOUNT"] = amount;
LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info));
//LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info));
if (is_group || payee_id != gAgentID)
{
LLSD args;
args["TARGET"] = LLSLURL(is_group ? "group" : "agent", payee_id, "completename").getSLURLString();
args["AMOUNT"] = amount;
LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info));
}
else
{
floater->give(amount);
floater->closeFloater();
}
// </FS:Ansariel>
}
else
{

View File

@ -1239,9 +1239,6 @@ void LLFloaterPreference::onOpen(const LLSD& key)
getChild<LLPanel>("client_tags_panel")->setVisible(in_opensim);
// </FS:CR>
// <FS:Ansariel> Force HTTP features on SL
getChild<LLCheckBoxCtrl>("TexturesHTTP")->setEnabled(in_opensim);
// <FS:Ansariel> Group mutes backup
LLScrollListItem* groupmute_item = getChild<LLScrollListCtrl>("restore_per_account_files_list")->getItem(LLSD("groupmutes"));
groupmute_item->setEnabled(in_opensim);

View File

@ -60,7 +60,7 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key)
mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsDebug::onClickDefault, this));
mCommitCallbackRegistrar.add("UpdateFilter", boost::bind(&LLFloaterSettingsDebug::onUpdateFilter, this));
mCommitCallbackRegistrar.add("ClickCopy", boost::bind(&LLFloaterSettingsDebug::onCopyToClipboard, this));
mCommitCallbackRegistrar.add("ClickSanityIcon", boost::bind(&LLFloaterSettingsDebug::onSanityCheck, this));
mCommitCallbackRegistrar.add("ClickSanityIcon", boost::bind(&LLFloaterSettingsDebug::onClickSanityWarning, this));
// make sure that the first filter update succeeds
mOldSearchTerm = std::string("---");
@ -249,6 +249,13 @@ void LLFloaterSettingsDebug::onSanityCheck()
SanityCheck::instance().onSanity(mCurrentControlVariable);
}
void LLFloaterSettingsDebug::onClickSanityWarning()
{
// pass "true" to tell the sanity checker to pop up the warning, even when
// it was shown before and would be suppressed otherwise
SanityCheck::instance().onSanity(mCurrentControlVariable, true);
}
void LLFloaterSettingsDebug::onCommitSettings()
{
if (!mCurrentControlVariable)

View File

@ -60,6 +60,7 @@ public:
void onClickDefault();
void onCopyToClipboard();
void onSanityCheck();
void onClickSanityWarning();
static void showControl(const std::string& control);
private:

View File

@ -905,6 +905,7 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data)
previewp->setSnapshotBufferType((LLSnapshotModel::ESnapshotLayerType)combobox->getCurrentIndex());
}
view->impl->checkAutoSnapshot(previewp, TRUE);
previewp->updateSnapshot(TRUE, TRUE);
}
}

View File

@ -510,14 +510,23 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
// }
//}
// <FS:TS> FIRE-24175: Fix look at target clamping
bool isLookingAtSelf = false;
if(object){
isLookingAtSelf = object->isAvatar() && ((LLVOAvatar*)(LLViewerObject*)object)->isSelf();
}
static LLCachedControl<bool> s_EnableLimiter(gSavedSettings, "FSLookAtTargetLimitDistance");
bool lookAtShouldClamp = s_EnableLimiter &&
(*mAttentions)[mTargetType].mName != "None" &&
(*mAttentions)[mTargetType].mName != "Idle" &&
//(*mAttentions)[mTargetType].mName != "None" &&
//(*mAttentions)[mTargetType].mName != "Idle" &&
(*mAttentions)[mTargetType].mName != "Respond" &&
(*mAttentions)[mTargetType].mName != "Conversation" &&
(*mAttentions)[mTargetType].mName != "Freelook" &&
(*mAttentions)[mTargetType].mName != "AutoListen";
//(*mAttentions)[mTargetType].mName != "FreeLook" &&
//(*mAttentions)[mTargetType].mName != "AutoListen";
(*mAttentions)[mTargetType].mName != "AutoListen" &&
!isLookingAtSelf;
// </FS:TS> FIRE-24175
if (!lookAtShouldClamp) //We do a similar but seperate calculation if we are doing limited distances
{
@ -549,18 +558,20 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec
{
if (lookAtShouldClamp)
{
if (mTargetObject->isAvatar() && ((LLVOAvatar*)(LLViewerObject*)mTargetObject)->isSelf())
{
//We use this branch and mimic our mouse/first person look pose.
mTargetOffsetGlobal.setVec(gAgent.getPosGlobalFromAgent(gAgentAvatarp->mHeadp->getWorldPosition() + position));
mTargetObject = NULL;
}
else
{
// <FS:TS> FIRE-24175: Fix look at target clamping
//if (mTargetObject->isAvatar() && ((LLVOAvatar*)(LLViewerObject*)mTargetObject)->isSelf())
//{
// //We use this branch and mimic our mouse/first person look pose.
// mTargetOffsetGlobal.setVec(gAgent.getPosGlobalFromAgent(gAgentAvatarp->mHeadp->getWorldPosition() + position));
// mTargetObject = NULL;
//}
//else
//{
//Otherwise, mimic looking at the object.
mTargetOffsetGlobal.setVec(object->getPositionGlobal() + (LLVector3d)(position * object->getRotationRegion()));
mTargetObject = NULL;
}
//}
// </FS:TS> FIRE-24175
}
else
{

View File

@ -7397,10 +7397,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if (LLWearableType::getAllowMultiwear(mWearableType))
{
items.push_back(std::string("Wearable Add"));
// if (!gAgentWearables.canAddWearable(mWearableType))
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2011-07-24 (Catznip-2.6.0e) | Added: Catznip-2.6.0e
if ( (!gAgentWearables.canAddWearable(mWearableType)) || (gAgentWearables.getWearableFromAssetID(item->getAssetUUID())) )
// [/SL:KB]
if (!gAgentWearables.canAddWearable(mWearableType))
{
disabled_items.push_back(std::string("Wearable Add"));
}

View File

@ -83,6 +83,7 @@ LLIconDictionary::LLIconDictionary()
addEntry(LLInventoryType::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt"));
addEntry(LLInventoryType::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha"));
addEntry(LLInventoryType::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo"));
addEntry(LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, new IconEntry("Inv_Universal"));
addEntry(LLInventoryType::ICONNAME_ANIMATION, new IconEntry("Inv_Animation"));
addEntry(LLInventoryType::ICONNAME_GESTURE, new IconEntry("Inv_Gesture"));

View File

@ -384,6 +384,7 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id)
updateUserLayers(old_id, new_id, LLWearableType::WT_SKIRT);
updateUserLayers(old_id, new_id, LLWearableType::WT_SOCKS);
updateUserLayers(old_id, new_id, LLWearableType::WT_TATTOO);
updateUserLayers(old_id, new_id, LLWearableType::WT_UNIVERSAL);
updateUserLayers(old_id, new_id, LLWearableType::WT_UNDERPANTS);
updateUserLayers(old_id, new_id, LLWearableType::WT_UNDERSHIRT);
}
@ -758,7 +759,7 @@ LLAvatarAppearanceDefines::ETextureIndex LLLocalBitmap::getTexIndex(
case LLWearableType::WT_TATTOO:
{
switch(baked_texind)
switch (baked_texind)
{
case LLAvatarAppearanceDefines::BAKED_HEAD:
{
@ -776,6 +777,75 @@ LLAvatarAppearanceDefines::ETextureIndex LLLocalBitmap::getTexIndex(
result = LLAvatarAppearanceDefines::TEX_UPPER_TATTOO;
break;
}
default:
{
break;
}
}
break;
}
case LLWearableType::WT_UNIVERSAL:
{
switch (baked_texind)
{
case LLAvatarAppearanceDefines::BAKED_SKIRT:
{
result = LLAvatarAppearanceDefines::TEX_SKIRT_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_EYES:
{
result = LLAvatarAppearanceDefines::TEX_EYES_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_HAIR:
{
result = LLAvatarAppearanceDefines::TEX_HAIR_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_LEFT_ARM:
{
result = LLAvatarAppearanceDefines::TEX_LEFT_ARM_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_LEFT_LEG:
{
result = LLAvatarAppearanceDefines::TEX_LEFT_LEG_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_AUX1:
{
result = LLAvatarAppearanceDefines::TEX_AUX1_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_AUX2:
{
result = LLAvatarAppearanceDefines::TEX_AUX2_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_AUX3:
{
result = LLAvatarAppearanceDefines::TEX_AUX3_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_UPPER:
{
result = LLAvatarAppearanceDefines::TEX_UPPER_UNIVERSAL_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_LOWER:
{
result = LLAvatarAppearanceDefines::TEX_LOWER_UNIVERSAL_TATTOO;
break;
}
case LLAvatarAppearanceDefines::BAKED_HEAD:
{
result = LLAvatarAppearanceDefines::TEX_HEAD_UNIVERSAL_TATTOO;
break;
}
default:
{

View File

@ -819,7 +819,18 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content,
for (; mav_errors_it != mav_errors.end(); ++mav_errors_it)
{
std::string mav_details = "Mav_Details_" + *mav_errors_it;
details << "Message: '" << *mav_errors_it << "': " << LLTrans::getString(mav_details) << std::endl << std::endl;
// <FS:Ansariel> Details error can be some message already.
//details << "Message: '" << *mav_errors_it << "': " << LLTrans::getString(mav_details) << std::endl << std::endl;
std::string translated_details;
if (LLTrans::findString(translated_details, mav_details))
{
details << "Message: '" << *mav_errors_it << "': " << translated_details << std::endl << std::endl;
}
else
{
details << "Message: '" << *mav_errors_it << "'" << std::endl << std::endl;
}
// </FS:Ansariel>
}
std::string details_str = details.str();

View File

@ -102,6 +102,7 @@ enum ESubpart {
SUBPART_SKIRT,
SUBPART_ALPHA,
SUBPART_TATTOO,
SUBPART_UNIVERSAL,
SUBPART_PHYSICS_BREASTS_UPDOWN,
SUBPART_PHYSICS_BREASTS_INOUT,
SUBPART_PHYSICS_BREASTS_LEFTRIGHT,
@ -246,7 +247,8 @@ LLEditWearableDictionary::Wearables::Wearables()
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(LLWearableType::WT_SKIRT,"edit_skirt_title","skirt_desc_text", texture_vec_t{TEX_SKIRT}, texture_vec_t{TEX_SKIRT}, subpart_vec_t{SUBPART_SKIRT}));
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(LLWearableType::WT_ALPHA,"edit_alpha_title","alpha_desc_text", texture_vec_t(), texture_vec_t{TEX_LOWER_ALPHA, TEX_UPPER_ALPHA, TEX_HEAD_ALPHA, TEX_EYES_ALPHA, TEX_HAIR_ALPHA}, subpart_vec_t{SUBPART_ALPHA}));
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(LLWearableType::WT_TATTOO,"edit_tattoo_title","tattoo_desc_text", texture_vec_t{TEX_HEAD_TATTOO}, texture_vec_t{TEX_LOWER_TATTOO, TEX_UPPER_TATTOO, TEX_HEAD_TATTOO}, subpart_vec_t{SUBPART_TATTOO}));
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED}));
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(LLWearableType::WT_UNIVERSAL, "edit_universal_title", "universal_desc_text", texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO }, texture_vec_t{ TEX_HEAD_UNIVERSAL_TATTOO, TEX_UPPER_UNIVERSAL_TATTOO, TEX_LOWER_UNIVERSAL_TATTOO, TEX_SKIRT_TATTOO, TEX_HAIR_TATTOO, TEX_EYES_TATTOO, TEX_LEFT_ARM_TATTOO, TEX_LEFT_LEG_TATTOO, TEX_AUX1_TATTOO, TEX_AUX2_TATTOO, TEX_AUX3_TATTOO }, subpart_vec_t{ SUBPART_UNIVERSAL }));
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(LLWearableType::WT_PHYSICS,"edit_physics_title","physics_desc_text", texture_vec_t(), texture_vec_t(), subpart_vec_t{SUBPART_PHYSICS_BREASTS_UPDOWN, SUBPART_PHYSICS_BREASTS_INOUT, SUBPART_PHYSICS_BREASTS_LEFTRIGHT, SUBPART_PHYSICS_BELLY_UPDOWN, SUBPART_PHYSICS_BUTT_UPDOWN, SUBPART_PHYSICS_BUTT_LEFTRIGHT, SUBPART_PHYSICS_ADVANCED}));
}
LLEditWearableDictionary::WearableEntry::WearableEntry(LLWearableType::EType type,
@ -297,13 +299,15 @@ LLEditWearableDictionary::Subparts::Subparts()
addEntry(SUBPART_GLOVES, new SubpartEntry(SUBPART_GLOVES, "mTorso", "gloves", "gloves_main_param_list", "gloves_main_tab", LLVector3d(0.f, 0.f, 0.f), LLVector3d(-1.f, 0.15f, 0.f),SEX_BOTH));
addEntry(SUBPART_UNDERSHIRT, new SubpartEntry(SUBPART_UNDERSHIRT, "mTorso", "undershirt", "undershirt_main_param_list", "undershirt_main_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(-1.f, 0.15f, 0.3f),SEX_BOTH));
addEntry(SUBPART_UNDERPANTS, new SubpartEntry(SUBPART_UNDERPANTS, "mPelvis", "underpants", "underpants_main_param_list", "underpants_main_tab", LLVector3d(0.f, 0.f, -0.5f), LLVector3d(-1.6f, 0.15f, -0.5f),SEX_BOTH));
// <FS:Ansariel> Alpha and tattoo don't adhere to the usual panel layout and don't have a param list and main tab
// <FS:Ansariel> Alpha, tattoo and universal don't adhere to the usual panel layout and don't have a param list and main tab
//addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "alpha_main_param_list", "alpha_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
//addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "tattoo_main_param_list", "tattoo_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
//addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "universal_main_param_list", "universal_main_tab", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH));
addEntry(SUBPART_ALPHA, new SubpartEntry(SUBPART_ALPHA, "mPelvis", "alpha", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
addEntry(SUBPART_TATTOO, new SubpartEntry(SUBPART_TATTOO, "mPelvis", "tattoo", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f),SEX_BOTH));
addEntry(SUBPART_UNIVERSAL, new SubpartEntry(SUBPART_UNIVERSAL, "mPelvis", "universal", "", "", LLVector3d(0.f, 0.f, 0.1f), LLVector3d(-2.5f, 0.5f, 0.8f), SEX_BOTH));
// </FS:Ansariel>
addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
addEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BREASTS_UPDOWN, "mTorso", "physics_breasts_updown", "physics_breasts_updown_param_list", "physics_breasts_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
addEntry(SUBPART_PHYSICS_BREASTS_INOUT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_INOUT, "mTorso", "physics_breasts_inout", "physics_breasts_inout_param_list", "physics_breasts_inout_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
addEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, new SubpartEntry(SUBPART_PHYSICS_BREASTS_LEFTRIGHT, "mTorso", "physics_breasts_leftright", "physics_breasts_leftright_param_list", "physics_breasts_leftright_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_FEMALE));
// <FS:Ansariel> Fix XUI warning
@ -348,6 +352,7 @@ LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls()
addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Color/Tint" ));
addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Color/Tint" ));
addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry(TEX_HEAD_TATTOO, "Color/Tint" ));
addEntry (TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry(TEX_HEAD_UNIVERSAL_TATTOO, "Color/Tint"));
}
LLEditWearableDictionary::TextureCtrls::TextureCtrls()
@ -375,6 +380,17 @@ LLEditWearableDictionary::TextureCtrls::TextureCtrls()
addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE ));
addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE ));
addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE ));
addEntry ( TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE));
addEntry ( TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE));
addEntry ( TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE));
addEntry ( TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE));
addEntry ( TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE));
addEntry ( TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE));
addEntry (TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE));
addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE));
addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE));
addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE));
addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE));
}
LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index,
@ -761,6 +777,7 @@ BOOL LLPanelEditWearable::postBuild()
mPanelSkirt = getChild<LLPanel>("edit_skirt_panel");
mPanelAlpha = getChild<LLPanel>("edit_alpha_panel");
mPanelTattoo = getChild<LLPanel>("edit_tattoo_panel");
mPanelUniversal = getChild<LLPanel>("edit_universal_panel");
mPanelPhysics = getChild<LLPanel>("edit_physics_panel");
mTxtAvatarHeight = mPanelShape->getChild<LLTextBox>("avatar_height");
@ -1575,6 +1592,10 @@ LLPanel* LLPanelEditWearable::getPanel(LLWearableType::EType type)
case LLWearableType::WT_TATTOO:
return mPanelTattoo;
break;
case LLWearableType::WT_UNIVERSAL:
return mPanelUniversal;
break;
case LLWearableType::WT_PHYSICS:
return mPanelPhysics;

View File

@ -177,6 +177,7 @@ private:
LLPanel *mPanelSkirt;
LLPanel *mPanelAlpha;
LLPanel *mPanelTattoo;
LLPanel *mPanelUniversal;
LLPanel *mPanelPhysics;
typedef std::map<std::string, LLAvatarAppearanceDefines::ETextureIndex> string_texture_index_map_t;

View File

@ -84,6 +84,8 @@ const S32 ALPHAMODE_MASK = 2; // Alpha masking mode
const S32 BUMPY_TEXTURE = 18; // use supplied normal map
const S32 SHINY_TEXTURE = 4; // use supplied specular map
BOOST_STATIC_ASSERT(MATTYPE_DIFFUSE == LLRender::DIFFUSE_MAP && MATTYPE_NORMAL == LLRender::NORMAL_MAP && MATTYPE_SPECULAR == LLRender::SPECULAR_MAP);
//
// "Use texture" label for normal/specular type comboboxes
// Filled in at initialization from translated strings
@ -253,6 +255,7 @@ BOOL LLPanelFace::postBuild()
// </FS>
childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
childSetAction("button align textures", &LLPanelFace::onAlignTexture, this);
// <FS:CR> Moved to the header so other functions can use them too.
//LLTextureCtrl* mTextureCtrl;
@ -544,11 +547,28 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
{
BOOL valid;
F32 value;
//LLSpinCtrl* ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>("TexScaleU");
//LLSpinCtrl* ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>("TexScaleV");
//LLSpinCtrl* ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>("TexOffsetU");
//LLSpinCtrl* ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>("TexOffsetV");
//LLSpinCtrl* ctrlTexRotation = mPanel->getChild<LLSpinCtrl>("TexRot");
LLRadioGroup * radio_mat_type = mPanel->getChild<LLRadioGroup>("radio_material_type");
std::string prefix;
switch (radio_mat_type->getSelectedIndex())
{
case MATTYPE_DIFFUSE:
prefix = "Tex";
break;
case MATTYPE_NORMAL:
prefix = "bumpy";
break;
case MATTYPE_SPECULAR:
prefix = "shiny";
break;
}
LLSpinCtrl * ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleU");
LLSpinCtrl * ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleV");
LLSpinCtrl * ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetU");
LLSpinCtrl * ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetV");
LLSpinCtrl * ctrlTexRotation = mPanel->getChild<LLSpinCtrl>(prefix + "Rot");
LLComboBox* comboTexGen = mPanel->getChild<LLComboBox>("combobox texgen");
LLCheckBoxCtrl* cb_planar_align = mPanel->getChild<LLCheckBoxCtrl>("checkbox planar align");
bool align_planar = (cb_planar_align && cb_planar_align->get());
@ -556,12 +576,12 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
llassert(comboTexGen);
llassert(object);
if (mPanel->mCtrlTexScaleU)
if (ctrlTexScaleS)
{
valid = !mPanel->mCtrlTexScaleU->getTentative();
valid = !ctrlTexScaleS->getTentative();
if (valid || align_planar)
{
value = mPanel->mCtrlTexScaleU->get();
value = ctrlTexScaleS->get();
if (comboTexGen &&
comboTexGen->getCurrentIndex() == 1)
{
@ -571,18 +591,18 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
if (align_planar)
{
LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, value, te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, value, te, object->getID());
}
}
}
if (mPanel->mCtrlTexScaleV)
if (ctrlTexScaleT)
{
valid = !mPanel->mCtrlTexScaleV->getTentative();
valid = !ctrlTexScaleT->getTentative();
if (valid || align_planar)
{
value = mPanel->mCtrlTexScaleV->get();
value = ctrlTexScaleT->get();
if (comboTexGen &&
comboTexGen->getCurrentIndex() == 1)
{
@ -592,56 +612,56 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
if (align_planar)
{
LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, value, te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, value, te, object->getID());
}
}
}
if (mPanel->mCtrlTexOffsetU)
if (ctrlTexOffsetS)
{
valid = !mPanel->mCtrlTexOffsetU->getTentative();
valid = !ctrlTexOffsetS->getTentative();
if (valid || align_planar)
{
value = mPanel->mCtrlTexOffsetU->get();
value = ctrlTexOffsetS->get();
object->setTEOffsetS( te, value );
if (align_planar)
{
LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, value, te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, value, te, object->getID());
}
}
}
if (mPanel->mCtrlTexOffsetV)
if (ctrlTexOffsetT)
{
valid = !mPanel->mCtrlTexOffsetV->getTentative();
valid = !ctrlTexOffsetT->getTentative();
if (valid || align_planar)
{
value = mPanel->mCtrlTexOffsetV->get();
value = ctrlTexOffsetT->get();
object->setTEOffsetT( te, value );
if (align_planar)
{
LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, value, te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, value, te, object->getID());
}
}
}
if (mPanel->mCtrlTexRot)
if (ctrlTexRotation)
{
valid = !mPanel->mCtrlTexRot->getTentative();
valid = !ctrlTexRotation->getTentative();
if (valid || align_planar)
{
value = mPanel->mCtrlTexRot->get() * DEG_TO_RAD;
value = ctrlTexRotation->get() * DEG_TO_RAD;
object->setTERotation( te, value );
if (align_planar)
{
LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, value, te);
LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, value, te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, value, te, object->getID());
}
}
}
@ -713,6 +733,68 @@ private:
LLFace* mCenterFace;
};
struct LLPanelFaceSetAlignedConcreteTEFunctor : public LLSelectedTEFunctor
{
LLPanelFaceSetAlignedConcreteTEFunctor(LLPanelFace* panel, LLFace* center_face, LLRender::eTexIndex map) :
mPanel(panel),
mChefFace(center_face),
mMap(map)
{}
virtual bool apply(LLViewerObject* object, S32 te)
{
LLFace* facep = object->mDrawable->getFace(te);
if (!facep)
{
return true;
}
if (facep->getViewerObject()->getVolume()->getNumVolumeFaces() <= te)
{
return true;
}
if (mChefFace != facep)
{
LLVector2 uv_offset, uv_scale;
F32 uv_rot;
if (facep->calcAlignedPlanarTE(mChefFace, &uv_offset, &uv_scale, &uv_rot, mMap))
{
switch (mMap)
{
case LLRender::DIFFUSE_MAP:
object->setTEOffset(te, uv_offset.mV[VX], uv_offset.mV[VY]);
object->setTEScale(te, uv_scale.mV[VX], uv_scale.mV[VY]);
object->setTERotation(te, uv_rot);
break;
case LLRender::NORMAL_MAP:
LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, uv_rot, te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, uv_offset.mV[VX], te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, uv_offset.mV[VY], te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, uv_scale.mV[VX], te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, uv_scale.mV[VY], te, object->getID());
break;
case LLRender::SPECULAR_MAP:
LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, uv_rot, te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, uv_offset.mV[VX], te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, uv_offset.mV[VY], te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, uv_scale.mV[VX], te, object->getID());
LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, uv_scale.mV[VY], te, object->getID());
break;
default: /*make compiler happy*/
break;
}
}
}
return true;
}
private:
LLPanelFace* mPanel;
LLFace* mChefFace;
LLRender::eTexIndex mMap;
};
// Functor that tests if a face is aligned to mCenterFace
struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor
{
@ -798,6 +880,17 @@ void LLPanelFace::sendTextureInfo()
LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc);
}
void LLPanelFace::alignTestureLayer()
{
LLFace* last_face = NULL;
bool identical_face = false;
LLSelectedTE::getFace(last_face, identical_face);
LLRadioGroup * radio_mat_type = getChild<LLRadioGroup>("radio_material_type");
LLPanelFaceSetAlignedConcreteTEFunctor setfunc(this, last_face, static_cast<LLRender::eTexIndex>(radio_mat_type->getSelectedIndex()));
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
}
void LLPanelFace::getState()
{
updateUI();
@ -1031,41 +1124,75 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
updateAlphaControls();
if(mTextureCtrl)
{
if (mTextureCtrl)
{
if (identical_diffuse)
{
mTextureCtrl->setTentative( FALSE );
mTextureCtrl->setEnabled( editable );
mTextureCtrl->setImageAssetID( id );
mTextureCtrl->setTentative(FALSE);
mTextureCtrl->setEnabled(editable);
mTextureCtrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
bool allAttachments = true;
for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
iter != LLSelectMgr::getInstance()->getSelection()->end();iter++)
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if (!object->isAttachment())
{
allAttachments = false;
break;
}
}
mTextureCtrl->setBakeTextureEnabled(allAttachments);
}
else if (id.isNull())
{
// None selected
mTextureCtrl->setTentative( FALSE );
mTextureCtrl->setEnabled( FALSE );
mTextureCtrl->setImageAssetID( LLUUID::null );
getChildView("combobox alphamode")->setEnabled( FALSE );
getChildView("label alphamode")->setEnabled( FALSE );
getChildView("maskcutoff")->setEnabled( FALSE);
getChildView("label maskcutoff")->setEnabled( FALSE );
}
else
{
// Tentative: multiple selected with different textures
mTextureCtrl->setTentative( TRUE );
mTextureCtrl->setEnabled( editable );
mTextureCtrl->setImageAssetID( id );
{
// None selected
mTextureCtrl->setTentative(FALSE);
mTextureCtrl->setEnabled(FALSE);
mTextureCtrl->setImageAssetID(LLUUID::null);
getChildView("combobox alphamode")->setEnabled(FALSE);
getChildView("label alphamode")->setEnabled(FALSE);
getChildView("maskcutoff")->setEnabled(FALSE);
getChildView("label maskcutoff")->setEnabled(FALSE);
mTextureCtrl->setBakeTextureEnabled(false);
}
else
{
// Tentative: multiple selected with different textures
mTextureCtrl->setTentative(TRUE);
mTextureCtrl->setEnabled(editable);
mTextureCtrl->setImageAssetID(id);
getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f);
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
bool allAttachments = true;
for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
iter != LLSelectMgr::getInstance()->getSelection()->end();iter++)
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if (!object->isAttachment())
{
allAttachments = false;
break;
}
}
mTextureCtrl->setBakeTextureEnabled(allAttachments);
}
}
if (mShinyTextureCtrl)
@ -1093,6 +1220,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool enabled = (editable && isIdenticalPlanarTexgen());
childSetValue("checkbox planar align", align_planar && enabled);
childSetEnabled("checkbox planar align", enabled);
childSetEnabled("button align textures", enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1);
if (align_planar && enabled)
{
@ -2275,7 +2403,18 @@ void LLPanelFace::onCommitMaterialBumpyRot(LLUICtrl* ctrl, void* userdata)
}
else
{
LLSelectedTEMaterial::setNormalRotation(self,self->getCurrentBumpyRot() * DEG_TO_RAD);
if ((bool)self->childGetValue("checkbox planar align").asBoolean())
{
LLFace* last_face = NULL;
bool identical_face = false;
LLSelectedTE::getFace(last_face, identical_face);
LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face);
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
}
else
{
LLSelectedTEMaterial::setNormalRotation(self, self->getCurrentBumpyRot() * DEG_TO_RAD);
}
}
}
@ -2292,7 +2431,18 @@ void LLPanelFace::onCommitMaterialShinyRot(LLUICtrl* ctrl, void* userdata)
}
else
{
LLSelectedTEMaterial::setSpecularRotation(self,self->getCurrentShinyRot() * DEG_TO_RAD);
if ((bool)self->childGetValue("checkbox planar align").asBoolean())
{
LLFace* last_face = NULL;
bool identical_face = false;
LLSelectedTE::getFace(last_face, identical_face);
LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face);
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
}
else
{
LLSelectedTEMaterial::setSpecularRotation(self, self->getCurrentShinyRot() * DEG_TO_RAD);
}
}
}
@ -2549,6 +2699,11 @@ void LLPanelFace::onClickAutoFix(void* userdata)
LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc);
}
void LLPanelFace::onAlignTexture(void* userdata)
{
LLPanelFace* self = (LLPanelFace*)userdata;
self->alignTestureLayer();
}
// TODO: I don't know who put these in or what these are for???
@ -2661,6 +2816,16 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical)
{
LLUUID get(LLViewerObject* object, S32 te_index)
{
LLTextureEntry *te = object->getTE(te_index);
if (te)
{
if ((te->getID() == IMG_USE_BAKED_EYES) || (te->getID() == IMG_USE_BAKED_HAIR) || (te->getID() == IMG_USE_BAKED_HEAD) || (te->getID() == IMG_USE_BAKED_LOWER) || (te->getID() == IMG_USE_BAKED_SKIRT) || (te->getID() == IMG_USE_BAKED_UPPER)
|| (te->getID() == IMG_USE_BAKED_LEFTARM) || (te->getID() == IMG_USE_BAKED_LEFTLEG) || (te->getID() == IMG_USE_BAKED_AUX1) || (te->getID() == IMG_USE_BAKED_AUX2) || (te->getID() == IMG_USE_BAKED_AUX3))
{
return te->getID();
}
}
LLUUID id;
LLViewerTexture* image = object->getTEImage(te_index);
if (image)
@ -2670,7 +2835,6 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical)
if (!id.isNull() && LLViewerMedia::textureHasMedia(id))
{
LLTextureEntry *te = object->getTE(te_index);
if (te)
{
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL;

View File

@ -128,6 +128,7 @@ protected:
void sendFullbright(); // applies and sends full bright
void sendGlow();
void sendMedia();
void alignTestureLayer();
// this function is to return TRUE if the drag should succeed.
static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
@ -204,6 +205,7 @@ protected:
static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata);
static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo);
static void onClickAutoFix(void*);
static void onAlignTexture(void*);
static F32 valueGlow(LLViewerObject* object, S32 face);

View File

@ -474,6 +474,7 @@ BOOL LLPanelOutfitEdit::postBuild()
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("alpha"), new LLFindActualWearablesOfType(LLWearableType::WT_ALPHA)));
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("tattoo"), new LLFindActualWearablesOfType(LLWearableType::WT_TATTOO)));
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("physics"), new LLFindActualWearablesOfType(LLWearableType::WT_PHYSICS)));
mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("universal"), new LLFindActualWearablesOfType(LLWearableType::WT_UNIVERSAL)));
mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name");
mStatus = getChild<LLTextBox>("status");

View File

@ -98,6 +98,7 @@ public:
LVIT_ALPHA,
LVIT_TATTOO,
LVIT_PHYSICS,
LVIT_UNIVERSAL,
NUM_LIST_VIEW_ITEM_TYPES
} EListViewItemType;

View File

@ -383,6 +383,29 @@ void LLPanelVolume::getState( )
}
}
getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(enabled_animated_object_box);
//refresh any bakes
if (root_volobjp)
{
root_volobjp->refreshBakeTexture();
LLViewerObject::const_child_list_t& child_list = root_volobjp->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
{
LLViewerObject* objectp = *iter;
if (objectp)
{
objectp->refreshBakeTexture();
}
}
if (gAgentAvatarp)
{
gAgentAvatarp->updateMeshVisibility();
}
}
// Flexible properties
BOOL is_flexible = volobjp && volobjp->isFlexible();
@ -956,6 +979,28 @@ void LLPanelVolume::onCommitAnimatedMeshCheckbox(LLUICtrl *, void*)
{
volobjp->setExtendedMeshFlags(new_flags);
}
//refresh any bakes
if (volobjp)
{
volobjp->refreshBakeTexture();
LLViewerObject::const_child_list_t& child_list = volobjp->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
{
LLViewerObject* objectp = *iter;
if (objectp)
{
objectp->refreshBakeTexture();
}
}
if (gAgentAvatarp)
{
gAgentAvatarp->updateMeshVisibility();
}
}
}
void LLPanelVolume::onCommitIsFlexible(LLUICtrl *, void*)

View File

@ -109,6 +109,7 @@
// </FS:CR> Aurora Sim
#include "fsareasearch.h"
#include "llglheaders.h"
#include "llinventoryobserver.h"
#include "fscommon.h"
LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
@ -1750,6 +1751,7 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
// * Can just apply the texture and be done with it.
objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
}
return true;
}
};
@ -1949,6 +1951,7 @@ BOOL LLSelectMgr::selectionRevertTextures()
else
{
object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
}
}
}
@ -6050,6 +6053,84 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
gGL.scalef(cur_zoom, cur_zoom, cur_zoom);
}
bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections;
F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0);
static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha);
static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha);
auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor)
{
//Need to because crash on ATI 3800 (and similar cards) MAINT-5018
LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
if (shader)
{
gDebugProgram.bind();
}
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
BOOL is_hud_object = objectp->isHUDAttachment();
if (!is_hud_object)
{
gGL.loadIdentity();
gGL.multMatrix(gGLModelView);
}
if (objectp->mDrawable->isActive())
{
gGL.multMatrix((F32*)objectp->getRenderMatrix().mMatrix);
}
else if (!is_hud_object)
{
LLVector3 trans = objectp->getRegion()->getOriginAgent();
gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
}
bool bRenderHidenSelection = node->isTransient() ? false : LLSelectMgr::sRenderHiddenSelections;
LLVOVolume* vobj = objectp->mDrawable->getVOVolume();
if (vobj)
{
LLVertexBuffer::unbind();
gGL.pushMatrix();
gGL.multMatrix((F32*)vobj->getRelativeXform().mMatrix);
if (objectp->mDrawable->isState(LLDrawable::RIGGED))
{
vobj->updateRiggedVolume(true);
}
}
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces
for (S32 te = 0; te < num_tes; ++te)
{
if (node->isTESelected(te))
{
objectp->mDrawable->getFace(te)->renderOneWireframe(hlColor, fogCfx, wireframe_selection, bRenderHidenSelection, nullptr != shader);
}
}
gGL.popMatrix();
gGL.popMatrix();
glLineWidth(1.f);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
if (shader)
{
shader->bind();
}
};
if (mSelectedObjects->getNumNodes())
{
LLUUID inspect_item_id= LLUUID::null;
@ -6067,12 +6148,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
}
}
bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections;
F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0);
static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha);
static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha);
LLUUID focus_item_id = LLViewerMediaFocus::getInstance()->getFocusedObjectID();
// <FS:Ansariel> Improve selection silhouette rendering speed by Drake Arconis
//for (S32 pass = 0; pass < 2; pass++)
@ -6093,72 +6168,16 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
&& objectp->mDrawable->getVOVolume()
&& objectp->mDrawable->getVOVolume()->isMesh())
{
//Need to because crash on ATI 3800 (and similar cards) MAINT-5018
LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
if (shader)
{
gDebugProgram.bind();
}
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
BOOL is_hud_object = objectp->isHUDAttachment();
if (objectp->mDrawable->isActive())
{
gGL.loadMatrix(gGLModelView);
gGL.multMatrix((F32*)objectp->getRenderMatrix().mMatrix);
}
else if (!is_hud_object)
{
gGL.loadIdentity();
gGL.multMatrix(gGLModelView);
LLVector3 trans = objectp->getRegion()->getOriginAgent();
gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]);
}
LLColor4 hlColor = objectp->isRootEdit() ? sParentColor : sChildColor;
bool bRenderHidenSelection = node->isTransient() ? false : LLSelectMgr::sRenderHiddenSelections;
LLVOVolume* vobj = objectp->mDrawable->getVOVolume();
if (vobj)
if (objectp->getID() == inspect_item_id)
{
LLVertexBuffer::unbind();
gGL.pushMatrix();
gGL.multMatrix((F32*)vobj->getRelativeXform().mMatrix);
if (objectp->mDrawable->isState(LLDrawable::RIGGED))
{
vobj->updateRiggedVolume();
}
hlColor = sHighlightInspectColor;
}
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces
for (S32 te = 0; te < num_tes; ++te)
else if (node->isTransient())
{
if (node->isTESelected(te))
{
objectp->mDrawable->getFace(te)->renderOneWireframe(hlColor, fogCfx, wireframe_selection, bRenderHidenSelection, nullptr != shader);
}
}
gGL.popMatrix();
gGL.popMatrix();
glLineWidth(1.f);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
if (shader)
{
shader->bind();
hlColor = sContextSilhouetteColor;
}
renderMeshSelection_f(node, objectp, hlColor);
}
else
{
@ -6211,14 +6230,20 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
{
continue;
}
if (subtracting_from_selection)
LLColor4 highlight_color = objectp->isRoot() ? sHighlightParentColor : sHighlightChildColor;
if (objectp->mDrawable
&& objectp->mDrawable->getVOVolume()
&& objectp->mDrawable->getVOVolume()->isMesh())
{
renderMeshSelection_f(node, objectp, subtracting_from_selection ? LLColor4::red : highlight_color);
}
else if (subtracting_from_selection)
{
node->renderOneSilhouette(LLColor4::red);
}
else if (!objectp->isSelected())
{
LLColor4 highlight_color = objectp->isRoot() ? sHighlightParentColor : sHighlightChildColor;
node->renderOneSilhouette(highlight_color);
}
}

View File

@ -2628,7 +2628,10 @@ bool idle_startup()
gSavedSettings.setBOOL("ShowStartLocation", TRUE);
// Open Conversation floater on first login.
LLFloaterReg::toggleInstanceOrBringToFront("im_container");
// <FS:Ansariel> [FS Communication UI]
//LLFloaterReg::toggleInstanceOrBringToFront("im_container");
LLFloaterReg::toggleInstanceOrBringToFront("fs_im_container");
// </FS:Ansariel> [FS Communication UI]
}

View File

@ -32,6 +32,7 @@
#include "llrender.h"
#include "llagent.h"
#include "llviewertexturelist.h"
#include "llselectmgr.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "llbutton.h"
@ -70,6 +71,8 @@
#include "lllocalbitmaps.h"
#include "llerror.h"
#include "llavatarappearancedefines.h"
#include "fscommon.h"
static const F32 CONTEXT_CONE_IN_ALPHA = 0.0f;
@ -122,6 +125,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mOnFloaterCloseCallback(NULL),
mSetImageAssetIDCallback(NULL),
mOnUpdateImageStatsCallback(NULL),
mBakeTextureEnabled(FALSE),
mLocalBitmapsAddedCallbackConnection() // <FS:Ansariel> Threaded filepickers
{
buildFromFile("floater_texture_ctrl.xml");
@ -149,54 +153,75 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
mNoCopyTextureSelected = FALSE;
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
mImageAssetID = image_id;
LLUUID item_id = findItemID(mImageAssetID, FALSE);
if (item_id.isNull())
if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID))
{
mInventoryPanel->getRootFolder()->clearSelection();
//<FS:Chaser> Clear out the UUID instead of keeping the last value
getChild<LLLineEditor>("TextureKey")->setText(LLUUID::null.asString());
//</FS:Chaser>
if ( mBakeTextureEnabled && mModeSelector->getSelectedIndex() != 2)
{
mModeSelector->setSelectedIndex(2, 0);
onModeSelect(0,this);
}
}
else
{
LLInventoryItem* itemp = gInventory.getItem(image_id);
//<FS:Chaser> Texture UUID picker
//if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
if (itemp)
if (mModeSelector->getSelectedIndex() == 2)
{
BOOL copy = itemp->getPermissions().allowCopyBy(gAgent.getID());
BOOL mod = itemp->getPermissions().allowModifyBy(gAgent.getID());
BOOL xfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
if(!copy)
mModeSelector->setSelectedIndex(0, 0);
onModeSelect(0,this);
}
LLUUID item_id = findItemID(mImageAssetID, FALSE);
if (item_id.isNull())
{
mInventoryPanel->getRootFolder()->clearSelection();
//<FS:Chaser> Clear out the UUID instead of keeping the last value
getChild<LLLineEditor>("TextureKey")->setText(LLUUID::null.asString());
//</FS:Chaser>
}
else
{
LLInventoryItem* itemp = gInventory.getItem(image_id);
//<FS:Chaser> Texture UUID picker
//if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
if (itemp)
{
// no copy texture
getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
mNoCopyTextureSelected = TRUE;
}
//Verify permissions before revealing UUID.
//Replicates behaviour of "Copy UUID" on inventory. If you can't copy it there, you can't copy it here.
if(copy&&mod&&xfer)
{
getChild<LLLineEditor>("TextureKey")->setText(image_id.asString());
BOOL copy = itemp->getPermissions().allowCopyBy(gAgent.getID());
BOOL mod = itemp->getPermissions().allowModifyBy(gAgent.getID());
BOOL xfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
if(!copy)
{
// no copy texture
getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
mNoCopyTextureSelected = TRUE;
}
//Verify permissions before revealing UUID.
//Replicates behaviour of "Copy UUID" on inventory. If you can't copy it there, you can't copy it here.
if(copy&&mod&&xfer)
{
getChild<LLLineEditor>("TextureKey")->setText(image_id.asString());
}
else
{
getChild<LLLineEditor>("TextureKey")->setText(LLUUID::null.asString());
}
}
else
{
getChild<LLLineEditor>("TextureKey")->setText(LLUUID::null.asString());
}
// </FS:Chaser>
}
else
{
getChild<LLLineEditor>("TextureKey")->setText(LLUUID::null.asString());
}
// </FS:Chaser>
}
if (set_selection)
{
mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
if (set_selection)
{
mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
}
}
}
}
@ -394,6 +419,10 @@ BOOL LLFloaterTexturePicker::postBuild()
mInventoryPanel = getChild<LLInventoryPanel>("inventory panel");
mModeSelector = getChild<LLRadioGroup>("mode_selection");
mModeSelector->setCommitCallback(onModeSelect, this);
mModeSelector->setSelectedIndex(0, 0);
if(mInventoryPanel)
{
U32 filter_types = 0x0;
@ -419,16 +448,15 @@ BOOL LLFloaterTexturePicker::postBuild()
// don't put keyboard focus on selected item, because the selection callback
// will assume that this was user input
if(!mImageAssetID.isNull())
if (!mImageAssetID.isNull())
{
mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
}
}
mModeSelector = getChild<LLRadioGroup>("mode_selection");
mModeSelector->setCommitCallback(onModeSelect, this);
mModeSelector->setSelectedIndex(0, 0);
childSetAction("l_add_btn", LLFloaterTexturePicker::onBtnAdd, this);
childSetAction("l_rem_btn", LLFloaterTexturePicker::onBtnRemove, this);
childSetAction("l_upl_btn", LLFloaterTexturePicker::onBtnUpload, this);
@ -460,6 +488,10 @@ BOOL LLFloaterTexturePicker::postBuild()
LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1));
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this);
getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setCommitCallback(onHideBaseMeshRegionCheck, this);
setBakeTextureEnabled(FALSE);
return TRUE;
}
@ -560,7 +592,24 @@ void LLFloaterTexturePicker::draw()
mTexturep = NULL;
if(mImageAssetID.notNull())
{
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID);
LLPointer<LLViewerFetchedTexture> texture = NULL;
if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID))
{
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
if (obj)
{
LLViewerTexture* viewerTexture = obj->getBakedTextureForMagicId(mImageAssetID);
texture = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
}
}
if (texture.isNull())
{
texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID);
}
mTexturep = texture;
mTexturep->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
}
@ -804,6 +853,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata)
local_id = LLLocalBitmapMgr::getWorldID(temp_id);
}
}
if (self->mOnFloaterCommitCallback)
{
self->mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_SELECT, local_id);
@ -899,23 +949,82 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque<LLFolderViewItem
void LLFloaterTexturePicker::onModeSelect(LLUICtrl* ctrl, void *userdata)
{
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata;
bool mode = (self->mModeSelector->getSelectedIndex() == 0);
int mode = self->mModeSelector->getSelectedIndex();
self->getChild<LLButton>("Default")->setVisible(mode);
self->getChild<LLButton>("Blank")->setVisible(mode);
self->getChild<LLButton>("Transparent")->setVisible(mode); // <FS:PP> FIRE-5082: "Transparent" button in Texture Panel
self->getChild<LLButton>("None")->setVisible(mode);
self->getChild<LLButton>("Pipette")->setVisible(mode);
self->getChild<LLFilterEditor>("inventory search editor")->setVisible(mode);
self->getChild<LLInventoryPanel>("inventory panel")->setVisible(mode);
self->getChild<LLButton>("Default")->setVisible(mode == 0);
self->getChild<LLButton>("Blank")->setVisible(mode == 0);
self->getChild<LLButton>("Transparent")->setVisible(mode == 0); // <FS:PP> FIRE-5082: "Transparent" button in Texture Panel
self->getChild<LLButton>("None")->setVisible(mode == 0);
self->getChild<LLButton>("Pipette")->setVisible(mode == 0);
self->getChild<LLFilterEditor>("inventory search editor")->setVisible(mode == 0);
self->getChild<LLInventoryPanel>("inventory panel")->setVisible(mode == 0);
/*self->getChild<LLCheckBox>("show_folders_check")->setVisible(mode);
no idea under which conditions the above is even shown, needs testing. */
self->getChild<LLButton>("l_add_btn")->setVisible(!mode);
self->getChild<LLButton>("l_rem_btn")->setVisible(!mode);
self->getChild<LLButton>("l_upl_btn")->setVisible(!mode);
self->getChild<LLScrollListCtrl>("l_name_list")->setVisible(!mode);
self->getChild<LLButton>("l_add_btn")->setVisible(mode == 1);
self->getChild<LLButton>("l_rem_btn")->setVisible(mode == 1);
self->getChild<LLButton>("l_upl_btn")->setVisible(mode == 1);
self->getChild<LLScrollListCtrl>("l_name_list")->setVisible(mode == 1);
self->getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(mode == 2);
self->getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(false);// mode == 2);
if (mode == 2)
{
self->stopUsingPipette();
S8 val = -1;
LLUUID imageID = self->mImageAssetID;
if (imageID == IMG_USE_BAKED_HEAD)
{
val = 0;
}
else if (imageID == IMG_USE_BAKED_UPPER)
{
val = 1;
}
else if (imageID == IMG_USE_BAKED_LOWER)
{
val = 2;
}
else if (imageID == IMG_USE_BAKED_EYES)
{
val = 3;
}
else if (imageID == IMG_USE_BAKED_SKIRT)
{
val = 4;
}
else if (imageID == IMG_USE_BAKED_HAIR)
{
val = 5;
}
else if (imageID == IMG_USE_BAKED_LEFTARM)
{
val = 6;
}
else if (imageID == IMG_USE_BAKED_LEFTLEG)
{
val = 7;
}
else if (imageID == IMG_USE_BAKED_AUX1)
{
val = 8;
}
else if (imageID == IMG_USE_BAKED_AUX2)
{
val = 9;
}
else if (imageID == IMG_USE_BAKED_AUX3)
{
val = 10;
}
self->getChild<LLComboBox>("l_bake_use_texture_combo_box")->setSelectedByValue(val, TRUE);
}
}
// static
@ -1051,6 +1160,86 @@ void LLFloaterTexturePicker::onApplyImmediateCheck(LLUICtrl* ctrl, void *user_da
picker->commitIfImmediateSet();
}
//static
void LLFloaterTexturePicker::onBakeTextureSelect(LLUICtrl* ctrl, void *user_data)
{
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)user_data;
LLComboBox* combo_box = (LLComboBox*)ctrl;
S8 type = combo_box->getValue().asInteger();
LLUUID imageID = self->mDefaultImageAssetID;
if (type == 0)
{
imageID = IMG_USE_BAKED_HEAD;
}
else if (type == 1)
{
imageID = IMG_USE_BAKED_UPPER;
}
else if (type == 2)
{
imageID = IMG_USE_BAKED_LOWER;
}
else if (type == 3)
{
imageID = IMG_USE_BAKED_EYES;
}
else if (type == 4)
{
imageID = IMG_USE_BAKED_SKIRT;
}
else if (type == 5)
{
imageID = IMG_USE_BAKED_HAIR;
}
else if (type == 6)
{
imageID = IMG_USE_BAKED_LEFTARM;
}
else if (type == 7)
{
imageID = IMG_USE_BAKED_LEFTLEG;
}
else if (type == 8)
{
imageID = IMG_USE_BAKED_AUX1;
}
else if (type == 9)
{
imageID = IMG_USE_BAKED_AUX2;
}
else if (type == 10)
{
imageID = IMG_USE_BAKED_AUX3;
}
self->setImageID(imageID);
self->mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
if (!self->mPreviewSettingChanged)
{
self->mCanPreview = gSavedSettings.getBOOL("TextureLivePreview");
}
else
{
self->mPreviewSettingChanged = false;
}
if (self->mCanPreview)
{
// only commit intentional selections, not implicit ones
self->commitIfImmediateSet();
}
}
//static
void LLFloaterTexturePicker::onHideBaseMeshRegionCheck(LLUICtrl* ctrl, void *user_data)
{
//LLFloaterTexturePicker* picker = (LLFloaterTexturePicker*)user_data;
//LLCheckBoxCtrl* check_box = (LLCheckBoxCtrl*)ctrl;
}
void LLFloaterTexturePicker::updateFilterPermMask()
{
//mInventoryPanel->setFilterPermMask( getFilterPermMask() ); Commented out due to no-copy texture loss.
@ -1106,6 +1295,28 @@ void LLFloaterTexturePicker::setLocalTextureEnabled(BOOL enabled)
mModeSelector->setIndexEnabled(1,enabled);
}
void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled)
{
BOOL changed = (enabled != mBakeTextureEnabled);
mBakeTextureEnabled = enabled;
mModeSelector->setIndexEnabled(2, enabled);
if (!mBakeTextureEnabled && (mModeSelector->getSelectedIndex() == 2))
{
mModeSelector->setSelectedIndex(0, 0);
}
if (changed && mBakeTextureEnabled && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID))
{
if (mModeSelector->getSelectedIndex() != 2)
{
mModeSelector->setSelectedIndex(2, 0);
}
}
onModeSelect(0, this);
}
void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
{
LLUUID inventory_item_id = findItemID(te.getID(), TRUE);
@ -1159,6 +1370,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
mDefaultImageAssetID(p.default_image_id),
mDefaultImageName(p.default_image_name),
mFallbackImage(p.fallback_image),
mBakeTextureEnabled(FALSE),
// <FS:Ansariel> Mask texture if desired
mIsMasked(FALSE),
// </FS:Ansariel> Mask texture if desired
@ -1364,6 +1576,10 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
{
texture_floaterp->setSetImageAssetIDCallback(boost::bind(&LLTextureCtrl::setImageAssetID, this, _1));
}
if (texture_floaterp)
{
texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
}
LLFloater* root_floater = gFloaterView->getParentFloater(this);
if (root_floater)
@ -1558,6 +1774,16 @@ void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id )
}
}
void LLTextureCtrl::setBakeTextureEnabled(BOOL enabled)
{
mBakeTextureEnabled = enabled;
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if (floaterp)
{
floaterp->setBakeTextureEnabled(enabled);
}
}
BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
@ -1615,7 +1841,23 @@ void LLTextureCtrl::draw()
}
else if (!mImageAssetID.isNull())
{
LLPointer<LLViewerFetchedTexture> texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES,LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
LLPointer<LLViewerFetchedTexture> texture = NULL;
if (LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(mImageAssetID))
{
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
if (obj)
{
LLViewerTexture* viewerTexture = obj->getBakedTextureForMagicId(mImageAssetID);
texture = viewerTexture ? dynamic_cast<LLViewerFetchedTexture*>(viewerTexture) : NULL;
}
}
if (texture.isNull())
{
texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
texture->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
texture->forceToSaveRawImage(0) ;

View File

@ -201,6 +201,8 @@ public:
LLViewerFetchedTexture* getTexture() { return mTexturep; }
void setBakeTextureEnabled(BOOL enabled);
// <FS:Ansariel> Mask texture if desired
void setIsMasked(BOOL masked) { mIsMasked = masked; }
@ -240,6 +242,7 @@ private:
BOOL mShowLoadingPlaceholder;
std::string mLoadingPlaceholderString;
S32 mLabelWidth;
BOOL mBakeTextureEnabled;
// <FS:Ansariel> Texture preview mode
BOOL mPreviewMode;
@ -342,7 +345,11 @@ public:
static void onLocalScrollCommit(LLUICtrl* ctrl, void* userdata);
void onLocalBitmapsAddedCallback(); // <FS:Ansariel> Threaded filepickers
static void onBakeTextureSelect(LLUICtrl* ctrl, void *userdata);
static void onHideBaseMeshRegionCheck(LLUICtrl* ctrl, void *userdata);
void setLocalTextureEnabled(BOOL enabled);
void setBakeTextureEnabled(BOOL enabled);
protected:
LLPointer<LLViewerTexture> mTexturep;
@ -385,12 +392,15 @@ private:
bool mCanPreview;
bool mPreviewSettingChanged;
texture_selected_callback mTextureSelectedCallback;
floater_close_callback mOnFloaterCloseCallback;
floater_commit_callback mOnFloaterCommitCallback;
set_image_asset_id_callback mSetImageAssetIDCallback;
set_on_update_image_stats_callback mOnUpdateImageStatsCallback;
BOOL mBakeTextureEnabled;
boost::signals2::connection mLocalBitmapsAddedCallbackConnection; // <FS:Ansariel> Threaded filepickers
};

View File

@ -2628,7 +2628,10 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
{
mFetchDebugger = new LLTextureFetchDebugger(this, cache, imagedecodethread) ;
mFetchSource = (e_tex_source)gSavedSettings.getS32("TextureFetchSource");
if(mFetchSource < 0 && mFetchSource >= INVALID_SOURCE)
// <FS:ND> && makes no sense at all (always false)
// if(mFetchSource < 0 && mFetchSource >= INVALID_SOURCE)
if(mFetchSource < 0 || mFetchSource >= INVALID_SOURCE)
// </FS:ND>
{
mFetchSource = LLTextureFetch::FROM_ALL;
gSavedSettings.setS32("TextureFetchSource", 0);

View File

@ -58,30 +58,6 @@ namespace LLViewerDisplayName
void doNothing() { }
}
void LLViewerDisplayName::setDisplayNameCoro(const std::string& cap_url, const LLSD& body)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("SetDisplayNameCoro", httpPolicy));
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
// People API can return localized error messages. Indicate our
// language preference via header.
httpHeaders->append(HTTP_OUT_HEADER_ACCEPT_LANGUAGE, LLUI::getLanguage());
LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, body, httpHeaders);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
if (!status)
{
LL_WARNS() << status.toString() << LL_ENDL;
LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD());
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();
}
}
void LLViewerDisplayName::set(const std::string& display_name, const set_name_slot_t& slot)
{
// TODO: simple validation here
@ -110,7 +86,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
LLSD change_array = LLSD::emptyArray();
change_array.append(av_name.getDisplayName());
change_array.append(display_name);
LL_INFOS() << "Set name POST to " << cap_url << LL_ENDL;
// Record our caller for when the server sends back a reply
@ -121,8 +97,33 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
// communicates with the back-end.
LLSD body;
body["display_name"] = change_array;
LLCoros::instance().launch("LLViewerDisplayName::SetDisplayNameCoro",
boost::bind(&LLViewerDisplayName::setDisplayNameCoro, cap_url, body));
}
LLCoros::instance().launch("SetDisplayNameCoro", boost::bind(&LLViewerDisplayName::setDisplayNameCoro, cap_url, body));
void LLViewerDisplayName::setDisplayNameCoro(const std::string& cap_url, const LLSD& body)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("SetDisplayNameCoro", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
// People API can return localized error messages. Indicate our
// language preference via header.
httpHeaders->append(HTTP_OUT_HEADER_ACCEPT_LANGUAGE, LLUI::getLanguage());
LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, body, httpHeaders);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
if (!status)
{
LL_WARNS() << "Unable to set display name. Status: " << status.toString() << LL_ENDL;
LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD());
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();
}
}
class LLSetDisplayNameReply : public LLHTTPNode

View File

@ -45,9 +45,9 @@ namespace LLViewerDisplayName
// Sends an update to the server to change a display name
// and call back when done. May not succeed due to service
// unavailable or name not available.
void set(const std::string& display_name, const set_name_slot_t& slot);
void setDisplayNameCoro(const std::string& cap_url, const LLSD& body);
void set(const std::string& display_name, const set_name_slot_t& slot);
void setDisplayNameCoro(const std::string& cap_url, const LLSD& body);
void addNameChangedCallback(const name_changed_signal_t::slot_type& cb);
}

View File

@ -459,7 +459,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("area_search", "floater_fs_area_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSAreaSearch>);
LLFloaterReg::add("export_collada", "floater_export_collada.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<ColladaExportFloater>);
LLFloaterReg::add("delete_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDeleteQueue>);
LLFloaterReg::add("floater_profile", "floater_profile_view.xml",&LLFloaterReg::build<FSFloaterProfile>);
LLFloaterReg::add("fs_floater_profile", "floater_fs_profile_view.xml", &LLFloaterReg::build<FSFloaterProfile>);
LLFloaterReg::add("fs_asset_blacklist", "floater_fs_asset_blacklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterAssetBlacklist>);
LLFloaterReg::add("fs_avatar_render_settings", "floater_fs_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterAvatarRenderSettings>);
LLFloaterReg::add("fs_blocklist", "floater_fs_blocklist.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterBlocklist>);

View File

@ -141,6 +141,7 @@ LLLocalizedInventoryItemsDictionary::LLLocalizedInventoryItemsDictionary()
mInventoryItemsDict["New Skirt"] = LLTrans::getString("New Skirt");
mInventoryItemsDict["New Alpha"] = LLTrans::getString("New Alpha");
mInventoryItemsDict["New Tattoo"] = LLTrans::getString("New Tattoo");
mInventoryItemsDict["New Universal"] = LLTrans::getString("New Universal");
mInventoryItemsDict["New Physics"] = LLTrans::getString("New Physics");
mInventoryItemsDict["Invalid Wearable"] = LLTrans::getString("Invalid Wearable");

View File

@ -147,6 +147,7 @@
#include "fslightshare.h" // <FS:CR> FIRE-5118 - Lightshare support
#include "fslslbridge.h"
#include "fsmoneytracker.h"
#include "llattachmentsmgr.h"
#include "llfloaterbump.h"
#include "llfloaterreg.h"
#include "llfriendcard.h"
@ -185,6 +186,34 @@ const U8 AU_FLAGS_NONE = 0x00;
const U8 AU_FLAGS_HIDETITLE = 0x01;
const U8 AU_FLAGS_CLIENT_AUTOPILOT = 0x02;
// <FS:Ansariel> Trigger refresh attachments if attachments get detached after TP finished
class FSHelloToKokuaRefreshAttachmentsTimer : public LLEventTimer
{
public:
FSHelloToKokuaRefreshAttachmentsTimer() : LLEventTimer(5.f)
{
mEventTimer.stop();
}
BOOL tick()
{
if (gSavedSettings.getBOOL("FSExperimentalLostAttachmentsFixReport"))
{
report_to_nearby_chat("Refreshing attachments...");
}
mEventTimer.stop();
LLAttachmentsMgr::instance().refreshAttachments();
return FALSE;
}
void triggerRefresh()
{
mEventTimer.start();
}
};
FSHelloToKokuaRefreshAttachmentsTimer gFSRefreshAttachmentsTimer;
// </FS:Ansariel>
void accept_friendship_coro(std::string url, LLSD notification)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
@ -4562,24 +4591,29 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
objectp->permYouOwner())
{
// Simply ignore the request and don't kill the object - this should work...
std::string reason;
if (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
{
reason = "tp";
}
else if (gAgentAvatarp->isCrossingRegion())
{
reason = "crossing";
}
else
{
reason = "timer";
gFSRefreshAttachmentsTimer.triggerRefresh();
}
std::string message = "Region \"" + regionp->getName() + "\" tried to kill attachment: " + objectp->getAttachmentItemName() + " (" + reason + ") - Agent region: \"" + gAgent.getRegion()->getName() + "\"";
LL_WARNS("Messaging") << message << LL_ENDL;
if (gSavedSettings.getBOOL("FSExperimentalLostAttachmentsFixReport"))
{
std::string reason;
if (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
{
reason = "tp";
}
else if (gAgentAvatarp->isCrossingRegion())
{
reason = "crossing";
}
else
{
reason = "timer";
}
report_to_nearby_chat("Region \"" + regionp->getName() + "\" tried to kill attachment: " + objectp->getAttachmentItemName() + " (" + reason + ") - Agent region: \"" + gAgent.getRegion()->getName() + "\"");
report_to_nearby_chat(message);
}
continue;
}
// </FS:Ansariel>

View File

@ -2711,32 +2711,6 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim
LLVector3d old_pos_global = mRegionp->getPosGlobalFromRegion(getPositionRegion());
new_pos_global = mRegionp->getPosGlobalFromRegion(new_pos); // Re-fetch in case it got clipped above
// <FS> FIRE-21915: Fix bogus avatar movement on region crossing
// Clip new_pos to current region. Moves across region boundaries should not be extrapolated.
// Extrapolation across region boundaries is almost always wrong, and if the region being
// entered is slow to respond, very wrong.
// Probably don't need edge of world check below any more since we are clipping the predictor to the region.
static LLCachedControl<S32> fsExperimentalRegionCrossingMovementFix(gSavedSettings, "FSExperimentalRegionCrossingMovementFix");
if (fsExperimentalRegionCrossingMovementFix == 1)
{
bool clipped; // true if clipped at boundary
LLVector3d clip_pos_global_region = LLWorld::getInstance()->clipToRegion(mRegionp, old_pos_global, new_pos_global, clipped);
if (clipped)
{
// Was clipped, so we crossed a region boundary
//LL_INFOS() << "Beyond region edge, clipped predicted position to " << mRegionp->getPosRegionFromGlobal(clip_pos_global_region)
// << " from [" << getPositionRegion() << " .. " << new_pos << "]" << LL_ENDL;
new_pos = mRegionp->getPosRegionFromGlobal(clip_pos_global_region);
// Don't zero out velocity on the server. Telling the server affects scripts and audio.
//new_v.clear();
//setAcceleration(LLVector3::zero); // stop linear acceleration
LLVector3 new_angv;
new_angv.clear();
setAngularVelocity(new_angv); // stop rotation
}
}
// </FS>
// Clip the positions to known regions
LLVector3d clip_pos_global = LLWorld::getInstance()->clipToVisibleRegions(old_pos_global, new_pos_global);
if (clip_pos_global != new_pos_global)
@ -2754,6 +2728,11 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim
}
else
{
// <FS:Ansariel> FIRE-24184: Replace previous region crossing movement fix with LL's version and add option to turn it off
static LLCachedControl<S32> fsExperimentalRegionCrossingMovementFix(gSavedSettings, "FSExperimentalRegionCrossingMovementFix");
if (fsExperimentalRegionCrossingMovementFix == 1)
{
// </FS:Ansariel>
// Check for how long we are crossing.
// Note: theoretically we can find time from velocity, acceleration and
// distance from border to new position, but it is not going to work
@ -2775,6 +2754,9 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim
setAcceleration(LLVector3::zero);
mRegionCrossExpire = 0;
}
// <FS:Ansariel> FIRE-24184: Replace previous region crossing movement fix with LL's version and add option to turn it off
}
// </FS:Ansariel>
}
}
else
@ -4852,30 +4834,111 @@ void LLViewerObject::sendTEUpdate() const
msg->sendReliable( regionp->getHost() );
}
LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id)
{
if (!LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(id))
{
return NULL;
}
LLViewerObject *root = getRootEdit();
if (root && root->isAnimatedObject())
{
return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
LLVOAvatar* avatar = getAvatar();
if (avatar)
{
LLAvatarAppearanceDefines::EBakedTextureIndex texIndex = LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::assetIdToBakedTextureIndex(id);
LLViewerTexture* bakedTexture = avatar->getBakedTexture(texIndex);
if (bakedTexture == NULL || bakedTexture->isMissingAsset())
{
return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
else
{
return bakedTexture;
}
}
else
{
return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
}
}
void LLViewerObject::updateAvatarMeshVisibility(const LLUUID& id, const LLUUID& old_id)
{
if (id == old_id)
{
return;
}
if (!LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(old_id) && !LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(id))
{
return;
}
LLVOAvatar* avatar = getAvatar();
if (avatar)
{
avatar->updateMeshVisibility();
}
}
void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry)
{
LLUUID old_image_id;
if (getTE(te))
{
old_image_id = getTE(te)->getID();
}
LLPrimitive::setTE(te, texture_entry);
const LLUUID& image_id = getTEref(te).getID();
mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
LLViewerTexture* bakedTexture = getBakedTextureForMagicId(image_id);
mTEImages[te] = bakedTexture ? bakedTexture : LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
updateAvatarMeshVisibility(image_id,old_image_id);
if (getTEref(te).getMaterialParams().notNull())
{
const LLUUID& norm_id = getTEref(te).getMaterialParams()->getNormalID();
mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE);
const LLUUID& spec_id = getTEref(te).getMaterialParams()->getSpecularID();
mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_ALM, LLViewerTexture::LOD_TEXTURE);
}
}
void LLViewerObject::refreshBakeTexture()
{
for (int face_index = 0; face_index < getNumTEs(); face_index++)
{
LLTextureEntry* tex_entry = getTE(face_index);
if (tex_entry && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(tex_entry->getID()))
{
const LLUUID& image_id = tex_entry->getID();
LLViewerTexture* bakedTexture = getBakedTextureForMagicId(image_id);
changeTEImage(face_index, bakedTexture);
}
}
}
void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
{
if (mTEImages[te] != imagep)
{
mTEImages[te] = imagep;
LLUUID old_image_id = getTE(te) ? getTE(te)->getID() : LLUUID::null;
LLPrimitive::setTETexture(te, imagep->getID());
LLViewerTexture* baked_texture = getBakedTextureForMagicId(imagep->getID());
mTEImages[te] = baked_texture ? baked_texture : imagep;
updateAvatarMeshVisibility(imagep->getID(), old_image_id);
setChanged(TEXTURE);
if (mDrawable.notNull())
{
@ -4886,13 +4949,16 @@ void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image)
{
LLUUID old_image_id = getTEref(te).getID();
const LLUUID& uuid = image->getID();
S32 retval = 0;
if (uuid != getTEref(te).getID() ||
uuid == LLUUID::null)
{
retval = LLPrimitive::setTETexture(te, uuid);
mTEImages[te] = image;
LLViewerTexture* baked_texture = getBakedTextureForMagicId(uuid);
mTEImages[te] = baked_texture ? baked_texture : image;
updateAvatarMeshVisibility(uuid,old_image_id);
setChanged(TEXTURE);
if (mDrawable.notNull())
{
@ -4983,7 +5049,7 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid)
// Invalid host == get from the agent's sim
LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(
uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost());
return setTETextureCore(te,image);
return setTETextureCore(te, image);
}
S32 LLViewerObject::setTENormalMap(const U8 te, const LLUUID& uuid)

View File

@ -601,6 +601,10 @@ public:
friend class LLViewerObjectList;
friend class LLViewerMediaList;
public:
LLViewerTexture* getBakedTextureForMagicId(const LLUUID& id);
void updateAvatarMeshVisibility(const LLUUID& id, const LLUUID& old_id);
void refreshBakeTexture();
public:
static void unpackVector3(LLDataPackerBinaryBuffer* dp, LLVector3& value, std::string name);
static void unpackUUID(LLDataPackerBinaryBuffer* dp, LLUUID& value, std::string name);

View File

@ -3446,6 +3446,12 @@ bool LLViewerRegion::meshUploadEnabled() const
mSimulatorFeatures["MeshUploadEnabled"].asBoolean());
}
bool LLViewerRegion::bakesOnMeshEnabled() const
{
return (mSimulatorFeatures.has("BakesOnMeshEnabled") &&
mSimulatorFeatures["BakesOnMeshEnabled"].asBoolean());
}
bool LLViewerRegion::meshRezEnabled() const
{
return (mSimulatorFeatures.has("MeshRezEnabled") &&

View File

@ -323,6 +323,8 @@ public:
bool meshRezEnabled() const;
bool meshUploadEnabled() const;
bool bakesOnMeshEnabled() const;
// has region received its simulator features list? Requires an additional query after caps received.
void requestSimulatorFeatures();
void setSimulatorFeaturesReceived(bool);

View File

@ -70,6 +70,8 @@ LLViewerTexLayerSetBuffer::LLViewerTexLayerSetBuffer(LLTexLayerSet* const owner,
mNeedsUpdate(TRUE),
mNumLowresUpdates(0)
{
mGLTexturep->setNeedsAlphaAndPickMask(FALSE);
LLViewerTexLayerSetBuffer::sGLByteCount += getSize();
// <FS:Ansariel> [Legacy Bake]
mNeedsUploadTimer.start();

View File

@ -5782,7 +5782,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&
(image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
{
if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true))
if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT, true, true))
{
original_width = gPipeline.mDeferredScreen.getWidth();
original_height = gPipeline.mDeferredScreen.getHeight();

View File

@ -865,7 +865,8 @@ BOOL LLVOAvatar::isFullyBaked()
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
if (!isTextureDefined(mBakedTextureDatas[i].mTextureIndex)
&& ( (i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT) ) )
&& ((i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT))
&& (i != BAKED_LEFT_ARM) && (i != BAKED_LEFT_LEG) && (i != BAKED_AUX1) && (i != BAKED_AUX2) && (i != BAKED_AUX3))
{
return FALSE;
}
@ -2498,6 +2499,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
{
result->setIsMissingAsset(false);
}
}
return result;
}
@ -4159,6 +4161,7 @@ void LLVOAvatar::updateAppearanceMessageDebugText()
debug_line += llformat(" %s", (isSitting() ? "S" : "T"));
debug_line += llformat("%s", (isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED) ? "G" : "-"));
}
LLVector3 ankle_right_pos_agent = mFootRightp->getWorldPosition();
LLVector3 normal;
LLVector3 ankle_right_ground_agent = ankle_right_pos_agent;
@ -7779,6 +7782,22 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o
LLSelectMgr::getInstance()->updatePointAt();
}
viewer_object->refreshBakeTexture();
LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
{
LLViewerObject* objectp = *iter;
if (objectp)
{
objectp->refreshBakeTexture();
}
}
updateMeshVisibility();
return attachment;
}
@ -7999,7 +8018,6 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
{
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
@ -8011,14 +8029,29 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
if (attachment && attachment->isObjectAttached(viewer_object))
// </FS:Ansariel>
{
updateVisualComplexity();
updateVisualComplexity();
bool is_animated_object = viewer_object->isAnimatedObject();
cleanupAttachedMesh( viewer_object );
cleanupAttachedMesh(viewer_object);
attachment->removeObject(viewer_object);
if (!is_animated_object)
{
updateAttachmentOverrides();
}
viewer_object->refreshBakeTexture();
LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter1 = child_list.begin();
iter1 != child_list.end(); ++iter1)
{
LLViewerObject* objectp = *iter1;
if (objectp)
{
objectp->refreshBakeTexture();
}
}
updateMeshVisibility();
LL_DEBUGS() << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << LL_ENDL;
return TRUE;
}
@ -8734,6 +8767,121 @@ void LLVOAvatar::debugColorizeSubMeshes(U32 i, const LLColor4& color)
}
}
//-----------------------------------------------------------------------------
// updateMeshVisibility()
// Hide the mesh joints if attachments are using baked textures
//-----------------------------------------------------------------------------
void LLVOAvatar::updateMeshVisibility()
{
bool bake_flag[BAKED_NUM_INDICES];
memset(bake_flag, 0, BAKED_NUM_INDICES*sizeof(bool));
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
{
LLViewerJointAttachment* attachment = iter->second;
if (attachment)
{
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
LLViewerObject *objectp = (*attachment_iter);
if (objectp)
{
for (int face_index = 0; face_index < objectp->getNumTEs(); face_index++)
{
LLTextureEntry* tex_entry = objectp->getTE(face_index);
if (tex_entry)
{
bake_flag[BAKED_HEAD] |= (tex_entry->getID() == IMG_USE_BAKED_HEAD);
bake_flag[BAKED_EYES] |= (tex_entry->getID() == IMG_USE_BAKED_EYES);
bake_flag[BAKED_HAIR] |= (tex_entry->getID() == IMG_USE_BAKED_HAIR);
bake_flag[BAKED_LOWER] |= (tex_entry->getID() == IMG_USE_BAKED_LOWER);
bake_flag[BAKED_UPPER] |= (tex_entry->getID() == IMG_USE_BAKED_UPPER);
bake_flag[BAKED_SKIRT] |= (tex_entry->getID() == IMG_USE_BAKED_SKIRT);
bake_flag[BAKED_LEFT_ARM] |= (tex_entry->getID() == IMG_USE_BAKED_LEFTARM);
bake_flag[BAKED_LEFT_LEG] |= (tex_entry->getID() == IMG_USE_BAKED_LEFTLEG);
bake_flag[BAKED_AUX1] |= (tex_entry->getID() == IMG_USE_BAKED_AUX1);
bake_flag[BAKED_AUX2] |= (tex_entry->getID() == IMG_USE_BAKED_AUX2);
bake_flag[BAKED_AUX3] |= (tex_entry->getID() == IMG_USE_BAKED_AUX3);
}
}
}
LLViewerObject::const_child_list_t& child_list = objectp->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter1 = child_list.begin();
iter1 != child_list.end(); ++iter1)
{
LLViewerObject* objectchild = *iter1;
if (objectchild)
{
for (int face_index = 0; face_index < objectchild->getNumTEs(); face_index++)
{
LLTextureEntry* tex_entry = objectchild->getTE(face_index);
if (tex_entry)
{
bake_flag[BAKED_HEAD] |= (tex_entry->getID() == IMG_USE_BAKED_HEAD);
bake_flag[BAKED_EYES] |= (tex_entry->getID() == IMG_USE_BAKED_EYES);
bake_flag[BAKED_HAIR] |= (tex_entry->getID() == IMG_USE_BAKED_HAIR);
bake_flag[BAKED_LOWER] |= (tex_entry->getID() == IMG_USE_BAKED_LOWER);
bake_flag[BAKED_UPPER] |= (tex_entry->getID() == IMG_USE_BAKED_UPPER);
bake_flag[BAKED_SKIRT] |= (tex_entry->getID() == IMG_USE_BAKED_SKIRT);
bake_flag[BAKED_LEFT_ARM] |= (tex_entry->getID() == IMG_USE_BAKED_LEFTARM);
bake_flag[BAKED_LEFT_LEG] |= (tex_entry->getID() == IMG_USE_BAKED_LEFTLEG);
bake_flag[BAKED_AUX1] |= (tex_entry->getID() == IMG_USE_BAKED_AUX1);
bake_flag[BAKED_AUX2] |= (tex_entry->getID() == IMG_USE_BAKED_AUX2);
bake_flag[BAKED_AUX3] |= (tex_entry->getID() == IMG_USE_BAKED_AUX3);
}
}
}
}
}
}
}
//LL_INFOS() << "head " << bake_flag[BAKED_HEAD] << "eyes " << bake_flag[BAKED_EYES] << "hair " << bake_flag[BAKED_HAIR] << "lower " << bake_flag[BAKED_LOWER] << "upper " << bake_flag[BAKED_UPPER] << "skirt " << bake_flag[BAKED_SKIRT] << LL_ENDL;
for (S32 i = 0; i < mMeshLOD.size(); i++)
{
LLAvatarJoint* joint = mMeshLOD[i];
if (i == MESH_ID_HAIR)
{
joint->setVisible(!bake_flag[BAKED_HAIR], TRUE);
}
else if (i == MESH_ID_HEAD)
{
joint->setVisible(!bake_flag[BAKED_HEAD], TRUE);
}
else if (i == MESH_ID_SKIRT)
{
joint->setVisible(!bake_flag[BAKED_SKIRT], TRUE);
}
else if (i == MESH_ID_UPPER_BODY)
{
joint->setVisible(!bake_flag[BAKED_UPPER], TRUE);
}
else if (i == MESH_ID_LOWER_BODY)
{
joint->setVisible(!bake_flag[BAKED_LOWER], TRUE);
}
else if (i == MESH_ID_EYEBALL_LEFT)
{
joint->setVisible(!bake_flag[BAKED_EYES], TRUE);
}
else if (i == MESH_ID_EYEBALL_RIGHT)
{
joint->setVisible(!bake_flag[BAKED_EYES], TRUE);
}
else if (i == MESH_ID_EYELASH)
{
joint->setVisible(!bake_flag[BAKED_HEAD], TRUE);
}
}
}
//-----------------------------------------------------------------------------
// updateMeshTextures()
// Uses the current TE values to set the meshes' and layersets' textures.
@ -8951,6 +9099,39 @@ void LLVOAvatar::updateMeshTextures()
removeMissingBakedTextures(); // May call back into this function if anything is removed
call_remove_missing = true;
}
//refresh bakes on any attached objects
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
{
LLViewerJointAttachment* attachment = iter->second;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
LLViewerObject* attached_object = (*attachment_iter);
if (attached_object && !attached_object->isDead())
{
attached_object->refreshBakeTexture();
LLViewerObject::const_child_list_t& child_list = attached_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); ++iter)
{
LLViewerObject* objectp = *iter;
if (objectp && !objectp->isDead())
{
objectp->refreshBakeTexture();
}
}
}
}
}
}
// virtual
@ -9651,7 +9832,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
{
if (!isTextureDefined(mBakedTextureDatas[baked_index].mTextureIndex)
&& mBakedTextureDatas[baked_index].mLastTextureID != IMG_DEFAULT
&& baked_index != BAKED_SKIRT)
&& baked_index != BAKED_SKIRT && baked_index != BAKED_LEFT_ARM && baked_index != BAKED_LEFT_LEG && baked_index != BAKED_AUX1 && baked_index != BAKED_AUX2 && baked_index != BAKED_AUX3)
{
// <FS:Ansariel> [Legacy Bake]
//LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << LL_ENDL;
@ -9794,6 +9975,39 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte
}
updateMeshTextures();
updateMeshVisibility();
}
LLViewerTexture* LLVOAvatar::getBakedTexture(const U8 te)
{
if (te < 0 || te >= BAKED_NUM_INDICES)
{
return NULL;
}
BOOL is_layer_baked = isTextureDefined(mBakedTextureDatas[te].mTextureIndex);
LLViewerTexLayerSet* layerset = NULL;
layerset = getTexLayerSet(te);
if (!isEditingAppearance() && is_layer_baked)
{
LLViewerFetchedTexture* baked_img = LLViewerTextureManager::staticCastToFetchedTexture(getImage(mBakedTextureDatas[te].mTextureIndex, 0), TRUE);
return baked_img;
}
else if (layerset && isEditingAppearance())
{
layerset->createComposite();
layerset->setUpdatesEnabled(TRUE);
return layerset->getViewerComposite();
}
return NULL;
}
// static
@ -10032,6 +10246,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
}
}
}
dirtyMesh();
}

View File

@ -645,6 +645,7 @@ public:
public:
/*virtual*/ LLTexLayerSet* createTexLayerSet(); // Return LLViewerTexLayerSet
void releaseComponentTextures(); // ! BACKWARDS COMPATIBILITY !
protected:
static void onBakedTextureMasksLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
static void onInitialBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
@ -733,6 +734,9 @@ public:
void updateSexDependentLayerSets(BOOL upload_bake);
virtual void dirtyMesh(); // Dirty the avatar mesh
void updateMeshData();
void updateMeshVisibility();
LLViewerTexture* getBakedTexture(const U8 te);
protected:
void releaseMeshData();
virtual void restoreMeshData();

View File

@ -85,6 +85,7 @@
#include "llviewerinventory.h"
#include "llcallstack.h"
#include "llsculptidsize.h"
#include "llavatarappearancedefines.h"
// [RLVa:KB] - Checked: RLVa-2.0.0
#include "rlvactions.h"
#include "rlvlocks.h"
@ -2637,7 +2638,13 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa
case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE:
case LLMaterial::DIFFUSE_ALPHA_MODE_MASK:
{ //all of them modes available only for 32 bit textures
if(GL_RGBA != img_diffuse->getPrimaryFormat())
LLTextureEntry* tex_entry = getTE(te);
bool bIsBakedImageId = false;
if (tex_entry && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(tex_entry->getID()))
{
bIsBakedImageId = true;
}
if (GL_RGBA != img_diffuse->getPrimaryFormat() && !bIsBakedImageId)
{
bSetDiffuseNone = true;
}
@ -5838,6 +5845,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
U32 mask = mat->getShaderMask(alpha_mode);
pool->addRiggedFace(facep, mask);
}
if(vobj->isAnimatedObject() && vobj->isRiggedMesh())
{
pool->updateRiggedVertexBuffers(vobj->getAvatar());
}
}
else if (mat)
{

View File

@ -530,6 +530,7 @@ clothing_to_string_map_t init_clothing_string_map()
w_map.insert(std::make_pair(LLWearableType::WT_SKIRT, "skirt_not_worn"));
w_map.insert(std::make_pair(LLWearableType::WT_ALPHA, "alpha_not_worn"));
w_map.insert(std::make_pair(LLWearableType::WT_TATTOO, "tattoo_not_worn"));
w_map.insert(std::make_pair(LLWearableType::WT_UNIVERSAL, "universal_not_worn"));
w_map.insert(std::make_pair(LLWearableType::WT_PHYSICS, "physics_not_worn"));
return w_map;
}

View File

@ -353,14 +353,19 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
setStarBrightness((1 - weight) * (F32) src.getStarBrightness()
+ weight * (F32) dest.getStarBrightness());
llassert(src.getSunAngle() >= - F_PI &&
src.getSunAngle() <= 3 * F_PI);
llassert(dest.getSunAngle() >= - F_PI &&
dest.getSunAngle() <= 3 * F_PI);
llassert(src.getEastAngle() >= 0 &&
src.getEastAngle() <= 4 * F_PI);
llassert(dest.getEastAngle() >= 0 &&
dest.getEastAngle() <= 4 * F_PI);
// FIXME: we have established that this assert fails
// frequently. Someone who understands the code needs to figure
// out if it matters. In the meantime, disabling the checks so we
// can stop interfering with other development.
//llassert(src.getSunAngle() >= - F_PI &&
// src.getSunAngle() <= 3 * F_PI);
//llassert(dest.getSunAngle() >= - F_PI &&
// dest.getSunAngle() <= 3 * F_PI);
//llassert(src.getEastAngle() >= 0 &&
// src.getEastAngle() <= 4 * F_PI);
//llassert(dest.getEastAngle() >= 0 &&
// dest.getEastAngle() <= 4 * F_PI);
// sun angle and east angle require some handling to make sure
// they go in circles. Yes quaternions would work better.

View File

@ -774,28 +774,10 @@ LLVector3d LLWorld::clipToVisibleRegions(const LLVector3d &start_pos, const LLVe
}
LLViewerRegion* regionp = getRegionFromPosGlobal(start_pos);
// <FS> FIRE-21915: Fix bogus avatar movement on region crossing
//if (!regionp)
//{
// return start_pos;
//}
bool clipped = false; // sink, unused
return clipToRegion(regionp, start_pos, end_pos, clipped); // use common fn for clipping to region
}
// Clip to region, using a point along the line start_pos .. end_pos.
// If start_pos is outside the region, use start_pos.
LLVector3d LLWorld::clipToRegion(const LLViewerRegion* regionp, const LLVector3d &start_pos, const LLVector3d &end_pos, bool &clipped)
{
static LLCachedControl<S32> fsExperimentalRegionCrossingMovementFix(gSavedSettings, "FSExperimentalRegionCrossingMovementFix");
clipped = false; // no clipping yet
if (!regionp) // no region. We're lost
if (!regionp)
{
clipped = true; // very bad
return start_pos;
}
// </FS>
LLVector3d delta_pos = end_pos - start_pos;
LLVector3d delta_pos_abs;
@ -803,22 +785,8 @@ LLVector3d LLWorld::clipToRegion(const LLViewerRegion* regionp, const LLVector3d
delta_pos_abs.abs();
LLVector3 region_coord = regionp->getPosRegionFromGlobal(end_pos);
// <FS> FIRE-21915: Fix bogus avatar movement on region crossing
//F64 clip_factor = 1.0;
LLVector3 region_coord_start = regionp->getPosRegionFromGlobal(start_pos);
F64 clip_factor = 0.0; // zero means no cli
// </FS>
F64 clip_factor = 1.0;
F32 region_width = regionp->getWidth();
// <FS> FIRE-21915: Fix bogus avatar movement on region crossing
if (fsExperimentalRegionCrossingMovementFix == 1 &&
(region_coord_start.mV[VX] < 0.f || region_coord_start.mV[VX] > region_width
|| region_coord_start.mV[VY] < 0.f || region_coord_start.mV[VY] > region_width))
{
clip_factor = 1.0; // start pos outside region, use start pos
}
else // clip to region along line from start pos to end po
{
// </FS>
if (region_coord.mV[VX] < 0.f)
{
if (region_coord.mV[VY] < region_coord.mV[VX])
@ -855,59 +823,15 @@ LLVector3d LLWorld::clipToRegion(const LLViewerRegion* regionp, const LLVector3d
// clip along y +
clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY];
}
// <FS> FIRE-21915: Fix bogus avatar movement on region crossing
if (!std::isfinite(clip_factor))
{
clip_factor = 0.0; // avoid NaN problems
}
else
{
clip_factor = llclamp(clip_factor, 0.0, 1.0); // avoid overflow problem
}
}
// </FS>
// <FS> FIRE-21915: Fix bogus avatar movement on region crossing
//// clamp to within region dimensions
//LLVector3d final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor);
//final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], 0.0,
// (F64)(region_width - F_ALMOST_ZERO));
//final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], 0.0,
// (F64)(region_width - F_ALMOST_ZERO));
//final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0,
// (F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO));
LLVector3d final_region_pos;
if (fsExperimentalRegionCrossingMovementFix == 1)
{
// True if clipped. Caller needs to know, because it will kill velocity if there's clipping
// Don't do this by comparing floating point numbers for equality. That has roundoff problems.
clipped = clip_factor > F_ALMOST_ZERO; // clipped in X or Y
final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor);
clipped |= final_region_pos.mdV[VX] < -F_ALMOST_ZERO || final_region_pos.mdV[VX] > (F64)(region_width - F_ALMOST_ZERO);
clipped |= final_region_pos.mdV[VY] < -F_ALMOST_ZERO || final_region_pos.mdV[VY] > (F64)(region_width - F_ALMOST_ZERO);
clipped |= final_region_pos.mdV[VZ] < -F_ALMOST_ZERO || final_region_pos.mdV[VZ] > (F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO); // if actually clipping
// Final sanity check - don't allow positions more than clamp_range out of region.
F64 clamp_range = region_width / 2.0; // half a region width
final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], -clamp_range,
(F64)(region_width + clamp_range));
final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], -clamp_range,
(F64)(region_width + clamp_range));
final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0,
(F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO));
}
else
{
// clamp to within region dimensions
final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor);
final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], 0.0,
(F64)(region_width - F_ALMOST_ZERO));
final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], 0.0,
(F64)(region_width - F_ALMOST_ZERO));
final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0,
(F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO));
}
// </FS>
// clamp to within region dimensions
LLVector3d final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor);
final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], 0.0,
(F64)(region_width - F_ALMOST_ZERO));
final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], 0.0,
(F64)(region_width - F_ALMOST_ZERO));
final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0,
(F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO));
return regionp->getPosGlobalFromRegion(LLVector3(final_region_pos));
}

View File

@ -84,7 +84,6 @@ public:
LLViewerRegion* getRegionFromID(const LLUUID& region_id);
BOOL positionRegionValidGlobal(const LLVector3d& pos); // true if position is in valid region
LLVector3d clipToVisibleRegions(const LLVector3d &start_pos, const LLVector3d &end_pos);
LLVector3d clipToRegion(const LLViewerRegion* regionp, const LLVector3d &start_pos, const LLVector3d &end_pos, bool &clipped); // clip to specified region // <FS> FIRE-21915: Fix bogus avatar movement on region crossing
void updateAgentOffset(const LLVector3d &offset);

View File

@ -1062,7 +1062,6 @@ void LLWorldMapView::drawFrustum()
F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * LLUI::getScaleFactor().mV[VX]);
F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// Since we don't rotate the map, we have to rotate the frustum.

View File

@ -22,11 +22,14 @@
#include "llviewerprecompiledheaders.h"
#include "llcontrol.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lltrans.h"
#include "llviewercontrol.h"
#include "sanitycheck.h"
#define SANITY_CHECK "SanityCheck" // name of the notification we display
void SanityCheck::init()
{
struct f : public LLControlGroup::ApplyFunctor
@ -37,7 +40,7 @@ void SanityCheck::init()
{
if (control->getSanityType() != SANITY_TYPE_NONE)
{
control->getSanitySignal()->connect(boost::bind(&SanityCheck::onSanity, _1));
control->getSanitySignal()->connect(boost::bind(&SanityCheck::onSanity, _1, false));
SanityCheck::instance().onSanity(control);
}
}
@ -48,19 +51,28 @@ void SanityCheck::init()
}
// static
void SanityCheck::onSanity(LLControlVariable* controlp)
void SanityCheck::onSanity(LLControlVariable* controlp, bool disregardLastControl /*= false*/)
{
static LLControlVariable* lastControl = NULL;
static LLControlVariable* lastControl = nullptr;
if (controlp->isSane())
{
return;
}
if (controlp == lastControl)
if (disregardLastControl)
{
// clear "ignored" status for this control, so it can actually show up
LLNotifications::instance().setIgnored(SANITY_CHECK, false);
}
else if (controlp == lastControl)
{
return;
}
lastControl = controlp;
std::string checkType = "SanityCheck" + LLControlGroup::sanityTypeEnumToString(controlp->getSanityType());
std::string checkType = SANITY_CHECK + LLControlGroup::sanityTypeEnumToString(controlp->getSanityType());
std::vector<LLSD> sanityValues = controlp->getSanityValues();
LLSD args;
@ -71,7 +83,7 @@ void SanityCheck::onSanity(LLControlVariable* controlp)
args["SANITY_MESSAGE"] = LLTrans::getString(checkType, map);
args["SANITY_COMMENT"] = controlp->getSanityComment();
args["CURRENT_VALUE"] = controlp->getValue().asString();
LLNotificationsUtil::add("SanityCheck", args, LLSD(), boost::bind(SanityCheck::onFixIt, _1, _2, controlp));
LLNotificationsUtil::add(SANITY_CHECK, args, LLSD(), boost::bind(SanityCheck::onFixIt, _1, _2, controlp));
}
void SanityCheck::onFixIt(const LLSD& notification, const LLSD& response, LLControlVariable* controlp)

View File

@ -34,7 +34,7 @@ class SanityCheck : public LLSingleton<SanityCheck>
public:
void init();
static void onSanity(LLControlVariable* controlp);
static void onSanity(LLControlVariable* controlp, bool disregardLastControl = false);
static void onFixIt(const LLSD& notification, const LLSD& response, LLControlVariable* controlp);
};

View File

@ -31,6 +31,7 @@
<texture name="Inv_Texture" file_name="legacy/inv_item_texture.tga" />
<texture name="Inv_Underpants" file_name="legacy/inv_item_underpants.tga" />
<texture name="Inv_Undershirt" file_name="legacy/inv_item_undershirt.tga" />
<texture name="Inv_Universal" file_name="legacy/inv_item_universal.tga" />
<texture name="Inv_TexturesOpen" file_name="legacy/inv_folder_texture.tga" />
<texture name="Inv_TexturesClosed" file_name="legacy/inv_folder_texture.tga" />

View File

@ -38,7 +38,8 @@
<menu_item_call name="inventory_new_undershirt" label="Neues Unterhemd"/>
<menu_item_call name="inventory_new_underpants" label="Neue Unterhose"/>
<menu_item_call name="inventory_new_tattoo" label="Neue Tätowierung"/>
<menu_item_call name="inventory_new_alpha" label="Neues Alpha"/>
<menu_item_call name="inventory_new_universal" label="Neues Universal"/>
<menu_item_call name="inventory_new_alpha" label="Neue Alpha-Maske"/>
<menu_item_call name="inventory_new_physics" label="Neue Physik"/>
</menu>
<menu name="inventory_new_body_parts" label="Neue Körperteile">

View File

@ -1,85 +1,95 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
follows="all"
height="400"
layout="topleft"
left="0"
name="edit_tattoo_panel"
top_pad="10"
width="363" >
<panel
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
follows="all"
height="400"
left="10"
layout="topleft"
name="avatar_tattoo_color_panel"
top="0"
width="343" >
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Head Tattoo"
layout="topleft"
left="20"
name="Head Tattoo"
tool_tip="Click to choose a picture"
top="10"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Upper Tattoo"
layout="topleft"
left_pad="30"
name="Upper Tattoo"
tool_tip="Click to choose a picture"
top="10"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Lower Tattoo"
layout="topleft"
left="20"
name="Lower Tattoo"
tool_tip="Click to choose a picture"
top_pad="10"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
height="115"
label="Color/Tint"
layout="topleft"
left_pad="30"
name="Color/Tint"
tool_tip="Click to open color picker"
top_delta="0"
width="115" >
<color_swatch.commit_callback
function="ColorSwatch.Commit" />
</color_swatch>
</panel>
<panel
background_visible="true"
follows="all"
height="400"
layout="topleft"
left="0"
name="edit_tattoo_panel"
top_pad="10"
width="363" >
<scroll_container
follows="all"
height="400"
layout="topleft"
left="10"
name="avatar_tattoo_scroll"
reserve_scroll_corner="false"
top_pad="0"
width="344">
<panel
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
follows="all"
height="725"
left="0"
layout="topleft"
name="avatar_tattoo_color_panel"
top="0"
width="328" >
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Head Tattoo"
layout="topleft"
left="20"
name="Head Tattoo"
tool_tip="Click to choose a picture"
top="10"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Upper Tattoo"
layout="topleft"
left_pad="30"
name="Upper Tattoo"
tool_tip="Click to choose a picture"
top="10"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Lower Tattoo"
layout="topleft"
left="20"
name="Lower Tattoo"
tool_tip="Click to choose a picture"
top_pad="10"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
height="115"
label="Color/Tint"
layout="topleft"
left_pad="30"
name="Color/Tint"
tool_tip="Click to open color picker"
top_delta="0"
width="115" >
<color_swatch.commit_callback
function="ColorSwatch.Commit" />
</color_swatch>
</panel>
</scroll_container>
</panel>

View File

@ -0,0 +1,230 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
follows="all"
height="400"
layout="topleft"
left="0"
name="edit_universal_panel"
top_pad="10"
width="363" >
<scroll_container
follows="all"
height="400"
layout="topleft"
left="10"
name="avatar_universal_scroll"
reserve_scroll_corner="false"
top_pad="0"
width="344">
<panel
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
follows="all"
height="725"
left="00"
layout="topleft"
name="avatar_universal_color_panel"
top="0"
width="328" >
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Head Tattoo"
layout="topleft"
left="20"
top_pad="10"
name="Head Universal Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Upper Tattoo"
layout="topleft"
left_pad="30"
top_delta="0"
name="Upper Universal Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Lower Tattoo"
layout="topleft"
left="20"
top_pad="10"
name="Lower Universal Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Skirt Tattoo"
layout="topleft"
left_pad="30"
top_delta="0"
name="Skirt Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Hair Tattoo"
layout="topleft"
left="20"
top_pad="10"
name="Hair Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Eyes Tattoo"
layout="topleft"
left_pad="30"
top_delta="0"
name="Eyes Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Left Arm Tattoo"
layout="topleft"
left="20"
top_pad="10"
name="Left Arm Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Left Leg Tattoo"
layout="topleft"
left_pad="30"
top_delta="0"
name="Left Leg Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Aux1 Tattoo"
layout="topleft"
left="20"
top_pad="10"
name="Aux1 Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Aux2 Tattoo"
layout="topleft"
left_pad="30"
top_delta="0"
name="Aux2 Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
height="115"
label="Aux3 Tattoo"
layout="topleft"
left="20"
top_pad="10"
name="Aux3 Tattoo"
tool_tip="Click to choose a picture"
width="115" >
<texture_picker.commit_callback
function="TexturePicker.Commit" />
</texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
height="115"
label="Color/Tint"
layout="topleft"
left_pad="30"
top_delta="0"
name="Color/Tint"
tool_tip="Click to open color picker"
width="115" >
<color_swatch.commit_callback
function="ColorSwatch.Commit" />
</color_swatch>
</panel>
</scroll_container>
</panel>

View File

@ -71,6 +71,10 @@
name="edit_tattoo_title">
Editing Tattoo
</string>
<string
name="edit_universal_title">
Editing Universal
</string>
<string
name="edit_physics_title">
Editing Physics
@ -135,6 +139,10 @@
name="tattoo_desc_text">
Tattoo:
</string>
<string
name="universal_desc_text">
Universal:
</string>
<string
name="physics_desc_text">
Physics:
@ -418,6 +426,16 @@
top="8"
visible="false"
width="410" />
<panel
filename="panel_edit_universal.xml"
follows="all"
height="425"
layout="topleft"
left="0"
name="edit_universal_panel"
top="8"
visible="false"
width="410" />
<panel
filename="panel_edit_physics.xml"
follows="all"

View File

@ -220,6 +220,13 @@
function="Inventory.DoCreate"
parameter="tattoo" />
</menu_item_call>
<menu_item_call
name="inventory_new_universal"
label="New Universal">
<menu_item_call.on_click
function="Inventory.DoCreate"
parameter="universal" />
</menu_item_call>
<menu_item_call
name="inventory_new_alpha"
label="New Alpha">

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -333,6 +333,7 @@ with the same filename but different name
<texture name="Inv_SysClosed" file_name="icons/Inv_SysClosed.png" preload="false" />
<texture name="Inv_SysOpen" file_name="icons/Inv_SysOpen.png" preload="false" />
<texture name="Inv_Tattoo" file_name="icons/Inv_Tattoo.png" preload="false" />
<texture name="Inv_Universal" file_name="icons/Inv_Universal.png" preload="false" />
<texture name="Inv_Physics" file_name="icons/Inv_Physics.png" preload="false" />
<texture name="Inv_Texture" file_name="icons/Inv_Texture.png" preload="false" />
<texture name="Inv_TrashClosed" file_name="icons/Inv_TrashClosed.png" preload="false" />

View File

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_tattoo_panel">
<panel name="avatar_tattoo_color_panel">
<texture_picker label="Hoved tatovering" name="Head Tattoo" tool_tip="Klik for at vælge et billede"/>
<texture_picker label="Øvre tatovering" name="Upper Tattoo" tool_tip="Klik for at vælge et billede"/>
<texture_picker label="Nedre tatovering" name="Lower Tattoo" tool_tip="Klik for at vælge et billede"/>
<color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<scroll_container name="avatar_tattoo_scroll">
<panel name="avatar_tattoo_color_panel">
<texture_picker label="Hoved tatovering" name="Head Tattoo" tool_tip="Klik for at vælge et billede"/>
<texture_picker label="Øvre tatovering" name="Upper Tattoo" tool_tip="Klik for at vælge et billede"/>
<texture_picker label="Nedre tatovering" name="Lower Tattoo" tool_tip="Klik for at vælge et billede"/>
<color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
</scroll_container>
</panel>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="ban_duration" title="Verbannungsdauer">
<text name="duration_textbox">
Verbannungsdauer:

View File

@ -34,6 +34,7 @@
<menu_item_call label="Neue Unterhose" name="New Underpants"/>
<menu_item_call label="Neue Alpha-Maske" name="New Alpha Mask"/>
<menu_item_call label="Neue Tätowierung" name="New Tattoo"/>
<menu_item_call label="Neues Universal" name="New Universal"/>
<menu_item_call label="Neue Physik" name="New Physics"/>
</menu>
<menu label="Neue Körperteile" name="New Body Parts">

View File

@ -23,8 +23,9 @@
<menu_item_call label="Neue Handschuhe" name="New Gloves"/>
<menu_item_call label="Neues Unterhemd" name="New Undershirt"/>
<menu_item_call label="Neue Unterhose" name="New Underpants"/>
<menu_item_call label="Neues Alpha" name="New Alpha"/>
<menu_item_call label="Neue Alpha-Maske" name="New Alpha"/>
<menu_item_call label="Neue Tätowierung" name="New Tattoo"/>
<menu_item_call label="Neues Universal" name="New Universal"/>
<menu_item_call label="Neue Physik" name="New Physics"/>
</menu>
<menu label="Neue Körperteile" name="New Body Parts">

View File

@ -17,9 +17,10 @@
<menu_item_call label="Neue Handschuhe" name="New Gloves"/>
<menu_item_call label="Neues Unterhemd" name="New Undershirt"/>
<menu_item_call label="Neue Unterhose" name="New Underpants"/>
<menu_item_call label="Neues Alpha" name="New Alpha"/>
<menu_item_call label="Neue Alpha-Maske" name="New Alpha"/>
<menu_item_call label="Neue Physik" name="New Physics"/>
<menu_item_call label="Neue Tätowierung" name="New Tattoo"/>
<menu_item_call label="Neues Universal" name="New Universal"/>
</context_menu>
<context_menu label="Neue Körperteile" name="New Body Parts">
<menu_item_call label="Neue Form" name="New Shape"/>

View File

@ -626,6 +626,7 @@
<menu_item_call label="Rock" name="Skirt"/>
<menu_item_call label="Alpha" name="Alpha"/>
<menu_item_call label="Tätowierung" name="Tattoo"/>
<menu_item_call label="Universal" name="Universal"/>
<menu_item_call label="Physik" name="Physics"/>
<menu_item_call label="Alle Kleider" name="All Clothes"/>
</menu>

View File

@ -5119,7 +5119,7 @@ Export unerwartet fehlgeschlagen. Siehe Log-Datei für weitergehende Details.
</notification>
<notification name="ExportColladaSuccess">
[OBJECT] erfolreich als [FILENAME] gespeichert.
[OBJECT] erfolgreich als [FILENAME] gespeichert.
</notification>
<notification name="ExportColladaSuccess">

Some files were not shown because too many files have changed in this diff Show More