#include <llfloateranimpreview.h>
Definition at line 70 of file llfloateranimpreview.h.
LLFloaterAnimPreview::LLFloaterAnimPreview | ( | const char * | filename | ) |
Definition at line 82 of file llfloateranimpreview.cpp.
References ANIM_AGENT_EXPRESS_AFRAID, ANIM_AGENT_EXPRESS_ANGER, ANIM_AGENT_EXPRESS_BORED, ANIM_AGENT_EXPRESS_CRY, ANIM_AGENT_EXPRESS_DISDAIN, ANIM_AGENT_EXPRESS_EMBARRASSED, ANIM_AGENT_EXPRESS_FROWN, ANIM_AGENT_EXPRESS_KISS, ANIM_AGENT_EXPRESS_LAUGH, ANIM_AGENT_EXPRESS_OPEN_MOUTH, ANIM_AGENT_EXPRESS_REPULSED, ANIM_AGENT_EXPRESS_SAD, ANIM_AGENT_EXPRESS_SHRUG, ANIM_AGENT_EXPRESS_SMILE, ANIM_AGENT_EXPRESS_SURPRISE, ANIM_AGENT_EXPRESS_TONGUE_OUT, ANIM_AGENT_EXPRESS_TOOTHSMILE, ANIM_AGENT_EXPRESS_WINK, ANIM_AGENT_EXPRESS_WORRY, ANIM_AGENT_FEMALE_WALK, ANIM_AGENT_HOVER, ANIM_AGENT_SIT_FEMALE, ANIM_AGENT_STAND, mIDList, mLastMouseX, mLastMouseY, mLastSliderValue, and LLUUID::null.
LLFloaterAnimPreview::~LLFloaterAnimPreview | ( | ) | [virtual] |
Definition at line 362 of file llfloateranimpreview.cpp.
References FALSE, mAnimPreview, NULL, and LLView::setEnabled().
BOOL LLFloaterAnimPreview::postBuild | ( | void | ) | [virtual] |
Reimplemented from LLFloaterNameDesc.
Definition at line 147 of file llfloateranimpreview.cpp.
References BTN_HEIGHT, LLPanel::childGetValue(), LLPanel::childHide(), LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), LLPanel::childSetLabelArg(), LLPanel::childSetMaxValue(), LLPanel::childSetMinValue(), LLPanel::childSetValue(), LLCharacter::createMotion(), LLKeyframeMotion::deserialize(), FALSE, gAgent, LLUUID::generate(), LLBBoxLocal::getCenter(), LLViewerCamera::getDefaultFOV(), LLPreviewAnimation::getDummyAvatar(), LLKeyframeMotion::getDuration(), LLBVHLoader::getDuration(), LLKeyframeMotion::getEaseInDuration(), LLKeyframeMotion::getEaseOutDuration(), LLBBoxLocal::getExtent(), LLKeyframeMotion::getHandPose(), LLHandMotion::getHandPoseName(), LLSingleton< LLViewerCamera >::getInstance(), LLKeyframeMotion::getLoop(), LLKeyframeMotion::getLoopIn(), LLKeyframeMotion::getLoopOut(), LLBVHLoader::getOutputSize(), LLKeyframeMotion::getPelvisBBox(), LLKeyframeMotion::getPriority(), LLView::getRect(), LLAgent::getSecureSessionID(), LLBVHLoader::getStatus(), LLUIString::getString(), LLPanel::getString(), LLBVHLoader::isInitialized(), ll_apr_file_open(), ll_apr_file_read(), LL_APR_RB, llendl, llformat(), llinfos, llwarns, LLVector3::magVec(), LLTransactionID::makeAssetID(), mAnimPreview, MAX_ANIM_DURATION, LLFloaterNameDesc::mFilename, LLFloaterNameDesc::mFilenameAndPath, mMotionID, mPlayButton, mPreviewImageRect, mPreviewRect, LLRectBase< Type >::mRight, mStopButton, LLRectBase< Type >::mTop, mTransactionID, NULL, onBtnOK(), onBtnPlay(), onBtnStop(), onCommitName(), LLFloaterNameDesc::postBuild(), PREF_BUTTON_HEIGHT, PREVIEW_CAMERA_DISTANCE, PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT, r, refresh(), LLDataPackerBinaryBuffer::reset(), S32, LLBVHLoader::serialize(), LLRectBase< Type >::set(), setAnimCallbacks(), LLUIString::setArg(), LLUICtrl::setCallbackUserData(), LLButton::setClickedCallback(), LLPanel::setDefaultBtn(), LLButton::setDisabledImages(), LLView::setEnabled(), LLButton::setImages(), LLMotion::setName(), LLUUID::setNull(), LLButton::setScaleImage(), LLFloater::setTitle(), LLPreviewAnimation::setZoom(), LLVOAvatar::startMotion(), sUploadAmount, and TRUE.
Reimplemented from LLFloater.
Definition at line 435 of file llfloateranimpreview.cpp.
References LLFloater::bringToFront(), gViewerWindow, LLFloater::handleMouseDown(), LLViewerWindow::hideCursor(), mLastMouseX, mLastMouseY, mPreviewRect, LLRectBase< Type >::pointInRect(), LLViewerWindow::setMouseCapture(), and TRUE.
Reimplemented from LLView.
Definition at line 453 of file llfloateranimpreview.cpp.
References FALSE, gViewerWindow, LLView::handleMouseUp(), LLViewerWindow::setMouseCapture(), and LLViewerWindow::showCursor().
Reimplemented from LLView.
Definition at line 463 of file llfloateranimpreview.cpp.
References gViewerWindow, LLView::handleHover(), LLView::hasMouseCapture(), mAnimPreview, MASK_ALT, MASK_ORBIT, MASK_PAN, mLastMouseX, mLastMouseY, mPreviewRect, LLPreviewAnimation::pan(), LLRectBase< Type >::pointInRect(), LLPreviewAnimation::requestUpdate(), LLPreviewAnimation::rotate(), LLViewerWindow::setCursor(), LLUI::setCursorPositionLocal(), TRUE, UI_CURSOR_TOOLCAMERA, UI_CURSOR_TOOLPAN, UI_CURSOR_TOOLZOOMIN, and LLPreviewAnimation::zoom().
Reimplemented from LLView.
Definition at line 518 of file llfloateranimpreview.cpp.
References mAnimPreview, LLPreviewAnimation::requestUpdate(), TRUE, and LLPreviewAnimation::zoom().
void LLFloaterAnimPreview::onMouseCaptureLost | ( | ) | [virtual] |
Reimplemented from LLView.
Definition at line 529 of file llfloateranimpreview.cpp.
References gViewerWindow, and LLViewerWindow::showCursor().
void LLFloaterAnimPreview::refresh | ( | ) | [virtual] |
Reimplemented from LLPanel.
Definition at line 921 of file llfloateranimpreview.cpp.
References LLCharacter::areAnimationsPaused(), LLPanel::childDisable(), LLPanel::childEnable(), LLPanel::childHide(), LLPanel::childSetValue(), LLPanel::childShow(), FALSE, LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLKeyframeMotion::getDuration(), LLKeyframeMotion::getLastUpdateTime(), LLCharacter::isMotionActive(), mAnimPreview, mLastSliderValue, mMotionID, mPauseRequest, mPlayButton, mStopButton, LLCharacter::requestPause(), LLPreviewAnimation::requestUpdate(), LLView::setEnabled(), LLButton::setImages(), and TRUE.
Referenced by draw(), onSliderMove(), and postBuild().
void LLFloaterAnimPreview::onBtnPlay | ( | void * | user_data | ) | [static] |
Definition at line 537 of file llfloateranimpreview.cpp.
References LLCharacter::areAnimationsPaused(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), LLCharacter::isMotionActive(), mAnimPreview, mMotionID, mPauseRequest, LLUUID::notNull(), NULL, LLCharacter::requestPause(), and resetMotion().
Referenced by postBuild().
void LLFloaterAnimPreview::onBtnStop | ( | void * | user_data | ) | [static] |
Definition at line 568 of file llfloateranimpreview.cpp.
References LLSD::asBoolean(), LLSD::asReal(), LLPanel::childGetValue(), FALSE, LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), mAnimPreview, mMotionID, LLUUID::notNull(), and LLVOAvatar::stopMotion().
Referenced by postBuild().
static void LLFloaterAnimPreview::setUploadAmount | ( | S32 | amount | ) | [inline, static] |
void LLFloaterAnimPreview::onSliderMove | ( | LLUICtrl * | ctrl, | |
void * | user_data | |||
) | [static] |
Definition at line 593 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLSD::asString(), LLPanel::childGetValue(), F32_MIN, LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLMotion::getDuration(), LLView::getEnabled(), LLCharacter::isMotionActive(), LLMotion::mActivationTimestamp, mAnimPreview, mIDList, mLastSliderValue, mMotionID, mPauseRequest, LLMotion::mSendStopTimestamp, LLMotion::mStopTimestamp, refresh(), LLCharacter::requestPause(), and resetMotion().
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitBaseAnim | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 638 of file llfloateranimpreview.cpp.
References ANIM_AGENT_HOVER, ANIM_AGENT_SIT, ANIM_AGENT_STAND, ANIM_AGENT_WALK, LLCharacter::areAnimationsPaused(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), mAnimPreview, mPauseRequest, NULL, resetMotion(), LLVOAvatar::stopMotion(), and TRUE.
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitLoop | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 668 of file llfloateranimpreview.cpp.
References LLSD::asBoolean(), LLSD::asReal(), LLPanel::childGetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLKeyframeMotion::getDuration(), LLView::getEnabled(), mAnimPreview, mMotionID, LLKeyframeMotion::setLoop(), LLKeyframeMotion::setLoopIn(), and LLKeyframeMotion::setLoopOut().
Referenced by onCommitLoopIn(), onCommitLoopOut(), and setAnimCallbacks().
void LLFloaterAnimPreview::onCommitLoopIn | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 687 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLPanel::childSetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), mAnimPreview, mMotionID, onCommitLoop(), resetMotion(), LLKeyframeMotion::setLoopIn(), and TRUE.
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitLoopOut | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 707 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLPanel::childSetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLKeyframeMotion::getDuration(), LLView::getEnabled(), mAnimPreview, mMotionID, onCommitLoop(), resetMotion(), LLKeyframeMotion::setLoopOut(), and TRUE.
Referenced by setAnimCallbacks().
Definition at line 862 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLPanel::childSetValue(), FALSE, LLView::getEnabled(), and TRUE.
Referenced by setAnimCallbacks().
Definition at line 891 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLPanel::childSetValue(), FALSE, LLView::getEnabled(), and TRUE.
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitName | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 727 of file llfloateranimpreview.cpp.
References LLSD::asString(), LLPanel::childGetValue(), LLFloaterNameDesc::doCommit(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), mAnimPreview, mMotionID, and LLMotion::setName().
Referenced by postBuild().
void LLFloaterAnimPreview::onCommitHandPose | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 746 of file llfloateranimpreview.cpp.
References LLSD::asString(), LLPanel::childGetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), LLHandMotion::getHandPose(), mAnimPreview, mMotionID, resetMotion(), and LLKeyframeMotion::setHandPose().
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitEmote | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 761 of file llfloateranimpreview.cpp.
References LLSD::asString(), LLPanel::childGetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), mAnimPreview, mIDList, mMotionID, resetMotion(), and LLKeyframeMotion::setEmote().
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitPriority | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 776 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), llfloor(), mAnimPreview, mMotionID, and LLKeyframeMotion::setPriority().
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitEaseIn | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 790 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), mAnimPreview, mMotionID, resetMotion(), and LLKeyframeMotion::setEaseIn().
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onCommitEaseOut | ( | LLUICtrl * | ctrl, | |
void * | data | |||
) | [static] |
Definition at line 805 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), mAnimPreview, mMotionID, resetMotion(), and LLKeyframeMotion::setEaseOut().
Referenced by setAnimCallbacks().
Definition at line 820 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLPanel::childSetValue(), FALSE, LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLKeyframeMotion::getDuration(), LLKeyframeMotion::getEaseOutDuration(), LLView::getEnabled(), LLKeyframeMotion::getLoop(), llclamp(), mAnimPreview, mMotionID, and TRUE.
Referenced by setAnimCallbacks().
Definition at line 841 of file llfloateranimpreview.cpp.
References LLSD::asReal(), LLPanel::childGetValue(), LLPanel::childSetValue(), FALSE, LLVOAvatar::findMotion(), LLPreviewAnimation::getDummyAvatar(), LLKeyframeMotion::getDuration(), LLKeyframeMotion::getEaseInDuration(), LLView::getEnabled(), LLKeyframeMotion::getLoop(), llclamp(), mAnimPreview, mMotionID, and TRUE.
Referenced by setAnimCallbacks().
void LLFloaterAnimPreview::onBtnOK | ( | void * | userdata | ) | [static] |
Reimplemented from LLFloaterNameDesc.
Definition at line 977 of file llfloateranimpreview.cpp.
References LLViewerWindow::alertXml(), LLVFile::APPEND, LLSD::asString(), LLAssetType::AT_ANIMATION, LLAssetType::AT_NONE, LLPanel::childGetValue(), LLFloater::close(), LLVOAvatar::findMotion(), LLDataPackerBinaryBuffer::getCurrentSize(), LLPreviewAnimation::getDummyAvatar(), LLView::getEnabled(), LLKeyframeMotion::getFileSize(), LLMotion::getID(), gVFS, gViewerWindow, LLInventoryType::IT_ANIMATION, llendl, llwarns, mAnimPreview, mMotionID, mTransactionID, PERM_NONE, LLKeyframeDataCache::removeKeyframeData(), LLCharacter::removeMotion(), S32, LLKeyframeMotion::serialize(), and upload_new_resource().
Referenced by postBuild().
static void LLFloaterAnimPreview::onSaveComplete | ( | const LLUUID & | asset_uuid, | |
LLAssetType::EType | type, | |||
void * | user_data, | |||
S32 | status, | |||
LLExtStat | ext_status | |||
) | [static] |
void LLFloaterAnimPreview::setAnimCallbacks | ( | ) | [private] |
Definition at line 119 of file llfloateranimpreview.cpp.
References LLPanel::childSetCommitCallback(), LLPanel::childSetValidate(), LLPanel::childSetValue(), onCommitBaseAnim(), onCommitEaseIn(), onCommitEaseOut(), onCommitEmote(), onCommitHandPose(), onCommitLoop(), onCommitLoopIn(), onCommitLoopOut(), onCommitPriority(), onSliderMove(), validateEaseIn(), validateEaseOut(), validateLoopIn(), and validateLoopOut().
Referenced by postBuild().
void LLFloaterAnimPreview::draw | ( | void | ) | [protected, virtual] |
Reimplemented from LLFloater.
Definition at line 373 of file llfloateranimpreview.cpp.
References LLCharacter::areAnimationsPaused(), LLGLImmediate::begin(), LLDynamicTexture::bindTexture(), LLGLImmediate::color3f(), LLFloater::draw(), LLGLImmediate::end(), LLPreviewAnimation::getDummyAvatar(), LLView::getRect(), LLRectBase< Type >::getWidth(), gGL, mAnimPreview, mMotionID, LLUUID::notNull(), PREF_BUTTON_HEIGHT, PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT, LLVertexBuffer::QUADS, r, refresh(), LLPreviewAnimation::requestUpdate(), LLGLImmediate::texCoord2f(), LLDynamicTexture::unbindTexture(), and LLGLImmediate::vertex2i().
void LLFloaterAnimPreview::resetMotion | ( | ) | [protected] |
Definition at line 411 of file llfloateranimpreview.cpp.
References LLCharacter::areAnimationsPaused(), LLSD::asString(), LLPanel::childGetValue(), LLPanel::childSetValue(), LLPreviewAnimation::getDummyAvatar(), mAnimPreview, mIDList, mLastSliderValue, mMotionID, mPauseRequest, NULL, LLCharacter::requestPause(), LLVOAvatar::startMotion(), LLVOAvatar::stopMotion(), and TRUE.
Referenced by onBtnPlay(), onCommitBaseAnim(), onCommitEaseIn(), onCommitEaseOut(), onCommitEmote(), onCommitHandPose(), onCommitLoopIn(), onCommitLoopOut(), and onSliderMove().
LLPreviewAnimation* LLFloaterAnimPreview::mAnimPreview [protected] |
Definition at line 116 of file llfloateranimpreview.h.
Referenced by draw(), handleHover(), handleScrollWheel(), onBtnOK(), onBtnPlay(), onBtnStop(), onCommitBaseAnim(), onCommitEaseIn(), onCommitEaseOut(), onCommitEmote(), onCommitHandPose(), onCommitLoop(), onCommitLoopIn(), onCommitLoopOut(), onCommitName(), onCommitPriority(), onSliderMove(), postBuild(), refresh(), resetMotion(), validateEaseIn(), validateEaseOut(), and ~LLFloaterAnimPreview().
S32 LLFloaterAnimPreview::mLastMouseX [protected] |
Definition at line 117 of file llfloateranimpreview.h.
Referenced by handleHover(), handleMouseDown(), and LLFloaterAnimPreview().
S32 LLFloaterAnimPreview::mLastMouseY [protected] |
Definition at line 118 of file llfloateranimpreview.h.
Referenced by handleHover(), handleMouseDown(), and LLFloaterAnimPreview().
LLButton* LLFloaterAnimPreview::mPlayButton [protected] |
LLButton* LLFloaterAnimPreview::mStopButton [protected] |
F32 LLFloaterAnimPreview::mLastSliderValue [protected] |
Definition at line 121 of file llfloateranimpreview.h.
Referenced by LLFloaterAnimPreview(), onSliderMove(), refresh(), and resetMotion().
LLRect LLFloaterAnimPreview::mPreviewRect [protected] |
Definition at line 122 of file llfloateranimpreview.h.
Referenced by handleHover(), handleMouseDown(), and postBuild().
LLRectf LLFloaterAnimPreview::mPreviewImageRect [protected] |
LLAssetID LLFloaterAnimPreview::mMotionID [protected] |
Definition at line 124 of file llfloateranimpreview.h.
Referenced by draw(), onBtnOK(), onBtnPlay(), onBtnStop(), onCommitEaseIn(), onCommitEaseOut(), onCommitEmote(), onCommitHandPose(), onCommitLoop(), onCommitLoopIn(), onCommitLoopOut(), onCommitName(), onCommitPriority(), onSliderMove(), postBuild(), refresh(), resetMotion(), validateEaseIn(), and validateEaseOut().
LLTransactionID LLFloaterAnimPreview::mTransactionID [protected] |
BOOL LLFloaterAnimPreview::mEnabled [protected] |
Definition at line 127 of file llfloateranimpreview.h.
Referenced by onBtnPlay(), onCommitBaseAnim(), onSliderMove(), refresh(), and resetMotion().
std::map<LLString, LLUUID> LLFloaterAnimPreview::mIDList [protected] |
Definition at line 129 of file llfloateranimpreview.h.
Referenced by LLFloaterAnimPreview(), onCommitEmote(), onSliderMove(), and resetMotion().
S32 LLFloaterAnimPreview::sUploadAmount = 10 [static, protected] |
Definition at line 131 of file llfloateranimpreview.h.
Referenced by postBuild(), and setUploadAmount().