From 523e0e2dff6af1c5bc12e2aefc0ca9b96bf26fd6 Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Tue, 9 Mar 2010 23:00:38 +0100
Subject: Henri Beauchamp: Port of SG-2.0 alpha and tattoo layers (v6)
slviewer-0-v12350-AlphaAndTattooSupport-patch.zip contains the necessary
avatar_lad.xml and other artwork. The new avatar_lad.xml crashes clients
without alpha and tattoo support at startup.
---
linden/indra/llinventory/llinventory.cpp | 2 +
linden/indra/llinventory/llinventorytype.h | 40 +-
linden/indra/llinventory/llwearabletype.h | 4 +-
linden/indra/llrender/llrender.cpp | 3 +
linden/indra/llrender/llrender.h | 1 +
linden/indra/newview/app_settings/settings.xml | 11 +
linden/indra/newview/llagent.cpp | 8 +-
linden/indra/newview/llfloatercustomize.cpp | 278 +++++++--
linden/indra/newview/llinventoryactions.cpp | 10 +
linden/indra/newview/llinventorybridge.cpp | 12 +
linden/indra/newview/llinventorybridge.h | 4 +
linden/indra/newview/llinventoryview.cpp | 6 +
linden/indra/newview/lltexlayer.cpp | 651 +++++++++++----------
linden/indra/newview/lltexlayer.h | 27 +-
linden/indra/newview/lltexturectrl.cpp | 6 +-
linden/indra/newview/llviewermenu.cpp | 16 +
linden/indra/newview/llvoavatar.cpp | 73 ++-
linden/indra/newview/llvoavatar.h | 6 +-
linden/indra/newview/llvoavatardefines.cpp | 28 +-
linden/indra/newview/llvoavatardefines.h | 11 +-
linden/indra/newview/llwearable.cpp | 6 +
linden/indra/newview/rlvhandler.cpp | 2 +-
.../skins/default/xui/en-us/floater_customize.xml | 168 ++++++
.../skins/default/xui/en-us/floater_inventory.xml | 8 +
.../xui/en-us/floater_new_outfit_dialog.xml | 10 +-
.../skins/default/xui/en-us/menu_inventory.xml | 8 +
26 files changed, 960 insertions(+), 439 deletions(-)
diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp
index 755a57c..1508b46 100644
--- a/linden/indra/llinventory/llinventory.cpp
+++ b/linden/indra/llinventory/llinventory.cpp
@@ -128,6 +128,8 @@ LLInventoryType::NType calc_ntype(
case WT_UNDERSHIRT: return LLInventoryType::NIT_UNDERSHIRT;
case WT_UNDERPANTS: return LLInventoryType::NIT_UNDERPANTS;
case WT_SKIRT: return LLInventoryType::NIT_SKIRT;
+ case WT_ALPHA: return LLInventoryType::NIT_ALPHA;
+ case WT_TATTOO: return LLInventoryType::NIT_TATTOO;
default: return LLInventoryType::NIT_CLOTHING;
}
}
diff --git a/linden/indra/llinventory/llinventorytype.h b/linden/indra/llinventory/llinventorytype.h
index 961fa79..ee429c2 100644
--- a/linden/indra/llinventory/llinventorytype.h
+++ b/linden/indra/llinventory/llinventorytype.h
@@ -115,49 +115,51 @@ public:
NIT_UNDERSHIRT = 1 << 10,
NIT_UNDERPANTS = 1 << 11,
NIT_SKIRT = 1 << 12,
- NIT_CLOTHING = 0x0001ff0,
+ NIT_ALPHA = 1 << 13,
+ NIT_TATTOO = 1 << 14,
+ NIT_CLOTHING = 0x0007ff0,
/* Body Parts | Clothing */
- NIT_WEARABLE = 0x0001fff,
+ NIT_WEARABLE = 0x0007fff,
/* Images */
- NIT_TEXTURE = 1 << 13,
- NIT_SNAPSHOT = 1 << 14,
- NIT_IMAGE = 0x0006000,
+ NIT_TEXTURE = 1 << 15,
+ NIT_SNAPSHOT = 1 << 16,
+ NIT_IMAGE = 0x0018000,
/* Calling Cards */
- NIT_CALLCARD_OFF = 1 << 15,
- NIT_CALLCARD_ON = 1 << 16,
- NIT_CALLCARD = 0x0018000,
+ NIT_CALLCARD_OFF = 1 << 17,
+ NIT_CALLCARD_ON = 1 << 18,
+ NIT_CALLCARD = 0x0060000,
/* Landmarks */
- NIT_LANDMARK_UNUSED = 1 << 17,
- NIT_LANDMARK_USED = 1 << 18,
- NIT_LANDMARK = 0x0060000,
+ NIT_LANDMARK_UNUSED = 1 << 19,
+ NIT_LANDMARK_USED = 1 << 20,
+ NIT_LANDMARK = 0x0180000,
/* Sounds */
- NIT_SOUND = 1 << 19,
+ NIT_SOUND = 1 << 21,
/* Animations */
- NIT_ANIMATION = 1 << 20,
+ NIT_ANIMATION = 1 << 22,
/* Gestures */
- NIT_GESTURE = 1 << 21,
+ NIT_GESTURE = 1 << 23,
/* Notecards */
- NIT_NOTECARD = 1 << 22,
+ NIT_NOTECARD = 1 << 24,
/* Scripts */
- NIT_SCRIPT_LSL2 = 1 << 23,
+ NIT_SCRIPT_LSL2 = 1 << 25,
/* Objects */
- NIT_OBJECT = 1 << 24,
+ NIT_OBJECT = 1 << 26,
/* Folders ("Categories" in the old type system) */
- NIT_FOLDER = 1 << 25,
+ NIT_FOLDER = 1 << 27,
/* Bitwise OR-ing of all the above */
- NIT_ALL = 0x3ffffff,
+ NIT_ALL = 0xfffffff,
};
diff --git a/linden/indra/llinventory/llwearabletype.h b/linden/indra/llinventory/llwearabletype.h
index b0a40b2..7a5ecef 100644
--- a/linden/indra/llinventory/llwearabletype.h
+++ b/linden/indra/llinventory/llwearabletype.h
@@ -47,7 +47,9 @@ enum EWearableType // If you change this, update LLWearable::getTypeName(), get
WT_UNDERSHIRT = 10,
WT_UNDERPANTS = 11,
WT_SKIRT = 12,
- WT_COUNT = 13,
+ WT_ALPHA = 13,
+ WT_TATTOO = 14,
+ WT_COUNT = 15,
WT_INVALID = 255
};
diff --git a/linden/indra/llrender/llrender.cpp b/linden/indra/llrender/llrender.cpp
index 93ff822..b1fe153 100644
--- a/linden/indra/llrender/llrender.cpp
+++ b/linden/indra/llrender/llrender.cpp
@@ -799,6 +799,9 @@ void LLRender::setSceneBlendType(eBlendType type)
case BT_MULT:
glBlendFunc(GL_DST_COLOR, GL_ZERO);
break;
+ case BT_MULT_ALPHA:
+ glBlendFunc(GL_DST_ALPHA, GL_ZERO);
+ break;
case BT_MULT_X2:
glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR);
break;
diff --git a/linden/indra/llrender/llrender.h b/linden/indra/llrender/llrender.h
index ce84e74..da69de8 100644
--- a/linden/indra/llrender/llrender.h
+++ b/linden/indra/llrender/llrender.h
@@ -252,6 +252,7 @@ public:
BT_ADD,
BT_ADD_WITH_ALPHA, // Additive blend modulated by the fragment's alpha.
BT_MULT,
+ BT_MULT_ALPHA,
BT_MULT_X2,
BT_REPLACE
} eBlendType;
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 5043264..670de2b 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -11336,6 +11336,17 @@
Value
5748decc-f629-461c-9a36-a35a221fe21f
+ UIImgDefaultAlphaUUID
+
UIImgDefaultUnderwearUUID