From cd17687f01420952712a500107e0f93e7ab8d5f8 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:34 -0500 Subject: Second Life viewer sources 1.19.1.0 --- linden/indra/newview/llpreviewanim.cpp | 35 ++++------------------------------ 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'linden/indra/newview/llpreviewanim.cpp') diff --git a/linden/indra/newview/llpreviewanim.cpp b/linden/indra/newview/llpreviewanim.cpp index 58478c8..ff8b3b5 100644 --- a/linden/indra/newview/llpreviewanim.cpp +++ b/linden/indra/newview/llpreviewanim.cpp @@ -96,8 +96,8 @@ LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const // static void LLPreviewAnim::endAnimCallback( void *userdata ) { - LLViewHandle* handlep = ((LLViewHandle*)userdata); - LLFloater* self = getFloaterByHandle(*handlep); + LLHandle* handlep = ((LLHandle*)userdata); + LLFloater* self = handlep->get(); delete handlep; // done with the handle if (self) { @@ -132,7 +132,7 @@ void LLPreviewAnim::playAnim( void *userdata ) if (motion) { - motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLViewHandle(self->getHandle()))); + motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle(self->getHandle()))); } } else @@ -169,7 +169,7 @@ void LLPreviewAnim::auditionAnim( void *userdata ) if (motion) { - motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLViewHandle(self->getHandle()))); + motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle(self->getHandle()))); } } else @@ -180,33 +180,6 @@ void LLPreviewAnim::auditionAnim( void *userdata ) } } -void LLPreviewAnim::saveAnim( void *userdata ) -{ - LLPreviewAnim* self = (LLPreviewAnim*) userdata; - const LLInventoryItem *item = self->getItem(); - - if(item) - { - LLKeyframeMotion* motionp = (LLKeyframeMotion*)gAgent.getAvatarObject()->createMotion( item->getAssetUUID() ); - if (motionp && motionp->isLoaded()) - { - LLFilePicker& picker = LLFilePicker::instance(); - LLString proposed_name = item->getName() + LLString(".xaf"); - if (picker.getSaveFile(LLFilePicker::FFSAVE_ANIM, proposed_name.c_str())) - { - apr_file_t* fp = ll_apr_file_open(picker.getFirstFile(), LL_APR_W); - if (!fp) - { - llwarns << "Unable to open file " << picker.getFirstFile() << llendl; - return; - } - motionp->writeCAL3D(fp); - apr_file_close(fp); - } - } - } -} - void LLPreviewAnim::onClose(bool app_quitting) { const LLInventoryItem *item = getItem(); -- cgit v1.1