diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 30 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 8 |
2 files changed, 38 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 418c24a25e..135384ab52 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6786,6 +6786,35 @@ class LLAvatarToggleSearch : public view_listener_t } }; +// <FS:CR> Resync Animations +class FSToolsResyncAnimations : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + for (S32 i = 0; i < gObjectList.getNumObjects(); i++) + { + LLViewerObject* object = gObjectList.getObject(i); + if (object && + object->isAvatar()) + { + LLVOAvatar* avatarp = (LLVOAvatar*)object; + if (avatarp) + { + for (LLVOAvatar::AnimIterator anim_it = avatarp->mPlayingAnimations.begin(); + anim_it != avatarp->mPlayingAnimations.end(); + anim_it++) + { + avatarp->stopMotion(anim_it->first, true); + avatarp->startMotion(anim_it->first); + } + } + } + } + return true; + } +}; +// </FS:CR> Resync Animations + class LLAvatarResetSkeleton: public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -10197,6 +10226,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile"); view_listener_t::addMenu(new LLAvatarTogglePicks(), "Avatar.TogglePicks"); view_listener_t::addMenu(new LLAvatarToggleSearch(), "Avatar.ToggleSearch"); + view_listener_t::addMenu(new FSToolsResyncAnimations(), "Tools.ResyncAnimations"); // <FS:CR> Resync Animations view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton"); view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton"); view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 5789b113c1..cd660d7f7a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -647,6 +647,14 @@ name="World" tear_off="true"> <menu_item_call + label="Resync Animations" + name="Resync Animations" + shortcut="control|S"> + <menu_item_call.on_click + function="Tools.ResyncAnimations" /> + </menu_item_call> + <menu_item_separator/> + <menu_item_call label="Landmark This Place" name="Create Landmark Here"> <menu_item_call.on_click |