Skip to content
Snippets Groups Projects
Commit c205c1d1 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

SL-16085 FIXED "Reset skeleton and animation" isn't reset the animation on...

SL-16085 FIXED "Reset skeleton and animation"  isn't reset the animation on the avatar without selecting part of the avatar
parent f3a43c74
No related branches found
No related tags found
No related merge requests found
......@@ -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")));
......
......@@ -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..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment