diff options
author | merov <none@none> | 2014-01-10 01:27:33 +0000 |
---|---|---|
committer | merov <none@none> | 2014-01-10 01:27:33 +0000 |
commit | a2f9aea3b471f86bc3f86036f3a0fae16560fa3b (patch) | |
tree | 3cea98c6c577b51aed8d1fb86407adca7b9fd3bb /indra/newview | |
parent | 70b877da0eccca2e11c810a92c0a928baf802334 (diff) | |
parent | 7d8e4020750683412c9f56edf847fd830402aa0f (diff) |
Pull merge from viewer-acme-dev
Diffstat (limited to 'indra/newview')
16 files changed, 337 insertions, 70 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 828849a327..e458193142 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -328,6 +328,7 @@ set(viewer_SOURCE_FILES llfloaterimsessiontab.cpp llfloaterimsession.cpp llfloaterimcontainer.cpp + llimagefiltersmanager.cpp llimhandler.cpp llimview.cpp llinspect.cpp @@ -919,6 +920,7 @@ set(viewer_HEADER_FILES llfloaterimsessiontab.h llfloaterimsession.h llfloaterimcontainer.h + llimagefiltersmanager.h llimview.h llinspect.h llinspectavatar.h diff --git a/indra/newview/app_settings/filters/Hefe.xml b/indra/newview/app_settings/filters/Grayscale.xml index 527aaee847..101ed8233a 100755..100644 --- a/indra/newview/app_settings/filters/Hefe.xml +++ b/indra/newview/app_settings/filters/Grayscale.xml @@ -2,22 +2,20 @@ <array> <array> <string>linearize</string> - <real>0.0</real> + <real>0.01</real> <real>1.0</real> <real>1.0</real> <real>1.0</real> </array> <array> - <string>blend</string> - <real>4.0</real> - <real>0.5</real> - </array> - <array> <string>contrast</string> - <real>2.0</real> + <real>0.8</real> <real>1.0</real> <real>1.0</real> <real>1.0</real> </array> + <array> + <string>grayscale</string> + </array> </array> </llsd> diff --git a/indra/newview/app_settings/filters/Lomofi.xml b/indra/newview/app_settings/filters/GreenGray.xml index f5ec911e59..dce5ab3e9e 100755..100644 --- a/indra/newview/app_settings/filters/Lomofi.xml +++ b/indra/newview/app_settings/filters/GreenGray.xml @@ -1,23 +1,24 @@ <llsd> <array> <array> - <string>blend</string> - <real>4.0</real> - <real>0.0</real> - </array> - <array> <string>linearize</string> - <real>0.2</real> + <real>0.1</real> <real>1.0</real> <real>1.0</real> <real>1.0</real> </array> <array> - <string>brighten</string> - <real>20.0</real> + <string>colorize</string> <real>1.0</real> <real>1.0</real> <real>1.0</real> + <real>0.0</real> + <real>0.3</real> + <real>0.0</real> + </array> + <array> + <string>saturate</string> + <real>0.35</real> </array> </array> </llsd> diff --git a/indra/newview/app_settings/filters/Gotham.xml b/indra/newview/app_settings/filters/HLines.xml index eb0725e6bf..ddff4d1977 100755..100644 --- a/indra/newview/app_settings/filters/Gotham.xml +++ b/indra/newview/app_settings/filters/HLines.xml @@ -2,29 +2,24 @@ <array> <array> <string>linearize</string> - <real>0.0</real> + <real>0.1</real> <real>1.0</real> <real>1.0</real> <real>1.0</real> </array> <array> - <string>gamma</string> - <real>1.5</real> - <real>1.0</real> - <real>1.0</real> - <real>1.0</real> + <string>grayscale</string> </array> <array> - <string>colorize</string> - <real>0.0</real> + <string>blend</string> <real>0.0</real> <real>0.0</real> - <real>0.0</real> - <real>0.0</real> - <real>1.0</real> </array> <array> - <string>grayscale</string> + <string>screen</string> + <string>line</string> + <real>5.0</real> + <real>0.0</real> </array> </array> </llsd> diff --git a/indra/newview/app_settings/filters/Inkwell.xml b/indra/newview/app_settings/filters/Inkwell.xml deleted file mode 100755 index 77c88b5fbb..0000000000 --- a/indra/newview/app_settings/filters/Inkwell.xml +++ /dev/null @@ -1,14 +0,0 @@ -<llsd> - <array> - <array> - <string>linearize</string> - <real>0.05</real> - <real>1.0</real> - <real>1.0</real> - <real>1.0</real> - </array> - <array> - <string>grayscale</string> - </array> - </array> -</llsd> diff --git a/indra/newview/app_settings/filters/Newspaper.xml b/indra/newview/app_settings/filters/Newspaper.xml index 7480325542..8247c34500 100755 --- a/indra/newview/app_settings/filters/Newspaper.xml +++ b/indra/newview/app_settings/filters/Newspaper.xml @@ -2,7 +2,7 @@ <array> <array> <string>linearize</string> - <real>0.2</real> + <real>0.1</real> <real>1.0</real> <real>1.0</real> <real>1.0</real> @@ -18,7 +18,7 @@ <array> <string>screen</string> <string>2Dsine</string> - <real>15.0</real> + <real>5.0</real> <real>0.0</real> </array> </array> diff --git a/indra/newview/app_settings/filters/Poprocket.xml b/indra/newview/app_settings/filters/RedV.xml index 7e64003908..5c47ca0f84 100755..100644 --- a/indra/newview/app_settings/filters/Poprocket.xml +++ b/indra/newview/app_settings/filters/RedV.xml @@ -2,7 +2,14 @@ <array> <array> <string>linearize</string> - <real>0.0</real> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.8</real> <real>1.0</real> <real>1.0</real> <real>1.0</real> @@ -16,10 +23,10 @@ <string>colorize</string> <real>1.0</real> <real>0.0</real> - <real>0.0</real> + <real>1.0</real> <real>0.4</real> <real>0.0</real> - <real>0.0</real> + <real>0.2</real> </array> </array> </llsd> diff --git a/indra/newview/app_settings/filters/Saturate30.xml b/indra/newview/app_settings/filters/Saturate30.xml new file mode 100644 index 0000000000..b77f07a037 --- /dev/null +++ b/indra/newview/app_settings/filters/Saturate30.xml @@ -0,0 +1,8 @@ +<llsd> + <array> + <array> + <string>saturate</string> + <real>3.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/Toaster.xml b/indra/newview/app_settings/filters/SepiaV.xml index 170a1183ed..d26df608b9 100755..100644 --- a/indra/newview/app_settings/filters/Toaster.xml +++ b/indra/newview/app_settings/filters/SepiaV.xml @@ -1,6 +1,13 @@ <llsd> <array> <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> <string>contrast</string> <real>0.8</real> <real>1.0</real> @@ -13,11 +20,7 @@ <real>0.5</real> </array> <array> - <string>brighten</string> - <real>10.0</real> - <real>1.0</real> - <real>1.0</real> - <real>1.0</real> + <string>sepia</string> </array> </array> </llsd> diff --git a/indra/newview/app_settings/filters/Sutro.xml b/indra/newview/app_settings/filters/Sutro.xml deleted file mode 100755 index 3b0a58f01e..0000000000 --- a/indra/newview/app_settings/filters/Sutro.xml +++ /dev/null @@ -1,19 +0,0 @@ -<llsd> - <array> - <array> - <string>linearize</string> - <real>0.05</real> - <real>1.0</real> - <real>1.0</real> - <real>1.0</real> - </array> - <array> - <string>fade</string> - <real>4.0</real> - <real>0.5</real> - </array> - <array> - <string>sepia</string> - </array> - </array> -</llsd> diff --git a/indra/newview/app_settings/filters/VividV.xml b/indra/newview/app_settings/filters/VividV.xml new file mode 100644 index 0000000000..203130bdee --- /dev/null +++ b/indra/newview/app_settings/filters/VividV.xml @@ -0,0 +1,45 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.8</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>saturate</string> + <real>1.5</real> + </array> + <array> + <string>fade</string> + <real>1.0</real> + <real>0.25</real> + </array> + <array> + <string>saturate</string> + <real>0.8</real> + </array> + <array> + <string>contrast</string> + <real>1.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>brighten</string> + <real>30</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/VividYellowV.xml b/indra/newview/app_settings/filters/VividYellowV.xml new file mode 100644 index 0000000000..2da27e53c1 --- /dev/null +++ b/indra/newview/app_settings/filters/VividYellowV.xml @@ -0,0 +1,39 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>1.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>fade</string> + <real>1.0</real> + <real>0.25</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.3</real> + <real>0.2</real> + <real>0.0</real> + </array> + <array> + <string>contrast</string> + <real>1.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/YellowV.xml b/indra/newview/app_settings/filters/YellowV.xml new file mode 100644 index 0000000000..0dab2489a0 --- /dev/null +++ b/indra/newview/app_settings/filters/YellowV.xml @@ -0,0 +1,41 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.8</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.5</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>blend</string> + <real>10.0</real> + <real>0.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.1</real> + <real>0.1</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/llimagefiltersmanager.cpp b/indra/newview/llimagefiltersmanager.cpp new file mode 100644 index 0000000000..efc4f56ad3 --- /dev/null +++ b/indra/newview/llimagefiltersmanager.cpp @@ -0,0 +1,84 @@ +/** + * @file llimagefilters.cpp + * @brief Load and execute image filters. Mostly used for Flickr at the moment. + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2014, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llimagefilters.h" + +#include "lldiriterator.h" + + +//--------------------------------------------------------------------------- +// LLImageFilters +//--------------------------------------------------------------------------- + +LLImageFilters::LLImageFilters() +{ +} + +LLImageFilters::~LLImageFilters() +{ +} + +// virtual static +void LLImageFilters::initSingleton() +{ + loadAllFilters(); +} + +// static +std::string LLImageFilters::getSysDir() +{ + return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "filters", ""); +} + +void LLImageFilters::loadAllFilters() +{ + // Load system (coming out of the box) filters + loadFiltersFromDir(getSysDir()); +} + +void LLImageFilters::loadFiltersFromDir(const std::string& dir) +{ + LLDirIterator dir_iter(dir, "*.xml"); + while (1) + { + std::string file; + if (!dir_iter.next(file)) + { + break; // no more files + } + + std::string path = gDirUtilp->add(dir, file); + + // For the moment, just output the file found to the log + llinfos << "Merov : loadFiltersFromDir, filter = " << path << llendl; + } +} + + + +//============================================================================ diff --git a/indra/newview/llimagefiltersmanager.h b/indra/newview/llimagefiltersmanager.h new file mode 100644 index 0000000000..52b4a56b9b --- /dev/null +++ b/indra/newview/llimagefiltersmanager.h @@ -0,0 +1,74 @@ +/** + * @file llimagefilters.h + * @brief Load and execute image filters. Mostly used for Flickr at the moment. + * + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2014, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLIMAGEFILTERS_H +#define LL_LLIMAGEFILTERS_H + +#include "llsingleton.h" +#include "llimage.h" +/* +typedef enum e_vignette_mode +{ + VIGNETTE_MODE_NONE = 0, + VIGNETTE_MODE_BLEND = 1, + VIGNETTE_MODE_FADE = 2 +} EVignetteMode; + +typedef enum e_screen_mode +{ + SCREEN_MODE_2DSINE = 0, + SCREEN_MODE_LINE = 1 +} EScreenMode; +*/ +//============================================================================ +// library initialization class + +class LLImageFilters : public LLSingleton<LLImageFilters> +{ + LOG_CLASS(LLImageFilters); +public: + // getFilters(); get a vector of std::string containing the filter names + //LLSD loadFilter(const std::string& filter_name); + //void executeFilter(const LLSD& filter_data, LLPointer<LLImageRaw> raw_image); + +protected: +private: + void loadAllFilters(); + void loadFiltersFromDir(const std::string& dir); + LLSD loadFilter(const std::string& path); + + static std::string getSysDir(); + + friend class LLSingleton<LLImageFilters>; + /*virtual*/ void initSingleton(); + LLImageFilters(); + ~LLImageFilters(); + + // Needed here: + // - a map of filter files with name and path +}; + +#endif diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 9e8623c1f9..3a76773dde 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -98,6 +98,9 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") + # ... and the entire image filters directory + self.path("filters") + # ... and the included spell checking dictionaries pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') if self.prefix(src=pkgdir,dst=""): |