From 963945b3ab258ea445e1d9757fc5a89ce397ff7b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 25 Sep 2018 16:39:26 +0100 Subject: [PATCH 1/2] SL-1291 - fixed some issues with selection highlighting of objects rezzed while in build mode. Not clear whether this addresses the original issue, which isn't reproing --- indra/newview/llcontrolavatar.cpp | 2 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerobject.cpp | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 96cdb7f01d..0efed8ab7c 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -508,7 +508,7 @@ void LLControlAvatar::updateAnimations() if (!mPlaying) { mPlaying = true; - if (!mRootVolp->isAnySelected()) + //if (!mRootVolp->isAnySelected()) { updateVolumeGeom(); mRootVolp->recursiveMarkForUpdate(TRUE); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index dc11bc28e5..b74c5b9b8a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4049,7 +4049,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) if (!avatarp->mPlaying) { avatarp->mPlaying = true; - if (!avatarp->mRootVolp->isAnySelected()) + //if (!avatarp->mRootVolp->isAnySelected()) { avatarp->updateVolumeGeom(); avatarp->mRootVolp->recursiveMarkForUpdate(TRUE); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index f963f8a0c8..dcd09f66c7 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3015,6 +3015,10 @@ void LLViewerObject::updateControlAvatar() if (getControlAvatar()) { getControlAvatar()->updateAnimations(); + if (isSelected()) + { + LLSelectMgr::getInstance()->pauseAssociatedAvatars(); + } } } @@ -3040,7 +3044,7 @@ void LLViewerObject::linkControlAvatar() if (!cav->mPlaying) { cav->mPlaying = true; - if (!cav->mRootVolp->isAnySelected()) + //if (!cav->mRootVolp->isAnySelected()) { cav->updateVolumeGeom(); cav->mRootVolp->recursiveMarkForUpdate(TRUE); From 4d4255c27b45ed5e32fe7c4870e2ce3ed10cb140 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 27 Sep 2018 19:34:41 +0100 Subject: [PATCH 2/2] SL-1350 - keep control avatar rotation synced to corresponding root drawable --- indra/newview/llcontrolavatar.cpp | 11 ++++++++++- indra/newview/lldrawable.cpp | 5 ++++- indra/newview/llvoavatar.cpp | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 0efed8ab7c..a620f2abe9 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -175,7 +175,16 @@ void LLControlAvatar::matchVolumeTransform() // complexity info and such line up better. Should defer // this until avatars also get fixed. - LLQuaternion obj_rot = mRootVolp->getRotation(); + LLQuaternion obj_rot; + if (mRootVolp->mDrawable) + { + obj_rot = mRootVolp->mDrawable->getRotation(); + } + else + { + obj_rot = mRootVolp->getRotation(); + } + LLMatrix3 bind_mat; LLQuaternion bind_rot; diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 55db721ccf..8c6cbc020b 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -52,7 +52,6 @@ #include "llviewerwindow.h" #include "llvocache.h" #include "llcontrolavatar.h" -#include "llcallstack.h" #include "lldrawpoolavatar.h" const F32 MIN_INTERPOLATE_DISTANCE_SQUARED = 0.001f * 0.001f; @@ -730,6 +729,10 @@ F32 LLDrawable::updateXform(BOOL undamped) mXform.setRotation(target_rot); mXform.setScale(LLVector3(1,1,1)); //no scale in drawable transforms (IT'S A RULE!) mXform.updateMatrix(); + if (isRoot() && mVObjp->isAnimatedObject() && mVObjp->getControlAvatar()) + { + mVObjp->getControlAvatar()->matchVolumeTransform(); + } if (mSpatialBridge) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index dba99c7e98..1f72aed5b4 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4168,7 +4168,8 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w LLControlAvatar *cav = dynamic_cast(this); if (cav) { - cav->matchVolumeTransform(); + // SL-1350: Moved to LLDrawable::updateXform() + //cav->matchVolumeTransform(); } else {