diff options
-rw-r--r-- | indra/newview/llviewermenu.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llvoavatar.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_attachment_other.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_attachment_self.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_avatar_other.xml | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_avatar_self.xml | 6 |
7 files changed, 49 insertions, 3 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e9ee67a929..e5ba1ecb97 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6005,12 +6005,25 @@ class LLAvatarResetSkeleton: public view_listener_t LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) { - avatar->resetSkeleton(); + avatar->resetSkeleton(false); } return true; } }; +class LLAvatarResetSkeletonAndAnimations : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); + if (avatar) + { + avatar->resetSkeleton(true); + } + return true; + } +}; + class LLAvatarAddContact : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9002,6 +9015,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile"); view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton"); + view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeletonAndAnimations"); 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/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cbd941dd40..77a526f518 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1847,7 +1847,7 @@ void LLVOAvatar::resetVisualParams() //----------------------------------------------------------------------------- // resetSkeleton() //----------------------------------------------------------------------------- -void LLVOAvatar::resetSkeleton() +void LLVOAvatar::resetSkeleton(bool reset_animations) { LL_DEBUGS("Avatar") << avString() << " reset starts" << LL_ENDL; if (!mLastProcessedAppearance) @@ -1911,6 +1911,12 @@ void LLVOAvatar::resetSkeleton() // Restore attachment pos overrides rebuildAttachmentOverrides(); + // Animations + if (reset_animations) + { + resetAnimations(); + } + LL_DEBUGS("Avatar") << avString() << " reset ends" << LL_ENDL; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 39b32f1ac5..bd89d4ef23 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -376,7 +376,7 @@ public: void initAttachmentPoints(bool ignore_hud_joints = false); /*virtual*/ void buildCharacter(); void resetVisualParams(); - void resetSkeleton(); + void resetSkeleton(bool reset_animations); LLVector3 mCurRootToHeadOffset; LLVector3 mTargetRootToHeadOffset; diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml index 8771660bcf..2f60bab0b7 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -48,6 +48,13 @@ function="Avatar.ResetSkeleton" /> </menu_item_call> + <menu_item_call label="Reset Skeleton And Animations" + layout="topleft" + name="Reset Skeleton And Animations"> + <menu_item_call.on_click + function="Avatar.ResetSkeletonAndAnimations" /> + </menu_item_call> + <menu_item_separator /> <menu_item_call enabled="false" diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index ced0dd37b1..59faf6a9f5 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -105,6 +105,12 @@ name="Edit Outfit"> <menu_item_call.on_click function="Avatar.ResetSkeleton" /> </menu_item_call> + <menu_item_call label="Reset Skeleton And Animations" + layout="topleft" + name="Reset Skeleton And Animations"> + <menu_item_call.on_click + function="Avatar.ResetSkeletonAndAnimations" /> + </menu_item_call> <menu_item_call label="My Friends" diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index f89c0eadf8..ddfff23410 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -49,6 +49,13 @@ function="Avatar.ResetSkeleton" /> </menu_item_call> + <menu_item_call label="Reset Skeleton And Animations" + layout="topleft" + name="Reset Skeleton And Animations"> + <menu_item_call.on_click + function="Avatar.ResetSkeletonAndAnimations" /> + </menu_item_call> + <menu_item_separator /> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index 924e8b8454..9e181d0b6d 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -243,6 +243,12 @@ <menu_item_call.on_click function="Avatar.ResetSkeleton" /> </menu_item_call> + <menu_item_call label="Reset Skeleton And Animations" + layout="topleft" + name="Reset Skeleton And Animations"> + <menu_item_call.on_click + function="Avatar.ResetSkeletonAndAnimations" /> + </menu_item_call> <menu_item_call label="My Friends" layout="topleft" |