summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llagentwearables.cpp2
-rw-r--r--indra/newview/lldriverparam.cpp33
-rw-r--r--indra/newview/lldriverparam.h3
-rw-r--r--indra/newview/llviewervisualparam.h1
-rw-r--r--indra/newview/llvoavatarself.cpp1
-rw-r--r--indra/newview/llwearable.cpp24
-rw-r--r--indra/newview/llwearable.h3
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_place_profile.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml2
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml4
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_item_info.xml2
12 files changed, 72 insertions, 9 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index acbf02678c..7cbd7e46a9 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -761,6 +761,8 @@ void LLAgentWearables::wearableUpdated(LLWearable *wearable)
wearable->refreshName();
wearable->setLabelUpdated();
+ wearable->pullCrossWearableValues();
+
// Hack pt 2. If the wearable we just loaded has definition version 24,
// then force a re-save of this wearable after slamming the version number to 22.
// This number was incorrectly incremented for internal builds before release, and
diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp
index 3961afe9af..8ebfa471f3 100644
--- a/indra/newview/lldriverparam.cpp
+++ b/indra/newview/lldriverparam.cpp
@@ -39,6 +39,7 @@
#include "llvoavatarself.h"
#include "llagent.h"
#include "llwearable.h"
+#include "llagentwearables.h"
//-----------------------------------------------------------------------------
// LLDriverParamInfo
@@ -528,6 +529,38 @@ void LLDriverParam::resetDrivenParams()
mDriven.reserve(getInfo()->mDrivenInfoList.size());
}
+void LLDriverParam::updateCrossDrivenParams(EWearableType driven_type)
+{
+ bool needs_update = (getWearableType()==driven_type);
+
+ // if the driver has a driven entry for the passed-in wearable type, we need to refresh the value
+ for( entry_list_t::iterator iter = mDriven.begin(); iter != mDriven.end(); iter++ )
+ {
+ LLDrivenEntry* driven = &(*iter);
+ if (driven && driven->mParam && driven->mParam->getCrossWearable() && driven->mParam->getWearableType() == driven_type)
+ {
+ needs_update = true;
+ }
+ }
+
+
+ if (needs_update)
+ {
+ EWearableType driver_type = (EWearableType)getWearableType();
+
+ // If we've gotten here, we've added a new wearable of type "type"
+ // Thus this wearable needs to get updates from the driver wearable.
+ // The call to setVisualParamWeight seems redundant, but is necessary
+ // as the number of driven wearables has changed since the last update. -Nyx
+ LLWearable *wearable = gAgentWearables.getTopWearable(driver_type);
+ if (wearable)
+ {
+ wearable->setVisualParamWeight(mID, wearable->getVisualParamWeight(mID), false);
+ }
+ }
+}
+
+
//-----------------------------------------------------------------------------
// getDrivenWeight()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index 4e2daf5ba7..e963a2d55a 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -34,6 +34,7 @@
#define LL_LLDRIVERPARAM_H
#include "llviewervisualparam.h"
+#include "llwearabledictionary.h"
class LLVOAvatar;
class LLWearable;
@@ -93,6 +94,7 @@ public:
void setWearable(LLWearable *wearablep);
void setAvatar(LLVOAvatar *avatarp);
+ void updateCrossDrivenParams(EWearableType driven_type);
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
@@ -112,6 +114,7 @@ public:
/*virtual*/ LLVector3 getVertexDistortion(S32 index, LLPolyMesh *poly_mesh);
/*virtual*/ const LLVector3* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh);
/*virtual*/ const LLVector3* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh);
+
protected:
F32 getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight);
void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake);
diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h
index 3550a46fbf..1a3975eb99 100644
--- a/indra/newview/llviewervisualparam.h
+++ b/indra/newview/llviewervisualparam.h
@@ -111,6 +111,7 @@ public:
F32 getSimpleMax() const { return getInfo()->mSimpleMax; }
BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
+
};
#endif // LL_LLViewerVisualParam_H
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index ecd6b05ded..b1ea8a1bbb 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1966,6 +1966,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
// Don't know if this is needed
updateMeshTextures();
+
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index d093031bea..acfbc23f62 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -625,7 +625,9 @@ void LLWearable::writeToAvatar()
// Pull params
for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() )
{
- if( (((LLViewerVisualParam*)param)->getWearableType() == mType) )
+ // cross-wearable parameters are not authoritative, as they are driven by a different wearable. So don't copy the values to the
+ // avatar object if cross wearable. Cross wearable params get their values from the avatar, they shouldn't write the other way.
+ if( (((LLViewerVisualParam*)param)->getWearableType() == mType) && (!((LLViewerVisualParam*)param)->getCrossWearable()) )
{
S32 param_id = param->getID();
F32 weight = getVisualParamWeight(param_id);
@@ -1085,6 +1087,26 @@ void LLWearable::destroyTextures()
mSavedTEMap.clear();
}
+void LLWearable::pullCrossWearableValues()
+{
+ // scan through all of the avatar's visual parameters
+ LLVOAvatar* avatar = gAgent.getAvatarObject();
+ for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam();
+ param;
+ param = (LLViewerVisualParam*) avatar->getNextVisualParam())
+ {
+ if( param )
+ {
+ LLDriverParam *driver_param = dynamic_cast<LLDriverParam*>(param);
+ if(driver_param)
+ {
+ // parameter is a driver parameter, have it update its
+ driver_param->updateCrossDrivenParams(getType());
+ }
+ }
+ }
+}
+
void LLWearable::setLabelUpdated() const
{
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index dae983bcf3..7bd5305079 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -128,6 +128,7 @@ public:
void revertValues();
void saveValues();
+ void pullCrossWearableValues();
BOOL isOnTop() const;
@@ -145,7 +146,7 @@ private:
void createLayers(S32 te);
void createVisualParams();
void syncImages(te_map_t &src, te_map_t &dst);
- void destroyTextures();
+ void destroyTextures();
static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml.
S32 mDefinitionVersion; // Depends on the state of the avatar_lad.xml when this asset was created.
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index 396699ad6c..d1b22a34bb 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -71,7 +71,7 @@
layout="topleft"
left_pad="10"
name="title"
- text_color="white"
+ text_color="LtGray"
top="0"
use_ellipses="true"
value="Place Profile"
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index 7ac771de27..94c9b2de01 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -29,7 +29,7 @@
value="Place Profile" />
<string
name="title_teleport_history"
- value="Teleport History Location" />
+ value="Teleport History" />
<string
name="not_available"
value="(N\A)" />
@@ -156,7 +156,7 @@
layout="topleft"
left_pad="10"
name="title"
- text_color="white"
+ text_color="LtGray"
top="0"
use_ellipses="true"
value="Place Profile"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
index f5396951ca..607de65c5c 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml
@@ -35,7 +35,7 @@
layout="topleft"
left_pad="10"
name="user_name"
- text_color="white"
+ text_color="LtGray"
top="0"
value="(Loading...)"
use_ellipses="true"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index fab1f11273..bde45a9487 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -46,10 +46,10 @@ width="333">
top="0"
width="30" />
<text
- font="SansSerifHuge"
+ font="SansSerifHugeBold"
height="20"
left_pad="5"
- text_color="white"
+ text_color="LtGray"
top="3"
use_ellipses="true"
width="305"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index e18f59ab64..18b59741bf 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -50,7 +50,7 @@
width="23" />
<text
follows="top|left|right"
- font="SansSerifHuge"
+ font="SansSerifHugeBold"
height="26"
layout="topleft"
left_pad="10"