diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-09-27 15:14:27 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-09-27 15:14:27 +0300 |
commit | c205c1d1835c34fe952e08f1e2a190109c195bd9 (patch) | |
tree | 84e8f62e0299f5837dbaee93dc05290e0d446a65 /indra/newview/llviewermenu.cpp | |
parent | f3a43c74f9e5aae506814af2460507b6879a9bd5 (diff) |
SL-16085 FIXED "Reset skeleton and animation" isn't reset the animation on the avatar without selecting part of the avatar
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ba90becb60..8b1d7b5e15 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6267,6 +6267,24 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t } }; +class LLAvatarResetSelfSkeletonAndAnimations : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); + if (avatar) + { + avatar->resetSkeleton(true); + } + else + { + gAgentAvatarp->resetSkeleton(true); + } + return true; + } +}; + + class LLAvatarAddContact : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9368,6 +9386,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton"); view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton"); view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations"); + view_listener_t::addMenu(new LLAvatarResetSelfSkeletonAndAnimations(), "Avatar.ResetSelfSkeletonAndAnimations"); enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible)); commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL"))); |