From c355fb98d3f4040196b7b8586dc9328fccb906d2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 3 Sep 2012 06:12:50 +0000 Subject: Extracted texture baking system into llappearance library. --- indra/newview/lldriverparam.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview/lldriverparam.cpp') diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index 885cae1737..0ae9acd1af 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -32,7 +32,7 @@ #include "llvoavatar.h" #include "llvoavatarself.h" #include "llagent.h" -#include "llwearable.h" +#include "llviewerwearable.h" #include "llagentwearables.h" //----------------------------------------------------------------------------- @@ -623,10 +623,19 @@ F32 LLDriverParam::getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake) { + bool use_self = false; if(isAgentAvatarValid() && - mWearablep && - driven->mParam->getCrossWearable() && - mWearablep->isOnTop()) + mWearablep && + driven->mParam->getCrossWearable()) + { + LLViewerWearable* wearable = dynamic_cast (mWearablep); + if (!wearable->isOnTop()) + { + use_self = false; + } + } + + if (use_self) { // call setWeight through LLVOAvatarSelf so other wearables can be updated with the correct values gAgentAvatarp->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake ); -- cgit v1.2.3