diff options
author | Jacek Antonelli | 2009-11-19 04:19:06 -0600 |
---|---|---|
committer | Jacek Antonelli | 2009-11-19 04:19:06 -0600 |
commit | 1d443b7a94ed6f9ef1d408caef72fcbc0b1ee427 (patch) | |
tree | e09ccbc010e326a48fd91ba15b58afd7fb836b3f /linden/indra/newview/llfloateranimpreview.cpp | |
parent | Fixed minor formatting issue in MANIFESTO.txt. (diff) | |
parent | Fixed CMake setting errors (diff) | |
download | meta-impy-1d443b7a94ed6f9ef1d408caef72fcbc0b1ee427.zip meta-impy-1d443b7a94ed6f9ef1d408caef72fcbc0b1ee427.tar.gz meta-impy-1d443b7a94ed6f9ef1d408caef72fcbc0b1ee427.tar.bz2 meta-impy-1d443b7a94ed6f9ef1d408caef72fcbc0b1ee427.tar.xz |
Merge remote branch 'mccabe/1.3.0-next' into next
Conflicts:
linden/indra/cmake/00-Common.cmake
linden/indra/newview/skins/default/xui/de/floater_about.xml
linden/indra/newview/skins/default/xui/fr/floater_about.xml
linden/indra/newview/skins/default/xui/ja/floater_about.xml
linden/indra/newview/skins/default/xui/ko/floater_about.xml
linden/indra/newview/skins/default/xui/zh/floater_about.xml
linden/install.xml
Diffstat (limited to 'linden/indra/newview/llfloateranimpreview.cpp')
-rw-r--r-- | linden/indra/newview/llfloateranimpreview.cpp | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index c75f9e3..162456b 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -52,6 +53,7 @@ | |||
52 | #include "llfocusmgr.h" | 53 | #include "llfocusmgr.h" |
53 | #include "llkeyframemotion.h" | 54 | #include "llkeyframemotion.h" |
54 | #include "lllineeditor.h" | 55 | #include "lllineeditor.h" |
56 | #include "llfloaterperms.h" | ||
55 | #include "llsliderctrl.h" | 57 | #include "llsliderctrl.h" |
56 | #include "llspinctrl.h" | 58 | #include "llspinctrl.h" |
57 | #include "lltextbox.h" | 59 | #include "lltextbox.h" |
@@ -234,9 +236,11 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
234 | 236 | ||
235 | // now load bvh file | 237 | // now load bvh file |
236 | S32 file_size; | 238 | S32 file_size; |
237 | apr_file_t* fp = ll_apr_file_open(mFilenameAndPath, LL_APR_RB, &file_size); | 239 | |
238 | 240 | LLAPRFile infile ; | |
239 | if (!fp) | 241 | infile.open(mFilenameAndPath, LL_APR_RB, NULL, &file_size); |
242 | |||
243 | if (!infile.getFileHandle()) | ||
240 | { | 244 | { |
241 | llwarns << "Can't open BVH file:" << mFilename << llendl; | 245 | llwarns << "Can't open BVH file:" << mFilename << llendl; |
242 | } | 246 | } |
@@ -246,14 +250,14 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
246 | 250 | ||
247 | file_buffer = new char[file_size + 1]; | 251 | file_buffer = new char[file_size + 1]; |
248 | 252 | ||
249 | if (file_size == ll_apr_file_read(fp, file_buffer, file_size)) | 253 | if (file_size == infile.read(file_buffer, file_size)) |
250 | { | 254 | { |
251 | file_buffer[file_size] = '\0'; | 255 | file_buffer[file_size] = '\0'; |
252 | llinfos << "Loading BVH file " << mFilename << llendl; | 256 | llinfos << "Loading BVH file " << mFilename << llendl; |
253 | loaderp = new LLBVHLoader(file_buffer); | 257 | loaderp = new LLBVHLoader(file_buffer); |
254 | } | 258 | } |
255 | 259 | ||
256 | apr_file_close(fp); | 260 | infile.close() ; |
257 | delete[] file_buffer; | 261 | delete[] file_buffer; |
258 | } | 262 | } |
259 | } | 263 | } |
@@ -987,20 +991,24 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata) | |||
987 | { | 991 | { |
988 | std::string name = floaterp->childGetValue("name_form").asString(); | 992 | std::string name = floaterp->childGetValue("name_form").asString(); |
989 | std::string desc = floaterp->childGetValue("description_form").asString(); | 993 | std::string desc = floaterp->childGetValue("description_form").asString(); |
994 | LLAssetStorage::LLStoreAssetCallback callback = NULL; | ||
995 | S32 expected_upload_cost = sUploadAmount; | ||
996 | void *userdata = NULL; | ||
990 | upload_new_resource(floaterp->mTransactionID, // tid | 997 | upload_new_resource(floaterp->mTransactionID, // tid |
991 | LLAssetType::AT_ANIMATION, | 998 | LLAssetType::AT_ANIMATION, |
992 | name, | 999 | name, |
993 | desc, | 1000 | desc, |
994 | 0, | 1001 | 0, |
995 | LLAssetType::AT_NONE, | 1002 | LLAssetType::AT_NONE, |
996 | LLInventoryType::IT_ANIMATION, | 1003 | LLInventoryType::IT_ANIMATION, |
997 | PERM_NONE, | 1004 | LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), |
998 | name); | 1005 | name, |
1006 | callback, expected_upload_cost, userdata); | ||
999 | } | 1007 | } |
1000 | else | 1008 | else |
1001 | { | 1009 | { |
1002 | llwarns << "Failure writing animation data." << llendl; | 1010 | llwarns << "Failure writing animation data." << llendl; |
1003 | gViewerWindow->alertXml("WriteAnimationFail"); | 1011 | LLNotifications::instance().add("WriteAnimationFail"); |
1004 | } | 1012 | } |
1005 | } | 1013 | } |
1006 | 1014 | ||
@@ -1033,7 +1041,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture | |||
1033 | mDummyAvatar->updateJointLODs(); | 1041 | mDummyAvatar->updateJointLODs(); |
1034 | mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); | 1042 | mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); |
1035 | mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET); | 1043 | mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET); |
1036 | mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE); | 1044 | mDummyAvatar->hideSkirt(); |
1037 | gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance()); | 1045 | gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance()); |
1038 | 1046 | ||
1039 | // stop extraneous animations | 1047 | // stop extraneous animations |