Merge branch 'DRTVWR-521-maint' of https://bitbucket.org/lindenlab/viewer
commit
f7bd33161b
|
|
@ -784,9 +784,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>f7f5a5b5f6cd35da69a86beb9a5dd083</string>
|
||||
<string>b50d355c1c7088cafe5e12d31f1fb07f</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/71404/690443/dullahan-1.7.0.202010291542_81.3.10_gb223419_chromium-81.0.4044.138-darwin64-551434.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/72181/697551/dullahan-1.7.0.202011111255_81.3.10_gb223419_chromium-81.0.4044.138-darwin64-552103.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -796,9 +796,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>550d6a172215282b3941167de62d9154</string>
|
||||
<string>0a52a79ad9a182529f7856f78bf4a96f</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/71408/690463/dullahan-1.7.0.202010292249_81.3.10_gb223419_chromium-81.0.4044.138-windows-551434.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/72199/697588/dullahan-1.7.0.202011112115_81.3.10_gb223419_chromium-81.0.4044.138-windows-552103.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -808,9 +808,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>389bccd9d1205fa2fbb0c2c0407dee76</string>
|
||||
<string>715fe1bad3ba216508648b5763ea0404</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/71403/690437/dullahan-1.7.0.202010292241_81.3.10_gb223419_chromium-81.0.4044.138-windows64-551434.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/72196/697581/dullahan-1.7.0.202011112112_81.3.10_gb223419_chromium-81.0.4044.138-windows64-552103.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
|
|
@ -829,7 +829,7 @@
|
|||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>1.7.0.202010292249_81.3.10_gb223419_chromium-81.0.4044.138</string>
|
||||
<string>1.7.0.202011112112_81.3.10_gb223419_chromium-81.0.4044.138</string>
|
||||
</map>
|
||||
<key>elfio</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node)
|
|||
static LLStdStringHandle wearable_string = LLXmlTree::addAttributeString("wearable");
|
||||
if( node->getFastAttributeString( wearable_string, wearable) )
|
||||
{
|
||||
mWearableType = LLWearableType::typeNameToType( wearable );
|
||||
mWearableType = LLWearableType::getInstance()->typeNameToType( wearable );
|
||||
}
|
||||
|
||||
static LLStdStringHandle edit_group_string = LLXmlTree::addAttributeString("edit_group");
|
||||
|
|
|
|||
|
|
@ -76,17 +76,17 @@ LLWearable::~LLWearable()
|
|||
|
||||
const std::string& LLWearable::getTypeLabel() const
|
||||
{
|
||||
return LLWearableType::getTypeLabel(mType);
|
||||
return LLWearableType::getInstance()->getTypeLabel(mType);
|
||||
}
|
||||
|
||||
const std::string& LLWearable::getTypeName() const
|
||||
{
|
||||
return LLWearableType::getTypeName(mType);
|
||||
return LLWearableType::getInstance()->getTypeName(mType);
|
||||
}
|
||||
|
||||
LLAssetType::EType LLWearable::getAssetType() const
|
||||
{
|
||||
return LLWearableType::getAssetType(mType);
|
||||
return LLWearableType::getInstance()->getAssetType(mType);
|
||||
}
|
||||
|
||||
BOOL LLWearable::exportFile(const std::string& filename) const
|
||||
|
|
|
|||
|
|
@ -241,10 +241,11 @@ BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_fou
|
|||
U32 LLWearableData::getClothingLayerCount() const
|
||||
{
|
||||
U32 count = 0;
|
||||
LLWearableType *wr_inst = LLWearableType::getInstance();
|
||||
for (S32 i = 0; i < LLWearableType::WT_COUNT; i++)
|
||||
{
|
||||
LLWearableType::EType type = (LLWearableType::EType)i;
|
||||
if (LLWearableType::getAssetType(type)==LLAssetType::AT_CLOTHING)
|
||||
if (wr_inst->getAssetType(type)==LLAssetType::AT_CLOTHING)
|
||||
{
|
||||
count += getWearableCount(type);
|
||||
}
|
||||
|
|
@ -254,7 +255,7 @@ U32 LLWearableData::getClothingLayerCount() const
|
|||
|
||||
BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const
|
||||
{
|
||||
LLAssetType::EType a_type = LLWearableType::getAssetType(type);
|
||||
LLAssetType::EType a_type = LLWearableType::getInstance()->getAssetType(type);
|
||||
if (a_type==LLAssetType::AT_CLOTHING)
|
||||
{
|
||||
if (type == LLWearableType::WT_PHYSICS) return (getWearableCount(type) < 1); // <FS:Ansariel> Don't add physics layer
|
||||
|
|
|
|||
|
|
@ -30,162 +30,101 @@
|
|||
#include "llinventorydefines.h"
|
||||
|
||||
|
||||
struct WearableEntry : public LLDictionaryEntry
|
||||
LLWearableType::LLWearableDictionary::LLWearableDictionary(LLTranslationBridge::ptr_t& trans)
|
||||
{
|
||||
WearableEntry(LLWearableType& wtype,
|
||||
const std::string &name,
|
||||
const std::string& default_new_name,
|
||||
LLAssetType::EType assetType,
|
||||
LLInventoryType::EIconName iconName,
|
||||
BOOL disable_camera_switch = FALSE,
|
||||
BOOL allow_multiwear = TRUE) :
|
||||
LLDictionaryEntry(name),
|
||||
mAssetType(assetType),
|
||||
mDefaultNewName(default_new_name),
|
||||
mLabel(wtype.mTrans->getString(name)),
|
||||
mIconName(iconName),
|
||||
mDisableCameraSwitch(disable_camera_switch),
|
||||
mAllowMultiwear(allow_multiwear)
|
||||
{
|
||||
|
||||
}
|
||||
const LLAssetType::EType mAssetType;
|
||||
const std::string mLabel;
|
||||
const std::string mDefaultNewName; //keep mLabel for backward compatibility
|
||||
LLInventoryType::EIconName mIconName;
|
||||
BOOL mDisableCameraSwitch;
|
||||
BOOL mAllowMultiwear;
|
||||
};
|
||||
|
||||
class LLWearableDictionary : public LLParamSingleton<LLWearableDictionary>,
|
||||
public LLDictionary<LLWearableType::EType, WearableEntry>
|
||||
{
|
||||
LLSINGLETON(LLWearableDictionary, LLWearableType&);
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
protected:
|
||||
// The default implementation asserts on 'notFound()' and returns -1 which isn't a valid EWearableType
|
||||
virtual LLWearableType::EType notFound() const { return LLWearableType::WT_INVALID; }
|
||||
// [/RLVa:KB]
|
||||
};
|
||||
|
||||
LLWearableDictionary::LLWearableDictionary(LLWearableType& wtype)
|
||||
{
|
||||
addEntry(LLWearableType::WT_SHAPE, new WearableEntry(wtype, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SKIN, new WearableEntry(wtype, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_HAIR, new WearableEntry(wtype, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_EYES, new WearableEntry(wtype, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SHIRT, new WearableEntry(wtype, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_PANTS, new WearableEntry(wtype, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHOES, new WearableEntry(wtype, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SOCKS, new WearableEntry(wtype, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_JACKET, new WearableEntry(wtype, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_GLOVES, new WearableEntry(wtype, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(wtype, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(wtype, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(wtype, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(wtype, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(wtype, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(wtype, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE));
|
||||
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2011-05-29 (Catznip-2.6)
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(wtype, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE));
|
||||
// [/SL:KB]
|
||||
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(wtype, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
|
||||
// addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
|
||||
|
||||
addEntry(LLWearableType::WT_INVALID, new WearableEntry(wtype, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_NONE, new WearableEntry(wtype, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
}
|
||||
|
||||
|
||||
// class LLWearableType
|
||||
|
||||
LLWearableType::LLWearableType(LLTranslationBridge* trans)
|
||||
LLWearableType::LLWearableType(LLTranslationBridge::ptr_t &trans)
|
||||
: mDictionary(trans)
|
||||
{
|
||||
// LLTranslationBridge exists, but is not ready at this point in time since strings.xml is not yet loaded
|
||||
mTrans = trans;
|
||||
}
|
||||
|
||||
LLWearableType::~LLWearableType()
|
||||
{
|
||||
delete mTrans;
|
||||
}
|
||||
|
||||
void LLWearableType::initSingleton()
|
||||
{
|
||||
// To make sure all wrapping functions will crash without initing LLWearableType;
|
||||
LLWearableDictionary::initParamSingleton(*this);
|
||||
|
||||
// Todo: consider merging LLWearableType and LLWearableDictionary
|
||||
}
|
||||
|
||||
// static
|
||||
LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_name)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const LLWearableType::EType wearable = dict->lookup(type_name);
|
||||
const LLWearableType::EType wearable = mDictionary.lookup(type_name);
|
||||
return wearable;
|
||||
}
|
||||
|
||||
// static
|
||||
const std::string& LLWearableType::getTypeName(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getTypeName(WT_INVALID);
|
||||
return entry->mName;
|
||||
}
|
||||
|
||||
//static
|
||||
const std::string& LLWearableType::getTypeDefaultNewName(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getTypeDefaultNewName(WT_INVALID);
|
||||
return entry->mDefaultNewName;
|
||||
}
|
||||
|
||||
// static
|
||||
const std::string& LLWearableType::getTypeLabel(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getTypeLabel(WT_INVALID);
|
||||
return entry->mLabel;
|
||||
}
|
||||
|
||||
// static
|
||||
LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getAssetType(WT_INVALID);
|
||||
return entry->mAssetType;
|
||||
}
|
||||
|
||||
// static
|
||||
LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return getIconName(WT_INVALID);
|
||||
return entry->mIconName;
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return FALSE;
|
||||
return entry->mDisableCameraSwitch;
|
||||
}
|
||||
|
||||
// static
|
||||
BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
const WearableEntry *entry = mDictionary.lookup(type);
|
||||
if (!entry) return FALSE;
|
||||
return entry->mAllowMultiwear;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,10 +35,9 @@
|
|||
|
||||
class LLWearableType : public LLParamSingleton<LLWearableType>
|
||||
{
|
||||
LLSINGLETON(LLWearableType, LLTranslationBridge* trans);
|
||||
LLSINGLETON(LLWearableType, LLTranslationBridge::ptr_t &trans);
|
||||
~LLWearableType();
|
||||
void initSingleton();
|
||||
friend struct WearableEntry;
|
||||
public:
|
||||
enum EType
|
||||
{
|
||||
|
|
@ -67,20 +66,59 @@ public:
|
|||
|
||||
// Most methods are wrappers for dictionary, but if LLWearableType is not initialized,
|
||||
// they will crash. Whole LLWearableType is just wrapper for convinient calls.
|
||||
static const std::string& getTypeName(EType type);
|
||||
static const std::string& getTypeDefaultNewName(EType type);
|
||||
static const std::string& getTypeLabel(EType type);
|
||||
static LLAssetType::EType getAssetType(EType type);
|
||||
static EType typeNameToType(const std::string& type_name);
|
||||
static LLInventoryType::EIconName getIconName(EType type);
|
||||
static BOOL getDisableCameraSwitch(EType type);
|
||||
static BOOL getAllowMultiwear(EType type);
|
||||
const std::string& getTypeName(EType type);
|
||||
const std::string& getTypeDefaultNewName(EType type);
|
||||
const std::string& getTypeLabel(EType type);
|
||||
LLAssetType::EType getAssetType(EType type);
|
||||
EType typeNameToType(const std::string& type_name);
|
||||
LLInventoryType::EIconName getIconName(EType type);
|
||||
BOOL getDisableCameraSwitch(EType type);
|
||||
BOOL getAllowMultiwear(EType type);
|
||||
|
||||
static EType inventoryFlagsToWearableType(U32 flags);
|
||||
|
||||
protected:
|
||||
private:
|
||||
struct WearableEntry : public LLDictionaryEntry
|
||||
{
|
||||
WearableEntry(LLTranslationBridge::ptr_t& trans,
|
||||
const std::string &name,
|
||||
const std::string& default_new_name,
|
||||
LLAssetType::EType assetType,
|
||||
LLInventoryType::EIconName iconName,
|
||||
BOOL disable_camera_switch = FALSE,
|
||||
BOOL allow_multiwear = TRUE) :
|
||||
LLDictionaryEntry(name),
|
||||
mAssetType(assetType),
|
||||
mDefaultNewName(default_new_name),
|
||||
mLabel(trans->getString(name)),
|
||||
mIconName(iconName),
|
||||
mDisableCameraSwitch(disable_camera_switch),
|
||||
mAllowMultiwear(allow_multiwear)
|
||||
{
|
||||
|
||||
LLTranslationBridge* mTrans;
|
||||
}
|
||||
const LLAssetType::EType mAssetType;
|
||||
const std::string mLabel;
|
||||
const std::string mDefaultNewName; //keep mLabel for backward compatibility
|
||||
LLInventoryType::EIconName mIconName;
|
||||
BOOL mDisableCameraSwitch;
|
||||
BOOL mAllowMultiwear;
|
||||
};
|
||||
|
||||
class LLWearableDictionary : public LLDictionary<LLWearableType::EType, WearableEntry>
|
||||
{
|
||||
public:
|
||||
LLWearableDictionary(LLTranslationBridge::ptr_t& trans);
|
||||
~LLWearableDictionary() {}
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
|
||||
protected:
|
||||
// The default implementation asserts on 'notFound()' and returns -1 which isn't a valid EWearableType
|
||||
virtual LLWearableType::EType notFound() const { return LLWearableType::WT_INVALID; }
|
||||
// [/RLVa:KB]
|
||||
};
|
||||
|
||||
LLWearableDictionary mDictionary;
|
||||
};
|
||||
|
||||
#endif // LL_LLWEARABLETYPE_H
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ const char *SCULPT_DEFAULT_TEXTURE = "be293869-d0d9-0a69-5989-ad27f1946fd4"; //
|
|||
// can't be divided by 2. See DEV-19108
|
||||
const F32 TEXTURE_ROTATION_PACK_FACTOR = ((F32) 0x08000);
|
||||
|
||||
struct material_id_type
|
||||
struct material_id_type // originally from llrendermaterialtable
|
||||
{
|
||||
material_id_type()
|
||||
{
|
||||
|
|
@ -149,7 +149,7 @@ struct material_id_type
|
|||
static const U8 s_null_id[MATERIAL_ID_SIZE];
|
||||
};
|
||||
|
||||
const U8 material_id_type::s_null_id[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
const U8 material_id_type::s_null_id[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
|
||||
//static
|
||||
// LEGACY: by default we use the LLVolumeMgr::gVolumeMgr global
|
||||
|
|
|
|||
|
|
@ -1179,13 +1179,14 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
}
|
||||
|
||||
// updating inventory
|
||||
LLWearableType* wearable_type_inst = LLWearableType::getInstance();
|
||||
|
||||
// TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later
|
||||
// note: shirt is the first non-body part wearable item. Update if wearable order changes.
|
||||
// This loop should remove all clothing, but not any body parts
|
||||
for (S32 j = 0; j < (S32)LLWearableType::WT_COUNT; j++)
|
||||
{
|
||||
if (LLWearableType::getAssetType((LLWearableType::EType)j) == LLAssetType::AT_CLOTHING)
|
||||
if (wearable_type_inst->getAssetType((LLWearableType::EType)j) == LLAssetType::AT_CLOTHING)
|
||||
{
|
||||
removeWearable((LLWearableType::EType)j, true, 0);
|
||||
}
|
||||
|
|
@ -1205,7 +1206,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
new_wearable->setName(new_item->getName());
|
||||
new_wearable->setItemID(new_item->getUUID());
|
||||
|
||||
if (LLWearableType::getAssetType(type) == LLAssetType::AT_BODYPART)
|
||||
if (wearable_type_inst->getAssetType(type) == LLAssetType::AT_BODYPART)
|
||||
{
|
||||
// exactly one wearable per body part
|
||||
setWearable(type,0,new_wearable);
|
||||
|
|
@ -1304,7 +1305,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||
// if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
|
||||
// (old_item_id == new_item->getUUID()))
|
||||
// {
|
||||
// LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL;
|
||||
// LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getInstance()->getTypeName(type) << LL_ENDL;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
|
|
@ -1767,7 +1768,7 @@ void LLAgentWearables::editWearable(const LLUUID& item_id)
|
|||
return;
|
||||
}
|
||||
|
||||
const BOOL disable_camera_switch = LLWearableType::getDisableCameraSwitch(wearable->getType());
|
||||
const BOOL disable_camera_switch = LLWearableType::getInstance()->getDisableCameraSwitch(wearable->getType());
|
||||
LLPanel* panel = LLFloaterSidePanelContainer::getPanel("appearance");
|
||||
LLSidepanelAppearance::editWearable(wearable, panel, disable_camera_switch);
|
||||
}
|
||||
|
|
@ -1905,11 +1906,11 @@ void LLAgentWearables::sendAgentWearablesUpdate()
|
|||
}
|
||||
else
|
||||
{
|
||||
//LL_INFOS() << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << LL_ENDL;
|
||||
//LL_INFOS() << "Not wearing wearable type " << LLWearableType::getInstance()->getTypeName((LLWearableType::EType)i) << LL_ENDL;
|
||||
gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null);
|
||||
}
|
||||
|
||||
LL_DEBUGS() << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << LL_ENDL;
|
||||
LL_DEBUGS() << " " << LLWearableType::getInstance()->getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << LL_ENDL;
|
||||
}
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
|
@ -2007,7 +2008,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
|
|||
}
|
||||
else
|
||||
{
|
||||
LLAssetType::EType asset_type = LLWearableType::getAssetType(type);
|
||||
LLAssetType::EType asset_type = LLWearableType::getInstance()->getAssetType(type);
|
||||
if (asset_type == LLAssetType::AT_NONE)
|
||||
{
|
||||
continue;
|
||||
|
|
@ -2020,7 +2021,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
|
|||
outfit->add(wearable_data);
|
||||
}
|
||||
|
||||
LL_DEBUGS() << " " << LLWearableType::getTypeLabel(type) << LL_ENDL;
|
||||
LL_DEBUGS() << " " << LLWearableType::getInstance()->getTypeLabel(type) << LL_ENDL;
|
||||
}
|
||||
|
||||
// Get the complete information on the items in the inventory and set up an observer
|
||||
|
|
@ -2048,7 +2049,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type,
|
|||
{
|
||||
// Try to recover by replacing missing wearable with a new one.
|
||||
LLNotificationsUtil::add("ReplacedMissingWearable");
|
||||
LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
|
||||
LL_DEBUGS() << "Wearable " << LLWearableType::getInstance()->getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
|
||||
LLViewerWearable* new_wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
|
||||
|
||||
setWearable(type,index,new_wearable);
|
||||
|
|
|
|||
|
|
@ -1046,7 +1046,7 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type
|
|||
|
||||
// Try to recover by replacing missing wearable with a new one.
|
||||
LLNotificationsUtil::add("ReplacedMissingWearable");
|
||||
LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type)
|
||||
LL_DEBUGS() << "Wearable " << LLWearableType::getInstance()->getTypeLabel(type)
|
||||
<< " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL;
|
||||
LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp);
|
||||
|
||||
|
|
@ -2162,7 +2162,7 @@ void LLAppearanceMgr::filterWearableItems(
|
|||
continue;
|
||||
// S32 start_index = llmax(0,size-max_per_type);
|
||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.0)
|
||||
S32 start_index = llmax(0, size - ((LLWearableType::getAllowMultiwear((LLWearableType::EType)i)) ? max_per_type : 1));
|
||||
S32 start_index = llmax(0, size - ((LLWearableType::getInstance()->getAllowMultiwear((LLWearableType::EType)i)) ? max_per_type : 1));
|
||||
// [/SL:KB[
|
||||
for (S32 j = start_index; j<size; j++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -867,14 +867,10 @@ bool LLAppViewer::init()
|
|||
// Start of the application
|
||||
//
|
||||
|
||||
// <FS:Ansariel> Move further down after translation system has been initialized
|
||||
//// initialize LLWearableType translation bridge.
|
||||
//// Memory will be cleaned up in ::cleanupClass()
|
||||
//LLWearableType::initParamSingleton(new LLUITranslationBridge());
|
||||
|
||||
// <FS:Ansariel> Move further down after translation system has been initialized
|
||||
//LLTranslationBridge::ptr_t trans = std::make_shared<LLUITranslationBridge>();
|
||||
//LLSettingsType::initClass(trans);
|
||||
// </FS:Ansariel>
|
||||
// </FS:Ansariel>
|
||||
|
||||
// initialize SSE options
|
||||
LLVector4a::initClass();
|
||||
|
|
@ -977,9 +973,16 @@ bool LLAppViewer::init()
|
|||
// </FS>
|
||||
init_default_trans_args();
|
||||
|
||||
// inits from settings.xml and from strings.xml
|
||||
if (!initConfiguration())
|
||||
return false;
|
||||
|
||||
// initialize LLWearableType translation bridge.
|
||||
// Will immediately use LLTranslationBridge to init LLWearableDictionary
|
||||
// <FS:Ansariel> Move further down after translation system has been initialized
|
||||
//LLWearableType::initParamSingleton(trans);
|
||||
// </FS:Ansariel>
|
||||
|
||||
LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
|
||||
//set the max heap size.
|
||||
initMaxHeapSize() ;
|
||||
|
|
@ -1050,10 +1053,9 @@ bool LLAppViewer::init()
|
|||
|
||||
// <FS:Ansariel> Moved down here translation system has been initialized
|
||||
// initialize LLWearableType translation bridge.
|
||||
// Memory will be cleaned up in ::cleanupClass()
|
||||
LLWearableType::initParamSingleton(new LLUITranslationBridge());
|
||||
|
||||
// Will immediately use LLTranslationBridge to init LLWearableDictionary
|
||||
LLTranslationBridge::ptr_t trans = std::make_shared<LLUITranslationBridge>();
|
||||
LLWearableType::initParamSingleton(trans);
|
||||
LLSettingsType::initParamSingleton(trans);
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ protected:
|
|||
}
|
||||
|
||||
// Set proper label for the "Create new <WEARABLE_TYPE>" menu item.
|
||||
std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
|
||||
std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getInstance()->getTypeName(w_type));
|
||||
menu_item->setLabel(new_label);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ void LLFloaterLinkReplace::onStartClicked()
|
|||
else
|
||||
{
|
||||
LLSD args;
|
||||
args["TYPE"] = LLWearableType::getTypeName(source_item->getWearableType());
|
||||
args["TYPE"] = LLWearableType::getInstance()->getTypeName(source_item->getWearableType());
|
||||
params.substitutions(args);
|
||||
LLNotifications::instance().add(params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7611,7 +7611,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
if (LLWearableType::getAllowMultiwear(mWearableType))
|
||||
if (LLWearableType::getInstance()->getAllowMultiwear(mWearableType))
|
||||
{
|
||||
items.push_back(std::string("Wearable Add"));
|
||||
if (!gAgentWearables.canAddWearable(mWearableType))
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ const std::string& LLInventoryIcon::getIconName(LLInventoryType::EIconName idx)
|
|||
LLInventoryType::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag)
|
||||
{
|
||||
const LLWearableType::EType wearable_type = LLWearableType::inventoryFlagsToWearableType(misc_flag);
|
||||
return LLWearableType::getIconName(wearable_type);
|
||||
return LLWearableType::getInstance()->getIconName(wearable_type);
|
||||
}
|
||||
|
||||
LLInventoryType::EIconName LLInventoryIcon::assignSettingsIcon(U32 misc_flag)
|
||||
|
|
|
|||
|
|
@ -896,7 +896,7 @@ void LLOutfitGalleryContextMenu::onOutfitsRemovalConfirmation(const LLSD& notifi
|
|||
|
||||
void LLOutfitGalleryContextMenu::onCreate(const LLSD& data)
|
||||
{
|
||||
LLWearableType::EType type = LLWearableType::typeNameToType(data.asString());
|
||||
LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(data.asString());
|
||||
if (type == LLWearableType::WT_NONE)
|
||||
{
|
||||
LL_WARNS() << "Invalid wearable type" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -1353,7 +1353,7 @@ void LLOutfitListGearMenuBase::onRename()
|
|||
|
||||
void LLOutfitListGearMenuBase::onCreate(const LLSD& data)
|
||||
{
|
||||
LLWearableType::EType type = LLWearableType::typeNameToType(data.asString());
|
||||
LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(data.asString());
|
||||
if (type == LLWearableType::WT_NONE)
|
||||
{
|
||||
LL_WARNS() << "Invalid wearable type" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -1403,7 +1403,7 @@ void LLPanelEditWearable::changeCamera(U8 subpart)
|
|||
{
|
||||
// Don't change the camera if this type doesn't have a camera switch.
|
||||
// Useful for wearables like physics that don't have an associated physical body part.
|
||||
if (LLWearableType::getDisableCameraSwitch(mWearablePtr->getType()))
|
||||
if (LLWearableType::getInstance()->getDisableCameraSwitch(mWearablePtr->getType()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ void LLPanelGroupCreate::refreshCreatedGroup(const LLUUID& group_id)
|
|||
}
|
||||
// </FS:Ansariel>
|
||||
LLStatusBar::sendMoneyBalanceRequest();
|
||||
|
||||
}
|
||||
|
||||
void LLPanelGroupCreate::addMembershipRow(const std::string &name)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ std::string LLShopURLDispatcher::resolveURL(LLWearableType::EType wearable_type,
|
|||
{
|
||||
const std::string prefix = "MarketplaceURL";
|
||||
const std::string sex_str = (sex == SEX_MALE) ? "Male" : "Female";
|
||||
const std::string type_str = LLWearableType::getTypeName(wearable_type);
|
||||
const std::string type_str = LLWearableType::getInstance()->getTypeName(wearable_type);
|
||||
|
||||
std::string setting_name = prefix;
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ public:
|
|||
private:
|
||||
static void onCreate(const LLSD& param)
|
||||
{
|
||||
LLWearableType::EType type = LLWearableType::typeNameToType(param.asString());
|
||||
LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(param.asString());
|
||||
if (type == LLWearableType::WT_NONE)
|
||||
{
|
||||
LL_WARNS() << "Invalid wearable type" << LL_ENDL;
|
||||
|
|
@ -192,19 +192,20 @@ private:
|
|||
{
|
||||
LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
|
||||
LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE);
|
||||
LLWearableType * wearable_type_inst = LLWearableType::getInstance();
|
||||
|
||||
for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
|
||||
{
|
||||
LLWearableType::EType type = (LLWearableType::EType) i;
|
||||
const std::string& type_name = LLWearableType::getTypeName(type);
|
||||
const std::string& type_name = wearable_type_inst->getTypeName(type);
|
||||
|
||||
LLMenuItemCallGL::Params p;
|
||||
p.name = type_name;
|
||||
p.label = LLTrans::getString(LLWearableType::getTypeDefaultNewName(type));
|
||||
p.label = LLTrans::getString(wearable_type_inst->getTypeDefaultNewName(type));
|
||||
p.on_click.function_name = "Wearable.Create";
|
||||
p.on_click.parameter = LLSD(type_name);
|
||||
|
||||
LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;
|
||||
LLView* parent = wearable_type_inst->getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp;
|
||||
LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
|
|||
// when editing its physics.
|
||||
if (!gAgentCamera.cameraCustomizeAvatar())
|
||||
{
|
||||
LLVOAvatarSelf::onCustomizeStart(LLWearableType::getDisableCameraSwitch(wearable_ptr->getType()));
|
||||
LLVOAvatarSelf::onCustomizeStart(LLWearableType::getInstance()->getDisableCameraSwitch(wearable_ptr->getType()));
|
||||
}
|
||||
if (is_wearable_edit_visible)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2125,7 +2125,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge,
|
|||
else
|
||||
{
|
||||
// Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary.
|
||||
LLWearableType::EType wearable_type = LLWearableType::typeNameToType(type_name);
|
||||
LLWearableType::EType wearable_type = LLWearableType::getInstance()->typeNameToType(type_name);
|
||||
if (wearable_type >= LLWearableType::WT_SHAPE && wearable_type < LLWearableType::WT_COUNT)
|
||||
{
|
||||
const LLUUID parent_id = bridge ? bridge->getUUID() : LLUUID::null;
|
||||
|
|
|
|||
|
|
@ -10691,7 +10691,7 @@ class LLEditEnableTakeOff : public view_listener_t
|
|||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
std::string clothing = userdata.asString();
|
||||
LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
|
||||
LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(clothing);
|
||||
// if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT)
|
||||
// [RLVa:KB] - Checked: 2010-03-20 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
|
||||
// NOTE: see below - enable if there is at least one wearable on this type that can be removed
|
||||
|
|
@ -10725,7 +10725,7 @@ class LLEditTakeOff : public view_listener_t
|
|||
LLAppearanceMgr::instance().removeAllClothesFromAvatar();
|
||||
else
|
||||
{
|
||||
LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
|
||||
LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(clothing);
|
||||
if (type >= LLWearableType::WT_SHAPE
|
||||
&& type < LLWearableType::WT_COUNT
|
||||
&& (gAgentWearables.getWearableCount(type) > 0))
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ void LLViewerWearable::saveNewAsset() const
|
|||
void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
|
||||
{
|
||||
LLWearableSaveData* data = (LLWearableSaveData*)userdata;
|
||||
const std::string& type_name = LLWearableType::getTypeName(data->mType);
|
||||
const std::string& type_name = LLWearableType::getInstance()->getTypeName(data->mType);
|
||||
if(0 == status)
|
||||
{
|
||||
// Success
|
||||
|
|
@ -614,7 +614,7 @@ void LLViewerWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void*
|
|||
|
||||
std::ostream& operator<<(std::ostream &s, const LLViewerWearable &w)
|
||||
{
|
||||
s << "wearable " << LLWearableType::getTypeName(w.mType) << "\n";
|
||||
s << "wearable " << LLWearableType::getInstance()->getTypeName(w.mType) << "\n";
|
||||
s << " Name: " << w.mName << "\n";
|
||||
s << " Desc: " << w.mDescription << "\n";
|
||||
//w.mPermissions
|
||||
|
|
|
|||
|
|
@ -9692,7 +9692,7 @@ void dump_visual_param(LLAPRFile::tFiletype* file, LLVisualParam* viewer_param,
|
|||
S32 u8_value = F32_to_U8(value,viewer_param->getMinWeight(),viewer_param->getMaxWeight());
|
||||
apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" display=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\" group=\"%d\"/>\n",
|
||||
viewer_param->getID(), viewer_param->getName().c_str(), viewer_param->getDisplayName().c_str(), value, u8_value, type_string.c_str(),
|
||||
LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str(),
|
||||
LLWearableType::getInstance()->getTypeName(LLWearableType::EType(wtype)).c_str(),
|
||||
viewer_param->getGroup());
|
||||
}
|
||||
|
||||
|
|
@ -10539,6 +10539,7 @@ void LLVOAvatar::dumpArchetypeXMLCallback(const std::vector<std::string>& filena
|
|||
{
|
||||
// </FS:CR>
|
||||
LLAPRFile outfile;
|
||||
LLWearableType *wr_inst = LLWearableType::getInstance();
|
||||
// <FS:CR> FIRE-8893 - Dump archetype xml to user defined location
|
||||
//std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
|
||||
std::string fullpath = filenames[0];
|
||||
|
|
@ -10562,7 +10563,7 @@ void LLVOAvatar::dumpArchetypeXMLCallback(const std::vector<std::string>& filena
|
|||
{
|
||||
for (S32 type = LLWearableType::WT_SHAPE; type < LLWearableType::WT_COUNT; type++)
|
||||
{
|
||||
const std::string& wearable_name = LLWearableType::getTypeName((LLWearableType::EType)type);
|
||||
const std::string& wearable_name = wr_inst->getTypeName((LLWearableType::EType)type);
|
||||
apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() );
|
||||
|
||||
for (LLVisualParam* param = getFirstVisualParam(); param; param = getNextVisualParam())
|
||||
|
|
|
|||
|
|
@ -2596,6 +2596,7 @@ void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, BOOL fini
|
|||
const std::string LLVOAvatarSelf::verboseDebugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const
|
||||
{
|
||||
std::ostringstream outbuf;
|
||||
LLWearableType *wr_inst = LLWearableType::getInstance();
|
||||
for (LLAvatarAppearanceDictionary::BakedTextures::const_iterator baked_iter =
|
||||
LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().begin();
|
||||
baked_iter != LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().end();
|
||||
|
|
@ -2619,7 +2620,7 @@ const std::string LLVOAvatarSelf::verboseDebugDumpLocalTextureDataInfo(const LLV
|
|||
{
|
||||
for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
|
||||
{
|
||||
outbuf << " " << LLWearableType::getTypeName(wearable_type) << " " << wearable_index << ":";
|
||||
outbuf << " " << wr_inst->getTypeName(wearable_type) << " " << wearable_index << ":";
|
||||
const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(tex_index, wearable_index);
|
||||
if (local_tex_obj)
|
||||
{
|
||||
|
|
@ -2674,6 +2675,7 @@ void LLVOAvatarSelf::dumpAllTextures() const
|
|||
const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const
|
||||
{
|
||||
std::string text="";
|
||||
LLWearableType *wr_inst = LLWearableType::getInstance();
|
||||
|
||||
text = llformat("[Final:%d Avail:%d] ",isLocalTextureDataFinal(layerset), isLocalTextureDataAvailable(layerset));
|
||||
|
||||
|
|
@ -2697,7 +2699,7 @@ const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLViewerTe
|
|||
const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
|
||||
if (wearable_count > 0)
|
||||
{
|
||||
text += LLWearableType::getTypeName(wearable_type) + ":";
|
||||
text += wr_inst->getTypeName(wearable_type) + ":";
|
||||
for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
|
||||
{
|
||||
const U32 discard_level = getLocalDiscardLevel(tex_index, wearable_index);
|
||||
|
|
@ -3464,9 +3466,10 @@ void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
|
|||
apr_file_printf( file, "\n<wearable_info>\n" );
|
||||
|
||||
LLWearableData *wd = getWearableData();
|
||||
LLWearableType *wr_inst = LLWearableType::getInstance();
|
||||
for (S32 type = 0; type < LLWearableType::WT_COUNT; type++)
|
||||
{
|
||||
const std::string& type_name = LLWearableType::getTypeName((LLWearableType::EType)type);
|
||||
const std::string& type_name = wr_inst->getTypeName((LLWearableType::EType)type);
|
||||
for (U32 j=0; j< wd->getWearableCount((LLWearableType::EType)type); j++)
|
||||
{
|
||||
LLViewerWearable *wearable = gAgentWearables.getViewerWearable((LLWearableType::EType)type,j);
|
||||
|
|
|
|||
|
|
@ -1207,7 +1207,7 @@ void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu)
|
|||
if (!item || !item->isWearableType()) return;
|
||||
|
||||
LLWearableType::EType w_type = item->getWearableType();
|
||||
std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getTypeName(w_type));
|
||||
std::string new_label = LLTrans::getString("create_new_" + LLWearableType::getInstance()->getTypeName(w_type));
|
||||
|
||||
LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new");
|
||||
menu_item->setLabel(new_label);
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@ LLViewerWearable* LLWearableList::createNewWearable( LLWearableType::EType type,
|
|||
LLViewerWearable *wearable = generateNewWearable();
|
||||
wearable->setType( type, avatarp );
|
||||
|
||||
std::string name = LLTrans::getString( LLWearableType::getTypeDefaultNewName(wearable->getType()) );
|
||||
// LLWearableType has pre-translated getTypeLabel(), but it uses default translation
|
||||
std::string name = LLTrans::getString( LLWearableType::getInstance()->getTypeDefaultNewName(wearable->getType()) );
|
||||
wearable->setName( name );
|
||||
|
||||
LLPermissions perm;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ std::string rlvGetItemName(const LLViewerInventoryItem* pItem)
|
|||
{
|
||||
if ( (pItem) && ((LLAssetType::AT_BODYPART == pItem->getType()) || (LLAssetType::AT_CLOTHING == pItem->getType())) )
|
||||
{
|
||||
return llformat("%s (%s)", pItem->getName().c_str(), LLWearableType::getTypeName(pItem->getWearableType()).c_str());
|
||||
return llformat("%s (%s)", pItem->getName().c_str(), LLWearableType::getInstance()->getTypeName(pItem->getWearableType()).c_str());
|
||||
}
|
||||
else if ( (pItem) && (LLAssetType::AT_OBJECT == pItem->getType()) && (isAgentAvatarValid()) )
|
||||
{
|
||||
|
|
@ -191,7 +191,7 @@ std::string rlvFolderLockSourceToTarget(RlvFolderLocks::folderlock_source_t lock
|
|||
}
|
||||
case RlvFolderLocks::ST_WEARABLETYPE:
|
||||
{
|
||||
const std::string& strTypeName = LLWearableType::getTypeName(boost::get<LLWearableType::EType>(lockSource.second));
|
||||
const std::string& strTypeName = LLWearableType::getInstance()->getTypeName(boost::get<LLWearableType::EType>(lockSource.second));
|
||||
return llformat("Wearable type (%s)", strTypeName.c_str());
|
||||
}
|
||||
default:
|
||||
|
|
@ -530,7 +530,7 @@ void RlvFloaterLocks::refreshAll()
|
|||
for (RlvWearableLocks::rlv_wearabletypelock_map_t::const_iterator itWearableType = wearableTypeAdd.begin();
|
||||
itWearableType != wearableTypeAdd.end(); ++itWearableType)
|
||||
{
|
||||
sdColumns[2]["value"] = LLWearableType::getTypeLabel(itWearableType->first);
|
||||
sdColumns[2]["value"] = LLWearableType::getInstance()->getTypeLabel(itWearableType->first);
|
||||
sdColumns[3]["value"] = rlvGetItemNameFromObjID(itWearableType->second);
|
||||
|
||||
pLockList->addElement(sdRow, ADD_BOTTOM);
|
||||
|
|
@ -541,7 +541,7 @@ void RlvFloaterLocks::refreshAll()
|
|||
for (RlvWearableLocks::rlv_wearabletypelock_map_t::const_iterator itWearableType = wearableTypeRem.begin();
|
||||
itWearableType != wearableTypeRem.end(); ++itWearableType)
|
||||
{
|
||||
sdColumns[2]["value"] = LLWearableType::getTypeName(itWearableType->first);
|
||||
sdColumns[2]["value"] = LLWearableType::getInstance()->getTypeName(itWearableType->first);
|
||||
sdColumns[3]["value"] = rlvGetItemNameFromObjID(itWearableType->second);
|
||||
|
||||
pLockList->addElement(sdRow, ADD_BOTTOM);
|
||||
|
|
|
|||
|
|
@ -3750,7 +3750,7 @@ ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strRep
|
|||
|
||||
// (Compatibility: RLV-1.16.1 will execute @getoutfit=<channel> if <layer> is invalid while we just return failure)
|
||||
LLWearableType::EType wtType = LLWearableType::WT_INVALID;
|
||||
if ( (rlvCmd.hasOption()) && ((wtType = LLWearableType::typeNameToType(rlvCmd.getOption())) == LLWearableType::WT_INVALID) )
|
||||
if ( (rlvCmd.hasOption()) && ((wtType = LLWearableType::getInstance()->typeNameToType(rlvCmd.getOption())) == LLWearableType::WT_INVALID) )
|
||||
return RLV_RET_FAILED_OPTION;
|
||||
|
||||
const LLWearableType::EType wtRlvTypes[] =
|
||||
|
|
@ -3770,7 +3770,7 @@ ERlvCmdRet RlvHandler::onGetOutfit(const RlvCommand& rlvCmd, std::string& strRep
|
|||
// (nor do we hide a layer if the issuing object is the only one that has this layer locked)
|
||||
bool fWorn = (gAgentWearables.getWearableCount(wtRlvTypes[idxType]) > 0) &&
|
||||
( (!RlvSettings::getHideLockedLayers()) ||
|
||||
(LLAssetType::AT_BODYPART == LLWearableType::getAssetType(wtRlvTypes[idxType])) ||
|
||||
(LLAssetType::AT_BODYPART == LLWearableType::getInstance()->getAssetType(wtRlvTypes[idxType])) ||
|
||||
(RlvForceWear::isForceRemovable(wtRlvTypes[idxType], true, rlvCmd.getObjectID())) );
|
||||
strReply.push_back( (fWorn) ? '1' : '0' );
|
||||
}
|
||||
|
|
@ -3811,7 +3811,7 @@ ERlvCmdRet RlvHandler::onGetOutfitNames(const RlvCommand& rlvCmd, std::string& s
|
|||
{
|
||||
if (!strReply.empty())
|
||||
strReply.push_back(',');
|
||||
strReply.append(LLWearableType::getTypeName(wtType));
|
||||
strReply.append(LLWearableType::getInstance()->getTypeName(wtType));
|
||||
}
|
||||
}
|
||||
return RLV_RET_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ bool RlvCommandOptionHelper::parseOption<float>(const std::string& strOption, fl
|
|||
template<>
|
||||
bool RlvCommandOptionHelper::parseOption<LLWearableType::EType>(const std::string& strOption, LLWearableType::EType& wtOption)
|
||||
{
|
||||
wtOption = LLWearableType::typeNameToType(strOption);
|
||||
wtOption = LLWearableType::getInstance()->typeNameToType(strOption);
|
||||
return (LLWearableType::WT_INVALID != wtOption) && (LLWearableType::WT_NONE != wtOption);
|
||||
}
|
||||
|
||||
|
|
@ -1783,13 +1783,13 @@ void RlvBehaviourNotifyHandler::sendNotification(const std::string& strText, con
|
|||
// Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
|
||||
void RlvBehaviourNotifyHandler::onWear(LLWearableType::EType eType, bool fAllowed)
|
||||
{
|
||||
sendNotification(llformat("worn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getTypeName(eType).c_str()));
|
||||
sendNotification(llformat("worn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getInstance()->getTypeName(eType).c_str()));
|
||||
}
|
||||
|
||||
// Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
|
||||
void RlvBehaviourNotifyHandler::onTakeOff(LLWearableType::EType eType, bool fAllowed)
|
||||
{
|
||||
sendNotification(llformat("unworn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getTypeName(eType).c_str()));
|
||||
sendNotification(llformat("unworn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getInstance()->getTypeName(eType).c_str()));
|
||||
}
|
||||
|
||||
// Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f
|
||||
|
|
|
|||
Loading…
Reference in New Issue