summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-09-27 15:14:27 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-09-27 15:14:27 +0300
commitc205c1d1835c34fe952e08f1e2a190109c195bd9 (patch)
tree84e8f62e0299f5837dbaee93dc05290e0d446a65 /indra
parentf3a43c74f9e5aae506814af2460507b6879a9bd5 (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')
-rw-r--r--indra/newview/llviewermenu.cpp19
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml2
2 files changed, 20 insertions, 1 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")));
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 6ddaa99f78..0a92bfe2b7 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -471,7 +471,7 @@
layout="topleft"
name="Reset Skeleton And Animations">
<menu_item_call.on_click
- function="Avatar.ResetSkeletonAndAnimations" />
+ function="Avatar.ResetSelfSkeletonAndAnimations" />
</menu_item_call>
<menu_item_call
label="Attachment scripts..."