diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-09-07 18:13:12 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-09-07 18:13:12 +0300 |
commit | e057efb599e78d268d64657bff82a51e46265ca2 (patch) | |
tree | 72ce0a499bd1173631b2fdb80ce35d9e490207d3 /indra | |
parent | 3f072ceca06d134727cb1d4ee04779816a5c9604 (diff) |
MAINT-2047 FIXED Avatar follows the object only once if change object's location in Edit mode
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelobject.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 2 |
3 files changed, 13 insertions, 10 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 5dd44b4444..0bf4d48421 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1712,7 +1712,7 @@ void LLPanelObject::sendPosition(BOOL btn_down) if (mObject->isRootEdit()) { // only offset by parent's translation - mObject->resetChildrenPosition(LLVector3(-delta), TRUE) ; + mObject->resetChildrenPosition(LLVector3(-delta), TRUE, TRUE) ; } if(!btn_down) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1d6daed9cc..978a398986 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6216,7 +6216,7 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vector<LLQuater } //counter-translation -void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified) +void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplified, BOOL skip_avatar_child) { if(mChildList.empty()) { @@ -6246,6 +6246,7 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif iter != mChildList.end(); iter++) { LLViewerObject* childp = *iter; + if (!childp->isSelected() && childp->mDrawable.notNull()) { if (childp->getPCode() != LL_PCODE_LEGACY_AVATAR) @@ -6255,14 +6256,16 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif } else //avatar { - LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ; + if(!skip_avatar_child) + { + LLVector3 reset_pos = ((LLVOAvatar*)childp)->mDrawable->mXform.getPosition() + child_offset ; - ((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos); - ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos); - - LLManip::rebuild(childp); - } - } + ((LLVOAvatar*)childp)->mDrawable->mXform.setPosition(reset_pos); + ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos); + LLManip::rebuild(childp); + } + } + } } return ; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 24fcf0517e..7a490f6957 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -575,7 +575,7 @@ public: public: //counter-translation - void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE) ; + void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE, BOOL skip_avatar_child = FALSE) ; //counter-rotation void resetChildrenRotationAndPosition(const std::vector<LLQuaternion>& rotations, const std::vector<LLVector3>& positions) ; |