MAINT-6915 - option for Reset Skeleton And Animations.
parent
204e474225
commit
a6d9323c72
|
|
@ -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")));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue