merge
commit
73abaaddd6
|
|
@ -208,7 +208,12 @@ BOOL LLFloaterAnimPreview::postBuild()
|
|||
|
||||
mPlayButton = getChild<LLButton>( "play_btn");
|
||||
mPlayButton->setClickedCallback(onBtnPlay, this);
|
||||
mPlayButton->setVisible(true);
|
||||
|
||||
mPauseButton = getChild<LLButton>( "pause_btn");
|
||||
mPauseButton->setClickedCallback(onBtnPause, this);
|
||||
mPauseButton->setVisible(false);
|
||||
|
||||
mStopButton = getChild<LLButton>( "stop_btn");
|
||||
mStopButton->setClickedCallback(onBtnStop, this);
|
||||
|
||||
|
|
@ -560,24 +565,60 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data)
|
|||
if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
|
||||
{
|
||||
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
|
||||
|
||||
|
||||
if(!avatarp->isMotionActive(previewp->mMotionID))
|
||||
{
|
||||
previewp->resetMotion();
|
||||
previewp->mPauseRequest = NULL;
|
||||
previewp->mPauseButton->setVisible(TRUE);
|
||||
previewp->mPauseButton->setEnabled(TRUE);
|
||||
previewp->mPlayButton->setVisible(FALSE);
|
||||
previewp->mPlayButton->setEnabled(FALSE);
|
||||
}
|
||||
else
|
||||
else if (avatarp->areAnimationsPaused())
|
||||
{
|
||||
if (avatarp->areAnimationsPaused())
|
||||
{
|
||||
previewp->mPauseRequest = NULL;
|
||||
}
|
||||
else
|
||||
|
||||
previewp->mPauseRequest = NULL;
|
||||
previewp->mPauseButton->setVisible(TRUE);
|
||||
previewp->mPauseButton->setEnabled(TRUE);
|
||||
previewp->mPlayButton->setVisible(FALSE);
|
||||
previewp->mPlayButton->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// onBtnPause()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLFloaterAnimPreview::onBtnPause(void* user_data)
|
||||
{
|
||||
LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
|
||||
if (!previewp->getEnabled())
|
||||
return;
|
||||
|
||||
if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
|
||||
{
|
||||
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
|
||||
|
||||
if(avatarp->isMotionActive(previewp->mMotionID))
|
||||
{
|
||||
if (!avatarp->areAnimationsPaused())
|
||||
{
|
||||
previewp->mPauseRequest = avatarp->requestPause();
|
||||
|
||||
previewp->mPlayButton->setVisible(TRUE);
|
||||
previewp->mPlayButton->setEnabled(TRUE);
|
||||
previewp->mPauseButton->setVisible(FALSE);
|
||||
previewp->mPauseButton->setEnabled(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -595,6 +636,10 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data)
|
|||
previewp->resetMotion();
|
||||
previewp->mPauseRequest = avatarp->requestPause();
|
||||
}
|
||||
previewp->mPlayButton->setVisible(TRUE);
|
||||
previewp->mPlayButton->setEnabled(TRUE);
|
||||
previewp->mPauseButton->setVisible(FALSE);
|
||||
previewp->mPauseButton->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -912,43 +957,38 @@ void LLFloaterAnimPreview::refresh()
|
|||
{
|
||||
childShow("bad_animation_text");
|
||||
mPlayButton->setEnabled(FALSE);
|
||||
mPlayButton->setVisible(TRUE);
|
||||
mPauseButton->setVisible(FALSE);
|
||||
mStopButton->setEnabled(FALSE);
|
||||
childDisable("ok_btn");
|
||||
}
|
||||
else
|
||||
{
|
||||
childHide("bad_animation_text");
|
||||
mPlayButton->setEnabled(TRUE);
|
||||
LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
|
||||
if (avatarp->isMotionActive(mMotionID))
|
||||
{
|
||||
mStopButton->setEnabled(TRUE);
|
||||
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID);
|
||||
if (avatarp->areAnimationsPaused())
|
||||
{
|
||||
|
||||
mPlayButton->setImages(std::string("button_anim_play.tga"),
|
||||
std::string("button_anim_play_selected.tga"));
|
||||
|
||||
}
|
||||
else
|
||||
if (!avatarp->areAnimationsPaused())
|
||||
{
|
||||
if (motionp)
|
||||
{
|
||||
F32 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration();
|
||||
childSetValue("playback_slider", fraction_complete);
|
||||
}
|
||||
mPlayButton->setImages(std::string("button_anim_pause.tga"),
|
||||
std::string("button_anim_pause_selected.tga"));
|
||||
|
||||
|
||||
mPlayButton->setVisible(FALSE);
|
||||
mPauseButton->setVisible(TRUE);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mPauseRequest = avatarp->requestPause();
|
||||
mPlayButton->setImages(std::string("button_anim_play.tga"),
|
||||
std::string("button_anim_play_selected.tga"));
|
||||
|
||||
//mPlayButton->setVisible(TRUE);
|
||||
//mPlayButton->setEnabled(TRUE);
|
||||
mStopButton->setEnabled(TRUE); // stop also resets, leave enabled.
|
||||
}
|
||||
childEnable("ok_btn");
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ public:
|
|||
void refresh();
|
||||
|
||||
static void onBtnPlay(void*);
|
||||
static void onBtnPause(void*);
|
||||
static void onBtnStop(void*);
|
||||
static void onSliderMove(LLUICtrl*, void*);
|
||||
static void onCommitBaseAnim(LLUICtrl*, void*);
|
||||
|
|
@ -119,6 +120,7 @@ protected:
|
|||
S32 mLastMouseX;
|
||||
S32 mLastMouseY;
|
||||
LLButton* mPlayButton;
|
||||
LLButton* mPauseButton;
|
||||
LLButton* mStopButton;
|
||||
LLRect mPreviewRect;
|
||||
LLRectf mPreviewImageRect;
|
||||
|
|
|
|||
|
|
@ -5753,8 +5753,19 @@ void LLSelectMgr::redo()
|
|||
//-----------------------------------------------------------------------------
|
||||
BOOL LLSelectMgr::canDoDelete() const
|
||||
{
|
||||
bool can_delete = false;
|
||||
LLViewerObject* obj = const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() ; // HACK: casting away constness - MG
|
||||
// Note: Can only delete root objects (see getFirstDeleteableObject() for more info)
|
||||
return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() != NULL; // HACK: casting away constness - MG
|
||||
if (obj!= NULL)
|
||||
{
|
||||
// all the faces needs to be selected
|
||||
if(const_cast<LLSelectMgr*>(this)->mSelectedObjects->contains(obj,SELECT_ALL_TES ))
|
||||
{
|
||||
can_delete = true;
|
||||
}
|
||||
}
|
||||
|
||||
return can_delete;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -2309,6 +2309,12 @@ class LLObjectEnableReportAbuse : public view_listener_t
|
|||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
bool new_value = LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 0;
|
||||
/* // all the faces needs to be selected
|
||||
if(LLSelectMgr::getInstance()->getSelection()->contains(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(),SELECT_ALL_TES ))
|
||||
{
|
||||
new_value = true;
|
||||
}
|
||||
*/
|
||||
return new_value;
|
||||
}
|
||||
};
|
||||
|
|
@ -2697,6 +2703,7 @@ BOOL enable_has_attachments(void*)
|
|||
bool enable_object_mute()
|
||||
{
|
||||
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
|
||||
bool new_value = (object != NULL);
|
||||
if (new_value)
|
||||
{
|
||||
|
|
@ -2709,6 +2716,19 @@ bool enable_object_mute()
|
|||
BOOL is_self = avatar->isSelf();
|
||||
new_value = !is_linden && !is_self;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES ))
|
||||
{
|
||||
new_value = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_value = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return new_value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -456,26 +456,43 @@ Maximum animation length is [MAX_LENGTH] seconds.
|
|||
image_overlay="Play_Over"
|
||||
image_unselected="SegmentedBtn_Left_Off"
|
||||
image_selected="SegmentedBtn_Left_On_Selected"
|
||||
image_disabled_selected="SegmentedBtn_Left_Selected_Disabled"
|
||||
image_disabled="SegmentedBtn_Left_Disabled"
|
||||
image_pressed="SegmentedBtn_Left_Press"
|
||||
image_pressed_selected="SegmentedBtn_Left_Selected_Press"
|
||||
image_disabled_selected="SegmentedBtn_Left_Selected_Disabled"
|
||||
image_disabled="SegmentedBtn_Left_Disabled"
|
||||
image_pressed="SegmentedBtn_Left_Press"
|
||||
image_pressed_selected="SegmentedBtn_Left_Selected_Press"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="play_btn"
|
||||
tool_tip="Play/pause your animation"
|
||||
tool_tip="Play your animation"
|
||||
top_pad="0"
|
||||
width="23" />
|
||||
<button
|
||||
visible = "false"
|
||||
follows="top|right"
|
||||
height="23"
|
||||
image_overlay="Pause_Over"
|
||||
image_unselected="SegmentedBtn_Left_Off"
|
||||
image_selected="SegmentedBtn_Left_On_Selected"
|
||||
image_disabled_selected="SegmentedBtn_Left_Selected_Disabled"
|
||||
image_disabled="SegmentedBtn_Left_Disabled"
|
||||
image_pressed="SegmentedBtn_Left_Press"
|
||||
image_pressed_selected="SegmentedBtn_Left_Selected_Press"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="pause_btn"
|
||||
tool_tip="Pause your animation"
|
||||
top_pad="-23"
|
||||
width="23" />
|
||||
<button
|
||||
follows="top|right"
|
||||
height="23"
|
||||
image_overlay="StopReload_Over"
|
||||
image_unselected="SegmentedBtn_Right_Off"
|
||||
image_selected="SegmentedBtn_Right_On_Selected"
|
||||
image_disabled_selected="SegmentedBtn_Right_Selected_Disabled"
|
||||
image_disabled="SegmentedBtn_Right_Disabled"
|
||||
image_pressed="SegmentedBtn_Right_Press"
|
||||
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
|
||||
image_disabled_selected="SegmentedBtn_Right_Selected_Disabled"
|
||||
image_disabled="SegmentedBtn_Right_Disabled"
|
||||
image_pressed="SegmentedBtn_Right_Press"
|
||||
image_pressed_selected="SegmentedBtn_Right_Selected_Press"
|
||||
layout="topleft"
|
||||
name="stop_btn"
|
||||
tool_tip="Stop animation playback"
|
||||
|
|
@ -508,7 +525,7 @@ Maximum animation length is [MAX_LENGTH] seconds.
|
|||
We recommend BVH files exported from Poser 4.
|
||||
</text>
|
||||
<button
|
||||
top="580"
|
||||
top="580"
|
||||
follows="bottom|left"
|
||||
height="23"
|
||||
label="Upload (L$[AMOUNT])"
|
||||
|
|
@ -517,7 +534,7 @@ We recommend BVH files exported from Poser 4.
|
|||
name="ok_btn"
|
||||
width="128" />
|
||||
<button
|
||||
top="580"
|
||||
top="580"
|
||||
follows="bottom|left"
|
||||
height="23"
|
||||
label="Cancel"
|
||||
|
|
|
|||
Loading…
Reference in New Issue