summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llappearance/llavatarappearance.cpp15
-rw-r--r--indra/llappearance/llavatarappearancedefines.cpp186
-rw-r--r--indra/llappearance/llavatarappearancedefines.h25
-rw-r--r--indra/llappearance/lltexlayer.cpp4
-rw-r--r--indra/llappearance/llwearabletype.cpp1
-rw-r--r--indra/llappearance/llwearabletype.h3
-rw-r--r--indra/llcommon/indra_constants.cpp12
-rw-r--r--indra/llcommon/indra_constants.h12
-rw-r--r--indra/llinventory/llinventorytype.h1
-rw-r--r--indra/llprimitive/llprimitive.cpp31
-rw-r--r--indra/llprimitive/llprimitive.h2
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/character/aux_base.tgabin0 -> 10284 bytes
-rw-r--r--indra/newview/character/avatar_lad.xml1005
-rw-r--r--indra/newview/llagentwearables.cpp6
-rw-r--r--indra/newview/lldynamictexture.cpp2
-rw-r--r--indra/newview/llinventoryicon.cpp1
-rw-r--r--indra/newview/lllocalbitmaps.cpp94
-rw-r--r--indra/newview/llpaneleditwearable.cpp25
-rw-r--r--indra/newview/llpaneleditwearable.h1
-rw-r--r--indra/newview/llpanelface.cpp75
-rw-r--r--indra/newview/llpaneloutfitedit.cpp1
-rw-r--r--indra/newview/llpaneloutfitedit.h1
-rw-r--r--indra/newview/llpanelvolume.cpp45
-rw-r--r--indra/newview/llselectmgr.cpp3
-rw-r--r--indra/newview/lltexturectrl.cpp307
-rw-r--r--indra/newview/lltexturectrl.h10
-rw-r--r--indra/newview/llviewerinventory.cpp1
-rw-r--r--indra/newview/llviewerobject.cpp93
-rw-r--r--indra/newview/llviewerobject.h4
-rw-r--r--indra/newview/llviewerregion.cpp6
-rw-r--r--indra/newview/llviewerregion.h2
-rw-r--r--indra/newview/llvoavatar.cpp1173
-rw-r--r--indra/newview/llvoavatar.h4
-rw-r--r--indra/newview/llwearableitemslist.cpp1
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Universal.pngbin0 -> 416 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_ctrl.xml92
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_add.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml13
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_tattoo.xml177
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_universal.xml231
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml18
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
46 files changed, 3047 insertions, 667 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 38cda2e2f1..e60037b739 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -1482,6 +1482,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:
diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp
index b5282d4f6f..c72943bb82 100644
--- a/indra/llappearance/llavatarappearancedefines.cpp
+++ b/indra/llappearance/llavatarappearancedefines.cpp
@@ -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()
@@ -265,3 +309,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;
+}
diff --git a/indra/llappearance/llavatarappearancedefines.h b/indra/llappearance/llavatarappearancedefines.h
index d6223bb4d2..5663d24293 100644
--- a/indra/llappearance/llavatarappearancedefines.h
+++ b/indra/llappearance/llavatarappearancedefines.h
@@ -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
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index 3f2fcce429..186986bf9c 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -1581,8 +1581,8 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
// nSight doesn't support use of glReadPixels
if (!LLRender::sNsightDebugSupport)
{
- glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data);
- }
+ glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data);
+ }
}
getTexLayerSet()->getAvatarAppearance()->dirtyMesh();
diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp
index cd602b43b4..0e29bbe783 100644
--- a/indra/llappearance/llwearabletype.cpp
+++ b/indra/llappearance/llwearabletype.cpp
@@ -91,6 +91,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));
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h
index 519d5b92a2..ac81376538 100644
--- a/indra/llappearance/llwearabletype.h
+++ b/indra/llappearance/llwearabletype.h
@@ -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,
diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp
index 7ea42a3fc0..e13176e8fa 100644
--- a/indra/llcommon/indra_constants.cpp
+++ b/indra/llcommon/indra_constants.cpp
@@ -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");
+
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index c0213d7c16..0fbf4b966b 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -206,6 +206,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;
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index 891ab217fd..034cee5f45 100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -101,6 +101,7 @@ public:
ICONNAME_CLOTHING_SKIRT,
ICONNAME_CLOTHING_ALPHA,
ICONNAME_CLOTHING_TATTOO,
+ ICONNAME_CLOTHING_UNIVERSAL,
ICONNAME_ANIMATION,
ICONNAME_GESTURE,
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 27d1bee9bd..a0987b35d8 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -1040,14 +1040,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);
@@ -1056,6 +1068,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);
@@ -1115,7 +1128,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];
@@ -1200,7 +1213,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];
@@ -1313,6 +1326,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;
@@ -1385,6 +1400,8 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec)
retval |= setTEColor(i, color);
+
+
}
return retval;
@@ -1403,7 +1420,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];
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index c138c2ac2b..6fd433c337 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -319,7 +319,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];
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 42cc526d6c..798e38995c 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-6.2.4
+6.3.0
diff --git a/indra/newview/character/aux_base.tga b/indra/newview/character/aux_base.tga
new file mode 100644
index 0000000000..dbcaaaf2b1
--- /dev/null
+++ b/indra/newview/character/aux_base.tga
Binary files differ
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index df30f46002..2cdd86267e 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -8947,6 +8947,66 @@
<texture
local_texture="hair_alpha" />
</layer>
+ <layer
+ name="hair_tattoo">
+ <texture
+ local_texture="hair_tattoo" />
+ <param
+ id="1211"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_hair_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1212"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_hair_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1213"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_hair_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
+
</layer_set>
<!-- =========================================================== -->
@@ -10024,7 +10084,65 @@ render_pass="bump">
</param>
</layer>
+ <layer
+ name="head_universal_tattoo">
+ <texture
+ local_texture="head_universal_tattoo" />
+ <param
+ id="1229"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_head_universal_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1230"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_head_universal_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+ <param
+ id="1231"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_head_universal_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
</layer_set>
@@ -10201,7 +10319,65 @@ render_pass="bump">
</param>
</layer>
+ <layer
+ name="upper_universal_tattoo">
+ <texture
+ local_texture="upper_universal_tattoo" />
+ <param
+ id="1232"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_upper_universal_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1233"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_upper_universal_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1234"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_upper_universal_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
<layer
name="upper_undershirt bump"
@@ -11453,7 +11629,65 @@ render_pass="bump">
</param>
</layer>
+ <layer
+ name="lower_universal_tattoo">
+ <texture
+ local_texture="lower_universal_tattoo" />
+ <param
+ id="1235"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_lower_universal_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1236"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_lower_universal_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1237"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_lower_universal_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
<layer
name="lower_underpants bump"
render_pass="bump"
@@ -12235,6 +12469,66 @@ render_pass="bump">
<texture
local_texture="eyes_alpha" />
</layer>
+ <layer
+ name="eyes_tattoo">
+ <texture
+ local_texture="eyes_tattoo" />
+ <param
+ id="924"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_eyes_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="925"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_eyes_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="926"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_eyes_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
+
</layer_set>
@@ -12415,6 +12709,447 @@ render_pass="bump">
domain="0" />
</param>
</layer>
+ <layer
+ name="skirt_tattoo">
+ <texture
+ local_texture="skirt_tattoo" />
+ <param
+ id="1208"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_skirt_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1209"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_skirt_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1210"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_skirt_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
+
+ </layer_set>
+
+ <!-- =========================================================== -->
+ <layer_set
+ body_region="leftarm"
+ width="512"
+ height="512"
+ clear_alpha="false">
+ <layer
+ name="base"
+ write_all_channels="true"
+ fixed_color = "128,128,128,255">
+ <texture
+ tga_file="aux_base.tga" />
+ </layer>
+
+ <layer
+ name="leftarm_tattoo">
+ <texture
+ local_texture="leftarm_tattoo" />
+ <param
+ id="1214"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_leftarm_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1215"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_leftarm_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1216"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_leftarm_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
+
+ </layer_set>
+
+ <!-- =========================================================== -->
+ <layer_set
+ body_region="leftleg"
+ width="512"
+ height="512"
+ clear_alpha="false">
+ <layer
+ name="base"
+ write_all_channels="true"
+ fixed_color = "128,128,128,255">
+ <texture
+ tga_file="aux_base.tga" />
+ </layer>
+ <layer
+ name="leftleg_tattoo">
+ <texture
+ local_texture="leftleg_tattoo" />
+ <param
+ id="1217"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_leftleg_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1218"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_leftleg_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1219"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_leftleg_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
+
+ </layer_set>
+
+ <!-- =========================================================== -->
+ <layer_set
+ body_region="aux1"
+ width="512"
+ height="512"
+ clear_alpha="false">
+
+ <layer
+ name="base"
+ write_all_channels="true"
+ fixed_color = "128,128,128,255">
+ <texture
+ tga_file="aux_base.tga" />
+ </layer>
+
+ <layer
+ name="aux1_tattoo">
+ <texture
+ local_texture="aux1_tattoo" />
+ <param
+ id="1220"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux1_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1221"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux1_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1222"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux1_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
+
+ </layer_set>
+
+ <!-- =========================================================== -->
+ <layer_set
+ body_region="aux2"
+ width="512"
+ height="512"
+ clear_alpha="false">
+
+ <layer
+ name="base"
+ write_all_channels="true"
+ fixed_color = "128,128,128,255">
+ <texture
+ tga_file="aux_base.tga" />
+ </layer>
+
+ <layer
+ name="aux2_tattoo">
+ <texture
+ local_texture="aux2_tattoo" />
+ <param
+ id="1223"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux2_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1224"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux2_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1225"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux2_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
+
+ </layer_set>
+
+ <!-- =========================================================== -->
+ <layer_set
+ body_region="aux3"
+ width="512"
+ height="512"
+ clear_alpha="false">
+
+ <layer
+ name="base"
+ write_all_channels="true"
+ fixed_color = "128,128,128,255">
+ <texture
+ tga_file="aux_base.tga" />
+ </layer>
+
+ <layer
+ name="aux3_tattoo">
+ <texture
+ local_texture="aux3_tattoo" />
+ <param
+ id="1226"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux3_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="255, 0, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1227"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux3_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 255, 0, 255" />
+ </param_color>
+ </param>
+
+ <param
+ id="1228"
+ group="1"
+ edit_group="colorpicker_driven"
+ wearable="universal"
+ name="tattoo_aux3_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_color>
+ <value
+ color="0, 0, 0, 255" />
+
+ <value
+ color="0, 0, 255, 255" />
+ </param_color>
+ </param>
+
+ </layer>
</layer_set>
@@ -15934,7 +16669,277 @@ render_pass="bump">
</param_driver>
</param>
+ <param
+ id="1238"
+ group="2"
+ wearable="universal"
+ edit_group="colorpicker"
+ name="tattoo_universal_red"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_driver>
+ <driven
+ id="1229"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1232"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1235"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1208"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1211"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="924"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1214"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1217"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1220"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1223"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1226"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ </param_driver>
+ </param>
+
+ <param
+ id="1239"
+ group="2"
+ wearable="universal"
+ edit_group="colorpicker"
+ name="tattoo_universal_green"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_driver>
+ <driven
+ id="1230"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1233"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1236"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1209"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1212"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="925"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1215"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1218"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1221"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1224"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1227"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ </param_driver>
+ </param>
+
+ <param
+ id="1240"
+ group="2"
+ wearable="universal"
+ edit_group="colorpicker"
+ name="tattoo_universal_blue"
+ value_min="0"
+ value_max="1"
+ value_default="1">
+ <param_driver>
+ <driven
+ id="1231"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1234"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1237"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1210"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1213"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="926"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1216"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1219"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1222"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1225"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ <driven
+ id="1228"
+ min1="0"
+ max1="1"
+ max2="1"
+ min2="1" />
+
+ </param_driver>
+ </param>
<!-- ==PHYSICS PARAMETERS======================================= -->
+
<param
id="1100"
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 170e4063a1..15e4de8f69 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1538,6 +1538,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;
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index fa9a0712fa..8ef0dd2865 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -125,7 +125,7 @@ BOOL LLViewerDynamicTexture::render()
//-----------------------------------------------------------------------------
void LLViewerDynamicTexture::preRender(BOOL clear_depth)
{
- //only images up to 512x512 are supported
+ //only images up to 1024*1024 are supported
llassert(mFullHeight <= 512);
llassert(mFullWidth <= 512);
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index d0df1c94d5..ee6e3dd384 100644
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -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"));
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 760325b652..0243e2183e 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -381,6 +381,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);
}
@@ -512,7 +513,7 @@ void LLLocalBitmap::updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel)
{
LLVOVolume* volobjp = (*old_texture->getVolumeList(channel))[volume_iter];
switch (channel)
- {
+ {
case LLRender::LIGHT_TEX:
{
if (volobjp->getLightTextureID() == old_id)
@@ -526,19 +527,19 @@ void LLLocalBitmap::updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel)
LLViewerObject* object = (LLViewerObject*)volobjp;
if (object)
- {
- if (object->isSculpted() && object->getVolume() &&
- object->getVolume()->getParams().getSculptID() == old_id)
- {
- LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
- LLSculptParams new_params(*old_params);
- new_params.setSculptTexture(new_id, (*old_params).getSculptType());
- object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
- }
- }
+ {
+ if (object->isSculpted() && object->getVolume() &&
+ object->getVolume()->getParams().getSculptID() == old_id)
+ {
+ LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
+ LLSculptParams new_params(*old_params);
+ new_params.setSculptTexture(new_id, (*old_params).getSculptType());
+ object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
}
}
}
+ }
+ }
}
void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableType::EType type)
@@ -746,7 +747,7 @@ LLAvatarAppearanceDefines::ETextureIndex LLLocalBitmap::getTexIndex(
case LLWearableType::WT_TATTOO:
{
- switch(baked_texind)
+ switch (baked_texind)
{
case LLAvatarAppearanceDefines::BAKED_HEAD:
{
@@ -764,6 +765,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:
{
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 3a8378f8df..6573be0aaf 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -97,6 +97,7 @@ enum ESubpart {
SUBPART_SKIRT,
SUBPART_ALPHA,
SUBPART_TATTOO,
+ SUBPART_UNIVERSAL,
SUBPART_PHYSICS_BREASTS_UPDOWN,
SUBPART_PHYSICS_BREASTS_INOUT,
SUBPART_PHYSICS_BREASTS_LEFTRIGHT,
@@ -241,7 +242,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,
@@ -294,7 +296,9 @@ LLEditWearableDictionary::Subparts::Subparts()
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));
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_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_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_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));
addEntry(SUBPART_PHYSICS_BELLY_UPDOWN, new SubpartEntry(SUBPART_PHYSICS_BELLY_UPDOWN, "mTorso", "physics_belly_updown", "physics_belly_updown_param_list", "physics_belly_updown_tab", LLVector3d(0.f, 0.f, 0.3f), LLVector3d(0.f, 0.f, 0.f),SEX_BOTH));
@@ -335,6 +339,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()
@@ -362,6 +367,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,
@@ -739,6 +755,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");
@@ -1442,6 +1459,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;
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index 81acc31863..43d6a3595f 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -167,6 +167,7 @@ private:
LLPanel *mPanelSkirt;
LLPanel *mPanelAlpha;
LLPanel *mPanelTattoo;
+ LLPanel *mPanelUniversal;
LLPanel *mPanelPhysics;
typedef std::map<std::string, LLAvatarAppearanceDefines::ETextureIndex> string_texture_index_map_t;
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 392bacb8d9..76e6c51626 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -921,43 +921,77 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
updateAlphaControls();
-
- if(texture_ctrl)
+
+ if (texture_ctrl)
{
if (identical_diffuse)
{
- texture_ctrl->setTentative( FALSE );
- texture_ctrl->setEnabled( editable );
- texture_ctrl->setImageAssetID( id );
+ texture_ctrl->setTentative(FALSE);
+ texture_ctrl->setEnabled(editable);
+ texture_ctrl->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;
+ }
+ }
+
+ texture_ctrl->setBakeTextureEnabled(allAttachments);
+
}
else if (id.isNull())
{
// None selected
- texture_ctrl->setTentative( FALSE );
- texture_ctrl->setEnabled( FALSE );
- texture_ctrl->setImageAssetID( LLUUID::null );
- getChildView("combobox alphamode")->setEnabled( FALSE );
- getChildView("label alphamode")->setEnabled( FALSE );
- getChildView("maskcutoff")->setEnabled( FALSE);
- getChildView("label maskcutoff")->setEnabled( FALSE );
+ texture_ctrl->setTentative(FALSE);
+ texture_ctrl->setEnabled(FALSE);
+ texture_ctrl->setImageAssetID(LLUUID::null);
+ getChildView("combobox alphamode")->setEnabled(FALSE);
+ getChildView("label alphamode")->setEnabled(FALSE);
+ getChildView("maskcutoff")->setEnabled(FALSE);
+ getChildView("label maskcutoff")->setEnabled(FALSE);
+
+ texture_ctrl->setBakeTextureEnabled(false);
}
else
{
// Tentative: multiple selected with different textures
- texture_ctrl->setTentative( TRUE );
- texture_ctrl->setEnabled( editable );
- texture_ctrl->setImageAssetID( id );
+ texture_ctrl->setTentative(TRUE);
+ texture_ctrl->setEnabled(editable);
+ texture_ctrl->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;
}
}
+ texture_ctrl->setBakeTextureEnabled(allAttachments);
+ }
+
+ }
+
if (shinytexture_ctrl)
{
shinytexture_ctrl->setTentative( !identical_spec );
@@ -2519,6 +2553,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)
@@ -2528,7 +2572,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;
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index c5bae9c52e..1d87aa6f5d 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -467,6 +467,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");
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 2cc8b65001..3c6efac0e7 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -98,6 +98,7 @@ public:
LVIT_ALPHA,
LVIT_TATTOO,
LVIT_PHYSICS,
+ LVIT_UNIVERSAL,
NUM_LIST_VIEW_ITEM_TYPES
} EListViewItemType;
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 96dd309fa4..735eaa423d 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -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();
@@ -953,6 +976,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*)
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index b36df244f8..5aa22d0fb2 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -96,6 +96,7 @@
#include "llviewershadermgr.h"
#include "llpanelface.h"
#include "llglheaders.h"
+#include "llinventoryobserver.h"
LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
//
@@ -1656,6 +1657,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;
}
};
@@ -1855,6 +1857,7 @@ BOOL LLSelectMgr::selectionRevertTextures()
else
{
object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
+
}
}
}
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 1396a8546d..ae10972b5f 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -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"
+
static const F32 CONTEXT_CONE_IN_ALPHA = 0.0f;
static const F32 CONTEXT_CONE_OUT_ALPHA = 1.f;
static const F32 CONTEXT_FADE_TIME = 0.08f;
@@ -118,7 +121,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mOnFloaterCommitCallback(NULL),
mOnFloaterCloseCallback(NULL),
mSetImageAssetIDCallback(NULL),
- mOnUpdateImageStatsCallback(NULL)
+ mOnUpdateImageStatsCallback(NULL),
+ mBakeTextureEnabled(FALSE)
{
buildFromFile("floater_texture_ctrl.xml");
mCanApplyImmediately = can_apply_immediately;
@@ -136,26 +140,47 @@ 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();
+ if ( mBakeTextureEnabled && mModeSelector->getSelectedIndex() != 2)
+ {
+ mModeSelector->setSelectedIndex(2, 0);
+ onModeSelect(0,this);
+ }
}
else
{
- LLInventoryItem* itemp = gInventory.getItem(image_id);
- if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
+ if (mModeSelector->getSelectedIndex() == 2)
{
- // no copy texture
- getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
- mNoCopyTextureSelected = TRUE;
+ mModeSelector->setSelectedIndex(0, 0);
+ onModeSelect(0,this);
+ }
+
+ LLUUID item_id = findItemID(mImageAssetID, FALSE);
+ if (item_id.isNull())
+ {
+ mInventoryPanel->getRootFolder()->clearSelection();
+ }
+ else
+ {
+ LLInventoryItem* itemp = gInventory.getItem(image_id);
+ if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID()))
+ {
+ // no copy texture
+ getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE);
+ mNoCopyTextureSelected = TRUE;
+ }
}
- }
- if (set_selection)
- {
- mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
+ if (set_selection)
+ {
+ mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO);
+ }
}
+
+
+
}
}
@@ -341,6 +366,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;
@@ -366,16 +395,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);
@@ -404,6 +432,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;
}
@@ -478,7 +510,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);
}
@@ -697,6 +746,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata)
local_id = LLLocalBitmapMgr::getWorldID(temp_id);
}
}
+ self->mViewModel->setDirty();
if (self->mOnFloaterCommitCallback)
{
self->mOnFloaterCommitCallback(LLTextureCtrl::TEXTURE_SELECT, local_id);
@@ -760,22 +810,81 @@ 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>("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>("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
@@ -896,6 +1005,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.
@@ -951,6 +1140,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);
@@ -1000,7 +1211,8 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
mImageAssetID(p.image_id),
mDefaultImageAssetID(p.default_image_id),
mDefaultImageName(p.default_image_name),
- mFallbackImage(p.fallback_image)
+ mFallbackImage(p.fallback_image),
+ mBakeTextureEnabled(FALSE)
{
// Default of defaults is white image for diff tex
@@ -1191,6 +1403,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)
@@ -1366,6 +1582,17 @@ void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id )
}
}
+void LLTextureCtrl::setBakeTextureEnabled(BOOL enabled)
+{
+ mBakeTextureEnabled = enabled;
+ LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
+ if (floaterp)
+ {
+ floaterp->setBakeTextureEnabled(enabled);
+ floaterp->resetDirty();
+ }
+}
+
BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
@@ -1420,7 +1647,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) ;
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index 6bcf9c3a75..b2a34a37c4 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -201,6 +201,8 @@ public:
LLViewerFetchedTexture* getTexture() { return mTexturep; }
+ void setBakeTextureEnabled(BOOL enabled);
+
private:
BOOL allowDrop(LLInventoryItem* item);
BOOL doDrop(LLInventoryItem* item);
@@ -237,6 +239,7 @@ private:
BOOL mShowLoadingPlaceholder;
std::string mLoadingPlaceholderString;
S32 mLabelWidth;
+ BOOL mBakeTextureEnabled;
};
//////////////////////////////////////////////////////////////////////////////////////////
@@ -326,7 +329,11 @@ public:
static void onBtnUpload(void* userdata);
static void onLocalScrollCommit(LLUICtrl* ctrl, void* userdata);
+ 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;
@@ -368,11 +375,14 @@ 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;
};
#endif // LL_LLTEXTURECTRL_H
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 1ab7ec0156..61857d6fb1 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -138,6 +138,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");
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index ec1095813b..1353a27982 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -4707,13 +4707,76 @@ 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 = getTE(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 (getTE(te)->getMaterialParams().notNull())
{
const LLUUID& norm_id = getTE(te)->getMaterialParams()->getNormalID();
@@ -4724,12 +4787,31 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry)
}
}
+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())
{
@@ -4740,13 +4822,16 @@ void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
S32 LLViewerObject::setTETextureCore(const U8 te, LLViewerTexture *image)
{
+ LLUUID old_image_id = getTE(te)->getID();
const LLUUID& uuid = image->getID();
S32 retval = 0;
if (uuid != getTE(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())
{
@@ -4837,7 +4922,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)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 8b1535851e..873b300489 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -588,6 +588,10 @@ public:
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);
static void unpackU32(LLDataPackerBinaryBuffer* dp, U32& value, std::string name);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 4d9288f152..439f675a2d 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3235,6 +3235,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") &&
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index d5266ec873..2548ff1423 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -304,6 +304,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);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 20fa327790..5004cbec4c 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -751,8 +751,8 @@ std::string LLVOAvatar::avString() const
}
else
{
- std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
- return " Avatar '" + getFullname() + "' " + viz_string + " ";
+ std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
+ return " Avatar '" + getFullname() + "' " + viz_string + " ";
}
}
@@ -829,7 +829,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;
}
@@ -1322,7 +1323,7 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
if (dist_vec(zero_pos, mPelvisp->getWorldPosition())<0.001)
{
// Don't use pelvis until av initialized
- pos.load3(getRenderPosition().mV);
+ pos.load3(getRenderPosition().mV);
}
else
{
@@ -1336,16 +1337,16 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
//displayed, can give inaccurate boxes due to joints stuck at (0,0,0).
if ((box_detail>=1) && !isControlAvatar())
{
- for (polymesh_map_t::iterator i = mPolyMeshes.begin(); i != mPolyMeshes.end(); ++i)
- {
- LLPolyMesh* mesh = i->second;
- for (S32 joint_num = 0; joint_num < mesh->mJointRenderData.size(); joint_num++)
- {
- LLVector4a trans;
- trans.load3( mesh->mJointRenderData[joint_num]->mWorldMatrix->getTranslation().mV);
- update_min_max(newMin, newMax, trans);
- }
- }
+ for (polymesh_map_t::iterator i = mPolyMeshes.begin(); i != mPolyMeshes.end(); ++i)
+ {
+ LLPolyMesh* mesh = i->second;
+ for (S32 joint_num = 0; joint_num < mesh->mJointRenderData.size(); joint_num++)
+ {
+ LLVector4a trans;
+ trans.load3( mesh->mJointRenderData[joint_num]->mWorldMatrix->getTranslation().mV);
+ update_min_max(newMin, newMax, trans);
+ }
+ }
}
@@ -1362,22 +1363,22 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
{
float max_attachment_span = get_default_max_prim_scale() * 5.0f;
- for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end();
- ++iter)
- {
- LLViewerJointAttachment* attachment = iter->second;
+ for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end();
+ ++iter)
+ {
+ LLViewerJointAttachment* attachment = iter->second;
- if (attachment->getValid())
- {
- for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
- attachment_iter != attachment->mAttachedObjects.end();
- ++attachment_iter)
- {
+ if (attachment->getValid())
+ {
+ for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
+ attachment_iter != attachment->mAttachedObjects.end();
+ ++attachment_iter)
+ {
// Don't we need to look at children of attached_object as well?
- const LLViewerObject* attached_object = (*attachment_iter);
- if (attached_object && !attached_object->isHUDAttachment())
- {
+ const LLViewerObject* attached_object = (*attachment_iter);
+ if (attached_object && !attached_object->isHUDAttachment())
+ {
const LLVOVolume *vol = dynamic_cast<const LLVOVolume*>(attached_object);
if (vol && vol->isAnimatedObject())
{
@@ -1399,33 +1400,33 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
{
continue;
}
- LLDrawable* drawable = attached_object->mDrawable;
- if (drawable && !drawable->isState(LLDrawable::RIGGED))
- {
- LLSpatialBridge* bridge = drawable->getSpatialBridge();
- if (bridge)
- {
- const LLVector4a* ext = bridge->getSpatialExtents();
- LLVector4a distance;
- distance.setSub(ext[1], ext[0]);
- LLVector4a max_span(max_attachment_span);
+ LLDrawable* drawable = attached_object->mDrawable;
+ if (drawable && !drawable->isState(LLDrawable::RIGGED))
+ {
+ LLSpatialBridge* bridge = drawable->getSpatialBridge();
+ if (bridge)
+ {
+ const LLVector4a* ext = bridge->getSpatialExtents();
+ LLVector4a distance;
+ distance.setSub(ext[1], ext[0]);
+ LLVector4a max_span(max_attachment_span);
- S32 lt = distance.lessThan(max_span).getGatheredBits() & 0x7;
+ S32 lt = distance.lessThan(max_span).getGatheredBits() & 0x7;
- // Only add the prim to spatial extents calculations if it isn't a megaprim.
- // max_attachment_span calculated at the start of the function
- // (currently 5 times our max prim size)
- if (lt == 0x7)
- {
- update_min_max(newMin,newMax,ext[0]);
- update_min_max(newMin,newMax,ext[1]);
- }
- }
- }
- }
- }
- }
- }
+ // Only add the prim to spatial extents calculations if it isn't a megaprim.
+ // max_attachment_span calculated at the start of the function
+ // (currently 5 times our max prim size)
+ if (lt == 0x7)
+ {
+ update_min_max(newMin,newMax,ext[0]);
+ update_min_max(newMin,newMax,ext[1]);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
// Stretch bounding box by rigged mesh joint boxes
@@ -1949,7 +1950,7 @@ void LLVOAvatar::buildCharacter()
// Currently disabled for control avatars (animated objects), enabled for all others.
if (mEnableDefaultMotions)
{
- startDefaultMotions();
+ startDefaultMotions();
}
//-------------------------------------------------------------------------
@@ -2066,8 +2067,8 @@ void LLVOAvatar::resetSkeleton(bool reset_animations)
// Reset tweakable params to preserved state
if (mLastProcessedAppearance)
{
- bool slam_params = true;
- applyParsedAppearanceMessage(*mLastProcessedAppearance, slam_params);
+ bool slam_params = true;
+ applyParsedAppearanceMessage(*mLastProcessedAppearance, slam_params);
}
updateVisualParams();
@@ -2119,15 +2120,15 @@ void LLVOAvatar::releaseMeshData()
LLFace* facep = mDrawable->getFace(0);
if (facep)
{
- facep->setSize(0, 0);
- for(S32 i = mNumInitFaces ; i < mDrawable->getNumFaces(); i++)
- {
- facep = mDrawable->getFace(i);
+ facep->setSize(0, 0);
+ for(S32 i = mNumInitFaces ; i < mDrawable->getNumFaces(); i++)
+ {
+ facep = mDrawable->getFace(i);
if (facep)
{
- facep->setSize(0, 0);
- }
- }
+ facep->setSize(0, 0);
+ }
+ }
}
}
@@ -2385,6 +2386,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
{
result->setIsMissingAsset(false);
}
+
}
return result;
}
@@ -2770,13 +2772,13 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
if (mDrawable.notNull())
{
- mDrawable->movePartition();
-
- //force a move if sitting on an active object
- if (getParent() && ((LLViewerObject*) getParent())->mDrawable->isActive())
- {
- gPipeline.markMoved(mDrawable, TRUE);
- }
+ mDrawable->movePartition();
+
+ //force a move if sitting on an active object
+ if (getParent() && ((LLViewerObject*) getParent())->mDrawable->isActive())
+ {
+ gPipeline.markMoved(mDrawable, TRUE);
+ }
}
}
@@ -3539,66 +3541,67 @@ bool LLVOAvatar::isInMuteList()
void LLVOAvatar::updateAppearanceMessageDebugText()
{
- S32 central_bake_version = -1;
- if (getRegion())
- {
- central_bake_version = getRegion()->getCentralBakeVersion();
- }
- bool all_baked_downloaded = allBakedTexturesCompletelyDownloaded();
- bool all_local_downloaded = allLocalTexturesCompletelyDownloaded();
- std::string debug_line = llformat("%s%s - mLocal: %d, mEdit: %d, mUSB: %d, CBV: %d",
- isSelf() ? (all_local_downloaded ? "L" : "l") : "-",
- all_baked_downloaded ? "B" : "b",
- mUseLocalAppearance, mIsEditingAppearance,
- 1, central_bake_version);
- std::string origin_string = bakedTextureOriginInfo();
- debug_line += " [" + origin_string + "]";
- S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion();
- S32 last_request_cof_version = mLastUpdateRequestCOFVersion;
- S32 last_received_cof_version = mLastUpdateReceivedCOFVersion;
- if (isSelf())
- {
- debug_line += llformat(" - cof: %d req: %d rcv:%d",
- curr_cof_version, last_request_cof_version, last_received_cof_version);
- if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
+ S32 central_bake_version = -1;
+ if (getRegion())
+ {
+ central_bake_version = getRegion()->getCentralBakeVersion();
+ }
+ bool all_baked_downloaded = allBakedTexturesCompletelyDownloaded();
+ bool all_local_downloaded = allLocalTexturesCompletelyDownloaded();
+ std::string debug_line = llformat("%s%s - mLocal: %d, mEdit: %d, mUSB: %d, CBV: %d",
+ isSelf() ? (all_local_downloaded ? "L" : "l") : "-",
+ all_baked_downloaded ? "B" : "b",
+ mUseLocalAppearance, mIsEditingAppearance,
+ 1, central_bake_version);
+ std::string origin_string = bakedTextureOriginInfo();
+ debug_line += " [" + origin_string + "]";
+ S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion();
+ S32 last_request_cof_version = mLastUpdateRequestCOFVersion;
+ S32 last_received_cof_version = mLastUpdateReceivedCOFVersion;
+ if (isSelf())
+ {
+ debug_line += llformat(" - cof: %d req: %d rcv:%d",
+ curr_cof_version, last_request_cof_version, last_received_cof_version);
+ if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
+ {
+ debug_line += " FORCING ERRS";
+ }
+ }
+ else
+ {
+ debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
+ }
+ debug_line += llformat(" bsz-z: %.3f", mBodySize[2]);
+ if (mAvatarOffset[2] != 0.0f)
{
- debug_line += " FORCING ERRS";
+ debug_line += llformat("avofs-z: %.3f", mAvatarOffset[2]);
}
- }
- else
- {
- debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
- }
- debug_line += llformat(" bsz-z: %.3f", mBodySize[2]);
- if (mAvatarOffset[2] != 0.0f)
- {
- debug_line += llformat("avofs-z: %.3f", mAvatarOffset[2]);
- }
- bool hover_enabled = getRegion() && getRegion()->avatarHoverHeightEnabled();
- debug_line += hover_enabled ? " H" : " h";
- const LLVector3& hover_offset = getHoverOffset();
- if (hover_offset[2] != 0.0)
- {
- debug_line += llformat(" hov_z: %.3f", hover_offset[2]);
+ bool hover_enabled = getRegion() && getRegion()->avatarHoverHeightEnabled();
+ debug_line += hover_enabled ? " H" : " h";
+ const LLVector3& hover_offset = getHoverOffset();
+ if (hover_offset[2] != 0.0)
+ {
+ debug_line += llformat(" hov_z: %.3f", hover_offset[2]);
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;
- resolveHeightAgent(ankle_right_pos_agent, ankle_right_ground_agent, normal);
- F32 rightElev = llmax(-0.2f, ankle_right_pos_agent.mV[VZ] - ankle_right_ground_agent.mV[VZ]);
- debug_line += llformat(" relev %.3f", rightElev);
+ debug_line += llformat("%s", (isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED) ? "G" : "-"));
+ }
- LLVector3 root_pos = mRoot->getPosition();
- LLVector3 pelvis_pos = mPelvisp->getPosition();
- debug_line += llformat(" rp %.3f pp %.3f", root_pos[2], pelvis_pos[2]);
+ LLVector3 ankle_right_pos_agent = mFootRightp->getWorldPosition();
+ LLVector3 normal;
+ LLVector3 ankle_right_ground_agent = ankle_right_pos_agent;
+ resolveHeightAgent(ankle_right_pos_agent, ankle_right_ground_agent, normal);
+ F32 rightElev = llmax(-0.2f, ankle_right_pos_agent.mV[VZ] - ankle_right_ground_agent.mV[VZ]);
+ debug_line += llformat(" relev %.3f", rightElev);
+
+ LLVector3 root_pos = mRoot->getPosition();
+ LLVector3 pelvis_pos = mPelvisp->getPosition();
+ debug_line += llformat(" rp %.3f pp %.3f", root_pos[2], pelvis_pos[2]);
S32 is_visible = (S32) isVisible();
S32 is_m_visible = (S32) mVisible;
debug_line += llformat(" v %d/%d", is_visible, is_m_visible);
- addDebugText(debug_line);
+ addDebugText(debug_line);
}
LLViewerInventoryItem* getObjectInventoryItem(LLViewerObject *vobj, LLUUID asset_id)
@@ -3610,7 +3613,7 @@ LLViewerInventoryItem* getObjectInventoryItem(LLViewerObject *vobj, LLUUID asset
if (vobj->getInventorySerial()<=0)
{
vobj->requestInventory();
- }
+ }
item = vobj->getInventoryItemByAsset(asset_id);
}
return item;
@@ -3628,23 +3631,23 @@ LLViewerInventoryItem* recursiveGetObjectInventoryItem(LLViewerObject *vobj, LLU
LLViewerObject *childp = *it;
item = getObjectInventoryItem(childp, asset_id);
if (item)
- {
+ {
break;
}
}
- }
+ }
return item;
}
void LLVOAvatar::updateAnimationDebugText()
{
- for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin();
- iter != mMotionController.getActiveMotions().end(); ++iter)
- {
- LLMotion* motionp = *iter;
- if (motionp->getMinPixelArea() < getPixelArea())
- {
- std::string output;
+ for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin();
+ iter != mMotionController.getActiveMotions().end(); ++iter)
+ {
+ LLMotion* motionp = *iter;
+ if (motionp->getMinPixelArea() < getPixelArea())
+ {
+ std::string output;
std::string motion_name = motionp->getName();
if (motion_name.empty())
{
@@ -3661,73 +3664,73 @@ void LLVOAvatar::updateAnimationDebugText()
}
}
if (motion_name.empty())
- {
- std::string name;
- if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf())
- {
- name = motionp->getID().asString();
- LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin();
- for (; anim_it != mAnimationSources.end(); ++anim_it)
- {
- if (anim_it->second == motionp->getID())
- {
- LLViewerObject* object = gObjectList.findObject(anim_it->first);
- if (!object)
- {
- break;
- }
- if (object->isAvatar())
- {
- if (mMotionController.mIsSelf)
- {
- // Searching inventory by asset id is really long
- // so just mark as inventory
- // Also item is likely to be named by LLPreviewAnim
- name += "(inventory)";
- }
- }
- else
- {
- LLViewerInventoryItem* item = NULL;
- if (!object->isInventoryDirty())
- {
- item = object->getInventoryItemByAsset(motionp->getID());
- }
- if (item)
- {
- name = item->getName();
- }
- else if (object->isAttachment())
- {
- name += "(" + getAttachmentItemName() + ")";
- }
- else
- {
- // in-world object, name or content unknown
- name += "(in-world)";
- }
- }
- break;
- }
- }
- }
- else
- {
- name = LLUUID::null.asString();
- }
- output = llformat("%s - %d",
- name.c_str(),
- (U32)motionp->getPriority());
- }
- else
- {
- output = llformat("%s - %d",
+ {
+ std::string name;
+ if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf())
+ {
+ name = motionp->getID().asString();
+ LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin();
+ for (; anim_it != mAnimationSources.end(); ++anim_it)
+ {
+ if (anim_it->second == motionp->getID())
+ {
+ LLViewerObject* object = gObjectList.findObject(anim_it->first);
+ if (!object)
+ {
+ break;
+ }
+ if (object->isAvatar())
+ {
+ if (mMotionController.mIsSelf)
+ {
+ // Searching inventory by asset id is really long
+ // so just mark as inventory
+ // Also item is likely to be named by LLPreviewAnim
+ name += "(inventory)";
+ }
+ }
+ else
+ {
+ LLViewerInventoryItem* item = NULL;
+ if (!object->isInventoryDirty())
+ {
+ item = object->getInventoryItemByAsset(motionp->getID());
+ }
+ if (item)
+ {
+ name = item->getName();
+ }
+ else if (object->isAttachment())
+ {
+ name += "(" + getAttachmentItemName() + ")";
+ }
+ else
+ {
+ // in-world object, name or content unknown
+ name += "(in-world)";
+ }
+ }
+ break;
+ }
+ }
+ }
+ else
+ {
+ name = LLUUID::null.asString();
+ }
+ output = llformat("%s - %d",
+ name.c_str(),
+ (U32)motionp->getPriority());
+ }
+ else
+ {
+ output = llformat("%s - %d",
motion_name.c_str(),
- (U32)motionp->getPriority());
- }
- addDebugText(output);
- }
- }
+ (U32)motionp->getPriority());
+ }
+ addDebugText(output);
+ }
+ }
}
void LLVOAvatar::updateDebugText()
@@ -3760,7 +3763,7 @@ void LLVOAvatar::updateDebugText()
{
setDebugText(mDebugText);
}
- mDebugText.clear();
+ mDebugText.clear();
}
//------------------------------------------------------------------------
@@ -3774,7 +3777,7 @@ void LLVOAvatar::updateFootstepSounds()
{
return;
}
-
+
//-------------------------------------------------------------------------
// Find the ground under each foot, these are used for a variety
// of things that follow
@@ -3799,7 +3802,7 @@ void LLVOAvatar::updateFootstepSounds()
if (!mInAir)
{
if ((leftElev < 0.0f) || (rightElev < 0.0f))
- {
+ {
ankle_left_pos_agent = mFootLeftp->getWorldPosition();
ankle_right_pos_agent = mFootRightp->getWorldPosition();
leftElev = ankle_left_pos_agent.mV[VZ] - ankle_left_ground_agent.mV[VZ];
@@ -3828,10 +3831,10 @@ void LLVOAvatar::updateFootstepSounds()
// did right foot hit the ground?
if ( onGroundRight && !mWasOnGroundRight )
- {
+ {
foot_pos_agent = ankle_right_pos_agent;
playSound = TRUE;
- }
+ }
mWasOnGroundLeft = onGroundLeft;
mWasOnGroundRight = onGroundRight;
@@ -3920,153 +3923,153 @@ void LLVOAvatar::computeUpdatePeriod()
//------------------------------------------------------------------------
void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
{
- LLQuaternion iQ;
- LLVector3 upDir( 0.0f, 0.0f, 1.0f );
+ LLQuaternion iQ;
+ LLVector3 upDir( 0.0f, 0.0f, 1.0f );
- // Compute a forward direction vector derived from the primitive rotation
- // and the velocity vector. When walking or jumping, don't let body deviate
- // more than 90 from the view, if necessary, flip the velocity vector.
+ // Compute a forward direction vector derived from the primitive rotation
+ // and the velocity vector. When walking or jumping, don't let body deviate
+ // more than 90 from the view, if necessary, flip the velocity vector.
- LLVector3 primDir;
- if (isSelf())
- {
- primDir = agent.getAtAxis() - projected_vec(agent.getAtAxis(), agent.getReferenceUpVector());
- primDir.normalize();
- }
- else
- {
- primDir = getRotation().getMatrix3().getFwdRow();
- }
- LLVector3 velDir = getVelocity();
- velDir.normalize();
- if ( mSignaledAnimations.find(ANIM_AGENT_WALK) != mSignaledAnimations.end())
- {
- F32 vpD = velDir * primDir;
- if (vpD < -0.5f)
- {
- velDir *= -1.0f;
- }
- }
- LLVector3 fwdDir = lerp(primDir, velDir, clamp_rescale(speed, 0.5f, 2.0f, 0.0f, 1.0f));
- if (isSelf() && gAgentCamera.cameraMouselook())
- {
- // make sure fwdDir stays in same general direction as primdir
- if (gAgent.getFlying())
- {
- fwdDir = LLViewerCamera::getInstance()->getAtAxis();
- }
- else
- {
- LLVector3 at_axis = LLViewerCamera::getInstance()->getAtAxis();
- LLVector3 up_vector = gAgent.getReferenceUpVector();
- at_axis -= up_vector * (at_axis * up_vector);
- at_axis.normalize();
+ LLVector3 primDir;
+ if (isSelf())
+ {
+ primDir = agent.getAtAxis() - projected_vec(agent.getAtAxis(), agent.getReferenceUpVector());
+ primDir.normalize();
+ }
+ else
+ {
+ primDir = getRotation().getMatrix3().getFwdRow();
+ }
+ LLVector3 velDir = getVelocity();
+ velDir.normalize();
+ if ( mSignaledAnimations.find(ANIM_AGENT_WALK) != mSignaledAnimations.end())
+ {
+ F32 vpD = velDir * primDir;
+ if (vpD < -0.5f)
+ {
+ velDir *= -1.0f;
+ }
+ }
+ LLVector3 fwdDir = lerp(primDir, velDir, clamp_rescale(speed, 0.5f, 2.0f, 0.0f, 1.0f));
+ if (isSelf() && gAgentCamera.cameraMouselook())
+ {
+ // make sure fwdDir stays in same general direction as primdir
+ if (gAgent.getFlying())
+ {
+ fwdDir = LLViewerCamera::getInstance()->getAtAxis();
+ }
+ else
+ {
+ LLVector3 at_axis = LLViewerCamera::getInstance()->getAtAxis();
+ LLVector3 up_vector = gAgent.getReferenceUpVector();
+ at_axis -= up_vector * (at_axis * up_vector);
+ at_axis.normalize();
- F32 dot = fwdDir * at_axis;
- if (dot < 0.f)
- {
- fwdDir -= 2.f * at_axis * dot;
- fwdDir.normalize();
- }
- }
- }
+ F32 dot = fwdDir * at_axis;
+ if (dot < 0.f)
+ {
+ fwdDir -= 2.f * at_axis * dot;
+ fwdDir.normalize();
+ }
+ }
+ }
- LLQuaternion root_rotation = mRoot->getWorldMatrix().quaternion();
- F32 root_roll, root_pitch, root_yaw;
- root_rotation.getEulerAngles(&root_roll, &root_pitch, &root_yaw);
+ LLQuaternion root_rotation = mRoot->getWorldMatrix().quaternion();
+ F32 root_roll, root_pitch, root_yaw;
+ root_rotation.getEulerAngles(&root_roll, &root_pitch, &root_yaw);
- // When moving very slow, the pelvis is allowed to deviate from the
+ // When moving very slow, the pelvis is allowed to deviate from the
// forward direction to allow it to hold its position while the torso
- // and head turn. Once in motion, it must conform however.
- BOOL self_in_mouselook = isSelf() && gAgentCamera.cameraMouselook();
+ // and head turn. Once in motion, it must conform however.
+ BOOL self_in_mouselook = isSelf() && gAgentCamera.cameraMouselook();
- LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV );
+ LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV );
- static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow", 60.0);
- static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast", 2.0);
+ static LLCachedControl<F32> s_pelvis_rot_threshold_slow(gSavedSettings, "AvatarRotateThresholdSlow", 60.0);
+ static LLCachedControl<F32> s_pelvis_rot_threshold_fast(gSavedSettings, "AvatarRotateThresholdFast", 2.0);
- F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, s_pelvis_rot_threshold_slow, s_pelvis_rot_threshold_fast);
+ F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, s_pelvis_rot_threshold_slow, s_pelvis_rot_threshold_fast);
- if (self_in_mouselook)
- {
- pelvis_rot_threshold *= MOUSELOOK_PELVIS_FOLLOW_FACTOR;
- }
- pelvis_rot_threshold *= DEG_TO_RAD;
+ if (self_in_mouselook)
+ {
+ pelvis_rot_threshold *= MOUSELOOK_PELVIS_FOLLOW_FACTOR;
+ }
+ pelvis_rot_threshold *= DEG_TO_RAD;
- F32 angle = angle_between( pelvisDir, fwdDir );
+ F32 angle = angle_between( pelvisDir, fwdDir );
- // The avatar's root is allowed to have a yaw that deviates widely
- // from the forward direction, but if roll or pitch are off even
- // a little bit we need to correct the rotation.
- if(root_roll < 1.f * DEG_TO_RAD
- && root_pitch < 5.f * DEG_TO_RAD)
- {
- // smaller correction vector means pelvis follows prim direction more closely
- if (!mTurning && angle > pelvis_rot_threshold*0.75f)
- {
- mTurning = TRUE;
- }
+ // The avatar's root is allowed to have a yaw that deviates widely
+ // from the forward direction, but if roll or pitch are off even
+ // a little bit we need to correct the rotation.
+ if(root_roll < 1.f * DEG_TO_RAD
+ && root_pitch < 5.f * DEG_TO_RAD)
+ {
+ // smaller correction vector means pelvis follows prim direction more closely
+ if (!mTurning && angle > pelvis_rot_threshold*0.75f)
+ {
+ mTurning = TRUE;
+ }
- // use tighter threshold when turning
- if (mTurning)
- {
- pelvis_rot_threshold *= 0.4f;
- }
+ // use tighter threshold when turning
+ if (mTurning)
+ {
+ pelvis_rot_threshold *= 0.4f;
+ }
- // am I done turning?
- if (angle < pelvis_rot_threshold)
- {
- mTurning = FALSE;
- }
+ // am I done turning?
+ if (angle < pelvis_rot_threshold)
+ {
+ mTurning = FALSE;
+ }
- LLVector3 correction_vector = (pelvisDir - fwdDir) * clamp_rescale(angle, pelvis_rot_threshold*0.75f, pelvis_rot_threshold, 1.0f, 0.0f);
- fwdDir += correction_vector;
- }
- else
- {
- mTurning = FALSE;
- }
+ LLVector3 correction_vector = (pelvisDir - fwdDir) * clamp_rescale(angle, pelvis_rot_threshold*0.75f, pelvis_rot_threshold, 1.0f, 0.0f);
+ fwdDir += correction_vector;
+ }
+ else
+ {
+ mTurning = FALSE;
+ }
- // Now compute the full world space rotation for the whole body (wQv)
- LLVector3 leftDir = upDir % fwdDir;
- leftDir.normalize();
- fwdDir = leftDir % upDir;
- LLQuaternion wQv( fwdDir, leftDir, upDir );
+ // Now compute the full world space rotation for the whole body (wQv)
+ LLVector3 leftDir = upDir % fwdDir;
+ leftDir.normalize();
+ fwdDir = leftDir % upDir;
+ LLQuaternion wQv( fwdDir, leftDir, upDir );
- if (isSelf() && mTurning)
- {
- if ((fwdDir % pelvisDir) * upDir > 0.f)
- {
- gAgent.setControlFlags(AGENT_CONTROL_TURN_RIGHT);
- }
- else
- {
- gAgent.setControlFlags(AGENT_CONTROL_TURN_LEFT);
- }
- }
+ if (isSelf() && mTurning)
+ {
+ if ((fwdDir % pelvisDir) * upDir > 0.f)
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_TURN_RIGHT);
+ }
+ else
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_TURN_LEFT);
+ }
+ }
- // Set the root rotation, but do so incrementally so that it
- // lags in time by some fixed amount.
- //F32 u = LLSmoothInterpolation::getInterpolant(PELVIS_LAG);
- F32 pelvis_lag_time = 0.f;
- if (self_in_mouselook)
- {
- pelvis_lag_time = PELVIS_LAG_MOUSELOOK;
- }
- else if (mInAir)
- {
- pelvis_lag_time = PELVIS_LAG_FLYING;
- // increase pelvis lag time when moving slowly
- pelvis_lag_time *= clamp_rescale(mSpeedAccum, 0.f, 15.f, 3.f, 1.f);
- }
- else
- {
- pelvis_lag_time = PELVIS_LAG_WALKING;
- }
+ // Set the root rotation, but do so incrementally so that it
+ // lags in time by some fixed amount.
+ //F32 u = LLSmoothInterpolation::getInterpolant(PELVIS_LAG);
+ F32 pelvis_lag_time = 0.f;
+ if (self_in_mouselook)
+ {
+ pelvis_lag_time = PELVIS_LAG_MOUSELOOK;
+ }
+ else if (mInAir)
+ {
+ pelvis_lag_time = PELVIS_LAG_FLYING;
+ // increase pelvis lag time when moving slowly
+ pelvis_lag_time *= clamp_rescale(mSpeedAccum, 0.f, 15.f, 3.f, 1.f);
+ }
+ else
+ {
+ pelvis_lag_time = PELVIS_LAG_WALKING;
+ }
F32 u = llclamp((delta_time / pelvis_lag_time), 0.0f, 1.0f);
- mRoot->setWorldRotation( slerp(u, mRoot->getWorldRotation(), wQv) );
+ mRoot->setWorldRotation( slerp(u, mRoot->getWorldRotation(), wQv) );
}
//------------------------------------------------------------------------
@@ -4128,7 +4131,7 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w
mRoot->setWorldPosition( getPositionAgent() ); // first frame
mRoot->setWorldRotation( getRotation() );
}
-
+
//--------------------------------------------------------------------
// dont' let dT get larger than 1/5th of a second
//--------------------------------------------------------------------
@@ -4366,7 +4369,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
mRoot->updateWorldMatrixChildren();
// System avatar mesh vertices need to be reskinned.
- mNeedsSkin = TRUE;
+ mNeedsSkin = TRUE;
return TRUE;
}
@@ -4880,14 +4883,14 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
first_pass = FALSE;
}
if (isTextureVisible(TEX_HAIR_BAKED))
- {
- LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR);
- if (hair_mesh)
- {
- num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
- }
- first_pass = FALSE;
- }
+ {
+ LLViewerJoint* hair_mesh = getViewerJoint(MESH_ID_HAIR);
+ if (hair_mesh)
+ {
+ num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy);
+ }
+ first_pass = FALSE;
+ }
if (LLPipeline::sImpostorRender)
{
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
@@ -4995,22 +4998,22 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel)
gGL.flush();
}
{
- LLGLEnable test(GL_ALPHA_TEST);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
+ LLGLEnable test(GL_ALPHA_TEST);
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
- gGL.color4ubv(color.mV);
- gGL.getTexUnit(diffuse_channel)->bind(&mImpostor);
- gGL.begin(LLRender::QUADS);
- gGL.texCoord2f(0,0);
- gGL.vertex3fv((pos+left-up).mV);
- gGL.texCoord2f(1,0);
- gGL.vertex3fv((pos-left-up).mV);
- gGL.texCoord2f(1,1);
- gGL.vertex3fv((pos-left+up).mV);
- gGL.texCoord2f(0,1);
- gGL.vertex3fv((pos+left+up).mV);
- gGL.end();
- gGL.flush();
+ gGL.color4ubv(color.mV);
+ gGL.getTexUnit(diffuse_channel)->bind(&mImpostor);
+ gGL.begin(LLRender::QUADS);
+ gGL.texCoord2f(0,0);
+ gGL.vertex3fv((pos+left-up).mV);
+ gGL.texCoord2f(1,0);
+ gGL.vertex3fv((pos-left-up).mV);
+ gGL.texCoord2f(1,1);
+ gGL.vertex3fv((pos-left+up).mV);
+ gGL.texCoord2f(0,1);
+ gGL.vertex3fv((pos+left+up).mV);
+ gGL.end();
+ gGL.flush();
}
return 6;
@@ -5510,8 +5513,8 @@ void LLVOAvatar::processAnimationStateChanges()
stopMotion(ANIM_AGENT_WALK_ADJUST);
if (mEnableDefaultMotions)
{
- startMotion(ANIM_AGENT_FLY_ADJUST);
- }
+ startMotion(ANIM_AGENT_FLY_ADJUST);
+ }
}
else
{
@@ -5523,7 +5526,7 @@ void LLVOAvatar::processAnimationStateChanges()
{
if (mEnableDefaultMotions)
{
- startMotion(ANIM_AGENT_TARGET);
+ startMotion(ANIM_AGENT_TARGET);
}
stopMotion(ANIM_AGENT_BODY_NOISE);
}
@@ -5532,8 +5535,8 @@ void LLVOAvatar::processAnimationStateChanges()
stopMotion(ANIM_AGENT_TARGET);
if (mEnableDefaultMotions)
{
- startMotion(ANIM_AGENT_BODY_NOISE);
- }
+ startMotion(ANIM_AGENT_BODY_NOISE);
+ }
}
// clear all current animations
@@ -5901,10 +5904,10 @@ bool LLVOAvatar::getRiggedMeshID(LLViewerObject* pVO, LLUUID& mesh_id)
if (pSkinData
&& pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG // full rig
&& pSkinData->mAlternateBindMatrix.size() > 0 )
- {
- mesh_id = pSkinData->mMeshID;
- return true;
- }
+ {
+ mesh_id = pSkinData->mMeshID;
+ return true;
+ }
}
}
return false;
@@ -5913,14 +5916,14 @@ bool LLVOAvatar::getRiggedMeshID(LLViewerObject* pVO, LLUUID& mesh_id)
bool LLVOAvatar::jointIsRiggedTo(const LLJoint *joint) const
{
if (joint)
- {
+ {
const LLJointRiggingInfoTab& tab = mJointRiggingInfoTab;
S32 joint_num = joint->getJointNum();
if (joint_num < tab.size() && tab[joint_num].isRiggedTo())
- {
- return true;
+ {
+ return true;
+ }
}
- }
return false;
}
@@ -5929,25 +5932,25 @@ void LLVOAvatar::clearAttachmentOverrides()
LLScopedContextString str("clearAttachmentOverrides " + getFullname());
for (S32 i=0; i<LL_CHARACTER_MAX_ANIMATED_JOINTS; i++)
- {
+ {
LLJoint *pJoint = getJoint(i);
if (pJoint)
{
pJoint->clearAttachmentPosOverrides();
pJoint->clearAttachmentScaleOverrides();
}
- }
+ }
if (mPelvisFixups.count()>0)
{
mPelvisFixups.clear();
LLJoint* pJointPelvis = getJoint("mPelvis");
if (pJointPelvis)
- {
+ {
pJointPelvis->setPosition( LLVector3( 0.0f, 0.0f, 0.0f) );
}
postPelvisSetRecalc();
- }
+ }
mActiveOverrideMeshes.clear();
onActiveOverrideMeshesChanged();
@@ -5968,7 +5971,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()
// Handle the case that we're resetting the skeleton of an animated object.
LLControlAvatar *control_av = dynamic_cast<LLControlAvatar*>(this);
if (control_av)
- {
+ {
LLVOVolume *volp = control_av->mRootVolp;
if (volp)
{
@@ -6105,9 +6108,9 @@ void LLVOAvatar::updateAttachmentOverrides()
if (scale_overrides_by_joint[joint_num] != joint->m_attachmentScaleOverrides)
{
mismatched = true;
- }
}
}
+ }
if (pelvis_fixups != mPelvisFixups)
{
mismatched = true;
@@ -6126,10 +6129,10 @@ void LLVOAvatar::updateAttachmentOverrides()
void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LLUUID>* meshes_seen, bool recursive)
{
if (vo->getAvatar() != this && vo->getAvatarAncestor() != this)
- {
+ {
LL_WARNS("Avatar") << "called with invalid avatar" << LL_ENDL;
return;
- }
+ }
LLScopedContextString str("addAttachmentOverridesForObject " + getFullname());
@@ -6139,14 +6142,14 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
// Process all children
if (recursive)
{
- LLViewerObject::const_child_list_t& children = vo->getChildren();
- for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
- it != children.end(); ++it)
- {
- LLViewerObject *childp = *it;
+ LLViewerObject::const_child_list_t& children = vo->getChildren();
+ for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
+ it != children.end(); ++it)
+ {
+ LLViewerObject *childp = *it;
addAttachmentOverridesForObject(childp, meshes_seen, true);
}
- }
+ }
LLVOVolume *vobj = dynamic_cast<LLVOVolume*>(vo);
bool pelvisGotSet = false;
@@ -6407,7 +6410,7 @@ void LLVOAvatar::removeAttachmentOverridesForObject(const LLUUID& mesh_id)
LLJoint* pJointPelvis = getJoint("mPelvis");
const std::string av_string = avString();
for (S32 joint_num = 0; joint_num < LL_CHARACTER_MAX_ANIMATED_JOINTS; joint_num++)
- {
+ {
LLJoint *pJoint = getJoint(joint_num);
if ( pJoint )
{
@@ -7017,6 +7020,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;
}
@@ -7220,7 +7239,6 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
//-----------------------------------------------------------------------------
BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
{
-
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
++iter)
@@ -7231,12 +7249,28 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
{
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;
}
@@ -7372,7 +7406,7 @@ void LLVOAvatar::getOffObject()
if (mEnableDefaultMotions)
{
- startMotion(ANIM_AGENT_BODY_NOISE);
+ startMotion(ANIM_AGENT_BODY_NOISE);
}
if (isSelf())
@@ -7838,8 +7872,8 @@ bool LLVOAvatar::isTooComplex() const
// yes, this leaves them vulnerable to griefing objects... their choice
too_complex = ( max_render_cost > 0
&& (mVisualComplexity > max_render_cost
- || (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area)
- ));
+ || (max_attachment_area > 0.0f && mAttachmentSurfaceArea > max_attachment_area)
+ ));
}
return too_complex;
@@ -7872,6 +7906,115 @@ 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);
+ 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);
+ 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.
@@ -8089,6 +8232,36 @@ 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);
+ 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->refreshBakeTexture();
+ }
+ }
+ }
+ }
+
+
+
}
// virtual
@@ -8732,7 +8905,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)
{
LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << LL_ENDL;
setTEImage(mBakedTextureDatas[baked_index].mTextureIndex,
@@ -8865,6 +9038,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
@@ -9100,6 +9306,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
}
}
}
+
dirtyMesh();
}
@@ -9972,122 +10179,122 @@ void LLVOAvatar::accountRenderComplexityForObject(
hud_complexity_list_t& hud_complexity_list)
{
if (attached_object && !attached_object->isHUDAttachment())
- {
+ {
mAttachmentVisibleTriangleCount += attached_object->recursiveGetTriangleCount();
mAttachmentEstTriangleCount += attached_object->recursiveGetEstTrianglesMax();
mAttachmentSurfaceArea += attached_object->recursiveGetScaledSurfaceArea();
- textures.clear();
- const LLDrawable* drawable = attached_object->mDrawable;
- if (drawable)
- {
- const LLVOVolume* volume = drawable->getVOVolume();
- if (volume)
- {
- F32 attachment_total_cost = 0;
- F32 attachment_volume_cost = 0;
- F32 attachment_texture_cost = 0;
- F32 attachment_children_cost = 0;
+ textures.clear();
+ const LLDrawable* drawable = attached_object->mDrawable;
+ if (drawable)
+ {
+ const LLVOVolume* volume = drawable->getVOVolume();
+ if (volume)
+ {
+ F32 attachment_total_cost = 0;
+ F32 attachment_volume_cost = 0;
+ F32 attachment_texture_cost = 0;
+ F32 attachment_children_cost = 0;
const F32 animated_object_attachment_surcharge = 1000;
if (attached_object->isAnimatedObject())
{
attachment_volume_cost += animated_object_attachment_surcharge;
}
- attachment_volume_cost += volume->getRenderCost(textures);
+ attachment_volume_cost += volume->getRenderCost(textures);
- const_child_list_t children = volume->getChildren();
- for (const_child_list_t::const_iterator child_iter = children.begin();
- child_iter != children.end();
- ++child_iter)
- {
- LLViewerObject* child_obj = *child_iter;
- LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
- if (child)
- {
- attachment_children_cost += child->getRenderCost(textures);
- }
- }
+ const_child_list_t children = volume->getChildren();
+ for (const_child_list_t::const_iterator child_iter = children.begin();
+ child_iter != children.end();
+ ++child_iter)
+ {
+ LLViewerObject* child_obj = *child_iter;
+ LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
+ if (child)
+ {
+ attachment_children_cost += child->getRenderCost(textures);
+ }
+ }
- for (LLVOVolume::texture_cost_t::iterator volume_texture = textures.begin();
- volume_texture != textures.end();
- ++volume_texture)
+ for (LLVOVolume::texture_cost_t::iterator volume_texture = textures.begin();
+ volume_texture != textures.end();
+ ++volume_texture)
+ {
+ // add the cost of each individual texture in the linkset
+ attachment_texture_cost += volume_texture->second;
+ }
+ attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost;
+ LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID()
+ << " total: " << attachment_total_cost
+ << ", volume: " << attachment_volume_cost
+ << ", textures: " << attachment_texture_cost
+ << ", " << volume->numChildren()
+ << " children: " << attachment_children_cost
+ << LL_ENDL;
+ // Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
+ cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, max_attachment_complexity);
+ }
+ }
+ }
+ if (isSelf()
+ && attached_object
+ && attached_object->isHUDAttachment()
+ && !attached_object->isTempAttachment()
+ && attached_object->mDrawable)
{
- // add the cost of each individual texture in the linkset
- attachment_texture_cost += volume_texture->second;
- }
- attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost;
- LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID()
- << " total: " << attachment_total_cost
- << ", volume: " << attachment_volume_cost
- << ", textures: " << attachment_texture_cost
- << ", " << volume->numChildren()
- << " children: " << attachment_children_cost
- << LL_ENDL;
- // Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
- cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, max_attachment_complexity);
- }
- }
- }
- if (isSelf()
- && attached_object
- && attached_object->isHUDAttachment()
- && !attached_object->isTempAttachment()
- && attached_object->mDrawable)
- {
- textures.clear();
+ textures.clear();
mAttachmentSurfaceArea += attached_object->recursiveGetScaledSurfaceArea();
- const LLVOVolume* volume = attached_object->mDrawable->getVOVolume();
- if (volume)
- {
- LLHUDComplexity hud_object_complexity;
- hud_object_complexity.objectName = attached_object->getAttachmentItemName();
- hud_object_complexity.objectId = attached_object->getAttachmentItemID();
- std::string joint_name;
- gAgentAvatarp->getAttachedPointName(attached_object->getAttachmentItemID(), joint_name);
- hud_object_complexity.jointName = joint_name;
- // get cost and individual textures
- hud_object_complexity.objectsCost += volume->getRenderCost(textures);
- hud_object_complexity.objectsCount++;
-
- 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* childp = *iter;
- const LLVOVolume* chld_volume = dynamic_cast<LLVOVolume*>(childp);
- if (chld_volume)
- {
- // get cost and individual textures
- hud_object_complexity.objectsCost += chld_volume->getRenderCost(textures);
- hud_object_complexity.objectsCount++;
- }
- }
+ const LLVOVolume* volume = attached_object->mDrawable->getVOVolume();
+ if (volume)
+ {
+ LLHUDComplexity hud_object_complexity;
+ hud_object_complexity.objectName = attached_object->getAttachmentItemName();
+ hud_object_complexity.objectId = attached_object->getAttachmentItemID();
+ std::string joint_name;
+ gAgentAvatarp->getAttachedPointName(attached_object->getAttachmentItemID(), joint_name);
+ hud_object_complexity.jointName = joint_name;
+ // get cost and individual textures
+ hud_object_complexity.objectsCost += volume->getRenderCost(textures);
+ hud_object_complexity.objectsCount++;
+
+ 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* childp = *iter;
+ const LLVOVolume* chld_volume = dynamic_cast<LLVOVolume*>(childp);
+ if (chld_volume)
+ {
+ // get cost and individual textures
+ hud_object_complexity.objectsCost += chld_volume->getRenderCost(textures);
+ hud_object_complexity.objectsCount++;
+ }
+ }
- hud_object_complexity.texturesCount += textures.size();
+ hud_object_complexity.texturesCount += textures.size();
- for (LLVOVolume::texture_cost_t::iterator volume_texture = textures.begin();
- volume_texture != textures.end();
- ++volume_texture)
- {
- // add the cost of each individual texture (ignores duplicates)
- hud_object_complexity.texturesCost += volume_texture->second;
- LLViewerFetchedTexture *tex = LLViewerTextureManager::getFetchedTexture(volume_texture->first);
- if (tex)
- {
- // Note: Texture memory might be incorect since texture might be still loading.
- hud_object_complexity.texturesMemoryTotal += tex->getTextureMemory();
- if (tex->getOriginalHeight() * tex->getOriginalWidth() >= HUD_OVERSIZED_TEXTURE_DATA_SIZE)
- {
- hud_object_complexity.largeTexturesCount++;
+ for (LLVOVolume::texture_cost_t::iterator volume_texture = textures.begin();
+ volume_texture != textures.end();
+ ++volume_texture)
+ {
+ // add the cost of each individual texture (ignores duplicates)
+ hud_object_complexity.texturesCost += volume_texture->second;
+ LLViewerFetchedTexture *tex = LLViewerTextureManager::getFetchedTexture(volume_texture->first);
+ if (tex)
+ {
+ // Note: Texture memory might be incorect since texture might be still loading.
+ hud_object_complexity.texturesMemoryTotal += tex->getTextureMemory();
+ if (tex->getOriginalHeight() * tex->getOriginalWidth() >= HUD_OVERSIZED_TEXTURE_DATA_SIZE)
+ {
+ hud_object_complexity.largeTexturesCount++;
+ }
+ }
+ }
+ hud_complexity_list.push_back(hud_object_complexity);
}
}
- }
- hud_complexity_list.push_back(hud_object_complexity);
- }
- }
}
// Calculations for mVisualComplexity value
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index b603381e6d..00dccc5d12 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -617,6 +617,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);
@@ -701,6 +702,9 @@ public:
void updateSexDependentLayerSets();
virtual void dirtyMesh(); // Dirty the avatar mesh
void updateMeshData();
+ void updateMeshVisibility();
+ LLViewerTexture* getBakedTexture(const U8 te);
+
protected:
void releaseMeshData();
virtual void restoreMeshData();
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index ee2270c323..e7bbee5efd 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -455,6 +455,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;
}
diff --git a/indra/newview/skins/default/textures/icons/Inv_Universal.png b/indra/newview/skins/default/textures/icons/Inv_Universal.png
new file mode 100644
index 0000000000..a632197eb5
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Universal.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 2540ee148d..2f9fdabea3 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -316,6 +316,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" />
diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
index 53618b684b..d122d7491c 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
@@ -52,7 +52,7 @@
control_name="mode_selection"
height="20"
layout="topleft"
- left="18"
+ left="0"
top_pad="80"
name="mode_selection"
follows="left|top">
@@ -64,7 +64,7 @@
height="16"
left="0"
value="0"
- width="80" />
+ width="70" />
<radio_item
label="Local"
left_pad="0"
@@ -73,7 +73,16 @@
height="16"
name="local"
value="1"
- width="75" />
+ width="50" />
+ <radio_item
+ label="Bake"
+ left_pad="0"
+ layout="topleft"
+ top_delta="0"
+ height="16"
+ name="bake"
+ value="2"
+ width="50" />
</radio_group>
<!-- -->
@@ -83,7 +92,7 @@
follows="left|top"
height="14"
layout="topleft"
- left_delta="-12"
+ left_delta="12"
name="unknown"
top_pad="4">
Size: [DIMENSIONS]
@@ -225,7 +234,80 @@
<column name="unit_name" label="Name" dynamicwidth="true" />
<column name="unit_id_HIDDEN" label="ID" width="0" />
</scroll_list>
-
+
+<!-- middle: bake mode -->
+ <combo_box
+ left="180"
+ top="30"
+ height="19"
+ top_delta="15"
+ layout="topleft"
+ follows="left|top"
+ name="l_bake_use_texture_combo_box"
+ tool_tip="Choose the bake texture"
+ width="118"
+ visible="false">
+ <combo_box.item
+ label="None"
+ name="None"
+ value="-1" />
+ <combo_box.item
+ label="BAKED_HEAD"
+ name="BAKED_HEAD"
+ value="0" />
+ <combo_box.item
+ label="BAKED_UPPER"
+ name="BAKED_UPPER"
+ value="1" />
+ <combo_box.item
+ label="BAKED_LOWER"
+ name="BAKED_LOWER"
+ value="2" />
+ <combo_box.item
+ label="BAKED_EYES"
+ name="BAKED_EYES"
+ value="3" />
+ <combo_box.item
+ label="BAKED_SKIRT"
+ name="BAKED_SKIRT"
+ value="4" />
+ <combo_box.item
+ label="BAKED_HAIR"
+ name="BAKED_HAIR"
+ value="5" />
+ <combo_box.item
+ label="BAKED_LEFTARM"
+ name="BAKED_LEFTARM"
+ value="6" />
+ <combo_box.item
+ label="BAKED_LEFTLEG"
+ name="BAKED_LEFTLEG"
+ value="7" />
+ <combo_box.item
+ label="BAKED_AUX1"
+ name="BAKED_AUX1"
+ value="8" />
+ <combo_box.item
+ label="BAKED_AUX2"
+ name="BAKED_AUX2"
+ value="9" />
+ <combo_box.item
+ label="BAKED_AUX3"
+ name="BAKED_AUX3"
+ value="10" />
+ </combo_box>
+ <check_box
+ follows="left|top"
+ height="20"
+ initial_value="false"
+ label="Hide Base Mesh Region"
+ layout="topleft"
+ name="hide_base_mesh_region"
+ left_delta="0"
+ top_pad="10"
+ top_delta="0"
+ width="120"
+ visible="false"/>
<!-- bottom static -->
<button
follows="bottom"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 3ea9e77a03..3bdbbb04d7 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -268,6 +268,14 @@
parameter="tattoo" />
</menu_item_call>
<menu_item_call
+ label="New Universal"
+ layout="topleft"
+ name="New Universal">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="universal" />
+ </menu_item_call>
+ <menu_item_call
label="New Physics"
layout="topleft"
name="New Physics">
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
index afeb1bf226..29724b0270 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml
@@ -194,6 +194,14 @@
function="Inventory.DoCreate"
parameter="tattoo" />
</menu_item_call>
+ <menu_item_call
+ label="New Universal"
+ layout="topleft"
+ name="New Universal">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="universal" />
+ </menu_item_call>
<menu_item_call
label="New Physics"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index 7faa4f3d71..61cb74f230 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -175,6 +175,14 @@
function="Gear.Create"
parameter="tattoo" />
</menu_item_call>
+ <menu_item_call
+ label="New Universal"
+ layout="topleft"
+ name="New Universal">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="universal" />
+ </menu_item_call>
</menu>
<menu
height="85"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index cac84cfccf..f2ee9c6447 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1507,8 +1507,7 @@
</menu_item_call>
<menu_item_call
label="Set UI Size to Default"
- name="Set UI Size to Default"
- shortcut="control|alt|shift|R">
+ name="Set UI Size to Default" shortcut="control|alt|shift|R">
<menu_item_call.on_click
function="View.DefaultUISize" />
</menu_item_call>
@@ -4013,6 +4012,16 @@
parameter="tattoo" />
</menu_item_call>
<menu_item_call
+ label="Universal"
+ name="Universal">
+ <menu_item_call.on_click
+ function="Edit.TakeOff"
+ parameter="tattoo" />
+ <menu_item_call.on_enable
+ function="Edit.EnableTakeOff"
+ parameter="universal" />
+ </menu_item_call>
+ <menu_item_call
label="Physics"
name="Physics">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
index 97f1a1a658..8fa85dce5f 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
@@ -1,85 +1,98 @@
<?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="333" >
- <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="313" >
- <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="333" >
+ <scroll_container
+ color="DkGray2"
+ follows="all"
+ height="400"
+ layout="topleft"
+ left="9"
+ name="avatar_tattoo_scroll"
+ opaque="true"
+ top_pad="10"
+ width="314">
+ <panel
+ border="false"
+ bg_alpha_color="DkGray2"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ follows="all"
+ height="800"
+ left="10"
+ layout="topleft"
+ name="avatar_tattoo_color_panel"
+ top="0"
+ width="313" >
+ <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>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_universal.xml b/indra/newview/skins/default/xui/en/panel_edit_universal.xml
new file mode 100644
index 0000000000..11cabdfe6e
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_edit_universal.xml
@@ -0,0 +1,231 @@
+<?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="333" >
+ <scroll_container
+ color="DkGray2"
+ follows="all"
+ height="380"
+ layout="topleft"
+ left="9"
+ name="avatar_universal_scroll"
+ opaque="true"
+ top_pad="10"
+ width="323">
+ <panel
+ border="false"
+ bg_alpha_color="DkGray2"
+ bg_opaque_color="DkGray2"
+ background_visible="true"
+ background_opaque="true"
+ follows="all"
+ height="800"
+ left="10"
+ layout="topleft"
+ name="avatar_universal_color_panel"
+ top="0"
+ width="313" >
+ <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>
+
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index f34b913218..dc1553e6a3 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -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="333" />
+ <panel
+ filename="panel_edit_universal.xml"
+ follows="all"
+ height="425"
+ layout="topleft"
+ left="0"
+ name="edit_universal_panel"
+ top="8"
+ visible="false"
+ width="333" />
<panel
filename="panel_edit_physics.xml"
follows="all"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 1c5e51d2c8..148effb01d 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2209,6 +2209,7 @@ For AI Character: Get the closest navigable point to the point provided.
<string name="skirt">Skirt</string>
<string name="alpha">Alpha</string>
<string name="tattoo">Tattoo</string>
+ <string name="universal">Universal</string>
<string name="physics">Physics</string>
<string name="invalid">invalid</string>
<string name="none">none</string>
@@ -2225,6 +2226,7 @@ For AI Character: Get the closest navigable point to the point provided.
<string name="skirt_not_worn">Skirt not worn</string>
<string name="alpha_not_worn">Alpha not worn</string>
<string name="tattoo_not_worn">Tattoo not worn</string>
+ <string name="universal_not_worn">Universal not worn</string>
<string name="physics_not_worn">Physics not worn</string>
<string name="invalid_not_worn">invalid</string>
@@ -2244,6 +2246,7 @@ For AI Character: Get the closest navigable point to the point provided.
<string name="create_new_skirt">Create new skirt</string>
<string name="create_new_alpha">Create new alpha</string>
<string name="create_new_tattoo">Create new tattoo</string>
+ <string name="create_new_universal">Create new universal</string>
<string name="create_new_physics">Create new physics</string>
<string name="create_new_invalid">invalid</string>
@@ -3809,6 +3812,7 @@ Abuse Report</string>
<string name="New Skirt">New Skirt</string>
<string name="New Alpha">New Alpha</string>
<string name="New Tattoo">New Tattoo</string>
+ <string name="New Universal">New Universal</string>
<string name="New Physics">New Physics</string>
<string name="Invalid Wearable">Invalid Wearable</string>
<string name="New Gesture">New Gesture</string>