From f324e67780cb002149b11d0fbf49f5d1794b7299 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 23 Jan 2012 17:49:09 +0200 Subject: EXP-1801 FIXED Fixed the "snapshot to disk" shortcut (Ctrl+`) to respect preferred snapshot format. Restoring mistakenly removed code. --- indra/newview/llviewermenufile.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermenufile.cpp') diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 7e830e14bf..8ee514e7c2 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -527,8 +527,22 @@ class LLFileTakeSnapshotToDisk : public view_listener_t FALSE)) { gViewerWindow->playSnapshotAnimAndSound(); - - LLPointer formatted = new LLImagePNG; + LLPointer formatted; + switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) + { + case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: + formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: + formatted = new LLImagePNG; + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: + formatted = new LLImageBMP; + break; + default: + llwarns << "Unknown Local Snapshot format" << llendl; + return true; + } formatted->enableOverSize() ; formatted->encode(raw, 0); formatted->disableOverSize() ; -- cgit v1.2.3 From 0d04a4da7e7c1361e1ac805e2a135d826242fd2f Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 24 Jan 2012 09:56:11 +0200 Subject: EXP-1801 FOLLOWUP Default to PNG when saving snapshot via hotkey. --- indra/newview/llviewermenufile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewermenufile.cpp') diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 8ee514e7c2..f31f0364b3 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -528,20 +528,20 @@ class LLFileTakeSnapshotToDisk : public view_listener_t { gViewerWindow->playSnapshotAnimAndSound(); LLPointer formatted; - switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) + LLFloaterSnapshot::ESnapshotFormat fmt = (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat"); + switch (fmt) { case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); break; + default: + llwarns << "Unknown local snapshot format: " << fmt << llendl; case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: formatted = new LLImagePNG; break; case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: formatted = new LLImageBMP; break; - default: - llwarns << "Unknown Local Snapshot format" << llendl; - return true; } formatted->enableOverSize() ; formatted->encode(raw, 0); -- cgit v1.2.3 From 619f737abb5c12022537c1f6715d60860152ec79 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 29 Jan 2012 15:34:51 -0500 Subject: STORM-1803 Adding raw anim file upload support --- indra/newview/llviewermenufile.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermenufile.cpp') diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 7e830e14bf..95e3bc9b89 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -183,7 +183,7 @@ void LLFilePickerThread::clearDead() #if LL_WINDOWS static std::string SOUND_EXTENSIONS = "wav"; static std::string IMAGE_EXTENSIONS = "tga bmp jpg jpeg png"; -static std::string ANIM_EXTENSIONS = "bvh"; +static std::string ANIM_EXTENSIONS = "bvh anim"; #ifdef _CORY_TESTING static std::string GEOMETRY_EXTENSIONS = "slg"; #endif @@ -385,7 +385,14 @@ class LLFileUploadAnim : public view_listener_t const std::string filename = upload_pick((void*)LLFilePicker::FFLOAD_ANIM); if (!filename.empty()) { - LLFloaterReg::showInstance("upload_anim", LLSD(filename)); + if (filename.rfind(".anim") != std::string::npos) + { + LLFloaterReg::showInstance("upload_anim_anim", LLSD(filename)); + } + else + { + LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename)); + } } return true; } @@ -785,6 +792,11 @@ LLUUID upload_new_resource( upload_error(error_message, "DoNotSupportBulkAnimationUpload", filename, args); return LLUUID(); } + else if (exten == "anim") + { + asset_type = LLAssetType::AT_ANIMATION; + filename = src_filename; + } else { // Unknown extension -- cgit v1.2.3