summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-10-17 23:12:52 +0000
committerDon Kjer <don@lindenlab.com>2012-10-17 23:12:52 +0000
commita32dbd314809e7d0093745f0bbcb3628320f8c5e (patch)
treef08973b9250835a7ef6fa61a90dfb43a2a30e183 /indra
parent98e2488f6fd64eb428fcc8f659cb7f0d82196449 (diff)
parent2390e21a9d2fc6f5cabe132a2bbd807aec186cfa (diff)
automated merge
Diffstat (limited to 'indra')
-rwxr-xr-x[-rw-r--r--]indra/llappearance/llavatarappearance.cpp4
-rwxr-xr-xindra/llappearance/lldriverparam.cpp1
-rwxr-xr-xindra/llappearance/lltexlayerparams.cpp1
-rwxr-xr-xindra/llappearance/llwearable.cpp6
-rwxr-xr-xindra/llappearance/llwearabledata.cpp2
-rwxr-xr-x[-rw-r--r--]indra/llcharacter/llcharacter.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llcharacter/llvisualparam.cpp20
-rwxr-xr-x[-rw-r--r--]indra/llcharacter/llvisualparam.h12
-rwxr-xr-xindra/newview/llviewerwearable.cpp5
-rwxr-xr-xindra/newview/llvoavatar.cpp13
-rwxr-xr-xindra/newview/llvoavatarself.cpp7
11 files changed, 66 insertions, 5 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index bdd2d75822..3c01a00e61 100644..100755
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -903,6 +903,7 @@ BOOL LLAvatarAppearance::loadAvatar()
if (driver_param->setInfo(info))
{
addVisualParam( driver_param );
+ driver_param->setParamLocation(isSelf() ? LOC_AV_SELF : LOC_AV_OTHER);
LLVisualParam*(LLAvatarAppearance::*avatar_function)(S32)const = &LLAvatarAppearance::getVisualParam;
if( !driver_param->linkDrivenParams(boost::bind(avatar_function,(LLAvatarAppearance*)this,_1 ), false))
{
@@ -981,6 +982,7 @@ BOOL LLAvatarAppearance::loadSkeletonNode ()
else
{
addVisualParam(param);
+ param->setParamLocation(isSelf() ? LOC_AV_SELF : LOC_AV_OTHER);
}
}
}
@@ -1098,10 +1100,12 @@ BOOL LLAvatarAppearance::loadMeshNodes()
if (info_pair->second)
{
addSharedVisualParam(param);
+ param->setParamLocation(isSelf() ? LOC_AV_SELF : LOC_AV_OTHER);
}
else
{
addVisualParam(param);
+ param->setParamLocation(isSelf() ? LOC_AV_SELF : LOC_AV_OTHER);
}
}
}
diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp
index 2d91ebdee9..01184a9e23 100755
--- a/indra/llappearance/lldriverparam.cpp
+++ b/indra/llappearance/lldriverparam.cpp
@@ -481,6 +481,7 @@ BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross
if (!found)
{
LLViewerVisualParam* param = (LLViewerVisualParam*)mapper(driven_id);
+ if (param) param->setParamLocation(this->getParamLocation());
bool push = param && (!only_cross_params || param->getCrossWearable());
if (push)
{
diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp
index 58737f7ff4..64b3b62185 100755
--- a/indra/llappearance/lltexlayerparams.cpp
+++ b/indra/llappearance/lltexlayerparams.cpp
@@ -67,6 +67,7 @@ BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appeara
if (add_to_appearance)
{
mAvatarAppearance->addVisualParam( this);
+ this->setParamLocation(mAvatarAppearance->isSelf() ? LOC_AV_SELF : LOC_AV_OTHER);
}
return TRUE;
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index 5d53d1ae39..b33adb254d 100755
--- a/indra/llappearance/llwearable.cpp
+++ b/indra/llappearance/llwearable.cpp
@@ -128,7 +128,10 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp)
{
if (param->getWearableType() == mType)
{
- addVisualParam(param->cloneParam(this));
+ LLVisualParam *clone_param = param->cloneParam(this);
+ clone_param->setParamLocation(LOC_UNKNOWN);
+ clone_param->setParamLocation(LOC_WEARABLE);
+ addVisualParam(clone_param);
}
}
@@ -629,6 +632,7 @@ void LLWearable::addVisualParam(LLVisualParam *param)
delete mVisualParamIndexMap[param->getID()];
}
param->setIsDummy(FALSE);
+ param->setParamLocation(LOC_WEARABLE);
mVisualParamIndexMap[param->getID()] = param;
mSavedVisualParamMap[param->getID()] = param->getDefaultWeight();
}
diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp
index 401b1dc192..68fdcca782 100755
--- a/indra/llappearance/llwearabledata.cpp
+++ b/indra/llappearance/llwearabledata.cpp
@@ -120,10 +120,12 @@ void LLWearableData::wearableUpdated(LLWearable *wearable, BOOL removed)
{
wearable->setUpdated();
// FIXME DRANO avoid updating params via wearables when rendering server-baked appearance.
+#if 0
if (mAvatarAppearance->isUsingServerBakes() && !mAvatarAppearance->isUsingLocalAppearance())
{
return;
}
+#endif
if (!removed)
{
pullCrossWearableValues(wearable->getType());
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 85cf1cd3f5..85cf1cd3f5 100644..100755
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp
index 255f61b1b3..826f76bae0 100644..100755
--- a/indra/llcharacter/llvisualparam.cpp
+++ b/indra/llcharacter/llvisualparam.cpp
@@ -168,7 +168,8 @@ LLVisualParam::LLVisualParam()
mIsAnimating( FALSE ),
mID( -1 ),
mInfo( 0 ),
- mIsDummy(FALSE)
+ mIsDummy(FALSE),
+ mParamLocation(LOC_UNKNOWN)
{
}
@@ -320,3 +321,20 @@ void LLVisualParam::resetDrivenParams()
// nothing to do for non-driver parameters
return;
}
+
+void LLVisualParam::setParamLocation(EParamLocation loc)
+{
+ if (mParamLocation == LOC_UNKNOWN || loc == LOC_UNKNOWN)
+ {
+ mParamLocation = loc;
+ }
+ else if (mParamLocation == loc)
+ {
+ // no action
+ }
+ else
+ {
+ llwarns << "param location is already " << mParamLocation << ", not slamming to " << loc << llendl;
+ }
+}
+
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 694e27f371..8345990f47 100644..100755
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -50,6 +50,14 @@ enum EVisualParamGroup
NUM_VISUAL_PARAM_GROUPS
};
+enum EParamLocation
+{
+ LOC_UNKNOWN,
+ LOC_AV_SELF,
+ LOC_AV_OTHER,
+ LOC_WEARABLE
+};
+
const S32 MAX_TRANSMITTED_VISUAL_PARAMS = 255;
//-----------------------------------------------------------------------------
@@ -149,6 +157,9 @@ public:
void setIsDummy(BOOL is_dummy) { mIsDummy = is_dummy; }
+ void setParamLocation(EParamLocation loc);
+ EParamLocation getParamLocation() const { return mParamLocation; }
+
protected:
F32 mCurWeight; // current weight
F32 mLastWeight; // last weight
@@ -160,6 +171,7 @@ protected:
S32 mID; // id for storing weight/morphtarget compares compactly
LLVisualParamInfo *mInfo;
+ EParamLocation mParamLocation; // where does this visual param live?
};
#endif // LL_LLVisualParam_H
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index 1200f65b6e..4477893063 100755
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -320,6 +320,7 @@ void LLViewerWearable::writeToAvatar(LLAvatarAppearance *avatarp)
if (!viewer_avatar->isValid()) return;
+#if 0
// FIXME DRANO - kludgy way to avoid overwriting avatar state from wearables.
// Ideally would avoid calling this func in the first place.
if (viewer_avatar->isUsingServerBakes() &&
@@ -327,6 +328,7 @@ void LLViewerWearable::writeToAvatar(LLAvatarAppearance *avatarp)
{
return;
}
+#endif
ESex old_sex = avatarp->getSex();
@@ -476,10 +478,13 @@ void LLViewerWearable::setItemID(const LLUUID& item_id)
void LLViewerWearable::revertValues()
{
+#if 0
+ // DRANO avoid overwrite when not in local appearance
if (isAgentAvatarValid() && gAgentAvatarp->isUsingServerBakes() && !gAgentAvatarp->isUsingLocalAppearance())
{
return;
}
+#endif
LLWearable::revertValues();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3d4573903f..a49ecc0127 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1792,6 +1792,7 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid)
const std::string url = getImageURL(te,uuid);
if (!url.empty())
{
+ llinfos << "texture URL " << url << llendl;
return setTETextureCore(te, uuid, url);
}
@@ -6305,8 +6306,16 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
type_string = "param_morph";
if (dynamic_cast<LLPolySkeletalDistortion*>(viewer_param))
type_string = "param_skeleton";
- apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" value=\"%.3f\"/ type=\"%s\">\n",
- viewer_param->getID(), viewer_param->getName().c_str(), value, type_string.c_str());
+ S32 wtype = -1;
+ LLViewerVisualParam *vparam = dynamic_cast<LLViewerVisualParam*>(viewer_param);
+ if (vparam)
+ {
+ wtype = vparam->getWearableType();
+ }
+ S32 u8_value = F32_to_U8(value,viewer_param->getMinWeight(),viewer_param->getMaxWeight());
+ apr_file_printf(file, "\t\t<param id=\"%d\" name=\"%s\" value=\"%.3f\" u8=\"%d\" type=\"%s\" wearable=\"%s\"/>\n",
+ viewer_param->getID(), viewer_param->getName().c_str(), value, u8_value, type_string.c_str(),
+ LLWearableType::getTypeName(LLWearableType::EType(wtype)).c_str());
}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index e4fb1ebf88..a01188d7dc 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -664,12 +664,13 @@ BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight
return FALSE;
}
+#if 0
// FIXME DRANO - kludgy way to avoid overwriting avatar state from wearables.
if (isUsingServerBakes() && !isUsingLocalAppearance())
{
return FALSE;
}
-
+#endif
if (param->getCrossWearable())
{
@@ -2654,7 +2655,11 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch)
gAgentCamera.changeCameraToCustomizeAvatar();
}
+#if 0
gAgentAvatarp->clearVisualParamWeights();
+ gAgentAvatarp->idleUpdateAppearanceAnimation();
+#endif
+
gAgentAvatarp->invalidateAll();
gAgentAvatarp->updateMeshTextures();
}