diff options
265 files changed, 31803 insertions, 2527 deletions
@@ -482,3 +482,5 @@ d029faf69f20a23007f32420a1ac6a3b89a6d441 3.7.6-release 83959480cb986522d07b151a0c778ab7f920d41b 3.7.7-release bba9b3722eea08949e4ff69591f736bf0f808434 3.7.8-release a9f2d0cb11f73b06858e6083bb50083becc3f9cd 3.7.9-release +91dae9494b4d147541c7a01902334ba19a7ec05e 3.7.10-release +64799eb298834073a3e9992cd8d27c3cb9d30b10 3.7.11-release diff --git a/BuildParams b/BuildParams index 1c9534ad7c..c2fadf5943 100755 --- a/BuildParams +++ b/BuildParams @@ -55,21 +55,9 @@ Amazon_viewer_channel_suffix = "Amazon" Desura_sourceid = "1208_desura" Desura_viewer_channel_suffix = "Desura" -# Report changes since... -viewer-development.show_changes_since = last_sprint - -# Build Settings -viewer-development.build_debug_release_separately = true - # Notifications - to configure email notices, add a setting like this: # <username>_<reponame>.email = <email-address> -viewer-release.viewer_channel = "Second Life Release" -viewer-release.build_debug_release_separately = true -viewer-release.build_viewer_update_version_manager = true -viewer-release.codeticket_add_context = false - - # ======================================== # mesh-development # ======================================== @@ -121,25 +109,6 @@ viewer-mesh.viewer_channel = "Project Viewer - Mesh" viewer-mesh.viewer_grid = aditi viewer-mesh.email = shining@lists.lindenlab.com -# ======================================== -# viewer-pathfinding -# ======================================== - -viewer-pathfinding.viewer_channel = "Project Viewer - Pathfinding" -viewer-pathfinding.viewer_grid = agni -viewer-pathfinding.build_debug_release_separately = true -viewer-pathfinding.build_CYGWIN_Debug = false -viewer-pathfinding.build_viewer_update_version_manager = false - -# ======================================== -# viewer-materials -# ======================================== - -viewer-materials.viewer_channel = "Second Life Beta Materials" -viewer-materials.build_debug_release_separately = true -viewer-materials.build_CYGWIN_Debug = false -viewer-materials.build_viewer_update_version_manager = false - # ================================================================= # asset delivery 2010 projects # ================================================================= diff --git a/autobuild.xml b/autobuild.xml index dd4c63f474..c813e77288 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1251,14 +1251,14 @@ </map> </map> </map> - <key>libxml</key> + <key>libxml2</key> <map> <key>license</key> <string>mit</string> <key>license_file</key> - <string>LICENSES/libxml.txt</string> + <string>LICENSES/libxml2.txt</string> <key>name</key> - <string>libxml</string> + <string>libxml2</string> <key>platforms</key> <map> <key>linux</key> @@ -1266,9 +1266,9 @@ <key>archive</key> <map> <key>hash</key> - <string>6414642528f42dac1cd9a012c99cd748</string> + <string>fd34e3e818ad7dd26add1f05e6069c11</string> <key>url</key> - <string>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/libxml-2.6.24-linux-20101013.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-libxml/rev/282218/arch/Linux/installer/libxml2-2.7.8-linux-20131009.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -2321,7 +2321,7 @@ <string>make</string> <key>options</key> <array> - <string>-j 2</string> + <string>-j 7</string> </array> </map> <key>configure</key> @@ -2371,7 +2371,7 @@ <string>make</string> <key>options</key> <array> - <string>-j 2</string> + <string>-j 7</string> </array> </map> <key>configure</key> @@ -2419,7 +2419,7 @@ <string>make</string> <key>options</key> <array> - <string>-j 2</string> + <string>-j 7</string> </array> </map> <key>configure</key> diff --git a/doc/contributions.txt b/doc/contributions.txt index 89390d9977..7e8ab46b1a 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -180,6 +180,8 @@ Ansariel Hiller MAINT-2368 STORM-1931 MAINT-2773 + STORM-2011 + MAINT-3187 BUG-3764 STORM-1984 STORM-1979 @@ -313,11 +315,14 @@ Cinder Roxley BUG-3863 OPEN-185 STORM-1703 - STORM-1948 + STORM-1948 + STORM-1831 STORM-1888 STORM-1958 STORM-1952 STORM-1951 + STORM-2035 + STORM-2036 Clara Young Coaldust Numbers VWR-1095 @@ -330,6 +335,9 @@ Cron Stardust VWR-25120 STORM-1075 STORM-1919 + STORM-1920 + OPEN-209 + STORM-2017 Cypren Christenson STORM-417 Dante Tucker @@ -519,8 +527,16 @@ Ima Mechanique STORM-959 STORM-1175 STORM-1708 + STORM-1831 + STORM-1832 STORM-1855 + VWR-10791 VWR-20553 + VWR-19213 + VWR-22401 + VWR-23739 + VWR-24766 + VWR-28065 Imnotgoing Sideways Inma Rau Innula Zenovka @@ -663,6 +679,7 @@ Jonathan Yap STORM-1809 STORM-1793 STORM-1810 + STORM-68 STORM-1838 STORM-1892 STORM-1894 @@ -673,12 +690,15 @@ Jonathan Yap STORM-1858 STORM-1862 STORM-1918 + STORM-1915 STORM-1929 STORM-1953 OPEN-161 STORM-1953 STORM-1957 STORM-1993 + STORM-2017 + STORM-2007 STORM-1980 OPEN-113 STORM-1975 @@ -691,6 +711,8 @@ Jonathan Yap STORM-1987 STORM-1986 STORM-1981 + STORM-2015 + STORM-2018 Kadah Coba STORM-1060 STORM-1843 @@ -744,6 +766,7 @@ Kunnis Basiat Lance Corrimal STORM-1910 VWR-25269 + STORM-2008 Latif Khalifa VWR-5370 leliel Mirihi @@ -960,6 +983,7 @@ Nicky Dasmijn OPEN-187 STORM-1937 OPEN-187 + STORM-2010 Nicky Perian OPEN-1 STORM-1087 @@ -1157,6 +1181,7 @@ snowy Sidran Sovereign Engineer MAINT-2334 OPEN-189 + STORM-1972 OPEN-195 SpacedOut Frye VWR-34 @@ -1198,6 +1223,7 @@ Takeda Terrawyng TankMaster Finesmith OPEN-140 OPEN-142 + OPEN-154 STORM-1100 STORM-1258 STORM-1602 @@ -1417,7 +1443,3 @@ Zipherius Turas VWR-77 Zoex Flanagan - - - - diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 1d78638143..6a0f7a214c 100755 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -174,12 +174,12 @@ if (LINUX) endif (WORD_SIZE EQUAL 32) add_definitions(-mfpmath=sse) #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 - if (NOT STANDALONE) + if (NOT USESYSTEMLIBS) # this stops us requiring a really recent glibc at runtime add_definitions(-fno-stack-protector) # linking can be very memory-hungry, especially the final viewer link set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") - endif (NOT STANDALONE) + endif (NOT USESYSTEMLIBS) set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}") @@ -226,14 +226,14 @@ if (LINUX OR DARWIN) endif (LINUX OR DARWIN) -if (STANDALONE) - add_definitions(-DLL_STANDALONE=1) +if (USESYSTEMLIBS) + add_definitions(-DLL_USESYSTEMLIBS=1) if (LINUX AND ${ARCH} STREQUAL "i686") add_definitions(-march=pentiumpro) endif (LINUX AND ${ARCH} STREQUAL "i686") -else (STANDALONE) +else (USESYSTEMLIBS) set(${ARCH}_linux_INCLUDES ELFIO atk-1.0 @@ -242,6 +242,6 @@ else (STANDALONE) gtk-2.0 pango-1.0 ) -endif (STANDALONE) +endif (USESYSTEMLIBS) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index a87027f5f6..1a01671002 100755 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -8,9 +8,9 @@ set(APR_FIND_REQUIRED ON) set(APRUTIL_FIND_QUIETLY ON) set(APRUTIL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindAPR) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(apr_suite) if (WINDOWS) if (LLCOMMON_LINK_SHARED) @@ -52,4 +52,4 @@ else (STANDALONE) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt) endif (LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index d23bc2f9c6..876b7f82a8 100755 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -1,13 +1,13 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(OGG REQUIRED ogg) pkg_check_modules(VORBIS REQUIRED vorbis) pkg_check_modules(VORBISENC REQUIRED vorbisenc) pkg_check_modules(VORBISFILE REQUIRED vorbisfile) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(ogg-vorbis) set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS}) @@ -32,7 +32,7 @@ else (STANDALONE) set(VORBISENC_LIBRARIES vorbisenc) set(VORBISFILE_LIBRARIES vorbisfile) endif (WINDOWS) -endif (STANDALONE) +endif (USESYSTEMLIBS) link_directories( ${VORBIS_LIBRARY_DIRS} diff --git a/indra/cmake/BerkeleyDB.cmake b/indra/cmake/BerkeleyDB.cmake index 57b53f46ff..5f6b644a15 100755 --- a/indra/cmake/BerkeleyDB.cmake +++ b/indra/cmake/BerkeleyDB.cmake @@ -3,9 +3,9 @@ set(DB_FIND_QUIETLY ON) set(DB_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindBerkeleyDB) -else (STANDALONE) +else (USESYSTEMLIBS) if (LINUX) # Need to add dependency pthread explicitely to support ld.gold. use_prebuilt_binary(db) @@ -14,4 +14,4 @@ else (STANDALONE) set(DB_LIBRARIES db-4.2) endif (LINUX) set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index cff762e1f0..50ac27d402 100755 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -4,7 +4,7 @@ include(Prebuilt) set(Boost_FIND_QUIETLY ON) set(Boost_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindBoost) set(BOOST_CONTEXT_LIBRARY boost_context-mt) @@ -14,7 +14,7 @@ if (STANDALONE) set(BOOST_SIGNALS_LIBRARY boost_signals-mt) set(BOOST_SYSTEM_LIBRARY boost_system-mt) set(BOOST_THREAD_LIBRARY boost_thread-mt) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(boost) set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) set(BOOST_VERSION "1.52") @@ -111,4 +111,4 @@ else (STANDALONE) optimized boost_thread-mt debug boost_thread-mt-d) endif (WINDOWS) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/CARes.cmake b/indra/cmake/CARes.cmake index b0dac5b12f..baa55aa49d 100755 --- a/indra/cmake/CARes.cmake +++ b/indra/cmake/CARes.cmake @@ -5,9 +5,9 @@ include(Prebuilt) set(CARES_FIND_QUIETLY ON) set(CARES_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindCARes) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(ares) add_definitions("-DCARES_STATICLIB") if (WINDOWS) @@ -18,4 +18,4 @@ else (STANDALONE) set(CARES_LIBRARIES cares) endif (WINDOWS) set(CARES_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/ares) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 9aba08e573..04afae594d 100755 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(CURL_FIND_QUIETLY ON) set(CURL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindCURL) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(curl) if (WINDOWS) set(CURL_LIBRARIES @@ -16,4 +16,4 @@ else (STANDALONE) set(CURL_LIBRARIES libcurl.a) endif (WINDOWS) set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index f98e88b697..4f1b6640c2 100755 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -374,9 +374,9 @@ copy_if_different( ) set(third_party_targets ${third_party_targets} ${out_targets}) -if(NOT STANDALONE) +if(NOT USESYSTEMLIBS) add_custom_target( stage_third_party_libs ALL DEPENDS ${third_party_targets} ) -endif(NOT STANDALONE) +endif(NOT USESYSTEMLIBS) diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake index 83c08d3350..d148a35a5b 100755 --- a/indra/cmake/DBusGlib.cmake +++ b/indra/cmake/DBusGlib.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1) @@ -18,7 +18,7 @@ elseif (LINUX) gobject-2.0 glib-2.0 ) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (DBUSGLIB_FOUND) set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.") diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index acb15dc623..c1155531ff 100755 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(EXPAT_FIND_QUIETLY ON) set(EXPAT_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindEXPAT) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(expat) if (WINDOWS) set(EXPAT_LIBRARIES libexpatMT) @@ -14,4 +14,4 @@ else (STANDALONE) set(EXPAT_LIBRARIES expat) endif (WINDOWS) set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/ExamplePlugin.cmake b/indra/cmake/ExamplePlugin.cmake index 599787ad21..5d826c1f66 100755 --- a/indra/cmake/ExamplePlugin.cmake +++ b/indra/cmake/ExamplePlugin.cmake @@ -2,13 +2,13 @@ include(Linking) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) set(EXAMPLEPLUGIN OFF CACHE BOOL "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") -else (STANDALONE) +else (USESYSTEMLIBS) set(EXAMPLEPLUGIN ON CACHE BOOL "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") -endif (STANDALONE) +endif (USESYSTEMLIBS) if (WINDOWS) elseif (DARWIN) diff --git a/indra/cmake/FMODEX.cmake b/indra/cmake/FMODEX.cmake index 65bc1cabeb..720933d1b7 100644 --- a/indra/cmake/FMODEX.cmake +++ b/indra/cmake/FMODEX.cmake @@ -4,17 +4,17 @@ # When building using proprietary binaries though (i.e. having access to LL private servers), # we always build with FMODEX. # Open source devs should use the -DFMODEX:BOOL=ON then if they want to build with FMOD, whether -# they are using STANDALONE or not. +# they are using USESYSTEMLIBS or not. if (INSTALL_PROPRIETARY) set(FMODEX ON CACHE BOOL "Using FMOD Ex sound library.") endif (INSTALL_PROPRIETARY) if (FMODEX) - if (STANDALONE) + if (USESYSTEMLIBS) # In that case, we use the version of the library installed on the system set(FMODEX_FIND_REQUIRED ON) include(FindFMODEX) - else (STANDALONE) + else (USESYSTEMLIBS) if (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) # If the path have been specified in the arguments, use that set(FMODEX_LIBRARIES ${FMODEX_LIBRARY}) @@ -41,6 +41,6 @@ if (FMODEX) set(FMODEX_LIBRARIES ${FMODEX_LIBRARY}) set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodex) endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) - endif (STANDALONE) + endif (USESYSTEMLIBS) endif (FMODEX) diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake index 0b056ada58..9398779cff 100755 --- a/indra/cmake/FindJsonCpp.cmake +++ b/indra/cmake/FindJsonCpp.cmake @@ -23,10 +23,10 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER} # Try to find a library that was compiled with the same compiler version as we currently use. SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so) -IF (STANDALONE) +IF (USESYSTEMLIBS) # On standalone, assume that the system installed library was compiled with the used compiler. SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so) -ENDIF (STANDALONE) +ENDIF (USESYSTEMLIBS) FIND_LIBRARY(JSONCPP_LIBRARY NAMES ${JSONCPP_NAMES} PATHS /usr/lib /usr/local/lib diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index c9a90a9a8d..02c5b37f28 100755 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -1,14 +1,14 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(FREETYPE REQUIRED freetype2) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(freetype) set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) set(FREETYPE_LIBRARIES freetype) -endif (STANDALONE) +endif (USESYSTEMLIBS) link_directories(${FREETYPE_LIBRARY_DIRS}) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 0a3dd976b4..a749644202 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -1,8 +1,8 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(glext) use_prebuilt_binary(glh_linear) set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -endif (NOT STANDALONE) +endif (NOT USESYSTEMLIBS) diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index 911dbe4017..d5262f2efa 100755 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -4,8 +4,8 @@ include(Prebuilt) set(GLH_FIND_REQUIRED TRUE) set(GLH_FIND_QUIETLY TRUE) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindGLH) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(glh_linear) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 6bdbaf621e..3683768af9 100755 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -1,9 +1,9 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(GLOD) -endif (NOT STANDALONE) +endif (NOT USESYSTEMLIBS) set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) set(GLOD_LIBRARIES GLOD) diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake index d2d0699bcd..3fbc40ef8f 100755 --- a/indra/cmake/GStreamer010Plugin.cmake +++ b/indra/cmake/GStreamer010Plugin.cmake @@ -1,15 +1,15 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10) pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10) elseif (LINUX) use_prebuilt_binary(gstreamer) - # possible libxml should have its own .cmake file instead - use_prebuilt_binary(libxml) + # possible libxml2 should have its own .cmake file instead + use_prebuilt_binary(libxml2) set(GSTREAMER010_FOUND ON FORCE BOOL) set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL) set(GSTREAMER010_INCLUDE_DIRS @@ -26,7 +26,7 @@ elseif (LINUX) gthread-2.0 glib-2.0 ) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND) set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.") diff --git a/indra/cmake/Glui.cmake b/indra/cmake/Glui.cmake index f62a56856c..db353a91ec 100755 --- a/indra/cmake/Glui.cmake +++ b/indra/cmake/Glui.cmake @@ -2,14 +2,14 @@ include(Linking) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) set(GLUI OFF CACHE BOOL "GLUI support for the llplugin/llmedia test apps.") -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(glui) set(GLUI ON CACHE BOOL "GLUI support for the llplugin/llmedia test apps.") -endif (STANDALONE) +endif (USESYSTEMLIBS) if (LINUX) set(GLUI ON CACHE BOOL diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake index 7f9ba4ea8e..829e1ac08a 100755 --- a/indra/cmake/GoogleBreakpad.cmake +++ b/indra/cmake/GoogleBreakpad.cmake @@ -1,10 +1,10 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON) include(FindGoogleBreakpad) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(google_breakpad) if (DARWIN) set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler) @@ -18,5 +18,5 @@ else (STANDALONE) # yes, this does look dumb, no, it's not incorrect # set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/include/google_breakpad/google_breakpad") -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index f3fd008e49..c1faeb9325 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -5,9 +5,9 @@ include(Prebuilt) # set ON or OFF as desired. set (USE_TCMALLOC OFF) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindGooglePerfTools) -else (STANDALONE) +else (USESYSTEMLIBS) if (WINDOWS) if (USE_TCMALLOC) use_prebuilt_binary(gperftools) @@ -34,7 +34,7 @@ else (STANDALONE) ${LIBS_PREBUILT_DIR}/include) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (GOOGLE_PERFTOOLS_FOUND) # XXX Disable temporarily, until we have compilation issues on 64-bit diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 0c9cf93316..ef74d95b2a 100755 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(HUNSPELL_FIND_QUIETLY ON) set(HUNSPELL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindHUNSPELL) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(libhunspell) if (WINDOWS) set(HUNSPELL_LIBRARY libhunspell) @@ -19,4 +19,4 @@ else (STANDALONE) endif() set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell) use_prebuilt_binary(dictionaries) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index 4f99efd602..d6da22aecc 100755 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -5,9 +5,9 @@ include(Linking) set(JPEG_FIND_QUIETLY ON) set(JPEG_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindJPEG) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(jpeglib) if (LINUX) set(JPEG_LIBRARIES jpeg) @@ -17,4 +17,4 @@ else (STANDALONE) set(JPEG_LIBRARIES jpeglib) endif (LINUX) set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 7ad73e5683..0aab2d6634 100755 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -5,9 +5,9 @@ include(Prebuilt) set(JSONCPP_FIND_QUIETLY ON) set(JSONCPP_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindJsonCpp) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(jsoncpp) if (WINDOWS) set(JSONCPP_LIBRARIES @@ -19,4 +19,4 @@ else (STANDALONE) set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a) endif (WINDOWS) set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json") -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 068aeea212..804624f5ec 100755..100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -202,9 +202,9 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files}) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}") - if(STANDALONE) + if(USESYSTEMLIBS) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") - endif(STANDALONE) + endif(USESYSTEMLIBS) # The following was copied to llcorehttp/CMakeLists.txt's texture_load target. # Any changes made here should be replicated there. @@ -275,10 +275,10 @@ MACRO(SET_TEST_PATH LISTVAR) set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib) ELSE(WINDOWS) # Linux uses a single staging directory anyway. - IF (STANDALONE) + IF (USESYSTEMLIBS) set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib) - ELSE (STANDALONE) + ELSE (USESYSTEMLIBS) set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) - ENDIF (STANDALONE) + ENDIF (USESYSTEMLIBS) ENDIF(WINDOWS) ENDMACRO(SET_TEST_PATH) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 0d87ff579a..67c2115237 100755 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -6,21 +6,30 @@ include(Boost) use_prebuilt_binary(colladadom) use_prebuilt_binary(pcre) -use_prebuilt_binary(libxml) set(LLPRIMITIVE_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llprimitive ) if (WINDOWS) - set(LLPRIMITIVE_LIBRARIES + set(LLPRIMITIVE_LIBRARIES debug llprimitive optimized llprimitive debug libcollada14dom22-d optimized libcollada14dom22 ${BOOST_SYSTEM_LIBRARIES} ) +elseif (LINUX) + use_prebuilt_binary(libxml2) + set(LLPRIMITIVE_LIBRARIES + llprimitive + collada14dom + minizip + xml2 + pcrecpp + pcre + ) else (WINDOWS) - set(LLPRIMITIVE_LIBRARIES + set(LLPRIMITIVE_LIBRARIES llprimitive collada14dom minizip diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index ad732ef650..ba07a80f05 100755 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -4,7 +4,7 @@ include(Variables) include(GLEXT) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindSDL) # This should be done by FindSDL. Sigh. @@ -13,14 +13,14 @@ if (STANDALONE) SDL_INCLUDE_DIR SDL_LIBRARY ) -else (STANDALONE) +else (USESYSTEMLIBS) if (LINUX) use_prebuilt_binary(SDL) set (SDL_FOUND TRUE) set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux) set (SDL_LIBRARY SDL directfb fusion direct) endif (LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (SDL_FOUND) include_directories(${SDL_INCLUDE_DIR}) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index be6fe415f2..e72845db53 100755 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -4,10 +4,10 @@ include(Prebuilt) set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.") if (NDOF) - if (STANDALONE) + if (USESYSTEMLIBS) set(NDOF_FIND_REQUIRED ON) include(FindNDOF) - else (STANDALONE) + else (USESYSTEMLIBS) use_prebuilt_binary(ndofdev) if (WINDOWS) @@ -18,7 +18,7 @@ if (NDOF) set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev) set(NDOF_FOUND 1) - endif (STANDALONE) + endif (USESYSTEMLIBS) endif (NDOF) if (NDOF_FOUND) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index a3e1fb924e..c084d68de7 100755 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -10,14 +10,14 @@ endif (LINUX) if (OPENAL) set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL") - if (STANDALONE) + if (USESYSTEMLIBS) include(FindPkgConfig) include(FindOpenAL) pkg_check_modules(OPENAL_LIB REQUIRED openal) pkg_check_modules(FREEALUT_LIB REQUIRED freealut) - else (STANDALONE) + else (USESYSTEMLIBS) use_prebuilt_binary(openal_soft) - endif (STANDALONE) + endif (USESYSTEMLIBS) if(WINDOWS) set(OPENAL_LIBRARIES OpenAL32 diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index fcc82c2f49..bf0bde2ba7 100755 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(OPENJPEG_FIND_QUIETLY ON) set(OPENJPEG_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindOpenJPEG) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(openjpeg) if(WINDOWS) @@ -19,4 +19,4 @@ else (STANDALONE) endif(WINDOWS) set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 2704912eb5..5b469f74f9 100755 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(OpenSSL_FIND_QUIETLY ON) set(OpenSSL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindOpenSSL) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(openSSL) if (WINDOWS) set(OPENSSL_LIBRARIES ssleay32 libeay32) @@ -14,7 +14,7 @@ else (STANDALONE) set(OPENSSL_LIBRARIES ssl crypto) endif (WINDOWS) set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (LINUX) set(CRYPTO_LIBRARIES crypto) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 913c575672..173d59391e 100755 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(PNG_FIND_QUIETLY ON) set(PNG_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPNG) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(libpng) if (WINDOWS) set(PNG_LIBRARIES libpng15) @@ -18,4 +18,4 @@ else (STANDALONE) set(PNG_LIBRARIES png15) set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng15) endif() -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index ac0cbde253..e548805148 100755 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -17,11 +17,11 @@ endif(INSTALL_PROPRIETARY) # of previous attempts is serialized in the file # ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) macro (use_prebuilt_binary _binary) - if (NOT DEFINED STANDALONE_${_binary}) - set(STANDALONE_${_binary} ${STANDALONE}) - endif (NOT DEFINED STANDALONE_${_binary}) + if (NOT DEFINED USESYSTEMLIBS_${_binary}) + set(USESYSTEMLIBS_${_binary} ${USESYSTEMLIBS}) + endif (NOT DEFINED USESYSTEMLIBS_${_binary}) - if (NOT STANDALONE_${_binary}) + if (NOT USESYSTEMLIBS_${_binary}) if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") file(READ ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${_binary}_installed") if(DEBUG_PREBUILT) @@ -52,7 +52,7 @@ macro (use_prebuilt_binary _binary) "Failed to download or unpack prebuilt '${_binary}'." " Process returned ${${_binary}_installed}.") endif (NOT ${_binary}_installed EQUAL 0) - endif (NOT STANDALONE_${_binary}) + endif (NOT USESYSTEMLIBS_${_binary}) endmacro (use_prebuilt_binary _binary) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake index 360a971058..cce27f1bdd 100755 --- a/indra/cmake/PulseAudio.cmake +++ b/indra/cmake/PulseAudio.cmake @@ -4,7 +4,7 @@ include(Prebuilt) set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.") if (PULSEAUDIO) - if (STANDALONE) + if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(PULSEAUDIO libpulse) @@ -20,7 +20,7 @@ if (PULSEAUDIO) set(PULSEAUDIO_LIBRARIES # none needed! ) - endif (STANDALONE) + endif (USESYSTEMLIBS) endif (PULSEAUDIO) if (PULSEAUDIO_FOUND) diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake index 7488e9dcb0..e11a3c3314 100755 --- a/indra/cmake/Tut.cmake +++ b/indra/cmake/Tut.cmake @@ -1,6 +1,6 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(tut) -endif(NOT STANDALONE) +endif(NOT USESYSTEMLIBS) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index d0fd4df03a..58acdc22bd 100755 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include(FreeType) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) if (LINUX) @@ -31,7 +31,7 @@ if (STANDALONE) list(APPEND UI_LIBRARIES ${${pkg}_LIBRARIES}) add_definitions(${${pkg}_CFLAGS_OTHERS}) endforeach(pkg) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(gtk-atk-pango-glib) if (LINUX) set(UI_LIBRARIES @@ -59,7 +59,7 @@ else (STANDALONE) foreach(include ${${LL_ARCH}_INCLUDES}) include_directories(${LIBS_PREBUILT_DIR}/include/${include}) endforeach(include) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (LINUX) add_definitions(-DLL_GTK=1 -DLL_X11=1) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 22d0a7f0fe..963b1bd386 100755 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -183,7 +183,7 @@ if (XCODE_VERSION GREATER 4.2) endif (XCODE_VERSION GREATER 4.2) set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") -set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") +set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.") set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 5b00c989a4..d4be24799f 100755 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -1,10 +1,10 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(libhunspell) use_prebuilt_binary(libuuid) use_prebuilt_binary(slvoice) use_prebuilt_binary(fontconfig) -endif(NOT STANDALONE) +endif(NOT USESYSTEMLIBS) diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake index d9df78bfc8..76f2c148db 100755 --- a/indra/cmake/WebKitLibPlugin.cmake +++ b/indra/cmake/WebKitLibPlugin.cmake @@ -2,7 +2,7 @@ include(Linking) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) # The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny. find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED) include(${QT_USE_FILE}) @@ -28,11 +28,11 @@ if (STANDALONE) list(APPEND QT_PLUGIN_LIBRARIES jpeg) set(WEBKITLIBPLUGIN OFF CACHE BOOL "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(llqtwebkit) set(WEBKITLIBPLUGIN ON CACHE BOOL "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") -endif (STANDALONE) +endif (USESYSTEMLIBS) if (WINDOWS) set(WEBKIT_PLUGIN_LIBRARIES diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 5bd4848245..3a0caa0a06 100755 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(XMLRPCEPI_FIND_QUIETLY ON) set(XMLRPCEPI_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindXmlRpcEpi) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(xmlrpc-epi) if (WINDOWS) set(XMLRPCEPI_LIBRARIES @@ -17,4 +17,4 @@ else (STANDALONE) set(XMLRPCEPI_LIBRARIES xmlrpc-epi) endif (WINDOWS) set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/ZLIB.cmake b/indra/cmake/ZLIB.cmake index 48e5130ad5..b99a8644c9 100755 --- a/indra/cmake/ZLIB.cmake +++ b/indra/cmake/ZLIB.cmake @@ -5,9 +5,9 @@ set(ZLIB_FIND_REQUIRED ON) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindZLIB) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(zlib) if (WINDOWS) set(ZLIB_LIBRARIES @@ -19,4 +19,4 @@ else (STANDALONE) if (WINDOWS OR LINUX) set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib) endif (WINDOWS OR LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index 36a7d38bb7..8a83ac498f 100755 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -7,6 +7,7 @@ project (llimage_libtest) include(00-Common) include(LLCommon) include(LLImage) +include(LLMath) include(LLImageJ2COJ) include(LLKDU) include(LLVFS) @@ -15,6 +16,7 @@ include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS} ${LLIMAGE_INCLUDE_DIRS} + ${LLMATH_INCLUDE_DIRS} ) include_directories(SYSTEM ${LLCOMMON_SYSTEM_INCLUDE_DIRS} @@ -64,6 +66,7 @@ endif (DARWIN) target_link_libraries(llimage_libtest ${LLCOMMON_LIBRARIES} ${LLVFS_LIBRARIES} + ${LLMATH_LIBRARIES} ${LLIMAGE_LIBRARIES} ${LLKDU_LIBRARIES} ${KDU_LIBRARY} diff --git a/indra/integration_tests/llimage_libtest/filters/1970colorize.xml b/indra/integration_tests/llimage_libtest/filters/1970colorize.xml new file mode 100644 index 0000000000..0dab2489a0 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/1970colorize.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/integration_tests/llimage_libtest/filters/autocontrast.xml b/indra/integration_tests/llimage_libtest/filters/autocontrast.xml new file mode 100755 index 0000000000..ec3d7561bd --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/autocontrast.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/badtrip.xml b/indra/integration_tests/llimage_libtest/filters/badtrip.xml new file mode 100755 index 0000000000..14ee0baff3 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/badtrip.xml @@ -0,0 +1,36 @@ +<llsd> + <array> + <array> + <string>grayscale</string> + </array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>posterize</string> + <real>10.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>gradient</string> + </array> + <array> + <string>colorize</string> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.15</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/blowhighlights.xml b/indra/integration_tests/llimage_libtest/filters/blowhighlights.xml new file mode 100644 index 0000000000..2474a1b953 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/blowhighlights.xml @@ -0,0 +1,25 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>uniform</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + </array> + <array> + <string>gamma</string> + <real>0.25</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/blur.xml b/indra/integration_tests/llimage_libtest/filters/blur.xml new file mode 100644 index 0000000000..addd056855 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/blur.xml @@ -0,0 +1,7 @@ +<llsd> + <array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/brighten.xml b/indra/integration_tests/llimage_libtest/filters/brighten.xml new file mode 100755 index 0000000000..9b4232229f --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/brighten.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>brighten</string> + <real>0.5</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/colorize.xml b/indra/integration_tests/llimage_libtest/filters/colorize.xml new file mode 100644 index 0000000000..72e58b0ffe --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/colorize.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>10.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>0.5</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/colortransform.xml b/indra/integration_tests/llimage_libtest/filters/colortransform.xml new file mode 100644 index 0000000000..de4bebcce2 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/colortransform.xml @@ -0,0 +1,16 @@ +<llsd> + <array> + <array> + <string>colortransform</string> + <real>0.2125</real> + <real>0.7154</real> + <real>0.0721</real> + <real>0.2125</real> + <real>0.7154</real> + <real>0.0721</real> + <real>0.2125</real> + <real>0.7154</real> + <real>0.0721</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/contrast.xml b/indra/integration_tests/llimage_libtest/filters/contrast.xml new file mode 100644 index 0000000000..00746b8a9e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/contrast.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>contrast</string> + <real>1.5</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/convolve.xml b/indra/integration_tests/llimage_libtest/filters/convolve.xml new file mode 100644 index 0000000000..6e65b5f88a --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/convolve.xml @@ -0,0 +1,18 @@ +<llsd> + <array> + <array> + <string>convolve</string> + <real>1.0</real> + <real>0.0</real> + <real>4.0</real> + <real>1.0</real> + <real>4.0</real> + <real>1.0</real> + <real>0.0</real> + <real>1.0</real> + <real>4.0</real> + <real>1.0</real> + <real>4.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/darken.xml b/indra/integration_tests/llimage_libtest/filters/darken.xml new file mode 100755 index 0000000000..5cec3589b6 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/darken.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>darken</string> + <real>0.5</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/dodgeandburn.xml b/indra/integration_tests/llimage_libtest/filters/dodgeandburn.xml new file mode 100644 index 0000000000..0e2e0ad68c --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/dodgeandburn.xml @@ -0,0 +1,47 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.4</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>2.0</real> + </array> + <array> + <string>contrast</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>-0.8</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>2.0</real> + </array> + <array> + <string>contrast</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/edges.xml b/indra/integration_tests/llimage_libtest/filters/edges.xml new file mode 100644 index 0000000000..a66b81d01e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/edges.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>gradient</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>2.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/focus.xml b/indra/integration_tests/llimage_libtest/filters/focus.xml new file mode 100644 index 0000000000..d8525fea62 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/focus.xml @@ -0,0 +1,39 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>0.4</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>2.0</real> + </array> + <array> + <string>sharpen</string> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>2.0</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/gamma.xml b/indra/integration_tests/llimage_libtest/filters/gamma.xml new file mode 100644 index 0000000000..19af09b046 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/gamma.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>gamma</string> + <real>1.7</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/grayscale.xml b/indra/integration_tests/llimage_libtest/filters/grayscale.xml new file mode 100644 index 0000000000..984312c4fd --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/grayscale.xml @@ -0,0 +1,14 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</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/integration_tests/llimage_libtest/filters/heatwave.xml b/indra/integration_tests/llimage_libtest/filters/heatwave.xml new file mode 100644 index 0000000000..a99f41c833 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/heatwave.xml @@ -0,0 +1,38 @@ +<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>stencil</string> + <string>vignette</string> + <string>fade</string> + <real>0.5</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>4.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>1.0</real> + <real>0.4</real> + <real>0.0</real> + <real>0.2</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml b/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml new file mode 100644 index 0000000000..21cab70e54 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/horizontalscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.015</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/julesverne.xml b/indra/integration_tests/llimage_libtest/filters/julesverne.xml new file mode 100644 index 0000000000..981e221da9 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/julesverne.xml @@ -0,0 +1,20 @@ +<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>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.02</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/lensflare.xml b/indra/integration_tests/llimage_libtest/filters/lensflare.xml new file mode 100644 index 0000000000..0b5af9c82b --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/lensflare.xml @@ -0,0 +1,131 @@ +<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>stencil</string> + <string>gradient</string> + <string>add</string> + <real>1.0</real> + <real>0.0</real> + <real>-1.0</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.1</real> + <real>0.1</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.5</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.6</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.6</real> + <real>0.6</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.5</real> + <real>-0.5</real> + <real>0.10</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.6</real> + <real>-0.6</real> + <real>0.05</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.4</real> + <real>-0.4</real> + <real>0.025</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/lightleak.xml b/indra/integration_tests/llimage_libtest/filters/lightleak.xml new file mode 100755 index 0000000000..6fe496506e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/lightleak.xml @@ -0,0 +1,78 @@ +<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>brighten</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>add</string> + <real>1.0</real> + <real>0.0</real> + <real>-1.0</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.1</real> + <real>0.1</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.5</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.8</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>1.0</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.8</real> + <real>0.8</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/linearize.xml b/indra/integration_tests/llimage_libtest/filters/linearize.xml new file mode 100755 index 0000000000..23d0290e07 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/linearize.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/miniature.xml b/indra/integration_tests/llimage_libtest/filters/miniature.xml new file mode 100755 index 0000000000..9aa8a87c6f --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/miniature.xml @@ -0,0 +1,118 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.02</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>1.02</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>saturate</string> + <real>1.2</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>0.25</real> + <real>0.0</real> + <real>0.0</real> + <real>0.25</real> + <real>2.0</real> + </array> + <array> + <string>sharpen</string> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>-1.0</real> + <real>0.0</real> + <real>-0.25</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.25</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/newsscreen.xml b/indra/integration_tests/llimage_libtest/filters/newsscreen.xml new file mode 100755 index 0000000000..50ed27c6db --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/newsscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>2Dsine</string> + <real>0.015</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/overcast.xml b/indra/integration_tests/llimage_libtest/filters/overcast.xml new file mode 100644 index 0000000000..dce5ab3e9e --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/overcast.xml @@ -0,0 +1,24 @@ +<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>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/integration_tests/llimage_libtest/filters/pixelate.xml b/indra/integration_tests/llimage_libtest/filters/pixelate.xml new file mode 100755 index 0000000000..f643419aa0 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/pixelate.xml @@ -0,0 +1,35 @@ +<llsd> + <array> + <array> + <string>blur</string> + </array> + <array> + <string>darken</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>0.9</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>posterize</string> + <real>4.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/posterize.xml b/indra/integration_tests/llimage_libtest/filters/posterize.xml new file mode 100755 index 0000000000..4d03df3c66 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/posterize.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>posterize</string> + <real>10.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml b/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml new file mode 100644 index 0000000000..e25029720f --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/rotatecolors180.xml @@ -0,0 +1,8 @@ +<llsd> + <array> + <array> + <string>rotate</string> + <real>180.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/saturate.xml b/indra/integration_tests/llimage_libtest/filters/saturate.xml new file mode 100644 index 0000000000..b77f07a037 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/saturate.xml @@ -0,0 +1,8 @@ +<llsd> + <array> + <array> + <string>saturate</string> + <real>3.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/sepia.xml b/indra/integration_tests/llimage_libtest/filters/sepia.xml new file mode 100644 index 0000000000..0304ead015 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/sepia.xml @@ -0,0 +1,14 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>sepia</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/sharpen.xml b/indra/integration_tests/llimage_libtest/filters/sharpen.xml new file mode 100644 index 0000000000..6d3f9ae1a2 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/sharpen.xml @@ -0,0 +1,7 @@ +<llsd> + <array> + <array> + <string>sharpen</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml b/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml new file mode 100644 index 0000000000..6cd1a96185 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/slantedscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.015</real> + <real>45.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/spotlight.xml b/indra/integration_tests/llimage_libtest/filters/spotlight.xml new file mode 100644 index 0000000000..203130bdee --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/spotlight.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/integration_tests/llimage_libtest/filters/stencilgradient.xml b/indra/integration_tests/llimage_libtest/filters/stencilgradient.xml new file mode 100644 index 0000000000..d22809a9bf --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stencilgradient.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>-1.0</real> + <real>0.0</real> + <real>1.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/stencilscanlines.xml b/indra/integration_tests/llimage_libtest/filters/stencilscanlines.xml new file mode 100644 index 0000000000..3ce428503d --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stencilscanlines.xml @@ -0,0 +1,22 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>scanlines</string> + <string>blend</string> + <real>0.0</real> + <real>0.5</real> + <real>0.1</real> + <real>45.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml b/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml new file mode 100644 index 0000000000..7d72f0ed93 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stenciluniform.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>uniform</string> + <string>blend</string> + <real>0.0</real> + <real>0.5</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/stencilvignette.xml b/indra/integration_tests/llimage_libtest/filters/stencilvignette.xml new file mode 100644 index 0000000000..d30637fef5 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/stencilvignette.xml @@ -0,0 +1,24 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>0.5</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>10.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/thematrix.xml b/indra/integration_tests/llimage_libtest/filters/thematrix.xml new file mode 100755 index 0000000000..af9a5eced8 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/thematrix.xml @@ -0,0 +1,42 @@ +<llsd> + <array> + <array> + <string>grayscale</string> + </array> + <array> + <string>linearize</string> + <real>0.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>posterize</string> + <real>50.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>gradient</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.025</real> + <real>90.0</real> + </array> + <array> + <string>colorize</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.1</real> + <real>0.2</real> + <real>0.2</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/toycamera.xml b/indra/integration_tests/llimage_libtest/filters/toycamera.xml new file mode 100755 index 0000000000..4e76f6b2fb --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/toycamera.xml @@ -0,0 +1,46 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>fade</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.2</real> + <real>3.0</real> + </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> + <string>contrast</string> + <real>1.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>2.0</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml b/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml new file mode 100644 index 0000000000..0768d1d7e1 --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/verticalscreen.xml @@ -0,0 +1,20 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.015</real> + <real>90.0</real> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/filters/video.xml b/indra/integration_tests/llimage_libtest/filters/video.xml new file mode 100755 index 0000000000..fe17f3950a --- /dev/null +++ b/indra/integration_tests/llimage_libtest/filters/video.xml @@ -0,0 +1,44 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>darken</string> + <real>0.15</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>uniform</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.02</real> + <real>0.0</real> + </array> + <array> + <string>gamma</string> + <real>0.25</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 034c816742..3d27b4a5b5 100755 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -32,6 +32,7 @@ // Linden library includes #include "llimage.h" +#include "llimagefilter.h" #include "llimagejpeg.h" #include "llimagepng.h" #include "llimagebmp.h" @@ -39,6 +40,8 @@ #include "llimagej2c.h" #include "lldir.h" #include "lldiriterator.h" +#include "v4coloru.h" +#include "llsdserialize.h" // system libraries #include <iostream> @@ -83,6 +86,8 @@ static const char USAGE[] = "\n" " -rev, --reversible\n" " Set the compression to be lossless (reversible in j2c parlance).\n" " Only valid for output j2c images.\n" +" -f, --filter <file>\n" +" Apply the filter <file> to the input images.\n" " -log, --logmetrics <metric>\n" " Log performance data for <metric>. Results in <metric>.slp\n" " Note: so far, only ImageCompressionTester has been tested.\n" @@ -99,7 +104,7 @@ static bool sAllDone = false; // Create an empty formatted image instance of the correct type from the filename LLPointer<LLImageFormatted> create_image(const std::string &filename) { - std::string exten = gDirUtilp->getExtension(filename); + std::string exten = gDirUtilp->getExtension(filename); LLPointer<LLImageFormatted> image = LLImageFormatted::createFromExtension(exten); return image; } @@ -350,6 +355,7 @@ int main(int argc, char** argv) int blocks_size = -1; int levels = 0; bool reversible = false; + std::string filter_name = ""; // Init whatever is necessary ll_init_apr(); @@ -523,7 +529,26 @@ int main(int argc, char** argv) break; } } - else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-a")) + else if (!strcmp(argv[arg], "--filter") || !strcmp(argv[arg], "-f")) + { + // '--filter' needs to be specified with a named filter argument + if ((arg + 1) < argc) + { + filter_name = argv[arg+1]; + } + if (((arg + 1) >= argc) || (filter_name[0] == '-')) + { + // We don't have an argument left in the arg list or the next argument is another option + std::cout << "No --filter argument given, no filter will be applied" << std::endl; + } + else + { + arg += 1; // Skip that arg now we know it's a valid test name + if ((arg + 1) == argc) // Break out of the loop if we reach the end of the arg list + break; + } + } + else if (!strcmp(argv[arg], "--analyzeperformance") || !strcmp(argv[arg], "-a")) { analyze_performance = true; } @@ -553,7 +578,10 @@ int main(int argc, char** argv) fast_timer_log_thread = new LogThread(LLFastTimer::sLogName); fast_timer_log_thread->start(); } - + + // Load the filter once and for all + LLImageFilter filter(filter_name); + // Perform action on each input file std::list<std::string>::iterator in_file = input_filenames.begin(); std::list<std::string>::iterator out_file = output_filenames.begin(); @@ -568,7 +596,10 @@ int main(int argc, char** argv) std::cout << "Error: Image " << *in_file << " could not be loaded" << std::endl; continue; } - + + // Apply the filter + filter.executeFilter(raw_image); + // Save file if (out_file != out_end) { diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index b2add301f9..d49ff0feb5 100755 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -34,7 +34,7 @@ #include <iostream> #include "apr_base64.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <zlib.h> #else # include "zlib/zlib.h" // for davep's dirty little zip functions diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index e1a91f1367..8d72a1c329 100755 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -35,7 +35,7 @@ extern "C" { -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <expat.h> #else # include "expat/expat.h" diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 07fe259e47..06e118aa44 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -33,7 +33,7 @@ #include "llsys.h" #include <iostream> -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <zlib.h> #else # include "zlib/zlib.h" diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index e837b0cac2..293ada7548 100755 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -27,6 +27,7 @@ set(llimage_SOURCE_FILES llimage.cpp llimagedimensionsinfo.cpp llimagedxt.cpp + llimagefilter.cpp llimagej2c.cpp llimagejpeg.cpp llimagepng.cpp @@ -42,6 +43,7 @@ set(llimage_HEADER_FILES llimagebmp.h llimagedimensionsinfo.h llimagedxt.h + llimagefilter.h llimagej2c.h llimagejpeg.h llimagepng.h diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 1ca1bf55a6..d336eeaabc 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -452,18 +452,8 @@ void LLImageRaw::verticalFlip() void LLImageRaw::expandToPowerOfTwo(S32 max_dim, BOOL scale_image) { // Find new sizes - S32 new_width = MIN_IMAGE_SIZE; - S32 new_height = MIN_IMAGE_SIZE; - - while( (new_width < getWidth()) && (new_width < max_dim) ) - { - new_width <<= 1; - } - - while( (new_height < getHeight()) && (new_height < max_dim) ) - { - new_height <<= 1; - } + S32 new_width = expandDimToPowerOfTwo(getWidth(), max_dim); + S32 new_height = expandDimToPowerOfTwo(getHeight(), max_dim); scale( new_width, new_height, scale_image ); } @@ -471,55 +461,61 @@ void LLImageRaw::expandToPowerOfTwo(S32 max_dim, BOOL scale_image) void LLImageRaw::contractToPowerOfTwo(S32 max_dim, BOOL scale_image) { // Find new sizes - S32 new_width = max_dim; - S32 new_height = max_dim; - - while( (new_width > getWidth()) && (new_width > MIN_IMAGE_SIZE) ) - { - new_width >>= 1; - } - - while( (new_height > getHeight()) && (new_height > MIN_IMAGE_SIZE) ) - { - new_height >>= 1; - } + S32 new_width = contractDimToPowerOfTwo(getWidth(), MIN_IMAGE_SIZE); + S32 new_height = contractDimToPowerOfTwo(getHeight(), MIN_IMAGE_SIZE); scale( new_width, new_height, scale_image ); } -void LLImageRaw::biasedScaleToPowerOfTwo(S32 max_dim) +// static +S32 LLImageRaw::biasedDimToPowerOfTwo(S32 curr_dim, S32 max_dim) { // Strong bias towards rounding down (to save bandwidth) // No bias would mean THRESHOLD == 1.5f; - const F32 THRESHOLD = 1.75f; - + const F32 THRESHOLD = 1.75f; + // Find new sizes - S32 larger_w = max_dim; // 2^n >= mWidth - S32 smaller_w = max_dim; // 2^(n-1) <= mWidth - while( (smaller_w > getWidth()) && (smaller_w > MIN_IMAGE_SIZE) ) + S32 larger_dim = max_dim; // 2^n >= curr_dim + S32 smaller_dim = max_dim; // 2^(n-1) <= curr_dim + while( (smaller_dim > curr_dim) && (smaller_dim > MIN_IMAGE_SIZE) ) { - larger_w = smaller_w; - smaller_w >>= 1; + larger_dim = smaller_dim; + smaller_dim >>= 1; } - S32 new_width = ( (F32)getWidth() / smaller_w > THRESHOLD ) ? larger_w : smaller_w; + return ( ((F32)curr_dim / (F32)smaller_dim) > THRESHOLD ) ? larger_dim : smaller_dim; +} +// static +S32 LLImageRaw::expandDimToPowerOfTwo(S32 curr_dim, S32 max_dim) +{ + S32 new_dim = MIN_IMAGE_SIZE; + while( (new_dim < curr_dim) && (new_dim < max_dim) ) + { + new_dim <<= 1; + } + return new_dim; +} - S32 larger_h = max_dim; // 2^m >= mHeight - S32 smaller_h = max_dim; // 2^(m-1) <= mHeight - while( (smaller_h > getHeight()) && (smaller_h > MIN_IMAGE_SIZE) ) +// static +S32 LLImageRaw::contractDimToPowerOfTwo(S32 curr_dim, S32 min_dim) +{ + S32 new_dim = MAX_IMAGE_SIZE; + while( (new_dim > curr_dim) && (new_dim > min_dim) ) { - larger_h = smaller_h; - smaller_h >>= 1; + new_dim >>= 1; } - S32 new_height = ( (F32)getHeight() / smaller_h > THRESHOLD ) ? larger_h : smaller_h; + return new_dim; +} +void LLImageRaw::biasedScaleToPowerOfTwo(S32 max_dim) +{ + // Find new sizes + S32 new_width = biasedDimToPowerOfTwo(getWidth(),max_dim); + S32 new_height = biasedDimToPowerOfTwo(getHeight(),max_dim); scale( new_width, new_height ); } - - - // Calculates (U8)(255*(a/255.f)*(b/255.f) + 0.5f). Thanks, Jim Blinn! inline U8 LLImageRaw::fastFractionalMult( U8 a, U8 b ) { diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index bf441a008a..cd3f76f1fd 100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -209,6 +209,9 @@ public: void verticalFlip(); + static S32 biasedDimToPowerOfTwo(S32 curr_dim, S32 max_dim = MAX_IMAGE_SIZE); + static S32 expandDimToPowerOfTwo(S32 curr_dim, S32 max_dim = MAX_IMAGE_SIZE); + static S32 contractDimToPowerOfTwo(S32 curr_dim, S32 min_dim = MIN_IMAGE_SIZE); void expandToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE); void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE); void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE); diff --git a/indra/llimage/llimagefilter.cpp b/indra/llimage/llimagefilter.cpp new file mode 100755 index 0000000000..3d0c488768 --- /dev/null +++ b/indra/llimage/llimagefilter.cpp @@ -0,0 +1,939 @@ +/** + * @file llimagefilter.cpp + * @brief Simple Image Filtering. See https://wiki.lindenlab.com/wiki/SL_Viewer_Image_Filters for complete documentation. + * + * $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 "linden_common.h" + +#include "llimagefilter.h" + +#include "llmath.h" +#include "v3color.h" +#include "v4coloru.h" +#include "m3math.h" +#include "v3math.h" +#include "llsdserialize.h" +#include "llstring.h" + +//--------------------------------------------------------------------------- +// LLImageFilter +//--------------------------------------------------------------------------- + +LLImageFilter::LLImageFilter(const std::string& file_path) : + mFilterData(LLSD::emptyArray()), + mImage(NULL), + mHistoRed(NULL), + mHistoGreen(NULL), + mHistoBlue(NULL), + mHistoBrightness(NULL), + mStencilBlendMode(STENCIL_BLEND_MODE_BLEND), + mStencilShape(STENCIL_SHAPE_UNIFORM), + mStencilGamma(1.0), + mStencilMin(0.0), + mStencilMax(1.0) +{ + // Load filter description from file + llifstream filter_xml(file_path); + if (filter_xml.is_open()) + { + // Load and parse the file + LLPointer<LLSDParser> parser = new LLSDXMLParser(); + parser->parse(filter_xml, mFilterData, LLSDSerialize::SIZE_UNLIMITED); + filter_xml.close(); + } +} + +LLImageFilter::~LLImageFilter() +{ + mImage = NULL; + ll_aligned_free_16(mHistoRed); + ll_aligned_free_16(mHistoGreen); + ll_aligned_free_16(mHistoBlue); + ll_aligned_free_16(mHistoBrightness); +} + +/* + *TODO + * Rename stencil to mask + * Improve perf: use LUT for alpha blending in uniform case + * Add gradient coloring as a filter + */ + +//============================================================================ +// Apply the filter data to the image passed as parameter +//============================================================================ + +void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image) +{ + mImage = raw_image; + + //std::cout << "Filter : size = " << mFilterData.size() << std::endl; + for (S32 i = 0; i < mFilterData.size(); ++i) + { + std::string filter_name = mFilterData[i][0].asString(); + // Dump out the filter values (for debug) + //std::cout << "Filter : name = " << mFilterData[i][0].asString() << ", params = "; + //for (S32 j = 1; j < mFilterData[i].size(); ++j) + //{ + // std::cout << mFilterData[i][j].asString() << ", "; + //} + //std::cout << std::endl; + + if (filter_name == "stencil") + { + // Get the shape of the stencil, that is how the procedural alpha is computed geometrically + std::string filter_shape = mFilterData[i][1].asString(); + EStencilShape shape = STENCIL_SHAPE_UNIFORM; + if (filter_shape == "uniform") + { + shape = STENCIL_SHAPE_UNIFORM; + } + else if (filter_shape == "gradient") + { + shape = STENCIL_SHAPE_GRADIENT; + } + else if (filter_shape == "vignette") + { + shape = STENCIL_SHAPE_VIGNETTE; + } + else if (filter_shape == "scanlines") + { + shape = STENCIL_SHAPE_SCAN_LINES; + } + // Get the blend mode of the stencil, that is how the effect is blended in the background through the stencil + std::string filter_mode = mFilterData[i][2].asString(); + EStencilBlendMode mode = STENCIL_BLEND_MODE_BLEND; + if (filter_mode == "blend") + { + mode = STENCIL_BLEND_MODE_BLEND; + } + else if (filter_mode == "add") + { + mode = STENCIL_BLEND_MODE_ADD; + } + else if (filter_mode == "add_back") + { + mode = STENCIL_BLEND_MODE_ABACK; + } + else if (filter_mode == "fade") + { + mode = STENCIL_BLEND_MODE_FADE; + } + // Get the float params: mandatory min, max then the optional parameters (4 max) + F32 min = (F32)(mFilterData[i][3].asReal()); + F32 max = (F32)(mFilterData[i][4].asReal()); + F32 params[4] = {0.0, 0.0, 0.0, 0.0}; + for (S32 j = 5; (j < mFilterData[i].size()) && (j < 9); j++) + { + params[j-5] = (F32)(mFilterData[i][j].asReal()); + } + // Set the stencil + setStencil(shape,mode,min,max,params); + } + else if (filter_name == "sepia") + { + filterSepia(); + } + else if (filter_name == "grayscale") + { + filterGrayScale(); + } + else if (filter_name == "saturate") + { + filterSaturate((float)(mFilterData[i][1].asReal())); + } + else if (filter_name == "rotate") + { + filterRotate((float)(mFilterData[i][1].asReal())); + } + else if (filter_name == "gamma") + { + LLColor3 color((float)(mFilterData[i][2].asReal()),(float)(mFilterData[i][3].asReal()),(float)(mFilterData[i][4].asReal())); + filterGamma((float)(mFilterData[i][1].asReal()),color); + } + else if (filter_name == "colorize") + { + LLColor3 color((float)(mFilterData[i][1].asReal()),(float)(mFilterData[i][2].asReal()),(float)(mFilterData[i][3].asReal())); + LLColor3 alpha((F32)(mFilterData[i][4].asReal()),(float)(mFilterData[i][5].asReal()),(float)(mFilterData[i][6].asReal())); + filterColorize(color,alpha); + } + else if (filter_name == "contrast") + { + LLColor3 color((float)(mFilterData[i][2].asReal()),(float)(mFilterData[i][3].asReal()),(float)(mFilterData[i][4].asReal())); + filterContrast((float)(mFilterData[i][1].asReal()),color); + } + else if (filter_name == "brighten") + { + LLColor3 color((float)(mFilterData[i][2].asReal()),(float)(mFilterData[i][3].asReal()),(float)(mFilterData[i][4].asReal())); + filterBrightness((float)(mFilterData[i][1].asReal()),color); + } + else if (filter_name == "darken") + { + LLColor3 color((float)(mFilterData[i][2].asReal()),(float)(mFilterData[i][3].asReal()),(float)(mFilterData[i][4].asReal())); + filterBrightness((float)(-mFilterData[i][1].asReal()),color); + } + else if (filter_name == "linearize") + { + LLColor3 color((float)(mFilterData[i][2].asReal()),(float)(mFilterData[i][3].asReal()),(float)(mFilterData[i][4].asReal())); + filterLinearize((float)(mFilterData[i][1].asReal()),color); + } + else if (filter_name == "posterize") + { + LLColor3 color((float)(mFilterData[i][2].asReal()),(float)(mFilterData[i][3].asReal()),(float)(mFilterData[i][4].asReal())); + filterEqualize((S32)(mFilterData[i][1].asReal()),color); + } + else if (filter_name == "screen") + { + std::string screen_name = mFilterData[i][1].asString(); + EScreenMode mode = SCREEN_MODE_2DSINE; + if (screen_name == "2Dsine") + { + mode = SCREEN_MODE_2DSINE; + } + else if (screen_name == "line") + { + mode = SCREEN_MODE_LINE; + } + filterScreen(mode,(F32)(mFilterData[i][2].asReal()),(F32)(mFilterData[i][3].asReal())); + } + else if (filter_name == "blur") + { + LLMatrix3 kernel; + for (S32 i = 0; i < NUM_VALUES_IN_MAT3; i++) + for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++) + kernel.mMatrix[i][j] = 1.0; + convolve(kernel,true,false); + } + else if (filter_name == "sharpen") + { + LLMatrix3 kernel; + for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++) + for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++) + kernel.mMatrix[k][j] = -1.0; + kernel.mMatrix[1][1] = 9.0; + convolve(kernel,false,false); + } + else if (filter_name == "gradient") + { + LLMatrix3 kernel; + for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++) + for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++) + kernel.mMatrix[k][j] = -1.0; + kernel.mMatrix[1][1] = 8.0; + convolve(kernel,false,true); + } + else if (filter_name == "convolve") + { + LLMatrix3 kernel; + S32 index = 1; + bool normalize = (mFilterData[i][index++].asReal() > 0.0); + bool abs_value = (mFilterData[i][index++].asReal() > 0.0); + for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++) + for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++) + kernel.mMatrix[k][j] = mFilterData[i][index++].asReal(); + convolve(kernel,normalize,abs_value); + } + else if (filter_name == "colortransform") + { + LLMatrix3 transform; + S32 index = 1; + for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++) + for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++) + transform.mMatrix[k][j] = mFilterData[i][index++].asReal(); + transform.transpose(); + colorTransform(transform); + } + else + { + llwarns << "Filter unknown, cannot execute filter command : " << filter_name << llendl; + } + } +} + +//============================================================================ +// Filter Primitives +//============================================================================ + +void LLImageFilter::blendStencil(F32 alpha, U8* pixel, U8 red, U8 green, U8 blue) +{ + F32 inv_alpha = 1.0 - alpha; + switch (mStencilBlendMode) + { + case STENCIL_BLEND_MODE_BLEND: + // Classic blend of incoming color with the background image + pixel[VRED] = inv_alpha * pixel[VRED] + alpha * red; + pixel[VGREEN] = inv_alpha * pixel[VGREEN] + alpha * green; + pixel[VBLUE] = inv_alpha * pixel[VBLUE] + alpha * blue; + break; + case STENCIL_BLEND_MODE_ADD: + // Add incoming color to the background image + pixel[VRED] = llclampb(pixel[VRED] + alpha * red); + pixel[VGREEN] = llclampb(pixel[VGREEN] + alpha * green); + pixel[VBLUE] = llclampb(pixel[VBLUE] + alpha * blue); + break; + case STENCIL_BLEND_MODE_ABACK: + // Add back background image to the incoming color + pixel[VRED] = llclampb(inv_alpha * pixel[VRED] + red); + pixel[VGREEN] = llclampb(inv_alpha * pixel[VGREEN] + green); + pixel[VBLUE] = llclampb(inv_alpha * pixel[VBLUE] + blue); + break; + case STENCIL_BLEND_MODE_FADE: + // Fade incoming color to black + pixel[VRED] = alpha * red; + pixel[VGREEN] = alpha * green; + pixel[VBLUE] = alpha * blue; + break; + } +} + +void LLImageFilter::colorCorrect(const U8* lut_red, const U8* lut_green, const U8* lut_blue) +{ + const S32 components = mImage->getComponents(); + llassert( components >= 1 && components <= 4 ); + + S32 width = mImage->getWidth(); + S32 height = mImage->getHeight(); + + U8* dst_data = mImage->getData(); + for (S32 j = 0; j < height; j++) + { + for (S32 i = 0; i < width; i++) + { + // Blend LUT value + blendStencil(getStencilAlpha(i,j), dst_data, lut_red[dst_data[VRED]], lut_green[dst_data[VGREEN]], lut_blue[dst_data[VBLUE]]); + dst_data += components; + } + } +} + +void LLImageFilter::colorTransform(const LLMatrix3 &transform) +{ + const S32 components = mImage->getComponents(); + llassert( components >= 1 && components <= 4 ); + + S32 width = mImage->getWidth(); + S32 height = mImage->getHeight(); + + U8* dst_data = mImage->getData(); + for (S32 j = 0; j < height; j++) + { + for (S32 i = 0; i < width; i++) + { + // Compute transform + LLVector3 src((F32)(dst_data[VRED]),(F32)(dst_data[VGREEN]),(F32)(dst_data[VBLUE])); + LLVector3 dst = src * transform; + dst.clamp(0.0f,255.0f); + + // Blend result + blendStencil(getStencilAlpha(i,j), dst_data, dst.mV[VRED], dst.mV[VGREEN], dst.mV[VBLUE]); + dst_data += components; + } + } +} + +void LLImageFilter::convolve(const LLMatrix3 &kernel, bool normalize, bool abs_value) +{ + const S32 components = mImage->getComponents(); + llassert( components >= 1 && components <= 4 ); + + // Compute normalization factors + F32 kernel_min = 0.0; + F32 kernel_max = 0.0; + for (S32 i = 0; i < NUM_VALUES_IN_MAT3; i++) + { + for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++) + { + if (kernel.mMatrix[i][j] >= 0.0) + kernel_max += kernel.mMatrix[i][j]; + else + kernel_min += kernel.mMatrix[i][j]; + } + } + if (abs_value) + { + kernel_max = llabs(kernel_max); + kernel_min = llabs(kernel_min); + kernel_max = llmax(kernel_max,kernel_min); + kernel_min = 0.0; + } + F32 kernel_range = kernel_max - kernel_min; + + // Allocate temporary buffers and initialize algorithm's data + S32 width = mImage->getWidth(); + S32 height = mImage->getHeight(); + + U8* dst_data = mImage->getData(); + + S32 buffer_size = width * components; + llassert_always(buffer_size > 0); + std::vector<U8> even_buffer(buffer_size); + std::vector<U8> odd_buffer(buffer_size); + + U8* south_data = dst_data + buffer_size; + U8* east_west_data; + U8* north_data; + + // Line 0 : we set the line to 0 (debatable) + memcpy( &even_buffer[0], dst_data, buffer_size ); /* Flawfinder: ignore */ + for (S32 i = 0; i < width; i++) + { + blendStencil(getStencilAlpha(i,0), dst_data, 0, 0, 0); + dst_data += components; + } + south_data += buffer_size; + + // All other lines + for (S32 j = 1; j < (height-1); j++) + { + // We need to buffer 2 lines. We flip north and east-west (current) to avoid moving too much memory around + if (j % 2) + { + memcpy( &odd_buffer[0], dst_data, buffer_size ); /* Flawfinder: ignore */ + east_west_data = &odd_buffer[0]; + north_data = &even_buffer[0]; + } + else + { + memcpy( &even_buffer[0], dst_data, buffer_size ); /* Flawfinder: ignore */ + east_west_data = &even_buffer[0]; + north_data = &odd_buffer[0]; + } + // First pixel : set to 0 + blendStencil(getStencilAlpha(0,j), dst_data, 0, 0, 0); + dst_data += components; + // Set pointers to kernel + U8* NW = north_data; + U8* N = NW+components; + U8* NE = N+components; + U8* W = east_west_data; + U8* C = W+components; + U8* E = C+components; + U8* SW = south_data; + U8* S = SW+components; + U8* SE = S+components; + // All other pixels + for (S32 i = 1; i < (width-1); i++) + { + // Compute convolution + LLVector3 dst; + dst.mV[VRED] = (kernel.mMatrix[0][0]*NW[VRED] + kernel.mMatrix[0][1]*N[VRED] + kernel.mMatrix[0][2]*NE[VRED] + + kernel.mMatrix[1][0]*W[VRED] + kernel.mMatrix[1][1]*C[VRED] + kernel.mMatrix[1][2]*E[VRED] + + kernel.mMatrix[2][0]*SW[VRED] + kernel.mMatrix[2][1]*S[VRED] + kernel.mMatrix[2][2]*SE[VRED]); + dst.mV[VGREEN] = (kernel.mMatrix[0][0]*NW[VGREEN] + kernel.mMatrix[0][1]*N[VGREEN] + kernel.mMatrix[0][2]*NE[VGREEN] + + kernel.mMatrix[1][0]*W[VGREEN] + kernel.mMatrix[1][1]*C[VGREEN] + kernel.mMatrix[1][2]*E[VGREEN] + + kernel.mMatrix[2][0]*SW[VGREEN] + kernel.mMatrix[2][1]*S[VGREEN] + kernel.mMatrix[2][2]*SE[VGREEN]); + dst.mV[VBLUE] = (kernel.mMatrix[0][0]*NW[VBLUE] + kernel.mMatrix[0][1]*N[VBLUE] + kernel.mMatrix[0][2]*NE[VBLUE] + + kernel.mMatrix[1][0]*W[VBLUE] + kernel.mMatrix[1][1]*C[VBLUE] + kernel.mMatrix[1][2]*E[VBLUE] + + kernel.mMatrix[2][0]*SW[VBLUE] + kernel.mMatrix[2][1]*S[VBLUE] + kernel.mMatrix[2][2]*SE[VBLUE]); + if (abs_value) + { + dst.mV[VRED] = llabs(dst.mV[VRED]); + dst.mV[VGREEN] = llabs(dst.mV[VGREEN]); + dst.mV[VBLUE] = llabs(dst.mV[VBLUE]); + } + if (normalize) + { + dst.mV[VRED] = (dst.mV[VRED] - kernel_min)/kernel_range; + dst.mV[VGREEN] = (dst.mV[VGREEN] - kernel_min)/kernel_range; + dst.mV[VBLUE] = (dst.mV[VBLUE] - kernel_min)/kernel_range; + } + dst.clamp(0.0f,255.0f); + + // Blend result + blendStencil(getStencilAlpha(i,j), dst_data, dst.mV[VRED], dst.mV[VGREEN], dst.mV[VBLUE]); + + // Next pixel + dst_data += components; + NW += components; + N += components; + NE += components; + W += components; + C += components; + E += components; + SW += components; + S += components; + SE += components; + } + // Last pixel : set to 0 + blendStencil(getStencilAlpha(width-1,j), dst_data, 0, 0, 0); + dst_data += components; + south_data += buffer_size; + } + + // Last line + for (S32 i = 0; i < width; i++) + { + blendStencil(getStencilAlpha(i,0), dst_data, 0, 0, 0); + dst_data += components; + } +} + +void LLImageFilter::filterScreen(EScreenMode mode, const F32 wave_length, const F32 angle) +{ + const S32 components = mImage->getComponents(); + llassert( components >= 1 && components <= 4 ); + + S32 width = mImage->getWidth(); + S32 height = mImage->getHeight(); + + F32 wave_length_pixels = wave_length * (F32)(height) / 2.0; + F32 sin = sinf(angle*DEG_TO_RAD); + F32 cos = cosf(angle*DEG_TO_RAD); + + // Precompute the gamma table : gives us the gray level to use when cutting outside the screen (prevents strong aliasing on the screen) + U8 gamma[256]; + for (S32 i = 0; i < 256; i++) + { + F32 gamma_i = llclampf((float)(powf((float)(i)/255.0,1.0/4.0))); + gamma[i] = (U8)(255.0 * gamma_i); + } + + U8* dst_data = mImage->getData(); + for (S32 j = 0; j < height; j++) + { + for (S32 i = 0; i < width; i++) + { + // Compute screen value + F32 value = 0.0; + F32 di = 0.0; + F32 dj = 0.0; + switch (mode) + { + case SCREEN_MODE_2DSINE: + di = cos*i + sin*j; + dj = -sin*i + cos*j; + value = (sinf(2*F_PI*di/wave_length_pixels)*sinf(2*F_PI*dj/wave_length_pixels)+1.0)*255.0/2.0; + break; + case SCREEN_MODE_LINE: + dj = sin*i - cos*j; + value = (sinf(2*F_PI*dj/wave_length_pixels)+1.0)*255.0/2.0; + break; + } + U8 dst_value = (dst_data[VRED] >= (U8)(value) ? gamma[dst_data[VRED] - (U8)(value)] : 0); + + // Blend result + blendStencil(getStencilAlpha(i,j), dst_data, dst_value, dst_value, dst_value); + dst_data += components; + } + } +} + +//============================================================================ +// Procedural Stencils +//============================================================================ +void LLImageFilter::setStencil(EStencilShape shape, EStencilBlendMode mode, F32 min, F32 max, F32* params) +{ + mStencilShape = shape; + mStencilBlendMode = mode; + mStencilMin = llmin(llmax(min, -1.0f), 1.0f); + mStencilMax = llmin(llmax(max, -1.0f), 1.0f); + + // Each shape will interpret the 4 params differenly. + // We compute each systematically, though, clearly, values are meaningless when the shape doesn't correspond to the parameters + mStencilCenterX = (S32)(mImage->getWidth() + params[0] * (F32)(mImage->getHeight()))/2; + mStencilCenterY = (S32)(mImage->getHeight() + params[1] * (F32)(mImage->getHeight()))/2; + mStencilWidth = (S32)(params[2] * (F32)(mImage->getHeight()))/2; + mStencilGamma = (params[3] <= 0.0 ? 1.0 : params[3]); + + mStencilWavelength = (params[0] <= 0.0 ? 10.0 : params[0] * (F32)(mImage->getHeight()) / 2.0); + mStencilSine = sinf(params[1]*DEG_TO_RAD); + mStencilCosine = cosf(params[1]*DEG_TO_RAD); + + mStencilStartX = ((F32)(mImage->getWidth()) + params[0] * (F32)(mImage->getHeight()))/2.0; + mStencilStartY = ((F32)(mImage->getHeight()) + params[1] * (F32)(mImage->getHeight()))/2.0; + F32 end_x = ((F32)(mImage->getWidth()) + params[2] * (F32)(mImage->getHeight()))/2.0; + F32 end_y = ((F32)(mImage->getHeight()) + params[3] * (F32)(mImage->getHeight()))/2.0; + mStencilGradX = end_x - mStencilStartX; + mStencilGradY = end_y - mStencilStartY; + mStencilGradN = mStencilGradX*mStencilGradX + mStencilGradY*mStencilGradY; +} + +F32 LLImageFilter::getStencilAlpha(S32 i, S32 j) +{ + F32 alpha = 1.0; // That init actually takes care of the STENCIL_SHAPE_UNIFORM case... + if (mStencilShape == STENCIL_SHAPE_VIGNETTE) + { + // alpha is a modified gaussian value, with a center and fading in a circular pattern toward the edges + // The gamma parameter controls the intensity of the drop down from alpha 1.0 (center) to 0.0 + F32 d_center_square = (i - mStencilCenterX)*(i - mStencilCenterX) + (j - mStencilCenterY)*(j - mStencilCenterY); + alpha = powf(F_E, -(powf((d_center_square/(mStencilWidth*mStencilWidth)),mStencilGamma)/2.0f)); + } + else if (mStencilShape == STENCIL_SHAPE_SCAN_LINES) + { + // alpha varies according to a squared sine function. + F32 d = mStencilSine*i - mStencilCosine*j; + alpha = (sinf(2*F_PI*d/mStencilWavelength) > 0.0 ? 1.0 : 0.0); + } + else if (mStencilShape == STENCIL_SHAPE_GRADIENT) + { + alpha = (((F32)(i) - mStencilStartX)*mStencilGradX + ((F32)(j) - mStencilStartY)*mStencilGradY) / mStencilGradN; + alpha = llclampf(alpha); + } + + // We rescale alpha between min and max + return (mStencilMin + alpha * (mStencilMax - mStencilMin)); +} + +//============================================================================ +// Histograms +//============================================================================ + +U32* LLImageFilter::getBrightnessHistogram() +{ + if (!mHistoBrightness) + { + computeHistograms(); + } + return mHistoBrightness; +} + +void LLImageFilter::computeHistograms() +{ + const S32 components = mImage->getComponents(); + llassert( components >= 1 && components <= 4 ); + + // Allocate memory for the histograms + if (!mHistoRed) + { + mHistoRed = (U32*) ll_aligned_malloc_16(256*sizeof(U32)); + } + if (!mHistoGreen) + { + mHistoGreen = (U32*) ll_aligned_malloc_16(256*sizeof(U32)); + } + if (!mHistoBlue) + { + mHistoBlue = (U32*) ll_aligned_malloc_16(256*sizeof(U32)); + } + if (!mHistoBrightness) + { + mHistoBrightness = (U32*) ll_aligned_malloc_16(256*sizeof(U32)); + } + + // Initialize them + for (S32 i = 0; i < 256; i++) + { + mHistoRed[i] = 0; + mHistoGreen[i] = 0; + mHistoBlue[i] = 0; + mHistoBrightness[i] = 0; + } + + // Compute them + S32 pixels = mImage->getWidth() * mImage->getHeight(); + U8* dst_data = mImage->getData(); + for (S32 i = 0; i < pixels; i++) + { + mHistoRed[dst_data[VRED]]++; + mHistoGreen[dst_data[VGREEN]]++; + mHistoBlue[dst_data[VBLUE]]++; + // Note: this is a very simple shorthand for brightness but it's OK for our use + S32 brightness = ((S32)(dst_data[VRED]) + (S32)(dst_data[VGREEN]) + (S32)(dst_data[VBLUE])) / 3; + mHistoBrightness[brightness]++; + // next pixel... + dst_data += components; + } +} + +//============================================================================ +// Secondary Filters +//============================================================================ + +void LLImageFilter::filterGrayScale() +{ + LLMatrix3 gray_scale; + LLVector3 luminosity(0.2125, 0.7154, 0.0721); + gray_scale.setRows(luminosity, luminosity, luminosity); + gray_scale.transpose(); + colorTransform(gray_scale); +} + +void LLImageFilter::filterSepia() +{ + LLMatrix3 sepia; + sepia.setRows(LLVector3(0.3588, 0.7044, 0.1368), + LLVector3(0.2990, 0.5870, 0.1140), + LLVector3(0.2392, 0.4696, 0.0912)); + sepia.transpose(); + colorTransform(sepia); +} + +void LLImageFilter::filterSaturate(F32 saturation) +{ + // Matrix to Lij + LLMatrix3 r_a; + LLMatrix3 r_b; + + // 45 degre rotation around z + r_a.setRows(LLVector3( OO_SQRT2, OO_SQRT2, 0.0), + LLVector3(-OO_SQRT2, OO_SQRT2, 0.0), + LLVector3( 0.0, 0.0, 1.0)); + // 54.73 degre rotation around y + float oo_sqrt3 = 1.0f / F_SQRT3; + float sin_54 = F_SQRT2 * oo_sqrt3; + r_b.setRows(LLVector3(oo_sqrt3, 0.0, -sin_54), + LLVector3(0.0, 1.0, 0.0), + LLVector3(sin_54, 0.0, oo_sqrt3)); + + // Coordinate conversion + LLMatrix3 Lij = r_b * r_a; + LLMatrix3 Lij_inv = Lij; + Lij_inv.transpose(); + + // Local saturation transform + LLMatrix3 s; + s.setRows(LLVector3(saturation, 0.0, 0.0), + LLVector3(0.0, saturation, 0.0), + LLVector3(0.0, 0.0, 1.0)); + + // Global saturation transform + LLMatrix3 transfo = Lij_inv * s * Lij; + colorTransform(transfo); +} + +void LLImageFilter::filterRotate(F32 angle) +{ + // Matrix to Lij + LLMatrix3 r_a; + LLMatrix3 r_b; + + // 45 degre rotation around z + r_a.setRows(LLVector3( OO_SQRT2, OO_SQRT2, 0.0), + LLVector3(-OO_SQRT2, OO_SQRT2, 0.0), + LLVector3( 0.0, 0.0, 1.0)); + // 54.73 degre rotation around y + float oo_sqrt3 = 1.0f / F_SQRT3; + float sin_54 = F_SQRT2 * oo_sqrt3; + r_b.setRows(LLVector3(oo_sqrt3, 0.0, -sin_54), + LLVector3(0.0, 1.0, 0.0), + LLVector3(sin_54, 0.0, oo_sqrt3)); + + // Coordinate conversion + LLMatrix3 Lij = r_b * r_a; + LLMatrix3 Lij_inv = Lij; + Lij_inv.transpose(); + + // Local color rotation transform + LLMatrix3 r; + angle *= DEG_TO_RAD; + r.setRows(LLVector3( cosf(angle), sinf(angle), 0.0), + LLVector3(-sinf(angle), cosf(angle), 0.0), + LLVector3( 0.0, 0.0, 1.0)); + + // Global color rotation transform + LLMatrix3 transfo = Lij_inv * r * Lij; + colorTransform(transfo); +} + +void LLImageFilter::filterGamma(F32 gamma, const LLColor3& alpha) +{ + U8 gamma_red_lut[256]; + U8 gamma_green_lut[256]; + U8 gamma_blue_lut[256]; + + for (S32 i = 0; i < 256; i++) + { + F32 gamma_i = llclampf((float)(powf((float)(i)/255.0,1.0/gamma))); + // Blend in with alpha values + gamma_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * 255.0 * gamma_i); + gamma_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * 255.0 * gamma_i); + gamma_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * 255.0 * gamma_i); + } + + colorCorrect(gamma_red_lut,gamma_green_lut,gamma_blue_lut); +} + +void LLImageFilter::filterLinearize(F32 tail, const LLColor3& alpha) +{ + // Get the histogram + U32* histo = getBrightnessHistogram(); + + // Compute cumulated histogram + U32 cumulated_histo[256]; + cumulated_histo[0] = histo[0]; + for (S32 i = 1; i < 256; i++) + { + cumulated_histo[i] = cumulated_histo[i-1] + histo[i]; + } + + // Compute min and max counts minus tail + tail = llclampf(tail); + S32 total = cumulated_histo[255]; + S32 min_c = (S32)((F32)(total) * tail); + S32 max_c = (S32)((F32)(total) * (1.0 - tail)); + + // Find min and max values + S32 min_v = 0; + while (cumulated_histo[min_v] < min_c) + { + min_v++; + } + S32 max_v = 255; + while (cumulated_histo[max_v] > max_c) + { + max_v--; + } + + // Compute linear lookup table + U8 linear_red_lut[256]; + U8 linear_green_lut[256]; + U8 linear_blue_lut[256]; + if (max_v == min_v) + { + // Degenerated binary split case + for (S32 i = 0; i < 256; i++) + { + U8 value_i = (i < min_v ? 0 : 255); + // Blend in with alpha values + linear_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i); + linear_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i); + linear_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i); + } + } + else + { + // Linearize between min and max + F32 slope = 255.0 / (F32)(max_v - min_v); + F32 translate = -min_v * slope; + for (S32 i = 0; i < 256; i++) + { + U8 value_i = (U8)(llclampb((S32)(slope*i + translate))); + // Blend in with alpha values + linear_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i); + linear_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i); + linear_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i); + } + } + + // Apply lookup table + colorCorrect(linear_red_lut,linear_green_lut,linear_blue_lut); +} + +void LLImageFilter::filterEqualize(S32 nb_classes, const LLColor3& alpha) +{ + // Regularize the parameter: must be between 2 and 255 + nb_classes = llmax(nb_classes,2); + nb_classes = llclampb(nb_classes); + + // Get the histogram + U32* histo = getBrightnessHistogram(); + + // Compute cumulated histogram + U32 cumulated_histo[256]; + cumulated_histo[0] = histo[0]; + for (S32 i = 1; i < 256; i++) + { + cumulated_histo[i] = cumulated_histo[i-1] + histo[i]; + } + + // Compute deltas + S32 total = cumulated_histo[255]; + S32 delta_count = total / nb_classes; + S32 current_count = delta_count; + S32 delta_value = 256 / (nb_classes - 1); + S32 current_value = 0; + + // Compute equalized lookup table + U8 equalize_red_lut[256]; + U8 equalize_green_lut[256]; + U8 equalize_blue_lut[256]; + for (S32 i = 0; i < 256; i++) + { + // Blend in current_value with alpha values + equalize_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * current_value); + equalize_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * current_value); + equalize_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * current_value); + if (cumulated_histo[i] >= current_count) + { + current_count += delta_count; + current_value += delta_value; + current_value = llclampb(current_value); + } + } + + // Apply lookup table + colorCorrect(equalize_red_lut,equalize_green_lut,equalize_blue_lut); +} + +void LLImageFilter::filterColorize(const LLColor3& color, const LLColor3& alpha) +{ + U8 red_lut[256]; + U8 green_lut[256]; + U8 blue_lut[256]; + + F32 red_composite = 255.0 * alpha.mV[0] * color.mV[0]; + F32 green_composite = 255.0 * alpha.mV[1] * color.mV[1]; + F32 blue_composite = 255.0 * alpha.mV[2] * color.mV[2]; + + for (S32 i = 0; i < 256; i++) + { + red_lut[i] = (U8)(llclampb((S32)((1.0 - alpha.mV[0]) * (F32)(i) + red_composite))); + green_lut[i] = (U8)(llclampb((S32)((1.0 - alpha.mV[1]) * (F32)(i) + green_composite))); + blue_lut[i] = (U8)(llclampb((S32)((1.0 - alpha.mV[2]) * (F32)(i) + blue_composite))); + } + + colorCorrect(red_lut,green_lut,blue_lut); +} + +void LLImageFilter::filterContrast(F32 slope, const LLColor3& alpha) +{ + U8 contrast_red_lut[256]; + U8 contrast_green_lut[256]; + U8 contrast_blue_lut[256]; + + F32 translate = 128.0 * (1.0 - slope); + + for (S32 i = 0; i < 256; i++) + { + U8 value_i = (U8)(llclampb((S32)(slope*i + translate))); + // Blend in with alpha values + contrast_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i); + contrast_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i); + contrast_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i); + } + + colorCorrect(contrast_red_lut,contrast_green_lut,contrast_blue_lut); +} + +void LLImageFilter::filterBrightness(F32 add, const LLColor3& alpha) +{ + U8 brightness_red_lut[256]; + U8 brightness_green_lut[256]; + U8 brightness_blue_lut[256]; + + S32 add_value = (S32)(add * 255.0); + + for (S32 i = 0; i < 256; i++) + { + U8 value_i = (U8)(llclampb(i + add_value)); + // Blend in with alpha values + brightness_red_lut[i] = (U8)((1.0 - alpha.mV[0]) * (float)(i) + alpha.mV[0] * value_i); + brightness_green_lut[i] = (U8)((1.0 - alpha.mV[1]) * (float)(i) + alpha.mV[1] * value_i); + brightness_blue_lut[i] = (U8)((1.0 - alpha.mV[2]) * (float)(i) + alpha.mV[2] * value_i); + } + + colorCorrect(brightness_red_lut,brightness_green_lut,brightness_blue_lut); +} + +//============================================================================ diff --git a/indra/llimage/llimagefilter.h b/indra/llimage/llimagefilter.h new file mode 100755 index 0000000000..16ec395f76 --- /dev/null +++ b/indra/llimage/llimagefilter.h @@ -0,0 +1,137 @@ +/** + * @file llimagefilter.h + * @brief Simple Image Filtering. See https://wiki.lindenlab.com/wiki/SL_Viewer_Image_Filters for complete documentation. + * + * $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_LLIMAGEFILTER_H +#define LL_LLIMAGEFILTER_H + +#include "llsd.h" +#include "llimage.h" + +class LLImageRaw; +class LLColor4U; +class LLColor3; +class LLMatrix3; + +typedef enum e_stencil_blend_mode +{ + STENCIL_BLEND_MODE_BLEND = 0, + STENCIL_BLEND_MODE_ADD = 1, + STENCIL_BLEND_MODE_ABACK = 2, + STENCIL_BLEND_MODE_FADE = 3 +} EStencilBlendMode; + +typedef enum e_stencil_shape +{ + STENCIL_SHAPE_UNIFORM = 0, + STENCIL_SHAPE_GRADIENT = 1, + STENCIL_SHAPE_VIGNETTE = 2, + STENCIL_SHAPE_SCAN_LINES = 3 +} EStencilShape; + +typedef enum e_screen_mode +{ + SCREEN_MODE_2DSINE = 0, + SCREEN_MODE_LINE = 1 +} EScreenMode; + +//============================================================================ +// LLImageFilter +//============================================================================ + +class LLImageFilter +{ +public: + LLImageFilter(const std::string& file_path); + ~LLImageFilter(); + + void executeFilter(LLPointer<LLImageRaw> raw_image); + +private: + // Filter Operations : Transforms + void filterGrayScale(); // Convert to grayscale + void filterSepia(); // Convert to sepia + void filterSaturate(F32 saturation); // < 1.0 desaturates, > 1.0 saturates + void filterRotate(F32 angle); // Rotates hue according to angle, angle in degrees + + // Filter Operations : Color Corrections + // When specified, the LLColor3 alpha parameter indicates the intensity of the effect for each color channel + // acting in effect as an alpha blending factor different for each channel. For instance (1.0,0.0,0.0) will apply + // the effect only to the Red channel. Intermediate values blends the effect with the source color. + void filterGamma(F32 gamma, const LLColor3& alpha); // Apply gamma to each channel + void filterLinearize(F32 tail, const LLColor3& alpha); // Use histogram to linearize constrast between min and max values minus tail + void filterEqualize(S32 nb_classes, const LLColor3& alpha); // Use histogram to equalize constrast between nb_classes throughout the image + void filterColorize(const LLColor3& color, const LLColor3& alpha); // Colorize with color and alpha per channel + void filterContrast(F32 slope, const LLColor3& alpha); // Change contrast according to slope: > 1.0 more contrast, < 1.0 less contrast + void filterBrightness(F32 add, const LLColor3& alpha); // Change brightness according to add: > 0 brighter, < 0 darker + + // Filter Primitives + void colorTransform(const LLMatrix3 &transform); + void colorCorrect(const U8* lut_red, const U8* lut_green, const U8* lut_blue); + void filterScreen(EScreenMode mode, const F32 wave_length, const F32 angle); + void blendStencil(F32 alpha, U8* pixel, U8 red, U8 green, U8 blue); + void convolve(const LLMatrix3 &kernel, bool normalize, bool abs_value); + + // Procedural Stencils + void setStencil(EStencilShape shape, EStencilBlendMode mode, F32 min, F32 max, F32* params); + F32 getStencilAlpha(S32 i, S32 j); + + // Histograms + U32* getBrightnessHistogram(); + void computeHistograms(); + + LLSD mFilterData; + LLPointer<LLImageRaw> mImage; + + // Histograms (if we ever happen to need them) + U32 *mHistoRed; + U32 *mHistoGreen; + U32 *mHistoBlue; + U32 *mHistoBrightness; + + // Current Stencil Settings + EStencilBlendMode mStencilBlendMode; + EStencilShape mStencilShape; + F32 mStencilMin; + F32 mStencilMax; + + S32 mStencilCenterX; + S32 mStencilCenterY; + S32 mStencilWidth; + F32 mStencilGamma; + + F32 mStencilWavelength; + F32 mStencilSine; + F32 mStencilCosine; + + F32 mStencilStartX; + F32 mStencilStartY; + F32 mStencilGradX; + F32 mStencilGradY; + F32 mStencilGradN; +}; + + +#endif diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h index 5b596d9fa4..2142660c81 100755 --- a/indra/llimage/llimagejpeg.h +++ b/indra/llimage/llimagejpeg.h @@ -33,7 +33,7 @@ #include "llwin32headerslean.h" extern "C" { -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <jpeglib.h> # include <jerror.h> #else diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 29db799154..a8b27ad189 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -1,4 +1,4 @@ -/** +/** * @file llmath.h * @brief Useful math constants and macros. * @@ -73,6 +73,7 @@ const F32 F_E = 2.71828182845904523536f; const F32 F_SQRT2 = 1.4142135623730950488016887242097f; const F32 F_SQRT3 = 1.73205080756888288657986402541f; const F32 OO_SQRT2 = 0.7071067811865475244008443621049f; +const F32 OO_SQRT3 = 0.577350269189625764509f; const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f; const F32 RAD_TO_DEG = 57.295779513082320876798154814105f; const F32 F_APPROXIMATELY_ZERO = 0.00001f; @@ -84,6 +85,9 @@ const F32 OO_LN2 = 1.4426950408889634073599246810019f; const F32 F_ALMOST_ZERO = 0.0001f; const F32 F_ALMOST_ONE = 1.0f - F_ALMOST_ZERO; +const F32 GIMBAL_THRESHOLD = 0.000436f; // sets the gimballock threshold 0.025 away from +/-90 degrees +// formula: GIMBAL_THRESHOLD = sin(DEG_TO_RAD * gimbal_threshold_angle); + // BUG: Eliminate in favor of F_APPROXIMATELY_ZERO above? const F32 FP_MAG_THRESHOLD = 0.0000001f; diff --git a/indra/llmath/llquaternion.cpp b/indra/llmath/llquaternion.cpp index 7381d5eb99..47374c287f 100755 --- a/indra/llmath/llquaternion.cpp +++ b/indra/llmath/llquaternion.cpp @@ -1,4 +1,4 @@ -/** +/** * @file llquaternion.cpp * @brief LLQuaternion class implementation. * @@ -58,34 +58,40 @@ LLQuaternion::LLQuaternion(const LLMatrix3 &mat) LLQuaternion::LLQuaternion(F32 angle, const LLVector4 &vec) { - LLVector3 v(vec.mV[VX], vec.mV[VY], vec.mV[VZ]); - v.normalize(); - - F32 c, s; - c = cosf(angle*0.5f); - s = sinf(angle*0.5f); - - mQ[VX] = v.mV[VX] * s; - mQ[VY] = v.mV[VY] * s; - mQ[VZ] = v.mV[VZ] * s; - mQ[VW] = c; - normalize(); + F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = vec.mV[VX] * s; + mQ[VY] = vec.mV[VY] * s; + mQ[VZ] = vec.mV[VZ] * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } } LLQuaternion::LLQuaternion(F32 angle, const LLVector3 &vec) { - LLVector3 v(vec); - v.normalize(); - - F32 c, s; - c = cosf(angle*0.5f); - s = sinf(angle*0.5f); - - mQ[VX] = v.mV[VX] * s; - mQ[VY] = v.mV[VY] * s; - mQ[VZ] = v.mV[VZ] * s; - mQ[VW] = c; - normalize(); + F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = vec.mV[VX] * s; + mQ[VY] = vec.mV[VY] * s; + mQ[VZ] = vec.mV[VZ] * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } } LLQuaternion::LLQuaternion(const LLVector3 &x_axis, @@ -136,57 +142,61 @@ void LLQuaternion::quantize8(F32 lower, F32 upper) const LLQuaternion& LLQuaternion::setAngleAxis(F32 angle, F32 x, F32 y, F32 z) { - LLVector3 vec(x, y, z); - vec.normalize(); - - angle *= 0.5f; - F32 c, s; - c = cosf(angle); - s = sinf(angle); - - mQ[VX] = vec.mV[VX]*s; - mQ[VY] = vec.mV[VY]*s; - mQ[VZ] = vec.mV[VZ]*s; - mQ[VW] = c; - - normalize(); + F32 mag = sqrtf(x * x + y * y + z * z); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = x * s; + mQ[VY] = y * s; + mQ[VZ] = z * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } return (*this); } const LLQuaternion& LLQuaternion::setAngleAxis(F32 angle, const LLVector3 &vec) { - LLVector3 v(vec); - v.normalize(); - - angle *= 0.5f; - F32 c, s; - c = cosf(angle); - s = sinf(angle); - - mQ[VX] = v.mV[VX]*s; - mQ[VY] = v.mV[VY]*s; - mQ[VZ] = v.mV[VZ]*s; - mQ[VW] = c; - - normalize(); + F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = vec.mV[VX] * s; + mQ[VY] = vec.mV[VY] * s; + mQ[VZ] = vec.mV[VZ] * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } return (*this); } const LLQuaternion& LLQuaternion::setAngleAxis(F32 angle, const LLVector4 &vec) { - LLVector3 v(vec.mV[VX], vec.mV[VY], vec.mV[VZ]); - v.normalize(); - - F32 c, s; - c = cosf(angle*0.5f); - s = sinf(angle*0.5f); - - mQ[VX] = v.mV[VX]*s; - mQ[VY] = v.mV[VY]*s; - mQ[VZ] = v.mV[VZ]*s; - mQ[VW] = c; - - normalize(); + F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = vec.mV[VX] * s; + mQ[VY] = vec.mV[VY] * s; + mQ[VZ] = vec.mV[VZ] * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } return (*this); } @@ -219,68 +229,80 @@ const LLQuaternion& LLQuaternion::set(const LLMatrix4 &mat) // deprecated const LLQuaternion& LLQuaternion::setQuat(F32 angle, F32 x, F32 y, F32 z) { - LLVector3 vec(x, y, z); - vec.normalize(); - - angle *= 0.5f; - F32 c, s; - c = cosf(angle); - s = sinf(angle); - - mQ[VX] = vec.mV[VX]*s; - mQ[VY] = vec.mV[VY]*s; - mQ[VZ] = vec.mV[VZ]*s; - mQ[VW] = c; - - normalize(); + F32 mag = sqrtf(x * x + y * y + z * z); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = x * s; + mQ[VY] = y * s; + mQ[VZ] = z * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } return (*this); } // deprecated const LLQuaternion& LLQuaternion::setQuat(F32 angle, const LLVector3 &vec) { - LLVector3 v(vec); - v.normalize(); - - angle *= 0.5f; - F32 c, s; - c = cosf(angle); - s = sinf(angle); - - mQ[VX] = v.mV[VX]*s; - mQ[VY] = v.mV[VY]*s; - mQ[VZ] = v.mV[VZ]*s; - mQ[VW] = c; - - normalize(); + F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = vec.mV[VX] * s; + mQ[VY] = vec.mV[VY] * s; + mQ[VZ] = vec.mV[VZ] * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } return (*this); } const LLQuaternion& LLQuaternion::setQuat(F32 angle, const LLVector4 &vec) { - LLVector3 v(vec.mV[VX], vec.mV[VY], vec.mV[VZ]); - v.normalize(); - - F32 c, s; - c = cosf(angle*0.5f); - s = sinf(angle*0.5f); - - mQ[VX] = v.mV[VX]*s; - mQ[VY] = v.mV[VY]*s; - mQ[VZ] = v.mV[VZ]*s; - mQ[VW] = c; - - normalize(); + F32 mag = sqrtf(vec.mV[VX] * vec.mV[VX] + vec.mV[VY] * vec.mV[VY] + vec.mV[VZ] * vec.mV[VZ]); + if (mag > FP_MAG_THRESHOLD) + { + angle *= 0.5; + F32 c = cosf(angle); + F32 s = sinf(angle) / mag; + mQ[VX] = vec.mV[VX] * s; + mQ[VY] = vec.mV[VY] * s; + mQ[VZ] = vec.mV[VZ] * s; + mQ[VW] = c; + } + else + { + loadIdentity(); + } return (*this); } const LLQuaternion& LLQuaternion::setQuat(F32 roll, F32 pitch, F32 yaw) { - LLMatrix3 rot_mat(roll, pitch, yaw); - rot_mat.orthogonalize(); - *this = rot_mat.quaternion(); - - normalize(); + roll *= 0.5f; + pitch *= 0.5f; + yaw *= 0.5f; + F32 sinX = sinf(roll); + F32 cosX = cosf(roll); + F32 sinY = sinf(pitch); + F32 cosY = cosf(pitch); + F32 sinZ = sinf(yaw); + F32 cosZ = cosf(yaw); + mQ[VW] = cosX * cosY * cosZ - sinX * sinY * sinZ; + mQ[VX] = sinX * cosY * cosZ + cosX * sinY * sinZ; + mQ[VY] = cosX * sinY * cosZ - sinX * cosY * sinZ; + mQ[VZ] = cosX * cosY * sinZ + sinX * sinY * cosZ; return (*this); } @@ -425,68 +447,44 @@ LLMatrix4 LLQuaternion::getMatrix4(void) const // calculate the shortest rotation from a to b void LLQuaternion::shortestArc(const LLVector3 &a, const LLVector3 &b) { - // Make a local copy of both vectors. - LLVector3 vec_a = a; - LLVector3 vec_b = b; - - // Make sure neither vector is zero length. Also normalize - // the vectors while we are at it. - F32 vec_a_mag = vec_a.normalize(); - F32 vec_b_mag = vec_b.normalize(); - if (vec_a_mag < F_APPROXIMATELY_ZERO || - vec_b_mag < F_APPROXIMATELY_ZERO) - { - // Can't calculate a rotation from this. - // Just return ZERO_ROTATION instead. - loadIdentity(); - return; - } - - // Create an axis to rotate around, and the cos of the angle to rotate. - LLVector3 axis = vec_a % vec_b; - F32 cos_theta = vec_a * vec_b; - - // Check the angle between the vectors to see if they are parallel or anti-parallel. - if (cos_theta > 1.0 - F_APPROXIMATELY_ZERO) - { - // a and b are parallel. No rotation is necessary. - loadIdentity(); - } - else if (cos_theta < -1.0 + F_APPROXIMATELY_ZERO) + F32 ab = a * b; // dotproduct + LLVector3 c = a % b; // crossproduct + F32 cc = c * c; // squared length of the crossproduct + if (ab * ab + cc) // test if the arguments have sufficient magnitude { - // a and b are anti-parallel. - // Rotate 180 degrees around some orthogonal axis. - // Find the projection of the x-axis onto a, and try - // using the vector between the projection and the x-axis - // as the orthogonal axis. - LLVector3 proj = vec_a.mV[VX] / (vec_a * vec_a) * vec_a; - LLVector3 ortho_axis(1.f, 0.f, 0.f); - ortho_axis -= proj; - - // Turn this into an orthonormal axis. - F32 ortho_length = ortho_axis.normalize(); - // If the axis' length is 0, then our guess at an orthogonal axis - // was wrong (a is parallel to the x-axis). - if (ortho_length < F_APPROXIMATELY_ZERO) + if (cc > 0.0f) // test if the arguments are (anti)parallel { - // Use the z-axis instead. - ortho_axis.setVec(0.f, 0.f, 1.f); + F32 s = sqrtf(ab * ab + cc) + ab; // note: don't try to optimize this line + F32 m = 1.0f / sqrtf(cc + s * s); // the inverted magnitude of the quaternion + mQ[VX] = c.mV[VX] * m; + mQ[VY] = c.mV[VY] * m; + mQ[VZ] = c.mV[VZ] * m; + mQ[VW] = s * m; + return; + } + if (ab < 0.0f) // test if the angle is bigger than PI/2 (anti parallel) + { + c = a - b; // the arguments are anti-parallel, we have to choose an axis + F32 m = sqrtf(c.mV[VX] * c.mV[VX] + c.mV[VY] * c.mV[VY]); // the length projected on the XY-plane + if (m > FP_MAG_THRESHOLD) + { + mQ[VX] = -c.mV[VY] / m; // return the quaternion with the axis in the XY-plane + mQ[VY] = c.mV[VX] / m; + mQ[VZ] = 0.0f; + mQ[VW] = 0.0f; + return; + } + else // the vectors are parallel to the Z-axis + { + mQ[VX] = 1.0f; // rotate around the X-axis + mQ[VY] = 0.0f; + mQ[VZ] = 0.0f; + mQ[VW] = 0.0f; + return; + } } - - // Construct a quaternion from this orthonormal axis. - mQ[VX] = ortho_axis.mV[VX]; - mQ[VY] = ortho_axis.mV[VY]; - mQ[VZ] = ortho_axis.mV[VZ]; - mQ[VW] = 0.f; - } - else - { - // a and b are NOT parallel or anti-parallel. - // Return the rotation between these vectors. - F32 theta = (F32)acos(cos_theta); - - setAngleAxis(theta, axis); } + loadIdentity(); } // constrains rotation to a cone angle specified in radians @@ -838,79 +836,82 @@ LLQuaternion::Order StringToOrder( const char *str ) void LLQuaternion::getAngleAxis(F32* angle, LLVector3 &vec) const { - F32 cos_a = mQ[VW]; - if (cos_a > 1.0f) cos_a = 1.0f; - if (cos_a < -1.0f) cos_a = -1.0f; - - F32 sin_a = (F32) sqrt( 1.0f - cos_a * cos_a ); - - if ( fabs( sin_a ) < 0.0005f ) - sin_a = 1.0f; - else - sin_a = 1.f/sin_a; - - F32 temp_angle = 2.0f * (F32) acos( cos_a ); - if (temp_angle > F_PI) - { - // The (angle,axis) pair should never have angles outside [PI, -PI] - // since we want the _shortest_ (angle,axis) solution. - // Since acos is defined for [0, PI], and we multiply by 2.0, we - // can push the angle outside the acceptible range. - // When this happens we set the angle to the other portion of a - // full 2PI rotation, and negate the axis, which reverses the - // direction of the rotation (by the right-hand rule). - *angle = 2.f * F_PI - temp_angle; - vec.mV[VX] = - mQ[VX] * sin_a; - vec.mV[VY] = - mQ[VY] * sin_a; - vec.mV[VZ] = - mQ[VZ] * sin_a; + F32 v = sqrtf(mQ[VX] * mQ[VX] + mQ[VY] * mQ[VY] + mQ[VZ] * mQ[VZ]); // length of the vector-component + if (v > FP_MAG_THRESHOLD) + { + F32 oomag = 1.0f / v; + F32 w = mQ[VW]; + if (mQ[VW] < 0.0f) + { + w = -w; // make VW positive + oomag = -oomag; // invert the axis + } + vec.mV[VX] = mQ[VX] * oomag; // normalize the axis + vec.mV[VY] = mQ[VY] * oomag; + vec.mV[VZ] = mQ[VZ] * oomag; + *angle = 2.0f * atan2f(v, w); // get the angle } else { - *angle = temp_angle; - vec.mV[VX] = mQ[VX] * sin_a; - vec.mV[VY] = mQ[VY] * sin_a; - vec.mV[VZ] = mQ[VZ] * sin_a; + *angle = 0.0f; // no rotation + vec.mV[VX] = 0.0f; // around some dummy axis + vec.mV[VY] = 0.0f; + vec.mV[VZ] = 1.0f; } } - // quaternion does not need to be normalized void LLQuaternion::getEulerAngles(F32 *roll, F32 *pitch, F32 *yaw) const { - LLMatrix3 rot_mat(*this); - rot_mat.orthogonalize(); - rot_mat.getEulerAngles(roll, pitch, yaw); - -// // NOTE: LLQuaternion's are actually inverted with respect to -// // the matrices, so this code also assumes inverted quaternions -// // (-x, -y, -z, w). The result is that roll,pitch,yaw are applied -// // in reverse order (yaw,pitch,roll). -// F32 x = -mQ[VX], y = -mQ[VY], z = -mQ[VZ], w = mQ[VW]; -// F64 m20 = 2.0*(x*z-y*w); -// if (1.0f - fabsf(m20) < F_APPROXIMATELY_ZERO) -// { -// *roll = 0.0f; -// *pitch = (F32)asin(m20); -// *yaw = (F32)atan2(2.0*(x*y-z*w), 1.0 - 2.0*(x*x+z*z)); -// } -// else -// { -// *roll = (F32)atan2(-2.0*(y*z+x*w), 1.0-2.0*(x*x+y*y)); -// *pitch = (F32)asin(m20); -// *yaw = (F32)atan2(-2.0*(x*y+z*w), 1.0-2.0*(y*y+z*z)); -// } + F32 sx = 2 * (mQ[VX] * mQ[VW] - mQ[VY] * mQ[VZ]); // sine of the roll + F32 sy = 2 * (mQ[VY] * mQ[VW] + mQ[VX] * mQ[VZ]); // sine of the pitch + F32 ys = mQ[VW] * mQ[VW] - mQ[VY] * mQ[VY]; // intermediate cosine 1 + F32 xz = mQ[VX] * mQ[VX] - mQ[VZ] * mQ[VZ]; // intermediate cosine 2 + F32 cx = ys - xz; // cosine of the roll + F32 cy = sqrtf(sx * sx + cx * cx); // cosine of the pitch + if (cy > GIMBAL_THRESHOLD) // no gimbal lock + { + *roll = atan2f(sx, cx); + *pitch = atan2f(sy, cy); + *yaw = atan2f(2 * (mQ[VZ] * mQ[VW] - mQ[VX] * mQ[VY]), ys + xz); + } + else // gimbal lock + { + if (sy > 0) + { + *pitch = F_PI_BY_TWO; + *yaw = 2 * atan2f(mQ[VZ] + mQ[VX], mQ[VW] + mQ[VY]); + } + else + { + *pitch = -F_PI_BY_TWO; + *yaw = 2 * atan2f(mQ[VZ] - mQ[VX], mQ[VW] - mQ[VY]); + } + *roll = 0; + } } // Saves space by using the fact that our quaternions are normalized LLVector3 LLQuaternion::packToVector3() const { + F32 x = mQ[VX]; + F32 y = mQ[VY]; + F32 z = mQ[VZ]; + F32 w = mQ[VW]; + F32 mag = sqrtf(x * x + y * y + z * z + w * w); + if (mag > FP_MAG_THRESHOLD) + { + x /= mag; + y /= mag; + z /= mag; // no need to normalize w, it's not used + } if( mQ[VW] >= 0 ) { - return LLVector3( mQ[VX], mQ[VY], mQ[VZ] ); + return LLVector3( x, y , z ); } else { - return LLVector3( -mQ[VX], -mQ[VY], -mQ[VZ] ); + return LLVector3( -x, -y, -z ); } } diff --git a/indra/llmath/llquaternion.h b/indra/llmath/llquaternion.h index ca0dfe206b..e56929ed0f 100755 --- a/indra/llmath/llquaternion.h +++ b/indra/llmath/llquaternion.h @@ -1,4 +1,4 @@ -/** +/** * @file llquaternion.h * @brief LLQuaternion class header file. * @@ -304,43 +304,29 @@ inline const LLQuaternion& LLQuaternion::setQuat(const F32 *q) return (*this); } -// There may be a cheaper way that avoids the sqrt. -// Does sin_a = VX*VX + VY*VY + VZ*VZ? -// Copied from Matrix and Quaternion FAQ 1.12 inline void LLQuaternion::getAngleAxis(F32* angle, F32* x, F32* y, F32* z) const { - F32 cos_a = mQ[VW]; - if (cos_a > 1.0f) cos_a = 1.0f; - if (cos_a < -1.0f) cos_a = -1.0f; - - F32 sin_a = (F32) sqrt( 1.0f - cos_a * cos_a ); - - if ( fabs( sin_a ) < 0.0005f ) - sin_a = 1.0f; - else - sin_a = 1.f/sin_a; - - F32 temp_angle = 2.0f * (F32) acos( cos_a ); - if (temp_angle > F_PI) + F32 v = sqrtf(mQ[VX] * mQ[VX] + mQ[VY] * mQ[VY] + mQ[VZ] * mQ[VZ]); // length of the vector-component + if (v > FP_MAG_THRESHOLD) { - // The (angle,axis) pair should never have angles outside [PI, -PI] - // since we want the _shortest_ (angle,axis) solution. - // Since acos is defined for [0, PI], and we multiply by 2.0, we - // can push the angle outside the acceptible range. - // When this happens we set the angle to the other portion of a - // full 2PI rotation, and negate the axis, which reverses the - // direction of the rotation (by the right-hand rule). - *angle = 2.f * F_PI - temp_angle; - *x = - mQ[VX] * sin_a; - *y = - mQ[VY] * sin_a; - *z = - mQ[VZ] * sin_a; + F32 oomag = 1.0f / v; + F32 w = mQ[VW]; + if (w < 0.0f) + { + w = -w; // make VW positive + oomag = -oomag; // invert the axis + } + *x = mQ[VX] * oomag; // normalize the axis + *y = mQ[VY] * oomag; + *z = mQ[VZ] * oomag; + *angle = 2.0f * atan2f(v, w); // get the angle } else { - *angle = temp_angle; - *x = mQ[VX] * sin_a; - *y = mQ[VY] * sin_a; - *z = mQ[VZ] * sin_a; + *angle = 0.0f; // no rotation + *x = 0.0f; // around some dummy axis + *y = 0.0f; + *z = 1.0f; } } diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h index cab4c93a9f..4938273d5b 100755 --- a/indra/llmath/v3dmath.h +++ b/indra/llmath/v3dmath.h @@ -72,17 +72,22 @@ class LLVector3d BOOL clamp(const F64 min, const F64 max); // Clamps all values to (min,max), returns TRUE if data changed BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed - inline const LLVector3d& clearVec(); // Clears LLVector3d to (0, 0, 0, 1) + inline const LLVector3d& clear(); // Clears LLVector3d to (0, 0, 0, 1) + inline const LLVector3d& clearVec(); // deprecated inline const LLVector3d& setZero(); // Zero LLVector3d to (0, 0, 0, 0) inline const LLVector3d& zeroVec(); // deprecated - inline const LLVector3d& setVec(const F64 x, const F64 y, const F64 z); // Sets LLVector3d to (x, y, z, 1) - inline const LLVector3d& setVec(const LLVector3d &vec); // Sets LLVector3d to vec - inline const LLVector3d& setVec(const F64 *vec); // Sets LLVector3d to vec - inline const LLVector3d& setVec(const LLVector3 &vec); - - F64 magVec() const; // Returns magnitude of LLVector3d - F64 magVecSquared() const; // Returns magnitude squared of LLVector3d - inline F64 normVec(); // Normalizes and returns the magnitude of LLVector3d + inline const LLVector3d& set(const F64 x, const F64 y, const F64 z); // Sets LLVector3d to (x, y, z, 1) + inline const LLVector3d& set(const LLVector3d &vec); // Sets LLVector3d to vec + inline const LLVector3d& set(const F64 *vec); // Sets LLVector3d to vec + inline const LLVector3d& set(const LLVector3 &vec); + inline const LLVector3d& setVec(const F64 x, const F64 y, const F64 z); // deprecated + inline const LLVector3d& setVec(const LLVector3d &vec); // deprecated + inline const LLVector3d& setVec(const F64 *vec); // deprecated + inline const LLVector3d& setVec(const LLVector3 &vec); // deprecated + + F64 magVec() const; // deprecated + F64 magVecSquared() const; // deprecated + inline F64 normVec(); // deprecated F64 length() const; // Returns magnitude of LLVector3d F64 lengthSquared() const; // Returns magnitude squared of LLVector3d @@ -127,7 +132,15 @@ class LLVector3d typedef LLVector3d LLGlobalVec; -const LLVector3d &LLVector3d::setVec(const LLVector3 &vec) +inline const LLVector3d &LLVector3d::set(const LLVector3 &vec) +{ + mdV[0] = vec.mV[0]; + mdV[1] = vec.mV[1]; + mdV[2] = vec.mV[2]; + return *this; +} + +inline const LLVector3d &LLVector3d::setVec(const LLVector3 &vec) { mdV[0] = vec.mV[0]; mdV[1] = vec.mV[1]; @@ -184,6 +197,14 @@ inline BOOL LLVector3d::isFinite() const // Clear and Assignment Functions +inline const LLVector3d& LLVector3d::clear(void) +{ + mdV[0] = 0.f; + mdV[1] = 0.f; + mdV[2]= 0.f; + return (*this); +} + inline const LLVector3d& LLVector3d::clearVec(void) { mdV[0] = 0.f; @@ -208,6 +229,30 @@ inline const LLVector3d& LLVector3d::zeroVec(void) return (*this); } +inline const LLVector3d& LLVector3d::set(const F64 x, const F64 y, const F64 z) +{ + mdV[VX] = x; + mdV[VY] = y; + mdV[VZ] = z; + return (*this); +} + +inline const LLVector3d& LLVector3d::set(const LLVector3d &vec) +{ + mdV[0] = vec.mdV[0]; + mdV[1] = vec.mdV[1]; + mdV[2] = vec.mdV[2]; + return (*this); +} + +inline const LLVector3d& LLVector3d::set(const F64 *vec) +{ + mdV[0] = vec[0]; + mdV[1] = vec[1]; + mdV[2] = vec[2]; + return (*this); +} + inline const LLVector3d& LLVector3d::setVec(const F64 x, const F64 y, const F64 z) { mdV[VX] = x; diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h index c807a30f7b..f3fbce4843 100755 --- a/indra/llmath/v3math.h +++ b/indra/llmath/v3math.h @@ -1,4 +1,4 @@ -/** +/** * @file v3math.h * @brief LLVector3 class header file. * @@ -159,9 +159,7 @@ F32 dist_vec(const LLVector3 &a, const LLVector3 &b); // Returns distance betwe F32 dist_vec_squared(const LLVector3 &a, const LLVector3 &b);// Returns distance squared between a and b F32 dist_vec_squared2D(const LLVector3 &a, const LLVector3 &b);// Returns distance squared between a and b ignoring Z component LLVector3 projected_vec(const LLVector3 &a, const LLVector3 &b); // Returns vector a projected on vector b -// Returns a vector in direction of a, such that when projected onto b, gives you the same value as b -// in other words: projected_vec(inverse_projected_vec(a, b), b) == b; -LLVector3 inverse_projected_vec(const LLVector3 &a, const LLVector3 &b); +LLVector3 inverse_projected_vec(const LLVector3 &a, const LLVector3 &b); // Returns vector a scaled such that projected_vec(inverse_projected_vec(a, b), b) == b; LLVector3 parallel_component(const LLVector3 &a, const LLVector3 &b); // Returns vector a projected on vector b (same as projected_vec) LLVector3 orthogonal_component(const LLVector3 &a, const LLVector3 &b); // Returns component of vector a not parallel to vector b (same as projected_vec) LLVector3 lerp(const LLVector3 &a, const LLVector3 &b, F32 u); // Returns a vector that is a linear interpolation between a and b @@ -493,9 +491,15 @@ inline F32 dist_vec_squared2D(const LLVector3 &a, const LLVector3 &b) inline LLVector3 projected_vec(const LLVector3 &a, const LLVector3 &b) { - LLVector3 project_axis = b; - project_axis.normalize(); - return project_axis * (a * project_axis); + F32 bb = b * b; + if (bb > FP_MAG_THRESHOLD * FP_MAG_THRESHOLD) + { + return ((a * b) / bb) * b; + } + else + { + return b.zero; + } } inline LLVector3 inverse_projected_vec(const LLVector3& a, const LLVector3& b) @@ -571,15 +575,13 @@ inline void update_min_max(LLVector3& min, LLVector3& max, const F32* pos) inline F32 angle_between(const LLVector3& a, const LLVector3& b) { - LLVector3 an = a; - LLVector3 bn = b; - an.normalize(); - bn.normalize(); - F32 cosine = an * bn; - F32 angle = (cosine >= 1.0f) ? 0.0f : - (cosine <= -1.0f) ? F_PI : - (F32)acos(cosine); - return angle; + F32 ab = a * b; // dotproduct + if (ab == -0.0f) + { + ab = 0.0f; // get rid of negative zero + } + LLVector3 c = a % b; // crossproduct + return atan2f(sqrtf(c * c), ab); // return the angle } inline BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon) diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h index 0b5d49e322..c727363b60 100755 --- a/indra/llmessage/llares.h +++ b/indra/llmessage/llares.h @@ -39,7 +39,7 @@ # pragma warning(pop) #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <ares.h> #else # include <ares/ares.h> diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index f168ac4ec6..a30140e8f3 100755 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -38,7 +38,7 @@ #include "llvfs.h" #include "llxfer.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <zlib.h> #else # include "zlib/zlib.h" diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index b0456e3ccf..57a698b98f 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -44,7 +44,7 @@ #pragma warning (default : 4264) #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include <zlib.h> #else # include "zlib/zlib.h" diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index fcd7b274e8..75773d7dfd 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -1,25 +1,25 @@ -/** +/** * @file llkeywords.cpp * @brief Keyword list for LSL * * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, 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$ */ @@ -30,49 +30,48 @@ #include <fstream> #include "llkeywords.h" +#include "llsdserialize.h" #include "lltexteditor.h" #include "llstl.h" -#include <boost/tokenizer.hpp> - -const U32 KEYWORD_FILE_CURRENT_VERSION = 2; -inline BOOL LLKeywordToken::isHead(const llwchar* s) const +inline bool LLKeywordToken::isHead(const llwchar* s) const { // strncmp is much faster than string compare - BOOL res = TRUE; + bool res = true; const llwchar* t = mToken.c_str(); S32 len = mToken.size(); for (S32 i=0; i<len; i++) { if (s[i] != t[i]) { - res = FALSE; + res = false; break; } } return res; } -LLKeywords::LLKeywords() : mLoaded(FALSE) -{ -} - -inline BOOL LLKeywordToken::isTail(const llwchar* s) const +inline bool LLKeywordToken::isTail(const llwchar* s) const { - BOOL res = TRUE; + bool res = true; const llwchar* t = mDelimiter.c_str(); S32 len = mDelimiter.size(); for (S32 i=0; i<len; i++) { if (s[i] != t[i]) { - res = FALSE; + res = false; break; } } return res; } +LLKeywords::LLKeywords() +: mLoaded(false) +{ +} + LLKeywords::~LLKeywords() { std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer()); @@ -83,180 +82,307 @@ LLKeywords::~LLKeywords() mDelimiterTokenList.clear(); } -BOOL LLKeywords::loadFromFile( const std::string& filename ) +// Add the token as described +void LLKeywords::addToken(LLKeywordToken::ETokenType type, + const std::string& key_in, + const LLColor4& color, + const std::string& tool_tip_in, + const std::string& delimiter_in) { - mLoaded = FALSE; - - //////////////////////////////////////////////////////////// - // File header - - const S32 BUFFER_SIZE = 1024; - char buffer[BUFFER_SIZE]; /* Flawfinder: ignore */ - - llifstream file; - file.open(filename); /* Flawfinder: ignore */ - if( file.fail() ) + std::string tip_text = tool_tip_in; + LLStringUtil::replaceString(tip_text, "\\n", "\n" ); + LLStringUtil::replaceString(tip_text, "\t", " " ); + if (tip_text.empty()) { - LL_INFOS() << "LLKeywords::loadFromFile() Unable to open file: " << filename << LL_ENDL; - return mLoaded; + tip_text = "[no info]"; } + LLWString tool_tip = utf8str_to_wstring(tip_text); - // Identifying string - file >> buffer; - if( strcmp( buffer, "llkeywords" ) ) - { - LL_INFOS() << filename << " does not appear to be a keyword file" << LL_ENDL; - return mLoaded; - } - - // Check file version - file >> buffer; - U32 version_num; - file >> version_num; - if( strcmp(buffer, "version") || version_num != (U32)KEYWORD_FILE_CURRENT_VERSION ) + LLWString key = utf8str_to_wstring(key_in); + LLWString delimiter = utf8str_to_wstring(delimiter_in); + switch(type) { - LL_INFOS() << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << LL_ENDL; - return mLoaded; - } + case LLKeywordToken::TT_CONSTANT: + case LLKeywordToken::TT_CONTROL: + case LLKeywordToken::TT_EVENT: + case LLKeywordToken::TT_FUNCTION: + case LLKeywordToken::TT_LABEL: + case LLKeywordToken::TT_SECTION: + case LLKeywordToken::TT_TYPE: + case LLKeywordToken::TT_WORD: + mWordTokenMap[key] = new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null); + break; - // start of line (SOL) - std::string SOL_COMMENT("#"); - std::string SOL_WORD("[word "); - std::string SOL_LINE("[line "); - std::string SOL_ONE_SIDED_DELIMITER("[one_sided_delimiter "); - std::string SOL_TWO_SIDED_DELIMITER("[two_sided_delimiter "); - std::string SOL_DOUBLE_QUOTATION_MARKS("[double_quotation_marks "); + case LLKeywordToken::TT_LINE: + mLineTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null)); + break; - LLColor3 cur_color( 1, 0, 0 ); - LLKeywordToken::TOKEN_TYPE cur_type = LLKeywordToken::WORD; + case LLKeywordToken::TT_TWO_SIDED_DELIMITER: + case LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS: + case LLKeywordToken::TT_ONE_SIDED_DELIMITER: + mDelimiterTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, delimiter)); + break; - while (!file.eof()) - { - buffer[0] = 0; - file.getline( buffer, BUFFER_SIZE ); - std::string line(buffer); - if( line.find(SOL_COMMENT) == 0 ) - { - continue; - } - else if( line.find(SOL_WORD) == 0 ) - { - cur_color = readColor( line.substr(SOL_WORD.size()) ); - cur_type = LLKeywordToken::WORD; - continue; - } - else if( line.find(SOL_LINE) == 0 ) - { - cur_color = readColor( line.substr(SOL_LINE.size()) ); - cur_type = LLKeywordToken::LINE; - continue; - } - else if( line.find(SOL_TWO_SIDED_DELIMITER) == 0 ) - { - cur_color = readColor( line.substr(SOL_TWO_SIDED_DELIMITER.size()) ); - cur_type = LLKeywordToken::TWO_SIDED_DELIMITER; - continue; - } - else if( line.find(SOL_DOUBLE_QUOTATION_MARKS) == 0 ) - { - cur_color = readColor( line.substr(SOL_DOUBLE_QUOTATION_MARKS.size()) ); - cur_type = LLKeywordToken::DOUBLE_QUOTATION_MARKS; - continue; - } - else if( line.find(SOL_ONE_SIDED_DELIMITER) == 0 ) - { - cur_color = readColor( line.substr(SOL_ONE_SIDED_DELIMITER.size()) ); - cur_type = LLKeywordToken::ONE_SIDED_DELIMITER; - continue; - } + default: + llassert(0); + } +} - std::string token_buffer( line ); - LLStringUtil::trim(token_buffer); - - typedef boost::tokenizer<boost::char_separator<char> > tokenizer; - boost::char_separator<char> sep_word("", " \t"); - tokenizer word_tokens(token_buffer, sep_word); - tokenizer::iterator token_word_iter = word_tokens.begin(); +std::string LLKeywords::getArguments(LLSD& arguments) +{ + std::string argString = ""; - if( !token_buffer.empty() && token_word_iter != word_tokens.end() ) + if (arguments.isArray()) + { + U32 argsCount = arguments.size(); + LLSD::array_iterator arrayIt = arguments.beginArray(); + for ( ; arrayIt != arguments.endArray(); ++arrayIt) { - // first word is the keyword or a left delimiter - std::string keyword = (*token_word_iter); - LLStringUtil::trim(keyword); - - // second word may be a right delimiter - std::string delimiter; - if (cur_type == LLKeywordToken::TWO_SIDED_DELIMITER) + LLSD& args = (*arrayIt); + if (args.isMap()) { - while (delimiter.length() == 0 && ++token_word_iter != word_tokens.end()) + LLSD::map_iterator argsIt = args.beginMap(); + for ( ; argsIt != args.endMap(); ++argsIt) { - delimiter = *token_word_iter; - LLStringUtil::trim(delimiter); + argString += argsIt->second.get("type").asString() + " " + argsIt->first; + if (argsCount-- > 1) + { + argString += ", "; + } } } - else if (cur_type == LLKeywordToken::DOUBLE_QUOTATION_MARKS) + else { - // Closing delimiter is identical to the opening one. - delimiter = keyword; + LL_WARNS("SyntaxLSL") << "Argument array comtains a non-map element!" << LL_ENDL; } + } + } + else if (!arguments.isUndefined()) + { + LL_WARNS("SyntaxLSL") << "Not an array! Invalid arguments LLSD passed to function." << arguments << LL_ENDL; + } + return argString; +} - // following words are tooltip - std::string tool_tip; - while (++token_word_iter != word_tokens.end()) - { - tool_tip += (*token_word_iter); - } - LLStringUtil::trim(tool_tip); - - if( !tool_tip.empty() ) +std::string LLKeywords::getAttribute(const std::string& key) +{ + attribute_iterator_t it = mAttributes.find(key); + return (it != mAttributes.end()) ? it->second : ""; +} + +LLColor4 LLKeywords::getColorGroup(const std::string& key_in) +{ + std::string color_group = "ScriptText"; + if (key_in == "functions") + { + color_group = "SyntaxLslFunction"; + } + else if (key_in == "controls") + { + color_group = "SyntaxLslControlFlow"; + } + else if (key_in == "events") + { + color_group = "SyntaxLslEvent"; + } + else if (key_in == "types") + { + color_group = "SyntaxLslDataType"; + } + else if (key_in == "misc-flow-label") + { + color_group = "SyntaxLslControlFlow"; + } + else if (key_in =="deprecated") + { + color_group = "SyntaxLslDeprecated"; + } + else if (key_in =="god-mode") + { + color_group = "SyntaxLslGodMode"; + } + else if (key_in == "constants" + || key_in == "constants-integer" + || key_in == "constants-float" + || key_in == "constants-string" + || key_in == "constants-key" + || key_in == "constants-rotation" + || key_in == "constants-vector") + { + color_group = "SyntaxLslConstant"; + } + else + { + LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized." << LL_ENDL; + } + + return LLUIColorTable::instance().getColor(color_group); +} + +void LLKeywords::initialize(LLSD SyntaxXML) +{ + mSyntax = SyntaxXML; + mLoaded = true; +} + +void LLKeywords::processTokens() +{ + if (!mLoaded) + { + return; + } + + // Add 'standard' stuff: Quotes, Comments, Strings, Labels, etc. before processing the LLSD + std::string delimiter; + addToken(LLKeywordToken::TT_LABEL, "@", getColorGroup("misc-flow-label"), "Label\nTarget for jump statement", delimiter ); + addToken(LLKeywordToken::TT_ONE_SIDED_DELIMITER, "//", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (single-line)\nNon-functional commentary or disabled code", delimiter ); + addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (multi-line)\nNon-functional commentary or disabled code", "*/" ); + addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", LLUIColorTable::instance().getColor("SyntaxLslStringLiteral"), "String literal", "\"" ); + + LLSD::map_iterator itr = mSyntax.beginMap(); + for ( ; itr != mSyntax.endMap(); ++itr) + { + if (itr->first == "llsd-lsl-syntax-version") + { + // Skip over version key. + } + else + { + if (itr->second.isMap()) { - // Replace : with \n for multi-line tool tips. - LLStringUtil::replaceChar( tool_tip, ':', '\n' ); - addToken(cur_type, keyword, cur_color, tool_tip, delimiter ); + processTokensGroup(itr->second, itr->first); } else { - addToken(cur_type, keyword, cur_color, LLStringUtil::null, delimiter ); + LL_WARNS("LSL-Tokens-Processing") << "Map for " + itr->first + " entries is missing! Ignoring." << LL_ENDL; } } } - - file.close(); - - mLoaded = TRUE; - return mLoaded; + LL_INFOS("SyntaxLSL") << "Finished processing tokens." << LL_ENDL; } -// Add the token as described -void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type, - const std::string& key_in, - const LLColor3& color, - const std::string& tool_tip_in, - const std::string& delimiter_in) +void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group) { - LLWString key = utf8str_to_wstring(key_in); - LLWString tool_tip = utf8str_to_wstring(tool_tip_in); - LLWString delimiter = utf8str_to_wstring(delimiter_in); - switch(type) + LLColor4 color; + LLColor4 color_group; + LLColor4 color_deprecated = getColorGroup("deprecated"); + LLColor4 color_god_mode = getColorGroup("god-mode"); + + LLKeywordToken::ETokenType token_type = LLKeywordToken::TT_UNKNOWN; + // If a new token type is added here, it must also be added to the 'addToken' method + if (group == "constants") { - case LLKeywordToken::WORD: - mWordTokenMap[key] = new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null); - break; + token_type = LLKeywordToken::TT_CONSTANT; + } + else if (group == "controls") + { + token_type = LLKeywordToken::TT_CONTROL; + } + else if (group == "events") + { + token_type = LLKeywordToken::TT_EVENT; + } + else if (group == "functions") + { + token_type = LLKeywordToken::TT_FUNCTION; + } + else if (group == "label") + { + token_type = LLKeywordToken::TT_LABEL; + } + else if (group == "types") + { + token_type = LLKeywordToken::TT_TYPE; + } - case LLKeywordToken::LINE: - mLineTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null)); - break; + color_group = getColorGroup(group); + LL_INFOS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL; - case LLKeywordToken::TWO_SIDED_DELIMITER: - case LLKeywordToken::DOUBLE_QUOTATION_MARKS: - case LLKeywordToken::ONE_SIDED_DELIMITER: - mDelimiterTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, delimiter)); - break; + if (tokens.isMap()) + { + LLSD::map_const_iterator outer_itr = tokens.beginMap(); + for ( ; outer_itr != tokens.endMap(); ++outer_itr ) + { + if (outer_itr->second.isMap()) + { + mAttributes.clear(); + LLSD arguments = LLSD(); + LLSD::map_const_iterator inner_itr = outer_itr->second.beginMap(); + for ( ; inner_itr != outer_itr->second.endMap(); ++inner_itr ) + { + if (inner_itr->first == "arguments") + { + if (inner_itr->second.isArray()) + { + arguments = inner_itr->second; + } + } + else if (!inner_itr->second.isMap() && !inner_itr->second.isArray()) + { + mAttributes[inner_itr->first] = inner_itr->second.asString(); + } + else + { + LL_WARNS("SyntaxLSL") << "Not a valid attribute: " << inner_itr->first << LL_ENDL; + } + } - default: - llassert(0); + std::string tooltip = ""; + switch (token_type) + { + case LLKeywordToken::TT_CONSTANT: + color_group = getColorGroup(group + "-" + getAttribute("type")); + tooltip = "Type: " + getAttribute("type") + ", Value: " + getAttribute("value"); + break; + case LLKeywordToken::TT_EVENT: + tooltip = outer_itr->first + "(" + getArguments(arguments) + ")"; + break; + case LLKeywordToken::TT_FUNCTION: + tooltip = getAttribute("return") + " " + outer_itr->first + "(" + getArguments(arguments) + ");"; + tooltip.append("\nEnergy: "); + tooltip.append(getAttribute("energy").empty() ? "0.0" : getAttribute("energy")); + if (!getAttribute("sleep").empty()) + { + tooltip += ", Sleep: " + getAttribute("sleep"); + } + default: + break; + } + + if (!getAttribute("tooltip").empty()) + { + if (!tooltip.empty()) + { + tooltip.append("\n"); + } + tooltip.append(getAttribute("tooltip")); + } + + color = getAttribute("deprecated") == "true" ? color_deprecated : color_group; + + if (getAttribute("god-mode") == "true") + { + color = color_god_mode; + } + + addToken(token_type, outer_itr->first, color, tooltip); + } + } + } + else if (tokens.isArray()) // Currently nothing should need this, but it's here for completeness + { + LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color << LL_ENDL; + for (S32 count = 0; count < tokens.size(); ++count) + { + addToken(token_type, tokens[count], color, ""); + } + } + else + { + LL_WARNS("SyntaxLSL") << "Invalid map/array passed: '" << tokens << "'" << LL_ENDL; } } + LLKeywords::WStringMapIndex::WStringMapIndex(const WStringMapIndex& other) { if(other.mOwner) @@ -276,15 +402,19 @@ LLKeywords::WStringMapIndex::WStringMapIndex(const LLWString& str) copyData(str.data(), str.size()); } -LLKeywords::WStringMapIndex::WStringMapIndex(const llwchar *start, size_t length): -mData(start), mLength(length), mOwner(false) +LLKeywords::WStringMapIndex::WStringMapIndex(const llwchar *start, size_t length) +: mData(start) +, mLength(length) +, mOwner(false) { } LLKeywords::WStringMapIndex::~WStringMapIndex() { - if(mOwner) + if (mOwner) + { delete[] mData; + } } void LLKeywords::WStringMapIndex::copyData(const llwchar *start, size_t length) @@ -301,13 +431,13 @@ bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &o { // NOTE: Since this is only used to organize a std::map, it doesn't matter if it uses correct collate order or not. // The comparison only needs to strictly order all possible strings, and be stable. - + bool result = false; const llwchar* self_iter = mData; const llwchar* self_end = mData + mLength; const llwchar* other_iter = other.mData; const llwchar* other_end = other.mData + other.mLength; - + while(true) { if(other_iter >= other_end) @@ -322,7 +452,7 @@ bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &o { // self is shorter than other. result = true; - break; + break; } else if(*self_iter != *other_iter) { @@ -334,20 +464,8 @@ bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &o self_iter++; other_iter++; } - - return result; -} -LLColor3 LLKeywords::readColor( const std::string& s ) -{ - F32 r, g, b; - r = g = b = 0.0f; - S32 values_read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b ); - if( values_read != 3 ) - { - LL_INFOS() << " poorly formed color in keyword file" << LL_ENDL; - } - return LLColor3( r, g, b ); + return result; } LLTrace::BlockTimerStatHandle FTM_SYNTAX_COLORING("Syntax Coloring"); @@ -363,10 +481,10 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW { return; } - + S32 text_len = wtext.size() + 1; - seg_list->push_back( new LLNormalTextSegment( defaultColor, 0, text_len, editor ) ); + seg_list->push_back( new LLNormalTextSegment( defaultColor, 0, text_len, editor ) ); const llwchar* base = wtext.c_str(); const llwchar* cur = base; @@ -396,7 +514,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW continue; } - // cur is now at the first non-whitespace character of a new line + // cur is now at the first non-whitespace character of a new line // Line start tokens { @@ -414,7 +532,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW cur++; } S32 seg_end = cur - base; - + //create segments from seg_start to seg_end insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); line_done = TRUE; // to break out of second loop. @@ -459,14 +577,14 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW seg_start = cur - base; cur += cur_delimiter->getLengthHead(); - - LLKeywordToken::TOKEN_TYPE type = cur_delimiter->getType(); - if( type == LLKeywordToken::TWO_SIDED_DELIMITER || type == LLKeywordToken::DOUBLE_QUOTATION_MARKS ) + + LLKeywordToken::ETokenType type = cur_delimiter->getType(); + if( type == LLKeywordToken::TT_TWO_SIDED_DELIMITER || type == LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS ) { while( *cur && !cur_delimiter->isTail(cur)) { // Check for an escape sequence. - if (type == LLKeywordToken::DOUBLE_QUOTATION_MARKS && *cur == '\\') + if (type == LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS && *cur == '\\') { // Count the number of backslashes. S32 num_backslashes = 0; @@ -513,7 +631,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW } else { - llassert( cur_delimiter->getType() == LLKeywordToken::ONE_SIDED_DELIMITER ); + llassert( cur_delimiter->getType() == LLKeywordToken::TT_ONE_SIDED_DELIMITER ); // Left side is the delimiter. Right side is eol or eof. while( *cur && ('\n' != *cur) ) { @@ -555,11 +673,11 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW S32 seg_start = cur - base; S32 seg_end = seg_start + seg_len; - // LL_INFOS() << "Seg: [" << word.c_str() << "]" << LL_ENDL; + // llinfos << "Seg: [" << word.c_str() << "]" << llendl; insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); } - cur += seg_len; + cur += seg_len; continue; } } @@ -575,7 +693,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* cur_token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor ) { std::string::size_type pos = wtext.find('\n',seg_start); - + while (pos!=-1 && pos < (std::string::size_type)seg_end) { if (pos!=seg_start) @@ -622,10 +740,10 @@ void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSe #ifdef _DEBUG void LLKeywords::dump() { - LL_INFOS() << "LLKeywords" << LL_ENDL; + llinfos << "LLKeywords" << llendl; - LL_INFOS() << "LLKeywords::sWordTokenMap" << LL_ENDL; + llinfos << "LLKeywords::sWordTokenMap" << llendl; word_token_map_t::iterator word_token_iter = mWordTokenMap.begin(); while( word_token_iter != mWordTokenMap.end() ) { @@ -634,7 +752,7 @@ void LLKeywords::dump() ++word_token_iter; } - LL_INFOS() << "LLKeywords::sLineTokenList" << LL_ENDL; + llinfos << "LLKeywords::sLineTokenList" << llendl; for (token_list_t::iterator iter = mLineTokenList.begin(); iter != mLineTokenList.end(); ++iter) { @@ -643,7 +761,7 @@ void LLKeywords::dump() } - LL_INFOS() << "LLKeywords::sDelimiterTokenList" << LL_ENDL; + llinfos << "LLKeywords::sDelimiterTokenList" << llendl; for (token_list_t::iterator iter = mDelimiterTokenList.begin(); iter != mDelimiterTokenList.end(); ++iter) { @@ -654,12 +772,12 @@ void LLKeywords::dump() void LLKeywordToken::dump() { - LL_INFOS() << "[" << + llinfos << "[" << mColor.mV[VX] << ", " << mColor.mV[VY] << ", " << mColor.mV[VZ] << "] [" << wstring_to_utf8str(mToken) << "]" << - LL_ENDL; + llendl; } #endif // DEBUG diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index ac34015393..18e2ed06c5 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -1,25 +1,25 @@ -/** +/** * @file llkeywords.h * @brief Keyword list for LSL * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, 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$ */ @@ -28,8 +28,10 @@ #define LL_LLKEYWORDS_H +#include "lldir.h" #include "llstring.h" #include "v3color.h" +#include "v4color.h" #include <map> #include <list> #include <deque> @@ -41,26 +43,35 @@ typedef LLPointer<LLTextSegment> LLTextSegmentPtr; class LLKeywordToken { public: - /** + /** * @brief Types of tokens/delimters being parsed. * * @desc Tokens/delimiters that need to be identified/highlighted. All are terminated if an EOF is encountered. - * - WORD are keywords in the normal sense, i.e. constants, events, etc. - * - LINE are for entire lines (currently only flow control labels use this). - * - ONE_SIDED_DELIMITER are for open-ended delimiters which are terminated by EOL. - * - TWO_SIDED_DELIMITER are for delimiters that end with a different delimiter than they open with. - * - DOUBLE_QUOTATION_MARKS are for delimiting areas using the same delimiter to open and close. + * - TT_WORD are keywords in the normal sense, i.e. constants, events, etc. + * - TT_LINE are for entire lines (currently only flow control labels use this). + * - TT_ONE_SIDED_DELIMITER are for open-ended delimiters which are terminated by EOL. + * - TT_TWO_SIDED_DELIMITER are for delimiters that end with a different delimiter than they open with. + * - TT_DOUBLE_QUOTATION_MARKS are for delimiting areas using the same delimiter to open and close. */ - enum TOKEN_TYPE + typedef enum e_token_type { - WORD, - LINE, - TWO_SIDED_DELIMITER, - ONE_SIDED_DELIMITER, - DOUBLE_QUOTATION_MARKS - }; - - LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter ) + TT_UNKNOWN, + TT_WORD, + TT_LINE, + TT_TWO_SIDED_DELIMITER, + TT_ONE_SIDED_DELIMITER, + TT_DOUBLE_QUOTATION_MARKS, + // Following constants are more specific versions of the preceding ones + TT_CONSTANT, // WORD + TT_CONTROL, // WORD + TT_EVENT, // WORD + TT_FUNCTION, // WORD + TT_LABEL, // LINE + TT_SECTION, // WORD + TT_TYPE // WORD + } ETokenType; + + LLKeywordToken( ETokenType type, const LLColor4& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter ) : mType( type ), mToken( token ), @@ -72,11 +83,11 @@ public: S32 getLengthHead() const { return mToken.size(); } S32 getLengthTail() const { return mDelimiter.size(); } - BOOL isHead(const llwchar* s) const; - BOOL isTail(const llwchar* s) const; + bool isHead(const llwchar* s) const; + bool isTail(const llwchar* s) const; const LLWString& getToken() const { return mToken; } - const LLColor3& getColor() const { return mColor; } - TOKEN_TYPE getType() const { return mType; } + const LLColor4& getColor() const { return mColor; } + ETokenType getType() const { return mType; } const LLWString& getToolTip() const { return mToolTip; } const LLWString& getDelimiter() const { return mDelimiter; } @@ -85,9 +96,9 @@ public: #endif private: - TOKEN_TYPE mType; + ETokenType mType; LLWString mToken; - LLColor3 mColor; + LLColor4 mColor; LLWString mToolTip; LLWString mDelimiter; }; @@ -98,18 +109,24 @@ public: LLKeywords(); ~LLKeywords(); - BOOL loadFromFile(const std::string& filename); - BOOL isLoaded() const { return mLoaded; } + void clearLoaded() { mLoaded = false; } + LLColor4 getColorGroup(const std::string& key_in); + bool isLoaded() const { return mLoaded; } - void findSegments(std::vector<LLTextSegmentPtr> *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); + void findSegments(std::vector<LLTextSegmentPtr> *seg_list, + const LLWString& text, + const LLColor4 &defaultColor, + class LLTextEditor& editor); + void initialize(LLSD SyntaxXML); + void processTokens(); // Add the token as described - void addToken(LLKeywordToken::TOKEN_TYPE type, + void addToken(LLKeywordToken::ETokenType type, const std::string& key, - const LLColor3& color, + const LLColor4& color, const std::string& tool_tip = LLStringUtil::null, const std::string& delimiter = LLStringUtil::null); - + // This class is here as a performance optimization. // The word token map used to be defined as std::map<LLWString, LLKeywordToken*>. // This worked, but caused a performance bottleneck due to memory allocation and string copies @@ -133,6 +150,9 @@ public: const llwchar *mData; size_t mLength; bool mOwner; + + + LLColor4 mColor; }; typedef std::map<WStringMapIndex, LLKeywordToken*> word_token_map_t; @@ -140,20 +160,43 @@ public: keyword_iterator_t begin() const { return mWordTokenMap.begin(); } keyword_iterator_t end() const { return mWordTokenMap.end(); } + typedef std::map<WStringMapIndex, LLColor4> group_color_map_t; + typedef group_color_map_t::const_iterator color_iterator_t; + group_color_map_t mColorGroupMap; + #ifdef _DEBUG void dump(); #endif -private: - LLColor3 readColor(const std::string& s); - void insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); - void insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor); - - BOOL mLoaded; +protected: + void processTokensGroup(const LLSD& Tokens, const std::string& Group); + void insertSegment(std::vector<LLTextSegmentPtr>& seg_list, + LLTextSegmentPtr new_segment, + S32 text_len, + const LLColor4 &defaultColor, + class LLTextEditor& editor); + void insertSegments(const LLWString& wtext, + std::vector<LLTextSegmentPtr>& seg_list, + LLKeywordToken* token, + S32 text_len, + S32 seg_start, + S32 seg_end, + const LLColor4 &defaultColor, + LLTextEditor& editor); + + bool mLoaded; + LLSD mSyntax; word_token_map_t mWordTokenMap; typedef std::deque<LLKeywordToken*> token_list_t; token_list_t mLineTokenList; token_list_t mDelimiterTokenList; + + typedef std::map<std::string, std::string> element_attributes_t; + typedef element_attributes_t::const_iterator attribute_iterator_t; + element_attributes_t mAttributes; + std::string getAttribute(const std::string& key); + + std::string getArguments(LLSD& arguments); }; #endif // LL_LLKEYWORDS_H diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 025cd81d92..de14391d1f 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1189,6 +1189,7 @@ void LLNotificationChannel::connectToChannel( const std::string& channel_name ) } else { + mParents.push_back(channel_name); LLNotificationChannelPtr p = LLNotifications::instance().getChannel(channel_name); p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1)); } diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index b0e8553a49..3cf432f330 100755 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -88,6 +88,7 @@ #include <boost/enable_shared_from_this.hpp> #include <boost/type_traits.hpp> #include <boost/signals2.hpp> +#include <boost/range.hpp> #include "llevents.h" #include "llfunctorregistry.h" @@ -840,6 +841,11 @@ public: typedef LLNotificationSet::iterator Iterator; std::string getName() const { return mName; } + typedef std::vector<std::string>::const_iterator parents_iter; + boost::iterator_range<parents_iter> getParents() const + { + return boost::iterator_range<parents_iter>(mParents); + } void connectToChannel(const std::string& channel_name); @@ -854,7 +860,7 @@ public: private: std::string mName; - std::string mParent; + std::vector<std::string> mParents; }; // An interface class to provide a clean linker seam to the LLNotifications class. diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp index 9e8e943ee6..b6a32a0e78 100644 --- a/indra/llui/llnotificationslistener.cpp +++ b/indra/llui/llnotificationslistener.cpp @@ -32,6 +32,7 @@ #include "llnotificationtemplate.h" #include "llsd.h" #include "llui.h" +#include <boost/foreach.hpp> LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) : LLEventAPI("LLNotifications", @@ -42,11 +43,10 @@ LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications "Add a notification with specified [\"name\"], [\"substitutions\"] and [\"payload\"].\n" "If optional [\"reply\"] specified, arrange to send user response on that LLEventPump.", &LLNotificationsListener::requestAdd); - /* add("listChannels", + add("listChannels", "Post to [\"reply\"] a map of info on existing channels", &LLNotificationsListener::listChannels, LLSD().with("reply", LLSD())); - */ add("listChannelNotifications", "Post to [\"reply\"] an array of info on notifications in channel [\"channel\"]", &LLNotificationsListener::listChannelNotifications, @@ -117,26 +117,27 @@ void LLNotificationsListener::NotificationResponder(const std::string& reply_pum reponse_event["response"] = response; LLEventPumps::getInstance()->obtain(reply_pump).post(reponse_event); } -/* + void LLNotificationsListener::listChannels(const LLSD& params) const { LLReqID reqID(params); LLSD response(reqID.makeResponse()); - for (LLNotifications:: - - - - for (LLNotifications::ChannelMap::const_iterator cmi(mNotifications.mChannels.begin()), - cmend(mNotifications.mChannels.end()); + for (LLNotificationChannel::instance_iter cmi(LLNotificationChannel::beginInstances()), + cmend(LLNotificationChannel::endInstances()); cmi != cmend; ++cmi) { - LLSD channelInfo; - channelInfo["parent"] = cmi->second->getParentChannelName(); - response[cmi->first] = channelInfo; + LLSD channelInfo, parents; + BOOST_FOREACH(const std::string& parent, cmi->getParents()) + { + parents.append(parent); + } + channelInfo["parents"] = parents; + channelInfo["parent"] = parents.size()? parents[0] : ""; + response[cmi->getName()] = channelInfo; } LLEventPumps::instance().obtain(params["reply"]).post(response); } -*/ + void LLNotificationsListener::listChannelNotifications(const LLSD& params) const { LLReqID reqID(params); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 8906a6e736..71db0ac030 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -70,43 +70,36 @@ bool LLTextBase::compare_segment_end::operator()(const LLTextSegmentPtr& a, cons // helper functors -struct LLTextBase::compare_bottom +bool LLTextBase::compare_bottom::operator()(const S32& a, const LLTextBase::line_info& b) const { - bool operator()(const S32& a, const LLTextBase::line_info& b) const - { - return a > b.mRect.mBottom; // bottom of a is higher than bottom of b - } - - bool operator()(const LLTextBase::line_info& a, const S32& b) const - { - return a.mRect.mBottom > b; // bottom of a is higher than bottom of b - } + return a > b.mRect.mBottom; // bottom of a is higher than bottom of b +} - bool operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const - { - return a.mRect.mBottom > b.mRect.mBottom; // bottom of a is higher than bottom of b - } +bool LLTextBase::compare_bottom::operator()(const LLTextBase::line_info& a, const S32& b) const +{ + return a.mRect.mBottom > b; // bottom of a is higher than bottom of b +} -}; +bool LLTextBase::compare_bottom::operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const +{ + return a.mRect.mBottom > b.mRect.mBottom; // bottom of a is higher than bottom of b +} // helper functors -struct LLTextBase::compare_top +bool LLTextBase::compare_top::operator()(const S32& a, const LLTextBase::line_info& b) const { - bool operator()(const S32& a, const LLTextBase::line_info& b) const - { - return a > b.mRect.mTop; // top of a is higher than top of b - } + return a > b.mRect.mTop; // top of a is higher than top of b +} - bool operator()(const LLTextBase::line_info& a, const S32& b) const - { - return a.mRect.mTop > b; // top of a is higher than top of b - } +bool LLTextBase::compare_top::operator()(const LLTextBase::line_info& a, const S32& b) const +{ + return a.mRect.mTop > b; // top of a is higher than top of b +} - bool operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const - { - return a.mRect.mTop > b.mRect.mTop; // top of a is higher than top of b - } -}; +bool LLTextBase::compare_top::operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const +{ + return a.mRect.mTop > b.mRect.mTop; // top of a is higher than top of b +} struct LLTextBase::line_end_compare { @@ -573,7 +566,8 @@ void LLTextBase::drawText() if ( (getSpellCheck()) && (getWText().length() > 2) ) { // Calculate start and end indices for the spell checking range - S32 start = line_start, end = getLineEnd(last_line); + S32 start = line_start; + S32 end = getLineEnd(last_line); if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) ) { diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index ecbfdaf84c..738b4d5b8e 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -451,9 +451,31 @@ public: LLScrollContainer* getScrollContainer() const { return mScroller; } protected: + // protected member variables + // List of offsets and segment index of the start of each line. Always has at least one node (0). + struct line_info + { + line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num); + S32 mDocIndexStart; + S32 mDocIndexEnd; + LLRect mRect; + S32 mLineNum; // actual line count (ignoring soft newlines due to word wrap) + }; + typedef std::vector<line_info> line_list_t; + // helper structs - struct compare_bottom; - struct compare_top; + struct compare_bottom + { + bool operator()(const S32& a, const line_info& b) const; + bool operator()(const line_info& a, const S32& b) const; + bool operator()(const line_info& a, const line_info& b) const; + }; + struct compare_top + { + bool operator()(const S32& a, const line_info& b) const; + bool operator()(const line_info& a, const S32& b) const; + bool operator()(const line_info& a, const line_info& b) const; + }; struct line_end_compare; typedef std::vector<LLTextSegmentPtr> segment_vec_t; @@ -501,18 +523,6 @@ protected: }; typedef std::multiset<LLTextSegmentPtr, compare_segment_end> segment_set_t; - // protected member variables - // List of offsets and segment index of the start of each line. Always has at least one node (0). - struct line_info - { - line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num); - S32 mDocIndexStart; - S32 mDocIndexEnd; - LLRect mRect; - S32 mLineNum; // actual line count (ignoring soft newlines due to word wrap) - }; - typedef std::vector<line_info> line_list_t; - // member functions LLTextBase(const Params &p); virtual ~LLTextBase(); @@ -522,7 +532,7 @@ protected: virtual bool useLabel() const; // draw methods - void drawSelectionBackground(); // draws the black box behind the selected text + virtual void drawSelectionBackground(); // draws the black box behind the selected text void drawCursor(); void drawText(); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index b4ebed0849..90e3606998 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -75,8 +75,6 @@ template class LLTextEditor* LLView::getChild<class LLTextEditor>( // // Constants // -const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32; -const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4; const S32 SPACES_PER_TAB = 4; const F32 SPELLCHECK_DELAY = 0.5f; // delay between the last keypress and spell checking the word the cursor is on @@ -236,7 +234,6 @@ LLTextEditor::Params::Params() prevalidate_callback("prevalidate_callback"), embedded_items("embedded_items", false), ignore_tab("ignore_tab", true), - show_line_numbers("show_line_numbers", false), auto_indent("auto_indent", true), default_color("default_color"), commit_on_focus_lost("commit_on_focus_lost", false), @@ -252,8 +249,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mBaseDocIsPristine(TRUE), mPristineCmd( NULL ), mLastCmd( NULL ), - mDefaultColor( p.default_color() ), - mShowLineNumbers ( p.show_line_numbers ), + mDefaultColor( p.default_color() ), mAutoIndent(p.auto_indent), mCommitOnFocusLost( p.commit_on_focus_lost), mAllowEmbeddedItems( p.embedded_items ), @@ -277,14 +273,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : params.visible = p.border_visible; mBorder = LLUICtrlFactory::create<LLViewBorder> (params); addChild( mBorder ); - setText(p.default_text()); - - if (mShowLineNumbers) - { - mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN; - updateRects(); - } mParseOnTheFly = TRUE; } @@ -2197,69 +2186,6 @@ void LLTextEditor::drawPreeditMarker() } } - -void LLTextEditor::drawLineNumbers() -{ - LLGLSUIDefault gls_ui; - LLRect scrolled_view_rect = getVisibleDocumentRect(); - LLRect content_rect = getVisibleTextRect(); - LLLocalClipRect clip(content_rect); - S32 first_line = getFirstVisibleLine(); - S32 num_lines = getLineCount(); - if (first_line >= num_lines) - { - return; - } - - S32 cursor_line = mLineInfoList[getLineNumFromDocIndex(mCursorPos)].mLineNum; - - if (mShowLineNumbers) - { - S32 left = 0; - S32 top = getRect().getHeight(); - S32 bottom = 0; - - gl_rect_2d(left, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN, bottom, mReadOnlyBgColor.get() ); // line number area always read-only - gl_rect_2d(UI_TEXTEDITOR_LINE_NUMBER_MARGIN, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN-1, bottom, LLColor4::grey3); // separator - - S32 last_line_num = -1; - - for (S32 cur_line = first_line; cur_line < num_lines; cur_line++) - { - line_info& line = mLineInfoList[cur_line]; - - if ((line.mRect.mTop - scrolled_view_rect.mBottom) < mVisibleTextRect.mBottom) - { - break; - } - - S32 line_bottom = line.mRect.mBottom - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom; - // draw the line numbers - if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop) - { - const LLFontGL *num_font = LLFontGL::getFontMonospace(); - const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum )); - BOOL is_cur_line = cursor_line == line.mLineNum; - const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL; - const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor; - num_font->render( - ltext, // string to draw - 0, // begin offset - UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2, // x - line_bottom, // y - fg_color, - LLFontGL::RIGHT, // horizontal alignment - LLFontGL::BOTTOM, // vertical alignment - style, - LLFontGL::NO_SHADOW, - S32_MAX, // max chars - UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2); // max pixels - last_line_num = line.mLineNum; - } - } - } -} - void LLTextEditor::draw() { { @@ -2271,7 +2197,6 @@ void LLTextEditor::draw() } LLTextBase::draw(); - drawLineNumbers(); drawPreeditMarker(); @@ -2513,53 +2438,6 @@ BOOL LLTextEditor::tryToRevertToPristineState() return isPristine(); // TRUE => success } - -static LLTrace::BlockTimerStatHandle FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); -void LLTextEditor::loadKeywords(const std::string& filename, - const std::vector<std::string>& funcs, - const std::vector<std::string>& tooltips, - const LLColor3& color) -{ - LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); - if(mKeywords.loadFromFile(filename)) - { - S32 count = llmin(funcs.size(), tooltips.size()); - for(S32 i = 0; i < count; i++) - { - std::string name = utf8str_trim(funcs[i]); - mKeywords.addToken(LLKeywordToken::WORD, name, color, tooltips[i] ); - } - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); - - mSegments.clear(); - segment_set_t::iterator insert_it = mSegments.begin(); - for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) - { - insert_it = mSegments.insert(insert_it, *list_it); - } - } -} - -void LLTextEditor::updateSegments() -{ - if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) - { - LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); - // HACK: No non-ascii keywords for now - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); - - clearSegments(); - for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) - { - insertSegment(*list_it); - } - } - - LLTextBase::updateSegments(); -} - void LLTextEditor::updateLinkSegments() { LLWString wtext = getWText(); diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 3a96d8ed24..2408613824 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -1,25 +1,25 @@ -/** +/** * @file lltexteditor.h * @brief LLTextEditor base class * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, 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$ */ @@ -30,7 +30,6 @@ #define LL_LLTEXTEDITOR_H #include "llrect.h" -#include "llkeywords.h" #include "llframetimer.h" #include "llstyle.h" #include "lleditmenuhandler.h" @@ -43,7 +42,6 @@ class LLFontGL; class LLScrollbar; -class LLKeywordToken; class TextCmd; class LLUICtrlFactory; class LLScrollContainer; @@ -60,7 +58,6 @@ public: Optional<bool> embedded_items, ignore_tab, - show_line_numbers, commit_on_focus_lost, show_context_menu, enable_tooltip_paste, @@ -131,7 +128,7 @@ public: virtual BOOL canCopy() const; virtual void paste(); virtual BOOL canPaste() const; - + virtual void updatePrimary(); virtual void copyPrimary(); virtual void pastePrimary(); @@ -149,7 +146,7 @@ public: void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE); BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE); void replaceTextAll(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive); - + // Undo/redo stack void blockUndo(); @@ -186,13 +183,6 @@ public: void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap ); - void loadKeywords(const std::string& filename, - const std::vector<std::string>& funcs, - const std::vector<std::string>& tooltips, - const LLColor3& func_color); - LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); } - LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } - // Hacky methods to make it into a word-wrapping, potentially scrolling, // read-only text box. void setCommitOnFocusLost(BOOL b) { mCommitOnFocusLost = b; } @@ -204,7 +194,7 @@ public: const LLUUID& getSourceID() const { return mSourceID; } const LLTextSegmentPtr getPreviousSegment() const; - void getSelectedSegments(segment_vec_t& segments) const; + void getSelectedSegments(segment_vec_t& segments) const; void setShowContextMenu(bool show) { mShowContextMenu = show; } bool getShowContextMenu() const { return mShowContextMenu; } @@ -216,7 +206,7 @@ protected: void drawPreeditMarker(); void assignEmbedded(const std::string &s); - + void removeCharOrTab(); void indentSelectedLines( S32 spaces ); @@ -235,12 +225,12 @@ protected: S32 nextWordPos(S32 cursorPos) const; void autoIndent(); - + void findEmbeddedItemSegments(S32 start, S32 end); void getSegmentsInRange(segment_vec_t& segments, S32 start, S32 end, bool include_partial) const; virtual llwchar pasteEmbeddedItem(llwchar ext_char) { return ext_char; } - + // Here's the method that takes and applies text commands. S32 execute(TextCmd* cmd); @@ -254,7 +244,7 @@ protected: S32 removeChar(S32 pos); S32 insert(S32 pos, const LLWString &wstr, bool group_with_next_op, LLTextSegmentPtr segment); S32 remove(S32 pos, S32 length, bool group_with_next_op); - + void focusLostHelper(); void updateAllowingLanguageInput(); BOOL hasPreeditString() const; @@ -272,14 +262,14 @@ protected: // // Protected data // - // Probably deserves serious thought to hiding as many of these + // Probably deserves serious thought to hiding as many of these // as possible behind protected accessor methods. // // Use these to determine if a click on an embedded item is a drag or not. S32 mMouseDownX; S32 mMouseDownY; - + LLWString mPreeditWString; LLWString mPreeditOverwrittenWString; std::vector<S32> mPreeditPositions; @@ -288,11 +278,11 @@ protected: protected: LLUIColor mDefaultColor; - BOOL mShowLineNumbers; bool mAutoIndent; + bool mParseOnTheFly; - /*virtual*/ void updateSegments(); void updateLinkSegments(); + class LLViewBorder* mBorder; private: // @@ -302,23 +292,14 @@ private: void cleanStringForPaste(LLWString & clean_string); void pasteTextWithLinebreaks(LLWString & clean_string); - void drawLineNumbers(); - void onKeyStroke(); - // - // Data - // - LLKeywords mKeywords; - // Concrete TextCmd sub-classes used by the LLTextEditor base class class TextCmdInsert; class TextCmdAddChar; class TextCmdOverwriteChar; class TextCmdRemove; - class LLViewBorder* mBorder; - BOOL mBaseDocIsPristine; TextCmd* mPristineCmd; @@ -333,7 +314,6 @@ private: BOOL mAllowEmbeddedItems; bool mShowContextMenu; - bool mParseOnTheFly; bool mEnableTooltipPaste; bool mPassDelete; @@ -353,4 +333,4 @@ extern template class LLTextEditor* LLView::getChild<class LLTextEditor>( const std::string& name, BOOL recurse) const; #endif -#endif // LL_TEXTEDITOR_ +#endif // LL_TEXTEDITOR_H diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index 4390ca83e9..37d88cb9f9 100755 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -30,7 +30,7 @@ #include "llxmlnode.h" #include "llfasttimer.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include <expat.h> #else #include "expat/expat.h" diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index 34b61ee0a0..b8588e99f4 100755 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -105,7 +105,7 @@ BOOL LLVFile::read(U8 *buffer, S32 bytes, BOOL async, F32 priority) // We can't do a read while there are pending async writes waitForLock(VFSLOCK_APPEND); - // *FIX: (???) + // *FIX: (?) if (async) { mHandle = sVFSThread->read(mVFS, mFileID, mFileType, buffer, mPosition, bytes, threadPri()); diff --git a/indra/llvfs/tests/lldiriterator_test.cpp b/indra/llvfs/tests/lldiriterator_test.cpp index 505d86faa7..a65e3dada5 100755 --- a/indra/llvfs/tests/lldiriterator_test.cpp +++ b/indra/llvfs/tests/lldiriterator_test.cpp @@ -51,9 +51,9 @@ namespace tut void test_chop_662(void) { // Check a selection of bad group names from the crash reports - LLDirIterator iter(".","+bad-group-name]+??-??.*"); - LLDirIterator iter1(".","))--@---bad-group-name2((??-??.*\\.txt"); - LLDirIterator iter2(".","__^v--x)Cuide d sua vida(x--v^__??-??.*"); + LLDirIterator iter(".","+bad-group-name]+?\?-??.*"); + LLDirIterator iter1(".","))--@---bad-group-name2((?\?-??.*\\.txt"); + LLDirIterator iter2(".","__^v--x)Cuide d sua vida(x--v^__?\?-??.*"); } template<> template<> diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 466c3baccf..5720660034 100755 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -71,7 +71,7 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) } S32 result = 0; -#if LL_MESA_HEADLESS // !!! *FIX: (???) +#if LL_MESA_HEADLESS // !!! *FIX: (?) LL_WARNS() << "OSMessageBox: " << text << LL_ENDL; return OSBTN_OK; #elif LL_WINDOWS @@ -323,7 +323,7 @@ bool LLSplashScreen::isVisible() // static LLSplashScreen *LLSplashScreen::create() { -#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (???) +#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (?) return 0; #elif LL_WINDOWS return new LLSplashScreenWin32; diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index b771e125f9..18d5152015 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -39,6 +39,7 @@ #include "indra_constants.h" #include <OpenGL/OpenGL.h> +#include <Carbon/Carbon.h> #include <CoreServices/CoreServices.h> extern BOOL gDebugWindowProc; @@ -1743,16 +1744,34 @@ LLSD LLWindowMacOSX::getNativeKeyData() return result; } - BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b) { - // Is this even used anywhere? Do we really need an OS color picker? BOOL retval = FALSE; - //S32 error = 0; + OSErr error = noErr; + NColorPickerInfo info; + + memset(&info, 0, sizeof(info)); + info.theColor.color.rgb.red = (UInt16)(*r * 65535.f); + info.theColor.color.rgb.green = (UInt16)(*g * 65535.f); + info.theColor.color.rgb.blue = (UInt16)(*b * 65535.f); + info.placeWhere = kCenterOnMainScreen; + + error = NPickColor(&info); + + if (error == noErr) + { + retval = info.newColorChosen; + if (info.newColorChosen) + { + *r = ((float) info.theColor.color.rgb.red) / 65535.0; + *g = ((float) info.theColor.color.rgb.green) / 65535.0; + *b = ((float) info.theColor.color.rgb.blue) / 65535.0; + } + } + return (retval); } - void *LLWindowMacOSX::getPlatformWindow() { // NOTE: this will be NULL in fullscreen mode. Plan accordingly. diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index bb77a24590..c20e639fc7 100755 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -223,7 +223,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, mOriginalAspectRatio = 1024.0 / 768.0; if (title.empty()) - mWindowTitle = "SDL Window"; // *FIX: (???) + mWindowTitle = "SDL Window"; // *FIX: (?) else mWindowTitle = title; @@ -956,7 +956,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position) { if(mWindow) { - // *FIX: (???) + // *FIX: (?) //MacMoveWindow(mWindow, position.mX, position.mY, false); } diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h index 7ffc8a4b17..0b8da5dc5d 100755 --- a/indra/llxml/llxmlnode.h +++ b/indra/llxml/llxmlnode.h @@ -30,7 +30,7 @@ #ifndef XML_STATIC #define XML_STATIC #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include <expat.h> #else #include "expat/expat.h" diff --git a/indra/llxml/llxmlparser.h b/indra/llxml/llxmlparser.h index e0f8b69452..a5b210404f 100755 --- a/indra/llxml/llxmlparser.h +++ b/indra/llxml/llxmlparser.h @@ -30,7 +30,7 @@ #ifndef XML_STATIC #define XML_STATIC #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include <expat.h> #else #include "expat/expat.h" diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 812850f6ff..142665525f 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -199,6 +199,7 @@ set(viewer_SOURCE_FILES llfilteredwearablelist.cpp llfirstuse.cpp llflexibleobject.cpp + llflickrconnect.cpp llfloaterabout.cpp llfloaterbvhpreview.cpp llfloaterauction.cpp @@ -207,6 +208,7 @@ set(viewer_SOURCE_FILES llfloateravatarpicker.cpp llfloateravatartextures.cpp llfloaterbeacons.cpp + llfloaterbigpreview.cpp llfloaterbuildoptions.cpp llfloaterbulkpermission.cpp llfloaterbump.cpp @@ -228,6 +230,8 @@ set(viewer_SOURCE_FILES llfloatereditwater.cpp llfloaterenvironmentsettings.cpp llfloaterevent.cpp + llfloaterfacebook.cpp + llfloaterflickr.cpp llfloaterfonttest.cpp llfloatergesture.cpp llfloatergodtools.cpp @@ -272,13 +276,13 @@ set(viewer_SOURCE_FILES llfloaterregionrestarting.cpp llfloatersceneloadstats.cpp llfloaterscriptdebug.cpp + llfloaterscriptedprefs.cpp llfloaterscriptlimits.cpp llfloatersearch.cpp llfloatersellland.cpp llfloatersettingsdebug.cpp llfloatersidepanelcontainer.cpp llfloatersnapshot.cpp - llfloatersocial.cpp llfloatersounddevices.cpp llfloaterspellchecksettings.cpp llfloatertelehub.cpp @@ -290,6 +294,7 @@ set(viewer_SOURCE_FILES llfloatertos.cpp llfloatertoybox.cpp llfloatertranslationsettings.cpp + llfloatertwitter.cpp llfloateruipreview.cpp llfloaterurlentry.cpp llfloatervoiceeffect.cpp @@ -327,6 +332,7 @@ set(viewer_SOURCE_FILES llhudrender.cpp llhudtext.cpp llhudview.cpp + llimagefiltersmanager.cpp llimhandler.cpp llimview.cpp llinspect.cpp @@ -496,6 +502,7 @@ set(viewer_SOURCE_FILES llscenemonitor.cpp llsceneview.cpp llscreenchannel.cpp + llscripteditor.cpp llscriptfloater.cpp llscrollingpanelparam.cpp llscrollingpanelparambase.cpp @@ -525,6 +532,7 @@ set(viewer_SOURCE_FILES llstylemap.cpp llsurface.cpp llsurfacepatch.cpp + llsyntaxid.cpp llsyswellitem.cpp llsyswellwindow.cpp llteleporthistory.cpp @@ -570,6 +578,7 @@ set(viewer_SOURCE_FILES lltransientdockablefloater.cpp lltransientfloatermgr.cpp lltranslate.cpp + lltwitterconnect.cpp lluilistener.cpp lluploaddialog.cpp lluploadfloaterobservers.cpp @@ -791,6 +800,7 @@ set(viewer_HEADER_FILES llfilteredwearablelist.h llfirstuse.h llflexibleobject.h + llflickrconnect.h llfloaterabout.h llfloaterbvhpreview.h llfloaterauction.h @@ -799,6 +809,7 @@ set(viewer_HEADER_FILES llfloateravatarpicker.h llfloateravatartextures.h llfloaterbeacons.h + llfloaterbigpreview.h llfloaterbuildoptions.h llfloaterbulkpermission.h llfloaterbump.h @@ -820,6 +831,8 @@ set(viewer_HEADER_FILES llfloatereditwater.h llfloaterenvironmentsettings.h llfloaterevent.h + llfloaterfacebook.h + llfloaterflickr.h llfloaterfonttest.h llfloatergesture.h llfloatergodtools.h @@ -867,13 +880,13 @@ set(viewer_HEADER_FILES llfloaterregionrestarting.h llfloatersceneloadstats.h llfloaterscriptdebug.h + llfloaterscriptedprefs.h llfloaterscriptlimits.h llfloatersearch.h llfloatersellland.h llfloatersettingsdebug.h llfloatersidepanelcontainer.h llfloatersnapshot.h - llfloatersocial.h llfloatersounddevices.h llfloaterspellchecksettings.h llfloatertelehub.h @@ -885,6 +898,7 @@ set(viewer_HEADER_FILES llfloatertos.h llfloatertoybox.h llfloatertranslationsettings.h + llfloatertwitter.h llfloateruipreview.h llfloaterurlentry.h llfloatervoiceeffect.h @@ -921,6 +935,7 @@ set(viewer_HEADER_FILES llhudrender.h llhudtext.h llhudview.h + llimagefiltersmanager.h llimview.h llinspect.h llinspectavatar.h @@ -1078,6 +1093,7 @@ set(viewer_HEADER_FILES llscenemonitor.h llsceneview.h llscreenchannel.h + llscripteditor.h llscriptfloater.h llscrollingpanelparam.h llscrollingpanelparambase.h @@ -1106,6 +1122,7 @@ set(viewer_HEADER_FILES llstylemap.h llsurface.h llsurfacepatch.h + llsyntaxid.h llsyswellitem.h llsyswellwindow.h lltable.h @@ -1152,6 +1169,7 @@ set(viewer_HEADER_FILES lltransientdockablefloater.h lltransientfloatermgr.h lltranslate.h + lltwitterconnect.h lluiconstants.h lluilistener.h lluploaddialog.h @@ -1462,9 +1480,9 @@ if (WINDOWS) SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES}) - if (NOT STANDALONE) + if (NOT USESYSTEMLIBS) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) - endif (NOT STANDALONE) + endif (NOT USESYSTEMLIBS) find_library(DINPUT_LIBRARY dinput8 ${DIRECTX_LIBRARY_DIR}) find_library(DXGUID_LIBRARY dxguid ${DIRECTX_LIBRARY_DIR}) @@ -1539,7 +1557,7 @@ set(viewer_APPSETTINGS_FILES app_settings/high_graphics.xml app_settings/ignorable_dialogs.xml app_settings/keys.xml - app_settings/keywords.ini + app_settings/keywords_lsl_default.xml app_settings/logcontrol.xml app_settings/low_graphics.xml app_settings/mid_graphics.xml @@ -1575,9 +1593,9 @@ source_group("Character File" FILES ${viewer_CHARACTER_FILES}) set_source_files_properties(${viewer_CHARACTER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) -endif (NOT STANDALONE) +endif (NOT USESYSTEMLIBS) if (WINDOWS) file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) @@ -1859,7 +1877,7 @@ elseif (DARWIN) LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" ) else (WINDOWS) - # Linux + # Linux set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Wl,--Map=${VIEWER_BINARY_NAME}.MAP" @@ -2044,7 +2062,7 @@ if (DARWIN) ) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger) - + if (ENABLE_SIGNING) set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}") else (ENABLE_SIGNING) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index f06fb9e915..f7e5aa84c2 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.7.10 +3.7.12 diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 60c942094a..7b329e2092 100755 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -216,15 +216,35 @@ is_running_function="Floater.IsOpen" is_running_parameters="snapshot" /> - <command name="social" + <command name="facebook" available_in_toybox="true" - icon="Command_Social_Icon" - label_ref="Command_Social_Label" - tooltip_ref="Command_Social_Tooltip" + icon="Command_Facebook_Icon" + label_ref="Command_Facebook_Label" + tooltip_ref="Command_Facebook_Tooltip" execute_function="Floater.ToggleOrBringToFront" - execute_parameters="social" + execute_parameters="facebook" is_running_function="Floater.IsOpen" - is_running_parameters="social" + is_running_parameters="facebook" + /> + <command name="flickr" + available_in_toybox="true" + icon="Command_Flickr_Icon" + label_ref="Command_Flickr_Label" + tooltip_ref="Command_Flickr_Tooltip" + execute_function="Floater.ToggleOrBringToFront" + execute_parameters="flickr" + is_running_function="Floater.IsOpen" + is_running_parameters="flickr" + /> + <command name="twitter" + available_in_toybox="true" + icon="Command_Twitter_Icon" + label_ref="Command_Twitter_Label" + tooltip_ref="Command_Twitter_Tooltip" + execute_function="Floater.ToggleOrBringToFront" + execute_parameters="twitter" + is_running_function="Floater.IsOpen" + is_running_parameters="twitter" /> <command name="speak" available_in_toybox="true" diff --git a/indra/newview/app_settings/filters/Autocontrast.xml b/indra/newview/app_settings/filters/Autocontrast.xml new file mode 100755 index 0000000000..ec3d7561bd --- /dev/null +++ b/indra/newview/app_settings/filters/Autocontrast.xml @@ -0,0 +1,11 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.01</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/BlackAndWhite.xml b/indra/newview/app_settings/filters/BlackAndWhite.xml new file mode 100644 index 0000000000..101ed8233a --- /dev/null +++ b/indra/newview/app_settings/filters/BlackAndWhite.xml @@ -0,0 +1,21 @@ +<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> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>grayscale</string> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/Colors1970.xml b/indra/newview/app_settings/filters/Colors1970.xml new file mode 100644 index 0000000000..730d907fa7 --- /dev/null +++ b/indra/newview/app_settings/filters/Colors1970.xml @@ -0,0 +1,47 @@ +<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.3</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>10.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/app_settings/filters/Intense.xml b/indra/newview/app_settings/filters/Intense.xml new file mode 100644 index 0000000000..b77f07a037 --- /dev/null +++ b/indra/newview/app_settings/filters/Intense.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/LensFlare.xml b/indra/newview/app_settings/filters/LensFlare.xml new file mode 100644 index 0000000000..e9aef6eea4 --- /dev/null +++ b/indra/newview/app_settings/filters/LensFlare.xml @@ -0,0 +1,131 @@ +<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>stencil</string> + <string>gradient</string> + <string>add</string> + <real>0.5</real> + <real>0.0</real> + <real>-1.0</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.1</real> + <real>0.1</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.5</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.6</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>-1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>5.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.6</real> + <real>0.6</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.5</real> + <real>-0.5</real> + <real>0.10</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.6</real> + <real>-0.6</real> + <real>0.05</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + <real>0.4</real> + <real>-0.4</real> + <real>0.025</real> + <real>20.0</real> + </array> + <array> + <string>colorize</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>0.7</real> + <real>0.0</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/Miniature.xml b/indra/newview/app_settings/filters/Miniature.xml new file mode 100755 index 0000000000..9aa8a87c6f --- /dev/null +++ b/indra/newview/app_settings/filters/Miniature.xml @@ -0,0 +1,118 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.02</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>contrast</string> + <real>1.02</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>saturate</string> + <real>1.2</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>0.0</real> + <real>0.25</real> + <real>0.0</real> + <real>0.0</real> + <real>0.25</real> + <real>2.0</real> + </array> + <array> + <string>sharpen</string> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>-1.0</real> + <real>0.0</real> + <real>-0.25</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>stencil</string> + <string>gradient</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.25</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/newview/app_settings/filters/Newspaper.xml b/indra/newview/app_settings/filters/Newspaper.xml new file mode 100755 index 0000000000..6cfe319281 --- /dev/null +++ b/indra/newview/app_settings/filters/Newspaper.xml @@ -0,0 +1,20 @@ +<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>grayscale</string> + </array> + <array> + <string>screen</string> + <string>2Dsine</string> + <real>0.02</real> + <real>0.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/Sepia.xml b/indra/newview/app_settings/filters/Sepia.xml new file mode 100644 index 0000000000..3d577b2998 --- /dev/null +++ b/indra/newview/app_settings/filters/Sepia.xml @@ -0,0 +1,32 @@ +<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> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>fade</string> + <real>0.5</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>4.0</real> + </array> + <array> + <string>sepia</string> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/Spotlight.xml b/indra/newview/app_settings/filters/Spotlight.xml new file mode 100644 index 0000000000..0e2e0ad68c --- /dev/null +++ b/indra/newview/app_settings/filters/Spotlight.xml @@ -0,0 +1,47 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>0.0</real> + <real>0.4</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>2.0</real> + </array> + <array> + <string>contrast</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>add</string> + <real>-0.8</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.0</real> + <real>2.0</real> + </array> + <array> + <string>contrast</string> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/filters/Toycamera.xml b/indra/newview/app_settings/filters/Toycamera.xml new file mode 100755 index 0000000000..4e76f6b2fb --- /dev/null +++ b/indra/newview/app_settings/filters/Toycamera.xml @@ -0,0 +1,46 @@ +<llsd> + <array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>fade</string> + <real>0.0</real> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>1.2</real> + <real>3.0</real> + </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> + <string>contrast</string> + <real>1.1</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>vignette</string> + <string>blend</string> + <real>1.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + <real>0.5</real> + <real>2.0</real> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd>
\ No newline at end of file diff --git a/indra/newview/app_settings/filters/Video.xml b/indra/newview/app_settings/filters/Video.xml new file mode 100755 index 0000000000..fe17f3950a --- /dev/null +++ b/indra/newview/app_settings/filters/Video.xml @@ -0,0 +1,44 @@ +<llsd> + <array> + <array> + <string>linearize</string> + <real>0.0</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>darken</string> + <real>0.15</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>stencil</string> + <string>uniform</string> + <string>add</string> + <real>0.0</real> + <real>0.5</real> + </array> + <array> + <string>screen</string> + <string>line</string> + <real>0.02</real> + <real>0.0</real> + </array> + <array> + <string>gamma</string> + <real>0.25</real> + <real>1.0</real> + <real>1.0</real> + <real>1.0</real> + </array> + <array> + <string>blur</string> + </array> + <array> + <string>blur</string> + </array> + </array> +</llsd> diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml new file mode 100755 index 0000000000..37dd2db93f --- /dev/null +++ b/indra/newview/app_settings/keywords_lsl_default.xml @@ -0,0 +1,18289 @@ +<?xml version="1.0" encoding="UTF-8"?> +<llsd> + <map> + <key>controls</key> + <map> + <key>do</key> + <map> + <key>tooltip</key> + <string>do / while loop\ndo {\n...\n} while (<condition>);</string> + </map> + <key>else</key> + <map> + <key>tooltip</key> + <string>if / else block\nif (<condition>) {\n...\n[} else [if (<condition>) {\n...]]\n}</string> + </map> + <key>for</key> + <map> + <key>tooltip</key> + <string>for loop\nfor (<initializer>; <condition>; <post-iteration-statement>)\n{ ...\n}</string> + </map> + <key>if</key> + <map> + <key>tooltip</key> + <string>if / else block\nif (<condition>) {\n...\n[} else [if (<condition>) {\n...]]\n}</string> + </map> + <key>jump</key> + <map> + <key>tooltip</key> + <string>jump statement\njump <label></string> + </map> + <key>return</key> + <map> + <key>tooltip</key> + <string>Leave current event or function.\nreturn [<variable>];\nOptionally pass back a variable's value, from a function.</string> + </map> + <key>state</key> + <map> + <key>tooltip</key> + <string>state <target>\nIf the target state is not the same as the current one, change to the target state.</string> + </map> + <key>while</key> + <map> + <key>tooltip</key> + <string>while loop\nwhile (<condition>) {\n,,,\n}</string> + </map> + </map> + <key>types</key> + <map> + <key>float</key> + <map> + <key>tooltip</key> + <string>32 bit floating point value.\nThe range is 1.175494351E-38 to 3.402823466E+38.</string> + </map> + <key>integer</key> + <map> + <key>tooltip</key> + <string>32 bit integer value.\n−2,147,483,648 and +2,147,483,647 (that is 0x80000000 to 0x7FFFFFFF in hex).</string> + </map> + <key>key</key> + <map> + <key>tooltip</key> + <string>A 128 bit unique identifier (UUID).\nThe key is represented as hexidecimal characters (A-F and 0-9), grouped into sections (8,4,4,4,12 characters) and separated by hyphens (for a total of 36 characters). e.g. "A822FF2B-FF02-461D-B45D-DCD10A2DE0C2".</string> + </map> + <key>list</key> + <map> + <key>tooltip</key> + <string>A collection of other data types.\nLists are signified by square brackets surrounding their elements; the elements inside are separated by commas. e.g. [0, 1, 2, 3, 4] or ["Yes", "No", "Perhaps"].</string> + </map> + <key>quaternion</key> + <map> + <key>tooltip</key> + <string>The quaternion type is a left over from way back when LSL was created. It was later renamed to <rotation> to make it more user friendly, but it appears someone forgot to remove it ;-)</string> + </map> + <key>rotation</key> + <map> + <key>tooltip</key> + <string>The rotation type is one of several ways to represent an orientation in 3D.\nIt is a mathematical object called a quaternion. You can think of a quaternion as four numbers (x, y, z, w), three of which represent the direction an object is facing and a fourth that represents the object's banking left or right around that direction.</string> + </map> + <key>string</key> + <map> + <key>tooltip</key> + <string>Text data.\nThe editor accepts UTF-8 encoded text.</string> + </map> + <key>vector</key> + <map> + <key>tooltip</key> + <string>A vector is a data type that contains a set of three float values.\nVectors are used to represent colors (RGB), positions, and directions/velocities.</string> + </map> + </map> + <key>constants</key> + <map> + <key>ACTIVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>Objects in world that are running a script or currently physically moving.</string> + </map> + <key>AGENT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>Objects in world that are agents.</string> + </map> + <key>AGENT_ALWAYS_RUN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1000</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_ATTACHMENTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>The agent has attachments.</string> + </map> + <key>AGENT_AUTOPILOT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2000</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_AWAY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_BUSY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x800</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_BY_LEGACY_NAME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_BY_USERNAME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_CROUCHING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x400</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_FLYING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>The agent is flying.</string> + </map> + <key>AGENT_IN_AIR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_LIST_PARCEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Agents on the same parcel where the script is running.</string> + </map> + <key>AGENT_LIST_PARCEL_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Agents on any parcel in the region where the parcel owner is the same as the owner of the parcel under the scripted object.</string> + </map> + <key>AGENT_LIST_REGION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>All agents in the region.</string> + </map> + <key>AGENT_MOUSELOOK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_ON_OBJECT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_SCRIPTED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>The agent has scripted attachments.</string> + </map> + <key>AGENT_SITTING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_TYPING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200</string> + <key>tooltip</key> + <string/> + </map> + <key>AGENT_WALKING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80</string> + <key>tooltip</key> + <string/> + </map> + <key>ALL_SIDES</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>ANIM_ON</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>Texture animation is on.</string> + </map> + <key>ATTACH_AVATAR_CENTER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>40</integer> + <key>tooltip</key> + <string>Attach to the avatar's geometric centre.</string> + </map> + <key>ATTACH_BACK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string>Attach to the avatar's back.</string> + </map> + <key>ATTACH_BELLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>28</integer> + <key>tooltip</key> + <string>Attach to the avatar's belly.</string> + </map> + <key>ATTACH_CHEST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Attach to the avatar's chest.</string> + </map> + <key>ATTACH_CHIN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string>Attach to the avatar's chin.</string> + </map> + <key>ATTACH_HEAD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Attach to the avatar's head.</string> + </map> + <key>ATTACH_HUD_BOTTOM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>37</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_HUD_BOTTOM_LEFT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>36</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_HUD_BOTTOM_RIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>38</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_HUD_CENTER_1</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>35</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_HUD_CENTER_2</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>31</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_HUD_TOP_CENTER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>33</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_HUD_TOP_LEFT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>34</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_HUD_TOP_RIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>32</integer> + <key>tooltip</key> + <string/> + </map> + <key>ATTACH_LEAR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string>Attach to the avatar's left ear.</string> + </map> + <key>ATTACH_LEFT_PEC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>29</integer> + <key>tooltip</key> + <string>Attach to the avatar's left pectoral.</string> + </map> + <key>ATTACH_LEYE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>15</integer> + <key>tooltip</key> + <string>Attach to the avatar's left eye.</string> + </map> + <key>ATTACH_LFOOT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string>Attach to the avatar's left foot.</string> + </map> + <key>ATTACH_LHAND</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>Attach to the avatar's left hand.</string> + </map> + <key>ATTACH_LHIP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>25</integer> + <key>tooltip</key> + <string>Attach to the avatar's left hip.</string> + </map> + <key>ATTACH_LLARM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>21</integer> + <key>tooltip</key> + <string>Attach to the avatar's left lower arm.</string> + </map> + <key>ATTACH_LLLEG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>27</integer> + <key>tooltip</key> + <string>Attach to the avatar's lower left leg.</string> + </map> + <key>ATTACH_LPEC</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>30</integer> + <key>tooltip</key> + <string>Attach to the avatar's right pectoral. (Deprecated, use ATTACH_RIGHT_PEC)</string> + </map> + <key>ATTACH_LSHOULDER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>Attach to the avatar's left shoulder.</string> + </map> + <key>ATTACH_LUARM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>20</integer> + <key>tooltip</key> + <string>Attach to the avatar's left upper arm.</string> + </map> + <key>ATTACH_LULEG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>27</integer> + <key>tooltip</key> + <string>Attach to the avatar's lower upper leg.</string> + </map> + <key>ATTACH_MOUTH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string>Attach to the avatar's mouth.</string> + </map> + <key>ATTACH_NECK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>39</integer> + <key>tooltip</key> + <string>Attach to the avatar's neck.</string> + </map> + <key>ATTACH_NOSE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>17</integer> + <key>tooltip</key> + <string>Attach to the avatar's nose.</string> + </map> + <key>ATTACH_PELVIS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string>Attach to the avatar's pelvis.</string> + </map> + <key>ATTACH_REAR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>14</integer> + <key>tooltip</key> + <string>Attach to the avatar's right ear.</string> + </map> + <key>ATTACH_REYE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>16</integer> + <key>tooltip</key> + <string>Attach to the avatar's right eye.</string> + </map> + <key>ATTACH_RFOOT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>Attach to the avatar's right foot.</string> + </map> + <key>ATTACH_RHAND</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>Attach to the avatar's right hand.</string> + </map> + <key>ATTACH_RHIP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>22</integer> + <key>tooltip</key> + <string>Attach to the avatar's right hip.</string> + </map> + <key>ATTACH_RIGHT_PEC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>30</integer> + <key>tooltip</key> + <string>Attach to the avatar's right pectoral.</string> + </map> + <key>ATTACH_RLARM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>19</integer> + <key>tooltip</key> + <string>Attach to the avatar's right lower arm.</string> + </map> + <key>ATTACH_RLLEG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>24</integer> + <key>tooltip</key> + <string>Attach to the avatar's right lower leg.</string> + </map> + <key>ATTACH_RPEC</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>29</integer> + <key>tooltip</key> + <string>Attach to the avatar's left pectoral. (deprecated, use ATTACH_LEFT_PEC)</string> + </map> + <key>ATTACH_RSHOULDER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Attach to the avatar's right shoulder.</string> + </map> + <key>ATTACH_RUARM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>18</integer> + <key>tooltip</key> + <string>Attach to the avatar's right upper arm.</string> + </map> + <key>ATTACH_RULEG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>23</integer> + <key>tooltip</key> + <string>Attach to the avatar's right upper leg.</string> + </map> + <key>AVOID_CHARACTERS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>AVOID_DYNAMIC_OBSTACLES</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>AVOID_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_ACTIVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_BEHINDNESS_ANGLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_BEHINDNESS_LAG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_DISTANCE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_FOCUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>17</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_FOCUS_LAG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_FOCUS_LOCKED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>22</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_FOCUS_OFFSET</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_FOCUS_THRESHOLD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_PITCH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_POSITION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_POSITION_LAG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_POSITION_LOCKED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>22</integer> + <key>tooltip</key> + <string/> + </map> + <key>CAMERA_POSITION_THRESHOLD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string/> + </map> + <key>CHANGED_ALLOWED_DROP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string>The object inventory has changed because an item was added through the llAllowInventoryDrop interface.</string> + </map> + <key>CHANGED_COLOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>The object color has changed.</string> + </map> + <key>CHANGED_INVENTORY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>The object inventory has changed.</string> + </map> + <key>CHANGED_LINK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string>The object has linked or its links were broken.</string> + </map> + <key>CHANGED_MEDIA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2048</integer> + <key>tooltip</key> + <string/> + </map> + <key>CHANGED_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80</string> + <key>tooltip</key> + <string/> + </map> + <key>CHANGED_REGION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string/> + </map> + <key>CHANGED_REGION_START</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x400</string> + <key>tooltip</key> + <string/> + </map> + <key>CHANGED_SCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>The object scale (size) has changed.</string> + </map> + <key>CHANGED_SHAPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>The object base shape has changed, e.g., a box to a cylinder.</string> + </map> + <key>CHANGED_TELEPORT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200</string> + <key>tooltip</key> + <string/> + </map> + <key>CHANGED_TEXTURE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string>The texture offset, scale rotation, or simply the object texture has changed.</string> + </map> + <key>CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>14</integer> + <key>tooltip</key> + <string>If set to false, character will not attempt to catch up on lost time when pathfinding performance is low, potentially providing more reliable movement (albeit while potentially appearing to be more stuttery). Default is true to match pre-existing behavior.</string> + </map> + <key>CHARACTER_AVOIDANCE_MODE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>Allows you to specify that a character should not try to avoid other characters, should not try to avoid dynamic obstacles (relatively fast moving objects and avatars), or both.</string> + </map> + <key>CHARACTER_CMD_JUMP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x01</string> + <key>tooltip</key> + <string>Makes the character jump. Requires an additional parameter, the height to jump, between 0.1m and 2.0m. This must be provided as the first element of the llExecCharacterCmd option list.</string> + </map> + <key>CHARACTER_CMD_SMOOTH_STOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>CHARACTER_CMD_STOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x00</string> + <key>tooltip</key> + <string>Stops any current pathfinding operation.</string> + </map> + <key>CHARACTER_DESIRED_SPEED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Speed of pursuit in meters per second.</string> + </map> + <key>CHARACTER_DESIRED_TURN_SPEED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string>The character's maximum speed while turning about the Z axis. - Note that this is only loosely enforced.</string> + </map> + <key>CHARACTER_LENGTH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>Set collision capsule length - cannot be less than two times the radius.</string> + </map> + <key>CHARACTER_MAX_ACCEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>The character's maximum acceleration rate.</string> + </map> + <key>CHARACTER_MAX_DECEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string>The character's maximum deceleration rate.</string> + </map> + <key>CHARACTER_MAX_SPEED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string>The character's maximum speed.</string> + </map> + <key>CHARACTER_MAX_TURN_RADIUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string>The character's turn radius when travelling at CHARACTER_MAX_TURN_SPEED.</string> + </map> + <key>CHARACTER_ORIENTATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Valid options are: VERTICAL, HORIZONTAL.</string> + </map> + <key>CHARACTER_RADIUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Set collision capsule radius.</string> + </map> + <key>CHARACTER_STAY_WITHIN_PARCEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>15</integer> + <key>tooltip</key> + <string>Determines whether a character can leave its starting parcel.\nTakes a boolean parameter. If TRUE, the character cannot voluntarilly leave the parcel, but can return to it.</string> + </map> + <key>CHARACTER_TYPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>Specifies which walk-ability coefficient will be used by this character.</string> + </map> + <key>CHARACTER_TYPE_A</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>CHARACTER_TYPE_B</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>CHARACTER_TYPE_C</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>CHARACTER_TYPE_D</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>CHARACTER_TYPE_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>CLICK_ACTION_BUY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>When the prim is clicked, the buy dialog is opened.</string> + </map> + <key>CLICK_ACTION_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Performs the default action: when the prim is clicked, touch events are triggered.</string> + </map> + <key>CLICK_ACTION_OPEN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>When the prim is clicked, the object inventory dialog is opened.</string> + </map> + <key>CLICK_ACTION_OPEN_MEDIA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>When the prim is touched, the web media dialog is opened.</string> + </map> + <key>CLICK_ACTION_PAY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>When the prim is clicked, the pay dialog is opened.</string> + </map> + <key>CLICK_ACTION_PLAY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>When the prim is clicked, html-on-a-prim is enabled?</string> + </map> + <key>CLICK_ACTION_SIT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>When the prim is clicked, the avatar sits upon it.</string> + </map> + <key>CLICK_ACTION_TOUCH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>When the prim is clicked, touch events are triggered.</string> + </map> + <key>CONTENT_TYPE_ATOM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>"application/atom+xml"</string> + </map> + <key>CONTENT_TYPE_FORM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string>"application/x-www-form-urlencoded"</string> + </map> + <key>CONTENT_TYPE_HTML</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>"text/html", only valid for embedded browsers on content owned by the person viewing. Falls back to "text/plain" otherwise.</string> + </map> + <key>CONTENT_TYPE_JSON</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>"application/json"</string> + </map> + <key>CONTENT_TYPE_LLSD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>"application/llsd+xml"</string> + </map> + <key>CONTENT_TYPE_RSS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>"application/rss+xml"</string> + </map> + <key>CONTENT_TYPE_TEXT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>"text/plain"</string> + </map> + <key>CONTENT_TYPE_XHTML</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>"application/xhtml+xml"</string> + </map> + <key>CONTENT_TYPE_XML</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>"application/xml"</string> + </map> + <key>CONTROL_BACK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>Test for the avatar move back control.</string> + </map> + <key>CONTROL_DOWN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string>Test for the avatar move down control.</string> + </map> + <key>CONTROL_FWD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>Test for the avatar move forward control.</string> + </map> + <key>CONTROL_LBUTTON</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10000000</string> + <key>tooltip</key> + <string>Test for the avatar left button control.</string> + </map> + <key>CONTROL_LEFT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>Test for the avatar move left control.</string> + </map> + <key>CONTROL_ML_LBUTTON</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40000000</string> + <key>tooltip</key> + <string>Test for the avatar left button control while in mouse look.</string> + </map> + <key>CONTROL_RIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>Test for the avatar move right control.</string> + </map> + <key>CONTROL_ROT_LEFT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string>Test for the avatar rotate left control.</string> + </map> + <key>CONTROL_ROT_RIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200</string> + <key>tooltip</key> + <string>Test for the avatar rotate right control.</string> + </map> + <key>CONTROL_UP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string>Test for the avatar move up control.</string> + </map> + <key>DATA_BORN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>The date the agent was born, returned in ISO 8601 format of YYYY-MM-DD.</string> + </map> + <key>DATA_NAME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>The name of the agent.</string> + </map> + <key>DATA_ONLINE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>TRUE for online, FALSE for offline.</string> + </map> + <key>DATA_PAYINFO</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string/> + </map> + <key>DATA_RATING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Returns the agent ratings as a comma separated string of six integers. They are: + 1) Positive rated behaviour + 2) Negative rated behaviour + 3) Positive rated appearance + 4) Negative rated appearance + 5) Positive rated building + 6) Negative rated building</string> + </map> + <key>DATA_SIM_POS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>DATA_SIM_RATING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>DATA_SIM_STATUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>DEBUG_CHANNEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2147483647</integer> + <key>tooltip</key> + <string>DEBUG_CHANNEL is an integer constant that, when passed to llSay, llWhisper, or llShout as a channel parameter, will print text to the Script Warning/Error Window.</string> + </map> + <key>DEG_TO_RAD</key> + <map> + <key>type</key> + <string>float</string> + <key>value</key> + <real>0.01745329</real> + <key>tooltip</key> + <string>0.01745329 - Number of radians per degree. + You can use this to convert degrees to radians by multiplying the degrees by this number.</string> + </map> + <key>DENSITY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Used with llSetPhysicsMaterial to enable the density value. Must be between 1.0 and 22587.0 (in Kg/m^3 -- see if you can figure out what 22587 represents)</string> + </map> + <key>EOF</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>0x0A0x0A0x0A</string> + <key>tooltip</key> + <string>Indicates the last line of a notecard was read.</string> + </map> + <key>ERR_GENERIC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>ERR_MALFORMED_PARAMS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-3</integer> + <key>tooltip</key> + <string/> + </map> + <key>ERR_PARCEL_PERMISSIONS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-2</integer> + <key>tooltip</key> + <string/> + </map> + <key>ERR_RUNTIME_PERMISSIONS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-4</integer> + <key>tooltip</key> + <string/> + </map> + <key>ERR_THROTTLED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-5</integer> + <key>tooltip</key> + <string/> + </map> + <key>ESTATE_ACCESS_ALLOWED_AGENT_ADD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Add the agent to this estate's Allowed Residents list.</string> + </map> + <key>ESTATE_ACCESS_ALLOWED_AGENT_REMOVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>Remove the agent from this estate's Allowed Residents list.</string> + </map> + <key>ESTATE_ACCESS_ALLOWED_GROUP_ADD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>16</integer> + <key>tooltip</key> + <string>Add the group to this estate's Allowed groups list.</string> + </map> + <key>ESTATE_ACCESS_ALLOWED_GROUP_REMOVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>32</integer> + <key>tooltip</key> + <string>Remove the group from this estate's Allowed groups list.</string> + </map> + <key>ESTATE_ACCESS_BANNED_AGENT_ADD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>64</integer> + <key>tooltip</key> + <string>Add the agent to this estate's Banned residents list.</string> + </map> + <key>ESTATE_ACCESS_BANNED_AGENT_REMOVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>128</integer> + <key>tooltip</key> + <string>Remove the agent from this estate's Banned residents list.</string> + </map> + <key>FALSE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>An integer constant for boolean comparisons. Has the value '0'.</string> + </map> + <key>FORCE_DIRECT_PATH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Makes character navigate in a straight line toward position. May be set to TRUE or FALSE.</string> + </map> + <key>FRICTION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Used with llSetPhysicsMaterial to enable the friction value. Must be between 0.0 and 255.0</string> + </map> + <key>GCNP_RADIUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>GCNP_STATIC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>GRAVITY_MULTIPLIER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>Used with llSetPhysicsMaterial to enable the gravity multiplier value. Must be between -1.0 and +28.0</string> + </map> + <key>HORIZONTAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>HTTP_BODY_MAXLENGTH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>HTTP_BODY_TRUNCATED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>HTTP_CUSTOM_HEADER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>Add an extra custom HTTP header to the request. The first string is the name of the parameter to change, e.g. "Pragma", and the second string is the value, e.g. "no-cache". Up to 8 custom headers may be configured per request. Note that certain headers, such as the default headers, are blocked for security reasons.</string> + </map> + <key>HTTP_METHOD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>HTTP_MIMETYPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>HTTP_PRAGMA_NO_CACHE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>Allows enabling/disbling of the "Pragma: no-cache" header.\nUsage: [HTTP_PRAGMA_NO_CACHE, integer SendHeader]. When SendHeader is TRUE, the "Pragma: no-cache" header is sent by the script. This matches the default behavior. When SendHeader is FALSE, no "Pragma" header is sent by the script.</string> + </map> + <key>HTTP_VERBOSE_THROTTLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>HTTP_VERIFY_CERT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_ALL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_ANIMATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>20</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_BODYPART</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_CLOTHING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_GESTURE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>21</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_LANDMARK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_NOTECARD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_OBJECT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_SCRIPT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_SOUND</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>INVENTORY_TEXTURE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>JSON_APPEND</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>JSON_ARRAY</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD2</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_DELETE</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD8</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_FALSE</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD7</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_INVALID</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD0</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_NULL</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD5</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_NUMBER</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD3</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_OBJECT</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD1</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_STRING</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD4</string> + <key>tooltip</key> + <string/> + </map> + <key>JSON_TRUE</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>U+FDD6</string> + <key>tooltip</key> + <string/> + </map> + <key>KFM_CMD_PAUSE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>For use with KFM_COMMAND.</string> + </map> + <key>KFM_CMD_PLAY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>For use with KFM_COMMAND.</string> + </map> + <key>KFM_CMD_STOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>For use with KFM_COMMAND.</string> + </map> + <key>KFM_COMMAND</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>KFM_DATA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>KFM_FORWARD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>For use with KFM_MODE.</string> + </map> + <key>KFM_LOOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>For use with KFM_MODE.</string> + </map> + <key>KFM_MODE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>KFM_PING_PONG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>For use with KFM_MODE.</string> + </map> + <key>KFM_REVERSE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>For use with KFM_MODE.</string> + </map> + <key>KFM_ROTATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>For use with KFM_DATA.</string> + </map> + <key>KFM_TRANSLATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>For use with KFM_DATA.</string> + </map> + <key>LAND_LARGE_BRUSH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>Use a large brush size.\nNOTE: This value is incorrect, a large brush should be 2.</string> + </map> + <key>LAND_LEVEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Action to level the land.</string> + </map> + <key>LAND_LOWER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Action to lower the land.</string> + </map> + <key>LAND_MEDIUM_BRUSH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Use a medium brush size.\nNOTE: This value is incorrect, a medium brush should be 1.</string> + </map> + <key>LAND_NOISE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>LAND_RAISE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Action to raise the land.</string> + </map> + <key>LAND_REVERT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>LAND_SMALL_BRUSH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Use a small brush size.\nNOTE: This value is incorrect, a small brush should be 0.</string> + </map> + <key>LAND_SMOOTH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>LINK_ALL_CHILDREN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-3</integer> + <key>tooltip</key> + <string>This targets every object except the root in the linked set.</string> + </map> + <key>LINK_ALL_OTHERS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-2</integer> + <key>tooltip</key> + <string>This targets every object in the linked set except the object with the script.</string> + </map> + <key>LINK_ROOT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>This targets the root of the linked set.</string> + </map> + <key>LINK_SET</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string>This targets every object in the linked set.</string> + </map> + <key>LINK_THIS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-4</integer> + <key>tooltip</key> + <string>The link number of the prim containing the script.</string> + </map> + <key>LIST_STAT_GEOMETRIC_MEAN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_MAX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_MEAN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_MEDIAN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_MIN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_NUM_COUNT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_RANGE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_STD_DEV</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_SUM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>LIST_STAT_SUM_SQUARES</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>LOOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>Loop the texture animation.</string> + </map> + <key>MASK_BASE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>MASK_EVERYONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>MASK_GROUP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>MASK_NEXT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>MASK_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>NULL_KEY</key> + <map> + <key>type</key> + <string>key</string> + <key>value</key> + <uuid>00000000-0000-0000-0000-000000000000</uuid> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_ATTACHED_POINT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>19</integer> + <key>tooltip</key> + <string>Gets the attachment point to which the object is attached.\nReturns 0 if the object is not an attachment (or is an avatar, etc).</string> + </map> + <key>OBJECT_CHARACTER_TIME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>17</integer> + <key>tooltip</key> + <string>Units in seconds</string> + </map> + <key>OBJECT_CREATOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>Gets the object's creator key. If id is an avatar, a NULL_KEY is returned.</string> + </map> + <key>OBJECT_DESC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Gets the object's description. If id is an avatar, an empty string is returned.</string> + </map> + <key>OBJECT_GROUP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string>Gets the prims's group key. If id is an avatar, a NULL_KEY is returned.</string> + </map> + <key>OBJECT_NAME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Gets the object's name.</string> + </map> + <key>OBJECT_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>Gets an object's owner's key. If id is group owned, a NULL_KEY is returned.</string> + </map> + <key>OBJECT_PATHFINDING_TYPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>20</integer> + <key>tooltip</key> + <string>Returns the pathfinding setting of any object in the region. It returns an integer matching one of the OPT_* constants.</string> + </map> + <key>OBJECT_PHANTOM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>22</integer> + <key>tooltip</key> + <string>Returns boolean, detailing if phantom is enabled or disabled on the object.\nIf id is an avatar or attachment, 0 is returned.</string> + </map> + <key>OBJECT_PHYSICS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>21</integer> + <key>tooltip</key> + <string>Returns boolean, detailing if physics is enabled or disabled on the object.\nIf id is an avatar or attachment, 0 is returned.</string> + </map> + <key>OBJECT_PHYSICS_COST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>16</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_POS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>Gets the object's position in region coordinates.</string> + </map> + <key>OBJECT_PRIM_EQUIVALENCE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_RENDER_WEIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>24</integer> + <key>tooltip</key> + <string>This is a flag used with llGetObjectDetails to get the Avatar_Rendering_Cost of an avatar, based on values reported by nearby viewers.\nIf no data is available, -1 is returned.\nThe maximum render weight stored by the simulator is 500000. When called against an object, 0 is returned.</string> + </map> + <key>OBJECT_RETURN_PARCEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_RETURN_PARCEL_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_RETURN_REGION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_ROOT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>18</integer> + <key>tooltip</key> + <string>Gets the id of the root prim of the object requested.\nIf id is an avatar, return the id of the root prim of the linkset the avatar is sitting on (or the avatar's own id if the avatar is not sitting on an object within the region).</string> + </map> + <key>OBJECT_ROT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Gets the object's rotation.</string> + </map> + <key>OBJECT_RUNNING_SCRIPT_COUNT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_SCRIPT_MEMORY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_SCRIPT_TIME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_SERVER_COST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>14</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_STREAMING_COST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>15</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_TEMP_ON_REZ</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>23</integer> + <key>tooltip</key> + <string>Returns boolean, detailing if temporary is enabled or disabled on the object.</string> + </map> + <key>OBJECT_TOTAL_SCRIPT_COUNT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_UNKNOWN_DETAIL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>OBJECT_VELOCITY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>Gets the object's velocity.</string> + </map> + <key>OPT_AVATAR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Returned for avatars.</string> + </map> + <key>OPT_CHARACTER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Returned for pathfinding characters.</string> + </map> + <key>OPT_EXCLUSION_VOLUME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>Returned for exclusion volumes.</string> + </map> + <key>OPT_LEGACY_LINKSET</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Returned for movable obstacles, movable phantoms, physical, and volumedetect objects.</string> + </map> + <key>OPT_MATERIAL_VOLUME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>Returned for material volumes.</string> + </map> + <key>OPT_OTHER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string>Returned for attachments, Linden trees, and grass.</string> + </map> + <key>OPT_STATIC_OBSTACLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Returned for static obstacles.</string> + </map> + <key>OPT_WALKABLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>Returned for walkable objects.</string> + </map> + <key>PARCEL_COUNT_GROUP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_COUNT_OTHER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_COUNT_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_COUNT_SELECTED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_COUNT_TEMP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_COUNT_TOTAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_DETAILS_AREA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>The parcel's area, in square meters. (5 chars.).</string> + </map> + <key>PARCEL_DETAILS_DESC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>The description of the parcel. (127 chars).</string> + </map> + <key>PARCEL_DETAILS_GROUP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>The parcel group's key. (36 chars.).</string> + </map> + <key>PARCEL_DETAILS_ID</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>The parcel's key. (36 chars.).</string> + </map> + <key>PARCEL_DETAILS_NAME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>The name of the parcel. (63 chars.).</string> + </map> + <key>PARCEL_DETAILS_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>The parcel owner's key. (36 chars.).</string> + </map> + <key>PARCEL_DETAILS_SEE_AVATARS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>The parcel's avatar visibility setting. (1 char.).</string> + </map> + <key>PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x08000000</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4000000</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_CREATE_OBJECTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_DAMAGE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_FLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10000000</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_GROUP_SCRIPTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2000000</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_LANDMARK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_SCRIPTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_ALLOW_TERRAFORM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_LOCAL_SOUND_ONLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8000</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_RESTRICT_PUSHOBJECT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200000</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_USE_ACCESS_GROUP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_USE_ACCESS_LIST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_USE_BAN_LIST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x400</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_FLAG_USE_LAND_PASS_LIST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x800</string> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_AGENT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_AUTO_ALIGN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_DESC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string>Use this to get or set the parcel media description.</string> + </map> + <key>PARCEL_MEDIA_COMMAND_LOOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_LOOP_SET</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string>Used to get or set the parcel's media looping variable.</string> + </map> + <key>PARCEL_MEDIA_COMMAND_PAUSE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_PLAY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_SIZE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string>Use this to get or set the parcel media pixel resolution.</string> + </map> + <key>PARCEL_MEDIA_COMMAND_STOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_TEXTURE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_TIME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_TYPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string>Use this to get or set the parcel media MIME type (e.g. "text/html").</string> + </map> + <key>PARCEL_MEDIA_COMMAND_UNLOAD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string/> + </map> + <key>PARCEL_MEDIA_COMMAND_URL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>PASSIVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>Static in-world objects.</string> + </map> + <key>PATROL_PAUSE_AT_WAYPOINTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PAY_DEFAULT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PAY_HIDE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PAYMENT_INFO_ON_FILE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PAYMENT_INFO_USED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PERM_ALL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x7FFFFFFF</string> + <key>tooltip</key> + <string/> + </map> + <key>PERM_COPY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8000</string> + <key>tooltip</key> + <string/> + </map> + <key>PERM_MODIFY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4000</string> + <key>tooltip</key> + <string/> + </map> + <key>PERM_MOVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80000</string> + <key>tooltip</key> + <string/> + </map> + <key>PERM_TRANSFER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2000</string> + <key>tooltip</key> + <string/> + </map> + <key>PERMISSION_ATTACH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string>If this permission is enabled, the object can successfully call llAttachToAvatar to attach to the given avatar.</string> + </map> + <key>PERMISSION_CHANGE_JOINTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string>(not yet implemented)</string> + </map> + <key>PERMISSION_CHANGE_LINKS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80</string> + <key>tooltip</key> + <string>If this permission is enabled, the object can successfully call llCreateLink, llBreakLink, and llBreakAllLinks to change links to other objects.</string> + </map> + <key>PERMISSION_CHANGE_PERMISSIONS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200</string> + <key>tooltip</key> + <string>(not yet implemented)</string> + </map> + <key>PERMISSION_CONTROL_CAMERA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x800</string> + <key>tooltip</key> + <string/> + </map> + <key>PERMISSION_DEBIT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>If this permission is enabled, the object can successfully call llGiveMoney or llTransferLindenDollars to debit the owners account.</string> + </map> + <key>PERMISSION_OVERRIDE_ANIMATIONS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8000</string> + <key>tooltip</key> + <string>Permission to override default animations.</string> + </map> + <key>PERMISSION_RELEASE_OWNERSHIP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string>(not yet implemented)</string> + </map> + <key>PERMISSION_REMAP_CONTROLS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>(not yet implemented)</string> + </map> + <key>PERMISSION_RETURN_OBJECTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>65536</integer> + <key>tooltip</key> + <string/> + </map> + <key>PERMISSION_SILENT_ESTATE_MANAGEMENT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4000</string> + <key>tooltip</key> + <string>A script with this permission does not notify the object owner when it modifies estate access rules via llManageEstateAccess.</string> + </map> + <key>PERMISSION_TAKE_CONTROLS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>If this permission enabled, the object can successfully call the llTakeControls libray call.</string> + </map> + <key>PERMISSION_TELEPORT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1000</string> + <key>tooltip</key> + <string/> + </map> + <key>PERMISSION_TRACK_CAMERA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x400</string> + <key>tooltip</key> + <string/> + </map> + <key>PERMISSION_TRIGGER_ANIMATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string>If this permission is enabled, the object can successfully call llStartAnimation for the avatar that owns this.</string> + </map> + <key>PI</key> + <map> + <key>type</key> + <string>float</string> + <key>value</key> + <real>3.14159265</real> + <key>tooltip</key> + <string>3.14159265 - The number of radians in a semi-circle.</string> + </map> + <key>PI_BY_TWO</key> + <map> + <key>type</key> + <string>float</string> + <key>value</key> + <real>1.57079633</real> + <key>tooltip</key> + <string>1.57079633 - The number of radians in a quarter circle.</string> + </map> + <key>PING_PONG</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>Play animation going forwards, then backwards.</string> + </map> + <key>PRIM_BUMP_BARK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_BLOBS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_BRICKS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_BRIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_CHECKER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_CONCRETE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_DARK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_DISKS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_GRAVEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_LARGETILE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>14</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_SHINY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>19</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_SIDING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_STONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_STUCCO</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>15</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_SUCTION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>16</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_TILE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_WEAVE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>17</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_BUMP_WOOD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_CAST_SHADOWS</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>24</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_COLOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>18</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_DESC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>28</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_FLEXIBLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>21</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_FULLBRIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>20</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_GLOW</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>25</integer> + <key>tooltip</key> + <string>PRIM_GLOW is used to get or set the glow status of the face.</string> + </map> + <key>PRIM_HOLE_CIRCLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_HOLE_DEFAULT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x00</string> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_HOLE_SQUARE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_HOLE_TRIANGLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x30</string> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_LINK_TARGET</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>34</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_FLESH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_GLASS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_LIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_METAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_PLASTIC</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_RUBBER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_STONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MATERIAL_WOOD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_ALT_IMAGE_ENABLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Boolean. Gets/Sets the default image state (the image that the user sees before a piece of media is active) for the chosen face. The default image is specified by Second Life's server for that media type.</string> + </map> + <key>PRIM_MEDIA_AUTO_LOOP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Boolean. Gets/Sets whether auto-looping is enabled.</string> + </map> + <key>PRIM_MEDIA_AUTO_PLAY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>Boolean. Gets/Sets whether the media auto-plays when a Resident can view it.</string> + </map> + <key>PRIM_MEDIA_AUTO_SCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>Boolean. Gets/Sets whether auto-scaling is enabled. Auto-scaling forces the media to the full size of the texture.</string> + </map> + <key>PRIM_MEDIA_AUTO_ZOOM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string>Boolean. Gets/Sets whether clicking the media triggers auto-zoom and auto-focus on the media.</string> + </map> + <key>PRIM_MEDIA_CONTROLS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Integer. Gets/Sets the style of controls. Can be either PRIM_MEDIA_CONTROLS_STANDARD or PRIM_MEDIA_CONTROLS_MINI.</string> + </map> + <key>PRIM_MEDIA_CONTROLS_MINI</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Mini web navigation controls; does not include an address bar.</string> + </map> + <key>PRIM_MEDIA_CONTROLS_STANDARD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Standard web navigation controls.</string> + </map> + <key>PRIM_MEDIA_CURRENT_URL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>String. Gets/Sets the current url displayed on the chosen face. Changing this URL causes navigation. 1024 characters Maximum.</string> + </map> + <key>PRIM_MEDIA_FIRST_CLICK_INTERACT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>Boolean. Gets/Sets whether the first click interaction is enabled.</string> + </map> + <key>PRIM_MEDIA_HEIGHT_PIXELS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string>Integer. Gets/Sets the height of the media in pixels.</string> + </map> + <key>PRIM_MEDIA_HOME_URL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>String. Gets/Sets the home URL for the chosen face. 1024 characters maximum.</string> + </map> + <key>PRIM_MEDIA_MAX_HEIGHT_PIXELS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2048</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_MAX_URL_LENGTH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1024</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_MAX_WHITELIST_COUNT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>64</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_MAX_WHITELIST_SIZE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1024</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_MAX_WIDTH_PIXELS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2048</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_PARAM_MAX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>14</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_PERM_ANYONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_PERM_GROUP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_PERM_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_PERM_OWNER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_MEDIA_PERMS_CONTROL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>14</integer> + <key>tooltip</key> + <string>Integer. Gets/Sets the permissions mask that control who can see the media control bar above the object:: PRIM_MEDIA_PERM_ANYONE, PRIM_MEDIA_PERM_GROUP, PRIM_MEDIA_PERM_NONE, PRIM_MEDIA_PERM_OWNER</string> + </map> + <key>PRIM_MEDIA_PERMS_INTERACT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string>Integer. Gets/Sets the permissions mask that control who can interact with the object: PRIM_MEDIA_PERM_ANYONE, PRIM_MEDIA_PERM_GROUP, PRIM_MEDIA_PERM_NONE, PRIM_MEDIA_PERM_OWNER</string> + </map> + <key>PRIM_MEDIA_WHITELIST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string>String. Gets/Sets the white-list as a string of escaped, comma-separated URLs. This string can hold up to 64 URLs or 1024 characters, whichever comes first.</string> + </map> + <key>PRIM_MEDIA_WHITELIST_ENABLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string>Boolean. Gets/Sets whether navigation is restricted to URLs in PRIM_MEDIA_WHITELIST.</string> + </map> + <key>PRIM_MEDIA_WIDTH_PIXELS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string>Integer. Gets/Sets the width of the media in pixels.</string> + </map> + <key>PRIM_NAME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>27</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_OMEGA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>32</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_PHANTOM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_PHYSICS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_PHYSICS_SHAPE_CONVEX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Use the convex hull of the prim shape for physics (this is the default for mesh objects).</string> + </map> + <key>PRIM_PHYSICS_SHAPE_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Ignore this prim in the physics shape. NB: This cannot be applied to the root prim.</string> + </map> + <key>PRIM_PHYSICS_SHAPE_PRIM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Use the normal prim shape for physics (this is the default for all non-mesh objects).</string> + </map> + <key>PRIM_PHYSICS_SHAPE_TYPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>30</integer> + <key>tooltip</key> + <string>Allows you to set the physics shape type of a prim via lsl. Permitted values are: + PRIM_PHYSICS_SHAPE_NONE, PRIM_PHYSICS_SHAPE_PRIM, PRIM_PHYSICS_SHAPE_CONVEX</string> + </map> + <key>PRIM_POINT_LIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>23</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_POS_LOCAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>33</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_POSITION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_ROT_LOCAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>29</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_ROTATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SCULPT_FLAG_INVERT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>64</integer> + <key>tooltip</key> + <string>Render inside out (inverts the normals).</string> + </map> + <key>PRIM_SCULPT_FLAG_MIRROR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>128</integer> + <key>tooltip</key> + <string>Render an X axis mirror of the sculpty.</string> + </map> + <key>PRIM_SCULPT_TYPE_CYLINDER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SCULPT_TYPE_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SCULPT_TYPE_PLANE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SCULPT_TYPE_SPHERE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SCULPT_TYPE_TORUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SHINY_HIGH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SHINY_LOW</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SHINY_MEDIUM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SHINY_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SIZE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_SLICE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>35</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TEMP_ON_REZ</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TEXGEN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>22</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TEXGEN_DEFAULT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TEXGEN_PLANAR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TEXT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>26</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TEXTURE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>17</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_BOX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_CYLINDER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_PRISM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_RING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_SCULPT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_SPHERE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_TORUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PRIM_TYPE_TUBE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>PROFILE_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Disables profiling</string> + </map> + <key>PROFILE_SCRIPT_MEMORY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Enables memory profiling</string> + </map> + <key>PSYS_PART_BF_DEST_COLOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BF_ONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BF_ONE_MINUS_DEST_COLOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BF_SOURCE_ALPHA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BF_SOURCE_COLOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BF_ZERO</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BLEND_FUNC_DEST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>25</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BLEND_FUNC_SOURCE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>24</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_BOUNCE_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>Particles bounce off of a plane at the objects Z height.</string> + </map> + <key>PSYS_PART_EMISSIVE_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string>The particle glows.</string> + </map> + <key>PSYS_PART_END_ALPHA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>A float which determines the ending alpha of the object.</string> + </map> + <key>PSYS_PART_END_COLOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>A vector <r, g, b> which determines the ending color of the object.</string> + </map> + <key>PSYS_PART_END_GLOW</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>27</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_END_SCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>A vector <sx, sy, z>, which is the ending size of the particle billboard in meters (z is ignored).</string> + </map> + <key>PSYS_PART_FLAGS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Each particle that is emitted by the particle system is simulated based on the following flags. To use multiple flags, bitwise or (|) them together.</string> + </map> + <key>PSYS_PART_FOLLOW_SRC_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string>The particle position is relative to the source objects position.</string> + </map> + <key>PSYS_PART_FOLLOW_VELOCITY_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string>The particle orientation is rotated so the vertical axis faces towards the particle velocity.</string> + </map> + <key>PSYS_PART_INTERP_COLOR_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>Interpolate both the color and alpha from the start value to the end value.</string> + </map> + <key>PSYS_PART_INTERP_SCALE_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>Interpolate the particle scale from the start value to the end value.</string> + </map> + <key>PSYS_PART_MAX_AGE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>19</integer> + <key>tooltip</key> + <string>Age in seconds of a particle at which it dies.</string> + </map> + <key>PSYS_PART_RIBBON_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x400</string> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_START_ALPHA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>A float which determines the starting alpha of the object.</string> + </map> + <key>PSYS_PART_START_COLOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>A vector <r.r, g.g, b.b> which determines the starting color of the object.</string> + </map> + <key>PSYS_PART_START_GLOW</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>26</integer> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_START_SCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>A vector <sx, sy, z>, which is the starting size of the particle billboard in meters (z is ignored).</string> + </map> + <key>PSYS_PART_TARGET_LINEAR_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80</string> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_PART_TARGET_POS_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string>The particle heads towards the location of the target object as defined by PSYS_SRC_TARGET_KEY.</string> + </map> + <key>PSYS_PART_WIND_MASK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>Particles have their velocity damped towards the wind velocity.</string> + </map> + <key>PSYS_SRC_ACCEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string>A vector <x, y, z> which is the acceleration to apply on particles.</string> + </map> + <key>PSYS_SRC_ANGLE_BEGIN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>22</integer> + <key>tooltip</key> + <string>Area in radians specifying where particles will NOT be created (for ANGLE patterns)</string> + </map> + <key>PSYS_SRC_ANGLE_END</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>23</integer> + <key>tooltip</key> + <string>Area in radians filled with particles (for ANGLE patterns) (if lower than PSYS_SRC_ANGLE_BEGIN, acts as PSYS_SRC_ANGLE_BEGIN itself, and PSYS_SRC_ANGLE_BEGIN acts as PSYS_SRC_ANGLE_END).</string> + </map> + <key>PSYS_SRC_BURST_PART_COUNT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>15</integer> + <key>tooltip</key> + <string>How many particles to release in a burst.</string> + </map> + <key>PSYS_SRC_BURST_RADIUS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>16</integer> + <key>tooltip</key> + <string>What distance from the center of the object to create the particles.</string> + </map> + <key>PSYS_SRC_BURST_RATE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>13</integer> + <key>tooltip</key> + <string>How often to release a particle burst (float seconds).</string> + </map> + <key>PSYS_SRC_BURST_SPEED_MAX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>18</integer> + <key>tooltip</key> + <string>Maximum speed that a particle should be moving.</string> + </map> + <key>PSYS_SRC_BURST_SPEED_MIN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>17</integer> + <key>tooltip</key> + <string>Minimum speed that a particle should be moving.</string> + </map> + <key>PSYS_SRC_INNERANGLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string>Specifies the inner angle of the arc created by the PSYS_SRC_PATTERN_ANGLE or PSYS_SRC_PATTERN_ANGLE_CONE source pattern. + The area specified will NOT have particles in it.</string> + </map> + <key>PSYS_SRC_MAX_AGE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>19</integer> + <key>tooltip</key> + <string>How long this particle system should last, 0.0 means forever.</string> + </map> + <key>PSYS_SRC_OMEGA</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>21</integer> + <key>tooltip</key> + <string>Sets the angular velocity to rotate the axis that SRC_PATTERN_ANGLE and SRC_PATTERN_ANGLE_CONE use.</string> + </map> + <key>PSYS_SRC_OUTERANGLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string>Specifies the outer angle of the arc created by the PSYS_SRC_PATTERN_ANGLE or PSYS_SRC_PATTERN_ANGLE_CONE source pattern. + The area between the outer and inner angle will be filled with particles.</string> + </map> + <key>PSYS_SRC_PATTERN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>9</integer> + <key>tooltip</key> + <string>The pattern which is used to generate particles. + Use one of the following values: PSYS_SRC_PATTERN Values.</string> + </map> + <key>PSYS_SRC_PATTERN_ANGLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x04</string> + <key>tooltip</key> + <string>Shoot particles across a 2 dimensional area defined by the arc created from PSYS_SRC_OUTERANGLE. There will be an open area defined by PSYS_SRC_INNERANGLE within the larger arc.</string> + </map> + <key>PSYS_SRC_PATTERN_ANGLE_CONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x08</string> + <key>tooltip</key> + <string>Shoot particles out in a 3 dimensional cone with an outer arc of PSYS_SRC_OUTERANGLE and an inner open area defined by PSYS_SRC_INNERANGLE.</string> + </map> + <key>PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string/> + </map> + <key>PSYS_SRC_PATTERN_DROP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x01</string> + <key>tooltip</key> + <string>Drop particles at the source position.</string> + </map> + <key>PSYS_SRC_PATTERN_EXPLODE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x02</string> + <key>tooltip</key> + <string>Shoot particles out in all directions, using the burst parameters.</string> + </map> + <key>PSYS_SRC_TARGET_KEY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>20</integer> + <key>tooltip</key> + <string>The key of a target object to move towards if PSYS_PART_TARGET_POS_MASK is enabled.</string> + </map> + <key>PSYS_SRC_TEXTURE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>12</integer> + <key>tooltip</key> + <string>An asset name for the texture to use for the particles.</string> + </map> + <key>PU_EVADE_HIDDEN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x07</string> + <key>tooltip</key> + <string>Triggered when an llEvade character thinks it has hidden from its pursuer.</string> + </map> + <key>PU_EVADE_SPOTTED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x08</string> + <key>tooltip</key> + <string>Triggered when an llEvade character switches from hiding to running</string> + </map> + <key>PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>10</integer> + <key>tooltip</key> + <string/> + </map> + <key>PU_FAILURE_INVALID_GOAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x03</string> + <key>tooltip</key> + <string>Goal is not on the navigation-mesh and cannot be reached.</string> + </map> + <key>PU_FAILURE_INVALID_START</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x02</string> + <key>tooltip</key> + <string>Character cannot navigate from the current location - e.g., the character is off the navmesh or too high above it.</string> + </map> + <key>PU_FAILURE_NO_NAVMESH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x09</string> + <key>tooltip</key> + <string>This is a fatal error reported to a character when there is no navmesh for the region. This usually indicates a server failure and users should file a bug report and include the time and region in which they received this message.</string> + </map> + <key>PU_FAILURE_NO_VALID_DESTINATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x06</string> + <key>tooltip</key> + <string>There is no good place for the character to go - e.g., it is patrolling and all the patrol points are now unreachable.</string> + </map> + <key>PU_FAILURE_OTHER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1000000</integer> + <key>tooltip</key> + <string/> + </map> + <key>PU_FAILURE_PARCEL_UNREACHABLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>11</integer> + <key>tooltip</key> + <string/> + </map> + <key>PU_FAILURE_TARGET_GONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x05</string> + <key>tooltip</key> + <string>Target (for llPursue or llEvade) can no longer be tracked - e.g., it left the region or is an avatar that is now more than about 30m outside the region.</string> + </map> + <key>PU_FAILURE_UNREACHABLE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x04</string> + <key>tooltip</key> + <string>Goal is no longer reachable for some reason - e.g., an obstacle blocks the path.</string> + </map> + <key>PU_GOAL_REACHED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x01</string> + <key>tooltip</key> + <string>Character has reached the goal and will stop or choose a new goal (if wandering).</string> + </map> + <key>PU_SLOWDOWN_DISTANCE_REACHED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x00</string> + <key>tooltip</key> + <string>Character is near current goal.</string> + </map> + <key>PUBLIC_CHANNEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>PUBLIC_CHANNEL is an integer constant that, when passed to llSay, llWhisper, or llShout as a channel parameter, will print text to the publicly heard chat channel.</string> + </map> + <key>PURSUIT_FUZZ_FACTOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>Selects a random destination near the offset.</string> + </map> + <key>PURSUIT_GOAL_TOLERANCE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string/> + </map> + <key>PURSUIT_INTERCEPT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Define whether the character attempts to predict the target's location.</string> + </map> + <key>PURSUIT_OFFSET</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Go to a position offset from the target.</string> + </map> + <key>RAD_TO_DEG</key> + <map> + <key>type</key> + <string>float</string> + <key>value</key> + <real>57.2957795</real> + <key>tooltip</key> + <string>57.2957795 - Number of degrees per radian. You can use this number to convert radians to degrees by multiplying the radians by this number.</string> + </map> + <key>RC_DATA_FLAGS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_DETECT_PHANTOM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_GET_LINK_NUM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_GET_NORMAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_GET_ROOT_KEY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_MAX_HITS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_REJECT_AGENTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_REJECT_LAND</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>8</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_REJECT_NONPHYSICAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_REJECT_PHYSICAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>RC_REJECT_TYPES</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>RCERR_CAST_TIME_EXCEEDED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-3</integer> + <key>tooltip</key> + <string/> + </map> + <key>RCERR_SIM_PERF_LOW</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-2</integer> + <key>tooltip</key> + <string/> + </map> + <key>RCERR_UNKNOWN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>-1</integer> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_ALLOW_DAMAGE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_ALLOW_DIRECT_TELEPORT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100000</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_BLOCK_FLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80000</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_BLOCK_TERRAFORM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_DISABLE_COLLISIONS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1000</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_DISABLE_PHYSICS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4000</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_FIXED_SUN</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_RESTRICT_PUSHOBJECT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x400000</string> + <key>tooltip</key> + <string/> + </map> + <key>REGION_FLAG_SANDBOX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string/> + </map> + <key>REMOTE_DATA_CHANNEL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>REMOTE_DATA_REPLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string/> + </map> + <key>REMOTE_DATA_REQUEST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>REQUIRE_LINE_OF_SIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Define whether the character needs a line-of-sight to give chase.</string> + </map> + <key>RESTITUTION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Used with llSetPhysicsMaterial to enable the density value. Must be between 0.0 and 1.0</string> + </map> + <key>REVERSE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>Play animation in reverse direction.</string> + </map> + <key>ROTATE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string>Animate texture rotation.</string> + </map> + <key>SCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string>Animate the texture scale.</string> + </map> + <key>SCRIPTED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>Scripted in-world objects.</string> + </map> + <key>SIM_STAT_PCT_CHARS_STEPPED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Returns the % of pathfinding characters skipped each frame, averaged over the last minute.\nThe returned value corresponds to the "Characters Updated" stat in the viewer's Statistics Bar.</string> + </map> + <key>SMOOTH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string>Slide in the X direction, instead of playing separate frames.</string> + </map> + <key>SQRT2</key> + <map> + <key>type</key> + <string>float</string> + <key>value</key> + <real>1.41421356</real> + <key>tooltip</key> + <string>1.41421356 - The square root of 2.</string> + </map> + <key>STATUS_BLOCK_GRAB</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>64</integer> + <key>tooltip</key> + <string>Controls whether the object can be grabbed.\nA grab is the default action when in third person, and is available as the hand tool in build mode. This is useful for physical objects that you don't want other people to be able to trivially disturb. The default is FALSE</string> + </map> + <key>STATUS_BLOCK_GRAB_OBJECT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1024</integer> + <key>tooltip</key> + <string>Prevent click-and-drag movement on all prims in the object.</string> + </map> + <key>STATUS_BOUNDS_ERROR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1002</integer> + <key>tooltip</key> + <string>Argument(s) passed to function had a bounds error.</string> + </map> + <key>STATUS_CAST_SHADOWS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200</string> + <key>tooltip</key> + <string/> + </map> + <key>STATUS_DIE_AT_EDGE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80</string> + <key>tooltip</key> + <string>Controls whether the object is returned to the owners inventory if it wanders off the edge of the world.\nIt is useful to set this status TRUE for things like bullets or rockets. The default is TRUE</string> + </map> + <key>STATUS_INTERNAL_ERROR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1999</integer> + <key>tooltip</key> + <string>An internal error occurred.</string> + </map> + <key>STATUS_MALFORMED_PARAMS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1000</integer> + <key>tooltip</key> + <string>Function was called with malformed parameters.</string> + </map> + <key>STATUS_NOT_FOUND</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1003</integer> + <key>tooltip</key> + <string>Object or other item was not found.</string> + </map> + <key>STATUS_NOT_SUPPORTED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1004</integer> + <key>tooltip</key> + <string>Feature not supported.</string> + </map> + <key>STATUS_OK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>Result of function call was a success.</string> + </map> + <key>STATUS_PHANTOM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string>Controls/indicates whether the object collides or not.\nSetting the value to TRUE makes the object non-colliding with all objects. It is a good idea to use this for most objects that move or rotate, but are non-physical. It is also useful for simulating volumetric lighting. The default is FALSE.</string> + </map> + <key>STATUS_PHYSICS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>Controls/indicates whether the object moves physically.\nThis controls the same flag that the UI check-box for Physical controls. The default is FALSE.</string> + </map> + <key>STATUS_RETURN_AT_EDGE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string/> + </map> + <key>STATUS_ROTATE_X</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string/> + </map> + <key>STATUS_ROTATE_Y</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string/> + </map> + <key>STATUS_ROTATE_Z</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>Controls/indicates whether the object can physically rotate around + the specific axis or not. This flag has no meaning + for non-physical objects. Set the value to FALSE + if you want to disable rotation around that axis. The + default is TRUE for a physical object. + A useful example to think about when visualizing + the effect is a sit-and-spin device. They spin around the + Z axis (up) but not around the X or Y axis.</string> + </map> + <key>STATUS_SANDBOX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string>Controls/indicates whether the object can cross region boundaries + and move more than 20 meters from its creation + point. The default if FALSE.</string> + </map> + <key>STATUS_TYPE_MISMATCH</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1001</integer> + <key>tooltip</key> + <string>Argument(s) passed to function had a type mismatch.</string> + </map> + <key>STATUS_WHITELIST_FAILED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2001</integer> + <key>tooltip</key> + <string>Whitelist Failed.</string> + </map> + <key>STRING_TRIM</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x03</string> + <key>tooltip</key> + <string/> + </map> + <key>STRING_TRIM_HEAD</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x01</string> + <key>tooltip</key> + <string/> + </map> + <key>STRING_TRIM_TAIL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x02</string> + <key>tooltip</key> + <string/> + </map> + <key>TEXTURE_BLANK</key> + <map> + <key>type</key> + <string>key</string> + <key>value</key> + <uuid>5748decc-f629-461c-9a36-a35a221fe21f</uuid> + <key>tooltip</key> + <string/> + </map> + <key>TEXTURE_DEFAULT</key> + <map> + <key>type</key> + <string>key</string> + <key>value</key> + <uuid>89556747-24cb-43ed-920b-47caed15465f</uuid> + <key>tooltip</key> + <string/> + </map> + <key>TEXTURE_MEDIA</key> + <map> + <key>type</key> + <string>key</string> + <key>value</key> + <uuid>8b5fec65-8d8d-9dc5-cda8-8fdf2716e361</uuid> + <key>tooltip</key> + <string/> + </map> + <key>TEXTURE_PLYWOOD</key> + <map> + <key>type</key> + <string>key</string> + <key>value</key> + <uuid>89556747-24cb-43ed-920b-47caed15465f</uuid> + <key>tooltip</key> + <string/> + </map> + <key>TEXTURE_TRANSPARENT</key> + <map> + <key>type</key> + <string>key</string> + <key>value</key> + <uuid>8dcd4a48-2d37-4909-9f78-f7a9eb4ef903</uuid> + <key>tooltip</key> + <string/> + </map> + <key>TOUCH_INVALID_FACE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0xFFFFFFFF</string> + <key>tooltip</key> + <string/> + </map> + <key>TOUCH_INVALID_TEXCOORD</key> + <map> + <key>type</key> + <string>vector</string> + <key>value</key> + <string><-1.0, -1.0, 0.0></string> + <key>tooltip</key> + <string/> + </map> + <key>TOUCH_INVALID_VECTOR</key> + <map> + <key>type</key> + <string>vector</string> + <key>value</key> + <string><0.0, 0.0, 0.0></string> + <key>tooltip</key> + <string/> + </map> + <key>TRAVERSAL_TYPE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>7</integer> + <key>tooltip</key> + <string>One of TRAVERSAL_TYPE_FAST, TRAVERSAL_TYPE_SLOW, and TRAVERSAL_TYPE_NONE.</string> + </map> + <key>TRAVERSAL_TYPE_FAST</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string/> + </map> + <key>TRAVERSAL_TYPE_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string/> + </map> + <key>TRAVERSAL_TYPE_SLOW</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>TRUE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>An integer constant for boolean comparisons. Has the value '1'.</string> + </map> + <key>TWO_PI</key> + <map> + <key>type</key> + <string>float</string> + <key>value</key> + <real>6.28318530</real> + <key>tooltip</key> + <string>6.28318530 - The radians of a circle.</string> + </map> + <key>TYPE_FLOAT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>The list entry is a float.</string> + </map> + <key>TYPE_INTEGER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>The list entry is an integer.</string> + </map> + <key>TYPE_INVALID</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string>The list entry is invalid.</string> + </map> + <key>TYPE_KEY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>The list entry is a key.</string> + </map> + <key>TYPE_ROTATION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>6</integer> + <key>tooltip</key> + <string>The list entry is a rotation.</string> + </map> + <key>TYPE_STRING</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>The list entry is a string.</string> + </map> + <key>TYPE_VECTOR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>The list entry is a vector.</string> + </map> + <key>URL_REQUEST_DENIED</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>URL_REQUEST_DENIED</string> + <key>tooltip</key> + <string/> + </map> + <key>URL_REQUEST_GRANTED</key> + <map> + <key>type</key> + <string>string</string> + <key>value</key> + <string>URL_REQUEST_GRANTED</string> + <key>tooltip</key> + <string/> + </map> + <key>VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>32</integer> + <key>tooltip</key> + <string>A slider between minimum (0.0) and maximum (1.0) deflection of angular orientation. That is, its a simple scalar for modulating the strength of angular deflection such that the vehicles preferred axis of motion points toward its real velocity.</string> + </map> + <key>VEHICLE_ANGULAR_DEFLECTION_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>33</integer> + <key>tooltip</key> + <string>The time-scale for exponential success of linear deflection deflection. Its another way to specify the strength of the vehicles tendency to reorient itself so that its preferred axis of motion agrees with its true velocity.</string> + </map> + <key>VEHICLE_ANGULAR_FRICTION_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>17</integer> + <key>tooltip</key> + <string>A vector of timescales for exponential decay of the vehicles angular velocity about its preferred axes of motion (at, left, up). + Range = [0.07, inf) seconds for each element of the vector.</string> + </map> + <key>VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>35</integer> + <key>tooltip</key> + <string>The timescale for exponential decay of the angular motors magnitude.</string> + </map> + <key>VEHICLE_ANGULAR_MOTOR_DIRECTION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>19</integer> + <key>tooltip</key> + <string>The direction and magnitude (in preferred frame) of the vehicles angular motor.The vehicle will accelerate (or decelerate if necessary) to match its velocity to its motor.</string> + </map> + <key>VEHICLE_ANGULAR_MOTOR_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>34</integer> + <key>tooltip</key> + <string>The timescale for exponential approach to full angular motor velocity.</string> + </map> + <key>VEHICLE_BANKING_EFFICIENCY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>38</integer> + <key>tooltip</key> + <string>A slider between anti (-1.0), none (0.0), and maxmum (1.0) banking strength.</string> + </map> + <key>VEHICLE_BANKING_MIX</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>39</integer> + <key>tooltip</key> + <string>A slider between static (0.0) and dynamic (1.0) banking. "Static" means the banking scales only with the angle of roll, whereas "dynamic" is a term that also scales with the vehicles linear speed.</string> + </map> + <key>VEHICLE_BANKING_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>40</integer> + <key>tooltip</key> + <string>The timescale for banking to exponentially approach its maximum effect. This is another way to scale the strength of the banking effect, however it affects the term that is proportional to the difference between what the banking behavior is trying to do, and what the vehicle is actually doing.</string> + </map> + <key>VEHICLE_BUOYANCY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>27</integer> + <key>tooltip</key> + <string>A slider between minimum (0.0) and maximum anti-gravity (1.0).</string> + </map> + <key>VEHICLE_FLAG_CAMERA_DECOUPLED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x200</string> + <key>tooltip</key> + <string/> + </map> + <key>VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x10</string> + <key>tooltip</key> + <string>Hover at global height.</string> + </map> + <key>VEHICLE_FLAG_HOVER_TERRAIN_ONLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x8</string> + <key>tooltip</key> + <string>Ignore water height when hovering.</string> + </map> + <key>VEHICLE_FLAG_HOVER_UP_ONLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x20</string> + <key>tooltip</key> + <string>Hover does not push down. Use this flag for hovering vehicles that should be able to jump above their hover height.</string> + </map> + <key>VEHICLE_FLAG_HOVER_WATER_ONLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x4</string> + <key>tooltip</key> + <string>Ignore terrain height when hovering.</string> + </map> + <key>VEHICLE_FLAG_LIMIT_MOTOR_UP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x40</string> + <key>tooltip</key> + <string>Prevents ground vehicles from motoring into the sky.</string> + </map> + <key>VEHICLE_FLAG_LIMIT_ROLL_ONLY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x2</string> + <key>tooltip</key> + <string>For vehicles with vertical attractor that want to be able to climb/dive, for instance, aeroplanes that want to use the banking feature.</string> + </map> + <key>VEHICLE_FLAG_MOUSELOOK_BANK</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x100</string> + <key>tooltip</key> + <string/> + </map> + <key>VEHICLE_FLAG_MOUSELOOK_STEER</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x80</string> + <key>tooltip</key> + <string/> + </map> + <key>VEHICLE_FLAG_NO_DEFLECTION_UP</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>This flag prevents linear deflection parallel to world z-axis. This is useful for preventing ground vehicles with large linear deflection, like bumper cars, from climbing their linear deflection into the sky.</string> + </map> + <key>VEHICLE_FLAG_NO_FLY_UP</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>type</key> + <string>integer</string> + <key>value</key> + <string>0x1</string> + <key>tooltip</key> + <string>Old, changed to VEHICLE_FLAG_NO_DEFLECTION_UP</string> + </map> + <key>VEHICLE_HOVER_EFFICIENCY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>25</integer> + <key>tooltip</key> + <string>A slider between minimum (0.0 = bouncy) and maximum (1.0 = fast as possible) damped motion of the hover behavior. </string> + </map> + <key>VEHICLE_HOVER_HEIGHT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>24</integer> + <key>tooltip</key> + <string>The height (above the terrain or water, or global) at which the vehicle will try to hover.</string> + </map> + <key>VEHICLE_HOVER_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>26</integer> + <key>tooltip</key> + <string>Period of time (in seconds) for the vehicle to achieve its hover height.</string> + </map> + <key>VEHICLE_LINEAR_DEFLECTION_EFFICIENCY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>28</integer> + <key>tooltip</key> + <string>A slider between minimum (0.0) and maximum (1.0) deflection of linear velocity. That is, its a simple scalar for modulating the strength of linear deflection.</string> + </map> + <key>VEHICLE_LINEAR_DEFLECTION_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>29</integer> + <key>tooltip</key> + <string>The timescale for exponential success of linear deflection deflection. It is another way to specify how much time it takes for the vehicles linear velocity to be redirected to its preferred axis of motion.</string> + </map> + <key>VEHICLE_LINEAR_FRICTION_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>16</integer> + <key>tooltip</key> + <string>A vector of timescales for exponential decay of the vehicles linear velocity along its preferred axes of motion (at, left, up). + Range = [0.07, inf) seconds for each element of the vector.</string> + </map> + <key>VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>35</integer> + <key>tooltip</key> + <string>The timescale for exponential decay of the linear motors magnitude.</string> + </map> + <key>VEHICLE_LINEAR_MOTOR_DIRECTION</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>18</integer> + <key>tooltip</key> + <string>The direction and magnitude (in preferred frame) of the vehicles linear motor. The vehicle will accelerate (or decelerate if necessary) to match its velocity to its motor. + Range of magnitude = [0, 30] meters/second.</string> + </map> + <key>VEHICLE_LINEAR_MOTOR_OFFSET</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>20</integer> + <key>tooltip</key> + <string/> + </map> + <key>VEHICLE_LINEAR_MOTOR_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>30</integer> + <key>tooltip</key> + <string>The timescale for exponential approach to full linear motor velocity.</string> + </map> + <key>VEHICLE_REFERENCE_FRAME</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>44</integer> + <key>tooltip</key> + <string>A rotation of the vehicles preferred axes of motion and orientation (at, left, up) with respect to the vehicles local frame (x, y, z).</string> + </map> + <key>VEHICLE_TYPE_AIRPLANE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>4</integer> + <key>tooltip</key> + <string>Uses linear deflection for lift, no hover, and banking to turn.\nSee http://wiki.secondlife.com/wiki/VEHICLE_TYPE_AIRPLANE</string> + </map> + <key>VEHICLE_TYPE_BALLOON</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>5</integer> + <key>tooltip</key> + <string>Hover, and friction, but no deflection.\nSee http://wiki.secondlife.com/wiki/VEHICLE_TYPE_BALLOON</string> + </map> + <key>VEHICLE_TYPE_BOAT</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>3</integer> + <key>tooltip</key> + <string>Hovers over water with lots of friction and some anglar deflection.\nSee http://wiki.secondlife.com/wiki/VEHICLE_TYPE_BOAT</string> + </map> + <key>VEHICLE_TYPE_CAR</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>2</integer> + <key>tooltip</key> + <string>Another vehicle that bounces along the ground but needs the motors to be driven from external controls or timer events.\nSee http://wiki.secondlife.com/wiki/VEHICLE_TYPE_CAR</string> + </map> + <key>VEHICLE_TYPE_NONE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>VEHICLE_TYPE_SLED</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>1</integer> + <key>tooltip</key> + <string>Simple vehicle that bumps along the ground, and likes to move along its local x-axis.\nSee http://wiki.secondlife.com/wiki/VEHICLE_TYPE_SLED</string> + </map> + <key>VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>36</integer> + <key>tooltip</key> + <string>A slider between minimum (0.0 = wobbly) and maximum (1.0 = firm as possible) stability of the vehicle to keep itself upright.</string> + </map> + <key>VEHICLE_VERTICAL_ATTRACTION_TIMESCALE</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>37</integer> + <key>tooltip</key> + <string>The period of wobble, or timescale for exponential approach, of the vehicle to rotate such that its preferred "up" axis is oriented along the worlds "up" axis.</string> + </map> + <key>VERTICAL</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>WANDER_PAUSE_AT_WAYPOINTS</key> + <map> + <key>type</key> + <string>integer</string> + <key>value</key> + <integer>0</integer> + <key>tooltip</key> + <string/> + </map> + <key>ZERO_ROTATION</key> + <map> + <key>type</key> + <string>rotation</string> + <key>value</key> + <string><0.0, 0.0, 0.0, 1.0></string> + <key>tooltip</key> + <string/> + </map> + <key>ZERO_VECTOR</key> + <map> + <key>type</key> + <string>vector</string> + <key>value</key> + <string><0.0, 0.0, 0.0></string> + <key>tooltip</key> + <string/> + </map> + <key>default</key> + <map> + <key>tooltip</key> + <string>All scripts must have a default state, which is the first state entered when the script starts.\nIf another state is defined before the default state, the compiler will report a syntax error.</string> + </map> + </map> + <key>events</key> + <map> + <key>at_rot_target</key> + <map> + <key>arguments</key> + <array> + <map> + <key>TargetNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>TargetRotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>CurrentRotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is triggered when a script comes within a defined angle of a target rotation. The range and rotation, are set by a call to llRotTarget.</string> + </map> + <key>at_target</key> + <map> + <key>arguments</key> + <array> + <map> + <key>TargetNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>TargetPosition</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>CurrentPosition</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is triggered when the scripted object comes within a defined range of the target position, defined by the llTarget function call.</string> + </map> + <key>attach</key> + <map> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is triggered whenever an object is attached or detached from an avatar. If it is attached, the key of the avatar it is attached to is passed in, otherwise NULL_KEY is.</string> + </map> + <key>changed</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Changed</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Triggered when various events change the object. The change argument will be a bit-field of CHANGED_* constants.</string> + </map> + <key>collision</key> + <map> + <key>arguments</key> + <array> + <map> + <key>NumberOfCollisions</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised while another object, or avatar, is colliding with the object the script is attached to. + The number of detected objects is passed to the script. Information on those objects may be gathered via the llDetected* functions.</string> + </map> + <key>collision_end</key> + <map> + <key>arguments</key> + <array> + <map> + <key>NumberOfCollisions</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised when another object, or avatar, stops colliding with the object the script is attached to. + The number of detected objects is passed to the script. Information on those objects may be gathered via the llDetected* library functions.</string> + </map> + <key>collision_start</key> + <map> + <key>arguments</key> + <array> + <map> + <key>NumberOfCollisions</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised when another object, or avatar, starts colliding with the object the script is attached to. + The number of detected objects is passed to the script. Information on those objects may be gathered via the llDetected* library functions.</string> + </map> + <key>control</key> + <map> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Levels</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Edges</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Once a script has the ability to grab control inputs from the avatar, this event will be used to pass the commands into the script. + The levels and edges are bit-fields of control constants.</string> + </map> + <key>dataserver</key> + <map> + <key>arguments</key> + <array> + <map> + <key>RequestID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Data</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is triggered when the requested data is returned to the script. + Data may be requested by the llRequestAgentData, llRequestInventoryData, and llGetNotecardLine function calls, for example.</string> + </map> + <key>email</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Time</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Address</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Subject</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Body</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>NumberRemaining</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is triggered when an email sent to this script arrives. + The number remaining tells how many more emails are known to be still pending.</string> + </map> + <key>http_request</key> + <map> + <key>arguments</key> + <array> + <map> + <key>HTTPRequestID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>HTTPMethod</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Body</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Triggered when task receives an HTTP request.</string> + </map> + <key>http_response</key> + <map> + <key>arguments</key> + <array> + <map> + <key>HTTPRequestID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Status</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Metadata</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Body</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event handler is invoked when an HTTP response is received for a pending llHTTPRequest request or if a pending request fails or times out.</string> + </map> + <key>land_collision</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised when the object the script is attached to is colliding with the ground.</string> + </map> + <key>land_collision_end</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised when the object the script is attached to stops colliding with the ground.</string> + </map> + <key>land_collision_start</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised when the object the script is attached to begins to collide with the ground.</string> + </map> + <key>link_message</key> + <map> + <key>arguments</key> + <array> + <map> + <key>SendersLink</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Triggered when object receives a link message via llMessageLinked function call.</string> + </map> + <key>listen</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Name</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised whenever a chat message matching the constraints set in the llListen command is received. The name and ID of the speaker, as well as the message, are passed in as parameters. + Channel 0 is the public chat channel that all avatars see as chat text. Channels 1 through 2,147,483,648 are private channels that are not sent to avatars but other scripts can listen on those channels.</string> + </map> + <key>money</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Payer</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Amount</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is triggered when a resident has given an amount of Linden dollars to the object.</string> + </map> + <key>moving_end</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Triggered whenever an object with this script stops moving.</string> + </map> + <key>moving_start</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Triggered whenever an object with this script starts moving.</string> + </map> + <key>no_sensor</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>This event is raised when sensors are active, via the llSensor function call, but are not sensing anything.</string> + </map> + <key>not_at_rot_target</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>When a target is set via the llRotTarget function call, but the script is outside the specified angle this event is raised.</string> + </map> + <key>not_at_target</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>When a target is set via the llTarget library call, but the script is outside the specified range this event is raised.</string> + </map> + <key>object_rez</key> + <map> + <key>arguments</key> + <array> + <map> + <key>RezzedObjectsID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Triggered when an object rezzes another object from its inventory via the llRezObject, or similar, functions. The id is the globally unique key for the object rezzed.</string> + </map> + <key>on_rez</key> + <map> + <key>arguments</key> + <array> + <map> + <key>StartParameter</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Triggered whenever an object is rezzed from inventory or by another object. The start parameter is passed in from the llRezObject call, or zero if from inventory.</string> + </map> + <key>path_update</key> + <map> + <key>arguments</key> + <array> + <map> + <key>Type</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Reserved</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is called to inform the script of changes within the object's path-finding status.</string> + </map> + <key>remote_data</key> + <map> + <key>arguments</key> + <array> + <map> + <key>EventType</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ChannelID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>MessageID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Sender</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Data</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Data</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Triggered by various XML-RPC calls with event_type specifying the type of data.</string> + </map> + <key>run_time_permissions</key> + <map> + <key>arguments</key> + <array> + <map> + <key>PermissionFlags</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Scripts need permission from either the owner or the avatar they wish to act on before they may perform certain functions, such as debiting money from their owners account, triggering an animation on an avatar, or capturing control inputs. The llRequestPermissions library function is used to request these permissions and the various permissions integer constants can be supplied. + The integer returned to this event handler contains the current set of permissions flags, so if permissions equal 0 then no permissions are set.</string> + </map> + <key>sensor</key> + <map> + <key>arguments</key> + <array> + <map> + <key>NumberDetected</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised whenever objects matching the constraints of the llSensor command are detected. + The number of detected objects is passed to the script in the parameter. Information on those objects may be gathered via the llDetected* functions.</string> + </map> + <key>state_entry</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>The state_entry event occurs whenever a new state is entered, including at program start, and is always the first event handled.</string> + </map> + <key>state_exit</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>The state_exit event occurs whenever the state command is used to transition to another state. It is handled before the new states state_entry event.</string> + </map> + <key>timer</key> + <map> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>This event is raised at regular intervals set by the llSetTimerEvent library function.</string> + </map> + <key>touch</key> + <map> + <key>arguments</key> + <array> + <map> + <key>NumberOfTouches</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised while a user is touching the object the script is attached to. + The number of touching objects is passed to the script in the parameter. + Information on those objects may be gathered via the llDetected* library functions.</string> + </map> + <key>touch_end</key> + <map> + <key>arguments</key> + <array> + <map> + <key>NumberOfTouches</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised when a user stops touching the object the script is attached to. The number of touches is passed to the script in the parameter. + Information on those objects may be gathered via the llDetected* library functions.</string> + </map> + <key>touch_start</key> + <map> + <key>arguments</key> + <array> + <map> + <key>NumberOfTouches</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This event is raised when a user first touches the object the script is attached to. The number of touches is passed to the script in the parameter. + Information on those objects may be gathered via the llDetected() library functions.</string> + </map> + <key>transaction_result</key> + <map> + <key>arguments</key> + <array> + <map> + <key>RequestID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Success</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Message</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Triggered by llTransferMoney() function.</string> + </map> + </map> + <key>functions</key> + <map> + <key>llAbs</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>An integer value.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the absolute (positive) version of Value.</string> + </map> + <key>llAcos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>A floating-point value.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the arc-cosine of Value, in radians.</string> + </map> + <key>llAddToLandBanList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Agent UUID to add to ban-list.</string> + </map> + </map> + <map> + <key>Hours</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Period, in hours, to ban the avatar for.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Add avatar ID to the parcel ban list for the specified number of Hours.\nA value of 0 for Hours will add the agent indefinitely.\nThe smallest value that Hours will accept is 0.01; anything smaller will be seen as 0.\nWhen values that small are used, it seems the function bans in approximately 30 second increments (Probably 36 second increments, as 0.01 of an hour is 36 seconds).\nResidents teleporting to a parcel where they are banned will be redirected to a neighbouring parcel.</string> + </map> + <key>llAddToLandPassList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Agent UUID to add to pass-list.</string> + </map> + </map> + <map> + <key>Hours</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Period, in hours, to allow the avatar for.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Add avatar ID to the land pass list, for a duration of Hours.</string> + </map> + <key>llAdjustSoundVolume</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>The volume to set.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Adjusts the volume (0.0 - 1.0) of the currently playing attached sound.\nThis function has no effect on sounds started with llTriggerSound.</string> + </map> + <key>llAllowInventoryDrop</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Flag</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, If TRUE allows anyone to drop inventory on prim, FALSE revokes.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If Flag == TRUE, users without object modify permissions can still drop inventory items into the object.</string> + </map> + <key>llAngleBetween</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Rot1</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string>First rotation.</string> + </map> + </map> + <map> + <key>Rot2</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string>Second rotation.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the angle, in radians, between rotations Rot1 and Rot2.</string> + </map> + <key>llApplyImpulse</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Force</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Amount of impulse force to apply.</string> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE, force is treated as a local directional vector instead of region directional vector.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Applies impulse to the object.\nIf Local == TRUE, apply the Force in local coordinates; otherwise, apply the Force in global coordinates.\nThis function only works on physical objects.</string> + </map> + <key>llApplyRotationalImpulse</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Force</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Amount of impulse force to apply.</string> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE, uses local axis, if FALSE, uses region axis.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Applies rotational impulse to the object.\nIf Local == TRUE, apply the Force in local coordinates; otherwise, apply the Force in global coordinates.\nThis function only works on physical objects.</string> + </map> + <key>llAsin</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>A floating-point value.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the arc-sine, in radians, of Value.</string> + </map> + <key>llAtan2</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>y</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>A floating-point value.</string> + </map> + </map> + <map> + <key>x</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>A floating-point value.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the arc-tangent2 of y, x.</string> + </map> + <key>llAttachToAvatar</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AttachmentPoint</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Attach to avatar at point AttachmentPoint.\nRequires the PERMISSION_ATTACH runtime permission.</string> + </map> + <key>llAttachToAvatarTemp</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AttachPoint</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Valid attachment point or ATTACH_* constant.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Follows the same convention as llAttachToAvatar, with the exception that the object will not create new inventory for the user, and will disappear on detach or disconnect.</string> + </map> + <key>llAvatarOnLinkSitTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If an avatar is sitting on the link's sit target, return the avatar's key, NULL_KEY otherwise.\nReturns a key that is the UUID of the user seated on the specified link's prim.</string> + </map> + <key>llAvatarOnSitTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>If an avatar is seated on the sit target, returns the avatar's key, otherwise NULL_KEY.\nThis only will detect avatars sitting on sit targets defined with llSitTarget.</string> + </map> + <key>llAxes2Rot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <array> + <map> + <key>Forward</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Forward/Back part of rotation.</string> + </map> + </map> + <map> + <key>Left</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Left/Right part of rotation.</string> + </map> + </map> + <map> + <key>Up</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Up/Down part of rotation.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the rotation represented by coordinate axes Forward, Left, and Up.</string> + </map> + <key>llAxisAngle2Rot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <array> + <map> + <key>Axis</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Axis.</string> + </map> + </map> + <map> + <key>Angle</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Angle in radians.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the rotation that is a generated Angle about Axis.</string> + </map> + <key>llBase64ToInteger</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns an integer that is the Text, Base64 decoded as a big endian integer.\nReturns zero if Text is longer then 8 characters. If Text contains fewer then 6 characters, the return value is unpredictable.</string> + </map> + <key>llBase64ToString</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Converts a Base64 string to a conventional string.\nIf the conversion creates any unprintable characters, they are converted to question marks.</string> + </map> + <key>llBreakAllLinks</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>De-links all prims in the link set (requires permission PERMISSION_CHANGE_LINKS be set).</string> + </map> + <key>llBreakLink</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>De-links the prim with the given link number (requires permission PERMISSION_CHANGE_LINKS be set).</string> + </map> + <key>llCastRay</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Casts a ray into the physics world from 'start' to 'end' and returns data according to details in Options.\nReports collision data for intersections with objects.\nReturn value: [UUID_1, {link_number_1}, hit_position_1, {hit_normal_1}, UUID_2, {link_number_2}, hit_position_2, {hit_normal_2}, ... , status_code] where {} indicates optional data.</string> + </map> + <key>llCeil</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns smallest integer value >= Value.</string> + </map> + <key>llClearCameraParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Resets all camera parameters to default values and turns off scripted camera control.</string> + </map> + <key>llClearLinkMedia</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Link</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Clears (deletes) the media and all parameters from the given Face on the linked prim.\nReturns an integer that is a STATUS_* flag, which details the success/failure of the operation.</string> + </map> + <key>llClearPrimMedia</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Number of side to clear.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Clears (deletes) the media and all parameters from the given Face.\nReturns an integer that is a STATUS_* flag which details the success/failure of the operation.</string> + </map> + <key>llCloseRemoteDataChannel</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ChannelID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Closes the specified XML-RPC channel.</string> + </map> + <key>llCloud</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the cloud density at the object's position + Offset.</string> + </map> + <key>llCollisionFilter</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ObjectName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ObjectID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Accept</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>If TRUE, only accept collisions with ObjectName name AND ObjectID (either is optional), otherwise with objects not ObjectName AND ObjectID.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Specify an empty string or NULL_KEY for Accept, to not filter on the corresponding parameter.</string> + </map> + <key>llCollisionSound</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ImpactSound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ImpactVolume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Suppress default collision sounds, replace default impact sounds with ImpactSound.\nThe ImpactSound must be in the object inventory.\nSupply an empty string to suppress collision sounds.</string> + </map> + <key>llCollisionSprite</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ImpactSprite</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Suppress default collision sprites, replace default impact sprite with ImpactSprite; found in the object inventory (empty string to just suppress).</string> + </map> + <key>llCos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Theta</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the cosine of Theta (Theta in radians).</string> + </map> + <key>llCreateCharacter</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Convert link-set to AI/Physics character.\nCreates a path-finding entity, known as a "character", from the object containing the script. Required to activate use of path-finding functions.\nOptions is a list of key/value pairs.</string> + </map> + <key>llCreateLink</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>TargetPrim</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Object UUID that is in the same region.</string> + </map> + </map> + <map> + <key>Parent</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>If FALSE, then TargetPrim becomes the root. If TRUE, then the script's object becomes the root.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Attempt to link the object the script is in, to target (requires permission PERMISSION_CHANGE_LINKS be set).\nRequires permission PERMISSION_CHANGE_LINKS be set.</string> + </map> + <key>llCSV2List</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Create a list from a string of comma separated values specified in Text.</string> + </map> + <key>llDeleteCharacter</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Convert link-set from AI/Physics character to Physics object.\nConvert the current link-set back to a standard object, removing all path-finding properties.</string> + </map> + <key>llDeleteSubList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Source</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Removes the slice from start to end and returns the remainder of the list.\nRemove a slice from the list and return the remainder, start and end are inclusive.\nUsing negative numbers for start and/or end causes the index to count backwards from the length of the list, so 0, -1 would delete the entire list.\nIf Start is larger than End the list deleted is the exclusion of the entries; so 6, 4 would delete the entire list except for the 5th. list entry.</string> + </map> + <key>llDeleteSubString</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Source</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Removes the indicated sub-string and returns the result.\nStart and End are inclusive.\nUsing negative numbers for Start and/or End causes the index to count backwards from the length of the string, so 0, -1 would delete the entire string.\nIf Start is larger than End, the sub-string is the exclusion of the entries; so 6, 4 would delete the entire string except for the 5th. character.</string> + </map> + <key>llDetachFromAvatar</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Remove the object containing the script from the avatar.</string> + </map> + <key>llDetectedGrab</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the grab offset of a user touching the object.\nReturns <0.0, 0.0, 0.0> if Number is not a valid object.</string> + </map> + <key>llDetectedGroup</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns TRUE if detected object or agent Number has the same user group active as this object.\nIt will return FALSE if the object or agent is in the group, but the group is not active.</string> + </map> + <key>llDetectedKey</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the key of detected object or avatar number.\nReturns NULL_KEY if Number is not a valid index.</string> + </map> + <key>llDetectedLinkNumber</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the link position of the triggered event for touches and collisions only.\n0 for a non-linked object, 1 for the root of a linked object, 2 for the first child, etc.</string> + </map> + <key>llDetectedName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the name of detected object or avatar number.\nReturns the name of detected object number.\nReturns empty string if Number is not a valid index.</string> + </map> + <key>llDetectedOwner</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the key of detected object's owner.\nReturns invalid key if Number is not a valid index.</string> + </map> + <key>llDetectedPos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the position of detected object or avatar number.\nReturns <0.0, 0.0, 0.0> if Number is not a valid index.</string> + </map> + <key>llDetectedRot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the rotation of detected object or avatar number.\nReturns <0.0, 0.0, 0.0, 1.0> if Number is not a valid offset.</string> + </map> + <key>llDetectedTouchBinormal</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Index of detection information</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the surface bi-normal for a triggered touch event.\nReturns a vector that is the surface bi-normal (tangent to the surface) where the touch event was triggered.</string> + </map> + <key>llDetectedTouchFace</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Index of detection information</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the index of the face where the avatar clicked in a triggered touch event.</string> + </map> + <key>llDetectedTouchNormal</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Index of detection information</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the surface normal for a triggered touch event.\nReturns a vector that is the surface normal (perpendicular to the surface) where the touch event was triggered.</string> + </map> + <key>llDetectedTouchPos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Index of detected information</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the position, in region coordinates, where the object was touched in a triggered touch event.\nUnless it is a HUD, in which case it returns the position relative to the attach point.</string> + </map> + <key>llDetectedTouchST</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Index of detection information</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a vector that is the surface coordinates where the prim was touched.\nThe X and Y vector positions contain the horizontal (S) and vertical (T) face coordinates respectively.\nEach component is in the interval [0.0, 1.0].\nTOUCH_INVALID_TEXCOORD is returned if the surface coordinates cannot be determined (e.g. when the viewer does not support this function).</string> + </map> + <key>llDetectedTouchUV</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Index of detection information</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a vector that is the texture coordinates for where the prim was touched.\nThe X and Y vector positions contain the U and V face coordinates respectively.\nTOUCH_INVALID_TEXCOORD is returned if the touch UV coordinates cannot be determined (e.g. when the viewer does not support this function).</string> + </map> + <key>llDetectedType</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the type (AGENT, ACTIVE, PASSIVE, SCRIPTED) of detected object.\nReturns 0 if number is not a valid index.\nNote that number is a bit-field, so comparisons need to be a bitwise checked. e.g.:\ninteger iType = llDetectedType(0);\n{\n // ...do stuff with the agent\n}</string> + </map> + <key>llDetectedVel</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the velocity of the detected object Number.\nReturns<0.0, 0.0, 0.0> if Number is not a valid offset.</string> + </map> + <key>llDialog</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Buttons</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Shows a dialog box on the avatar's screen with the message.\n + Up to 12 strings in the list form buttons.\n + If a button is clicked, the name is chatted on Channel.\nOpens a "notify box" in the given avatars screen displaying the message.\n + Up to twelve buttons can be specified in a list of strings. When the user clicks a button, the name of the button is said on the specified channel.\n + Channels work just like llSay(), so channel 0 can be heard by everyone.\n + The chat originates at the object's position, not the avatar's position, even though it is said as the avatar (uses avatar's UUID and Name etc.).\n + Examples:\n + llDialog(who, "Are you a boy or a girl?", [ "Boy", "Girl" ], -4913);\n + llDialog(who, "This shows only an OK button.", [], -192);\n + llDialog(who, "This chats so you can 'hear' it.", ["Hooray"], 0);</string> + </map> + <key>llDie</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Delete the object which holds the script.</string> + </map> + <key>llDumpList2String</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Source</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Separator</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the list as a single string, using Separator between the entries.\nWrite the list out as a single string, using Separator between values.</string> + </map> + <key>llEdgeOfWorld</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Direction</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Checks to see whether the border hit by Direction from Position is the edge of the world (has no neighboring region).\nReturns TRUE if the line along Direction from Position hits the edge of the world in the current simulator, returns FALSE if that edge crosses into another simulator.</string> + </map> + <key>llEjectFromLand</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Ejects AvatarID from land that you own.\nEjects AvatarID from land that the object owner (group or resident) owns.</string> + </map> + <key>llEmail</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>20.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Address</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Subject</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sends email to Address with Subject and Message.\nSends an email to Address with Subject and Message.</string> + </map> + <key>llEscapeURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>URL</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns an escaped/encoded version of url, replacing spaces with %20 etc.\nReturns the string that is the URL-escaped version of URL (replacing spaces with %20, etc.).\n + This function returns the UTF-8 encoded escape codes for selected characters.</string> + </map> + <key>llEuler2Rot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <array> + <map> + <key>Vector</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the rotation representation of the Euler angles.\nReturns the rotation represented by the Euler Angle.</string> + </map> + <key>llEvade</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>TargetID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Agent or object to evade.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>No options yet.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Evade a specified target.\nCharacters will (roughly) try to hide from their pursuers if there is a good hiding spot along their fleeing path. Hiding means no direct line of sight from the head of the character (centre of the top of its physics bounding box) to the head of its pursuer and no direct path between the two on the navigation-mesh.</string> + </map> + <key>llExecCharacterCmd</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Command</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Command to send.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Height for CHARACTER_CMD_JUMP.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Execute a character command.\nSend a command to the path system.\nCurrently only supports stopping the current path-finding operation or causing the character to jump.</string> + </map> + <key>llFabs</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the positive version of Value.\nReturns the absolute value of Value.</string> + </map> + <key>llFleeFrom</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Source</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Global coordinate from which to flee.</string> + </map> + </map> + <map> + <key>Distance</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Distance in meters to flee from the source.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>No options available at this time.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Flee from a point.\nDirects a character (llCreateCharacter) to keep away from a defined position in the region or adjacent regions.</string> + </map> + <key>llFloor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns largest integer value <= Value.</string> + </map> + <key>llForceMouselook</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Enable</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE when an avatar sits on the prim, the avatar will be forced into mouse-look mode.\nFALSE is the default setting and will undo a previously set TRUE or do nothing.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If Enable is TRUE any avatar that sits on this object is forced into mouse-look mode.\nAfter calling this function with Enable set to TRUE, any agent sitting down on the prim will be forced into mouse-look.\nJust like llSitTarget, this changes a permanent property of the prim (not the object) and needs to be reset by calling this function with Enable set to FALSE in order to disable it.</string> + </map> + <key>llFrand</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Magnitude</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a pseudo random number in the range [0, Magnitude] or [Magnitude, 0].\nReturns a pseudo-random number between [0, Magnitude].</string> + </map> + <key>llGenerateKey</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Generates a key (SHA-1 hash) using UUID generation to create a unique key.\nAs the UUID produced is versioned, it should never return a value of NULL_KEY.\nThe specific UUID version is an implementation detail that has changed in the past and may change again in the future. Do not depend upon the UUID that is returned to be version 5 SHA-1 hash.</string> + </map> + <key>llGetAccel</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the acceleration of the object relative to the region's axes.\nGets the acceleration of the object.</string> + </map> + <key>llGetAgentInfo</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns an integer bit-field containing the agent information about id.\n + Returns AGENT_FLYING, AGENT_ATTACHMENTS, AGENT_SCRIPTED, AGENT_SITTING, AGENT_ON_OBJECT, AGENT_MOUSELOOK, AGENT_AWAY, AGENT_BUSY, AGENT_TYPING, AGENT_CROUCHING, AGENT_ALWAYS_RUN, AGENT_WALKING and/or AGENT_IN_AIR.\nReturns information about the given agent ID as a bit-field of agent info constants.</string> + </map> + <key>llGetAgentLanguage</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the language code of the preferred interface language of the avatar.\nReturns a string that is the language code of the preferred interface language of the resident.</string> + </map> + <key>llGetAgentList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Scope</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>The scope (region, parcel, parcel same owner) to return agents for.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>List of options to apply. Current unused.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests a list of agents currently in the region, limited by the scope parameter.\nReturns a list [key UUID-0, key UUID-1, ..., key UUID-n] or [string error_msg] - returns avatar keys for all agents in the region limited to the area(s) specified by scope</string> + </map> + <key>llGetAgentSize</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>If the avatar is in the same region, returns the size of the bounding box of the requested avatar by id, otherwise returns ZERO_VECTOR.\nIf the agent is in the same region as the object, returns the size of the avatar.</string> + </map> + <key>llGetAlpha</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the alpha value of Face.\nReturns the 'alpha' of the given face. If face is ALL_SIDES the value returned is the mean average of all faces.</string> + </map> + <key>llGetAndResetTime</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the script time in seconds and then resets the script timer to zero.\nGets the time in seconds since starting and resets the time to zero.</string> + </map> + <key>llGetAnimation</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the name of the currently playing locomotion animation for the avatar id.\nReturns the currently playing animation for the specified avatar ID.</string> + </map> + <key>llGetAnimationList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a list of keys of playing animations for an avatar.\nReturns a list of keys of all playing animations for the specified avatar ID.</string> + </map> + <key>llGetAnimationOverride</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>AnimationState</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string that is the name of the animation that is used for the specified animation state\nTo use this function the script must obtain either the PERMISSION_OVERRIDE_ANIMATIONS or PERMISSION_TRIGGER_ANIMATION permission (automatically granted to attached objects).</string> + </map> + <key>llGetAttached</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the object's attachment point, or 0 if not attached.\nReturns the object attachment point, or 0 if not attached.</string> + </map> + <key>llGetBoundingBox</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the bounding box around the object (including any linked prims) relative to its root prim, as a list in the format [ (vector) min_corner, (vector) max_corner ].</string> + </map> + <key>llGetCameraPos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the current camera position for the agent the task has permissions for.\nReturns the position of the camera, of the user that granted the script PERMISSION_TRACK_CAMERA. If no user has granted the permission, it returns ZERO_VECTOR.</string> + </map> + <key>llGetCameraRot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the current camera orientation for the agent the task has permissions for. If no user has granted the PERMISSION_TRACK_CAMERA permission, returns ZERO_ROTATION.</string> + </map> + <key>llGetCenterOfMass</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the prim's centre of mass (unless called from the root prim, where it returns the object's centre of mass).</string> + </map> + <key>llGetClosestNavPoint</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Point</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>A point in region-local space.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>No options at this time.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Get the closest navigable point to the point provided.\nThe function accepts a point in region-local space (like all the other path-finding methods) and returns either an empty list or a list containing a single vector which is the closest point on the navigation-mesh to the point provided.</string> + </map> + <key>llGetColor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the color on Face.\nReturns the color of Face as a vector of red, green, and blue values between 0 and 1. If face is ALL_SIDES the color returned is the mean average of each channel.</string> + </map> + <key>llGetCreator</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns a key for the creator of the prim.\nReturns the key of the object's original creator. Similar to llGetOwner.</string> + </map> + <key>llGetDate</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the current date in the UTC time zone in the format YYYY-MM-DD.\nReturns the current UTC date as YYYY-MM-DD.</string> + </map> + <key>llGetDisplayName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Avatar UUID that is in the same region, or is otherwise known to the region.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the display name of an avatar, if the avatar is connected to the current region, or if the name has been cached. Otherwise, returns an empty string. Use llRequestDisplayName if the avatar may be absent from the region.</string> + </map> + <key>llGetEnergy</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns how much energy is in the object as a percentage of maximum.</string> + </map> + <key>llGetEnv</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>DataRequest</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>The type of data to request. Any other string will cause an empty string to be returned.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string with the requested data about the region.</string> + </map> + <key>llGetForce</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the force (if the script is physical).\nReturns the current force if the script is physical.</string> + </map> + <key>llGetFreeMemory</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the number of free bytes of memory the script can use.\nReturns the available free space for the current script. This is inaccurate with LSO.</string> + </map> + <key>llGetFreeURLs</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the number of available URLs for the current script.\nReturns an integer that is the number of available URLs.</string> + </map> + <key>llGetGeometricCenter</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the vector that is the geometric center of the object relative to the root prim.</string> + </map> + <key>llGetGMTclock</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the time in seconds since midnight GMT.\nGets the time in seconds since midnight in GMT/UTC.</string> + </map> + <key>llGetHTTPHeader</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>HTTPRequestID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>A valid HTTP request key</string> + </map> + </map> + <map> + <key>Header</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Header value name</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the value for header for request_id.\nReturns a string that is the value of the Header for HTTPRequestID.</string> + </map> + <key>llGetInventoryCreator</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a key for the creator of the inventory item.\nThis function returns the UUID of the creator of item. If item is not found in inventory, the object says "No item named 'name'".</string> + </map> + <key>llGetInventoryKey</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the key that is the UUID of the inventory named.\nReturns the key of the inventory named.</string> + </map> + <key>llGetInventoryName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>InventoryType</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Inventory item type</string> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Index number of inventory item.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the name of the inventory item of a given type, specified by index number.\nUse the inventory constants INVENTORY_* to specify the type.</string> + </map> + <key>llGetInventoryNumber</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>InventoryType</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Inventory item type</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the quantity of items of a given type (INVENTORY_* flag) in the prim's inventory.\nUse the inventory constants INVENTORY_* to specify the type.</string> + </map> + <key>llGetInventoryPermMask</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Inventory item name.</string> + </map> + </map> + <map> + <key>BitMask</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>MASK_BASE, MASK_OWNER, MASK_GROUP, MASK_EVERYONE or MASK_NEXT</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the requested permission mask for the inventory item.\nReturns the requested permission mask for the inventory item defined by InventoryItem. If item is not in the object's inventory, llGetInventoryPermMask returns FALSE and causes the object to say "No item named '<item>'", where "<item>" is item.</string> + </map> + <key>llGetInventoryType</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the type of the named inventory item.\nLike all inventory functions, llGetInventoryType is case-sensitive.</string> + </map> + <key>llGetKey</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the key of the prim the script is attached to.\nGet the key for the object which has this script.</string> + </map> + <key>llGetLandOwnerAt</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the key of the land owner, returns NULL_KEY if public.\nReturns the key of the land owner at Position, or NULL_KEY if public.</string> + </map> + <key>llGetLinkKey</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the key of the linked prim LinkNumber.\nReturns the key of LinkNumber in the link set.</string> + </map> + <key>llGetLinkMedia</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag</string> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>The prim's side number</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>A list of PRIM_* property constants to return values of.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Get the media parameters for a particular face on linked prim, given the desired list of parameter names. Returns a list of values in the order requested. Returns an empty list if no media exists on the face.</string> + </map> + <key>llGetLinkName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the name of LinkNumber in a link set.\nReturns the name of LinkNumber the link set.</string> + </map> + <key>llGetLinkNumber</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the link number of the prim containing the script (0 means not linked, 1 the prim is the root, 2 the prim is the first child, etc.).\nReturns the link number of the prim containing the script. 0 means no link, 1 the root, 2 for first child, etc.</string> + </map> + <key>llGetLinkNumberOfSides</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the number of sides of the specified linked prim.\nReturns an integer that is the number of faces (or sides) of the prim link.</string> + </map> + <key>llGetLinkPrimitiveParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag.</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>PRIM_* flags.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the list of primitive attributes requested in the Parameters list for LinkNumber.\nPRIM_* flags can be broken into three categories, face flags, prim flags, and object flags.\n* Supplying a prim or object flag will return that flags attributes.\n* Face flags require the user to also supply a face index parameter.</string> + </map> + <key>llGetListEntryType</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the type of the index entry in the list (TYPE_INTEGER, TYPE_FLOAT, TYPE_STRING, TYPE_KEY, TYPE_VECTOR, TYPE_ROTATION, or TYPE_INVALID if index is off list).\nReturns the type of the variable at Index in ListVariable.</string> + </map> + <key>llGetListLength</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the number of elements in the list.\nReturns the number of elements in ListVariable.</string> + </map> + <key>llGetLocalPos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the position relative to the root.\nReturns the local position of a child object relative to the root.</string> + </map> + <key>llGetLocalRot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the rotation local to the root.\nReturns the local rotation of a child object relative to the root.</string> + </map> + <key>llGetMass</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the mass of object that the script is attached to.\nReturns the scripted object's mass. When called from a script in a link-set, the parent will return the sum of the link-set weights, while a child will return just its own mass. When called from a script inside an attachment, this function will return the mass of the avatar it's attached to, not its own.</string> + </map> + <key>llGetMassMKS</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Acts as llGetMass(), except that the units of the value returned are Kg.</string> + </map> + <key>llGetMaxScaleFactor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns a float that is the largest scaling factor that can be used with llScaleByFactor to resize the object. This maximum is determined by the Linkability Rules and prim scale limits.</string> + </map> + <key>llGetMemoryLimit</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Get the maximum memory a script can use, in bytes.</string> + </map> + <key>llGetMinScaleFactor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns a float that is the smallest scaling factor that can be used with llScaleByFactor to resize the object. This minimum is determined by the prim scale limits.</string> + </map> + <key>llGetNextEmail</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Address</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Subject</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Fetch the next queued email with that matches the given address and/or subject, via the email event.\nIf the parameters are blank, they are not used for filtering.</string> + </map> + <key>llGetNotecardLine</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>NotecardName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>LineNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns LineNumber from NotecardName via the dataserver event. The line index starts at zero.\nIf the requested line is passed the end of the note-card the dataserver event will return the constant EOF string.\nThe key returned by this function is a unique identifier which will be supplied to the dataserver event in the requested parameter.</string> + </map> + <key>llGetNumberOfNotecardLines</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>NotecardName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the number of lines contained within a notecard via the dataserver event.\nThe key returned by this function is a query ID for identifying the dataserver reply.</string> + </map> + <key>llGetNumberOfPrims</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the number of prims in a link set the script is attached to.\nReturns the number of prims in (and avatars seated on) the object the script is in.</string> + </map> + <key>llGetNumberOfSides</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the number of faces (or sides) of the prim.\nReturns the number of sides of the prim which has the script.</string> + </map> + <key>llGetObjectDesc</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the description of the prim the script is attached to.\nReturns the description of the scripted object/prim. You can set the description using llSetObjectDesc.</string> + </map> + <key>llGetObjectDetails</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Prim or avatar UUID that is in the same region.</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>List of OBJECT_* flags.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a list of object details specified in the Parameters list for the object or avatar in the region with key ID.\nParameters are specified by the OBJECT_* constants.</string> + </map> + <key>llGetObjectMass</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the mass of the avatar or object in the region.\nGets the mass of the object or avatar corresponding to ID.</string> + </map> + <key>llGetObjectName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the name of the prim which the script is attached to.\nReturns the name of the prim (not object) which contains the script.</string> + </map> + <key>llGetObjectPermMask</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Category</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Category is one of MASK_BASE, MASK_OWNER, MASK_GROUP, MASK_EVERYONE, or MASK_NEXT</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the permission mask of the requested category for the object.</string> + </map> + <key>llGetObjectPrimCount</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ObjectID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the total number of prims for an object in the region.\nReturns the prim count for any object id in the same region.</string> + </map> + <key>llGetOmega</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the rotation velocity in radians per second.\nReturns a vector that is the rotation velocity of the object in radians per second.</string> + </map> + <key>llGetOwner</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the object owner's UUID.\nReturns the key for the owner of the object.</string> + </map> + <key>llGetOwnerKey</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>ObjectID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the owner of ObjectID.\nReturns the key for the owner of object ObjectID.</string> + </map> + <key>llGetParcelDetails</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Location within the region.</string> + </map> + </map> + <map> + <key>ParcelDetails</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>List of details requested for the specified parcel location.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a list of parcel details specified in the ParcelDetails list for the parcel at Position.\nParameters is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA, _ID, _SEE_AVATARS.\nReturns a list that is the parcel details specified in ParcelDetails (in the same order) for the parcel at Position.</string> + </map> + <key>llGetParcelFlags</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a mask of the parcel flags (PARCEL_FLAG_*) for the parcel that includes the point Position.\nReturns a bit-field specifying the parcel flags (PARCEL_FLAG_*) for the parcel at Position.</string> + </map> + <key>llGetParcelMaxPrims</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Region coordinates (z is ignored) of parcel.</string> + </map> + </map> + <map> + <key>SimWide</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean. If FALSE then the return is the maximum prims supported by the parcel. If TRUE then it is the combined number of prims on all parcels in the region owned by the specified parcel's owner.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the maximum number of prims allowed on the parcel at Position for a given scope.\nThe scope may be set to an individual parcel or the combined resources of all parcels with the same ownership in the region.</string> + </map> + <key>llGetParcelMusicURL</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Gets the streaming audio URL for the parcel object is on.\nThe object owner, avatar or group, must also be the land owner.</string> + </map> + <key>llGetParcelPrimCount</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Region coordinates of parcel to query.</string> + </map> + </map> + <map> + <key>Category</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>A PARCEL_COUNT_* flag.</string> + </map> + </map> + <map> + <key>SimWide</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean. If FALSE then the return is the maximum prims supported by the parcel. If TRUE then it is the combined number of prims on all parcels in the region owned by the specified parcel's owner.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the number of prims on the parcel at Position of the given category.\nCategories: PARCEL_COUNT_TOTAL, _OWNER, _GROUP, _OTHER, _SELECTED, _TEMP.\nReturns the number of prims used on the parcel at Position which are in Category.\nIf SimWide is TRUE, it returns the total number of objects for all parcels with matching ownership in the category specified.\nIf SimWide is FALSE, it returns the number of objects on this specific parcel in the category specified</string> + </map> + <key>llGetParcelPrimOwners</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>2.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a list of up to 100 residents who own objects on the parcel at Position, with per-owner land impact totals.\nRequires owner-like permissions for the parcel, and for the script owner to be present in the region.\nThe list is formatted as [ key agentKey1, integer agentLI1, key agentKey2, integer agentLI2, ... ], sorted by agent key.\nThe integers are the combined land impacts of the objects owned by the corresponding agents.</string> + </map> + <key>llGetPermissions</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns an integer bitmask of the permissions that have been granted to the script. Individual permissions can be determined using a bit-wise "and" operation against the PERMISSION_* constants</string> + </map> + <key>llGetPermissionsKey</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the key of the avatar that last granted or declined permissions to the script.\nReturns NULL_KEY if permissions were never granted or declined.</string> + </map> + <key>llGetPhysicsMaterial</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>list</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns a list of the form [float gravity_multiplier, float restitution, float friction, float density].</string> + </map> + <key>llGetPos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the position of the task in region coordinates.\nReturns the vector position of the task in region coordinates.</string> + </map> + <key>llGetPrimitiveParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>PRIM_* flags and face parameters</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the primitive parameters specified in the parameters list.\nReturns primitive parameters specified in the Parameters list.</string> + </map> + <key>llGetPrimMediaParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>face number</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>One or more PRIM_MEDIA_* flags</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the media parameters for a particular face on an object, given the desired list of parameter names, in the order requested. Returns an empty list if no media exists on the face.</string> + </map> + <key>llGetRegionAgentCount</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the number of avatars in the region.\nReturns an integer that is the number of avatars in the region.</string> + </map> + <key>llGetRegionCorner</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns a vector, in meters, that is the global location of the south-west corner of the region which the object is in.\nReturns the Region-Corner of the simulator containing the task. The region-corner is a vector (values in meters) representing distance from the first region.</string> + </map> + <key>llGetRegionFlags</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the region flags (REGION_FLAG_*) for the region the object is in.\nReturns a bit-field specifying the region flags (REGION_FLAG_*) for the region the object is in.</string> + </map> + <key>llGetRegionFPS</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the mean region frames per second.</string> + </map> + <key>llGetRegionName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the current region name.</string> + </map> + <key>llGetRegionTimeDilation</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the current time dilation as a float between 0.0 (full dilation) and 1.0 (no dilation).\nReturns the current time dilation as a float between 0.0 and 1.0.</string> + </map> + <key>llGetRootPosition</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the position (in region coordinates) of the root prim of the object which the script is attached to.\nThis is used to allow a child prim to determine where the root is.</string> + </map> + <key>llGetRootRotation</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the rotation (relative to the region) of the root prim of the object which the script is attached to.\nGets the global rotation of the root object of the object script is attached to.</string> + </map> + <key>llGetRot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the rotation relative to the region's axes.\nReturns the rotation.</string> + </map> + <key>llGetScale</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the scale of the prim.\nReturns a vector that is the scale (dimensions) of the prim.</string> + </map> + <key>llGetScriptName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the name of the script that this function is used in.\nReturns the name of this script.</string> + </map> + <key>llGetScriptState</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ScriptName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns TRUE if the script named is running.\nReturns TRUE if ScriptName is running.</string> + </map> + <key>llGetSimStats</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>StatType</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Statistic type. Currently only SIM_STAT_PCT_CHARS_STEPPED is supported.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a float that is the requested statistic.</string> + </map> + <key>llGetSimulatorHostname</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>10.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the host-name of the machine which the script is running on.\nFor example, "sim225.agni.lindenlab.com".</string> + </map> + <key>llGetSPMaxMemory</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the maximum used memory for the current script. Only valid after using PROFILE_SCRIPT_MEMORY. Non-mono scripts always use 16k.\nReturns the integer of the most bytes used while llScriptProfiler was last active.</string> + </map> + <key>llGetStartParameter</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns an integer that is the script rez parameter.\nIf the object was rezzed by an agent, this function returns 0.</string> + </map> + <key>llGetStaticPath</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Starting position.</string> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Ending position.</string> + </map> + </map> + <map> + <key>Radius</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Radius of the character that the path is for, between 0.125m and 5.0m.</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Currently only accepts the parameter CHARACTER_TYPE; the options are identical to those used for llCreateCharacter. The default value is CHARACTER_TYPE_NONE.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string/> + </map> + <key>llGetStatus</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>StatusFlag</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>A STATUS_* flag</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns boolean value of the specified status (e.g. STATUS_PHANTOM) of the object the script is attached to.</string> + </map> + <key>llGetSubString</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>String</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a sub-string from String, in a range specified by the Start and End indicies (inclusive).\nUsing negative numbers for Start and/or End causes the index to count backwards from the length of the string, so 0, -1 would capture the entire string.\nIf Start is greater than End, the sub string is the exclusion of the entries.</string> + </map> + <key>llGetSunDirection</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns a normalized vector of the direction of the sun in the region.\nReturns the sun's direction on the simulator.</string> + </map> + <key>llGetTexture</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string that is the texture on face (the inventory name if it is a texture in the prim's inventory, otherwise the key).\nReturns the texture of a face, if it is found in object inventory, its key otherwise.</string> + </map> + <key>llGetTextureOffset</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the texture offset of face in the x and y components of a vector.</string> + </map> + <key>llGetTextureRot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the texture rotation of side.</string> + </map> + <key>llGetTextureScale</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the texture scale of side in the x and y components of a vector.\nReturns the texture scale of a side in the x and y components of a vector.</string> + </map> + <key>llGetTime</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the time in seconds since the last region reset, script reset, or call to either llResetTime or llGetAndResetTime.</string> + </map> + <key>llGetTimeOfDay</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the time in seconds since Second Life midnight or since region up-time, whichever is smaller.\nThe Second Life day cycle is 4 hours.</string> + </map> + <key>llGetTimestamp</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns a time-stamp (UTC time zone) in the format: YYYY-MM-DDThh:mm:ss.ff..fZ.</string> + </map> + <key>llGetTorque</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the torque (if the script is physical).\nReturns a vector that is the torque (if the script is physical).</string> + </map> + <key>llGetUnixTime</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC from the system clock.</string> + </map> + <key>llGetUsedMemory</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the current used memory for the current script. Non-mono scripts always use 16K.\nReturns the integer of the number of bytes of memory currently in use by the script. Non-mono scripts always use 16K.</string> + </map> + <key>llGetUsername</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the username of an avatar, if the avatar is connected to the current region, or if the name has been cached. Otherwise, returns an empty string. Use llRequestUsername if the avatar may be absent from the region.</string> + </map> + <key>llGetVel</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the velocity of the object.\nReturns a vector that is the velocity of the object.</string> + </map> + <key>llGetWallclock</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the time in seconds since midnight California Pacific time (PST/PDT).\nReturns the time in seconds since simulator's time-zone midnight (Pacific Time).</string> + </map> + <key>llGiveInventory</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>TargetID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Give InventoryItem to destination represented by TargetID, as permitted by the permissions system.\nTargetID may be any agent or an object in the same region.</string> + </map> + <key>llGiveInventoryList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>3.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>TargetID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>FolderName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>InventoryItems</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Give InventoryItems to destination (represented by TargetID) as a new folder of items, as permitted by the permissions system.\nTargetID may be any agent or an object in the same region. If TargetID is an object, the items are passed directly to the object inventory (no folder is created).</string> + </map> + <key>llGiveMoney</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Amount</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Transfers Amount of L$ from script owner to AvatarID.\nThis call will silently fail if PERMISSION_DEBIT has not been granted.</string> + </map> + <key>llGodLikeRezObject</key> + <map> + <key>god-mode</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItemID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Rez directly off of a UUID if owner has dog-bit set.</string> + </map> + <key>llGround</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the ground height at the object position + offset.\nReturns the ground height at the object's position + Offset.</string> + </map> + <key>llGroundContour</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the ground contour direction below the object position + Offset.\nReturns the ground contour at the object's position + Offset.</string> + </map> + <key>llGroundNormal</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the ground normal below the object position + offset.\nReturns the ground contour at the object's position + Offset.</string> + </map> + <key>llGroundRepel</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Height</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Distance above the ground.</string> + </map> + </map> + <map> + <key>Water</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE then hover above water too.</string> + </map> + </map> + <map> + <key>Tau</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Seconds to critically damp in.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Critically damps to height if within height * 0.5 of level (either above ground level or above the higher of land and water if water == TRUE).\nCritically damps to fHeight if within fHeight * 0.5 of ground or water level.\n + The height is above ground level if iWater is FALSE or above the higher of land and water if iWater is TRUE.\n + Do not use with vehicles. Only works in physics-enabled objects.</string> + </map> + <key>llGroundSlope</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the ground slope below the object position + Offset.\nReturns the ground slope at the object position + Offset.</string> + </map> + <key>llHTTPRequest</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>URL</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>A valid HTTP/HTTPS URL.</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Configuration parameters, specified as HTTP_* flag-value pairs.</string> + </map> + </map> + <map> + <key>Body</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Contents of the request.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sends an HTTP request to the specified URL with the Body of the request and Parameters.\nReturns a key that is a handle identifying the HTTP request made.</string> + </map> + <key>llHTTPResponse</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>HTTPRequestID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>A valid HTTP request key.</string> + </map> + </map> + <map> + <key>Status</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>HTTP Status (200, 400, 404, etc.).</string> + </map> + </map> + <map> + <key>Body</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Contents of the response.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Responds to an incoming HTTP request which was triggerd by an http_request event within the script. HTTPRequestID specifies the request to respond to (this ID is supplied in the http_request event handler). Status and Body specify the status code and message to respond with.</string> + </map> + <key>llInsertString</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>TargetVariable</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>SourceVariable</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Inserts SourceVariable into TargetVariable at Position, and returns the result.\nInserts SourceVariable into TargetVariable at Position and returns the result. Note this does not alter TargetVariable.</string> + </map> + <key>llInstantMessage</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>2.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>IMs Text to the user identified.\nSend Text to the user as an instant message.</string> + </map> + <key>llIntegerToBase64</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string that is a Base64 big endian encode of Value.\nEncodes the Value as an 8-character Base64 string.</string> + </map> + <key>llJson2List</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>JSON</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Converts the top level of the JSON string to a list.</string> + </map> + <key>llJsonGetValue</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>JSON</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Specifiers</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Gets the value indicated by Specifiers from the JSON string.</string> + </map> + <key>llJsonSetValue</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>JSON</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Specifiers</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a new JSON string that is the JSON given with the Value indicated by Specifiers set to Value.</string> + </map> + <key>llJsonValueType</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>JSON</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Specifiers</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the type constant (JSON_*) for the value in JSON indicated by Specifiers.</string> + </map> + <key>llKey2Name</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Avatar or rezzed prim UUID.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the name of the prim or avatar specified by ID. The ID must be a valid rezzed prim or avatar key in the current simulator, otherwise an empty string is returned.\nFor avatars, the returned name is the legacy name</string> + </map> + <key>llLinkParticleSystem</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag</string> + </map> + </map> + <map> + <key>Rules</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Particle system rules list in the format [ rule1, data1, rule2, data2 . . . ruleN, dataN ]</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Creates a particle system in prim LinkNumber based on Rules. An empty list removes a particle system from object.\nList format is [ rule-1, data-1, rule-2, data-2 ... rule-n, data-n ].\nThis is identical to llParticleSystem except that it applies to a specified linked prim and not just the prim the script is in.</string> + </map> + <key>llLinkSitTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag of the prim.</string> + </map> + </map> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Position for the sit target, relative to the prim's position.</string> + </map> + </map> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string>Rotation (relative to the prim's rotation) for the avatar.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set the sit location for the linked prim(s). If Offset == <0,0,0> clear it.\nSet the sit location for the linked prim(s). The sit location is relative to the prim's position and rotation.</string> + </map> + <key>llList2CSV</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Creates a string of comma separated values from the list.\nCreate a string of comma separated values from the specified list.</string> + </map> + <key>llList2Float</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Copies the float at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to a float, then zero is returned.</string> + </map> + <key>llList2Integer</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Copies the integer at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to an integer, then zero is returned.</string> + </map> + <key>llList2Json</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>JsonType</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Type is JSON_ARRAY or JSON_OBJECT.</string> + </map> + </map> + <map> + <key>Values</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>List of values to convert.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Converts either a strided list of key:value pairs to a JSON_OBJECT, or a list of values to a JSON_ARRAY.</string> + </map> + <key>llList2Key</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Copies the key at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to a key, then null string is returned.</string> + </map> + <key>llList2List</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a subset of entries from ListVariable, in a range specified by the Start and End indicies (inclusive).\nUsing negative numbers for Start and/or End causes the index to count backwards from the length of the string, so 0, -1 would capture the entire string.\nIf Start is greater than End, the sub string is the exclusion of the entries.</string> + </map> + <key>llList2ListStrided</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Stride</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Copies the strided slice of the list from Start to End.\nReturns a copy of the strided slice of the specified list from Start to End.</string> + </map> + <key>llList2Rot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Copies the rotation at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to rotation, thenZERO_ROTATION is returned.</string> + </map> + <key>llList2String</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Copies the string at Index in the list.\nReturns the value at Index in the specified list as a string. If Index describes a location not in the list then null string is returned.</string> + </map> + <key>llList2Vector</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Index</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Copies the vector at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to a vector, then ZERO_VECTOR is returned.</string> + </map> + <key>llListen</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>SpeakersName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>SpeakersID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Creates a listen callback for Text on Channel from SpeakersName and SpeakersID (SpeakersName, SpeakersID, and/or Text can be empty) and returns an identifier that can be used to deactivate or remove the listen.\nNon-empty values for SpeakersName, SpeakersID, and Text will filter the results accordingly, while empty strings and NULL_KEY will not filter the results, for string and key parameters respectively.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts.</string> + </map> + <key>llListenControl</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ChannelHandle</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Active</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Makes a listen event callback active or inactive. Pass in the value returned from llListen to the iChannelHandle parameter to specify which listener you are controlling.\nUse boolean values to specify Active</string> + </map> + <key>llListenRemove</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ChannelHandle</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Removes a listen event callback. Pass in the value returned from llListen to the iChannelHandle parameter to specify which listener to remove.</string> + </map> + <key>llListFindList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Find</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the index of the first instance of Find in ListVariable. Returns -1 if not found.\nReturns the position of the first instance of the Find list in the ListVariable. Returns -1 if not found.</string> + </map> + <key>llListInsertList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Target</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a list that contains all the elements from Target but with the elements from ListVariable inserted at Position start.\nReturns a new list, created by inserting ListVariable into the Target list at Position. Note this does not alter the Target.</string> + </map> + <key>llListRandomize</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Stride</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a version of the input ListVariable which has been randomized by blocks of size Stride.\nIf the remainder from the length of the list, divided by the stride is non-zero, this function does not randomize the list.</string> + </map> + <key>llListReplaceList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Target</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>End</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a list that is Target with Start through End removed and ListVariable inserted at Start.\nReturns a list replacing the slice of the Target list from Start to End with the specified ListVariable. Start and End are inclusive, so 0, 1 would replace the first two entries and 0, 0 would replace only the first list entry.</string> + </map> + <key>llListSort</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>List to sort.</string> + </map> + </map> + <map> + <key>Stride</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Stride length.</string> + </map> + </map> + <map> + <key>Ascending</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean. TRUE = result in ascending order, FALSE = result in descending order.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the specified list, sorted into blocks of stride in ascending order (if Ascending is TRUE, otherwise descending). Note that sort only works if the first entry of each block is the same datatype.</string> + </map> + <key>llListStatistics</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Operation</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>One of LIST_STAT_* values</string> + </map> + </map> + <map> + <key>ListVariable</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Variable to analyze.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Performs a statistical aggregate function, specified by a LIST_STAT_* constant, on ListVariables.\nThis function allows a script to perform a statistical operation as defined by operation on a list composed of integers and floats.</string> + </map> + <key>llLoadURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>URL</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Shows dialog to avatar AvatarID offering to load web page at URL. If user clicks yes, launches their web browser.\nllLoadURL displays a dialogue box to the user, offering to load the specified web page using the default web browser.</string> + </map> + <key>llLog</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the natural logarithm of Value. Returns zero if Value <= 0.\nReturns the base e (natural) logarithm of the specified Value.</string> + </map> + <key>llLog10</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the base 10 logarithm of Value. Returns zero if Value <= 0.\nReturns the base 10 (common) logarithm of the specified Value.</string> + </map> + <key>llLookAt</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Target</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Strength</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Damping</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Cause object name to point its forward axis towards Target, at a force controlled by Strength and Damping.\nGood Strength values are around half the mass of the object and good Damping values are less than 1/10th of the Strength.\nAsymmetrical shapes require smaller Damping. A Strength of 0.0 cancels the look at.</string> + </map> + <key>llLoopSound</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Plays specified Sound, looping indefinitely, at Volume (0.0 - 1.0).\nOnly one sound may be attached to an object at a time.\nA second call to llLoopSound with the same key will not restart the sound, but the new volume will be used. This allows control over the volume of already playing sounds.\nSetting the volume to 0 is not the same as calling llStopSound; a sound with 0 volume will continue to loop.\nTo restart the sound from the beginning, call llStopSound before calling llLoopSound again.</string> + </map> + <key>llLoopSoundMaster</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Plays attached Sound, looping at volume (0.0 - 1.0), and declares it a sync master.\nBehaviour is identical to llLoopSound, with the addition of marking the source as a "Sync Master", causing "Slave" sounds to sync to it. If there are multiple masters within a viewers interest area, the most audible one (a function of both distance and volume) will win out as the master.\nThe use of multiple masters within a small area is unlikely to produce the desired effect.</string> + </map> + <key>llLoopSoundSlave</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Plays attached sound looping at volume (0.0 - 1.0), synced to most audible sync master.\nBehaviour is identical to llLoopSound, unless there is a "Sync Master" present.\nIf a Sync Master is already playing the Slave sound will begin playing from the same point the master is in its loop synchronizing the loop points of both sounds.\nIf a Sync Master is started when the Slave is already playing, the Slave will skip to the correct position to sync with the Master.</string> + </map> + <key>llMakeExplosion</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Particles</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Scale</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Velocity</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Lifetime</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Arc</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Texture</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Make a round explosion of particles. Deprecated: Use llParticleSystem instead.\nMake a round explosion of particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead.</string> + </map> + <key>llMakeFire</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Particles</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Scale</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Velocity</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Lifetime</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Arc</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Texture</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Make fire like particles. Deprecated: Use llParticleSystem instead.\nMake fire particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead.</string> + </map> + <key>llMakeFountain</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Particles</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Scale</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Velocity</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Lifetime</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Arc</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Texture</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Make a fountain of particles. Deprecated: Use llParticleSystem instead.\nMake a fountain of particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead.</string> + </map> + <key>llMakeSmoke</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Particles</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Scale</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Velocity</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Lifetime</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Arc</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Texture</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Make smoke like particles. Deprecated: Use llParticleSystem instead.\nMake smoky particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead.</string> + </map> + <key>llManageEstateAccess</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Action</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>One of the ESTATE_ACCESS_ALLOWED_* actions.</string> + </map> + </map> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>UUID of the avatar or group to act upon.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Adds or removes agents from the estate's agent access or ban lists, or groups to the estate's group access list. Action is one of the ESTATE_ACCESS_ALLOWED_* operations to perform.\nReturns an integer representing a boolean, TRUE if the call was successful; FALSE if throttled, invalid action, invalid or null id or object owner is not allowed to manage the estate.\nThe object owner is notified of any changes, unless PERMISSION_SILENT_ESTATE_MANAGEMENT has been granted to the script.</string> + </map> + <key>llMapDestination</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>RegionName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Direction</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Opens world map for avatar who touched is is wearing the script, centred on RegionName with Position highlighted. Only works for scripts attached to avatar, or during touch events.\nDirection currently has no effect.</string> + </map> + <key>llMD5String</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Nonce</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string of 32 hex characters that is an RSA Data Security Inc., MD5 Message-Digest Algorithm of Text with Nonce used as the salt.\nReturns a 32-character hex string. (128-bit in binary.)</string> + </map> + <key>llMessageLinked</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Number</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sends Number, Text, and ID to members of the link set identified by LinkNumber.\nLinkNumber is either a linked number (available through llGetLinkNumber) or a LINK_* constant.</string> + </map> + <key>llMinEventDelay</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Delay</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set the minimum time between events being handled.</string> + </map> + <key>llModifyLand</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Action</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE or LAND_REVERT</string> + </map> + </map> + <map> + <key>Area</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>0, 1, 2 (2m x 2m, 4m x 4m, or 8m x 8m)</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Modify land with action (LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE, LAND_REVERT) on size (0, 1, 2, corresponding to 2m x 2m, 4m x 4m, 8m x 8m).</string> + </map> + <key>llModPow</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Power</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Modulus</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a Value raised to the Power, mod Modulus. ((a**b)%c) b is capped at 0xFFFF (16 bits).\nReturns (Value ^ Power) % Modulus. (Value raised to the Power, Modulus). Value is capped at 0xFFFF (16 bits).</string> + </map> + <key>llMoveToTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Target</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Tau</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Critically damp to Target in Tau seconds (if the script is physical).\nCritically damp to position target in tau-seconds if the script is physical. Good tau-values are greater than 0.2. A tau of 0.0 stops the critical damping.</string> + </map> + <key>llNavigateTo</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Location</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Region coordinates for the character to navigate to.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>List of parameters to control the type of path-finding used. Currently only FORCE_DIRECT_PATH supported.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Navigate to destination.\nDirects an object to travel to a defined position in the region or adjacent regions.</string> + </map> + <key>llOffsetTexture</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>OffsetS</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>OffsetT</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the texture S and T offsets for the chosen Face.\nIf Face is ALL_SIDES this function sets the texture offsets for all faces.</string> + </map> + <key>llOpenRemoteDataChannel</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Requests a channel to listen for XML-RPC calls. (Deprecated: XML-RPC should not be used. Use http-in instead.)\nWill trigger a remote_data event with type = REMOTE_DATA_CHANNEL and a channel ID (key) once it is available.\nThis channel ID must be referenced in the XML-RPC call to the script (from the internet) -- so the key must somehow get to the external XML-RPC client.</string> + </map> + <key>llOverMyLand</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns TRUE if id ID over land owned by the script owner, otherwise FALSE.\nReturns TRUE if key ID is over land owned by the object owner, FALSE otherwise.</string> + </map> + <key>llOwnerSay</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>says Text to owner only (if owner is in region).\nSays Text to the owner of the object running the script, if the owner has been within the object's simulator since logging into Second Life, regardless of where they may be in-world.</string> + </map> + <key>llParcelMediaCommandList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>2.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>CommandList</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>A list of PARCEL_MEDIA_COMMAND_* flags and their parameters </string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Controls the playback of multimedia resources on a parcel or for an agent, via one or more PARCEL_MEDIA_COMMAND_* arguments specified in CommandList.</string> + </map> + <key>llParcelMediaQuery</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>2.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>QueryList</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Queries the media properties of the parcel containing the script, via one or more PARCEL_MEDIA_COMMAND_* arguments specified in CommandList.\nThis function will only work if the script is contained within an object owned by the land-owner (or if the land is owned by a group, only if the object has been deeded to the group).</string> + </map> + <key>llParseString2List</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Separators</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Spacers</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Converts Text into a list, discarding Separators, keeping Spacers (Separators and Spacers must be lists of strings, maximum of 8 each).\nSeparators and Spacers are lists of strings with a maximum of 8 entries each.</string> + </map> + <key>llParseStringKeepNulls</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>list</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Separators</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Spacers</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Breaks Text into a list, discarding separators, keeping spacers, keeping any null values generated. (separators and spacers must be lists of strings, maximum of 8 each).\nllParseStringKeepNulls works almost exactly like llParseString2List, except that if a null is found it will add a null-string instead of discarding it like llParseString2List does.</string> + </map> + <key>llParticleSystem</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Creates a particle system in the prim the script is attached to, based on Parameters. An empty list removes a particle system from object.\nList format is [ rule-1, data-1, rule-2, data-2 ... rule-n, data-n ].</string> + </map> + <key>llPassCollisions</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Pass</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE, collisions are passed from children on to parents.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Configures how collision events are passed to scripts in the linkset.\nIf Pass == TRUE, collisions involving collision-handling scripted child prims are also passed on to the root prim. If Pass == FALSE (default behavior), such collisions will only trigger events in the affected child prim.</string> + </map> + <key>llPassTouches</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Pass</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE, touches are passed from children on to parents.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Configures how touch events are passed to scripts in the linkset.\nIf Pass == TRUE, touches involving touch-handling scripted child prims are also passed on to the root prim. If Pass == FALSE (default behavior), such touches will only trigger events in the affected child prim.</string> + </map> + <key>llPatrolPoints</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Points</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>A list of vectors for the character to travel through sequentially. The list must contain at least two entries.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>No options available at this time.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Patrol a list of points.\nSets the points for a character (llCreateCharacter) to patrol along.</string> + </map> + <key>llPlaySound</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Plays Sound once, at Volume (0.0 - 1.0) and attached to the object.\nOnly one sound may be attached to an object at a time, and attaching a new sound or calling llStopSound will stop the previously attached sound.\nA second call to llPlaySound with the same sound will not restart the sound, but the new volume will be used, which allows control over the volume of already playing sounds.\nTo restart the sound from the beginning, call llStopSound before calling llPlaySound again.</string> + </map> + <key>llPlaySoundSlave</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Plays attached Sound once, at Volume (0.0 - 1.0), synced to next loop of most audible sync master.\nBehaviour is identical to llPlaySound, unless there is a "Sync Master" present. If a Sync Master is already playing, the Slave sound will not be played until the Master hits its loop point and returns to the beginning.\nllPlaySoundSlave will play the sound exactly once; if it is desired to have the sound play every time the Master loops, either use llLoopSoundSlave with extra silence padded on the end of the sound or ensure that llPlaySoundSlave is called at least once per loop of the Master.</string> + </map> + <key>llPow</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Exponent</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the Value raised to the power Exponent, or returns 0 and triggers Math Error for imaginary results.\nReturns the Value raised to the Exponent.</string> + </map> + <key>llPreloadSound</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Causes nearby viewers to preload the Sound from the object's inventory.\nThis is intended to prevent delays in starting new sounds when called upon.</string> + </map> + <key>llPursue</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>TargetID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Agent or object to pursue.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Parameters for pursuit.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Chase after a target.\nCauses the character (llCharacter) to pursue the target defined by TargetID.</string> + </map> + <key>llPushObject</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ObjectID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Impulse</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>AngularImpulse</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Applies Impulse and AngularImpulse to ObjectID.\nApplies the supplied impulse and angular impulse to the object specified.</string> + </map> + <key>llRefreshPrimURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>20.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Reloads the web page shown on the sides of the object.</string> + </map> + <key>llRegionSay</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Any integer value except zero.</string> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Message to be transmitted.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Broadcasts Text to entire region on Channel (except for channel 0).</string> + </map> + <key>llRegionSayTo</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>TargetID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Avatar or object to say to.</string> + </map> + </map> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Output channel, any integer value.</string> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Message to be transmitted.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Says Text, on Channel, to avatar or object indicated by TargetID (if within region).\nIf TargetID is an avatar and Channel is nonzero, Text can be heard by any attachment on the avatar.</string> + </map> + <key>llReleaseCamera</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Return camera to agent.\nDeprecated: Use llClearCameraParams instead.</string> + </map> + <key>llReleaseControls</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Stop taking inputs.\nStop taking inputs from the avatar.</string> + </map> + <key>llReleaseURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>URL</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>URL to release.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Releases the specified URL, which was previously obtained using llRequestURL. Once released, the URL will no longer be usable.</string> + </map> + <key>llRemoteDataReply</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>3.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ChannelID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>MessageID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>sData</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>String data to send</string> + </map> + </map> + <map> + <key>iData</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Integer data to send</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Send an XML-RPC reply to MessageID on ChannelID with payload of string sData and integer iData. Deprecated: Use HTTP functions/events instead.\nThe size of sData is limited to 254 characters.</string> + </map> + <key>llRemoteDataSetRegion</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Deprecated: Use HTTP functions/events instead.\nIf an object using remote data channels changes regions, you must call this function to re-register the remote data channels.\nYou do not need to make this call if you don't change regions.</string> + </map> + <key>llRemoteLoadScriptPin</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>3.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ObjectID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Target prim to attempt copying into.</string> + </map> + </map> + <map> + <key>ScriptName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Name of the script in current inventory to copy.</string> + </map> + </map> + <map> + <key>PIN</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Integer set on target prim as a Personal Information Number code.</string> + </map> + </map> + <map> + <key>Running</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>If the script should be set running in the target prim.</string> + </map> + </map> + <map> + <key>StartParameter</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Integer. Parameter passed to the script if set to be running.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If the owner of the object containing this script can modify the object identified by the specified object key, and if the PIN matches the PIN previously set using llSetRemoteScriptAccessPin (on the target prim), then the script will be copied into target. Running is a boolean specifying whether the script should be enabled once copied into the target object.</string> + </map> + <key>llRemoveFromLandBanList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Remove avatar from the land ban list.\nRemove specified avatar from the land parcel ban list.</string> + </map> + <key>llRemoveFromLandPassList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Remove avatar from the land pass list.\nRemove specified avatar from the land parcel pass list.</string> + </map> + <key>llRemoveInventory</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Remove the named inventory item.\nRemove the named inventory item from the object inventory.</string> + </map> + <key>llRemoveVehicleFlags</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Vehiclelags</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Removes the enabled bits in 'flags'.\nSets the vehicle flags to FALSE. Valid parameters can be found in the vehicle flags constants section.</string> + </map> + <key>llRequestAgentData</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Data</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests data about AvatarID. When data is available the dataserver event will be raised.\nThis function requests data about an avatar. If and when the information is collected, the dataserver event is triggered with the key returned from this function passed in the requested parameter. See the agent data constants (DATA_*) for details about valid values of data and what each will return in the dataserver event.</string> + </map> + <key>llRequestDisplayName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Avatar UUID</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests the display name of the agent. When the display name is available the dataserver event will be raised.\nThe avatar identified does not need to be in the same region or online at the time of the request.\nReturns a key that is used to identify the dataserver event when it is raised.</string> + </map> + <key>llRequestInventoryData</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests data for the named InventoryItem.\nWhen data is available, the dataserver event will be raised with the key returned from this function in the requested parameter.\nThe only request currently implemented is to request data from landmarks, where the data returned is in the form "<float, float, float>" which can be cast to a vector. This position is in region local coordinates.</string> + </map> + <key>llRequestPermissions</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>PermissionMask</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Ask AvatarID to allow the script to perform certain actions, specified in the PermissionMask bitmask. PermissionMask should be one or more PERMISSION_* constants. Multiple permissions can be requested simultaneously by ORing the constants together. Many of the permissions requests can only go to object owner.\nThis call will not stop script execution. If the avatar grants the requested permissions, the run_time_permissions event will be called.</string> + </map> + <key>llRequestSecureURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Requests one HTTPS:// (SSL) URL for use by this object. The http_request event is triggered with results.\nReturns a key that is the handle used for identifying the request in the http_request event.</string> + </map> + <key>llRequestSimulatorData</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>RegionName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Data</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests the specified Data about RegionName. When the specified data is available, the dataserver event is raised.\nData should use one of the DATA_SIM_* constants.\nReturns a dataserver query ID and triggers the dataserver event when data is found.</string> + </map> + <key>llRequestURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Requests one HTTP:// URL for use by this script. The http_request event is triggered with the result of the request.\nReturns a key that is the handle used for identifying the result in the http_request event.</string> + </map> + <key>llRequestUsername</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests single-word user-name of an avatar. When data is available the dataserver event will be raised.\nRequests the user-name of the identified agent. When the user-name is available the dataserver event is raised.\nThe agent identified does not need to be in the same region or online at the time of the request.\nReturns a key that is used to identify the dataserver event when it is raised.</string> + </map> + <key>llResetAnimationOverride</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AnimationState</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Resets the animation of the specified animation state to the default value.\nIf animation state equals "ALL", then all animation states are reset.</string> + </map> + <key>llResetLandBanList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Removes all residents from the land ban list.</string> + </map> + <key>llResetLandPassList</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Removes all residents from the land access/pass list.</string> + </map> + <key>llResetOtherScript</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ScriptName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Resets the named script.</string> + </map> + <key>llResetScript</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Resets the script.</string> + </map> + <key>llResetTime</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Sets the time to zero.\nSets the internal timer to zero.</string> + </map> + <key>llReturnObjectsByID</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ObjectIDs</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>List of object UUIDs to be returned.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Return objects using their UUIDs.\nRequires the PERMISSION_RETURN_OBJECTS permission and that the script owner owns the parcel the returned objects are in, or is an estate manager or region owner.</string> + </map> + <key>llReturnObjectsByOwner</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Object owner's UUID.</string> + </map> + </map> + <map> + <key>Scope</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Return objects based upon their owner and a scope of parcel, parcel owner, or region.\nRequires the PERMISSION_RETURN_OBJECTS permission and that the script owner owns the parcel the returned objects are in, or is an estate manager or region owner.</string> + </map> + <key>llRezAtRoot</key> + <map> + <key>energy</key> + <real>200.0</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Velocity</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>StartParameter</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Instantiate owner's InventoryItem at Position with Velocity, Rotation and with StartParameter. The last selected root object's location will be set to Position.\nCreates object's inventory item at the given Position, with Velocity, Rotation, and StartParameter.</string> + </map> + <key>llRezObject</key> + <map> + <key>energy</key> + <real>200</real> + <key>sleep</key> + <real>0.1</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Velocity</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>StartParameter</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Instantiate owners InventoryItem at Position with Velocity, Rotation and with start StartParameter.\nCreates object's inventory item at Position with Velocity and Rotation supplied. The StartParameter value will be available to the newly created object in the on_rez event or through the llGetStartParameter function.\nThe Velocity parameter is ignored if the rezzed object is not physical.</string> + </map> + <key>llRot2Angle</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the rotation angle represented by Rotation.\nReturns the angle represented by the Rotation.</string> + </map> + <key>llRot2Axis</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the rotation axis represented by Rotation.\nReturns the axis represented by the Rotation.</string> + </map> + <key>llRot2Euler</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the Euler representation (roll, pitch, yaw) of Rotation.\nReturns the Euler Angle representation of the Rotation.</string> + </map> + <key>llRot2Fwd</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the forward vector defined by Rotation.\nReturns the forward axis represented by the Rotation.</string> + </map> + <key>llRot2Left</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the left vector defined by Rotation.\nReturns the left axis represented by the Rotation.</string> + </map> + <key>llRot2Up</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the up vector defined by Rotation.\nReturns the up axis represented by the Rotation.</string> + </map> + <key>llRotateTexture</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Radians</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the texture rotation for the specified Face to angle Radians.\nIf Face is ALL_SIDES, rotates the texture of all sides.</string> + </map> + <key>llRotBetween</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>rotation</string> + <key>arguments</key> + <array> + <map> + <key>Vector1</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Vector2</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the rotation to rotate Vector1 to Vector2.\nReturns the rotation needed to rotate Vector1 to Vector2.</string> + </map> + <key>llRotLookAt</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Strength</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Damping</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Cause object to rotate to Rotation, with a force function defined by Strength and Damping parameters. Good strength values are around half the mass of the object and good damping values are less than 1/10th of the strength.\nAsymmetrical shapes require smaller damping.\nA strength of 0.0 cancels the look at.</string> + </map> + <key>llRotTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>LeeWay</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set rotations with error of LeeWay radians as a rotational target, and return an ID for the rotational target.\nThe returned number is a handle that can be used in at_rot_target and llRotTargetRemove.</string> + </map> + <key>llRotTargetRemove</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Handle</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Removes rotational target number.\nRemove rotational target indicated by the handle.</string> + </map> + <key>llRound</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns Value rounded to the nearest integer.\nReturns the Value rounded to the nearest integer.</string> + </map> + <key>llSameGroup</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns TRUE if avatar ID is in the same region and has the same active group, otherwise FALSE.\nReturns TRUE if the object or agent identified is in the same simulator and has the same active group as this object. Otherwise, returns FALSE.</string> + </map> + <key>llSay</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Channel to use to say text on.</string> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Text to say.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Says Text on Channel.\nThis chat method has a range of 20m radius.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts.</string> + </map> + <key>llScaleByFactor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>ScalingFactor</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>The multiplier to be used with the prim sizes and their local positions.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Attempts to resize the entire object by ScalingFactor, maintaining the size-position ratios of the prims.\n\nResizing is subject to prim scale limits and linkability limits. This function can not resize the object if the linkset is physical, a pathfinding character, in a keyframed motion, or if resizing would cause the parcel to overflow.\nReturns a boolean (an integer) TRUE if it succeeds, FALSE if it fails.</string> + </map> + <key>llScaleTexture</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Horizontal</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Vertical</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the diffuse texture Horizontal and Vertical repeats on Face of the prim the script is attached to.\nIf Face == ALL_SIDES, all sides are set in one call.\nNegative values for horizontal and vertical will flip the texture.</string> + </map> + <key>llScriptDanger</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns TRUE if Position is over public land, sandbox land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts.\nReturns true if the position is over public land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts.</string> + </map> + <key>llScriptProfiler</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>State</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>PROFILE_NONE or PROFILE_SCRIPT_MEMORY flags to control the state.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Enables or disables script profiling options. Currently only supports PROFILE_SCRIPT_MEMORY (Mono only) and PROFILE_NONE.\nMay significantly reduce script performance.</string> + </map> + <key>llSendRemoteData</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>3.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>ChannelID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Destination</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Deprecated: use HTTP functions and events instead.\nSends an XML-RPC request to Destination through ChannelID with payload of ChannelID (in a string), integer Value and string Text.\nReturns a key that is the message_id for the resulting remote_data events.</string> + </map> + <key>llSensor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Name</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Object or avatar name.</string> + </map> + </map> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Object or avatar UUID.</string> + </map> + </map> + <map> + <key>Type</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Bit-field mask of AGENT, AGENT_BY_LEGACY_NAME, AGENT_BY_USERNAME, ACTIVE, PASSIVE, and/or SCRIPTED</string> + </map> + </map> + <map> + <key>Range</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Distance to scan. 0.0 - 96.0m.</string> + </map> + </map> + <map> + <key>Arc</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Angle, in radians, from the local x-axis of the prim to scan.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Performs a single scan for Name and ID with Type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within Range meters and Arc radians of forward vector.\nSpecifying a blank Name, 0 Type, or NULL_KEY ID will prevent filtering results based on that parameter. A range of 0.0 does not perform a scan.\nResults are returned in the sensor and no_sensor events.</string> + </map> + <key>llSensorRemove</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>removes sensor.\nRemoves the sensor set by llSensorRepeat.</string> + </map> + <key>llSensorRepeat</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Name</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Object or avatar name.</string> + </map> + </map> + <map> + <key>ID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>Object or avatar UUID.</string> + </map> + </map> + <map> + <key>Type</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Bit-field mask of AGENT, AGENT_BY_LEGACY_NAME, AGENT_BY_USERNAME, ACTIVE, PASSIVE, and/or SCRIPTED</string> + </map> + </map> + <map> + <key>Range</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Distance to scan. 0.0 - 96.0m.</string> + </map> + </map> + <map> + <key>Arc</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Angle, in radians, from the local x-axis of the prim to scan.</string> + </map> + </map> + <map> + <key>Rate</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Period, in seconds, between scans.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Initiates a periodic scan every Rate seconds, for Name and ID with Type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within Range meters and Arc radians of forward vector.\nSpecifying a blank Name, 0 Type, or NULL_KEY ID will prevent filtering results based on that parameter. A range of 0.0 does not perform a scan.\nResults are returned in the sensor and no_sensor events.</string> + </map> + <key>llSetAlpha</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Opacity</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the alpha (opacity) of Face.\nSets the alpha (opacity) value for Face. If Face is ALL_SIDES, sets the alpha for all faces. The alpha value is interpreted as an opacity percentage (1.0 is fully opaque, and 0.2 is mostly transparent). This function will clamp alpha values less than 0.1 to 0.1 and greater than 1.0 to 1.</string> + </map> + <key>llSetAngularVelocity</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AngVel</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>The angular velocity to set the object to.</string> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>If TRUE, the AngVel is treated as a local directional vector instead of a regional directional vector.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets an object's angular velocity to AngVel, in local coordinates if Local == TRUE (if the script is physical).\nHas no effect on non-physical objects.</string> + </map> + <key>llSetAnimationOverride</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AnimationState</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>AnimationName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the animation (in object inventory) that will play for the given animation state.\nTo use this function the script must obtain the PERMISSION_OVERRIDE_ANIMATIONS permission.</string> + </map> + <key>llSetBuoyancy</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Buoyancy</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set the tasks buoyancy (0 is none, < 1.0 sinks, 1.0 floats, > 1.0 rises).\nSet the object buoyancy. A value of 0 is none, less than 1.0 sinks, 1.0 floats, and greater than 1.0 rises.</string> + </map> + <key>llSetCameraAtOffset</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the camera used in this object, at offset, if an avatar sits on it.\nSets the offset that an avatar's camera will be moved to if the avatar sits on the object.</string> + </map> + <key>llSetCameraEyeOffset</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the camera eye offset used in this object if an avatar sits on it.</string> + </map> + <key>llSetCameraParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets multiple camera parameters at once. List format is [ rule-1, data-1, rule-2, data-2 . . . rule-n, data-n ].</string> + </map> + <key>llSetClickAction</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Action</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>A CLICK_ACTION_* flag</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the action performed when a prim is clicked upon.</string> + </map> + <key>llSetColor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Color</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the color, for the face.\nSets the color of the side specified. If Face is ALL_SIDES, sets the color on all faces.</string> + </map> + <key>llSetContentType</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>HTTPRequestID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>A valid http_request() key</string> + </map> + </map> + <map> + <key>ContentType</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Media type to use with any following llHTTPResponse(HTTPRequestID, ...)</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set the media type of an LSL HTTP server response to ContentType.\nHTTPRequestID must be a valid http_request ID. ContentType must be one of the CONTENT_TYPE_* constants.</string> + </map> + <key>llSetDamage</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Damage</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the amount of damage that will be done to an avatar that this task hits. Task will be killed.\nSets the amount of damage that will be done to an avatar that this object hits. This object will be destroyed on damaging an avatar, and no collision event is triggered.</string> + </map> + <key>llSetForce</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Force</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Directional force.</string> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE uses local axis, if FALSE uses region axis.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets Force on object, in object-local coordinates if Local == TRUE (otherwise, the region reference frame is used).\nOnly works on physical objects.</string> + </map> + <key>llSetForceAndTorque</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Force</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Directional force.</string> + </map> + </map> + <map> + <key>Torque</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Torque force.</string> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE uses local axis, if FALSE uses region axis.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the Force and Torque of object, in object-local coordinates if Local == TRUE (otherwise, the region reference frame is used).\nOnly works on physical objects.</string> + </map> + <key>llSetHoverHeight</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Height</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Distance above the ground.</string> + </map> + </map> + <map> + <key>Water</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE then hover above water too.</string> + </map> + </map> + <map> + <key>Tau</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Seconds to critically damp in.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Critically damps a physical object to a Height (either above ground level or above the higher of land and water if water == TRUE).\nDo not use with vehicles. Use llStopHover to stop hovering.</string> + </map> + <key>llSetInventoryPermMask</key> + <map> + <key>god-mode</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>InventoryItem</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>An item in the prim's inventory</string> + </map> + </map> + <map> + <key>PermissionFlag</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>MASK_* flag</string> + </map> + </map> + <map> + <key>PermissionMask</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Permission bit-field (PERM_* flags)</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the given permission mask to the new value on the inventory item.</string> + </map> + <key>llSetKeyframedMotion</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Keyframes</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Strided keyframe list of the form: position, orientation, time. Each keyframe is interpreted relative to the previous transform of the object.</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests that a non-physical object be key-framed according to key-frame list.\nSpecify a list of times, positions, and orientations to be followed by an object. The object will be smoothly moved between key-frames by the simulator. Collisions with other non-physical or key-framed objects will be ignored (no script events will fire and collision processing will not occur). Collisions with physical objects will be computed and reported, but the key-framed object will be unaffected by those collisions.\nKeyframes is a strided list containing positional, rotational, and time data for each step in the motion. Options is a list containing optional arguments and parameters (specified by KFM_* constants).</string> + </map> + <key>llSetLinkAlpha</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Opacity</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>If a prim exists in the link chain at LinkNumber, set Face to Opacity.\nSets the Face, on the linked prim specified, to the Opacity.</string> + </map> + <key>llSetLinkCamera</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Prim link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag</string> + </map> + </map> + <map> + <key>EyeOffset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Offset, relative to the object's centre and expressed in local coordinates, that the camera looks from.</string> + </map> + </map> + <map> + <key>LookOffset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Offset, relative to the object's centre and expressed in local coordinates, that the camera looks toward.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the camera eye offset, and the offset that camera is looking at, for avatars that sit on the linked prim.</string> + </map> + <key>llSetLinkColor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag.</string> + </map> + </map> + <map> + <key>Color</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Color in RGB <R.R, G.G, B.B></string> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Side number or ALL_SIDES.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If a task exists in the link chain at LinkNumber, set the Face to color.\nSets the color of the linked child's side, specified by LinkNumber.</string> + </map> + <key>llSetLinkMedia</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Link</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims).</string> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Face number.</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>A set of name/value pairs (in no particular order)</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set the media parameters for a particular face on linked prim, specified by Link. Returns an integer that is a STATUS_* flag which details the success/failure of the operation(s).\nMediaParameters is a set of name/value pairs in no particular order. Parameters not specified are unchanged, or if new media is added then set to the default specified.</string> + </map> + <key>llSetLinkPrimitiveParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set primitive parameters for LinkNumber based on Parameters.\nSets the parameters (or properties) of any linked prim in one step.</string> + </map> + <key>llSetLinkPrimitiveParamsFast</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag</string> + </map> + </map> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set primitive parameters for LinkNumber based on Parameters, without a delay.\nSet parameters for link number, from the list of Parameters, with no built-in script sleep. This function is identical to llSetLinkPrimitiveParams, except without the delay.</string> + </map> + <key>llSetLinkTexture</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Texture</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the Texture of Face on a linked prim, specified by LinkNumber. Texture may be a UUID or name of a texture in prim inventory.</string> + </map> + <key>llSetLinkTextureAnim</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>LinkNumber</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag to effect</string> + </map> + </map> + <map> + <key>Mode</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Bitmask of animation options.</string> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Specifies which object face to animate or ALL_SIDES.</string> + </map> + </map> + <map> + <key>SizeX</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Horizontal frames (ignored for ROTATE and SCALE).</string> + </map> + </map> + <map> + <key>SizeY</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Vertical frames (ignored for ROTATE and SCALE).</string> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Start position/frame number (or radians for ROTATE).</string> + </map> + </map> + <map> + <key>Length</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Specifies the animation duration, in frames (or radians for ROTATE).</string> + </map> + </map> + <map> + <key>Rate</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Specifies the animation playback rate, in frames per second (must be greater than zero).</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Animates a texture on the prim specified by LinkNumber, by setting the texture scale and offset.\nMode is a bitmask of animation options.\nFace specifies which object face to animate.\nSizeX and SizeY specify the number of horizontal and vertical frames.Start specifes the animation start point.\nLength specifies the animation duration.\nRate specifies the animation playback rate.</string> + </map> + <key>llSetLocalRot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the rotation of a child prim relative to the root prim.</string> + </map> + <key>llSetMemoryLimit</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Limit</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>The amount to reserve, which must be less than the allowed maximum (currently 64KB) and not already have been exceeded.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests Limit bytes to be reserved for this script.\nReturns TRUE or FALSE indicating whether the limit was set successfully.\nThis function has no effect if the script is running in the LSO VM.</string> + </map> + <key>llSetObjectDesc</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Description</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the description of the prim to Description.\nThe description field is limited to 127 characters.</string> + </map> + <key>llSetObjectName</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Name</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the prim's name to Name.</string> + </map> + <key>llSetObjectPermMask</key> + <map> + <key>god-mode</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>PermissionFlag</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>MASK_* flag</string> + </map> + </map> + <map> + <key>PermissionMask</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Permission bit-field (PERM_* flags)</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the specified PermissionFlag permission to the value specified by PermissionMask on the object the script is attached to.</string> + </map> + <key>llSetParcelMusicURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>2.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>URL</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the streaming audio URL for the parcel the object is on.\nThe object must be owned by the owner of the parcel; if the parcel is group owned the object must be owned by that group.</string> + </map> + <key>llSetPayPrice</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Price</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>The default price shown in the textu input field.</string> + </map> + </map> + <map> + <key>QuickButtons</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Specifies the 4 payment values shown in the payment dialog's buttons (or PAY_HIDE).</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the default amount when someone chooses to pay this object.\nPrice is the default price shown in the textu input field. QuickButtons specifies the 4 payment values shown in the payment dialog's buttons.\nInput field and buttons may be hidden with PAY_HIDE constant, and may be set to their default values using PAY_DEFAULT.</string> + </map> + <key>llSetPhysicsMaterial</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real/> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>MaterialBits</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>A bitmask specifying which of the parameters in the other arguments should be applied to the object.</string> + </map> + </map> + <map> + <key>GravityMultiplier</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Restitution</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Friction</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Density</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the selected parameters of the object's physics behavior.\nMaterialBits is a bitmask specifying which of the parameters in the other arguments should be applied to the object. GravityMultiplier, Restitution, Friction, and Density are the possible parameters to manipulate.</string> + </map> + <key>llSetPos</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Region coordinates to move to (within 10m).</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If the object is not physical, this function sets the position of the prim.\nIf the script is in a child prim, Position is treated as root relative and the link-set is adjusted.\nIf the prim is the root prim, the entire object is moved (up to 10m) to Position in region coordinates.</string> + </map> + <key>llSetPrimitiveParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Parameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>A list of changes.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>This function changes the many properties (or "parameters") of a prim in one operation. Parameters is a list of changes.</string> + </map> + <key>llSetPrimMediaParams</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Face number</string> + </map> + </map> + <map> + <key>MediaParameters</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>A set of name/value pairs (in no particular order)</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the MediaParameters for a particular Face on the prim. Returns an integer that is a STATUS_* flag which details the success/failure of the operation(s).\nMediaParameters is a set of name/value pairs in no particular order. Parameters not specified are unchanged, or if new media is added then set to the default specified.</string> + </map> + <key>llSetPrimURL</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>20.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>URL</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Deprecated: Use llSetPrimMediaParams instead.</string> + </map> + <key>llSetRegionPos</key> + <map> + <key>energy</key> + <real>0.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Vector. The location to move to, in region coordinates.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Attempts to move the object so that the root prim is within 0.1m of Position.\nReturns an integer boolean, TRUE if the object is successfully placed within 0.1 m of Position, FALSE otherwise.\nPosition may be any location within the region or up to 10m across a region border.\nIf the position is below ground, it will be set to the ground level at that x,y location.</string> + </map> + <key>llSetRemoteScriptAccessPin</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>PIN</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>If PIN is set to a non-zero number, the task will accept remote script loads via llRemoteLoadScriptPin() if it passes in the correct PIN. Othersise, llRemoteLoadScriptPin() is ignored.</string> + </map> + <key>llSetRot</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>If the object is not physical, this function sets the rotation of the prim.\nIf the script is in a child prim, Rotation is treated as root relative and the link-set is adjusted.\nIf the prim is the root prim, the entire object is rotated to Rotation in the global reference frame.</string> + </map> + <key>llSetScale</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Scale</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the prim's scale (size) to Scale.</string> + </map> + <key>llSetScriptState</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ScriptName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Running</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Enable or disable the script Running state of Script in the prim.</string> + </map> + <key>llSetSitText</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Displays Text rather than 'Sit' in the viewer's context menu.</string> + </map> + <key>llSetSoundQueueing</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>QueueEnable</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, sound queuing: TRUE enables, FALSE disables (default).</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets whether successive calls to llPlaySound, llLoopSound, etc., (attached sounds) interrupt the currently playing sound.\nThe default for objects is FALSE. Setting this value to TRUE will make the sound wait until the current playing sound reaches its end. The queue is one level deep.</string> + </map> + <key>llSetSoundRadius</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Radius</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Maximum distance that sounds can be heard.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Limits radius for audibility of scripted sounds (both attached and triggered) to distance Radius.</string> + </map> + <key>llSetStatus</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Status</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets object status specified in Status bitmask (e.g. STATUS_PHYSICS|STATUS_PHANTOM) to boolean Value.\nFor a full list of STATUS_* constants, see wiki documentation.</string> + </map> + <key>llSetText</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Color</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Opacity</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Causes Text to float above the prim, using the specified Color and Opacity.</string> + </map> + <key>llSetTexture</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.2</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Texture</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Applies Texture to Face of prim.\nTexture may be a UUID or name of a texture in prim inventory.\nIf Face is ALL_SIDES, set the texture on all faces.</string> + </map> + <key>llSetTextureAnim</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Mode</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Mask of Mode flags.</string> + </map> + </map> + <map> + <key>Face</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Face number or ALL_SIDES.</string> + </map> + </map> + <map> + <key>SizeX</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Horizontal frames (ignored for ROTATE and SCALE).</string> + </map> + </map> + <map> + <key>SizeY</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Vertical frames (ignored for ROTATE and SCALE).</string> + </map> + </map> + <map> + <key>Start</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Start position/frame number (or radians for ROTATE).</string> + </map> + </map> + <map> + <key>Length</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>number of frames to display (or radians for ROTATE).</string> + </map> + </map> + <map> + <key>Rate</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string>Frames per second (must not greater than zero).</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Animates a texture by setting the texture scale and offset.\nMode is a bitmask of animation options.\nFace specifies which object face to animate.\nSizeX and SizeY specify the number of horizontal and vertical frames.Start specifes the animation start point.\nLength specifies the animation duration.\nRate specifies the animation playback rate.</string> + </map> + <key>llSetTimerEvent</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Rate</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Causes the timer event to be triggered every Rate seconds.\n Passing in 0.0 stops further timer events.</string> + </map> + <key>llSetTorque</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Torque</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Torque force.</string> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, if TRUE uses local axis, if FALSE uses region axis.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets the Torque acting on the script's object, in object-local coordinates if Local == TRUE (otherwise, the region reference frame is used).\nOnly works on physical objects.</string> + </map> + <key>llSetTouchText</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Displays Text in the viewer context menu that acts on a touch.</string> + </map> + <key>llSetVehicleFlags</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Flags</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Enables the vehicle flags specified in the Flags bitmask.\nValid parameters can be found in the wiki documentation.</string> + </map> + <key>llSetVehicleFloatParam</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ParameterName</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ParameterValue</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets a vehicle float parameter.\nValid parameters can be found in the wiki documentation.</string> + </map> + <key>llSetVehicleRotationParam</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ParameterName</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ParameterValue</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets a vehicle rotation parameter.\nValid parameters can be found in the wiki documentation.</string> + </map> + <key>llSetVehicleType</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Type</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Activates the vehicle action on the object with vehicle preset Type.\nValid Types and an explanation of their characteristics can be found in wiki documentation.</string> + </map> + <key>llSetVehicleVectorParam</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>ParameterName</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>ParameterValue</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Sets a vehicle vector parameter.\nValid parameters can be found in the wiki documentation.</string> + </map> + <key>llSetVelocity</key> + <map> + <key>energy</key> + <real/> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Velocity</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>The velocity to apply.</string> + </map> + </map> + <map> + <key>Local</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>If TRUE, the Velocity is treated as a local directional vector instead of a regional directional vector.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If the object is physics-enabled, sets the object's linear velocity to Velocity.\nIf Local==TRUE, Velocity is treated as a local directional vector; otherwise, Velocity is treated as a global directional vector.</string> + </map> + <key>llSHA1String</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string of 40 hex characters that is the SHA1 security Hash of Text.</string> + </map> + <key>llShout</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Shouts Text on Channel.\nThis chat method has a range of 100m radius.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts.</string> + </map> + <key>llSin</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Theta</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the sine of Theta (Theta in radians).</string> + </map> + <key>llSitTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Rotation</key> + <map> + <key>type</key> + <string>rotation</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Set the sit location for this object. If offset == ZERO_VECTOR, clears the sit target.</string> + </map> + <key>llSleep</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Time</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Put script to sleep for Time seconds.</string> + </map> + <key>llSound</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Queue</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Loop</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Deprecated: Use llPlaySound instead.\nPlays Sound at Volume and specifies whether the sound should loop and/or be enqueued.</string> + </map> + <key>llSoundPreload</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Deprecated: Use llPreloadSound instead.\nPreloads a sound on viewers within range.</string> + </map> + <key>llSqrt</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Value</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the square root of Value.\nTriggers a math runtime error for imaginary results (if Value < 0.0).</string> + </map> + <key>llStartAnimation</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Animation</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This function plays the specified animation from playing on the avatar who received the script's most recent permissions request.\nAnimation may be an animation in task inventory or a built-in animation.\nRequires PERMISSION_TRIGGER_ANIMATION.</string> + </map> + <key>llStopAnimation</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Animation</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This function stops the specified animation on the avatar who received the script's most recent permissions request.\nAnimation may be an animation in task inventory, a built-in animation, or the uuid of an animation.\nRequires PERMISSION_TRIGGER_ANIMATION.</string> + </map> + <key>llStopHover</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Stop hovering to a height (due to llSetHoverHeight()).</string> + </map> + <key>llStopLookAt</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Stop causing object to point at a target (due to llLookAt() or llRotLookAt()).</string> + </map> + <key>llStopMoveToTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Stops critically damped motion (due to llMoveToTarget()).</string> + </map> + <key>llStopSound</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Stops playback of the currently attached sound.</string> + </map> + <key>llStringLength</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns an integer that is the number of characters in Text (not counting the null).</string> + </map> + <key>llStringToBase64</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the string Base64 representation of the input string.</string> + </map> + <key>llStringTrim</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>String to trim</string> + </map> + </map> + <map> + <key>TrimType</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>STRING_TRIM_HEAD, STRING_TRIM_TAIL, or STRING_TRIM.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Outputs a string, eliminating white-space from the start and/or end of the input string Text.\nValid options for TrimType:\nSTRING_TRIM_HEAD: trim all leading spaces in Text\nSTRING_TRIM_TAIL: trim all trailing spaces in Text\nSTRING_TRIM: trim all leading and trailing spaces in Text.</string> + </map> + <key>llSubStringIndex</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Sequence</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns an integer that is the index in Text where string pattern Sequence first appears. Returns -1 if not found.</string> + </map> + <key>llTakeCamera</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Deprecated: Use llSetCameraParams instead.</string> + </map> + <key>llTakeControls</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Controls</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Bit-field of CONTROL_* flags.</string> + </map> + </map> + <map> + <key>Accept</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, determines whether control events are generated.</string> + </map> + </map> + <map> + <key>PassOn</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>Boolean, determines whether controls are disabled.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Take controls from the agent the script has permissions for.\nIf (Accept == (Controls & input)), send input to the script. PassOn determines whether Controls also perform their normal functions.\nRequires the PERMISSION_TAKE_CONTROLS permission to run.</string> + </map> + <key>llTan</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Theta</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the tangent of Theta (Theta in radians).</string> + </map> + <key>llTarget</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>integer</string> + <key>arguments</key> + <array> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Range</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>This function is to have the script know when it has reached a position.\nIt registers a Position with a Range that triggers at_target and not_at_target events continuously until unregistered.</string> + </map> + <key>llTargetOmega</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Axis</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>SpinRate</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Gain</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Attempt to spin at SpinRate with strength Gain on Axis.\nA spin rate of 0.0 cancels the spin. This function always works in object-local coordinates.</string> + </map> + <key>llTargetRemove</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Target</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Removes positional target Handle registered with llTarget.</string> + </map> + <key>llTeleportAgent</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>UUID of avatar.</string> + </map> + </map> + <map> + <key>LandmarkName</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string>Name of landmark (in object contents), or empty string, to use.</string> + </map> + </map> + <map> + <key>Position</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>If no landmark was provided, the position within the current region to teleport the avatar to.</string> + </map> + </map> + <map> + <key>LookAtPoint</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>The position within the target region that the avatar should be turned to face upon arrival.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Requests a teleport of avatar to a landmark stored in the object's inventory. If no landmark is provided (an empty string), the avatar is teleported to the location position in the current region. In either case, the avatar is turned to face the position given by look_at in local coordinates.\nRequires the PERMISSION_TELEPORT permission. This function can only teleport the owner of the object.</string> + </map> + <key>llTeleportAgentGlobalCoords</key> + <map> + <key>energy</key> + <real>0</real> + <key>sleep</key> + <real>0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string>UUID of avatar.</string> + </map> + </map> + <map> + <key>GlobalPosition</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Global coordinates of the destination region. Can be retrieved by using llRequestSimulatorData(region_name, DATA_SIM_POS).</string> + </map> + </map> + <map> + <key>RegionPosition</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>The position within the target region to teleport the avatar to, if no landmark was provided.</string> + </map> + </map> + <map> + <key>LookAtPoint</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>The position within the target region that the avatar should be turned to face upon arrival.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Teleports an agent to the RegionPosition local coordinates within a region which is specified by the GlobalPosition global coordinates. The agent lands facing the position defined by LookAtPoint local coordinates.\nRequires the PERMISSION_TELEPORT permission. This function can only teleport the owner of the object.</string> + </map> + <key>llTeleportAgentHome</key> + <map> + <key>energy</key> + <real>100.0</real> + <key>sleep</key> + <real>5.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Teleport agent over the owner's land to agent's home location.</string> + </map> + <key>llTextBox</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>1.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Opens a dialog for the specified avatar with message Text, which contains a text box for input. Any text that is entered is said on the specified Channel (as if by the avatar) when the "OK" button is clicked.</string> + </map> + <key>llToLower</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string that is Text with all lower-case characters.</string> + </map> + <key>llToUpper</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns a string that is Text with all upper-case characters.</string> + </map> + <key>llTransferLindenDollars</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>key</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Amount</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Transfer Amount of linden dollars (L$) from script owner to AvatarID. Returns a key to a corresponding transaction_result event for the success of the transfer.\nAttempts to send the amount of money to the specified avatar, and trigger a transaction_result event identified by the returned key.</string> + </map> + <key>llTriggerSound</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Plays Sound at Volume (0.0 - 1.0), centered at but not attached to object.\nThere is no limit to the number of triggered sounds which can be generated by an object, and calling llTriggerSound does not affect the attached sounds created by llPlaySound and llLoopSound. This is very useful for things like collision noises, explosions, etc. There is no way to stop or alter the volume of a sound triggered by this function.</string> + </map> + <key>llTriggerSoundLimited</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Sound</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Volume</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>TNE</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>BSW</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Plays Sound at Volume (0.0 - 1.0), centered at but not attached to object, limited to axis-aligned bounding box defined by vectors top-north-east (TNE) and bottom-south-west (BSW).\nThere is no limit to the number of triggered sounds which can be generated by an object, and calling llTriggerSound does not affect the attached sounds created by llPlaySound and llLoopSound. This is very useful for things like collision noises, explosions, etc. There is no way to stop or alter the volume of a sound triggered by this function.</string> + </map> + <key>llUnescapeURL</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>URL</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the string that is the URL unescaped, replacing "%20" with spaces, etc., version of URL.\nThis function can output raw UTF-8 strings.</string> + </map> + <key>llUnSit</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>AvatarID</key> + <map> + <key>type</key> + <string>key</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>If agent identified by AvatarID is sitting on the object the script is attached to or is over land owned by the objects owner, the agent is forced to stand up.</string> + </map> + <key>llUpdateCharacter</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>Character configuration options. Takes the same constants as llCreateCharacter().</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Updates settings for a pathfinding character.</string> + </map> + <key>llVecDist</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Location1</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Location2</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the distance between Location1 and Location2.</string> + </map> + <key>llVecMag</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Vector</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the magnitude of the vector.</string> + </map> + <key>llVecNorm</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Vector</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns normalized vector.</string> + </map> + <key>llVolumeDetect</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>DetectEnabled</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string>TRUE enables, FALSE disables.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>If DetectEnabled = TRUE, object becomes phantom but triggers collision_start and collision_end events when other objects start and stop interpenetrating.\nIf another object (including avatars) interpenetrates it, it will get a collision_start event.\nWhen an object stops interpenetrating, a collision_end event is generated. While the other is inter-penetrating, collision events are NOT generated.</string> + </map> + <key>llWanderWithin</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Origin</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Central point to wander about.</string> + </map> + </map> + <map> + <key>Area</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string>Half-extents of an area the character may wander within. (i.e., it can wander from the specified origin by up to +/-Distance.x in x, +/-Distance.y in y, etc.)</string> + </map> + </map> + <map> + <key>Options</key> + <map> + <key>type</key> + <string>list</string> + <key>tooltip</key> + <string>No options available at this time.</string> + </map> + </map> + </array> + <key>tooltip</key> + <string>Wander within a specified volume.\nSets a character to wander about a central spot within a specified area.</string> + </map> + <key>llWater</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the water height below the object position + Offset.</string> + </map> + <key>llWhisper</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>void</string> + <key>arguments</key> + <array> + <map> + <key>Channel</key> + <map> + <key>type</key> + <string>integer</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Whispers Text on Channel.\nThis chat method has a range of 10m radius.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts.</string> + </map> + <key>llWind</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>vector</string> + <key>arguments</key> + <array> + <map> + <key>Offset</key> + <map> + <key>type</key> + <string>vector</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Returns the wind velocity at the object position + Offset.</string> + </map> + <key>llXorBase64</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text1</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text2</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Performs an exclusive OR on two Base64 strings and returns a Base64 string. Text2 repeats if it is shorter than Text1.</string> + </map> + <key>llXorBase64Strings</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.3</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text1</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text2</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Deprecated: Please use llXorBase64 instead.\nIncorrectly performs an exclusive OR on two Base64 strings and returns a Base64 string. Text2 repeats if it is shorter than Text1.\nRetained for backwards compatibility.</string> + </map> + <key>llXorBase64StringsCorrect</key> + <map> + <key>deprecated</key> + <boolean>true</boolean> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>string</string> + <key>arguments</key> + <array> + <map> + <key>Text1</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + <map> + <key>Text2</key> + <map> + <key>type</key> + <string>string</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Deprecated: Please use llXorBase64 instead.\nCorrectly (unless nulls are present) performs an exclusive OR on two Base64 strings and returns a Base64 string.\nText2 repeats if it is shorter than Text1.</string> + </map> + <key>llGetMinScaleFactor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the smallest multiplicative uniform scale factor that can be successfully applied (via llScaleByFactor()) to the object without violating prim size or linkability rules.</string> + </map> + <key>llGetMaxScaleFactor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <undef/> + <key>tooltip</key> + <string>Returns the largest multiplicative uniform scale factor that can be successfully applied (via llScaleByFactor()) to the object without violating prim size or linkability rules.</string> + </map> + <key>llScaleByFactor</key> + <map> + <key>energy</key> + <real>10.0</real> + <key>sleep</key> + <real>0.0</real> + <key>return</key> + <string>float</string> + <key>arguments</key> + <array> + <map> + <key>Factor</key> + <map> + <key>type</key> + <string>float</string> + <key>tooltip</key> + <string/> + </map> + </map> + </array> + <key>tooltip</key> + <string>Tries to uniformly scale the object by a multiplicative factor. Returns TRUE on success or FALSE on failure.</string> + </map> + </map> + <key>llsd-lsl-syntax-version</key> + <integer>2</integer> + </map> +</llsd> diff --git a/indra/newview/app_settings/llsd-lsl-syntax.rng b/indra/newview/app_settings/llsd-lsl-syntax.rng new file mode 100755 index 0000000000..aa92364ec1 --- /dev/null +++ b/indra/newview/app_settings/llsd-lsl-syntax.rng @@ -0,0 +1,390 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grammar + xmlns="http://relaxng.org/ns/structure/1.0" + xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> + <start> + <element name="llsd"> + <element name="map"> + <group> + <element name="key"> + <value>constants</value> + </element> + <element name="map"> + <oneOrMore> + <group> + <ref name="keyString"/> + <element name="map"> + <ref name="Deprecated" /> + <ref name="constantTypeValue" /> + <ref name="Tooltip" /> + </element> + </group> + </oneOrMore> + </element> + </group> + + <group> + <element name="key"> + <value>controls</value> + </element> + <element name="map"> + <oneOrMore> + <group> + <ref name="keyString"/> + <ref name="mapTooltip"/> + </group> + </oneOrMore> + </element> + </group> + + <group> + <element name="key"> + <value>events</value> + </element> + <element name="map"> + <oneOrMore> + <group> + <ref name="keyString"/> + <element name="map"> + <ref name="Deprecated" /> + <ref name="Arguments"/> + <ref name="Tooltip"/> + </element> + </group> + </oneOrMore> + </element> + </group> + + <group> + <element name="key"> + <value>functions</value> + </element> + <element name="map"> + <oneOrMore> + <group> + <ref name="keyString"/> + <element name="map"> + <ref name="Arguments"/> + <ref name="Deprecated" /> + <element name="key"> + <value>energy</value> + </element> + <ref name="float"/> + <optional> + <group> + <element name="key"> + <value>god-mode</value> + </element> + <element name="boolean"> + <data type="boolean"/> + </element> + </group> + </optional> + <ref name="Return"/> + <element name="key"> + <value>sleep</value> + </element> + <ref name="float"/> + <ref name="Tooltip"/> + </element> + </group> + </oneOrMore> + </element> + </group> + + <group> + <element name="key"> + <value>llsd-lsl-syntax-version</value> + </element> + <element name="integer"> + <data type="integer" /> + </element> + </group> + + <group> + <element name="key"> + <value>types</value> + </element> + <element name="map"> + <oneOrMore> + <group> + <ref name="keyString"/> + <ref name="mapTooltip"/> + </group> + </oneOrMore> + </element> + </group> + </element> + </element> + </start> + + <define name="Deprecated"> + <optional> + <group> + <element name="key"> + <value>deprecated</value> + </element> + <element name="boolean"> + <data type="boolean"/> + </element> + </group> + </optional> + </define> + + <define name="keyName"> + <element name="key"><value>name</value></element> + <element name="string"><data type="string" /></element> + </define> + + + <define name="keyString"> + <element name="key"><data type="string"/></element> + </define> + + <define name="keyType"> + <element name="key"><value>type</value></element> + </define> + + <define name="typeList"> + <ref name="keyType" /> + <element name="string"> + <choice> + <value>float</value> + <value>integer</value> + <value>key</value> + <value>list</value> + <value>rotation</value> + <value>string</value> + <value>vector</value> + </choice> + </element> + </define> + + <define name="keyValue"> + <element name="key"><value>value</value></element> + </define> + + <define name="constantTypeValue"> + <choice> + <group> + <ref name="keyType"/> + <element name="string"><value>float</value></element> + <ref name="keyValue"/> + <element name="real"><data type="float"/></element> + </group> + <group> + <ref name="keyType"/> + <element name="string"><value>integer</value></element> + <ref name="keyValue"/> + <choice> + <element name="integer"><data type="integer"/></element> + <element name="integer"><data type="string"><param name="pattern">0x[0-9A-Fa-f]+</param></data></element> + </choice> + </group> + <group> + <ref name="keyType"/> + <element name="string"><value>key</value></element> + <ref name="keyValue"/> + <element name="uuid"><data type="string"><param name="pattern">[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}</param></data></element> + </group> + <group> + <ref name="keyType"/> + <element name="string"><value>rotation</value></element> + <ref name="keyValue"/> + <element name="array"> + <element name="map"> + <element name="key"> + <value>x</value> + </element> + <ref name="realFromMinusOneToOne"/> + </element> + <element name="map"> + <element name="key"> + <value>y</value> + </element> + <ref name="realFromMinusOneToOne"/> + </element> + <element name="map"> + <element name="key"> + <value>z</value> + </element> + <ref name="realFromMinusOneToOne"/> + </element> + <element name="map"> + <element name="key"><value>w</value></element> + <ref name="realFromMinusOneToOne"/> + </element> + </element> + </group> + <group> + <ref name="keyType"/> + <element name="string"><value>string</value></element> + <ref name="keyValue"/> + <element name="string"> + <data type="string"/> + </element> + </group> + <group> + <ref name="keyType"/> + <element name="string"> + <value>vector</value> + </element> + <ref name="keyValue"/> + <element name="array"> + <ref name="vector"/> + </element> + </group> + </choice> + </define> + + <define name="nameType"> + <ref name="keyName" /> + <ref name="keyType" /> + </define> + + <define name="realFromMinusOneToOne"> + <element name="real"> + <data type="float"> + <param name="pattern">([\-+]|)(1|0)\.\d+</param> + </data> + </element> + </define> + + <define name="float"> + <choice> + <element name="real"> + <data type="float"/> + </element> + <element name="real"> + <empty/> + </element> + </choice> + </define> + + <define name="vector"> + <element name="map"> + <element name="key"> + <value>x</value> + </element> + <ref name="realFromMinusOneToOne"/> + </element> + <element name="map"> + <element name="key"> + <value>y</value> + </element> + <ref name="realFromMinusOneToOne"/> + </element> + <element name="map"> + <element name="key"> + <value>z</value> + </element> + <ref name="realFromMinusOneToOne"/> + </element> + </define> + + <define name="mapTooltip"> + <element name="map"> + <ref name="Tooltip" /> + </element> + </define> + + <define name="Tooltip"> + <element name="key"> + <value>tooltip</value> + </element> + <element name="string"> + <data type="string" /> + </element> + </define> + + <define name="Arguments"> + <element name="key"><value>arguments</value></element> + <choice> + <element name="array"> + <oneOrMore> + <element name="map"> + <element name="key"><data type="string"><param name="pattern">[A-Z][A-Za-z0-9_]*|[a-z]</param></data></element> + <element name="map"> + <!--ref name="keyName" /--> + <ref name="Tooltip" /> + <ref name="typeList" /> + </element> + </element> + </oneOrMore> + <!--choice> + <oneOrMore> + <element name="map"> + <ref name="Argument"/> + </element> + </oneOrMore> + <element name="undef"> + <empty/> + </element> + </choice--> + </element> + <element name="undef"><empty/></element> + </choice> + </define> + + <define name="Argument"> + <ref name="keyType"/> + <choice> + <element name="string"> + <value>float</value> + </element> + <element name="string"> + <value>integer</value> + </element> + <element name="string"> + <value>key</value> + </element> + <element name="string"> + <value>list</value> + </element> + <element name="string"> + <value>rotation</value> + </element> + <element name="string"> + <value>string</value> + </element> + <element name="string"> + <value>vector</value> + </element> + </choice> + <ref name="Tooltip"/> + </define> + + <define name="Return"> + <element name="key"> + <value>return</value> + </element> + <choice> + <element name="string"> + <value>float</value> + </element> + <element name="string"> + <value>integer</value> + </element> + <element name="string"> + <value>key</value> + </element> + <element name="string"> + <value>list</value> + </element> + <element name="string"> + <value>rotation</value> + </element> + <element name="string"> + <value>string</value> + </element> + <element name="string"> + <value>vector</value> + </element> + <element name="string"> + <value>void</value> + </element> + </choice> + </define> + +</grammar>
\ No newline at end of file diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f4bc092fce..99158d1c71 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3554,17 +3554,6 @@ <key>Value</key> <string>http://events.secondlife.com/viewer/embed/event/</string> </map> - <key>EveryoneCopy</key> - <map> - <key>Comment</key> - <string>Everyone can copy the newly created objects</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>FastCacheFetchEnabled</key> <map> <key>Comment</key> @@ -6503,39 +6492,6 @@ <key>Value</key> <real>2.0</real> </map> - <key>NextOwnerCopy</key> - <map> - <key>Comment</key> - <string>Newly created objects can be copied by next owner</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> - <key>NextOwnerModify</key> - <map> - <key>Comment</key> - <string>Newly created objects can be modified by next owner</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> - <key>NextOwnerTransfer</key> - <map> - <key>Comment</key> - <string>Newly created objects can be resold or given away by next owner</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>NewCacheLocation</key> <map> <key>Comment</key> @@ -9016,7 +8972,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>384</real> + <real>368.0</real> </map> <key>RenderDeferred</key> @@ -10539,17 +10495,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShareWithGroup</key> - <map> - <key>Comment</key> - <string>Newly created objects are shared with the currently active group</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>ShowAdvancedGraphicsSettings</key> <map> <key>Comment</key> @@ -11518,6 +11463,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>SnapshotFiltersEnabled</key> + <map> + <key>Comment</key> + <string>Enable filters in the Snapshot Advanced panel (experimental).</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>SnapshotFormat</key> <map> <key>Comment</key> @@ -13336,7 +13292,7 @@ <key>SocialPhotoResolution</key> <map> <key>Comment</key> - <string>Default resolution when sharing photo using the social floater</string> + <string>Default resolution when sharing photo using the social floaters</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -14757,6 +14713,347 @@ <key>Value</key> <integer>0</integer> </map> + <key>ObjectsNextOwnerCopy</key> + <map> + <key>Comment</key> + <string>Newly created objects can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ObjectsNextOwnerModify</key> + <map> + <key>Comment</key> + <string>Newly created objects can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ObjectsNextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>Newly created objects can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ObjectsEveryoneCopy</key> + <map> + <key>Comment</key> + <string>Everyone can copy the newly created object</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ObjectsShareWithGroup</key> + <map> + <key>Comment</key> + <string>Newly created objects are shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>UploadsNextOwnerCopy</key> + <map> + <key>Comment</key> + <string>Newly uploaded items can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>UploadsNextOwnerModify</key> + <map> + <key>Comment</key> + <string>Newly uploaded items can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>UploadsNextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>Newly uploaded items can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>UploadsEveryoneCopy</key> + <map> + <key>Comment</key> + <string>Everyone can copy the newly uploaded item</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>UploadsShareWithGroup</key> + <map> + <key>Comment</key> + <string>Newly uploaded items are shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ScriptsNextOwnerCopy</key> + <map> + <key>Comment</key> + <string>Newly created scripts can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ScriptsNextOwnerModify</key> + <map> + <key>Comment</key> + <string>Newly created scripts can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ScriptsNextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>Newly created scripts can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ScriptsEveryoneCopy</key> + <map> + <key>Comment</key> + <string>Everyone can copy the newly created script</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ScriptsShareWithGroup</key> + <map> + <key>Comment</key> + <string>Newly created scripts are shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>NotecardsNextOwnerCopy</key> + <map> + <key>Comment</key> + <string>Newly created notecards can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>NotecardsNextOwnerModify</key> + <map> + <key>Comment</key> + <string>Newly created notecards can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>NotecardsNextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>Newly created notecards can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>NotecardsEveryoneCopy</key> + <map> + <key>Comment</key> + <string>Everyone can copy the newly created notecard</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>NotecardsShareWithGroup</key> + <map> + <key>Comment</key> + <string>Newly created notecards are shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>GesturesNextOwnerCopy</key> + <map> + <key>Comment</key> + <string>Newly created gestures can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>GesturesNextOwnerModify</key> + <map> + <key>Comment</key> + <string>Newly created gestures can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>GesturesNextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>Newly created gestures can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>GesturesEveryoneCopy</key> + <map> + <key>Comment</key> + <string>Everyone can copy the newly created gesture</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>GesturesShareWithGroup</key> + <map> + <key>Comment</key> + <string>Newly created gestures are shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>WearablesNextOwnerCopy</key> + <map> + <key>Comment</key> + <string>Newly created clothing or body part can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>WearablesNextOwnerModify</key> + <map> + <key>Comment</key> + <string>Newly created clothing or body part can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>WearablesNextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>Newly created clothing or body part can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>WearablesEveryoneCopy</key> + <map> + <key>Comment</key> + <string>Everyone can copy the newly created clothing or body part</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>WearablesShareWithGroup</key> + <map> + <key>Comment</key> + <string>Newly created clothing or body part is shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>DefaultUploadPermissionsConverted</key> + <map> + <key>Comment</key> + <string>Default upload permissions have been converted to default creation permissions</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>PathfindingRetrieveNeighboringRegion</key> <map> <key>Comment</key> @@ -15154,6 +15451,62 @@ <key>Value</key> <string /> </map> + <key>EveryoneCopy</key> + <map> + <key>Comment</key> + <string>(obsolete) Everyone can copy the newly created objects</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>NextOwnerCopy</key> + <map> + <key>Comment</key> + <string>(obsolete) Newly created objects can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>NextOwnerModify</key> + <map> + <key>Comment</key> + <string>(obsolete) Newly created objects can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>NextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>(obsolete) Newly created objects can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ShareWithGroup</key> + <map> + <key>Comment</key> + <string>(obsolete) Newly created objects are shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + </map> </llsd> diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml index 86f9912815..d61aee9a14 100755 --- a/indra/newview/app_settings/toolbars.xml +++ b/indra/newview/app_settings/toolbars.xml @@ -6,7 +6,6 @@ <command name="speak"/> <command name="destinations"/> <command name="people"/> - <command name="social"/> <command name="profile"/> <command name="move"/> <command name="view"/> @@ -22,5 +21,6 @@ <command name="voice"/> <command name="minimap"/> <command name="snapshot"/> + <command name="facebook"/> </left_toolbar> </toolbars> diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index ad5ab22640..65581a6781 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -117,11 +117,14 @@ Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation !include "FileFunc.nsh" ; For GetParameters, GetOptions
!insertmacro GetParameters
!insertmacro GetOptions
+!include WinVer.nsh ; For OS and SP detection
+!include x64.nsh ; For 64bit OS detection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; After install completes, launch app
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInstSuccess
+Call CheckWindowsServPack ; Warn if not on the latest SP before asking to launch.
Push $R0 # Option value, unused
StrCmp $SKIP_AUTORUN "true" +2;
# Assumes SetOutPath $INSTDIR
@@ -138,26 +141,67 @@ Function dirPre FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Make sure we're not on Windows 98 / ME
+; Make sure this computer meets the minimum system requirements.
+; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckWindowsVersion
- DetailPrint "Checking Windows version..."
- Call GetWindowsVersion
- Pop $R0
- ; Just get first two characters, ignore 4.0 part of "NT 4.0"
- StrCpy $R0 $R0 2
- ; Blacklist certain OS versions
- StrCmp $R0 "95" win_ver_bad
- StrCmp $R0 "98" win_ver_bad
- StrCmp $R0 "ME" win_ver_bad
- StrCmp $R0 "NT" win_ver_bad
- Return
-win_ver_bad:
- StrCmp $SKIP_DIALOGS "true" +2 ; If skip_dialogs is set just install
- MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort
- Return
-win_ver_abort:
- Quit
+ ${If} ${AtMostWin2000}
+ MessageBox MB_OK $(CheckWindowsVersionMB)
+ Quit
+ ${EndIf}
+
+ ${If} ${IsWinXP}
+ ${AndIfNot} ${RunningX64}
+ ${AndIfNot} ${IsServicePack} 3
+ MessageBox MB_OK $(CheckWindowsVersionMB)
+ Quit
+ ${EndIf}
+
+ ${If} ${IsWinXP}
+ ${AndIf} ${RunningX64}
+ ${AndIfNot} ${IsServicePack} 2
+ MessageBox MB_OK $(CheckWindowsVersionMB)
+ Quit
+ ${EndIf}
+
+ ${If} ${IsWin2003}
+ ${AndIfNot} ${IsServicePack} 2
+ MessageBox MB_OK $(CheckWindowsVersionMB)
+ Quit
+ ${EndIf}
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;Recommend Upgrading Service Pack
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function CheckWindowsServPack
+ ${If} ${IsWinVista}
+ ${AndIfNot} ${IsServicePack} 2
+ MessageBox MB_OK $(CheckWindowsServPackMB)
+ DetailPrint $(UseLatestServPackDP)
+ Return
+ ${EndIf}
+
+ ${If} ${IsWin2008}
+ ${AndIfNot} ${IsServicePack} 2
+ MessageBox MB_OK $(CheckWindowsServPackMB)
+ DetailPrint $(UseLatestServPackDP)
+ Return
+ ${EndIf}
+
+ ${If} ${IsWin7}
+ ${AndIfNot} ${IsServicePack} 1
+ MessageBox MB_OK $(CheckWindowsServPackMB)
+ DetailPrint $(UseLatestServPackDP)
+ Return
+ ${EndIf}
+
+ ${If} ${IsWin2008R2}
+ ${AndIfNot} ${IsServicePack} 1
+ MessageBox MB_OK $(CheckWindowsServPackMB)
+ DetailPrint $(UseLatestServPackDP)
+ Return
+ ${EndIf}
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -208,17 +252,13 @@ FunctionEnd ; Checks for CPU valid (must have SSE2 support)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function CheckCPUFlags
- Call GetWindowsVersion
- Pop $R0
- StrCmp $R0 "2000" OK_SSE ; sse check not available on win2k.
-
Push $1
System::Call 'kernel32::IsProcessorFeaturePresent(i) i(10) .r1'
- IntCmp $1 1 OK_SSE
- MessageBox MB_OKCANCEL $(MissingSSE2) /SD IDOK IDOK OK_SSE
+ IntCmp $1 1 OK_SSE2
+ MessageBox MB_OKCANCEL $(MissingSSE2) /SD IDOK IDOK OK_SSE2
Quit
- OK_SSE:
+ OK_SSE2:
Pop $1
Return
FunctionEnd
@@ -754,103 +794,13 @@ Call un.ProgramFiles SectionEnd ; end of uninstall section
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; (From the NSIS documentation, JC)
-; GetWindowsVersion
-;
-; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
-; Updated by Joost Verburg
-;
-; Returns on top of stack
-;
-; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
-; or
-; '' (Unknown Windows Version)
-;
-; Usage:
-; Call GetWindowsVersion
-; Pop $R0
-; ; at this point $R0 is "NT 4.0" or whatnot
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function GetWindowsVersion
-
- Push $R0
- Push $R1
-
- ReadRegStr $R0 HKLM \
- "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
-
- IfErrors 0 lbl_winnt
-
- ; we are not NT
- ReadRegStr $R0 HKLM \
- "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
-
- StrCpy $R1 $R0 1
- StrCmp $R1 '4' 0 lbl_error
-
- StrCpy $R1 $R0 3
-
- StrCmp $R1 '4.0' lbl_win32_95
- StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
-
- lbl_win32_95:
- StrCpy $R0 '95'
- Goto lbl_done
-
- lbl_win32_98:
- StrCpy $R0 '98'
- Goto lbl_done
-
- lbl_win32_ME:
- StrCpy $R0 'ME'
- Goto lbl_done
-
- lbl_winnt:
-
- StrCpy $R1 $R0 1
-
- StrCmp $R1 '3' lbl_winnt_x
- StrCmp $R1 '4' lbl_winnt_x
-
- StrCpy $R1 $R0 3
-
- StrCmp $R1 '5.0' lbl_winnt_2000
- StrCmp $R1 '5.1' lbl_winnt_XP
- StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
-
- lbl_winnt_x:
- StrCpy $R0 "NT $R0" 6
- Goto lbl_done
-
- lbl_winnt_2000:
- Strcpy $R0 '2000'
- Goto lbl_done
-
- lbl_winnt_XP:
- Strcpy $R0 'XP'
- Goto lbl_done
-
- lbl_winnt_2003:
- Strcpy $R0 '2003'
- Goto lbl_done
-
- lbl_error:
- Strcpy $R0 ''
- lbl_done:
-
- Pop $R1
- Exch $R0
-
-FunctionEnd
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Note: to add new languages, add a language file include to the list
;; at the top of this file, add an entry to the menu and then add an
;; entry to the language ID selector below
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInit
+Call CheckWindowsVersion ; Don't install On unsupported systems
Push $0
${GetParameters} $COMMANDLINE ; get our command line
@@ -924,13 +874,12 @@ StrCpy $INSTPROG "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}"
StrCpy $INSTSHORTCUT "${SHORTCUT}"
-Call CheckWindowsVersion ; warn if on Windows 98/ME
-Call CheckCPUFlags ; Make sure we have SSE2 support
+Call CheckCPUFlags ; Make sure we have SSE2 support
Call CheckIfAdministrator ; Make sure the user can install/uninstall
Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version
Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
-Call CheckWillUninstallV2 ; See if a V2 install exists and will be removed.
+Call CheckWillUninstallV2 ; See if a V2 install exists and will be removed.
Call CheckOldExeName ; Clean up a previous version of the exe
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi Binary files differindex 0c832e8ba9..2352649b4b 100755 --- a/indra/newview/installers/windows/lang_da.nsi +++ b/indra/newview/installers/windows/lang_da.nsi diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi Binary files differindex b717a4d3a5..397262afe1 100755 --- a/indra/newview/installers/windows/lang_de.nsi +++ b/indra/newview/installers/windows/lang_de.nsi diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi Binary files differindex da0d7f54d2..df0d55d9e0 100755 --- a/indra/newview/installers/windows/lang_en-us.nsi +++ b/indra/newview/installers/windows/lang_en-us.nsi diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi Binary files differindex c6a7f38f3f..32967a0dfa 100755 --- a/indra/newview/installers/windows/lang_es.nsi +++ b/indra/newview/installers/windows/lang_es.nsi diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi Binary files differindex 008c240ed7..7c75e25360 100755 --- a/indra/newview/installers/windows/lang_fr.nsi +++ b/indra/newview/installers/windows/lang_fr.nsi diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi Binary files differindex eccd965a92..ce66b61f9f 100755 --- a/indra/newview/installers/windows/lang_it.nsi +++ b/indra/newview/installers/windows/lang_it.nsi diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi Binary files differindex f564291f7d..e68830123a 100755 --- a/indra/newview/installers/windows/lang_ja.nsi +++ b/indra/newview/installers/windows/lang_ja.nsi diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi Binary files differindex 191bae4755..7883819190 100755 --- a/indra/newview/installers/windows/lang_pl.nsi +++ b/indra/newview/installers/windows/lang_pl.nsi diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi Binary files differindex da56a3c336..eb3fb2386c 100755 --- a/indra/newview/installers/windows/lang_pt-br.nsi +++ b/indra/newview/installers/windows/lang_pt-br.nsi diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi Binary files differindex de7affe08a..3b0042fbf5 100755 --- a/indra/newview/installers/windows/lang_ru.nsi +++ b/indra/newview/installers/windows/lang_ru.nsi diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi Binary files differindex 5e7e3d797b..b9be1eab08 100755 --- a/indra/newview/installers/windows/lang_tr.nsi +++ b/indra/newview/installers/windows/lang_tr.nsi diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi Binary files differindex ecf1185fbb..3c6f6fd289 100755 --- a/indra/newview/installers/windows/lang_zh.nsi +++ b/indra/newview/installers/windows/lang_zh.nsi diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index aa8e0bad76..3d5f6c43ee 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -47,6 +47,7 @@ #include "llfirstuse.h" #include "llfloatercamera.h" #include "llfloaterimcontainer.h" +#include "llfloaterperms.h" #include "llfloaterreg.h" #include "llfloatertools.h" #include "llgroupactions.h" diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 26626ad894..890fc9a8d9 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -49,6 +49,7 @@ #include "llvoavatarself.h" #include "llviewerwearable.h" #include "llwearablelist.h" +#include "llfloaterperms.h" #include <boost/scoped_ptr.hpp> @@ -65,6 +66,19 @@ void wear_and_edit_cb(const LLUUID& inv_item) { if (inv_item.isNull()) return; + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (!item) return; + + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); + item->setPermissions(perm); + + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + // Request editing the item after it gets worn. gAgentWearables.requestEditingWearable(inv_item); @@ -72,6 +86,26 @@ void wear_and_edit_cb(const LLUUID& inv_item) LLAppearanceMgr::instance().wearItemOnAvatar(inv_item,true); } +void wear_cb(const LLUUID& inv_item) +{ + if (!inv_item.isNull()) + { + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); + item->setPermissions(perm); + + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + } + } +} + /////////////////////////////////////////////////////////////////////////////// // HACK: For EXT-3923: Pants item shows in inventory with skin icon and messes with "current look" @@ -183,7 +217,7 @@ void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) * * Would like to pass the agent in here, but we can't safely * count on it being around later. Just use gAgent directly. - * @param cb callback to execute on completion (??? unused ???) + * @param cb callback to execute on completion (? unused ?) * @param type Type for the wearable in the agent * @param wearable The wearable data. * @param todo Bitmask of actions to take on completion. @@ -355,6 +389,7 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, LLViewerWearable* new_wearable = LLWearableList::instance().createCopy( old_wearable, trunc_name); + LLPointer<LLInventoryCallback> cb = new AddWearableToAgentInventoryCallback( LLPointer<LLRefCount>(NULL), @@ -1465,7 +1500,16 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); LLAssetType::EType asset_type = wearable->getAssetType(); LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE; - LLPointer<LLInventoryCallback> cb = wear ? new LLBoostFuncInventoryCallback(wear_and_edit_cb) : NULL; + LLPointer<LLInventoryCallback> cb; + if(wear) + { + cb = new LLBoostFuncInventoryCallback(wear_and_edit_cb); + } + else + { + cb = new LLBoostFuncInventoryCallback(wear_cb); + } + LLUUID folder_id; if (parent_id.notNull()) @@ -1478,10 +1522,15 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con folder_id = gInventory.findCategoryUUIDForType(folder_type); } - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - folder_id, wearable->getTransactionID(), wearable->getName(), - wearable->getDescription(), asset_type, inv_type, wearable->getType(), - wearable->getPermissions().getMaskNextOwner(), + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + folder_id, + wearable->getTransactionID(), + wearable->getName(), + wearable->getDescription(), + asset_type, inv_type, + wearable->getType(), + LLFloaterPerms::getNextOwnerPerms("Wearables"), cb); } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a4c430bada..6797dab839 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1480,6 +1480,18 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) uuids_to_remove.push_back(item->getUUID()); } removeItemsFromAvatar(uuids_to_remove); + + // deactivate all gestures in the outfit folder + LLInventoryModel::item_array_t gest_items; + getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE); + for(S32 i = 0; i < gest_items.size(); ++i) + { + LLViewerInventoryItem *gest_item = gest_items[i]; + if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) ) + { + LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() ); + } + } } // Create a copy of src_id + contents as a subfolder of dst_id. diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f52e6625c1..b69cd81078 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3378,6 +3378,10 @@ LLSD LLAppViewer::getViewerInfo() const { info["SERVER_RELEASE_NOTES_URL"] = LLTrans::getString("RetrievingData"); } + else + { + info["SERVER_RELEASE_NOTES_URL"] = LLTrans::getString("NotConnected"); + } } else if (LLStringUtil::startsWith(mServerReleaseNotesURL, "http")) // it's an URL { @@ -4833,7 +4837,7 @@ void LLAppViewer::idle() static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); // Update session stats every large chunk of time - // *FIX: (???) SAMANTHA + // *FIX: (?) SAMANTHA if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected) { LL_INFOS() << "Transmitting sessions stats" << LL_ENDL; diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index e2fa117453..28319564e4 100755 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -28,6 +28,8 @@ #include "llviewerprecompiledheaders.h" #include "llfacebookconnect.h" +#include "llflickrconnect.h" +#include "lltwitterconnect.h" #include "llagent.h" #include "llcallingcard.h" // for LLAvatarTracker @@ -58,7 +60,7 @@ void log_facebook_connect_error(const std::string& request, U32 status, const st } } -void toast_user_for_success() +void toast_user_for_facebook_success() { LLSD args; args["MESSAGE"] = LLTrans::getString("facebook_post_success"); @@ -74,23 +76,46 @@ public: bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { - if (tokens.size() > 0) + if (tokens.size() >= 1) { if (tokens[0].asString() == "connect") { - // this command probably came from the fbc_web browser, so close it - LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web"); - if (fbc_web) + if (tokens.size() >= 2 && tokens[1].asString() == "flickr") { - fbc_web->closeFloater(); + // this command probably came from the flickr_web browser, so close it + LLFloaterReg::hideInstance("flickr_web"); + + // connect to flickr + if (query_map.has("oauth_token")) + { + LLFlickrConnect::instance().connectToFlickr(query_map["oauth_token"], query_map.get("oauth_verifier")); + } + return true; } - - // connect to facebook - if (query_map.has("code")) + else if (tokens.size() >= 2 && tokens[1].asString() == "twitter") + { + // this command probably came from the twitter_web browser, so close it + LLFloaterReg::hideInstance("twitter_web"); + + // connect to twitter + if (query_map.has("oauth_token")) + { + LLTwitterConnect::instance().connectToTwitter(query_map["oauth_token"], query_map.get("oauth_verifier")); + } + return true; + } + else //if (tokens.size() >= 2 && tokens[1].asString() == "facebook") { - LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); + // this command probably came from the fbc_web browser, so close it + LLFloaterReg::hideInstance("fbc_web"); + + // connect to facebook + if (query_map.has("code")) + { + LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); + } + return true; } - return true; } } return false; @@ -156,7 +181,7 @@ public: /* virtual */ void httpSuccess() { - toast_user_for_success(); + toast_user_for_facebook_success(); LL_DEBUGS("FacebookConnect") << "Post successful. " << dumpResponse() << LL_ENDL; LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_POSTED); } @@ -302,9 +327,16 @@ public: { if ( HTTP_FOUND == getStatus() ) { - LL_INFOS() << "Facebook: Info received" << LL_ENDL; - LL_DEBUGS("FacebookConnect") << "Getting Facebook info successful. info: " << getContent() << LL_ENDL; - LLFacebookConnect::instance().storeInfo(getContent()); + const std::string& location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) + { + LL_WARNS("FacebookConnect") << "Missing Location header " << dumpResponse() + << "[headers:" << getResponseHeaders() << "]" << LL_ENDL; + } + else + { + LLFacebookConnect::instance().openFacebookWeb(location); + } } else { @@ -371,10 +403,12 @@ void LLFacebookConnect::openFacebookWeb(std::string url) { // Open the URL in an internal browser window without navigation UI LLFloaterWebContent::Params p; - p.url(url).show_chrome(true); - p.url(url).allow_address_entry(false); - p.url(url).allow_back_forward_navigation(false); - p.url(url).trusted_content(true); + p.url(url); + p.show_chrome(true); + p.allow_address_entry(false); + p.allow_back_forward_navigation(false); + p.trusted_content(true); + p.clean_browser(true); LLFloater *floater = LLFloaterReg::showInstance("fbc_web", p); //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). //So when showing the internal web browser, set focus to it's containing floater "fbc_web". When a mouse event @@ -391,7 +425,8 @@ std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route, b LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - url = regionp->getCapability("FacebookConnect"); + //url = "http://pdp15.lindenlab.com/fbc/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + url = regionp->getCapability("FacebookConnect"); url += route; if (include_read_from_master && mReadFromMaster) @@ -406,9 +441,13 @@ void LLFacebookConnect::connectToFacebook(const std::string& auth_code, const st { LLSD body; if (!auth_code.empty()) + { body["code"] = auth_code; + } if (!auth_state.empty()) + { body["state"] = auth_state; + } LLHTTPClient::put(getFacebookConnectURL("/connection"), body, new LLFacebookConnectResponder()); } @@ -452,15 +491,25 @@ void LLFacebookConnect::postCheckin(const std::string& location, const std::stri { LLSD body; if (!location.empty()) + { body["location"] = location; + } if (!name.empty()) + { body["name"] = name; + } if (!description.empty()) + { body["description"] = description; + } if (!image.empty()) + { body["image"] = image; + } if (!message.empty()) + { body["message"] = message; + } // Note: we can use that route for different publish action. We should be able to use the same responder. LLHTTPClient::post(getFacebookConnectURL("/share/checkin", true), body, new LLFacebookShareResponder()); @@ -507,7 +556,7 @@ void LLFacebookConnect::sharePhoto(LLPointer<LLImageFormatted> image, const std: << caption << "\r\n"; body << "--" << boundary << "\r\n" - << "Content-Disposition: form-data; name=\"image\"; filename=\"snapshot." << imageFormat << "\"\r\n" + << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n" << "Content-Type: image/" << imageFormat << "\r\n\r\n"; // Insert the image data. @@ -599,12 +648,13 @@ void LLFacebookConnect::setConnectionState(LLFacebookConnect::EConnectionState c if (mConnectionState != connection_state) { + // set the connection state before notifying watchers + mConnectionState = connection_state; + LLSD state_info; state_info["enum"] = connection_state; sStateWatcher->post(state_info); } - - mConnectionState = connection_state; } void LLFacebookConnect::setConnected(bool connected) diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index a77ac24167..c157db2178 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -89,7 +89,7 @@ private: LLFacebookConnect(); ~LLFacebookConnect() {}; std::string getFacebookConnectURL(const std::string& route = "", bool include_read_from_master = false); - + EConnectionState mConnectionState; BOOL mConnected; LLSD mInfo; diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index a7f5cd9dac..5debf71744 100755 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -167,7 +167,8 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) BOOL res = TRUE; switch (filter) { - case FFLOAD_ALL: + case FFLOAD_ALL: + case FFLOAD_EXE: mOFN.lpstrFilter = L"All Files (*.*)\0*.*\0" \ SOUND_FILTER \ IMAGE_FILTER \ @@ -580,6 +581,10 @@ std::vector<std::string>* LLFilePicker::navOpenFilterProc(ELoadFilter filter) // allowedv->push_back("tpic"); allowedv->push_back("png"); break; + case FFLOAD_EXE: + allowedv->push_back("app"); + allowedv->push_back("exe"); + break; case FFLOAD_WAV: allowedv->push_back("wav"); break; @@ -778,7 +783,7 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) mPickOptions &= ~F_FILE; } - if(filter == FFLOAD_ALL) // allow application bundles etc. to be traversed; important for DEV-16869, but generally useful + if (filter == FFLOAD_ALL) // allow application bundles etc. to be traversed; important for DEV-16869, but generally useful { mPickOptions |= F_NAV_SUPPORT; } diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index f6a700d1c6..0e0cec3943 100755 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -87,7 +87,8 @@ public: FFLOAD_COLLADA = 10, FFLOAD_SCRIPT = 11, FFLOAD_DICTIONARY = 12, - FFLOAD_DIRECTORY = 13 //To call from lldirpicker. + FFLOAD_DIRECTORY = 13, // To call from lldirpicker. + FFLOAD_EXE = 14 // Note: EXE will be treated as ALL on Windows and Linux but not on Darwin }; enum ESaveFilter diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp new file mode 100644 index 0000000000..b715896264 --- /dev/null +++ b/indra/newview/llflickrconnect.cpp @@ -0,0 +1,509 @@ +/** + * @file llflickrconnect.h + * @author Merov, Cho + * @brief Connection to Flickr Service + * + * $LicenseInfo:firstyear=2013&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2013, 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 "llflickrconnect.h" + +#include "llagent.h" +#include "llcallingcard.h" // for LLAvatarTracker +#include "llcommandhandler.h" +#include "llhttpclient.h" +#include "llnotificationsutil.h" +#include "llurlaction.h" +#include "llimagepng.h" +#include "llimagejpeg.h" +#include "lltrans.h" +#include "llevents.h" +#include "llviewerregion.h" + +#include "llfloaterwebcontent.h" +#include "llfloaterreg.h" + +boost::scoped_ptr<LLEventPump> LLFlickrConnect::sStateWatcher(new LLEventStream("FlickrConnectState")); +boost::scoped_ptr<LLEventPump> LLFlickrConnect::sInfoWatcher(new LLEventStream("FlickrConnectInfo")); +boost::scoped_ptr<LLEventPump> LLFlickrConnect::sContentWatcher(new LLEventStream("FlickrConnectContent")); + +// Local functions +void log_flickr_connect_error(const std::string& request, U32 status, const std::string& reason, const std::string& code, const std::string& description) +{ + // Note: 302 (redirect) is *not* an error that warrants logging + if (status != 302) + { + LL_WARNS("FlickrConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << " (" << description << ")" << LL_ENDL; + } +} + +void toast_user_for_flickr_success() +{ + LLSD args; + args["MESSAGE"] = LLTrans::getString("flickr_post_success"); + LLNotificationsUtil::add("FlickrConnect", args); +} + +/////////////////////////////////////////////////////////////////////////////// +// +class LLFlickrConnectResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLFlickrConnectResponder); +public: + + LLFlickrConnectResponder() + { + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS); + } + + /* virtual */ void httpSuccess() + { + LL_DEBUGS("FlickrConnect") << "Connect successful. " << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTED); + } + + /* virtual */ void httpFailure() + { + if ( HTTP_FOUND == getStatus() ) + { + const std::string& location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) + { + LL_WARNS("FlickrConnect") << "Missing Location header " << dumpResponse() + << "[headers:" << getResponseHeaders() << "]" << LL_ENDL; + } + else + { + LLFlickrConnect::instance().openFlickrWeb(location); + } + } + else + { + LL_WARNS("FlickrConnect") << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED); + const LLSD& content = getContent(); + log_flickr_connect_error("Connect", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLFlickrShareResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLFlickrShareResponder); +public: + + LLFlickrShareResponder() + { + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_POSTING); + } + + /* virtual */ void httpSuccess() + { + toast_user_for_flickr_success(); + LL_DEBUGS("FlickrConnect") << "Post successful. " << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_POSTED); + } + + /* virtual */ void httpFailure() + { + if ( HTTP_FOUND == getStatus() ) + { + const std::string& location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) + { + LL_WARNS("FlickrConnect") << "Missing Location header " << dumpResponse() + << "[headers:" << getResponseHeaders() << "]" << LL_ENDL; + } + else + { + LLFlickrConnect::instance().openFlickrWeb(location); + } + } + else if ( HTTP_NOT_FOUND == getStatus() ) + { + LLFlickrConnect::instance().connectToFlickr(); + } + else + { + LL_WARNS("FlickrConnect") << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_POST_FAILED); + const LLSD& content = getContent(); + log_flickr_connect_error("Share", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLFlickrDisconnectResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLFlickrDisconnectResponder); +public: + + LLFlickrDisconnectResponder() + { + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_DISCONNECTING); + } + + void setUserDisconnected() + { + // Clear data + LLFlickrConnect::instance().clearInfo(); + + //Notify state change + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_NOT_CONNECTED); + } + + /* virtual */ void httpSuccess() + { + LL_DEBUGS("FlickrConnect") << "Disconnect successful. " << dumpResponse() << LL_ENDL; + setUserDisconnected(); + } + + /* virtual */ void httpFailure() + { + //User not found so already disconnected + if ( HTTP_NOT_FOUND == getStatus() ) + { + LL_DEBUGS("FlickrConnect") << "Already disconnected. " << dumpResponse() << LL_ENDL; + setUserDisconnected(); + } + else + { + LL_WARNS("FlickrConnect") << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_DISCONNECT_FAILED); + const LLSD& content = getContent(); + log_flickr_connect_error("Disconnect", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLFlickrConnectedResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLFlickrConnectedResponder); +public: + + LLFlickrConnectedResponder(bool auto_connect) : mAutoConnect(auto_connect) + { + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS); + } + + /* virtual */ void httpSuccess() + { + LL_DEBUGS("FlickrConnect") << "Connect successful. " << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTED); + } + + /* virtual */ void httpFailure() + { + // show the facebook login page if not connected yet + if ( HTTP_NOT_FOUND == getStatus() ) + { + LL_DEBUGS("FlickrConnect") << "Not connected. " << dumpResponse() << LL_ENDL; + if (mAutoConnect) + { + LLFlickrConnect::instance().connectToFlickr(); + } + else + { + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_NOT_CONNECTED); + } + } + else + { + LL_WARNS("FlickrConnect") << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED); + const LLSD& content = getContent(); + log_flickr_connect_error("Connected", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } + +private: + bool mAutoConnect; +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLFlickrInfoResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLFlickrInfoResponder); +public: + + /* virtual */ void httpSuccess() + { + LL_INFOS("FlickrConnect") << "Flickr: Info received" << LL_ENDL; + LL_DEBUGS("FlickrConnect") << "Getting Flickr info successful. " << dumpResponse() << LL_ENDL; + LLFlickrConnect::instance().storeInfo(getContent()); + } + + /* virtual */ void httpFailure() + { + if ( HTTP_FOUND == getStatus() ) + { + const std::string& location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) + { + LL_WARNS("FlickrConnect") << "Missing Location header " << dumpResponse() + << "[headers:" << getResponseHeaders() << "]" << LL_ENDL; + } + else + { + LLFlickrConnect::instance().openFlickrWeb(location); + } + } + else + { + LL_WARNS("FlickrConnect") << dumpResponse() << LL_ENDL; + const LLSD& content = getContent(); + log_flickr_connect_error("Info", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +LLFlickrConnect::LLFlickrConnect() +: mConnectionState(FLICKR_NOT_CONNECTED), + mConnected(false), + mInfo(), + mRefreshInfo(false), + mReadFromMaster(false) +{ +} + +void LLFlickrConnect::openFlickrWeb(std::string url) +{ + // Open the URL in an internal browser window without navigation UI + LLFloaterWebContent::Params p; + p.url(url); + p.show_chrome(true); + p.allow_address_entry(false); + p.allow_back_forward_navigation(false); + p.trusted_content(true); + p.clean_browser(true); + LLFloater *floater = LLFloaterReg::showInstance("flickr_web", p); + //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). + //So when showing the internal web browser, set focus to it's containing floater "flickr_web". When a mouse event + //occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus. + //flickr_web floater contains the "webbrowser" panel. JIRA: ACME-744 + gFocusMgr.setKeyboardFocus( floater ); + + //LLUrlAction::openURLExternal(url); +} + +std::string LLFlickrConnect::getFlickrConnectURL(const std::string& route, bool include_read_from_master) +{ + std::string url(""); + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + //url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + url = regionp->getCapability("FlickrConnect"); + url += route; + + if (include_read_from_master && mReadFromMaster) + { + url += "?read_from_master=true"; + } + } + return url; +} + +void LLFlickrConnect::connectToFlickr(const std::string& request_token, const std::string& oauth_verifier) +{ + LLSD body; + if (!request_token.empty()) + body["request_token"] = request_token; + if (!oauth_verifier.empty()) + body["oauth_verifier"] = oauth_verifier; + + LLHTTPClient::put(getFlickrConnectURL("/connection"), body, new LLFlickrConnectResponder()); +} + +void LLFlickrConnect::disconnectFromFlickr() +{ + LLHTTPClient::del(getFlickrConnectURL("/connection"), new LLFlickrDisconnectResponder()); +} + +void LLFlickrConnect::checkConnectionToFlickr(bool auto_connect) +{ + const bool follow_redirects = false; + const F32 timeout = HTTP_REQUEST_EXPIRY_SECS; + LLHTTPClient::get(getFlickrConnectURL("/connection", true), new LLFlickrConnectedResponder(auto_connect), + LLSD(), timeout, follow_redirects); +} + +void LLFlickrConnect::loadFlickrInfo() +{ + if(mRefreshInfo) + { + const bool follow_redirects = false; + const F32 timeout = HTTP_REQUEST_EXPIRY_SECS; + LLHTTPClient::get(getFlickrConnectURL("/info", true), new LLFlickrInfoResponder(), + LLSD(), timeout, follow_redirects); + } +} + +void LLFlickrConnect::uploadPhoto(const std::string& image_url, const std::string& title, const std::string& description, const std::string& tags, int safety_level) +{ + LLSD body; + body["image"] = image_url; + body["title"] = title; + body["description"] = description; + body["tags"] = tags; + body["safety_level"] = safety_level; + + // Note: we can use that route for different publish action. We should be able to use the same responder. + LLHTTPClient::post(getFlickrConnectURL("/share/photo", true), body, new LLFlickrShareResponder()); +} + +void LLFlickrConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& title, const std::string& description, const std::string& tags, int safety_level) +{ + std::string imageFormat; + if (dynamic_cast<LLImagePNG*>(image.get())) + { + imageFormat = "png"; + } + else if (dynamic_cast<LLImageJPEG*>(image.get())) + { + imageFormat = "jpg"; + } + else + { + llwarns << "Image to upload is not a PNG or JPEG" << llendl; + return; + } + + // All this code is mostly copied from LLWebProfile::post() + const std::string boundary = "----------------------------0123abcdefab"; + + LLSD headers; + headers["Content-Type"] = "multipart/form-data; boundary=" + boundary; + + std::ostringstream body; + + // *NOTE: The order seems to matter. + body << "--" << boundary << "\r\n" + << "Content-Disposition: form-data; name=\"title\"\r\n\r\n" + << title << "\r\n"; + + body << "--" << boundary << "\r\n" + << "Content-Disposition: form-data; name=\"description\"\r\n\r\n" + << description << "\r\n"; + + body << "--" << boundary << "\r\n" + << "Content-Disposition: form-data; name=\"tags\"\r\n\r\n" + << tags << "\r\n"; + + body << "--" << boundary << "\r\n" + << "Content-Disposition: form-data; name=\"safety_level\"\r\n\r\n" + << safety_level << "\r\n"; + + body << "--" << boundary << "\r\n" + << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n" + << "Content-Type: image/" << imageFormat << "\r\n\r\n"; + + // Insert the image data. + // *FIX: Treating this as a string will probably screw it up ... + U8* image_data = image->getData(); + for (S32 i = 0; i < image->getDataSize(); ++i) + { + body << image_data[i]; + } + + body << "\r\n--" << boundary << "--\r\n"; + + // postRaw() takes ownership of the buffer and releases it later. + size_t size = body.str().size(); + U8 *data = new U8[size]; + memcpy(data, body.str().data(), size); + + // Note: we can use that route for different publish action. We should be able to use the same responder. + LLHTTPClient::postRaw(getFlickrConnectURL("/share/photo", true), data, size, new LLFlickrShareResponder(), headers); +} + +void LLFlickrConnect::storeInfo(const LLSD& info) +{ + mInfo = info; + mRefreshInfo = false; + + sInfoWatcher->post(info); +} + +const LLSD& LLFlickrConnect::getInfo() const +{ + return mInfo; +} + +void LLFlickrConnect::clearInfo() +{ + mInfo = LLSD(); +} + +void LLFlickrConnect::setDataDirty() +{ + mRefreshInfo = true; +} + +void LLFlickrConnect::setConnectionState(LLFlickrConnect::EConnectionState connection_state) +{ + if(connection_state == FLICKR_CONNECTED) + { + mReadFromMaster = true; + setConnected(true); + setDataDirty(); + } + else if(connection_state == FLICKR_NOT_CONNECTED) + { + setConnected(false); + } + else if(connection_state == FLICKR_POSTED) + { + mReadFromMaster = false; + } + + if (mConnectionState != connection_state) + { + // set the connection state before notifying watchers + mConnectionState = connection_state; + + LLSD state_info; + state_info["enum"] = connection_state; + sStateWatcher->post(state_info); + } +} + +void LLFlickrConnect::setConnected(bool connected) +{ + mConnected = connected; +} diff --git a/indra/newview/llflickrconnect.h b/indra/newview/llflickrconnect.h new file mode 100644 index 0000000000..b127e6e104 --- /dev/null +++ b/indra/newview/llflickrconnect.h @@ -0,0 +1,98 @@ +/** + * @file llflickrconnect.h + * @author Merov, Cho + * @brief Connection to Flickr Service + * + * $LicenseInfo:firstyear=2013&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2013, 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_LLFLICKRCONNECT_H +#define LL_LLFLICKRCONNECT_H + +#include "llsingleton.h" +#include "llimage.h" + +class LLEventPump; + +/** + * @class LLFlickrConnect + * + * Manages authentication to, and interaction with, a web service allowing the + * the viewer to upload photos to Flickr. + */ +class LLFlickrConnect : public LLSingleton<LLFlickrConnect> +{ + LOG_CLASS(LLFlickrConnect); +public: + enum EConnectionState + { + FLICKR_NOT_CONNECTED = 0, + FLICKR_CONNECTION_IN_PROGRESS = 1, + FLICKR_CONNECTED = 2, + FLICKR_CONNECTION_FAILED = 3, + FLICKR_POSTING = 4, + FLICKR_POSTED = 5, + FLICKR_POST_FAILED = 6, + FLICKR_DISCONNECTING = 7, + FLICKR_DISCONNECT_FAILED = 8 + }; + + void connectToFlickr(const std::string& request_token = "", const std::string& oauth_verifier = ""); // Initiate the complete Flickr connection. Please use checkConnectionToFlickr() in normal use. + void disconnectFromFlickr(); // Disconnect from the Flickr service. + void checkConnectionToFlickr(bool auto_connect = false); // Check if an access token is available on the Flickr service. If not, call connectToFlickr(). + + void loadFlickrInfo(); + void uploadPhoto(const std::string& image_url, const std::string& title, const std::string& description, const std::string& tags, int safety_level); + void uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& title, const std::string& description, const std::string& tags, int safety_level); + + void storeInfo(const LLSD& info); + const LLSD& getInfo() const; + void clearInfo(); + void setDataDirty(); + + void setConnectionState(EConnectionState connection_state); + void setConnected(bool connected); + bool isConnected() { return mConnected; } + bool isTransactionOngoing() { return ((mConnectionState == FLICKR_CONNECTION_IN_PROGRESS) || (mConnectionState == FLICKR_POSTING) || (mConnectionState == FLICKR_DISCONNECTING)); } + EConnectionState getConnectionState() { return mConnectionState; } + + void openFlickrWeb(std::string url); + +private: + friend class LLSingleton<LLFlickrConnect>; + + LLFlickrConnect(); + ~LLFlickrConnect() {}; + std::string getFlickrConnectURL(const std::string& route = "", bool include_read_from_master = false); + + EConnectionState mConnectionState; + BOOL mConnected; + LLSD mInfo; + bool mRefreshInfo; + bool mReadFromMaster; + + static boost::scoped_ptr<LLEventPump> sStateWatcher; + static boost::scoped_ptr<LLEventPump> sInfoWatcher; + static boost::scoped_ptr<LLEventPump> sContentWatcher; +}; + +#endif // LL_LLFLICKRCONNECT_H diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 15b94034bb..66149a4367 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -143,7 +143,8 @@ BOOL LLFloaterAbout::postBuild() } else // not logged in { - setSupportText(LLStringUtil::null); + LL_DEBUGS("ViewerInfo") << "cannot display region info when not connected" << LL_ENDL; + setSupportText(LLTrans::getString("NotConnected")); } support_widget->blockUndo(); @@ -262,11 +263,10 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) LLViewerTextEditor *support_widget = getChild<LLViewerTextEditor>("support_editor", true); + LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); support_widget->clear(); support_widget->appendText(LLAppViewer::instance()->getViewerInfoString(), - FALSE, - LLStyle::Params() - .color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor"))); + FALSE, LLStyle::Params() .color(about_color)); } ///---------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp new file mode 100644 index 0000000000..b516e9dd01 --- /dev/null +++ b/indra/newview/llfloaterbigpreview.cpp @@ -0,0 +1,110 @@ +/** +* @file llfloaterbigpreview.cpp +* @brief Display of extended (big) preview for snapshots and SL Share +* @author merov@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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 "llfloaterbigpreview.h" +#include "llsnapshotlivepreview.h" + +/////////////////////// +//LLFloaterBigPreview// +/////////////////////// + +LLFloaterBigPreview::LLFloaterBigPreview(const LLSD& key) : LLFloater(key), + mPreviewPlaceholder(NULL), + mFloaterOwner(NULL) +{ +} + +LLFloaterBigPreview::~LLFloaterBigPreview() +{ + if (mPreviewHandle.get()) + { + mPreviewHandle.get()->die(); + } +} + +void LLFloaterBigPreview::onCancel() +{ + closeFloater(); +} + +void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp) +{ + if (isFloaterOwner(floaterp)) + { + closeFloater(); + } +} + +BOOL LLFloaterBigPreview::postBuild() +{ + mPreviewPlaceholder = getChild<LLUICtrl>("big_preview_placeholder"); + return LLFloater::postBuild(); +} + +void LLFloaterBigPreview::draw() +{ + LLFloater::draw(); + + LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); + + // Display the preview if one is available + if (previewp && previewp->getBigThumbnailImage()) + { + // Get the preview rect + const LLRect& preview_rect = mPreviewPlaceholder->getRect(); + + // Get the preview texture size + S32 thumbnail_w = previewp->getBigThumbnailWidth(); + S32 thumbnail_h = previewp->getBigThumbnailHeight(); + + // Compute the scaling ratio and the size of the final texture in the rect: we want to prevent anisotropic scaling (distorted in x and y) + F32 ratio = llmax((F32)(thumbnail_w)/(F32)(preview_rect.getWidth()), (F32)(thumbnail_h)/(F32)(preview_rect.getHeight())); + thumbnail_w = (S32)((F32)(thumbnail_w)/ratio); + thumbnail_h = (S32)((F32)(thumbnail_h)/ratio); + + // Compute the preview offset within the preview rect: we want to center that preview in the available rect + const S32 local_offset_x = (preview_rect.getWidth() - thumbnail_w) / 2 ; + const S32 local_offset_y = (preview_rect.getHeight() - thumbnail_h) / 2 ; + + // Compute preview offset within the floater rect + S32 offset_x = preview_rect.mLeft + local_offset_x; + S32 offset_y = preview_rect.mBottom + local_offset_y; + + gGL.matrixMode(LLRender::MM_MODELVIEW); + // Apply floater transparency to the texture unless the floater is focused. + F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); + LLColor4 color = LLColor4::white; + + // Draw the preview texture + gl_draw_scaled_image(offset_x, offset_y, + thumbnail_w, thumbnail_h, + previewp->getBigThumbnailImage(), color % alpha); + } +} + diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h new file mode 100644 index 0000000000..63c6784d36 --- /dev/null +++ b/indra/newview/llfloaterbigpreview.h @@ -0,0 +1,54 @@ +/** +* @file llfloaterbigpreview.h +* @brief Display of extended (big) preview for snapshots and SL Share +* @author merov@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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_LLFLOATERBIGPREVIEW_H +#define LL_LLFLOATERBIGPREVIEW_H + +#include "llfloater.h" + +class LLFloaterBigPreview : public LLFloater +{ +public: + LLFloaterBigPreview(const LLSD& key); + ~LLFloaterBigPreview(); + + BOOL postBuild(); + void draw(); + void onCancel(); + + void setPreview(LLView* previewp) { mPreviewHandle = previewp->getHandle(); } + void setFloaterOwner(LLFloater* floaterp) { mFloaterOwner = floaterp; } + bool isFloaterOwner(LLFloater* floaterp) const { return (mFloaterOwner == floaterp); } + void closeOnFloaterOwnerClosing(LLFloater* floaterp); + +private: + LLHandle<LLView> mPreviewHandle; + LLUICtrl* mPreviewPlaceholder; + LLFloater* mFloaterOwner; +}; + +#endif // LL_LLFLOATERBIGPREVIEW_H + diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index a22f5770bf..669ffa7c59 100755 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -1002,7 +1002,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) 0, LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, - LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), name, callback, expected_upload_cost, userdata); diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloaterfacebook.cpp index ea3d72e116..9e3f917eae 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloaterfacebook.cpp @@ -1,6 +1,6 @@ /** -* @file llfloatersocial.cpp -* @brief Implementation of llfloatersocial +* @file llfloaterfacebook.cpp +* @brief Implementation of llfloaterfacebook * @author Gilbert@lindenlab.com * * $LicenseInfo:firstyear=2013&license=viewerlgpl$ @@ -27,15 +27,17 @@ #include "llviewerprecompiledheaders.h" -#include "llfloatersocial.h" +#include "llfloaterfacebook.h" #include "llagent.h" #include "llagentui.h" #include "llcheckboxctrl.h" #include "llcombobox.h" #include "llfacebookconnect.h" +#include "llfloaterbigpreview.h" #include "llfloaterreg.h" #include "lliconctrl.h" +#include "llimagefiltersmanager.h" #include "llresmgr.h" // LLLocale #include "llsdserialize.h" #include "llloadingindicator.h" @@ -46,11 +48,17 @@ #include "llviewerregion.h" #include "llviewercontrol.h" #include "llviewermedia.h" - -static LLPanelInjector<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel"); -static LLPanelInjector<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel"); -static LLPanelInjector<LLSocialCheckinPanel> t_panel_checkin("llsocialcheckinpanel"); -static LLPanelInjector<LLSocialAccountPanel> t_panel_account("llsocialaccountpanel"); +#include "lltabcontainer.h" +#include "llavatarlist.h" +#include "llpanelpeoplemenus.h" +#include "llaccordionctrl.h" +#include "llaccordionctrltab.h" + +static LLPanelInjector<LLFacebookStatusPanel> t_panel_status("llfacebookstatuspanel"); +static LLPanelInjector<LLFacebookPhotoPanel> t_panel_photo("llfacebookphotopanel"); +static LLPanelInjector<LLFacebookCheckinPanel> t_panel_checkin("llfacebookcheckinpanel"); +static LLPanelInjector<LLFacebookFriendsPanel> t_panel_friends("llfacebookfriendspanel"); +static LLPanelInjector<LLFacebookAccountPanel> t_panel_account("llfacebookaccountpanel"); const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_CHECKIN_LOCATION_URL = "http://maps.secondlife.com/"; @@ -58,12 +66,17 @@ const std::string DEFAULT_CHECKIN_ICON_URL = "http://map.secondlife.com.s3.amazo const std::string DEFAULT_CHECKIN_QUERY_PARAMETERS = "?sourceid=slshare_checkin&utm_source=facebook&utm_medium=checkin&utm_campaign=slshare"; const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=facebook&utm_medium=photo&utm_campaign=slshare"; +const S32 MAX_QUALITY = 100; // Max quality value for jpeg images +const S32 MIN_QUALITY = 0; // Min quality value for jpeg images +const S32 TARGET_DATA_SIZE = 95000; // Size of the image (compressed) we're trying to send to Facebook + std::string get_map_url() { LLVector3d center_agent; - if (gAgent.getRegion()) + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) { - center_agent = gAgent.getRegion()->getCenterGlobal(); + center_agent = regionp->getCenterGlobal(); } int x_pos = center_agent[0] / 256.0; int y_pos = center_agent[1] / 256.0; @@ -71,19 +84,27 @@ std::string get_map_url() return map_url; } +// Compute target jpeg quality : see https://wiki.lindenlab.com/wiki/Facebook_Image_Quality for details +S32 compute_jpeg_quality(S32 width, S32 height) +{ + F32 target_compression_ratio = (F32)(width * height * 3) / (F32)(TARGET_DATA_SIZE); + S32 quality = (S32)(110.0f - (2.0f * target_compression_ratio)); + return llclamp(quality,MIN_QUALITY,MAX_QUALITY); +} + /////////////////////////// -//LLSocialStatusPanel////// +//LLFacebookStatusPanel////// /////////////////////////// -LLSocialStatusPanel::LLSocialStatusPanel() : +LLFacebookStatusPanel::LLFacebookStatusPanel() : mMessageTextEditor(NULL), mPostButton(NULL), mCancelButton(NULL) { - mCommitCallbackRegistrar.add("SocialSharing.SendStatus", boost::bind(&LLSocialStatusPanel::onSend, this)); + mCommitCallbackRegistrar.add("SocialSharing.SendStatus", boost::bind(&LLFacebookStatusPanel::onSend, this)); } -BOOL LLSocialStatusPanel::postBuild() +BOOL LLFacebookStatusPanel::postBuild() { mMessageTextEditor = getChild<LLUICtrl>("status_message"); mPostButton = getChild<LLUICtrl>("post_status_btn"); @@ -92,7 +113,7 @@ BOOL LLSocialStatusPanel::postBuild() return LLPanel::postBuild(); } -void LLSocialStatusPanel::draw() +void LLFacebookStatusPanel::draw() { if (mMessageTextEditor && mPostButton && mCancelButton) { @@ -106,10 +127,10 @@ void LLSocialStatusPanel::draw() LLPanel::draw(); } -void LLSocialStatusPanel::onSend() +void LLFacebookStatusPanel::onSend() { - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialStatusPanel"); // just in case it is already listening - LLEventPumps::instance().obtain("FacebookConnectState").listen("LLSocialStatusPanel", boost::bind(&LLSocialStatusPanel::onFacebookConnectStateChange, this, _1)); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookStatusPanel"); // just in case it is already listening + LLEventPumps::instance().obtain("FacebookConnectState").listen("LLFacebookStatusPanel", boost::bind(&LLFacebookStatusPanel::onFacebookConnectStateChange, this, _1)); // Connect to Facebook if necessary and then post if (LLFacebookConnect::instance().isConnected()) @@ -122,7 +143,7 @@ void LLSocialStatusPanel::onSend() } } -bool LLSocialStatusPanel::onFacebookConnectStateChange(const LLSD& data) +bool LLFacebookStatusPanel::onFacebookConnectStateChange(const LLSD& data) { switch (data.get("enum").asInteger()) { @@ -131,7 +152,7 @@ bool LLSocialStatusPanel::onFacebookConnectStateChange(const LLSD& data) break; case LLFacebookConnect::FB_POSTED: - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialStatusPanel"); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookStatusPanel"); clearAndClose(); break; } @@ -139,7 +160,7 @@ bool LLSocialStatusPanel::onFacebookConnectStateChange(const LLSD& data) return false; } -void LLSocialStatusPanel::sendStatus() +void LLFacebookStatusPanel::sendStatus() { std::string message = mMessageTextEditor->getValue().asString(); if (!message.empty()) @@ -148,7 +169,7 @@ void LLSocialStatusPanel::sendStatus() } } -void LLSocialStatusPanel::clearAndClose() +void LLFacebookStatusPanel::clearAndClose() { mMessageTextEditor->setValue(""); @@ -160,23 +181,27 @@ void LLSocialStatusPanel::clearAndClose() } /////////////////////////// -//LLSocialPhotoPanel/////// +//LLFacebookPhotoPanel/////// /////////////////////////// -LLSocialPhotoPanel::LLSocialPhotoPanel() : +LLFacebookPhotoPanel::LLFacebookPhotoPanel() : mSnapshotPanel(NULL), mResolutionComboBox(NULL), mRefreshBtn(NULL), +mBtnPreview(NULL), mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), mCaptionTextBox(NULL), -mPostButton(NULL) +mPostButton(NULL), +mBigPreviewFloater(NULL), +mQuality(MAX_QUALITY) { - mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLSocialPhotoPanel::onSend, this)); - mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLSocialPhotoPanel::onClickNewSnapshot, this)); + mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLFacebookPhotoPanel::onSend, this)); + mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLFacebookPhotoPanel::onClickNewSnapshot, this)); + mCommitCallbackRegistrar.add("SocialSharing.BigPreview", boost::bind(&LLFacebookPhotoPanel::onClickBigPreview, this)); } -LLSocialPhotoPanel::~LLSocialPhotoPanel() +LLFacebookPhotoPanel::~LLFacebookPhotoPanel() { if(mPreviewHandle.get()) { @@ -184,24 +209,65 @@ LLSocialPhotoPanel::~LLSocialPhotoPanel() } } -BOOL LLSocialPhotoPanel::postBuild() +BOOL LLFacebookPhotoPanel::postBuild() { - setVisibleCallback(boost::bind(&LLSocialPhotoPanel::onVisibilityChanged, this, _2)); + setVisibleCallback(boost::bind(&LLFacebookPhotoPanel::onVisibilityChange, this, _2)); mSnapshotPanel = getChild<LLUICtrl>("snapshot_panel"); mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox"); - mResolutionComboBox->setCommitCallback(boost::bind(&LLSocialPhotoPanel::updateResolution, this, TRUE)); + mResolutionComboBox->setValue("[i1200,i630]"); // hardcoded defaults ftw! + mResolutionComboBox->setCommitCallback(boost::bind(&LLFacebookPhotoPanel::updateResolution, this, TRUE)); + mFilterComboBox = getChild<LLUICtrl>("filters_combobox"); + mFilterComboBox->setCommitCallback(boost::bind(&LLFacebookPhotoPanel::updateResolution, this, TRUE)); mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); + mBtnPreview = getChild<LLButton>("big_preview_btn"); mWorkingLabel = getChild<LLUICtrl>("working_lbl"); mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder"); mCaptionTextBox = getChild<LLUICtrl>("photo_caption"); mPostButton = getChild<LLUICtrl>("post_photo_btn"); mCancelButton = getChild<LLUICtrl>("cancel_photo_btn"); + mBigPreviewFloater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + + // Update filter list + std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList(); + LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox); + for (U32 i = 0; i < filter_list.size(); i++) + { + filterbox->add(filter_list[i]); + } return LLPanel::postBuild(); } -void LLSocialPhotoPanel::draw() +// virtual +S32 LLFacebookPhotoPanel::notify(const LLSD& info) +{ + if (info.has("snapshot-updating")) + { + // Disable the Post button and whatever else while the snapshot is not updated + // updateControls(); + return 1; + } + + if (info.has("snapshot-updated")) + { + // Enable the send/post/save buttons. + updateControls(); + + // The refresh button is initially hidden. We show it after the first update, + // i.e. after snapshot is taken + LLUICtrl * refresh_button = getRefreshBtn(); + if (!refresh_button->getVisible()) + { + refresh_button->setVisible(true); + } + return 1; + } + + return 0; +} + +void LLFacebookPhotoPanel::draw() { LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); @@ -210,9 +276,21 @@ void LLSocialPhotoPanel::draw() mCancelButton->setEnabled(no_ongoing_connection); mCaptionTextBox->setEnabled(no_ongoing_connection); mResolutionComboBox->setEnabled(no_ongoing_connection); + mFilterComboBox->setEnabled(no_ongoing_connection); mRefreshBtn->setEnabled(no_ongoing_connection); + mBtnPreview->setEnabled(no_ongoing_connection); + + // Reassign the preview floater if we have the focus and the preview exists + if (hasFocus() && isPreviewVisible()) + { + attachPreview(); + } + + // Toggle the button state as appropriate + bool preview_active = (isPreviewVisible() && mBigPreviewFloater->isFloaterOwner(getParentByType<LLFloater>())); + mBtnPreview->setToggleState(preview_active); - // Display the preview if one is available + // Display the thumbnail if one is available if (previewp && previewp->getThumbnailImage()) { const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect(); @@ -239,8 +317,6 @@ void LLSocialPhotoPanel::draw() gl_draw_scaled_image(offset_x, offset_y, thumbnail_w, thumbnail_h, previewp->getThumbnailImage(), color % alpha); - - previewp->drawPreviewRect(offset_x, offset_y) ; } // Update the visibility of the working (computing preview) label @@ -253,15 +329,14 @@ void LLSocialPhotoPanel::draw() LLPanel::draw(); } -LLSnapshotLivePreview* LLSocialPhotoPanel::getPreviewView() +LLSnapshotLivePreview* LLFacebookPhotoPanel::getPreviewView() { LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)mPreviewHandle.get(); return previewp; } -void LLSocialPhotoPanel::onVisibilityChanged(const LLSD& new_visibility) +void LLFacebookPhotoPanel::onVisibilityChange(BOOL visible) { - bool visible = new_visibility.asBoolean(); if (visible) { if (mPreviewHandle.get()) @@ -269,7 +344,7 @@ void LLSocialPhotoPanel::onVisibilityChanged(const LLSD& new_visibility) LLSnapshotLivePreview* preview = getPreviewView(); if(preview) { - LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL; + lldebugs << "opened, updating snapshot" << llendl; preview->updateSnapshot(TRUE); } } @@ -280,10 +355,15 @@ void LLSocialPhotoPanel::onVisibilityChanged(const LLSD& new_visibility) p.rect(full_screen_rect); LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p); mPreviewHandle = previewp->getHandle(); + mQuality = MAX_QUALITY; + previewp->setContainer(this); previewp->setSnapshotType(previewp->SNAPSHOT_WEB); previewp->setSnapshotFormat(LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); - //previewp->setSnapshotQuality(98); + previewp->setSnapshotQuality(mQuality, false); + previewp->setThumbnailSubsampled(TRUE); // We want the preview to reflect the *saved* image + previewp->setAllowRenderUI(FALSE); // We do not want the rendered UI in our snapshots + previewp->setAllowFullScreenPreview(FALSE); // No full screen preview in SL Share mode previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect()); updateControls(); @@ -291,21 +371,48 @@ void LLSocialPhotoPanel::onVisibilityChanged(const LLSD& new_visibility) } } -void LLSocialPhotoPanel::onClickNewSnapshot() +void LLFacebookPhotoPanel::onClickNewSnapshot() { LLSnapshotLivePreview* previewp = getPreviewView(); if (previewp) { - //setStatus(Impl::STATUS_READY); - LL_DEBUGS() << "updating snapshot" << LL_ENDL; previewp->updateSnapshot(TRUE); } } -void LLSocialPhotoPanel::onSend() +void LLFacebookPhotoPanel::onClickBigPreview() +{ + // Toggle the preview + if (isPreviewVisible()) + { + LLFloaterReg::hideInstance("big_preview"); + } + else + { + attachPreview(); + LLFloaterReg::showInstance("big_preview"); + } +} + +bool LLFacebookPhotoPanel::isPreviewVisible() +{ + return (mBigPreviewFloater && mBigPreviewFloater->getVisible()); +} + +void LLFacebookPhotoPanel::attachPreview() +{ + if (mBigPreviewFloater) + { + LLSnapshotLivePreview* previewp = getPreviewView(); + mBigPreviewFloater->setPreview(previewp); + mBigPreviewFloater->setFloaterOwner(getParentByType<LLFloater>()); + } +} + +void LLFacebookPhotoPanel::onSend() { - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialPhotoPanel"); // just in case it is already listening - LLEventPumps::instance().obtain("FacebookConnectState").listen("LLSocialPhotoPanel", boost::bind(&LLSocialPhotoPanel::onFacebookConnectStateChange, this, _1)); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookPhotoPanel"); // just in case it is already listening + LLEventPumps::instance().obtain("FacebookConnectState").listen("LLFacebookPhotoPanel", boost::bind(&LLFacebookPhotoPanel::onFacebookConnectStateChange, this, _1)); // Connect to Facebook if necessary and then post if (LLFacebookConnect::instance().isConnected()) @@ -318,7 +425,7 @@ void LLSocialPhotoPanel::onSend() } } -bool LLSocialPhotoPanel::onFacebookConnectStateChange(const LLSD& data) +bool LLFacebookPhotoPanel::onFacebookConnectStateChange(const LLSD& data) { switch (data.get("enum").asInteger()) { @@ -327,7 +434,7 @@ bool LLSocialPhotoPanel::onFacebookConnectStateChange(const LLSD& data) break; case LLFacebookConnect::FB_POSTED: - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialPhotoPanel"); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookPhotoPanel"); clearAndClose(); break; } @@ -335,7 +442,7 @@ bool LLSocialPhotoPanel::onFacebookConnectStateChange(const LLSD& data) return false; } -void LLSocialPhotoPanel::sendPhoto() +void LLFacebookPhotoPanel::sendPhoto() { // Get the caption std::string caption = mCaptionTextBox->getValue().asString(); @@ -349,7 +456,7 @@ void LLSocialPhotoPanel::sendPhoto() updateControls(); } -void LLSocialPhotoPanel::clearAndClose() +void LLFacebookPhotoPanel::clearAndClose() { mCaptionTextBox->setValue(""); @@ -357,39 +464,28 @@ void LLSocialPhotoPanel::clearAndClose() if (floater) { floater->closeFloater(); + if (mBigPreviewFloater) + { + mBigPreviewFloater->closeOnFloaterOwnerClosing(floater); + } } } -void LLSocialPhotoPanel::updateControls() +void LLFacebookPhotoPanel::updateControls() { LLSnapshotLivePreview* previewp = getPreviewView(); - BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); - LLSnapshotLivePreview::ESnapshotType shot_type = (previewp ? previewp->getSnapshotType() : LLSnapshotLivePreview::SNAPSHOT_POSTCARD); - + // *TODO: Separate maximum size for Web images from postcards - LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL; - - LLLocale locale(LLLocale::USER_LOCALE); - std::string bytes_string; - if (got_snap) - { - LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); - } - - //getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : getString("unknown")); <---uses localized string - getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : "unknown"); - getChild<LLUICtrl>("file_size_label")->setColor( - shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD - && got_bytes - && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); - + lldebugs << "Is snapshot up-to-date? " << got_snap << llendl; + updateResolution(FALSE); } -void LLSocialPhotoPanel::updateResolution(BOOL do_update) +void LLFacebookPhotoPanel::updateResolution(BOOL do_update) { LLComboBox* combobox = static_cast<LLComboBox *>(mResolutionComboBox); + LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox); std::string sdstring = combobox->getSelectedValue(); LLSD sdres; @@ -399,6 +495,9 @@ void LLSocialPhotoPanel::updateResolution(BOOL do_update) S32 width = sdres[0]; S32 height = sdres[1]; + // Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale + std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : ""); + LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); if (previewp && combobox->getCurrentIndex() >= 0) { @@ -408,40 +507,48 @@ void LLSocialPhotoPanel::updateResolution(BOOL do_update) if (width == 0 || height == 0) { // take resolution from current window size - LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL; + lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl; previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); } else { // use the resolution from the selected pre-canned drop-down choice - LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL; + lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl; previewp->setSize(width, height); } checkAspectRatio(width); previewp->getSize(width, height); + + // Recompute quality setting + mQuality = compute_jpeg_quality(width, height); + previewp->setSnapshotQuality(mQuality, false); - if(original_width != width || original_height != height) + if (original_width != width || original_height != height) { previewp->setSize(width, height); - - // hide old preview as the aspect ratio could be wrong - LL_DEBUGS() << "updating thumbnail" << LL_ENDL; - - previewp->updateSnapshot(FALSE, TRUE); - if(do_update) + if (do_update) { - LL_DEBUGS() << "Will update controls" << LL_ENDL; + previewp->updateSnapshot(TRUE); + updateControls(); + } + } + // Get the old filter, compare to the current one "filter_name" and set if changed + std::string original_filter = previewp->getFilter(); + if (original_filter != filter_name) + { + previewp->setFilter(filter_name); + if (do_update) + { + previewp->updateSnapshot(FALSE, TRUE); updateControls(); - LLSocialPhotoPanel::onClickNewSnapshot(); } } - } } -void LLSocialPhotoPanel::checkAspectRatio(S32 index) +void LLFacebookPhotoPanel::checkAspectRatio(S32 index) { LLSnapshotLivePreview *previewp = getPreviewView() ; @@ -462,23 +569,23 @@ void LLSocialPhotoPanel::checkAspectRatio(S32 index) } } -LLUICtrl* LLSocialPhotoPanel::getRefreshBtn() +LLUICtrl* LLFacebookPhotoPanel::getRefreshBtn() { return mRefreshBtn; } //////////////////////// -//LLSocialCheckinPanel// +//LLFacebookCheckinPanel// //////////////////////// -LLSocialCheckinPanel::LLSocialCheckinPanel() : +LLFacebookCheckinPanel::LLFacebookCheckinPanel() : mMapUrl(""), mReloadingMapTexture(false) { - mCommitCallbackRegistrar.add("SocialSharing.SendCheckin", boost::bind(&LLSocialCheckinPanel::onSend, this)); + mCommitCallbackRegistrar.add("SocialSharing.SendCheckin", boost::bind(&LLFacebookCheckinPanel::onSend, this)); } -BOOL LLSocialCheckinPanel::postBuild() +BOOL LLFacebookCheckinPanel::postBuild() { // Keep pointers to widgets so we don't traverse the UI hierarchy too often mPostButton = getChild<LLUICtrl>("post_place_btn"); @@ -492,7 +599,7 @@ BOOL LLSocialCheckinPanel::postBuild() return LLPanel::postBuild(); } -void LLSocialCheckinPanel::draw() +void LLFacebookCheckinPanel::draw() { bool no_ongoing_connection = !(LLFacebookConnect::instance().isTransactionOngoing()); mPostButton->setEnabled(no_ongoing_connection); @@ -533,10 +640,10 @@ void LLSocialCheckinPanel::draw() LLPanel::draw(); } -void LLSocialCheckinPanel::onSend() +void LLFacebookCheckinPanel::onSend() { - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialCheckinPanel"); // just in case it is already listening - LLEventPumps::instance().obtain("FacebookConnectState").listen("LLSocialCheckinPanel", boost::bind(&LLSocialCheckinPanel::onFacebookConnectStateChange, this, _1)); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookCheckinPanel"); // just in case it is already listening + LLEventPumps::instance().obtain("FacebookConnectState").listen("LLFacebookCheckinPanel", boost::bind(&LLFacebookCheckinPanel::onFacebookConnectStateChange, this, _1)); // Connect to Facebook if necessary and then post if (LLFacebookConnect::instance().isConnected()) @@ -549,7 +656,7 @@ void LLSocialCheckinPanel::onSend() } } -bool LLSocialCheckinPanel::onFacebookConnectStateChange(const LLSD& data) +bool LLFacebookCheckinPanel::onFacebookConnectStateChange(const LLSD& data) { switch (data.get("enum").asInteger()) { @@ -558,7 +665,7 @@ bool LLSocialCheckinPanel::onFacebookConnectStateChange(const LLSD& data) break; case LLFacebookConnect::FB_POSTED: - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialCheckinPanel"); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookCheckinPanel"); clearAndClose(); break; } @@ -566,7 +673,7 @@ bool LLSocialCheckinPanel::onFacebookConnectStateChange(const LLSD& data) return false; } -void LLSocialCheckinPanel::sendCheckin() +void LLFacebookCheckinPanel::sendCheckin() { // Get the location SLURL LLSLURL slurl; @@ -584,7 +691,12 @@ void LLSocialCheckinPanel::sendCheckin() slurl_string += DEFAULT_CHECKIN_QUERY_PARAMETERS; // Get the region name - std::string region_name = gAgent.getRegion()->getName(); + std::string region_name(""); + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + region_name = regionp->getName(); + } // Get the region description std::string description; @@ -601,7 +713,7 @@ void LLSocialCheckinPanel::sendCheckin() LLFacebookConnect::instance().postCheckin(slurl_string, region_name, description, map_url, caption); } -void LLSocialCheckinPanel::clearAndClose() +void LLFacebookCheckinPanel::clearAndClose() { mMessageTextEditor->setValue(""); @@ -613,23 +725,186 @@ void LLSocialCheckinPanel::clearAndClose() } /////////////////////////// -//LLSocialAccountPanel////// +//LLFacebookFriendsPanel////// /////////////////////////// -LLSocialAccountPanel::LLSocialAccountPanel() : +LLFacebookFriendsPanel::LLFacebookFriendsPanel() : +mFriendsStatusCaption(NULL), +mSecondLifeFriends(NULL), +mSuggestedFriends(NULL) +{ +} + +LLFacebookFriendsPanel::~LLFacebookFriendsPanel() +{ + LLAvatarTracker::instance().removeObserver(this); +} + +BOOL LLFacebookFriendsPanel::postBuild() +{ + mFriendsStatusCaption = getChild<LLTextBox>("facebook_friends_status"); + + mSecondLifeFriends = getChild<LLAvatarList>("second_life_friends"); + mSecondLifeFriends->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); + + mSuggestedFriends = getChild<LLAvatarList>("suggested_friends"); + mSuggestedFriends->setContextMenu(&LLPanelPeopleMenus::gSuggestedFriendsContextMenu); + + setVisibleCallback(boost::bind(&LLFacebookFriendsPanel::updateFacebookList, this, _2)); + + LLAvatarTracker::instance().addObserver(this); + + return LLPanel::postBuild(); +} + +bool LLFacebookFriendsPanel::updateSuggestedFriendList() +{ + const LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); + uuid_vec_t& second_life_friends = mSecondLifeFriends->getIDs(); + second_life_friends.clear(); + uuid_vec_t& suggested_friends = mSuggestedFriends->getIDs(); + suggested_friends.clear(); + + //Add suggested friends + LLSD friends = LLFacebookConnect::instance().getContent(); + for (LLSD::array_const_iterator i = friends.beginArray(); i != friends.endArray(); ++i) + { + LLUUID agent_id = (*i).asUUID(); + if (agent_id.notNull()) + { + bool second_life_buddy = av_tracker.isBuddy(agent_id); + if (second_life_buddy) + { + second_life_friends.push_back(agent_id); + } + else + { + //FB+SL but not SL friend + suggested_friends.push_back(agent_id); + } + } + } + + //Force a refresh when there aren't any filter matches (prevent displaying content that shouldn't display) + mSecondLifeFriends->setDirty(true, !mSecondLifeFriends->filterHasMatches()); + mSuggestedFriends->setDirty(true, !mSuggestedFriends->filterHasMatches()); + showFriendsAccordionsIfNeeded(); + + return false; +} + +void LLFacebookFriendsPanel::showFriendsAccordionsIfNeeded() +{ + // Show / hide the status text : needs to be done *before* showing / hidding the accordions + if (!mSecondLifeFriends->filterHasMatches() && !mSuggestedFriends->filterHasMatches()) + { + // Show some explanation text if the lists are empty... + mFriendsStatusCaption->setVisible(true); + if (LLFacebookConnect::instance().isConnected()) + { + //...you're connected to FB but have no friends :( + mFriendsStatusCaption->setText(getString("facebook_friends_empty")); + } + else + { + //...you're not connected to FB + mFriendsStatusCaption->setText(getString("facebook_friends_no_connected")); + } + // Hide the lists + getChild<LLAccordionCtrl>("friends_accordion")->setVisible(false); + getChild<LLAccordionCtrlTab>("tab_second_life_friends")->setVisible(false); + getChild<LLAccordionCtrlTab>("tab_suggested_friends")->setVisible(false); + } + else + { + // We have something in the lists, hide the explanatory text + mFriendsStatusCaption->setVisible(false); + + // Show the lists + LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); + accordion->setVisible(true); + + // Expand and show accordions if needed, else - hide them + getChild<LLAccordionCtrlTab>("tab_second_life_friends")->setVisible(mSecondLifeFriends->filterHasMatches()); + getChild<LLAccordionCtrlTab>("tab_suggested_friends")->setVisible(mSuggestedFriends->filterHasMatches()); + + // Rearrange accordions + accordion->arrange(); + } +} + +void LLFacebookFriendsPanel::changed(U32 mask) +{ + if (mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE)) + { + LLFacebookConnect::instance().loadFacebookFriends(); + updateFacebookList(true); + } +} + + +void LLFacebookFriendsPanel::updateFacebookList(bool visible) +{ + if (visible) + { + // We want this to be called to fetch the friends list once a connection is established + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookFriendsPanel"); + LLEventPumps::instance().obtain("FacebookConnectState").listen("LLFacebookFriendsPanel", boost::bind(&LLFacebookFriendsPanel::onConnectedToFacebook, this, _1)); + + // We then want this to be called to update the displayed lists once the list of friends is received + LLEventPumps::instance().obtain("FacebookConnectContent").stopListening("LLFacebookFriendsPanel"); // just in case it is already listening + LLEventPumps::instance().obtain("FacebookConnectContent").listen("LLFacebookFriendsPanel", boost::bind(&LLFacebookFriendsPanel::updateSuggestedFriendList, this)); + + // Try to connect to Facebook + if ((LLFacebookConnect::instance().getConnectionState() == LLFacebookConnect::FB_NOT_CONNECTED) || + (LLFacebookConnect::instance().getConnectionState() == LLFacebookConnect::FB_CONNECTION_FAILED)) + { + LLFacebookConnect::instance().checkConnectionToFacebook(); + } + // Loads FB friends + if (LLFacebookConnect::instance().isConnected()) + { + LLFacebookConnect::instance().loadFacebookFriends(); + } + // Sort the FB friends and update the lists + updateSuggestedFriendList(); + } +} + +bool LLFacebookFriendsPanel::onConnectedToFacebook(const LLSD& data) +{ + LLSD::Integer connection_state = data.get("enum").asInteger(); + + if (connection_state == LLFacebookConnect::FB_CONNECTED) + { + LLFacebookConnect::instance().loadFacebookFriends(); + } + else if (connection_state == LLFacebookConnect::FB_NOT_CONNECTED) + { + updateSuggestedFriendList(); + } + + return false; +} + +/////////////////////////// +//LLFacebookAccountPanel////// +/////////////////////////// + +LLFacebookAccountPanel::LLFacebookAccountPanel() : mAccountCaptionLabel(NULL), mAccountNameLabel(NULL), mPanelButtons(NULL), mConnectButton(NULL), mDisconnectButton(NULL) { - mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLSocialAccountPanel::onConnect, this)); - mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLSocialAccountPanel::onDisconnect, this)); + mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLFacebookAccountPanel::onConnect, this)); + mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLFacebookAccountPanel::onDisconnect, this)); - setVisibleCallback(boost::bind(&LLSocialAccountPanel::onVisibilityChanged, this, _2)); + setVisibleCallback(boost::bind(&LLFacebookAccountPanel::onVisibilityChange, this, _2)); } -BOOL LLSocialAccountPanel::postBuild() +BOOL LLFacebookAccountPanel::postBuild() { mAccountCaptionLabel = getChild<LLTextBox>("account_caption_label"); mAccountNameLabel = getChild<LLTextBox>("account_name_label"); @@ -640,7 +915,7 @@ BOOL LLSocialAccountPanel::postBuild() return LLPanel::postBuild(); } -void LLSocialAccountPanel::draw() +void LLFacebookAccountPanel::draw() { LLFacebookConnect::EConnectionState connection_state = LLFacebookConnect::instance().getConnectionState(); @@ -655,17 +930,15 @@ void LLSocialAccountPanel::draw() LLPanel::draw(); } -void LLSocialAccountPanel::onVisibilityChanged(const LLSD& new_visibility) +void LLFacebookAccountPanel::onVisibilityChange(BOOL visible) { - bool visible = new_visibility.asBoolean(); - if(visible) { - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialAccountPanel"); - LLEventPumps::instance().obtain("FacebookConnectState").listen("LLSocialAccountPanel", boost::bind(&LLSocialAccountPanel::onFacebookConnectStateChange, this, _1)); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookAccountPanel"); + LLEventPumps::instance().obtain("FacebookConnectState").listen("LLFacebookAccountPanel", boost::bind(&LLFacebookAccountPanel::onFacebookConnectStateChange, this, _1)); - LLEventPumps::instance().obtain("FacebookConnectInfo").stopListening("LLSocialAccountPanel"); - LLEventPumps::instance().obtain("FacebookConnectInfo").listen("LLSocialAccountPanel", boost::bind(&LLSocialAccountPanel::onFacebookConnectInfoChange, this)); + LLEventPumps::instance().obtain("FacebookConnectInfo").stopListening("LLFacebookAccountPanel"); + LLEventPumps::instance().obtain("FacebookConnectInfo").listen("LLFacebookAccountPanel", boost::bind(&LLFacebookAccountPanel::onFacebookConnectInfoChange, this)); //Connected if(LLFacebookConnect::instance().isConnected()) @@ -685,12 +958,12 @@ void LLSocialAccountPanel::onVisibilityChanged(const LLSD& new_visibility) } else { - LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLSocialAccountPanel"); - LLEventPumps::instance().obtain("FacebookConnectInfo").stopListening("LLSocialAccountPanel"); + LLEventPumps::instance().obtain("FacebookConnectState").stopListening("LLFacebookAccountPanel"); + LLEventPumps::instance().obtain("FacebookConnectInfo").stopListening("LLFacebookAccountPanel"); } } -bool LLSocialAccountPanel::onFacebookConnectStateChange(const LLSD& data) +bool LLFacebookAccountPanel::onFacebookConnectStateChange(const LLSD& data) { if(LLFacebookConnect::instance().isConnected()) { @@ -708,7 +981,7 @@ bool LLSocialAccountPanel::onFacebookConnectStateChange(const LLSD& data) return false; } -bool LLSocialAccountPanel::onFacebookConnectInfoChange() +bool LLFacebookAccountPanel::onFacebookConnectInfoChange() { LLSD info = LLFacebookConnect::instance().getInfo(); std::string clickable_name; @@ -724,7 +997,7 @@ bool LLSocialAccountPanel::onFacebookConnectInfoChange() return false; } -void LLSocialAccountPanel::showConnectButton() +void LLFacebookAccountPanel::showConnectButton() { if(!mConnectButton->getVisible()) { @@ -733,7 +1006,7 @@ void LLSocialAccountPanel::showConnectButton() } } -void LLSocialAccountPanel::hideConnectButton() +void LLFacebookAccountPanel::hideConnectButton() { if(mConnectButton->getVisible()) { @@ -742,14 +1015,14 @@ void LLSocialAccountPanel::hideConnectButton() } } -void LLSocialAccountPanel::showDisconnectedLayout() +void LLFacebookAccountPanel::showDisconnectedLayout() { mAccountCaptionLabel->setText(getString("facebook_disconnected")); mAccountNameLabel->setText(std::string("")); showConnectButton(); } -void LLSocialAccountPanel::showConnectedLayout() +void LLFacebookAccountPanel::showConnectedLayout() { LLFacebookConnect::instance().loadFacebookInfo(); @@ -757,7 +1030,7 @@ void LLSocialAccountPanel::showConnectedLayout() hideConnectButton(); } -void LLSocialAccountPanel::onConnect() +void LLFacebookAccountPanel::onConnect() { LLFacebookConnect::instance().checkConnectionToFacebook(true); @@ -765,7 +1038,7 @@ void LLSocialAccountPanel::onConnect() LLViewerMedia::getCookieStore()->removeCookiesByDomain(".facebook.com"); } -void LLSocialAccountPanel::onDisconnect() +void LLFacebookAccountPanel::onDisconnect() { LLFacebookConnect::instance().disconnectFromFacebook(); @@ -773,27 +1046,42 @@ void LLSocialAccountPanel::onDisconnect() } //////////////////////// -//LLFloaterSocial/////// +//LLFloaterFacebook/////// //////////////////////// -LLFloaterSocial::LLFloaterSocial(const LLSD& key) : LLFloater(key), - mSocialPhotoPanel(NULL), +LLFloaterFacebook::LLFloaterFacebook(const LLSD& key) : LLFloater(key), + mFacebookPhotoPanel(NULL), mStatusErrorText(NULL), mStatusLoadingText(NULL), mStatusLoadingIndicator(NULL) { - mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterSocial::onCancel, this)); + mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterFacebook::onCancel, this)); } -void LLFloaterSocial::onCancel() +void LLFloaterFacebook::onClose(bool app_quitting) { + LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } + LLFloater::onClose(app_quitting); +} + +void LLFloaterFacebook::onCancel() +{ + LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } closeFloater(); } -BOOL LLFloaterSocial::postBuild() +BOOL LLFloaterFacebook::postBuild() { // Keep tab of the Photo Panel - mSocialPhotoPanel = static_cast<LLSocialPhotoPanel*>(getChild<LLUICtrl>("panel_social_photo")); + mFacebookPhotoPanel = static_cast<LLFacebookPhotoPanel*>(getChild<LLUICtrl>("panel_facebook_photo")); // Connection status widgets mStatusErrorText = getChild<LLTextBox>("connection_error_text"); mStatusLoadingText = getChild<LLTextBox>("connection_loading_text"); @@ -801,39 +1089,19 @@ BOOL LLFloaterSocial::postBuild() return LLFloater::postBuild(); } -// static -void LLFloaterSocial::preUpdate() +void LLFloaterFacebook::showPhotoPanel() { - LLFloaterSocial* instance = LLFloaterReg::findTypedInstance<LLFloaterSocial>("social"); - if (instance) + LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mFacebookPhotoPanel->getParent()); + if (!parent) { - //Will set file size text to 'unknown' - instance->mSocialPhotoPanel->updateControls(); + llwarns << "Cannot find panel container" << llendl; + return; } -} - -// static -void LLFloaterSocial::postUpdate() -{ - LLFloaterSocial* instance = LLFloaterReg::findTypedInstance<LLFloaterSocial>("social"); - if (instance) - { - //Will set the file size text - instance->mSocialPhotoPanel->updateControls(); - // The refresh button is initially hidden. We show it after the first update, - // i.e. after snapshot is taken - LLUICtrl * refresh_button = instance->mSocialPhotoPanel->getRefreshBtn(); - - if (!refresh_button->getVisible()) - { - refresh_button->setVisible(true); - } - - } + parent->selectTabPanel(mFacebookPhotoPanel); } -void LLFloaterSocial::draw() +void LLFloaterFacebook::draw() { if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator) { diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloaterfacebook.h index 585b265d9f..34356412d6 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloaterfacebook.h @@ -1,6 +1,6 @@ /** -* @file llfloatersocial.h -* @brief Header file for llfloatersocial +* @file llfloaterfacebook.h +* @brief Header file for llfloaterfacebook * @author Gilbert@lindenlab.com * * $LicenseInfo:firstyear=2013&license=viewerlgpl$ @@ -24,9 +24,10 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -#ifndef LL_LLFLOATERSOCIAL_H -#define LL_LLFLOATERSOCIAL_H +#ifndef LL_LLFLOATERFACEBOOK_H +#define LL_LLFLOATERFACEBOOK_H +#include "llcallingcard.h" #include "llfloater.h" #include "lltextbox.h" #include "llviewertexture.h" @@ -34,11 +35,13 @@ class LLIconCtrl; class LLCheckBoxCtrl; class LLSnapshotLivePreview; +class LLAvatarList; +class LLFloaterBigPreview; -class LLSocialStatusPanel : public LLPanel +class LLFacebookStatusPanel : public LLPanel { public: - LLSocialStatusPanel(); + LLFacebookStatusPanel(); BOOL postBuild(); void draw(); void onSend(); @@ -53,19 +56,21 @@ private: LLUICtrl* mCancelButton; }; -class LLSocialPhotoPanel : public LLPanel +class LLFacebookPhotoPanel : public LLPanel { public: - LLSocialPhotoPanel(); - ~LLSocialPhotoPanel(); + LLFacebookPhotoPanel(); + ~LLFacebookPhotoPanel(); BOOL postBuild(); void draw(); LLSnapshotLivePreview* getPreviewView(); - void onVisibilityChanged(const LLSD& new_visibility); + void onVisibilityChange(BOOL new_visibility); + void onClickBigPreview(); void onClickNewSnapshot(); void onSend(); + S32 notify(const LLSD& info); bool onFacebookConnectStateChange(const LLSD& data); void sendPhoto(); @@ -77,22 +82,31 @@ public: LLUICtrl* getRefreshBtn(); private: + bool isPreviewVisible(); + void attachPreview(); + LLHandle<LLView> mPreviewHandle; LLUICtrl * mSnapshotPanel; LLUICtrl * mResolutionComboBox; + LLUICtrl * mFilterComboBox; LLUICtrl * mRefreshBtn; LLUICtrl * mWorkingLabel; LLUICtrl * mThumbnailPlaceholder; LLUICtrl * mCaptionTextBox; LLUICtrl * mPostButton; - LLUICtrl* mCancelButton; + LLUICtrl * mCancelButton; + LLButton * mBtnPreview; + + LLFloaterBigPreview * mBigPreviewFloater; + + S32 mQuality; // Compression quality }; -class LLSocialCheckinPanel : public LLPanel +class LLFacebookCheckinPanel : public LLPanel { public: - LLSocialCheckinPanel(); + LLFacebookCheckinPanel(); BOOL postBuild(); void draw(); void onSend(); @@ -114,15 +128,34 @@ private: bool mReloadingMapTexture; }; -class LLSocialAccountPanel : public LLPanel +class LLFacebookFriendsPanel : public LLPanel, public LLFriendObserver +{ +public: + LLFacebookFriendsPanel(); + ~LLFacebookFriendsPanel(); + BOOL postBuild(); + virtual void changed(U32 mask); + +private: + bool updateSuggestedFriendList(); + void showFriendsAccordionsIfNeeded(); + void updateFacebookList(bool visible); + bool onConnectedToFacebook(const LLSD& data); + + LLTextBox * mFriendsStatusCaption; + LLAvatarList* mSecondLifeFriends; + LLAvatarList* mSuggestedFriends; +}; + +class LLFacebookAccountPanel : public LLPanel { public: - LLSocialAccountPanel(); + LLFacebookAccountPanel(); BOOL postBuild(); void draw(); private: - void onVisibilityChanged(const LLSD& new_visibility); + void onVisibilityChange(BOOL new_visibility); bool onFacebookConnectStateChange(const LLSD& data); bool onFacebookConnectInfoChange(); void onConnect(); @@ -141,24 +174,23 @@ private: LLUICtrl * mDisconnectButton; }; - -class LLFloaterSocial : public LLFloater +class LLFloaterFacebook : public LLFloater { public: - LLFloaterSocial(const LLSD& key); + LLFloaterFacebook(const LLSD& key); BOOL postBuild(); void draw(); + void onClose(bool app_quitting); void onCancel(); - - static void preUpdate(); - static void postUpdate(); + + void showPhotoPanel(); private: - LLSocialPhotoPanel* mSocialPhotoPanel; + LLFacebookPhotoPanel* mFacebookPhotoPanel; LLTextBox* mStatusErrorText; LLTextBox* mStatusLoadingText; LLUICtrl* mStatusLoadingIndicator; }; -#endif // LL_LLFLOATERSOCIAL_H +#endif // LL_LLFLOATERFACEBOOK_H diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp new file mode 100644 index 0000000000..4e6d98ecfa --- /dev/null +++ b/indra/newview/llfloaterflickr.cpp @@ -0,0 +1,798 @@ +/** +* @file llfloaterflickr.cpp +* @brief Implementation of llfloaterflickr +* @author cho@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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 "llfloaterflickr.h" + +#include "llagent.h" +#include "llagentui.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "llflickrconnect.h" +#include "llfloaterreg.h" +#include "lliconctrl.h" +#include "llimagefiltersmanager.h" +#include "llresmgr.h" // LLLocale +#include "llsdserialize.h" +#include "llloadingindicator.h" +#include "llplugincookiestore.h" +#include "llslurl.h" +#include "lltrans.h" +#include "llsnapshotlivepreview.h" +#include "llfloaterbigpreview.h" +#include "llviewerregion.h" +#include "llviewercontrol.h" +#include "llviewermedia.h" +#include "lltabcontainer.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" + +static LLPanelInjector<LLFlickrPhotoPanel> t_panel_photo("llflickrphotopanel"); +static LLPanelInjector<LLFlickrAccountPanel> t_panel_account("llflickraccountpanel"); + +const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte +const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare"; +const std::string DEFAULT_TAG_TEXT = "secondlife "; +const std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife"; + +/////////////////////////// +//LLFlickrPhotoPanel/////// +/////////////////////////// + +LLFlickrPhotoPanel::LLFlickrPhotoPanel() : +mSnapshotPanel(NULL), +mResolutionComboBox(NULL), +mRefreshBtn(NULL), +mBtnPreview(NULL), +mWorkingLabel(NULL), +mThumbnailPlaceholder(NULL), +mTitleTextBox(NULL), +mDescriptionTextBox(NULL), +mLocationCheckbox(NULL), +mTagsTextBox(NULL), +mRatingComboBox(NULL), +mBigPreviewFloater(NULL), +mPostButton(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLFlickrPhotoPanel::onSend, this)); + mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLFlickrPhotoPanel::onClickNewSnapshot, this)); + mCommitCallbackRegistrar.add("SocialSharing.BigPreview", boost::bind(&LLFlickrPhotoPanel::onClickBigPreview, this)); +} + +LLFlickrPhotoPanel::~LLFlickrPhotoPanel() +{ + if(mPreviewHandle.get()) + { + mPreviewHandle.get()->die(); + } +} + +BOOL LLFlickrPhotoPanel::postBuild() +{ + setVisibleCallback(boost::bind(&LLFlickrPhotoPanel::onVisibilityChange, this, _2)); + + mSnapshotPanel = getChild<LLUICtrl>("snapshot_panel"); + mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox"); + mResolutionComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); + mFilterComboBox = getChild<LLUICtrl>("filters_combobox"); + mFilterComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); + mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); + mBtnPreview = getChild<LLButton>("big_preview_btn"); + mWorkingLabel = getChild<LLUICtrl>("working_lbl"); + mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder"); + mTitleTextBox = getChild<LLUICtrl>("photo_title"); + mDescriptionTextBox = getChild<LLUICtrl>("photo_description"); + mLocationCheckbox = getChild<LLUICtrl>("add_location_cb"); + mTagsTextBox = getChild<LLUICtrl>("photo_tags"); + mTagsTextBox->setValue(DEFAULT_TAG_TEXT); + mRatingComboBox = getChild<LLUICtrl>("rating_combobox"); + mPostButton = getChild<LLUICtrl>("post_photo_btn"); + mCancelButton = getChild<LLUICtrl>("cancel_photo_btn"); + mBigPreviewFloater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + + // Update filter list + std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList(); + LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox); + for (U32 i = 0; i < filter_list.size(); i++) + { + filterbox->add(filter_list[i]); + } + + return LLPanel::postBuild(); +} + +// virtual +S32 LLFlickrPhotoPanel::notify(const LLSD& info) +{ + if (info.has("snapshot-updating")) + { + // Disable the Post button and whatever else while the snapshot is not updated + // updateControls(); + return 1; + } + + if (info.has("snapshot-updated")) + { + // Enable the send/post/save buttons. + updateControls(); + + // The refresh button is initially hidden. We show it after the first update, + // i.e. after snapshot is taken + LLUICtrl * refresh_button = getRefreshBtn(); + if (!refresh_button->getVisible()) + { + refresh_button->setVisible(true); + } + return 1; + } + + return 0; +} + +void LLFlickrPhotoPanel::draw() +{ + LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); + + // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts) + bool no_ongoing_connection = !(LLFlickrConnect::instance().isTransactionOngoing()); + mCancelButton->setEnabled(no_ongoing_connection); + mTitleTextBox->setEnabled(no_ongoing_connection); + mDescriptionTextBox->setEnabled(no_ongoing_connection); + mTagsTextBox->setEnabled(no_ongoing_connection); + mRatingComboBox->setEnabled(no_ongoing_connection); + mResolutionComboBox->setEnabled(no_ongoing_connection); + mFilterComboBox->setEnabled(no_ongoing_connection); + mRefreshBtn->setEnabled(no_ongoing_connection); + mBtnPreview->setEnabled(no_ongoing_connection); + mLocationCheckbox->setEnabled(no_ongoing_connection); + + // Reassign the preview floater if we have the focus and the preview exists + if (hasFocus() && isPreviewVisible()) + { + attachPreview(); + } + + // Toggle the button state as appropriate + bool preview_active = (isPreviewVisible() && mBigPreviewFloater->isFloaterOwner(getParentByType<LLFloater>())); + mBtnPreview->setToggleState(preview_active); + + // Display the preview if one is available + if (previewp && previewp->getThumbnailImage()) + { + const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect(); + const S32 thumbnail_w = previewp->getThumbnailWidth(); + const S32 thumbnail_h = previewp->getThumbnailHeight(); + + // calc preview offset within the preview rect + const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ; + const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ; + + // calc preview offset within the floater rect + // Hack : To get the full offset, we need to take into account each and every offset of each widgets up to the floater. + // This is almost as arbitrary as using a fixed offset so that's what we do here for the sake of simplicity. + // *TODO : Get the offset looking through the hierarchy of widgets, should be done in postBuild() so to avoid traversing the hierarchy each time. + S32 offset_x = thumbnail_rect.mLeft + local_offset_x - 1; + S32 offset_y = thumbnail_rect.mBottom + local_offset_y - 39; + + mSnapshotPanel->localPointToOtherView(offset_x, offset_y, &offset_x, &offset_y, getParentByType<LLFloater>()); + + gGL.matrixMode(LLRender::MM_MODELVIEW); + // Apply floater transparency to the texture unless the floater is focused. + F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); + LLColor4 color = LLColor4::white; + gl_draw_scaled_image(offset_x, offset_y, + thumbnail_w, thumbnail_h, + previewp->getThumbnailImage(), color % alpha); + } + + // Update the visibility of the working (computing preview) label + mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate())); + + // Enable Post if we have a preview to send and no on going connection being processed + mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate())); + + // Draw the rest of the panel on top of it + LLPanel::draw(); +} + +LLSnapshotLivePreview* LLFlickrPhotoPanel::getPreviewView() +{ + LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)mPreviewHandle.get(); + return previewp; +} + +void LLFlickrPhotoPanel::onVisibilityChange(BOOL visible) +{ + if (visible) + { + if (mPreviewHandle.get()) + { + LLSnapshotLivePreview* preview = getPreviewView(); + if(preview) + { + lldebugs << "opened, updating snapshot" << llendl; + preview->updateSnapshot(TRUE); + } + } + else + { + LLRect full_screen_rect = getRootView()->getRect(); + LLSnapshotLivePreview::Params p; + p.rect(full_screen_rect); + LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p); + mPreviewHandle = previewp->getHandle(); + + previewp->setContainer(this); + previewp->setSnapshotType(previewp->SNAPSHOT_WEB); + previewp->setSnapshotFormat(LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG); + previewp->setThumbnailSubsampled(TRUE); // We want the preview to reflect the *saved* image + previewp->setAllowRenderUI(FALSE); // We do not want the rendered UI in our snapshots + previewp->setAllowFullScreenPreview(FALSE); // No full screen preview in SL Share mode + previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect()); + + updateControls(); + } + } +} + +void LLFlickrPhotoPanel::onClickNewSnapshot() +{ + LLSnapshotLivePreview* previewp = getPreviewView(); + if (previewp) + { + previewp->updateSnapshot(TRUE); + } +} + +void LLFlickrPhotoPanel::onClickBigPreview() +{ + // Toggle the preview + if (isPreviewVisible()) + { + LLFloaterReg::hideInstance("big_preview"); + } + else + { + attachPreview(); + LLFloaterReg::showInstance("big_preview"); + } +} + +bool LLFlickrPhotoPanel::isPreviewVisible() +{ + return (mBigPreviewFloater && mBigPreviewFloater->getVisible()); +} + +void LLFlickrPhotoPanel::attachPreview() +{ + if (mBigPreviewFloater) + { + LLSnapshotLivePreview* previewp = getPreviewView(); + mBigPreviewFloater->setPreview(previewp); + mBigPreviewFloater->setFloaterOwner(getParentByType<LLFloater>()); + } +} + +void LLFlickrPhotoPanel::onSend() +{ + LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrPhotoPanel"); // just in case it is already listening + LLEventPumps::instance().obtain("FlickrConnectState").listen("LLFlickrPhotoPanel", boost::bind(&LLFlickrPhotoPanel::onFlickrConnectStateChange, this, _1)); + + // Connect to Flickr if necessary and then post + if (LLFlickrConnect::instance().isConnected()) + { + sendPhoto(); + } + else + { + LLFlickrConnect::instance().checkConnectionToFlickr(true); + } +} + +bool LLFlickrPhotoPanel::onFlickrConnectStateChange(const LLSD& data) +{ + switch (data.get("enum").asInteger()) + { + case LLFlickrConnect::FLICKR_CONNECTED: + sendPhoto(); + break; + + case LLFlickrConnect::FLICKR_POSTED: + LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrPhotoPanel"); + clearAndClose(); + break; + } + + return false; +} + +void LLFlickrPhotoPanel::sendPhoto() +{ + // Get the title, description, and tags + std::string title = mTitleTextBox->getValue().asString(); + std::string description = mDescriptionTextBox->getValue().asString(); + std::string tags = mTagsTextBox->getValue().asString(); + + // Add the location if required + bool add_location = mLocationCheckbox->getValue().asBoolean(); + if (add_location) + { + // Get the SLURL for the location + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + std::string slurl_string = slurl.getSLURLString(); + + // Add query parameters so Google Analytics can track incoming clicks! + slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; + + std::string photo_link_text = "Visit this location";// at [] in Second Life"; + std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName(); + if (!parcel_name.empty()) + { + photo_link_text += " at " + parcel_name; + } + photo_link_text += " in Second Life"; + + slurl_string = "<a href=\"" + slurl_string + "\">" + photo_link_text + "</a>"; + + // Add it to the description (pretty crude, but we don't have a better option with photos) + if (description.empty()) + description = slurl_string; + else + description = description + "\n\n" + slurl_string; + + // Also add special "machine tags" with location metadata + const LLVector3& agent_pos_region = gAgent.getPositionAgent(); + LLViewerRegion* region = gAgent.getRegion(); + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if (region && parcel) + { + S32 pos_x = S32(agent_pos_region.mV[VX]); + S32 pos_y = S32(agent_pos_region.mV[VY]); + S32 pos_z = S32(agent_pos_region.mV[VZ]); + + std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName(); + std::string region_name = region->getName(); + + if (!region_name.empty()) + { + tags += llformat(" \"%s:region=%s\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), region_name.c_str()); + } + if (!parcel_name.empty()) + { + tags += llformat(" \"%s:parcel=%s\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), parcel_name.c_str()); + } + tags += llformat(" \"%s:x=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_x); + tags += llformat(" \"%s:y=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_y); + tags += llformat(" \"%s:z=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_z); + } + } + + // Get the content rating + int content_rating = mRatingComboBox->getValue().asInteger(); + + // Get the image + LLSnapshotLivePreview* previewp = getPreviewView(); + + // Post to Flickr + LLFlickrConnect::instance().uploadPhoto(previewp->getFormattedImage(), title, description, tags, content_rating); + + updateControls(); +} + +void LLFlickrPhotoPanel::clearAndClose() +{ + mTitleTextBox->setValue(""); + mDescriptionTextBox->setValue(""); + + LLFloater* floater = getParentByType<LLFloater>(); + if (floater) + { + floater->closeFloater(); + if (mBigPreviewFloater) + { + mBigPreviewFloater->closeOnFloaterOwnerClosing(floater); + } + } +} + +void LLFlickrPhotoPanel::updateControls() +{ + LLSnapshotLivePreview* previewp = getPreviewView(); + BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); + + // *TODO: Separate maximum size for Web images from postcards + lldebugs << "Is snapshot up-to-date? " << got_snap << llendl; + + updateResolution(FALSE); +} + +void LLFlickrPhotoPanel::updateResolution(BOOL do_update) +{ + LLComboBox* combobox = static_cast<LLComboBox *>(mResolutionComboBox); + LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox); + + std::string sdstring = combobox->getSelectedValue(); + LLSD sdres; + std::stringstream sstream(sdstring); + LLSDSerialize::fromNotation(sdres, sstream, sdstring.size()); + + S32 width = sdres[0]; + S32 height = sdres[1]; + + // Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale + std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : ""); + + LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); + if (previewp && combobox->getCurrentIndex() >= 0) + { + S32 original_width = 0 , original_height = 0 ; + previewp->getSize(original_width, original_height) ; + + if (width == 0 || height == 0) + { + // take resolution from current window size + lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl; + previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); + } + else + { + // use the resolution from the selected pre-canned drop-down choice + lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl; + previewp->setSize(width, height); + } + + checkAspectRatio(width); + + previewp->getSize(width, height); + if ((original_width != width) || (original_height != height)) + { + previewp->setSize(width, height); + if (do_update) + { + previewp->updateSnapshot(TRUE); + updateControls(); + } + } + // Get the old filter, compare to the current one "filter_name" and set if changed + std::string original_filter = previewp->getFilter(); + if (original_filter != filter_name) + { + previewp->setFilter(filter_name); + if (do_update) + { + previewp->updateSnapshot(FALSE, TRUE); + updateControls(); + } + } + } +} + +void LLFlickrPhotoPanel::checkAspectRatio(S32 index) +{ + LLSnapshotLivePreview *previewp = getPreviewView() ; + + BOOL keep_aspect = FALSE; + + if (0 == index) // current window size + { + keep_aspect = TRUE; + } + else // predefined resolution + { + keep_aspect = FALSE; + } + + if (previewp) + { + previewp->mKeepAspectRatio = keep_aspect; + } +} + +LLUICtrl* LLFlickrPhotoPanel::getRefreshBtn() +{ + return mRefreshBtn; +} + +/////////////////////////// +//LLFlickrAccountPanel////// +/////////////////////////// + +LLFlickrAccountPanel::LLFlickrAccountPanel() : +mAccountCaptionLabel(NULL), +mAccountNameLabel(NULL), +mPanelButtons(NULL), +mConnectButton(NULL), +mDisconnectButton(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLFlickrAccountPanel::onConnect, this)); + mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLFlickrAccountPanel::onDisconnect, this)); + + setVisibleCallback(boost::bind(&LLFlickrAccountPanel::onVisibilityChange, this, _2)); +} + +BOOL LLFlickrAccountPanel::postBuild() +{ + mAccountCaptionLabel = getChild<LLTextBox>("account_caption_label"); + mAccountNameLabel = getChild<LLTextBox>("account_name_label"); + mPanelButtons = getChild<LLUICtrl>("panel_buttons"); + mConnectButton = getChild<LLUICtrl>("connect_btn"); + mDisconnectButton = getChild<LLUICtrl>("disconnect_btn"); + + return LLPanel::postBuild(); +} + +void LLFlickrAccountPanel::draw() +{ + LLFlickrConnect::EConnectionState connection_state = LLFlickrConnect::instance().getConnectionState(); + + //Disable the 'disconnect' button and the 'use another account' button when disconnecting in progress + bool disconnecting = connection_state == LLFlickrConnect::FLICKR_DISCONNECTING; + mDisconnectButton->setEnabled(!disconnecting); + + //Disable the 'connect' button when a connection is in progress + bool connecting = connection_state == LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS; + mConnectButton->setEnabled(!connecting); + + LLPanel::draw(); +} + +void LLFlickrAccountPanel::onVisibilityChange(BOOL visible) +{ + if(visible) + { + LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrAccountPanel"); + LLEventPumps::instance().obtain("FlickrConnectState").listen("LLFlickrAccountPanel", boost::bind(&LLFlickrAccountPanel::onFlickrConnectStateChange, this, _1)); + + LLEventPumps::instance().obtain("FlickrConnectInfo").stopListening("LLFlickrAccountPanel"); + LLEventPumps::instance().obtain("FlickrConnectInfo").listen("LLFlickrAccountPanel", boost::bind(&LLFlickrAccountPanel::onFlickrConnectInfoChange, this)); + + //Connected + if(LLFlickrConnect::instance().isConnected()) + { + showConnectedLayout(); + } + //Check if connected (show disconnected layout in meantime) + else + { + showDisconnectedLayout(); + } + if ((LLFlickrConnect::instance().getConnectionState() == LLFlickrConnect::FLICKR_NOT_CONNECTED) || + (LLFlickrConnect::instance().getConnectionState() == LLFlickrConnect::FLICKR_CONNECTION_FAILED)) + { + LLFlickrConnect::instance().checkConnectionToFlickr(); + } + } + else + { + LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrAccountPanel"); + LLEventPumps::instance().obtain("FlickrConnectInfo").stopListening("LLFlickrAccountPanel"); + } +} + +bool LLFlickrAccountPanel::onFlickrConnectStateChange(const LLSD& data) +{ + if(LLFlickrConnect::instance().isConnected()) + { + //In process of disconnecting so leave the layout as is + if(data.get("enum").asInteger() != LLFlickrConnect::FLICKR_DISCONNECTING) + { + showConnectedLayout(); + } + } + else + { + showDisconnectedLayout(); + } + + return false; +} + +bool LLFlickrAccountPanel::onFlickrConnectInfoChange() +{ + LLSD info = LLFlickrConnect::instance().getInfo(); + std::string clickable_name; + + //Strings of format [http://www.somewebsite.com Click Me] become clickable text + if(info.has("link") && info.has("name")) + { + clickable_name = "[" + info["link"].asString() + " " + info["name"].asString() + "]"; + } + + mAccountNameLabel->setText(clickable_name); + + return false; +} + +void LLFlickrAccountPanel::showConnectButton() +{ + if(!mConnectButton->getVisible()) + { + mConnectButton->setVisible(TRUE); + mDisconnectButton->setVisible(FALSE); + } +} + +void LLFlickrAccountPanel::hideConnectButton() +{ + if(mConnectButton->getVisible()) + { + mConnectButton->setVisible(FALSE); + mDisconnectButton->setVisible(TRUE); + } +} + +void LLFlickrAccountPanel::showDisconnectedLayout() +{ + mAccountCaptionLabel->setText(getString("flickr_disconnected")); + mAccountNameLabel->setText(std::string("")); + showConnectButton(); +} + +void LLFlickrAccountPanel::showConnectedLayout() +{ + LLFlickrConnect::instance().loadFlickrInfo(); + + mAccountCaptionLabel->setText(getString("flickr_connected")); + hideConnectButton(); +} + +void LLFlickrAccountPanel::onConnect() +{ + LLFlickrConnect::instance().checkConnectionToFlickr(true); + + //Clear only the flickr browser cookies so that the flickr login screen appears + LLViewerMedia::getCookieStore()->removeCookiesByDomain(".flickr.com"); +} + +void LLFlickrAccountPanel::onDisconnect() +{ + LLFlickrConnect::instance().disconnectFromFlickr(); + + LLViewerMedia::getCookieStore()->removeCookiesByDomain(".flickr.com"); +} + +//////////////////////// +//LLFloaterFlickr/////// +//////////////////////// + +LLFloaterFlickr::LLFloaterFlickr(const LLSD& key) : LLFloater(key), + mFlickrPhotoPanel(NULL), + mStatusErrorText(NULL), + mStatusLoadingText(NULL), + mStatusLoadingIndicator(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterFlickr::onCancel, this)); +} + +void LLFloaterFlickr::onClose(bool app_quitting) +{ + LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } + LLFloater::onClose(app_quitting); +} + +void LLFloaterFlickr::onCancel() +{ + LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } + closeFloater(); +} + +BOOL LLFloaterFlickr::postBuild() +{ + // Keep tab of the Photo Panel + mFlickrPhotoPanel = static_cast<LLFlickrPhotoPanel*>(getChild<LLUICtrl>("panel_flickr_photo")); + // Connection status widgets + mStatusErrorText = getChild<LLTextBox>("connection_error_text"); + mStatusLoadingText = getChild<LLTextBox>("connection_loading_text"); + mStatusLoadingIndicator = getChild<LLUICtrl>("connection_loading_indicator"); + return LLFloater::postBuild(); +} + +void LLFloaterFlickr::showPhotoPanel() +{ + LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mFlickrPhotoPanel->getParent()); + if (!parent) + { + llwarns << "Cannot find panel container" << llendl; + return; + } + + parent->selectTabPanel(mFlickrPhotoPanel); +} + +void LLFloaterFlickr::draw() +{ + if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator) + { + mStatusErrorText->setVisible(false); + mStatusLoadingText->setVisible(false); + mStatusLoadingIndicator->setVisible(false); + LLFlickrConnect::EConnectionState connection_state = LLFlickrConnect::instance().getConnectionState(); + std::string status_text; + + switch (connection_state) + { + case LLFlickrConnect::FLICKR_NOT_CONNECTED: + // No status displayed when first opening the panel and no connection done + case LLFlickrConnect::FLICKR_CONNECTED: + // When successfully connected, no message is displayed + case LLFlickrConnect::FLICKR_POSTED: + // No success message to show since we actually close the floater after successful posting completion + break; + case LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS: + // Connection loading indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialFlickrConnecting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLFlickrConnect::FLICKR_POSTING: + // Posting indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialFlickrPosting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLFlickrConnect::FLICKR_CONNECTION_FAILED: + // Error connecting to the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialFlickrErrorConnecting"); + mStatusErrorText->setValue(status_text); + break; + case LLFlickrConnect::FLICKR_POST_FAILED: + // Error posting to the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialFlickrErrorPosting"); + mStatusErrorText->setValue(status_text); + break; + case LLFlickrConnect::FLICKR_DISCONNECTING: + // Disconnecting loading indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialFlickrDisconnecting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLFlickrConnect::FLICKR_DISCONNECT_FAILED: + // Error disconnecting from the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialFlickrErrorDisconnecting"); + mStatusErrorText->setValue(status_text); + break; + } + } + LLFloater::draw(); +} + diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h new file mode 100644 index 0000000000..ba27c9a3d8 --- /dev/null +++ b/indra/newview/llfloaterflickr.h @@ -0,0 +1,135 @@ +/** +* @file llfloaterflickr.h +* @brief Header file for llfloaterflickr +* @author cho@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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_LLFLOATERFLICKR_H +#define LL_LLFLOATERFLICKR_H + +#include "llfloater.h" +#include "lltextbox.h" +#include "llviewertexture.h" + +class LLIconCtrl; +class LLCheckBoxCtrl; +class LLSnapshotLivePreview; +class LLFloaterBigPreview; + +class LLFlickrPhotoPanel : public LLPanel +{ +public: + LLFlickrPhotoPanel(); + ~LLFlickrPhotoPanel(); + + BOOL postBuild(); + S32 notify(const LLSD& info); + void draw(); + + LLSnapshotLivePreview* getPreviewView(); + void onVisibilityChange(BOOL new_visibility); + void onClickNewSnapshot(); + void onClickBigPreview(); + void onSend(); + bool onFlickrConnectStateChange(const LLSD& data); + + void sendPhoto(); + void clearAndClose(); + + void updateControls(); + void updateResolution(BOOL do_update); + void checkAspectRatio(S32 index); + LLUICtrl* getRefreshBtn(); + +private: + bool isPreviewVisible(); + void attachPreview(); + + LLHandle<LLView> mPreviewHandle; + + LLUICtrl * mSnapshotPanel; + LLUICtrl * mResolutionComboBox; + LLUICtrl * mFilterComboBox; + LLUICtrl * mRefreshBtn; + LLUICtrl * mWorkingLabel; + LLUICtrl * mThumbnailPlaceholder; + LLUICtrl * mTitleTextBox; + LLUICtrl * mDescriptionTextBox; + LLUICtrl * mLocationCheckbox; + LLUICtrl * mTagsTextBox; + LLUICtrl * mRatingComboBox; + LLUICtrl * mPostButton; + LLUICtrl * mCancelButton; + LLButton * mBtnPreview; + + LLFloaterBigPreview * mBigPreviewFloater; +}; + +class LLFlickrAccountPanel : public LLPanel +{ +public: + LLFlickrAccountPanel(); + BOOL postBuild(); + void draw(); + +private: + void onVisibilityChange(BOOL new_visibility); + bool onFlickrConnectStateChange(const LLSD& data); + bool onFlickrConnectInfoChange(); + void onConnect(); + void onUseAnotherAccount(); + void onDisconnect(); + + void showConnectButton(); + void hideConnectButton(); + void showDisconnectedLayout(); + void showConnectedLayout(); + + LLTextBox * mAccountCaptionLabel; + LLTextBox * mAccountNameLabel; + LLUICtrl * mPanelButtons; + LLUICtrl * mConnectButton; + LLUICtrl * mDisconnectButton; +}; + + +class LLFloaterFlickr : public LLFloater +{ +public: + LLFloaterFlickr(const LLSD& key); + BOOL postBuild(); + void draw(); + void onClose(bool app_quitting); + void onCancel(); + + void showPhotoPanel(); + +private: + LLFlickrPhotoPanel* mFlickrPhotoPanel; + LLTextBox* mStatusErrorText; + LLTextBox* mStatusLoadingText; + LLUICtrl* mStatusLoadingIndicator; +}; + +#endif // LL_LLFLOATERFLICKR_H + diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 9797b5c062..7da65a9a7c 100755 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -48,6 +48,7 @@ #include "llviewermenu.h" #include "llviewerinventory.h" #include "llviewercontrol.h" +#include "llfloaterperms.h" BOOL item_name_precedes( LLInventoryItem* a, LLInventoryItem* b ) { @@ -74,6 +75,17 @@ public: void fire(const LLUUID &inv_item) { LLPreviewGesture::show(inv_item, LLUUID::null); + + LLInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Gestures")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); + item->setPermissions(perm); + item->updateServer(FALSE); + } } }; @@ -449,9 +461,17 @@ void LLFloaterGesture::onClickPlay() void LLFloaterGesture::onClickNew() { LLPointer<LLInventoryCallback> cb = new GestureShowCallback(); - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - LLUUID::null, LLTransactionID::tnull, "New Gesture", "", LLAssetType::AT_GESTURE, - LLInventoryType::IT_GESTURE, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb); + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + LLUUID::null, + LLTransactionID::tnull, + "New Gesture", + "", + LLAssetType::AT_GESTURE, + LLInventoryType::IT_GESTURE, + NOT_WEARABLE, + PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Gestures"), + cb); } void LLFloaterGesture::onActivateBtnClick() diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp index d66e418926..3b34f03532 100644 --- a/indra/newview/llfloatergotoline.cpp +++ b/indra/newview/llfloatergotoline.cpp @@ -30,7 +30,7 @@ #include "llpreviewscript.h" #include "llfloaterreg.h" #include "lllineeditor.h" -#include "llviewertexteditor.h" +#include "llscripteditor.h" #include "llviewerwindow.h" LLFloaterGotoLine* LLFloaterGotoLine::sInstance = NULL; diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 27b1c3b9cd..ee7f413a59 100755 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -45,6 +45,7 @@ #include "lluictrlfactory.h" #include "llstring.h" #include "lleconomy.h" +#include "llpermissions.h" // linden includes #include "llassetstorage.h" @@ -167,11 +168,14 @@ void LLFloaterNameDesc::onBtnOK( ) S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). void *nruserdata = NULL; std::string display_name = LLStringUtil::null; + upload_new_resource(mFilenameAndPath, // file getChild<LLUICtrl>("name_form")->getValue().asString(), getChild<LLUICtrl>("description_form")->getValue().asString(), 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, nruserdata); closeFloater(false); } diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 80b55c3cbb..0880a5f35a 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -1,7 +1,7 @@ /** * @file llfloaterperms.cpp * @brief Asset creation permission preferences. - * @author Coco + * @author Jonathan Yap * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code @@ -32,101 +32,230 @@ #include "llviewerwindow.h" #include "lluictrlfactory.h" #include "llpermissions.h" - +#include "llagent.h" +#include "llviewerregion.h" +#include "llnotificationsutil.h" LLFloaterPerms::LLFloaterPerms(const LLSD& seed) : LLFloater(seed) { - mCommitCallbackRegistrar.add("Perms.Copy", boost::bind(&LLFloaterPerms::onCommitCopy, this)); - mCommitCallbackRegistrar.add("Perms.OK", boost::bind(&LLFloaterPerms::onClickOK, this)); - mCommitCallbackRegistrar.add("Perms.Cancel", boost::bind(&LLFloaterPerms::onClickCancel, this)); - } BOOL LLFloaterPerms::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterPerms::cancel, this)); - + return TRUE; +} + +//static +U32 LLFloaterPerms::getGroupPerms(std::string prefix) +{ + return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY | PERM_MOVE | PERM_MODIFY : PERM_NONE; +} + +//static +U32 LLFloaterPerms::getEveryonePerms(std::string prefix) +{ + return gSavedSettings.getBOOL(prefix+"EveryoneCopy") ? PERM_COPY : PERM_NONE; +} + +//static +U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) +{ + U32 flags = PERM_MOVE; + if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) + { + flags |= PERM_COPY; + } + if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") ) + { + flags |= PERM_MODIFY; + } + if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") ) + { + flags |= PERM_TRANSFER; + } + return flags; +} + +//static +U32 LLFloaterPerms::getNextOwnerPermsInverted(std::string prefix) +{ + // Sets bits for permissions that are off + U32 flags = PERM_MOVE; + if ( !gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) + { + flags |= PERM_COPY; + } + if ( !gSavedSettings.getBOOL(prefix+"NextOwnerModify") ) + { + flags |= PERM_MODIFY; + } + if ( !gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") ) + { + flags |= PERM_TRANSFER; + } + return flags; +} + +static bool mCapSent = false; + +LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed) + : LLFloater(seed) +{ + mCommitCallbackRegistrar.add("PermsDefault.Copy", boost::bind(&LLFloaterPermsDefault::onCommitCopy, this, _2)); + mCommitCallbackRegistrar.add("PermsDefault.OK", boost::bind(&LLFloaterPermsDefault::onClickOK, this)); + mCommitCallbackRegistrar.add("PermsDefault.Cancel", boost::bind(&LLFloaterPermsDefault::onClickCancel, this)); +} + + +// String equivalents of enum Categories - initialization order must match enum order! +const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] = +{ + "Objects", + "Uploads", + "Scripts", + "Notecards", + "Gestures", + "Wearables" +}; + +BOOL LLFloaterPermsDefault::postBuild() +{ + if(!gSavedSettings.getBOOL("DefaultUploadPermissionsConverted")) + { + gSavedSettings.setBOOL("UploadsEveryoneCopy", gSavedSettings.getBOOL("EveryoneCopy")); + gSavedSettings.setBOOL("UploadsNextOwnerCopy", gSavedSettings.getBOOL("NextOwnerCopy")); + gSavedSettings.setBOOL("UploadsNextOwnerModify", gSavedSettings.getBOOL("NextOwnerModify")); + gSavedSettings.setBOOL("UploadsNextOwnerTransfer", gSavedSettings.getBOOL("NextOwnerTransfer")); + gSavedSettings.setBOOL("UploadsShareWithGroup", gSavedSettings.getBOOL("ShareWithGroup")); + gSavedSettings.setBOOL("DefaultUploadPermissionsConverted", true); + } + + mCloseSignal.connect(boost::bind(&LLFloaterPermsDefault::cancel, this)); + refresh(); - return TRUE; + return true; } -void LLFloaterPerms::onClickOK() +void LLFloaterPermsDefault::onClickOK() { ok(); closeFloater(); } -void LLFloaterPerms::onClickCancel() +void LLFloaterPermsDefault::onClickCancel() { cancel(); closeFloater(); } -void LLFloaterPerms::onCommitCopy() +void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data) { // Implements fair use - BOOL copyable = gSavedSettings.getBOOL("NextOwnerCopy"); + std::string prefix = user_data.asString(); + + BOOL copyable = gSavedSettings.getBOOL(prefix+"NextOwnerCopy"); if(!copyable) { - gSavedSettings.setBOOL("NextOwnerTransfer", TRUE); + gSavedSettings.setBOOL(prefix+"NextOwnerTransfer", TRUE); } - LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>("next_owner_transfer"); + LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>(prefix+"_transfer"); xfer->setEnabled(copyable); } -void LLFloaterPerms::ok() +class LLFloaterPermsResponder : public LLHTTPClient::Responder { - refresh(); // Changes were already applied to saved settings. Refreshing internal values makes it official. -} +public: + LLFloaterPermsResponder(): LLHTTPClient::Responder() {} +private: + static std::string sPreviousReason; + + void error(U32 status, const std::string& reason) + { + // Do not display the same error more than once in a row + if (reason != sPreviousReason) + { + sPreviousReason = reason; + LLSD args; + args["REASON"] = reason; + LLNotificationsUtil::add("DefaultObjectPermissions", args); + } + } + void result(const LLSD& content) + { + // Since we have had a successful POST call be sure to display the next error message + // even if it is the same as a previous one. + sPreviousReason = ""; + LLFloaterPermsDefault::setCapSent(true); + LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL; + } +}; + + std::string LLFloaterPermsResponder::sPreviousReason; -void LLFloaterPerms::cancel() +void LLFloaterPermsDefault::sendInitialPerms() { - gSavedSettings.setBOOL("ShareWithGroup", mShareWithGroup); - gSavedSettings.setBOOL("EveryoneCopy", mEveryoneCopy); - gSavedSettings.setBOOL("NextOwnerCopy", mNextOwnerCopy); - gSavedSettings.setBOOL("NextOwnerModify", mNextOwnerModify); - gSavedSettings.setBOOL("NextOwnerTransfer", mNextOwnerTransfer); + if(!mCapSent) + { + updateCap(); + } } -void LLFloaterPerms::refresh() +void LLFloaterPermsDefault::updateCap() { - mShareWithGroup = gSavedSettings.getBOOL("ShareWithGroup"); - mEveryoneCopy = gSavedSettings.getBOOL("EveryoneCopy"); - mNextOwnerCopy = gSavedSettings.getBOOL("NextOwnerCopy"); - mNextOwnerModify = gSavedSettings.getBOOL("NextOwnerModify"); - mNextOwnerTransfer = gSavedSettings.getBOOL("NextOwnerTransfer"); + std::string object_url = gAgent.getRegion()->getCapability("AgentPreferences"); + + if(!object_url.empty()) + { + LLSD report = LLSD::emptyMap(); + report["default_object_perm_masks"]["Group"] = + (LLSD::Integer)LLFloaterPerms::getGroupPerms(sCategoryNames[CAT_OBJECTS]); + report["default_object_perm_masks"]["Everyone"] = + (LLSD::Integer)LLFloaterPerms::getEveryonePerms(sCategoryNames[CAT_OBJECTS]); + report["default_object_perm_masks"]["NextOwner"] = + (LLSD::Integer)LLFloaterPerms::getNextOwnerPerms(sCategoryNames[CAT_OBJECTS]); + + LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder()); + } } -//static -U32 LLFloaterPerms::getGroupPerms(std::string prefix) -{ - return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY : PERM_NONE; +void LLFloaterPermsDefault::setCapSent(bool cap_sent) +{ + mCapSent = cap_sent; } -//static -U32 LLFloaterPerms::getEveryonePerms(std::string prefix) +void LLFloaterPermsDefault::ok() { - return gSavedSettings.getBOOL(prefix+"EveryoneCopy") ? PERM_COPY : PERM_NONE; +// Changes were already applied automatically to saved settings. +// Refreshing internal values makes it official. + refresh(); + +// We know some setting has changed but not which one. Just in case it was a setting for +// object permissions tell the server what the values are. + updateCap(); } -//static -U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) +void LLFloaterPermsDefault::cancel() { - U32 flags = PERM_MOVE; - if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) + for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++) { - flags |= PERM_COPY; - } - if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") ) - { - flags |= PERM_MODIFY; + gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerCopy", mNextOwnerCopy[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerModify", mNextOwnerModify[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerTransfer", mNextOwnerTransfer[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"ShareWithGroup", mShareWithGroup[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"EveryoneCopy", mEveryoneCopy[iter]); } - if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") ) +} + +void LLFloaterPermsDefault::refresh() +{ + for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++) { - flags |= PERM_TRANSFER; + mShareWithGroup[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"ShareWithGroup"); + mEveryoneCopy[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"EveryoneCopy"); + mNextOwnerCopy[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerCopy"); + mNextOwnerModify[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerModify"); + mNextOwnerTransfer[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerTransfer"); } - return flags; } - diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 6b65f4b0cd..2bb0a19dc1 100755 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -1,7 +1,7 @@ /** * @file llfloaterperms.h * @brief Asset creation permission preferences. - * @author Coco + * @author Jonathan Yap * * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code @@ -36,26 +36,57 @@ class LLFloaterPerms : public LLFloater public: /*virtual*/ BOOL postBuild(); - void ok(); - void cancel(); - void onClickOK(); - void onClickCancel(); - void onCommitCopy(); + // Convenience methods to get current permission preference bitfields from saved settings: static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy" static U32 getGroupPerms(std::string prefix=""); // prefix + "ShareWithGroup" static U32 getNextOwnerPerms(std::string prefix=""); // bitfield for prefix + "NextOwner" + "Copy", "Modify", and "Transfer" + static U32 getNextOwnerPermsInverted(std::string prefix=""); private: LLFloaterPerms(const LLSD& seed); + +}; + +class LLFloaterPermsDefault : public LLFloater +{ + friend class LLFloaterReg; + +public: + /*virtual*/ BOOL postBuild(); + void ok(); + void cancel(); + void onClickOK(); + void onClickCancel(); + void onCommitCopy(const LLSD& user_data); + static void sendInitialPerms(); + static void updateCap(); + static void setCapSent(bool cap_sent); + +// Update instantiation of sCategoryNames in the .cpp file to match if you change this! +enum Categories +{ + CAT_OBJECTS, + CAT_UPLOADS, + CAT_SCRIPTS, + CAT_NOTECARDS, + CAT_GESTURES, + CAT_WEARABLES, + CAT_LAST +}; + +private: + LLFloaterPermsDefault(const LLSD& seed); void refresh(); - BOOL // cached values only for implementing cancel. - mShareWithGroup, - mEveryoneCopy, - mNextOwnerCopy, - mNextOwnerModify, - mNextOwnerTransfer; + static const std::string sCategoryNames[CAT_LAST]; + + // cached values only for implementing cancel. + bool mShareWithGroup[CAT_LAST]; + bool mEveryoneCopy[CAT_LAST]; + bool mNextOwnerCopy[CAT_LAST]; + bool mNextOwnerModify[CAT_LAST]; + bool mNextOwnerTransfer[CAT_LAST]; }; #endif diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 7e848af3a1..d3773767d0 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -350,6 +350,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this)); mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this)); mCommitCallbackRegistrar.add("Pref.AutoReplace", boost::bind(&LLFloaterPreference::onClickAutoReplace, this)); + mCommitCallbackRegistrar.add("Pref.PermsDefault", boost::bind(&LLFloaterPreference::onClickPermsDefault, this)); mCommitCallbackRegistrar.add("Pref.SpellChecker", boost::bind(&LLFloaterPreference::onClickSpellChecker, this)); sSkin = gSavedSettings.getString("SkinCurrent"); @@ -1201,6 +1202,9 @@ void LLFloaterPreference::refreshEnabledState() disableUnavailableSettings(); getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess()); + + // Cannot have floater active until caps have been received + getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true); } void LLFloaterPreference::disableUnavailableSettings() @@ -1697,6 +1701,11 @@ void LLFloaterPreference::onClickActionChange() mClickActionDirty = true; } +void LLFloaterPreference::onClickPermsDefault() +{ + LLFloaterReg::showInstance("perms_default"); +} + void LLFloaterPreference::onDeleteTranscripts() { LLSD args; diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index f6a41529e0..7bf6ae7d79 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -167,6 +167,7 @@ public: void onClickBlockList(); void onClickProxySettings(); void onClickTranslationSettings(); + void onClickPermsDefault(); void onClickAutoReplace(); void onClickSpellChecker(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp new file mode 100644 index 0000000000..2484a08626 --- /dev/null +++ b/indra/newview/llfloaterscriptedprefs.cpp @@ -0,0 +1,65 @@ +/** + * @file llfloaterscriptedprefs.cpp + * @brief Color controls for the script editor + * @author Cinder Roxley + * + * $LicenseInfo:firstyear=2006&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 "llfloaterscriptedprefs.h" + +#include "llcolorswatch.h" +#include "llscripteditor.h" + + +LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) +: LLFloater(key) +, mEditor(NULL) +{ + mCommitCallbackRegistrar.add("ScriptPref.applyUIColor", boost::bind(&LLFloaterScriptEdPrefs::applyUIColor, this ,_1, _2)); + mCommitCallbackRegistrar.add("ScriptPref.getUIColor", boost::bind(&LLFloaterScriptEdPrefs::getUIColor, this ,_1, _2)); +} + +BOOL LLFloaterScriptEdPrefs::postBuild() +{ + mEditor = getChild<LLScriptEditor>("Script Preview"); + if (mEditor) + { + mEditor->initKeywords(); + mEditor->loadKeywords(); + } + return TRUE; +} + +void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param) +{ + LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue())); + mEditor->initKeywords(); + mEditor->loadKeywords(); +} + +void LLFloaterScriptEdPrefs::getUIColor(LLUICtrl* ctrl, const LLSD& param) +{ + LLColorSwatchCtrl* color_swatch = dynamic_cast<LLColorSwatchCtrl*>(ctrl); + color_swatch->setOriginal(LLUIColorTable::instance().getColor(param.asString())); +} diff --git a/indra/newview/llfloaterscriptedprefs.h b/indra/newview/llfloaterscriptedprefs.h new file mode 100644 index 0000000000..31df897aac --- /dev/null +++ b/indra/newview/llfloaterscriptedprefs.h @@ -0,0 +1,51 @@ +/** + * @file llfloaterscriptedprefs.h + * @brief Color controls for the script editor + * @author Cinder Roxley + * + * $LicenseInfo:firstyear=2006&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_FLOATERSCRIPTEDPREFS_H +#define LL_FLOATERSCRIPTEDPREFS_H + +#include "llfloater.h" + +class LLScriptEditor; +class LLUICtrl; + +class LLFloaterScriptEdPrefs : public LLFloater +{ +public: + LLFloaterScriptEdPrefs(const LLSD& key); + BOOL postBuild(); + +private: + ~LLFloaterScriptEdPrefs() {}; + + void applyUIColor(LLUICtrl* ctrl, const LLSD& param); + void getUIColor(LLUICtrl* ctrl, const LLSD& param); + + LLScriptEditor* mEditor; +}; + +#endif // LL_FLOATERSCRIPTEDPREFS_H diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 3d5b297fbe..960d3f35dd 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -31,7 +31,10 @@ #include "llagent.h" #include "llfacebookconnect.h" #include "llfloaterreg.h" -#include "llfloatersocial.h" +#include "llfloaterfacebook.h" +#include "llfloaterflickr.h" +#include "llfloatertwitter.h" +#include "llimagefiltersmanager.h" #include "llcheckboxctrl.h" #include "llcombobox.h" #include "llpostcard.h" @@ -91,6 +94,7 @@ public: } static void onClickNewSnapshot(void* data); static void onClickAutoSnap(LLUICtrl *ctrl, void* data); + static void onClickFilter(LLUICtrl *ctrl, void* data); //static void onClickAdvanceSnap(LLUICtrl *ctrl, void* data); static void onClickMore(void* data) ; static void onClickUICheck(LLUICtrl *ctrl, void* data); @@ -429,9 +433,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) image_res_tb->setVisible(got_snap); if (got_snap) { - LLPointer<LLImageRaw> img = previewp->getEncodedImage(); - image_res_tb->setTextArg("[WIDTH]", llformat("%d", img->getWidth())); - image_res_tb->setTextArg("[HEIGHT]", llformat("%d", img->getHeight())); + image_res_tb->setTextArg("[WIDTH]", llformat("%d", previewp->getEncodedImageWidth())); + image_res_tb->setTextArg("[HEIGHT]", llformat("%d", previewp->getEncodedImageHeight())); } floater->getChild<LLUICtrl>("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); @@ -464,8 +467,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) default: break; } - - if (previewp) + + if (previewp) { previewp->setSnapshotType(shot_type); previewp->setSnapshotFormat(shot_format); @@ -558,6 +561,26 @@ void LLFloaterSnapshot::Impl::onClickAutoSnap(LLUICtrl *ctrl, void* data) } } +// static +void LLFloaterSnapshot::Impl::onClickFilter(LLUICtrl *ctrl, void* data) +{ + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + if (view) + { + updateControls(view); + LLSnapshotLivePreview* previewp = getPreviewView(view); + if (previewp) + { + checkAutoSnapshot(previewp); + // Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale + LLComboBox* filterbox = static_cast<LLComboBox *>(view->getChild<LLComboBox>("filters_combobox")); + std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : ""); + previewp->setFilter(filter_name); + previewp->updateSnapshot(FALSE, TRUE); + } + } +} + void LLFloaterSnapshot::Impl::onClickMore(void* data) { BOOL visible = gSavedSettings.getBOOL("AdvanceSnapshot"); @@ -618,7 +641,7 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL LL_DEBUGS() << "updating thumbnail" << LL_ENDL; previewp->setSize(w, h) ; - previewp->updateSnapshot(FALSE, TRUE); + previewp->updateSnapshot(TRUE); checkAutoSnapshot(previewp, TRUE); } } @@ -853,7 +876,6 @@ void LLFloaterSnapshot::Impl::onImageQualityChange(LLFloaterSnapshot* view, S32 { previewp->setSnapshotQuality(quality_val); } - checkAutoSnapshot(previewp, TRUE); } // static @@ -1052,7 +1074,26 @@ BOOL LLFloaterSnapshot::postBuild() getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this); - + + // Filters + LLComboBox* filterbox = getChild<LLComboBox>("filters_combobox"); + if (gSavedSettings.getBOOL("SnapshotFiltersEnabled")) + { + // Update filter list if setting is on (experimental) + std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList(); + for (U32 i = 0; i < filter_list.size(); i++) + { + filterbox->add(filter_list[i]); + } + childSetCommitCallback("filters_combobox", Impl::onClickFilter, this); + } + else + { + // Hide Filter UI if setting is off (default) + getChild<LLUICtrl>("filter_list_label")->setVisible(FALSE); + filterbox->setVisible(FALSE); + } + LLWebProfile::setImageUploadResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSnapshotUploadFinished, _1)); LLPostCard::setPostResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSendingPostcardFinished, _1)); @@ -1082,6 +1123,7 @@ BOOL LLFloaterSnapshot::postBuild() getChild<LLComboBox>("local_format_combo")->selectNthItem(0); impl.mPreviewHandle = previewp->getHandle(); + previewp->setContainer(this); impl.updateControls(this); impl.updateLayout(this); @@ -1246,6 +1288,32 @@ S32 LLFloaterSnapshot::notify(const LLSD& info) impl.setStatus(Impl::STATUS_FINISHED, data["ok"].asBoolean(), data["msg"].asString()); return 1; } + + if (info.has("snapshot-updating")) + { + // Disable the send/post/save buttons until snapshot is ready. + impl.updateControls(this); + // Force hiding the "Refresh to save" hint because we know we've just started refresh. + impl.setNeedRefresh(this, false); + return 1; + } + + if (info.has("snapshot-updated")) + { + // Enable the send/post/save buttons. + impl.updateControls(this); + // We've just done refresh. + impl.setNeedRefresh(this, false); + + // The refresh button is initially hidden. We show it after the first update, + // i.e. when preview appears. + if (!mRefreshBtn->getVisible()) + { + mRefreshBtn->setVisible(true); + } + return 1; + } + return 0; } @@ -1253,9 +1321,11 @@ S32 LLFloaterSnapshot::notify(const LLSD& info) void LLFloaterSnapshot::update() { LLFloaterSnapshot* inst = findInstance(); - LLFloaterSocial* floater_social = LLFloaterReg::findTypedInstance<LLFloaterSocial>("social"); + LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance<LLFloaterFacebook>("facebook"); + LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance<LLFloaterFlickr>("flickr"); + LLFloaterTwitter* floater_twitter = LLFloaterReg::findTypedInstance<LLFloaterTwitter>("twitter"); - if (!inst && !floater_social) + if (!inst && !floater_facebook && !floater_flickr && !floater_twitter) return; BOOL changed = FALSE; @@ -1329,43 +1399,6 @@ BOOL LLFloaterSnapshot::saveLocal() } // static -void LLFloaterSnapshot::preUpdate() -{ - // FIXME: duplicated code - LLFloaterSnapshot* instance = findInstance(); - if (instance) - { - // Disable the send/post/save buttons until snapshot is ready. - Impl::updateControls(instance); - - // Force hiding the "Refresh to save" hint because we know we've just started refresh. - Impl::setNeedRefresh(instance, false); - } -} - -// static -void LLFloaterSnapshot::postUpdate() -{ - // FIXME: duplicated code - LLFloaterSnapshot* instance = findInstance(); - if (instance) - { - // Enable the send/post/save buttons. - Impl::updateControls(instance); - - // We've just done refresh. - Impl::setNeedRefresh(instance, false); - - // The refresh button is initially hidden. We show it after the first update, - // i.e. when preview appears. - if (!instance->mRefreshBtn->getVisible()) - { - instance->mRefreshBtn->setVisible(true); - } - } -} - -// static void LLFloaterSnapshot::postSave() { LLFloaterSnapshot* instance = findInstance(); diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index c757bf21c2..0bb9474bb5 100755 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -59,8 +59,6 @@ public: static LLFloaterSnapshot* findInstance(); static void saveTexture(); static BOOL saveLocal(); - static void preUpdate(); - static void postUpdate(); static void postSave(); static void postPanelSwitch(); static LLPointer<LLImageFormatted> getImageData(); diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp new file mode 100644 index 0000000000..78e9259919 --- /dev/null +++ b/indra/newview/llfloatertwitter.cpp @@ -0,0 +1,827 @@ +/** +* @file llfloatertwitter.cpp +* @brief Implementation of llfloatertwitter +* @author cho@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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 "llfloatertwitter.h" + +#include "llagent.h" +#include "llagentui.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "lltwitterconnect.h" +#include "llfloaterbigpreview.h" +#include "llfloaterreg.h" +#include "lliconctrl.h" +#include "llimagefiltersmanager.h" +#include "llresmgr.h" // LLLocale +#include "llsdserialize.h" +#include "llloadingindicator.h" +#include "llplugincookiestore.h" +#include "llslurl.h" +#include "lltrans.h" +#include "llsnapshotlivepreview.h" +#include "llviewerregion.h" +#include "llviewercontrol.h" +#include "llviewermedia.h" +#include "lltabcontainer.h" +#include "lltexteditor.h" + +static LLPanelInjector<LLTwitterPhotoPanel> t_panel_photo("lltwitterphotopanel"); +static LLPanelInjector<LLTwitterAccountPanel> t_panel_account("lltwitteraccountpanel"); + +const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte +const std::string DEFAULT_PHOTO_LOCATION_URL = "http://maps.secondlife.com/"; +const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=twitter&utm_medium=photo&utm_campaign=slshare"; +const std::string DEFAULT_STATUS_TEXT = " #SecondLife"; + +/////////////////////////// +//LLTwitterPhotoPanel/////// +/////////////////////////// + +LLTwitterPhotoPanel::LLTwitterPhotoPanel() : +mSnapshotPanel(NULL), +mResolutionComboBox(NULL), +mRefreshBtn(NULL), +mBtnPreview(NULL), +mWorkingLabel(NULL), +mThumbnailPlaceholder(NULL), +mStatusCounterLabel(NULL), +mStatusTextBox(NULL), +mLocationCheckbox(NULL), +mPhotoCheckbox(NULL), +mBigPreviewFloater(NULL), +mPostButton(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLTwitterPhotoPanel::onSend, this)); + mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLTwitterPhotoPanel::onClickNewSnapshot, this)); + mCommitCallbackRegistrar.add("SocialSharing.BigPreview", boost::bind(&LLTwitterPhotoPanel::onClickBigPreview, this)); +} + +LLTwitterPhotoPanel::~LLTwitterPhotoPanel() +{ + if(mPreviewHandle.get()) + { + mPreviewHandle.get()->die(); + } +} + +BOOL LLTwitterPhotoPanel::postBuild() +{ + setVisibleCallback(boost::bind(&LLTwitterPhotoPanel::onVisibilityChange, this, _2)); + + mSnapshotPanel = getChild<LLUICtrl>("snapshot_panel"); + mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox"); + mResolutionComboBox->setValue("[i800,i600]"); // hardcoded defaults ftw! + mResolutionComboBox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::updateResolution, this, TRUE)); + mFilterComboBox = getChild<LLUICtrl>("filters_combobox"); + mFilterComboBox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::updateResolution, this, TRUE)); + mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn"); + mBtnPreview = getChild<LLButton>("big_preview_btn"); + mWorkingLabel = getChild<LLUICtrl>("working_lbl"); + mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder"); + mStatusCounterLabel = getChild<LLUICtrl>("status_counter_label"); + mStatusTextBox = getChild<LLUICtrl>("photo_status"); + mStatusTextBox->setValue(DEFAULT_STATUS_TEXT); + mLocationCheckbox = getChild<LLUICtrl>("add_location_cb"); + mLocationCheckbox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::onAddLocationToggled, this)); + mPhotoCheckbox = getChild<LLUICtrl>("add_photo_cb"); + mPhotoCheckbox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::onAddPhotoToggled, this)); + mPostButton = getChild<LLUICtrl>("post_photo_btn"); + mCancelButton = getChild<LLUICtrl>("cancel_photo_btn"); + mBigPreviewFloater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + + // Update filter list + std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList(); + LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox); + for (U32 i = 0; i < filter_list.size(); i++) + { + filterbox->add(filter_list[i]); + } + + return LLPanel::postBuild(); +} + +// virtual +S32 LLTwitterPhotoPanel::notify(const LLSD& info) +{ + if (info.has("snapshot-updating")) + { + // Disable the Post button and whatever else while the snapshot is not updated + // updateControls(); + return 1; + } + + if (info.has("snapshot-updated")) + { + // Enable the send/post/save buttons. + updateControls(); + + // The refresh button is initially hidden. We show it after the first update, + // i.e. after snapshot is taken + LLUICtrl * refresh_button = getRefreshBtn(); + if (!refresh_button->getVisible()) + { + refresh_button->setVisible(true); + } + return 1; + } + + return 0; +} + +void LLTwitterPhotoPanel::draw() +{ + LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); + + // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts) + bool no_ongoing_connection = !(LLTwitterConnect::instance().isTransactionOngoing()); + bool photo_checked = mPhotoCheckbox->getValue().asBoolean(); + mCancelButton->setEnabled(no_ongoing_connection); + mStatusTextBox->setEnabled(no_ongoing_connection); + mResolutionComboBox->setEnabled(no_ongoing_connection && photo_checked); + mFilterComboBox->setEnabled(no_ongoing_connection && photo_checked); + mRefreshBtn->setEnabled(no_ongoing_connection && photo_checked); + mBtnPreview->setEnabled(no_ongoing_connection); + mLocationCheckbox->setEnabled(no_ongoing_connection); + mPhotoCheckbox->setEnabled(no_ongoing_connection); + + bool add_location = mLocationCheckbox->getValue().asBoolean(); + bool add_photo = mPhotoCheckbox->getValue().asBoolean(); + updateStatusTextLength(false); + + // Reassign the preview floater if we have the focus and the preview exists + if (hasFocus() && isPreviewVisible()) + { + attachPreview(); + } + + // Toggle the button state as appropriate + bool preview_active = (isPreviewVisible() && mBigPreviewFloater->isFloaterOwner(getParentByType<LLFloater>())); + mBtnPreview->setToggleState(preview_active); + + // Display the preview if one is available + if (previewp && previewp->getThumbnailImage()) + { + const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect(); + const S32 thumbnail_w = previewp->getThumbnailWidth(); + const S32 thumbnail_h = previewp->getThumbnailHeight(); + + // calc preview offset within the preview rect + const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ; + const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ; + + // calc preview offset within the floater rect + // Hack : To get the full offset, we need to take into account each and every offset of each widgets up to the floater. + // This is almost as arbitrary as using a fixed offset so that's what we do here for the sake of simplicity. + // *TODO : Get the offset looking through the hierarchy of widgets, should be done in postBuild() so to avoid traversing the hierarchy each time. + S32 offset_x = thumbnail_rect.mLeft + local_offset_x - 1; + S32 offset_y = thumbnail_rect.mBottom + local_offset_y - 39; + + mSnapshotPanel->localPointToOtherView(offset_x, offset_y, &offset_x, &offset_y, getParentByType<LLFloater>()); + + gGL.matrixMode(LLRender::MM_MODELVIEW); + // Apply floater transparency to the texture unless the floater is focused. + F32 alpha = (add_photo ? (getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency()) : 0.5f); + LLColor4 color = LLColor4::white; + gl_draw_scaled_image(offset_x, offset_y, + thumbnail_w, thumbnail_h, + previewp->getThumbnailImage(), color % alpha); + } + + // Update the visibility of the working (computing preview) label + mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate())); + + // Enable Post if we have a preview to send and no on going connection being processed + mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate()) && (add_photo || add_location || !mStatusTextBox->getValue().asString().empty())); + + // Draw the rest of the panel on top of it + LLPanel::draw(); +} + +LLSnapshotLivePreview* LLTwitterPhotoPanel::getPreviewView() +{ + LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)mPreviewHandle.get(); + return previewp; +} + +void LLTwitterPhotoPanel::onVisibilityChange(BOOL visible) +{ + if (visible) + { + if (mPreviewHandle.get()) + { + LLSnapshotLivePreview* preview = getPreviewView(); + if(preview) + { + lldebugs << "opened, updating snapshot" << llendl; + preview->updateSnapshot(TRUE); + } + } + else + { + LLRect full_screen_rect = getRootView()->getRect(); + LLSnapshotLivePreview::Params p; + p.rect(full_screen_rect); + LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p); + mPreviewHandle = previewp->getHandle(); + + previewp->setContainer(this); + previewp->setSnapshotType(previewp->SNAPSHOT_WEB); + previewp->setSnapshotFormat(LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); + previewp->setThumbnailSubsampled(TRUE); // We want the preview to reflect the *saved* image + previewp->setAllowRenderUI(FALSE); // We do not want the rendered UI in our snapshots + previewp->setAllowFullScreenPreview(FALSE); // No full screen preview in SL Share mode + previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect()); + + updateControls(); + } + } +} + +void LLTwitterPhotoPanel::onAddLocationToggled() +{ + bool add_location = mLocationCheckbox->getValue().asBoolean(); + updateStatusTextLength(!add_location); +} + +void LLTwitterPhotoPanel::onAddPhotoToggled() +{ + bool add_photo = mPhotoCheckbox->getValue().asBoolean(); + updateStatusTextLength(!add_photo); +} + +void LLTwitterPhotoPanel::onClickNewSnapshot() +{ + LLSnapshotLivePreview* previewp = getPreviewView(); + if (previewp) + { + previewp->updateSnapshot(TRUE); + } +} + +void LLTwitterPhotoPanel::onClickBigPreview() +{ + // Toggle the preview + if (isPreviewVisible()) + { + LLFloaterReg::hideInstance("big_preview"); + } + else + { + attachPreview(); + LLFloaterReg::showInstance("big_preview"); + } +} + +bool LLTwitterPhotoPanel::isPreviewVisible() +{ + return (mBigPreviewFloater && mBigPreviewFloater->getVisible()); +} + +void LLTwitterPhotoPanel::attachPreview() +{ + if (mBigPreviewFloater) + { + LLSnapshotLivePreview* previewp = getPreviewView(); + mBigPreviewFloater->setPreview(previewp); + mBigPreviewFloater->setFloaterOwner(getParentByType<LLFloater>()); + } +} + +void LLTwitterPhotoPanel::onSend() +{ + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterPhotoPanel"); // just in case it is already listening + LLEventPumps::instance().obtain("TwitterConnectState").listen("LLTwitterPhotoPanel", boost::bind(&LLTwitterPhotoPanel::onTwitterConnectStateChange, this, _1)); + + // Connect to Twitter if necessary and then post + if (LLTwitterConnect::instance().isConnected()) + { + sendPhoto(); + } + else + { + LLTwitterConnect::instance().checkConnectionToTwitter(true); + } +} + +bool LLTwitterPhotoPanel::onTwitterConnectStateChange(const LLSD& data) +{ + switch (data.get("enum").asInteger()) + { + case LLTwitterConnect::TWITTER_CONNECTED: + sendPhoto(); + break; + + case LLTwitterConnect::TWITTER_POSTED: + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterPhotoPanel"); + clearAndClose(); + break; + } + + return false; +} + +void LLTwitterPhotoPanel::sendPhoto() +{ + // Get the status text + std::string status = mStatusTextBox->getValue().asString(); + + // Add the location if required + bool add_location = mLocationCheckbox->getValue().asBoolean(); + if (add_location) + { + // Get the SLURL for the location + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + std::string slurl_string = slurl.getSLURLString(); + + // Use a valid http:// URL if the scheme is secondlife:// + LLURI slurl_uri(slurl_string); + if (slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) + { + slurl_string = DEFAULT_PHOTO_LOCATION_URL; + } + + // Add query parameters so Google Analytics can track incoming clicks! + slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; + + // Add it to the status (pretty crude, but we don't have a better option with photos) + if (status.empty()) + status = slurl_string; + else + status = status + " " + slurl_string; + } + + // Add the photo if required + bool add_photo = mPhotoCheckbox->getValue().asBoolean(); + if (add_photo) + { + // Get the image + LLSnapshotLivePreview* previewp = getPreviewView(); + + // Post to Twitter + LLTwitterConnect::instance().uploadPhoto(previewp->getFormattedImage(), status); + } + else + { + // Just post the status to Twitter + LLTwitterConnect::instance().updateStatus(status); + } + + updateControls(); +} + +void LLTwitterPhotoPanel::clearAndClose() +{ + mStatusTextBox->setValue(DEFAULT_STATUS_TEXT); + + LLFloater* floater = getParentByType<LLFloater>(); + if (floater) + { + floater->closeFloater(); + if (mBigPreviewFloater) + { + mBigPreviewFloater->closeOnFloaterOwnerClosing(floater); + } + } +} + +void LLTwitterPhotoPanel::updateStatusTextLength(BOOL restore_old_status_text) +{ + bool add_location = mLocationCheckbox->getValue().asBoolean(); + bool add_photo = mPhotoCheckbox->getValue().asBoolean(); + + // Restrict the status text length to Twitter's character limit + LLTextEditor* status_text_box = dynamic_cast<LLTextEditor*>(mStatusTextBox); + if (status_text_box) + { + int max_status_length = 140 - (add_location ? 40 : 0) - (add_photo ? 40 : 0); + status_text_box->setMaxTextLength(max_status_length); + if (restore_old_status_text) + { + if (mOldStatusText.length() > status_text_box->getText().length() && status_text_box->getText() == mOldStatusText.substr(0, status_text_box->getText().length())) + { + status_text_box->setText(mOldStatusText); + } + if (mOldStatusText.length() <= max_status_length) + { + mOldStatusText = ""; + } + } + if (status_text_box->getText().length() > max_status_length) + { + if (mOldStatusText.length() < status_text_box->getText().length() || status_text_box->getText() != mOldStatusText.substr(0, status_text_box->getText().length())) + { + mOldStatusText = status_text_box->getText(); + } + status_text_box->setText(mOldStatusText.substr(0, max_status_length)); + } + + // Update the status character counter + int characters_remaining = max_status_length - status_text_box->getText().length(); + mStatusCounterLabel->setValue(characters_remaining); + } + +} + +void LLTwitterPhotoPanel::updateControls() +{ + LLSnapshotLivePreview* previewp = getPreviewView(); + BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); + + // *TODO: Separate maximum size for Web images from postcards + lldebugs << "Is snapshot up-to-date? " << got_snap << llendl; + + updateResolution(FALSE); +} + +void LLTwitterPhotoPanel::updateResolution(BOOL do_update) +{ + LLComboBox* combobox = static_cast<LLComboBox *>(mResolutionComboBox); + LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox); + + std::string sdstring = combobox->getSelectedValue(); + LLSD sdres; + std::stringstream sstream(sdstring); + LLSDSerialize::fromNotation(sdres, sstream, sdstring.size()); + + S32 width = sdres[0]; + S32 height = sdres[1]; + + // Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale + std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : ""); + + LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get()); + if (previewp && combobox->getCurrentIndex() >= 0) + { + S32 original_width = 0 , original_height = 0 ; + previewp->getSize(original_width, original_height) ; + + if (width == 0 || height == 0) + { + // take resolution from current window size + lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl; + previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); + } + else + { + // use the resolution from the selected pre-canned drop-down choice + lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl; + previewp->setSize(width, height); + } + + checkAspectRatio(width); + + previewp->getSize(width, height); + + if (original_width != width || original_height != height) + { + previewp->setSize(width, height); + if (do_update) + { + previewp->updateSnapshot(TRUE); + updateControls(); + } + } + // Get the old filter, compare to the current one "filter_name" and set if changed + std::string original_filter = previewp->getFilter(); + if (original_filter != filter_name) + { + previewp->setFilter(filter_name); + if (do_update) + { + previewp->updateSnapshot(FALSE, TRUE); + updateControls(); + } + } + } +} + +void LLTwitterPhotoPanel::checkAspectRatio(S32 index) +{ + LLSnapshotLivePreview *previewp = getPreviewView() ; + + BOOL keep_aspect = FALSE; + + if (0 == index) // current window size + { + keep_aspect = TRUE; + } + else // predefined resolution + { + keep_aspect = FALSE; + } + + if (previewp) + { + previewp->mKeepAspectRatio = keep_aspect; + } +} + +LLUICtrl* LLTwitterPhotoPanel::getRefreshBtn() +{ + return mRefreshBtn; +} + +/////////////////////////// +//LLTwitterAccountPanel////// +/////////////////////////// + +LLTwitterAccountPanel::LLTwitterAccountPanel() : +mAccountCaptionLabel(NULL), +mAccountNameLabel(NULL), +mPanelButtons(NULL), +mConnectButton(NULL), +mDisconnectButton(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLTwitterAccountPanel::onConnect, this)); + mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLTwitterAccountPanel::onDisconnect, this)); + + setVisibleCallback(boost::bind(&LLTwitterAccountPanel::onVisibilityChange, this, _2)); +} + +BOOL LLTwitterAccountPanel::postBuild() +{ + mAccountCaptionLabel = getChild<LLTextBox>("account_caption_label"); + mAccountNameLabel = getChild<LLTextBox>("account_name_label"); + mPanelButtons = getChild<LLUICtrl>("panel_buttons"); + mConnectButton = getChild<LLUICtrl>("connect_btn"); + mDisconnectButton = getChild<LLUICtrl>("disconnect_btn"); + + return LLPanel::postBuild(); +} + +void LLTwitterAccountPanel::draw() +{ + LLTwitterConnect::EConnectionState connection_state = LLTwitterConnect::instance().getConnectionState(); + + //Disable the 'disconnect' button and the 'use another account' button when disconnecting in progress + bool disconnecting = connection_state == LLTwitterConnect::TWITTER_DISCONNECTING; + mDisconnectButton->setEnabled(!disconnecting); + + //Disable the 'connect' button when a connection is in progress + bool connecting = connection_state == LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS; + mConnectButton->setEnabled(!connecting); + + LLPanel::draw(); +} + +void LLTwitterAccountPanel::onVisibilityChange(BOOL visible) +{ + if(visible) + { + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterAccountPanel"); + LLEventPumps::instance().obtain("TwitterConnectState").listen("LLTwitterAccountPanel", boost::bind(&LLTwitterAccountPanel::onTwitterConnectStateChange, this, _1)); + + LLEventPumps::instance().obtain("TwitterConnectInfo").stopListening("LLTwitterAccountPanel"); + LLEventPumps::instance().obtain("TwitterConnectInfo").listen("LLTwitterAccountPanel", boost::bind(&LLTwitterAccountPanel::onTwitterConnectInfoChange, this)); + + //Connected + if(LLTwitterConnect::instance().isConnected()) + { + showConnectedLayout(); + } + //Check if connected (show disconnected layout in meantime) + else + { + showDisconnectedLayout(); + } + if ((LLTwitterConnect::instance().getConnectionState() == LLTwitterConnect::TWITTER_NOT_CONNECTED) || + (LLTwitterConnect::instance().getConnectionState() == LLTwitterConnect::TWITTER_CONNECTION_FAILED)) + { + LLTwitterConnect::instance().checkConnectionToTwitter(); + } + } + else + { + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterAccountPanel"); + LLEventPumps::instance().obtain("TwitterConnectInfo").stopListening("LLTwitterAccountPanel"); + } +} + +bool LLTwitterAccountPanel::onTwitterConnectStateChange(const LLSD& data) +{ + if(LLTwitterConnect::instance().isConnected()) + { + //In process of disconnecting so leave the layout as is + if(data.get("enum").asInteger() != LLTwitterConnect::TWITTER_DISCONNECTING) + { + showConnectedLayout(); + } + } + else + { + showDisconnectedLayout(); + } + + return false; +} + +bool LLTwitterAccountPanel::onTwitterConnectInfoChange() +{ + LLSD info = LLTwitterConnect::instance().getInfo(); + std::string clickable_name; + + //Strings of format [http://www.somewebsite.com Click Me] become clickable text + if(info.has("link") && info.has("name")) + { + clickable_name = "[" + info["link"].asString() + " " + info["name"].asString() + "]"; + } + + mAccountNameLabel->setText(clickable_name); + + return false; +} + +void LLTwitterAccountPanel::showConnectButton() +{ + if(!mConnectButton->getVisible()) + { + mConnectButton->setVisible(TRUE); + mDisconnectButton->setVisible(FALSE); + } +} + +void LLTwitterAccountPanel::hideConnectButton() +{ + if(mConnectButton->getVisible()) + { + mConnectButton->setVisible(FALSE); + mDisconnectButton->setVisible(TRUE); + } +} + +void LLTwitterAccountPanel::showDisconnectedLayout() +{ + mAccountCaptionLabel->setText(getString("twitter_disconnected")); + mAccountNameLabel->setText(std::string("")); + showConnectButton(); +} + +void LLTwitterAccountPanel::showConnectedLayout() +{ + LLTwitterConnect::instance().loadTwitterInfo(); + + mAccountCaptionLabel->setText(getString("twitter_connected")); + hideConnectButton(); +} + +void LLTwitterAccountPanel::onConnect() +{ + LLTwitterConnect::instance().checkConnectionToTwitter(true); + + //Clear only the twitter browser cookies so that the twitter login screen appears + LLViewerMedia::getCookieStore()->removeCookiesByDomain(".twitter.com"); +} + +void LLTwitterAccountPanel::onDisconnect() +{ + LLTwitterConnect::instance().disconnectFromTwitter(); + + LLViewerMedia::getCookieStore()->removeCookiesByDomain(".twitter.com"); +} + +//////////////////////// +//LLFloaterTwitter/////// +//////////////////////// + +LLFloaterTwitter::LLFloaterTwitter(const LLSD& key) : LLFloater(key), + mTwitterPhotoPanel(NULL), + mStatusErrorText(NULL), + mStatusLoadingText(NULL), + mStatusLoadingIndicator(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterTwitter::onCancel, this)); +} + +void LLFloaterTwitter::onClose(bool app_quitting) +{ + LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } + LLFloater::onClose(app_quitting); +} + +void LLFloaterTwitter::onCancel() +{ + LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } + closeFloater(); +} + +BOOL LLFloaterTwitter::postBuild() +{ + // Keep tab of the Photo Panel + mTwitterPhotoPanel = static_cast<LLTwitterPhotoPanel*>(getChild<LLUICtrl>("panel_twitter_photo")); + // Connection status widgets + mStatusErrorText = getChild<LLTextBox>("connection_error_text"); + mStatusLoadingText = getChild<LLTextBox>("connection_loading_text"); + mStatusLoadingIndicator = getChild<LLUICtrl>("connection_loading_indicator"); + return LLFloater::postBuild(); +} + +void LLFloaterTwitter::showPhotoPanel() +{ + LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mTwitterPhotoPanel->getParent()); + if (!parent) + { + llwarns << "Cannot find panel container" << llendl; + return; + } + + parent->selectTabPanel(mTwitterPhotoPanel); +} + +void LLFloaterTwitter::draw() +{ + if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator) + { + mStatusErrorText->setVisible(false); + mStatusLoadingText->setVisible(false); + mStatusLoadingIndicator->setVisible(false); + LLTwitterConnect::EConnectionState connection_state = LLTwitterConnect::instance().getConnectionState(); + std::string status_text; + + switch (connection_state) + { + case LLTwitterConnect::TWITTER_NOT_CONNECTED: + // No status displayed when first opening the panel and no connection done + case LLTwitterConnect::TWITTER_CONNECTED: + // When successfully connected, no message is displayed + case LLTwitterConnect::TWITTER_POSTED: + // No success message to show since we actually close the floater after successful posting completion + break; + case LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS: + // Connection loading indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterConnecting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLTwitterConnect::TWITTER_POSTING: + // Posting indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterPosting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLTwitterConnect::TWITTER_CONNECTION_FAILED: + // Error connecting to the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterErrorConnecting"); + mStatusErrorText->setValue(status_text); + break; + case LLTwitterConnect::TWITTER_POST_FAILED: + // Error posting to the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterErrorPosting"); + mStatusErrorText->setValue(status_text); + break; + case LLTwitterConnect::TWITTER_DISCONNECTING: + // Disconnecting loading indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterDisconnecting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLTwitterConnect::TWITTER_DISCONNECT_FAILED: + // Error disconnecting from the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterErrorDisconnecting"); + mStatusErrorText->setValue(status_text); + break; + } + } + LLFloater::draw(); +} + diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h new file mode 100644 index 0000000000..f07ec2ca2f --- /dev/null +++ b/indra/newview/llfloatertwitter.h @@ -0,0 +1,139 @@ +/** +* @file llfloatertwitter.h +* @brief Header file for llfloatertwitter +* @author cho@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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_LLFLOATERTWITTER_H +#define LL_LLFLOATERTWITTER_H + +#include "llfloater.h" +#include "lltextbox.h" +#include "llviewertexture.h" + +class LLIconCtrl; +class LLCheckBoxCtrl; +class LLSnapshotLivePreview; +class LLFloaterBigPreview; + +class LLTwitterPhotoPanel : public LLPanel +{ +public: + LLTwitterPhotoPanel(); + ~LLTwitterPhotoPanel(); + + BOOL postBuild(); + void draw(); + + LLSnapshotLivePreview* getPreviewView(); + void onVisibilityChange(BOOL new_visibility); + void onAddLocationToggled(); + void onAddPhotoToggled(); + void onClickBigPreview(); + void onClickNewSnapshot(); + void onSend(); + S32 notify(const LLSD& info); + bool onTwitterConnectStateChange(const LLSD& data); + + void sendPhoto(); + void clearAndClose(); + + void updateStatusTextLength(BOOL restore_old_status_text); + void updateControls(); + void updateResolution(BOOL do_update); + void checkAspectRatio(S32 index); + LLUICtrl* getRefreshBtn(); + +private: + bool isPreviewVisible(); + void attachPreview(); + + LLHandle<LLView> mPreviewHandle; + + LLUICtrl * mSnapshotPanel; + LLUICtrl * mResolutionComboBox; + LLUICtrl * mFilterComboBox; + LLUICtrl * mRefreshBtn; + LLUICtrl * mWorkingLabel; + LLUICtrl * mThumbnailPlaceholder; + LLUICtrl * mStatusCounterLabel; + LLUICtrl * mStatusTextBox; + LLUICtrl * mLocationCheckbox; + LLUICtrl * mPhotoCheckbox; + LLUICtrl * mPostButton; + LLUICtrl * mCancelButton; + LLButton * mBtnPreview; + + LLFloaterBigPreview * mBigPreviewFloater; + + std::string mOldStatusText; +}; + +class LLTwitterAccountPanel : public LLPanel +{ +public: + LLTwitterAccountPanel(); + BOOL postBuild(); + void draw(); + +private: + void onVisibilityChange(BOOL new_visibility); + bool onTwitterConnectStateChange(const LLSD& data); + bool onTwitterConnectInfoChange(); + void onConnect(); + void onUseAnotherAccount(); + void onDisconnect(); + + void showConnectButton(); + void hideConnectButton(); + void showDisconnectedLayout(); + void showConnectedLayout(); + + LLTextBox * mAccountCaptionLabel; + LLTextBox * mAccountNameLabel; + LLUICtrl * mPanelButtons; + LLUICtrl * mConnectButton; + LLUICtrl * mDisconnectButton; +}; + + +class LLFloaterTwitter : public LLFloater +{ +public: + LLFloaterTwitter(const LLSD& key); + BOOL postBuild(); + void draw(); + void onClose(bool app_quitting); + void onCancel(); + + void showPhotoPanel(); + +private: + LLTwitterPhotoPanel* mTwitterPhotoPanel; + LLTextBox* mStatusErrorText; + LLTextBox* mStatusLoadingText; + LLUICtrl* mStatusLoadingIndicator; +}; + +#endif // LL_LLFLOATERTWITTER_H + diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 96a70d9345..bfc36a6bfb 100755 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -1020,12 +1020,11 @@ void LLFloaterUIPreview::onClickEditFloater() // Respond to button click to browse for an executable with which to edit XML files void LLFloaterUIPreview::onClickBrowseForEditor() { - // create load dialog box - LLFilePicker::ELoadFilter type = (LLFilePicker::ELoadFilter)((intptr_t)((void*)LLFilePicker::FFLOAD_ALL)); // nothing for *.exe so just use all + // Let the user choose an executable through the file picker dialog box LLFilePicker& picker = LLFilePicker::instance(); - if (!picker.getOpenFile(type)) // user cancelled -- do nothing + if (!picker.getOpenFile(LLFilePicker::FFLOAD_EXE)) { - return; + return; // user cancelled -- do nothing } // put the selected path into text field diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index f72adbb880..bbfd855bc8 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -31,6 +31,8 @@ #include "llfloaterreg.h" #include "llhttpconstants.h" #include "llfacebookconnect.h" +#include "llflickrconnect.h" +#include "lltwitterconnect.h" #include "lllayoutstack.h" #include "llpluginclassmedia.h" #include "llprogressbar.h" @@ -52,7 +54,8 @@ LLFloaterWebContent::_Params::_Params() allow_back_forward_navigation("allow_back_forward_navigation", true), preferred_media_size("preferred_media_size"), trusted_content("trusted_content", false), - show_page_title("show_page_title", true) + show_page_title("show_page_title", true), + clean_browser("clean_browser", false) {} LLFloaterWebContent::LLFloaterWebContent( const Params& params ) @@ -243,7 +246,7 @@ void LLFloaterWebContent::open_media(const Params& p) LLViewerMedia::proxyWindowOpened(p.target(), p.id()); mWebBrowser->setHomePageUrl(p.url, HTTP_CONTENT_TEXT_HTML); mWebBrowser->setTarget(p.target); - mWebBrowser->navigateTo(p.url, HTTP_CONTENT_TEXT_HTML); + mWebBrowser->navigateTo(p.url, HTTP_CONTENT_TEXT_HTML, p.clean_browser); set_current_url(p.url); @@ -254,11 +257,6 @@ void LLFloaterWebContent::open_media(const Params& p) getChildView("address")->setEnabled(address_entry_enabled); getChildView("popexternal")->setEnabled(address_entry_enabled); - if (!address_entry_enabled) - { - mWebBrowser->setFocus(TRUE); - } - if (!p.show_chrome) { setResizeLimits(100, 100); @@ -304,7 +302,24 @@ void LLFloaterWebContent::onClose(bool app_quitting) LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_CONNECTION_FAILED); } } - + // Same with Flickr + LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web"); + if (flickr_web == this) + { + if (!LLFlickrConnect::instance().isConnected()) + { + LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED); + } + } + // And Twitter + LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web"); + if (twitter_web == this) + { + if (!LLTwitterConnect::instance().isConnected()) + { + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED); + } + } LLViewerMedia::proxyWindowClosed(mUUID); destroy(); } @@ -440,9 +455,6 @@ void LLFloaterWebContent::set_current_url(const std::string& url) mAddressCombo->remove(mCurrentURL); mAddressCombo->add(mDisplayURL); mAddressCombo->selectByValue(mDisplayURL); - - // Set the focus back to the web page. When setting the url, there's no point to leave the focus anywhere else. - mWebBrowser->setFocus(TRUE); } } diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index ad56eec859..f5faa39e3d 100755 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -57,7 +57,8 @@ public: allow_address_entry, allow_back_forward_navigation, trusted_content, - show_page_title; + show_page_title, + clean_browser; Optional<LLRect> preferred_media_size; _Params(); diff --git a/indra/newview/llimagefiltersmanager.cpp b/indra/newview/llimagefiltersmanager.cpp new file mode 100644 index 0000000000..ee6b39efac --- /dev/null +++ b/indra/newview/llimagefiltersmanager.cpp @@ -0,0 +1,115 @@ +/** + * @file llimagefiltersmanager.cpp + * @brief Load image filters list and retrieve their path. Mostly used for Flickr UI 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 "llimagefiltersmanager.h" + +#include "lldiriterator.h" +#include "lltrans.h" + +std::string get_sys_dir() +{ + return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "filters", ""); +} + +//--------------------------------------------------------------------------- +// LLImageFiltersManager +//--------------------------------------------------------------------------- + +LLImageFiltersManager::LLImageFiltersManager() +{ +} + +LLImageFiltersManager::~LLImageFiltersManager() +{ +} + +// virtual static +void LLImageFiltersManager::initSingleton() +{ + loadAllFilters(); +} + +void LLImageFiltersManager::loadAllFilters() +{ + // Load system (coming out of the box) filters + loadFiltersFromDir(get_sys_dir()); +} + +void LLImageFiltersManager::loadFiltersFromDir(const std::string& dir) +{ + mFiltersList.clear(); + + LLDirIterator dir_iter(dir, "*.xml"); + while (1) + { + std::string file_name; + if (!dir_iter.next(file_name)) + { + break; // no more files + } + + // Get the ".xml" out of the file name to get the filter name. That's the one known in strings.xml + std::string filter_name_untranslated = file_name.substr(0,file_name.length()-4); + + // Get the localized name for the filter + std::string filter_name_translated; + bool translated = LLTrans::findString(filter_name_translated, filter_name_untranslated); + std::string filter_name = (translated ? filter_name_translated: filter_name_untranslated); + + // Store the filter in the list with its associated file name + mFiltersList[filter_name] = file_name; + } +} + +// Note : That method is a bit heavy handed but the list of filters is always small (10 or so) +// and that method is typically called only once when building UI widgets. +const std::vector<std::string> LLImageFiltersManager::getFiltersList() const +{ + std::vector<std::string> filter_list; + for (std::map<std::string,std::string>::const_iterator it = mFiltersList.begin(); it != mFiltersList.end(); ++it) + { + filter_list.push_back(it->first); + } + return filter_list; +} + +std::string LLImageFiltersManager::getFilterPath(const std::string& filter_name) +{ + std::string path = ""; + std::map<std::string,std::string>::const_iterator it = mFiltersList.find(filter_name); + if (it != mFiltersList.end()) + { + // Get the file name for that filter and build the complete path + std::string file = it->second; + std::string dir = get_sys_dir(); + path = gDirUtilp->add(dir, file); + } + return path; +} + +//============================================================================ diff --git a/indra/newview/llimagefiltersmanager.h b/indra/newview/llimagefiltersmanager.h new file mode 100644 index 0000000000..4751933065 --- /dev/null +++ b/indra/newview/llimagefiltersmanager.h @@ -0,0 +1,55 @@ +/** + * @file llimagefiltersmanager.h + * @brief Load image filters list and retrieve their path. Mostly used for Flickr UI 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_LLIMAGEFILTERSMANAGER_H +#define LL_LLIMAGEFILTERSMANAGER_H + +#include "llsingleton.h" + +//============================================================================ +// LLImageFiltersManager class + +class LLImageFiltersManager : public LLSingleton<LLImageFiltersManager> +{ + LOG_CLASS(LLImageFiltersManager); +public: + const std::vector<std::string> getFiltersList() const; + std::string getFilterPath(const std::string& filter_name); + +private: + void loadAllFilters(); + void loadFiltersFromDir(const std::string& dir); + + friend class LLSingleton<LLImageFiltersManager>; + /*virtual*/ void initSingleton(); + LLImageFiltersManager(); + ~LLImageFiltersManager(); + + // List of filters : first is the user friendly localized name, second is the xml file name + std::map<std::string,std::string> mFiltersList; +}; + +#endif // LL_LLIMAGEFILTERSMANAGER_H diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917c07759..1b0f370536 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1353,7 +1353,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // IM_SESSION_INVITE means that this is an Ad-hoc incoming chat // (it can be also Group chat but it is checked above) // In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added - // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. + // to Recent People to prevent showing of an item with (?? ?)(?? ?), sans the spaces. See EXT-8246. // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 8185cbb1a3..7861573908 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -61,6 +61,7 @@ #include "llglheaders.h" #include "lltrans.h" #include "llvoavatarself.h" +#include "llhudrender.h" const F32 RADIUS_PIXELS = 100.f; // size in screen space const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS; @@ -452,6 +453,9 @@ BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) // Route future Mouse messages here preemptively. (Release on mouse up.) setMouseCapture( TRUE ); LLSelectMgr::getInstance()->enableSilhouette(FALSE); + + mHelpTextTimer.reset(); + sNumTimesHelpTextShown++; return TRUE; } @@ -1111,6 +1115,31 @@ void LLManipRotate::renderSnapGuides() } } } + + + // render help text + if (mObjectSelection->getSelectType() != SELECT_TYPE_HUD) + { + if (mHelpTextTimer.getElapsedTimeF32() < sHelpTextVisibleTime + sHelpTextFadeTime && sNumTimesHelpTextShown < sMaxTimesShowHelpText) + { + LLVector3 selection_center_start = LLSelectMgr::getInstance()->getSavedBBoxOfSelection().getCenterAgent(); + + LLVector3 offset_dir = LLViewerCamera::getInstance()->getUpAxis(); + + F32 line_alpha = gSavedSettings.getF32("GridOpacity"); + + LLVector3 help_text_pos = selection_center_start + (mRadiusMeters * 3.f * offset_dir); + const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); + + std::string help_text = LLTrans::getString("manip_hint1"); + LLColor4 help_text_color = LLColor4::white; + help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + help_text = LLTrans::getString("manip_hint2"); + help_text_pos -= offset_dir * mRadiusMeters * 0.4f; + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + } + } } // Returns TRUE if center of sphere is visible. Also sets a bunch of member variables that are used later (e.g. mCenterToCam) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 8c531e476d..109d6b31b2 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -59,7 +59,7 @@ #include "v2math.h" #include "llvoavatar.h" #include "llmeshrepository.h" - +#include "lltrans.h" const F32 MAX_MANIP_SELECT_DISTANCE_SQUARED = 11.f * 11.f; const F32 SNAP_GUIDE_SCREEN_OFFSET = 0.05f; @@ -68,7 +68,7 @@ const F32 SELECTED_MANIPULATOR_SCALE = 1.2f; const F32 MANIPULATOR_SCALE_HALF_LIFE = 0.07f; const S32 NUM_MANIPULATORS = 14; -const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = +const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = { LLManip::LL_CORNER_NNN, LLManip::LL_CORNER_NNP, @@ -87,7 +87,7 @@ const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = }; -F32 get_default_max_prim_scale(bool is_flora) +F32 get_default_max_prim_scale(bool is_flora) { // a bit of a hack, but if it's foilage, we don't want to use the // new larger scale which would result in giant trees and grass @@ -97,7 +97,7 @@ F32 get_default_max_prim_scale(bool is_flora) return DEFAULT_MAX_PRIM_SCALE; } else - { + { return DEFAULT_MAX_PRIM_SCALE_NO_MESH; } } @@ -179,7 +179,7 @@ void LLManipScale::handleSelect() } LLManipScale::LLManipScale( LLToolComposite* composite ) - : + : LLManip( std::string("Scale"), composite ), mBoxHandleSize( 1.f ), mScaledBoxHandleSize( 1.f ), @@ -190,10 +190,12 @@ LLManipScale::LLManipScale( LLToolComposite* composite ) mScaleSnapUnit1(1.f), mScaleSnapUnit2(1.f), mSnapRegimeOffset(0.f), + mTickPixelSpacing1(0.f), + mTickPixelSpacing2(0.f), mSnapGuideLength(0.f), - mInSnapRegime(FALSE), - mScaleSnapValue(0.f) -{ + mSnapRegime(SNAP_REGIME_NONE), + mScaleSnappedValue(0.f) +{ mManipulatorScales = new F32[NUM_MANIPULATORS]; for (S32 i = 0; i < NUM_MANIPULATORS; i++) { @@ -214,7 +216,7 @@ void LLManipScale::render() LLGLDepthTest gls_depth(GL_TRUE); LLGLEnable gl_blend(GL_BLEND); LLGLEnable gls_alpha_test(GL_ALPHA_TEST); - + if( canAffectSelection() ) { gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -226,11 +228,11 @@ void LLManipScale::render() } //////////////////////////////////////////////////////////////////////// - // Calculate size of drag handles + // Calculate size of drag handles const F32 BOX_HANDLE_BASE_SIZE = 50.0f; // box size in pixels = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR const F32 BOX_HANDLE_BASE_FACTOR = 0.2f; - + LLVector3 center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal()); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) @@ -283,7 +285,7 @@ void LLManipScale::render() rot.getAngleAxis(&angle_radians, &x, &y, &z); gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z); - + { LLGLEnable poly_offset(GL_POLYGON_OFFSET_FILL); glPolygonOffset( -2.f, -2.f); @@ -345,7 +347,7 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); LLVector3 box_center_agent = bbox.getCenterAgent(); LLVector3 box_corner_agent = bbox.localToAgent( unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ) ); - + updateSnapGuides(bbox); mDragStartPointGlobal = gAgent.getPosGlobalFromAgent(box_corner_agent); @@ -372,27 +374,27 @@ BOOL LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask) if( hasMouseCapture() ) { - if( (LL_FACE_MIN <= (S32)mManipPart) + if( (LL_FACE_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_FACE_MAX) ) { sendUpdates(TRUE,TRUE,FALSE); } else - if( (LL_CORNER_MIN <= (S32)mManipPart) + if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { sendUpdates(TRUE,TRUE,TRUE); } - + //send texture update LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, getStretchTextures()); - + LLSelectMgr::getInstance()->enableSilhouette(TRUE); mManipPart = LL_NO_PART; // Might have missed last update due to UPDATE_DELAY timing LLSelectMgr::getInstance()->sendMultipleUpdate( mLastUpdateFlags ); - + //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK); } @@ -417,11 +419,11 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask) } else { - mInSnapRegime = FALSE; + mSnapRegime = SNAP_REGIME_NONE; // not dragging... highlightManipulators(x, y); } - + // Patch up textures, if possible. LLSelectMgr::getInstance()->adjustTexturesByScale(FALSE, getStretchTextures()); @@ -458,7 +460,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) LLMatrix4 projMatrix = LLViewerCamera::getInstance()->getProjection(); LLMatrix4 modelView = LLViewerCamera::getInstance()->getModelview(); transform.initAll(LLVector3(1.f, 1.f, 1.f), bbox.getRotation(), bbox.getPositionAgent()); - + transform *= modelView; transform *= projMatrix; } @@ -477,7 +479,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], min.mV[VY], max.mV[VZ], 1.f); mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], max.mV[VY], min.mV[VZ], 1.f); mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], max.mV[VY], max.mV[VZ], 1.f); - + // 1-D highlights are applicable iff one object is selected if( mObjectSelection->getObjectCount() == 1 ) { @@ -492,13 +494,13 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) for_each(mProjectedManipulators.begin(), mProjectedManipulators.end(), DeletePointer()); mProjectedManipulators.clear(); - + for (S32 i = 0; i < numManips; i++) { LLVector4 projectedVertex = mManipulatorVertices[i] * transform; projectedVertex = projectedVertex * (1.f / projectedVertex.mV[VW]); - ManipulatorHandle* projManipulator = new ManipulatorHandle(LLVector3(projectedVertex.mV[VX], projectedVertex.mV[VY], + ManipulatorHandle* projManipulator = new ManipulatorHandle(LLVector3(projectedVertex.mV[VX], projectedVertex.mV[VY], projectedVertex.mV[VZ]), MANIPULATOR_IDS[i], (i < 7) ? SCALE_MANIP_CORNER : SCALE_MANIP_FACE); mProjectedManipulators.insert(projManipulator); } @@ -512,15 +514,15 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) mHighlightedPart = LL_NO_PART; - for (minpulator_list_t::iterator iter = mProjectedManipulators.begin(); + for (manipulator_list_t::iterator iter = mProjectedManipulators.begin(); iter != mProjectedManipulators.end(); ++iter) { ManipulatorHandle* manipulator = *iter; { - manip2d.setVec(manipulator->mPosition.mV[VX] * half_width, manipulator->mPosition.mV[VY] * half_height); - + manip2d.set(manipulator->mPosition.mV[VX] * half_width, manipulator->mPosition.mV[VY] * half_height); + delta = manip2d - mousePos; - if (delta.magVecSquared() < MAX_MANIP_SELECT_DISTANCE_SQUARED) + if (delta.lengthSquared() < MAX_MANIP_SELECT_DISTANCE_SQUARED) { mHighlightedPart = manipulator->mManipID; @@ -549,36 +551,36 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) void LLManipScale::renderFaces( const LLBBox& bbox ) { - // Don't bother to render the drag handles for 1-D scaling if + // Don't bother to render the drag handles for 1-D scaling if // more than one object is selected or if it is an attachment if ( mObjectSelection->getObjectCount() > 1 ) { return; } - // This is a flattened representation of the box as render here - // . - // (+++) (++-) /|\t - // +------------+ | (texture coordinates) - // | | | - // | 1 | (*) --->s - // | +X | + // This is a flattened representation of the box as render here + // . + // (+++) (++-) /|\t + // +------------+ | (texture coordinates) + // | | | + // | 1 | (*) --->s + // | +X | + // | | + // (+++) (+-+)| |(+--) (++-) (+++) + // +------------+------------+------------+------------+ + // |0 3|3 7|7 4|4 0| + // | 0 | 4 | 5 | 2 | + // | +Z | -Y | -Z | +Y | + // | | | | | + // |1 2|2 6|6 5|5 1| + // +------------+------------+------------+------------+ + // (-++) (--+)| |(---) (-+-) (-++) + // | 3 | + // | -X | + // | | // | | - // (+++) (+-+)| |(+--) (++-) (+++) - // +------------+------------+------------+------------+ - // |0 3|3 7|7 4|4 0| - // | 0 | 4 | 5 | 2 | - // | +Z | -Y | -Z | +Y | - // | | | | | - // |1 2|2 6|6 5|5 1| - // +------------+------------+------------+------------+ - // (-++) (--+)| |(---) (-+-) (-++) - // | 3 | - // | -X | - // | | - // | | - // +------------+ - // (-++) (-+-) + // +------------+ + // (-++) (-+-) LLColor4 highlight_color( 1.f, 1.f, 1.f, 0.5f); LLColor4 normal_color( 1.f, 1.f, 1.f, 0.3f); @@ -602,7 +604,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) { gGL.color4fv( default_normal_color.mV ); LLGLDepthTest gls_depth(GL_FALSE); - gGL.begin(LLRender::QUADS); + gGL.begin(LLRender::QUADS); { // Face 0 gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]); @@ -645,9 +647,9 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) // Find nearest vertex LLVector3 orientWRTHead = bbox.agentToLocalBasis( bbox.getCenterAgent() - gAgentCamera.getCameraPositionAgent() ); - U32 nearest = - (orientWRTHead.mV[0] < 0.0f ? 1 : 0) + - (orientWRTHead.mV[1] < 0.0f ? 2 : 0) + + U32 nearest = + (orientWRTHead.mV[0] < 0.0f ? 1 : 0) + + (orientWRTHead.mV[1] < 0.0f ? 2 : 0) + (orientWRTHead.mV[2] < 0.0f ? 4 : 0); // opposite faces on Linden cubes: @@ -656,7 +658,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) // 2 & 4 // Table of order to draw faces, based on nearest vertex - static U32 face_list[8][6] = { + static U32 face_list[8][6] = { { 2,0,1, 4,5,3 }, // v6 F201 F453 { 2,0,3, 4,5,1 }, // v7 F203 F451 { 4,0,1, 2,5,3 }, // v5 F401 F253 @@ -723,7 +725,7 @@ void LLManipScale::renderEdges( const LLBBox& bbox ) { gGL.translatef( center_to_edge.mV[0], center_to_edge.mV[1], center_to_edge.mV[2] ); conditionalHighlight( part ); - gGL.scalef( + gGL.scalef( direction.mV[0] ? edge_width : extent.mV[VX], direction.mV[1] ? edge_width : extent.mV[VY], direction.mV[2] ? edge_width : extent.mV[VZ] ); @@ -757,7 +759,7 @@ void LLManipScale::renderCorners( const LLBBox& bbox ) y_offset = bbox.getMaxLocal().mV[VY]; } x_offset = bbox.getMaxLocal().mV[VX]; - } + } } @@ -782,7 +784,7 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en { // Draws a single "jacks" style handle: a long, retangular box from start to end. LLVector3 offset_start = end - start; - offset_start.normVec(); + offset_start.normalize(); offset_start = start + mBoxHandleSize * offset_start; LLVector3 delta = end - offset_start; @@ -791,7 +793,7 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en gGL.pushMatrix(); { gGL.translatef( pos.mV[VX], pos.mV[VY], pos.mV[VZ] ); - gGL.scalef( + gGL.scalef( mBoxHandleSize + llabs(delta.mV[VX]), mBoxHandleSize + llabs(delta.mV[VY]), mBoxHandleSize + llabs(delta.mV[VZ])); @@ -805,21 +807,20 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en } } - +// General scale call void LLManipScale::drag( S32 x, S32 y ) { - if( (LL_FACE_MIN <= (S32)mManipPart) + if( (LL_FACE_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_FACE_MAX) ) { dragFace( x, y ); } - else - if( (LL_CORNER_MIN <= (S32)mManipPart) + else if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { dragCorner( x, y ); } - + // store changes to override updates for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin(); iter != LLSelectMgr::getInstance()->getSelection()->end(); iter++) @@ -834,13 +835,13 @@ void LLManipScale::drag( S32 x, S32 y ) selectNode->mLastScale = cur->getScale(); selectNode->mLastPositionLocal = cur->getPosition(); } - } + } LLSelectMgr::getInstance()->updateSelectionCenter(); - gAgentCamera.clearFocusObject(); + gAgentCamera.clearFocusObject(); } -// Scale around the +// Scale on three axis simultaneously void LLManipScale::dragCorner( S32 x, S32 y ) { // Suppress scale if mouse hasn't moved. @@ -855,11 +856,11 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLVector3 drag_start_center_agent = gAgent.getPosAgentFromGlobal(mDragStartCenterGlobal); LLVector3d drag_start_dir_d; - drag_start_dir_d.setVec(mDragStartPointGlobal - mDragStartCenterGlobal); + drag_start_dir_d.set(mDragStartPointGlobal - mDragStartCenterGlobal); F32 s = 0; F32 t = 0; - nearestPointOnLineFromMouse(x, y, + nearestPointOnLineFromMouse(x, y, drag_start_center_agent, drag_start_point_agent, s, t ); @@ -888,22 +889,20 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLVector3 projected_drag_pos1 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane1, mSnapGuideDir1)); LLVector3 projected_drag_pos2 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane2, mSnapGuideDir2)); - LLVector3 mouse_offset_from_scale_line_1 = orthogonal_component(mouse_on_plane1, mScaleDir); - LLVector3 mouse_offset_from_scale_line_2 = orthogonal_component(mouse_on_plane2, mScaleDir); - BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset) { - F32 drag_dist = projected_drag_pos1.length(); + F32 drag_dist = mScaleDir * projected_drag_pos1; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug. - F32 cur_subdivisions = llclamp(getSubdivisionLevel(projected_drag_pos1, mScaleDir, mScaleSnapUnit1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos1, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions); F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions); - mScaleSnapValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); + mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); + scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); + mScaleSnappedValue /= mScaleSnapUnit1 * 2.f; + mSnapRegime = SNAP_REGIME_UPPER; - mInSnapRegime = TRUE; - scale_factor = mScaleSnapValue / dist_vec(drag_start_point_agent, drag_start_center_agent); if (!uniform) { scale_factor *= 0.5f; @@ -911,24 +910,25 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } else if (snap_enabled && (mouse_on_plane2 - projected_drag_pos2) * mSnapGuideDir2 > mSnapRegimeOffset ) { - F32 drag_dist = projected_drag_pos2.length(); + F32 drag_dist = mScaleDir * projected_drag_pos2; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug. - F32 cur_subdivisions = llclamp(getSubdivisionLevel(projected_drag_pos2, mScaleDir, mScaleSnapUnit2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos2, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit2 / (2.f * cur_subdivisions); F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit2 / cur_subdivisions); - mScaleSnapValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); + mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); + scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); + mScaleSnappedValue /= mScaleSnapUnit2 * 2.f; + mSnapRegime = SNAP_REGIME_LOWER; - mInSnapRegime = TRUE; - scale_factor = mScaleSnapValue / dist_vec(drag_start_point_agent, drag_start_center_agent); if (!uniform) { scale_factor *= 0.5f; } } - else + else { - mInSnapRegime = FALSE; + mSnapRegime = SNAP_REGIME_NONE; scale_factor = t; if (!uniform) { @@ -978,7 +978,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) { const LLVector3& scale = selectNode->mSavedScale; cur->setScale( scale_factor * scale ); - + LLVector3 delta_pos; LLVector3 original_pos = cur->getPositionEdit(); LLVector3d new_pos_global = drag_global + (selectNode->mSavedPositionGlobal - drag_global) * scale_factor; @@ -988,7 +988,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } cur->setPositionAbsoluteGlobal( new_pos_global ); rebuild(cur); - + delta_pos = cur->getPositionEdit() - original_pos; if (selectNode->mIndividualSelection) @@ -1029,7 +1029,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) { const LLVector3& scale = selectNode->mSavedScale; cur->setScale( scale_factor * scale, FALSE ); - + if (!selectNode->mIndividualSelection) { cur->setPosition(selectNode->mSavedPositionLocal * scale_factor); @@ -1038,16 +1038,14 @@ void LLManipScale::dragCorner( S32 x, S32 y ) rebuild(cur); } } - } - +// Scale on a single axis void LLManipScale::dragFace( S32 x, S32 y ) { // Suppress scale if mouse hasn't moved. if (x == mLastMouseX && y == mLastMouseY) { - // sendUpdates(TRUE,TRUE,FALSE); return; } @@ -1060,9 +1058,9 @@ void LLManipScale::dragFace( S32 x, S32 y ) LLVector3 drag_start_center_agent = gAgent.getPosAgentFromGlobal(drag_start_center_global); LLVector3d drag_start_dir_d; - drag_start_dir_d.setVec(drag_start_point_global - drag_start_center_global); + drag_start_dir_d.set(drag_start_point_global - drag_start_center_global); LLVector3 drag_start_dir_f; - drag_start_dir_f.setVec(drag_start_dir_d); + drag_start_dir_f.set(drag_start_dir_d); LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); @@ -1106,26 +1104,26 @@ void LLManipScale::dragFace( S32 x, S32 y ) if (snap_enabled && dist_from_scale_line > mSnapRegimeOffset) { - mInSnapRegime = TRUE; + mSnapRegime = static_cast<ESnapRegimes>(SNAP_REGIME_UPPER | SNAP_REGIME_LOWER); // A face drag doesn't have split regimes. - if (dist_along_scale_line > max_drag_dist) + if (dist_along_scale_line > max_drag_dist) { - mScaleSnapValue = max_drag_dist; + mScaleSnappedValue = max_drag_dist; LLVector3 clamp_point = mScaleCenter + max_drag_dist * mScaleDir; - drag_delta.setVec(clamp_point - drag_start_point_agent); + drag_delta.set(clamp_point - drag_start_point_agent); } else if (dist_along_scale_line < min_drag_dist) { - mScaleSnapValue = min_drag_dist; + mScaleSnappedValue = min_drag_dist; LLVector3 clamp_point = mScaleCenter + min_drag_dist * mScaleDir; - drag_delta.setVec(clamp_point - drag_start_point_agent); + drag_delta.set(clamp_point - drag_start_point_agent); } else { F32 drag_dist = scale_center_to_mouse * mScaleDir; - F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions); F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions); relative_snap_dist -= snap_dist; @@ -1139,7 +1137,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) drag_dist - max_drag_dist, drag_dist - min_drag_dist); - mScaleSnapValue = drag_dist - relative_snap_dist; + mScaleSnappedValue = (drag_dist - relative_snap_dist) / (mScaleSnapUnit1 * 2.f); if (llabs(relative_snap_dist) < snap_dist) { @@ -1153,9 +1151,9 @@ void LLManipScale::dragFace( S32 x, S32 y ) } } } - else + else { - mInSnapRegime = FALSE; + mSnapRegime = SNAP_REGIME_NONE; } LLVector3 dir_agent; @@ -1171,7 +1169,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) { dir_agent = bbox.localToAgentBasis( LLVector3::z_axis ); } - stretchFace( + stretchFace( projected_vec(drag_start_dir_f, dir_agent) + drag_start_center_agent, projected_vec(drag_delta, dir_agent)); @@ -1190,7 +1188,7 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat U32 update_flags = UPD_NONE; if (send_position_update) update_flags |= UPD_POSITION; if (send_scale_update) update_flags |= UPD_SCALE; - + // BOOL send_type = SEND_INDIVIDUALS; if (corner) { @@ -1238,7 +1236,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto S32 axis_index = axis.mV[0] ? 0 : (axis.mV[1] ? 1 : 2 ); LLVector3 delta_local = end_local - start_local; - F32 delta_local_mag = delta_local.magVec(); + F32 delta_local_mag = delta_local.length(); LLVector3 dir_local; if (delta_local_mag == 0.f) { @@ -1258,13 +1256,13 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto LLVector3 scale = cur->getScale(); scale.mV[axis_index] = desired_scale; cur->setScale(scale, FALSE); - rebuild(cur); + rebuild(cur); LLVector3 delta_pos; if( !getUniform() ) { LLVector3 delta_pos_local = axis * (0.5f * desired_delta_size); LLVector3d delta_pos_global; - delta_pos_global.setVec(cur_bbox.localToAgent( delta_pos_local ) - cur_bbox.getCenterAgent()); + delta_pos_global.set(cur_bbox.localToAgent( delta_pos_local ) - cur_bbox.getCenterAgent()); LLVector3 cur_pos = cur->getPositionEdit(); if (cur->isRootEdit() && !cur->isAttachment()) @@ -1313,7 +1311,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto void LLManipScale::renderGuidelinesPart( const LLBBox& bbox ) { LLVector3 guideline_start = bbox.getCenterLocal(); - + LLVector3 guideline_end = unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ); if (!getUniform()) @@ -1322,7 +1320,7 @@ void LLManipScale::renderGuidelinesPart( const LLBBox& bbox ) } guideline_end -= guideline_start; - guideline_end.normVec(); + guideline_end.normalize(); guideline_end *= LLWorld::getInstance()->getRegionWidthInMeters(); guideline_end += guideline_start; @@ -1343,26 +1341,27 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) LLQuaternion grid_rotation; LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale); + bool uniform = LLManipScale::getUniform(); + LLVector3 box_corner_agent = bbox.localToAgent(unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox )); - mScaleCenter = getUniform() ? bbox.getCenterAgent() : bbox.localToAgent(unitVectorToLocalBBoxExtent( -1.f * partToUnitVector( mManipPart ), bbox )); + mScaleCenter = uniform ? bbox.getCenterAgent() : bbox.localToAgent(unitVectorToLocalBBoxExtent( -1.f * partToUnitVector( mManipPart ), bbox )); mScaleDir = box_corner_agent - mScaleCenter; - mScaleDir.normVec(); + mScaleDir.normalize(); if(mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgentCamera.mHUDCurZoom; - } else { - F32 object_distance = dist_vec(mScaleCenter, LLViewerCamera::getInstance()->getOrigin()); + F32 object_distance = dist_vec(box_corner_agent, LLViewerCamera::getInstance()->getOrigin()); mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWorldViewWidthRaw() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); } LLVector3 cam_at_axis; F32 snap_guide_length; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - cam_at_axis.setVec(1.f, 0.f, 0.f); + cam_at_axis.set(1.f, 0.f, 0.f); snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgentCamera.mHUDCurZoom; } else @@ -1371,22 +1370,21 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) F32 manipulator_distance = dist_vec(box_corner_agent, LLViewerCamera::getInstance()->getOrigin()); snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWorldViewWidthRaw() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); } - + mSnapGuideLength = snap_guide_length / llmax(0.1f, (llmin(mSnapGuideDir1 * cam_at_axis, mSnapGuideDir2 * cam_at_axis))); LLVector3 off_axis_dir = mScaleDir % cam_at_axis; - off_axis_dir.normVec(); + off_axis_dir.normalize(); if( (LL_FACE_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_FACE_MAX) ) { - LLVector3 object_scale = bbox.getMaxLocal(); - object_scale.scaleVec(off_axis_dir * ~bbox.getRotation()); - object_scale.abs(); - if (object_scale.mV[VX] > object_scale.mV[VY] && object_scale.mV[VX] > object_scale.mV[VZ]) + LLVector3 bbox_relative_cam_dir = off_axis_dir * ~bbox.getRotation(); + bbox_relative_cam_dir.abs(); + if (bbox_relative_cam_dir.mV[VX] > bbox_relative_cam_dir.mV[VY] && bbox_relative_cam_dir.mV[VX] > bbox_relative_cam_dir.mV[VZ]) { mSnapGuideDir1 = LLVector3::x_axis * bbox.getRotation(); } - else if (object_scale.mV[VY] > object_scale.mV[VZ]) + else if (bbox_relative_cam_dir.mV[VY] > bbox_relative_cam_dir.mV[VZ]) { mSnapGuideDir1 = LLVector3::y_axis * bbox.getRotation(); } @@ -1396,7 +1394,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } LLVector3 scale_snap = grid_scale; - mScaleSnapUnit1 = scale_snap.scaleVec(partToUnitVector( mManipPart )).magVec(); + mScaleSnapUnit1 = scale_snap.scaleVec(partToUnitVector( mManipPart )).length(); mScaleSnapUnit2 = mScaleSnapUnit1; mSnapGuideDir1 *= mSnapGuideDir1 * LLViewerCamera::getInstance()->getUpAxis() > 0.f ? 1.f : -1.f; mSnapGuideDir2 = mSnapGuideDir1 * -1.f; @@ -1405,7 +1403,6 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } else if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { - LLVector3 local_scale_dir = partToUnitVector( mManipPart ); LLVector3 local_camera_dir; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { @@ -1413,74 +1410,133 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } else { - local_camera_dir = (LLViewerCamera::getInstance()->getOrigin() - bbox.getCenterAgent()) * ~bbox.getRotation(); - local_camera_dir.normVec(); - } - local_scale_dir -= projected_vec(local_scale_dir, local_camera_dir); - local_scale_dir.normVec(); - LLVector3 x_axis_proj_camera = LLVector3::x_axis - projected_vec(LLVector3::x_axis, local_camera_dir); - x_axis_proj_camera.normVec(); - LLVector3 y_axis_proj_camera = LLVector3::y_axis - projected_vec(LLVector3::y_axis, local_camera_dir); - y_axis_proj_camera.normVec(); - LLVector3 z_axis_proj_camera = LLVector3::z_axis - projected_vec(LLVector3::z_axis, local_camera_dir); - z_axis_proj_camera.normVec(); - F32 x_axis_proj = llabs(local_scale_dir * x_axis_proj_camera); - F32 y_axis_proj = llabs(local_scale_dir * y_axis_proj_camera); - F32 z_axis_proj = llabs(local_scale_dir * z_axis_proj_camera); - - if (x_axis_proj > y_axis_proj && x_axis_proj > z_axis_proj) - { - mSnapGuideDir1 = LLVector3::y_axis; - mScaleSnapUnit2 = grid_scale.mV[VY]; - mSnapGuideDir2 = LLVector3::z_axis; - mScaleSnapUnit1 = grid_scale.mV[VZ]; - } - else if (y_axis_proj > z_axis_proj) - { - mSnapGuideDir1 = LLVector3::x_axis; - mScaleSnapUnit2 = grid_scale.mV[VX]; - mSnapGuideDir2 = LLVector3::z_axis; - mScaleSnapUnit1 = grid_scale.mV[VZ]; - } - else - { - mSnapGuideDir1 = LLVector3::x_axis; - mScaleSnapUnit2 = grid_scale.mV[VX]; - mSnapGuideDir2 = LLVector3::y_axis; - mScaleSnapUnit1 = grid_scale.mV[VY]; + local_camera_dir = (LLViewerCamera::getInstance()->getOrigin() - box_corner_agent) * ~bbox.getRotation(); + local_camera_dir.normalize(); } - LLVector3 snap_guide_flip(1.f, 1.f, 1.f); + LLVector3 axis_flip; switch (mManipPart) { case LL_CORNER_NNN: + axis_flip.set(1.f, 1.f, 1.f); break; case LL_CORNER_NNP: - snap_guide_flip.setVec(1.f, 1.f, -1.f); + axis_flip.set(1.f, 1.f, -1.f); break; case LL_CORNER_NPN: - snap_guide_flip.setVec(1.f, -1.f, 1.f); + axis_flip.set(1.f, -1.f, 1.f); break; case LL_CORNER_NPP: - snap_guide_flip.setVec(1.f, -1.f, -1.f); + axis_flip.set(1.f, -1.f, -1.f); break; case LL_CORNER_PNN: - snap_guide_flip.setVec(-1.f, 1.f, 1.f); + axis_flip.set(-1.f, 1.f, 1.f); break; case LL_CORNER_PNP: - snap_guide_flip.setVec(-1.f, 1.f, -1.f); + axis_flip.set(-1.f, 1.f, -1.f); break; case LL_CORNER_PPN: - snap_guide_flip.setVec(-1.f, -1.f, 1.f); + axis_flip.set(-1.f, -1.f, 1.f); break; case LL_CORNER_PPP: - snap_guide_flip.setVec(-1.f, -1.f, -1.f); + axis_flip.set(-1.f, -1.f, -1.f); + break; + default: + break; + } + + // account for which side of the object the camera is located and negate appropriate axes + local_camera_dir.scaleVec(axis_flip); + + // normalize to object scale + LLVector3 bbox_extent = bbox.getExtentLocal(); + local_camera_dir.scaleVec(LLVector3(1.f / bbox_extent.mV[VX], 1.f / bbox_extent.mV[VY], 1.f / bbox_extent.mV[VZ])); + + S32 scale_face = -1; + + if ((local_camera_dir.mV[VX] > 0.f) == (local_camera_dir.mV[VY] > 0.f)) + { + if ((local_camera_dir.mV[VZ] > 0.f) == (local_camera_dir.mV[VY] > 0.f)) + { + LLVector3 local_camera_dir_abs = local_camera_dir; + local_camera_dir_abs.abs(); + // all neighboring faces of bbox are pointing towards camera or away from camera + // use largest magnitude face for snap guides + if (local_camera_dir_abs.mV[VX] > local_camera_dir_abs.mV[VY]) + { + if (local_camera_dir_abs.mV[VX] > local_camera_dir_abs.mV[VZ]) + { + scale_face = VX; + } + else + { + scale_face = VZ; + } + } + else // y > x + { + if (local_camera_dir_abs.mV[VY] > local_camera_dir_abs.mV[VZ]) + { + scale_face = VY; + } + else + { + scale_face = VZ; + } + } + } + else + { + // z axis facing opposite direction from x and y relative to camera, use x and y for snap guides + scale_face = VZ; + } + } + else // x and y axes are facing in opposite directions relative to camera + { + if ((local_camera_dir.mV[VZ] > 0.f) == (local_camera_dir.mV[VY] > 0.f)) + { + // x axis facing opposite direction from y and z relative to camera, use y and z for snap guides + scale_face = VX; + } + else + { + // y axis facing opposite direction from x and z relative to camera, use x and z for snap guides + scale_face = VY; + } + } + + switch(scale_face) + { + case VX: + // x axis face being scaled, use y and z for snap guides + mSnapGuideDir1 = LLVector3::y_axis.scaledVec(axis_flip); + mScaleSnapUnit1 = grid_scale.mV[VZ]; + mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip); + mScaleSnapUnit2 = grid_scale.mV[VY]; + break; + case VY: + // y axis facing being scaled, use x and z for snap guides + mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip); + mScaleSnapUnit1 = grid_scale.mV[VZ]; + mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip); + mScaleSnapUnit2 = grid_scale.mV[VX]; + break; + case VZ: + // z axis facing being scaled, use x and y for snap guides + mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip); + mScaleSnapUnit1 = grid_scale.mV[VY]; + mSnapGuideDir2 = LLVector3::y_axis.scaledVec(axis_flip); + mScaleSnapUnit2 = grid_scale.mV[VX]; break; default: + mSnapGuideDir1.setZero(); + mScaleSnapUnit1 = 0.f; + + mSnapGuideDir2.setZero(); + mScaleSnapUnit2 = 0.f; break; } - mSnapGuideDir1.scaleVec(snap_guide_flip); - mSnapGuideDir2.scaleVec(snap_guide_flip); + mSnapGuideDir1.rotVec(bbox.getRotation()); mSnapGuideDir2.rotVec(bbox.getRotation()); mSnapDir1 = -1.f * mSnapGuideDir2; @@ -1488,13 +1544,22 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } mScalePlaneNormal1 = mSnapGuideDir1 % mScaleDir; - mScalePlaneNormal1.normVec(); + mScalePlaneNormal1.normalize(); mScalePlaneNormal2 = mSnapGuideDir2 % mScaleDir; - mScalePlaneNormal2.normVec(); + mScalePlaneNormal2.normalize(); mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir); mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir); + + mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length()); + mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length()); + + if (uniform) + { + mScaleSnapUnit1 *= 0.5f; + mScaleSnapUnit2 *= 0.5f; + } } void LLManipScale::renderSnapGuides(const LLBBox& bbox) @@ -1504,7 +1569,6 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) return; } - F32 max_subdivisions = sGridMaxSubdivisionLevel; F32 grid_alpha = gSavedSettings.getF32("GridOpacity"); F32 max_point_on_scale_line = partToMaxScale(mManipPart, bbox); @@ -1518,10 +1582,10 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLColor4 tick_color = setupSnapGuideRenderPass(pass); gGL.begin(LLRender::LINES); - LLVector3 line_mid = mScaleCenter + (mScaleSnapValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset); - LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnapValue, mSnapGuideLength * 0.5f))); - LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnapValue, mSnapGuideLength * 0.5f)); - + LLVector3 line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset); + LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f))); + LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f)); + gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); gGL.vertex3fv(line_start.mV); gGL.color4fv(tick_color.mV); @@ -1530,9 +1594,9 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); gGL.vertex3fv(line_end.mV); - line_mid = mScaleCenter + (mScaleSnapValue * mScaleDir) + (mSnapGuideDir2 * mSnapRegimeOffset); - line_start = line_mid - (mScaleDir * (llmin(mScaleSnapValue, mSnapGuideLength * 0.5f))); - line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnapValue, mSnapGuideLength * 0.5f)); + line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir2 * mSnapRegimeOffset); + line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f))); + line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f)); gGL.vertex3fv(line_start.mV); gGL.color4fv(tick_color.mV); gGL.vertex3fv(line_mid.mV); @@ -1545,31 +1609,38 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { LLGLDepthTest gls_depth(GL_FALSE); - F32 dist_grid_axis = (drag_point - mScaleCenter) * mScaleDir; + F32 dist_grid_axis = llmax(0.f, (drag_point - mScaleCenter) * mScaleDir); + + F32 smallest_subdivision1 = mScaleSnapUnit1 / sGridMaxSubdivisionLevel; + F32 smallest_subdivision2 = mScaleSnapUnit2 / sGridMaxSubdivisionLevel; + + F32 dist_scale_units_1 = dist_grid_axis / smallest_subdivision1; + F32 dist_scale_units_2 = dist_grid_axis / smallest_subdivision2; + // find distance to nearest smallest grid unit - F32 grid_offset1 = fmodf(dist_grid_axis, mScaleSnapUnit1 / max_subdivisions); - F32 grid_offset2 = fmodf(dist_grid_axis, mScaleSnapUnit2 / max_subdivisions); + F32 grid_multiple1 = llfloor(dist_scale_units_1); + F32 grid_multiple2 = llfloor(dist_scale_units_2); + F32 grid_offset1 = fmodf(dist_grid_axis, smallest_subdivision1); + F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2); // how many smallest grid units are we away from largest grid scale? - S32 sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / (mScaleSnapUnit1 / max_subdivisions)); - S32 sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / (mScaleSnapUnit2 / max_subdivisions)); + S32 sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / smallest_subdivision1); + S32 sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / smallest_subdivision2); - S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / (mScaleSnapUnit1 / max_subdivisions))); - S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / (mScaleSnapUnit2 / max_subdivisions))); - F32 dist_scale_units_1 = dist_grid_axis / (mScaleSnapUnit1 / max_subdivisions); - F32 dist_scale_units_2 = dist_grid_axis / (mScaleSnapUnit2 / max_subdivisions); + S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision1)); + S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision2)); S32 ticks_from_scale_center_1 = lltrunc(dist_scale_units_1); S32 ticks_from_scale_center_2 = lltrunc(dist_scale_units_2); - S32 max_ticks1 = llceil(max_point_on_scale_line / (mScaleSnapUnit1 / max_subdivisions) - dist_scale_units_1); - S32 max_ticks2 = llceil(max_point_on_scale_line / (mScaleSnapUnit2 / max_subdivisions) - dist_scale_units_2); + S32 max_ticks1 = llceil(max_point_on_scale_line / smallest_subdivision1 - dist_scale_units_1); + S32 max_ticks2 = llceil(max_point_on_scale_line / smallest_subdivision2 - dist_scale_units_2); S32 start_tick = 0; S32 stop_tick = 0; - if (mInSnapRegime) + if (mSnapRegime != SNAP_REGIME_NONE) { // draw snap guide line gGL.begin(LLRender::LINES); - LLVector3 snap_line_center = mScaleCenter + (mScaleSnapValue * mScaleDir); + LLVector3 snap_line_center = bbox.localToAgent(unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox )); LLVector3 snap_line_start = snap_line_center + (mSnapGuideDir1 * mSnapRegimeOffset); LLVector3 snap_line_end = snap_line_center + (mSnapGuideDir2 * mSnapRegimeOffset); @@ -1591,22 +1662,22 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLVector3 arrow_span = mScaleDir; arrow_dir = snap_line_start - snap_line_center; - arrow_dir.normVec(); + arrow_dir.normalize(); gGL.vertex3fv((snap_line_start + arrow_dir * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_start + arrow_span * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_start - arrow_span * mBoxHandleSize).mV); arrow_dir = snap_line_end - snap_line_center; - arrow_dir.normVec(); + arrow_dir.normalize(); gGL.vertex3fv((snap_line_end + arrow_dir * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_end + arrow_span * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_end - arrow_span * mBoxHandleSize).mV); } gGL.end(); } - + LLVector2 screen_translate_axis(llabs(mScaleDir * LLViewerCamera::getInstance()->getLeftAxis()), llabs(mScaleDir * LLViewerCamera::getInstance()->getUpAxis())); - screen_translate_axis.normVec(); + screen_translate_axis.normalize(); S32 tick_label_spacing = llround(screen_translate_axis * sTickLabelSpacing); @@ -1622,17 +1693,17 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) for (S32 i = start_tick; i <= stop_tick; i++) { F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit1 / max_subdivisions * (F32)i - grid_offset1)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * smallest_subdivision1); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); - if (fmodf((F32)(i + sub_div_offset_1), (max_subdivisions / cur_subdivisions)) != 0.f) + if (fmodf((F32)(i + sub_div_offset_1), (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) { continue; } F32 tick_scale = 1.f; - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { if (fmodf((F32)(i + sub_div_offset_1), division_level) == 0.f) { @@ -1655,17 +1726,17 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) for (S32 i = start_tick; i <= stop_tick; i++) { F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side2))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit2 / max_subdivisions * (F32)i - grid_offset2)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * smallest_subdivision2); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); - if (fmodf((F32)(i + sub_div_offset_2), (max_subdivisions / cur_subdivisions)) != 0.f) + if (fmodf((F32)(i + sub_div_offset_2), (sGridMaxSubdivisionLevel / cur_subdivisions)) != 0.f) { continue; } F32 tick_scale = 1.f; - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { if (fmodf((F32)(i + sub_div_offset_2), division_level) == 0.f) { @@ -1683,21 +1754,21 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) gGL.end(); } - // render tick labels + // render upper tick labels start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1)); stop_tick = llmin(max_ticks1, num_ticks_per_side1); F32 grid_resolution = mObjectSelection->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f); - S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / (mScaleSnapUnit1 / max_subdivisions)); - S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / (mScaleSnapUnit2 / max_subdivisions)); + S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / smallest_subdivision1); + S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / smallest_subdivision2); for (S32 i = start_tick; i <= stop_tick; i++) { F32 tick_scale = 1.f; F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit1 / max_subdivisions * (F32)i - grid_offset1)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * smallest_subdivision1); - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { if (fmodf((F32)(i + label_sub_div_offset_1), division_level) == 0.f) { @@ -1706,39 +1777,34 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) tick_scale *= 0.7f; } - if (fmodf((F32)(i + label_sub_div_offset_1), (max_subdivisions / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, tick_label_spacing)))) == 0.f) + if (fmodf((F32)(i + label_sub_div_offset_1), (sGridMaxSubdivisionLevel / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, tick_label_spacing)))) == 0.f) { - LLVector3 text_origin = tick_pos + - (mSnapGuideDir1 * mSnapRegimeOffset * (1.f + tick_scale)); + LLVector3 text_origin = tick_pos + (mSnapGuideDir1 * mSnapRegimeOffset * (1.f + tick_scale)); EGridMode grid_mode = LLSelectMgr::getInstance()->getGridMode(); - F32 tick_val; + F32 tick_value; if (grid_mode == GRID_MODE_WORLD) { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit1 / grid_resolution); + tick_value = (grid_multiple1 + i) / (sGridMaxSubdivisionLevel / grid_resolution); } else { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit1 * 2.f); - } - - if (getUniform()) - { - tick_val *= 2.f; + tick_value = (grid_multiple1 + i) / (2.f * sGridMaxSubdivisionLevel); } F32 text_highlight = 0.8f; - if (is_approx_equal(tick_val, mScaleSnapValue) && mInSnapRegime) + // Highlight this text if the tick value matches the snapped to value, and if either the second set of ticks isn't going to be shown or cursor is in the first snap regime. + if (is_approx_equal(tick_value, mScaleSnappedValue) && (mScaleSnapUnit2 == mScaleSnapUnit1 || (mSnapRegime & SNAP_REGIME_UPPER))) { text_highlight = 1.f; } - renderTickValue(text_origin, tick_val, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); + renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); } } - // label ticks on opposite side + // label ticks on opposite side, only can happen in scaling modes that effect more than one axis and when the object's axis don't have the same scale. A differing scale indicates both conditions. if (mScaleSnapUnit2 != mScaleSnapUnit1) { start_tick = -(llmin(ticks_from_scale_center_2, num_ticks_per_side2)); @@ -1747,9 +1813,9 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { F32 tick_scale = 1.f; F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side2))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit2 / max_subdivisions * (F32)i - grid_offset2)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * smallest_subdivision2); - for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) + for (F32 division_level = sGridMaxSubdivisionLevel; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { if (fmodf((F32)(i + label_sub_div_offset_2), division_level) == 0.f) { @@ -1758,35 +1824,29 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) tick_scale *= 0.7f; } - if (fmodf((F32)(i + label_sub_div_offset_2), (max_subdivisions / llmin(max_subdivisions, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, tick_label_spacing)))) == 0.f) + if (fmodf((F32)(i + label_sub_div_offset_2), (sGridMaxSubdivisionLevel / llmin(sGridMaxSubdivisionLevel, getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, tick_label_spacing)))) == 0.f) { - LLVector3 text_origin = tick_pos + - (mSnapGuideDir2 * mSnapRegimeOffset * (1.f + tick_scale)); + LLVector3 text_origin = tick_pos + (mSnapGuideDir2 * mSnapRegimeOffset * (1.f + tick_scale)); EGridMode grid_mode = LLSelectMgr::getInstance()->getGridMode(); - F32 tick_val; + F32 tick_value; if (grid_mode == GRID_MODE_WORLD) { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit2 / grid_resolution); + tick_value = (grid_multiple2 + i) / (sGridMaxSubdivisionLevel / grid_resolution); } else { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit2 * 2.f); - } - - if (getUniform()) - { - tick_val *= 2.f; + tick_value = (grid_multiple2 + i) / (2.f * sGridMaxSubdivisionLevel); } F32 text_highlight = 0.8f; - if (is_approx_equal(tick_val, mScaleSnapValue) && mInSnapRegime) + if (is_approx_equal(tick_value, mScaleSnappedValue) && (mSnapRegime & SNAP_REGIME_LOWER)) { text_highlight = 1.f; } - renderTickValue(text_origin, tick_val, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); + renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); } } } @@ -1812,13 +1872,13 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLVector3 help_text_pos = selection_center_start + (mSnapRegimeOffset * 5.f * offset_dir); const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); - std::string help_text = "Move mouse cursor over ruler"; + std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); - help_text = "to snap to grid"; + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapRegimeOffset * 0.4f; - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } @@ -1827,17 +1887,15 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) // Returns unit vector in direction of part of an origin-centered cube LLVector3 LLManipScale::partToUnitVector( S32 part ) const { - if( (LL_FACE_MIN <= part) && (part <= LL_FACE_MAX) ) + if ( (LL_FACE_MIN <= part) && (part <= LL_FACE_MAX) ) { return faceToUnitVector( part ); } - else - if( (LL_CORNER_MIN <= part) && (part <= LL_CORNER_MAX) ) + else if ( (LL_CORNER_MIN <= part) && (part <= LL_CORNER_MAX) ) { return cornerToUnitVector( part ); } - else - if( (LL_EDGE_MIN <= part) && (part <= LL_EDGE_MAX ) ) + else if ( (LL_EDGE_MIN <= part) && (part <= LL_EDGE_MAX ) ) { return edgeToUnitVector( part ); } @@ -1849,27 +1907,32 @@ LLVector3 LLManipScale::partToUnitVector( S32 part ) const LLVector3 LLManipScale::faceToUnitVector( S32 part ) const { llassert( (LL_FACE_MIN <= part) && (part <= LL_FACE_MAX) ); + LLVector3 vec; switch( part ) { case LL_FACE_POSX: - return LLVector3( 1.f, 0.f, 0.f ); - + vec.set( 1.f, 0.f, 0.f ); + break; case LL_FACE_NEGX: - return LLVector3( -1.f, 0.f, 0.f ); - + vec.set( -1.f, 0.f, 0.f ); + break; case LL_FACE_POSY: - return LLVector3( 0.f, 1.f, 0.f ); - + vec.set( 0.f, 1.f, 0.f ); + break; case LL_FACE_NEGY: - return LLVector3( 0.f, -1.f, 0.f ); - + vec.set( 0.f, -1.f, 0.f ); + break; case LL_FACE_POSZ: - return LLVector3( 0.f, 0.f, 1.f ); - + vec.set( 0.f, 0.f, 1.f ); + break; case LL_FACE_NEGZ: - return LLVector3( 0.f, 0.f, -1.f ); + vec.set( 0.f, 0.f, -1.f ); + break; + default: + vec.clear(); } - return LLVector3(); + + return vec; } @@ -1881,31 +1944,31 @@ LLVector3 LLManipScale::cornerToUnitVector( S32 part ) const switch(part) { case LL_CORNER_NNN: - vec.setVec(-F_SQRT3, -F_SQRT3, -F_SQRT3); + vec.set(-OO_SQRT3, -OO_SQRT3, -OO_SQRT3); break; - case LL_CORNER_NNP: - vec.setVec(-F_SQRT3, -F_SQRT3, F_SQRT3); + case LL_CORNER_NNP: + vec.set(-OO_SQRT3, -OO_SQRT3, OO_SQRT3); break; case LL_CORNER_NPN: - vec.setVec(-F_SQRT3, F_SQRT3, -F_SQRT3); + vec.set(-OO_SQRT3, OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_NPP: - vec.setVec(-F_SQRT3, F_SQRT3, F_SQRT3); + vec.set(-OO_SQRT3, OO_SQRT3, OO_SQRT3); break; case LL_CORNER_PNN: - vec.setVec(F_SQRT3, -F_SQRT3, -F_SQRT3); + vec.set(OO_SQRT3, -OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_PNP: - vec.setVec(F_SQRT3, -F_SQRT3, F_SQRT3); + vec.set(OO_SQRT3, -OO_SQRT3, OO_SQRT3); break; case LL_CORNER_PPN: - vec.setVec(F_SQRT3, F_SQRT3, -F_SQRT3); + vec.set(OO_SQRT3, OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_PPP: - vec.setVec(F_SQRT3, F_SQRT3, F_SQRT3); + vec.set(OO_SQRT3, OO_SQRT3, OO_SQRT3); break; default: - vec.clearVec(); + vec.clear(); } return vec; @@ -1932,8 +1995,8 @@ LLVector3 LLManipScale::unitVectorToLocalBBoxExtent( const LLVector3& v, const L LLVector3 ctr = bbox.getCenterLocal(); return LLVector3( - v.mV[0] ? (v.mV[0]>0 ? max.mV[0] : min.mV[0] ) : ctr.mV[0], - v.mV[1] ? (v.mV[1]>0 ? max.mV[1] : min.mV[1] ) : ctr.mV[1], + v.mV[0] ? (v.mV[0]>0 ? max.mV[0] : min.mV[0] ) : ctr.mV[0], + v.mV[1] ? (v.mV[1]>0 ? max.mV[1] : min.mV[1] ) : ctr.mV[1], v.mV[2] ? (v.mV[2]>0 ? max.mV[2] : min.mV[2] ) : ctr.mV[2] ); } @@ -1951,7 +2014,7 @@ F32 LLManipScale::partToMaxScale( S32 part, const LLBBox &bbox ) const max_extent = bbox_extents.mV[i]; } } - max_scale_factor = bbox_extents.magVec() * get_default_max_prim_scale() / max_extent; + max_scale_factor = bbox_extents.length() * get_default_max_prim_scale() / max_extent; if (getUniform()) { @@ -1974,7 +2037,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const min_extent = bbox_extents.mV[i]; } } - F32 min_scale_factor = bbox_extents.magVec() * MIN_PRIM_SCALE / min_extent; + F32 min_scale_factor = bbox_extents.length() * MIN_PRIM_SCALE / min_extent; if (getUniform()) { @@ -2025,7 +2088,7 @@ LLVector3 LLManipScale::nearestAxis( const LLVector3& v ) const // virtual BOOL LLManipScale::canAffectSelection() { - // An selection is scalable if you are allowed to both edit and move + // An selection is scalable if you are allowed to both edit and move // everything in it, and it does not have any sitting agents BOOL can_scale = mObjectSelection->getObjectCount() != 0; if (can_scale) diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h index 5cb8898fd0..e1da7a1bb5 100755 --- a/indra/newview/llmanipscale.h +++ b/indra/newview/llmanipscale.h @@ -51,6 +51,13 @@ typedef enum e_scale_manipulator_type SCALE_MANIP_FACE } EScaleManipulatorType; +typedef enum e_snap_regimes +{ + SNAP_REGIME_NONE = 0, //!< The cursor is not in either of the snap regimes. + SNAP_REGIME_UPPER = 0x1, //!< The cursor is, non-exclusively, in the first of the snap regimes. Prefer to treat as bitmask. + SNAP_REGIME_LOWER = 0x2 //!< The cursor is, non-exclusively, in the second of the snap regimes. Prefer to treat as bitmask. +} ESnapRegimes; + class LLManipScale : public LLManip { @@ -96,7 +103,7 @@ private: void renderSnapGuides( const LLBBox& local_bbox ); void revert(); - + inline void conditionalHighlight( U32 part, const LLColor4* highlight = NULL, const LLColor4* normal = NULL ); void drag( S32 x, S32 y ); @@ -135,33 +142,35 @@ private: }; - F32 mBoxHandleSize; // The size of the handles at the corners of the bounding box - F32 mScaledBoxHandleSize; // handle size after scaling for selection feedback + F32 mBoxHandleSize; //!< The size of the handles at the corners of the bounding box. + F32 mScaledBoxHandleSize; //!< Handle size after scaling for selection feedback. LLVector3d mDragStartPointGlobal; - LLVector3d mDragStartCenterGlobal; // The center of the bounding box of all selected objects at time of drag start + LLVector3d mDragStartCenterGlobal; //!< The center of the bounding box of all selected objects at time of drag start. LLVector3d mDragPointGlobal; LLVector3d mDragFarHitGlobal; S32 mLastMouseX; S32 mLastMouseY; BOOL mSendUpdateOnMouseUp; U32 mLastUpdateFlags; - typedef std::set<ManipulatorHandle*, compare_manipulators> minpulator_list_t; - minpulator_list_t mProjectedManipulators; + typedef std::set<ManipulatorHandle*, compare_manipulators> manipulator_list_t; + manipulator_list_t mProjectedManipulators; LLVector4 mManipulatorVertices[14]; - F32 mScaleSnapUnit1; // size of snap multiples for axis 1 - F32 mScaleSnapUnit2; // size of snap multiples for axis 2 - LLVector3 mScalePlaneNormal1; // normal of plane in which scale occurs that most faces camera - LLVector3 mScalePlaneNormal2; // normal of plane in which scale occurs that most faces camera - LLVector3 mSnapGuideDir1; - LLVector3 mSnapGuideDir2; - LLVector3 mSnapDir1; - LLVector3 mSnapDir2; - F32 mSnapRegimeOffset; + F32 mScaleSnapUnit1; //!< Size of snap multiples for the upper scale. + F32 mScaleSnapUnit2; //!< Size of snap multiples for the lower scale. + LLVector3 mScalePlaneNormal1; //!< Normal of plane in which scale occurs that most faces camera. + LLVector3 mScalePlaneNormal2; //!< Normal of plane in which scale occurs that most faces camera. + LLVector3 mSnapGuideDir1; //!< The direction in which the upper snap guide tick marks face. + LLVector3 mSnapGuideDir2; //!< The direction in which the lower snap guide tick marks face. + LLVector3 mSnapDir1; //!< The direction in which the upper snap guides face. + LLVector3 mSnapDir2; //!< The direction in which the lower snap guides face. + F32 mSnapRegimeOffset; //!< How far off the scale axis centerline the mouse can be before it exits/enters the snap regime. + F32 mTickPixelSpacing1; //!< The pixel spacing between snap guide tick marks for the upper scale. + F32 mTickPixelSpacing2; //!< The pixel spacing between snap guide tick marks for the lower scale. F32 mSnapGuideLength; - LLVector3 mScaleCenter; - LLVector3 mScaleDir; - F32 mScaleSnapValue; - BOOL mInSnapRegime; + LLVector3 mScaleCenter; //!< The location of the origin of the scaling operation. + LLVector3 mScaleDir; //!< The direction of the scaling action. In face-dragging this is aligned with one of the cardinal axis relative to the prim, but in corner-dragging this is along the diagonal. + F32 mScaleSnappedValue; //!< The distance of the current position nearest the mouse location, measured along mScaleDir. Is measured either from the center or from the far face/corner depending upon whether uniform scaling is true or false respectively. + ESnapRegimes mSnapRegime; //<! Which, if any, snap regime the cursor is currently residing in. F32* mManipulatorScales; }; diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index da8235ee5f..ff0d25d203 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -61,6 +61,7 @@ #include "llui.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "lltrans.h" const S32 NUM_AXES = 3; const S32 MOUSE_DRAG_SLOP = 2; // pixels @@ -111,7 +112,6 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) : LLManip( std::string("Move"), composite ), mLastHoverMouseX(-1), mLastHoverMouseY(-1), - mSendUpdateOnMouseUp(FALSE), mMouseOutsideSlop(FALSE), mCopyMadeThisDrag(FALSE), mMouseDownX(-1), @@ -125,7 +125,6 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) mSnapOffsetMeters(0.f), mSubdivisions(10.f), mInSnapRegime(FALSE), - mSnapped(FALSE), mArrowScales(1.f, 1.f, 1.f), mPlaneScales(1.f, 1.f, 1.f), mPlaneManipPositions(1.f, 1.f, 1.f, 1.f) @@ -1441,13 +1440,13 @@ void LLManipTranslate::renderSnapGuides() LLVector3 help_text_pos = selection_center_start + (snap_offset_meters_up * 3.f * mSnapOffsetAxis); const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); - std::string help_text = "Move mouse cursor over ruler"; + std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); - help_text = "to snap to grid"; + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f; - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } diff --git a/indra/newview/llmaniptranslate.h b/indra/newview/llmaniptranslate.h index 37567c7bd1..3c37bbd698 100755 --- a/indra/newview/llmaniptranslate.h +++ b/indra/newview/llmaniptranslate.h @@ -85,7 +85,6 @@ protected: private: S32 mLastHoverMouseX; S32 mLastHoverMouseY; - BOOL mSendUpdateOnMouseUp; BOOL mMouseOutsideSlop; // true after mouse goes outside slop region BOOL mCopyMadeThisDrag; S32 mMouseDownX; @@ -107,7 +106,6 @@ private: LLVector3 mGridScale; F32 mSubdivisions; BOOL mInSnapRegime; - BOOL mSnapped; LLVector3 mArrowScales; LLVector3 mPlaneScales; LLVector4 mPlaneManipPositions; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 0178512cb5..086bc1c186 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -544,7 +544,7 @@ void LLMediaCtrl::clearCache() //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) +void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type, bool clean_browser) { // don't browse to anything that starts with secondlife:// or sl:// const std::string protocol1 = "secondlife://"; @@ -561,7 +561,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) { mCurrentNavUrl = url_in; mMediaSource->setSize(mTextureWidth, mTextureHeight); - mMediaSource->navigateTo(url_in, mime_type, mime_type.empty()); + mMediaSource->navigateTo(url_in, mime_type, mime_type.empty(), false, clean_browser); } } diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index b07eb356ae..b6ed0f3fab 100755 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -95,7 +95,7 @@ public: virtual BOOL handleToolTip(S32 x, S32 y, MASK mask); // navigation - void navigateTo( std::string url_in, std::string mime_type = ""); + void navigateTo( std::string url_in, std::string mime_type = "", bool clean_browser = false); void navigateBack(); void navigateHome(); void navigateForward(); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 80a427c0b8..8f50555a73 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1999,9 +1999,9 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) result["asset_type"] = "mesh"; result["inventory_type"] = "object"; result["description"] = "(No Description)"; - result["next_owner_mask"] = LLSD::Integer(LLFloaterPerms::getNextOwnerPerms()); - result["group_mask"] = LLSD::Integer(LLFloaterPerms::getGroupPerms()); - result["everyone_mask"] = LLSD::Integer(LLFloaterPerms::getEveryonePerms()); + result["next_owner_mask"] = LLSD::Integer(LLFloaterPerms::getNextOwnerPerms("Uploads")); + result["group_mask"] = LLSD::Integer(LLFloaterPerms::getGroupPerms("Uploads")); + result["everyone_mask"] = LLSD::Integer(LLFloaterPerms::getEveryonePerms("Uploads")); res["mesh_list"] = LLSD::emptyArray(); res["texture_list"] = LLSD::emptyArray(); diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index b2a3a9f645..91866e5ca2 100755 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -64,8 +64,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) mNameColumnIndex(p.name_column.column_index), mNameColumn(p.name_column.column_name), mAllowCallingCardDrop(p.allow_calling_card_drop), - mShortNames(p.short_names), - mAvatarNameCacheConnection() + mShortNames(p.short_names) {} // public @@ -328,13 +327,16 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( else { // ...schedule a callback - // This is not correct and will likely lead to partially populated lists in cases where avatar names are not cached. - // *TODO : Change this to have 2 callbacks : one callback per list item and one for the whole list. - if (mAvatarNameCacheConnection.connected()) + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(id); + if (it != mAvatarNameCacheConnections.end()) { - mAvatarNameCacheConnection.disconnect(); + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); } - mAvatarNameCacheConnection = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, item->getHandle())); + mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, item->getHandle())); } break; } @@ -391,9 +393,18 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id) void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, + std::string suffix, LLHandle<LLNameListItem> item) { - mAvatarNameCacheConnection.disconnect(); + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(agent_id); + if (it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } std::string name; if (mShortNames) @@ -401,6 +412,12 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, else name = av_name.getCompleteName(); + // Append optional suffix. + if (!suffix.empty()) + { + name.append(suffix); + } + LLNameListItem* list_item = item.get(); if (list_item && list_item->getUUID() == agent_id) { diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 92e82b672d..4ed260d847 100755 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -114,10 +114,14 @@ protected: LLNameListCtrl(const Params&); virtual ~LLNameListCtrl() { - if (mAvatarNameCacheConnection.connected()) + for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) { - mAvatarNameCacheConnection.disconnect(); + if (it->second.connected()) + { + it->second.disconnect(); + } } + mAvatarNameCacheConnections.clear(); } friend class LLUICtrlFactory; public: @@ -155,14 +159,15 @@ public: /*virtual*/ void mouseOverHighlightNthItem( S32 index ); private: void showInspector(const LLUUID& avatar_id, bool is_group); - void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, LLHandle<LLNameListItem> item); + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, LLHandle<LLNameListItem> item); private: S32 mNameColumnIndex; std::string mNameColumn; BOOL mAllowCallingCardDrop; bool mShortNames; // display name only, no SLID - boost::signals2::connection mAvatarNameCacheConnection; + typedef std::map<LLUUID, boost::signals2::connection> avatar_name_cache_connection_map_t; + avatar_name_cache_connection_map_t mAvatarNameCacheConnections; }; diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 1a427338e5..89a9e0dc16 100755 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -59,6 +59,7 @@ #include "llviewerregion.h" #include "llviewerwindow.h" #include "llworld.h" +#include "llfloaterperms.h" // // Imported globals @@ -156,12 +157,14 @@ void LLPanelContents::onClickNewScript(void *userdata) { LLPermissions perm; perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); + + // Parameters are base, owner, everyone, group, next perm.initMasks( PERM_ALL, PERM_ALL, - PERM_NONE, - PERM_NONE, - PERM_MOVE | PERM_TRANSFER); + LLFloaterPerms::getEveryonePerms("Scripts"), + LLFloaterPerms::getGroupPerms("Scripts"), + PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); std::string desc; LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); LLPointer<LLViewerInventoryItem> new_item = @@ -179,6 +182,8 @@ void LLPanelContents::onClickNewScript(void *userdata) time_corrected()); object->saveScript(new_item, TRUE, true); + std::string name = new_item->getName(); + // *NOTE: In order to resolve SL-22177, we needed to create // the script first, and then you have to click it in // inventory to edit it. diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 61fa4ea959..9ca3d7e96e 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -743,17 +743,20 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mChanged(FALSE), mPendingMemberUpdate(FALSE), mHasMatch(FALSE), - mNumOwnerAdditions(0), - mAvatarNameCacheConnection() + mNumOwnerAdditions(0) { } LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { - if (mAvatarNameCacheConnection.connected()) + for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) { - mAvatarNameCacheConnection.disconnect(); + if (it->second.connected()) + { + it->second.disconnect(); + } } + mAvatarNameCacheConnections.clear(); if (mMembersList) { gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); @@ -1644,9 +1647,17 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) mHasMatch = TRUE; } -void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) +void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) { - mAvatarNameCacheConnection.disconnect(); + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id); + if (it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap @@ -1719,12 +1730,16 @@ void LLPanelGroupMembersSubTab::updateMembers() else { // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - // *TODO : Add one callback per fetched avatar name - if (mAvatarNameCacheConnection.connected()) + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first); + if (it != mAvatarNameCacheConnections.end()) { - mAvatarNameCacheConnection.disconnect(); + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); } - mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2)); + mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2, _1)); } } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 0cf272f3ee..baa2d40c7e 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -189,7 +189,7 @@ public: virtual void setGroupID(const LLUUID& id); void addMemberToList(LLGroupMemberData* data); - void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); + void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id); protected: typedef std::map<LLUUID, LLRoleMemberChangeType> role_change_data_map_t; @@ -215,7 +215,8 @@ protected: U32 mNumOwnerAdditions; LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; - boost::signals2::connection mAvatarNameCacheConnection; + typedef std::map<LLUUID, boost::signals2::connection> avatar_name_cache_connection_map_t; + avatar_name_cache_connection_map_t mAvatarNameCacheConnections; }; class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 9d9fb4040d..5977d558d3 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -505,7 +505,7 @@ public: LLPanelPeople::LLPanelPeople() : LLPanel(), - mTryToConnectToFbc(true), + mTryToConnectToFacebook(true), mTabContainer(NULL), mOnlineFriendList(NULL), mAllFriendList(NULL), @@ -865,10 +865,10 @@ void LLPanelPeople::updateFacebookList(bool visible) { LLFacebookConnect::instance().loadFacebookFriends(); } - else if(mTryToConnectToFbc) + else if(mTryToConnectToFacebook) { LLFacebookConnect::instance().checkConnectionToFacebook(); - mTryToConnectToFbc = false; + mTryToConnectToFacebook = false; } updateSuggestedFriendList(); diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 34dc3d9ab7..55eaf74f74 100755 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -57,7 +57,7 @@ public: // when voice is available /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); - bool mTryToConnectToFbc; + bool mTryToConnectToFacebook; // internals class Updater; diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 21f95f38c0..743ef3e329 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -31,6 +31,10 @@ #include "llsidetraypanelcontainer.h" #include "llfloatersnapshot.h" // FIXME: create a snapshot model +#include "llfloaterreg.h" +#include "llfloaterfacebook.h" +#include "llfloaterflickr.h" +#include "llfloatertwitter.h" /** * Provides several ways to save a snapshot. @@ -44,6 +48,7 @@ class LLPanelSnapshotOptions public: LLPanelSnapshotOptions(); ~LLPanelSnapshotOptions(); + /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onEconomyDataChange() { updateUploadCost(); } @@ -54,6 +59,9 @@ private: void onSaveToEmail(); void onSaveToInventory(); void onSaveToComputer(); + void onSendToFacebook(); + void onSendToTwitter(); + void onSendToFlickr(); }; static LLPanelInjector<LLPanelSnapshotOptions> panel_class("llpanelsnapshotoptions"); @@ -74,6 +82,19 @@ LLPanelSnapshotOptions::~LLPanelSnapshotOptions() } // virtual +BOOL LLPanelSnapshotOptions::postBuild() +{ + LLTextBox* sendToFacebookTextBox = getChild<LLTextBox>("send_to_facebook_textbox"); + sendToFacebookTextBox->setURLClickedCallback(boost::bind(&LLPanelSnapshotOptions::onSendToFacebook, this)); + LLTextBox* sendToTwitterTextBox = getChild<LLTextBox>("send_to_twitter_textbox"); + sendToTwitterTextBox->setURLClickedCallback(boost::bind(&LLPanelSnapshotOptions::onSendToTwitter, this)); + LLTextBox* sendToFlickrTextBox = getChild<LLTextBox>("send_to_flickr_textbox"); + sendToFlickrTextBox->setURLClickedCallback(boost::bind(&LLPanelSnapshotOptions::onSendToFlickr, this)); + + return LLPanel::postBuild(); +} + +// virtual void LLPanelSnapshotOptions::onOpen(const LLSD& key) { updateUploadCost(); @@ -118,3 +139,39 @@ void LLPanelSnapshotOptions::onSaveToComputer() { openPanel("panel_snapshot_local"); } + +void LLPanelSnapshotOptions::onSendToFacebook() +{ + LLFloaterReg::hideInstance("snapshot"); + + LLFloaterFacebook* facebook_floater = dynamic_cast<LLFloaterFacebook*>(LLFloaterReg::getInstance("facebook")); + if (facebook_floater) + { + facebook_floater->showPhotoPanel(); + } + LLFloaterReg::showInstance("facebook"); +} + +void LLPanelSnapshotOptions::onSendToTwitter() +{ + LLFloaterReg::hideInstance("snapshot"); + + LLFloaterTwitter* twitter_floater = dynamic_cast<LLFloaterTwitter*>(LLFloaterReg::getInstance("twitter")); + if (twitter_floater) + { + twitter_floater->showPhotoPanel(); + } + LLFloaterReg::showInstance("twitter"); +} + +void LLPanelSnapshotOptions::onSendToFlickr() +{ + LLFloaterReg::hideInstance("snapshot"); + + LLFloaterFlickr* flickr_floater = dynamic_cast<LLFloaterFlickr*>(LLFloaterReg::getInstance("flickr")); + if (flickr_floater) + { + flickr_floater->showPhotoPanel(); + } + LLFloaterReg::showInstance("flickr"); +} diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index e694045f9a..9ff0ece7d9 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -34,6 +34,7 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldir.h" +#include "llenvmanager.h" #include "llexternaleditor.h" #include "llfilepicker.h" #include "llfloaterreg.h" @@ -50,11 +51,9 @@ #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llscrolllistcell.h" +#include "llsdserialize.h" #include "llslider.h" #include "lscript_rt_interface.h" -#include "lscript_library.h" -#include "lscript_export.h" -#include "lltextbox.h" #include "lltooldraganddrop.h" #include "llvfile.h" @@ -70,6 +69,7 @@ #include "llkeyboard.h" #include "llscrollcontainer.h" #include "llcheckboxctrl.h" +#include "llscripteditor.h" #include "llselectmgr.h" #include "lltooldraganddrop.h" #include "llscrolllistctrl.h" @@ -78,7 +78,6 @@ #include "lldir.h" #include "llcombobox.h" #include "llviewerstats.h" -#include "llviewertexteditor.h" #include "llviewerwindow.h" #include "lluictrlfactory.h" #include "llmediactrl.h" @@ -361,6 +360,7 @@ LLScriptEdCore::LLScriptEdCore( void (*save_callback)(void*, BOOL), void (*search_replace_callback) (void* userdata), void* userdata, + bool live, S32 bottom_pad) : LLPanel(), @@ -375,6 +375,7 @@ LLScriptEdCore::LLScriptEdCore( mLiveHelpHistorySize(0), mEnableSave(FALSE), mLiveFile(NULL), + mLive(live), mContainer(container), mHasScriptData(FALSE) { @@ -398,17 +399,21 @@ LLScriptEdCore::~LLScriptEdCore() } delete mLiveFile; + if (mSyntaxIDConnection.connected()) + { + mSyntaxIDConnection.disconnect(); + } } BOOL LLScriptEdCore::postBuild() { mErrorList = getChild<LLScrollListCtrl>("lsl errors"); - mFunctions = getChild<LLComboBox>( "Insert..."); + mFunctions = getChild<LLComboBox>("Insert..."); childSetCommitCallback("Insert...", &LLScriptEdCore::onBtnInsertFunction, this); - mEditor = getChild<LLViewerTextEditor>("Script Editor"); + mEditor = getChild<LLScriptEditor>("Script Editor"); childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this); childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE)); @@ -416,51 +421,30 @@ BOOL LLScriptEdCore::postBuild() initMenu(); + mSyntaxIDConnection = LLSyntaxIdLSL::getInstance()->addSyntaxIDCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); - std::vector<std::string> funcs; - std::vector<std::string> tooltips; - for (std::vector<LLScriptLibraryFunction>::const_iterator i = gScriptLibrary.mFunctions.begin(); - i != gScriptLibrary.mFunctions.end(); ++i) - { - // Make sure this isn't a god only function, or the agent is a god. - if (!i->mGodOnly || gAgent.isGodlike()) - { - std::string name = i->mName; - funcs.push_back(name); - - std::string desc_name = "LSLTipText_"; - desc_name += name; - std::string desc = LLTrans::getString(desc_name); - - F32 sleep_time = i->mSleepTime; - if( sleep_time ) - { - desc += "\n"; - - LLStringUtil::format_map_t args; - args["[SLEEP_TIME]"] = llformat("%.1f", sleep_time ); - desc += LLTrans::getString("LSLTipSleepTime", args); - } - - // A \n linefeed is not part of xml. Let's add one to keep all - // the tips one-per-line in strings.xml - LLStringUtil::replaceString( desc, "\\n", "\n" ); - - tooltips.push_back(desc); - } - } - - LLColor3 color(0.5f, 0.0f, 0.15f); - mEditor->loadKeywords(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords.ini"), funcs, tooltips, color); + // Intialise keyword highlighting for the current simulator's version of LSL + LLSyntaxIdLSL::getInstance()->initialize(); + processKeywords(); + + return TRUE; +} - std::vector<std::string> primary_keywords; - std::vector<std::string> secondary_keywords; +void LLScriptEdCore::processKeywords() +{ + LL_DEBUGS("SyntaxLSL") << "Processing keywords" << LL_ENDL; + mEditor->clearSegments(); + mEditor->initKeywords(); + mEditor->loadKeywords(); + + string_vec_t primary_keywords; + string_vec_t secondary_keywords; LLKeywordToken *token; LLKeywords::keyword_iterator_t token_it; for (token_it = mEditor->keywordsBegin(); token_it != mEditor->keywordsEnd(); ++token_it) { token = token_it->second; - if (token->getColor() == color) // Wow, what a disgusting hack. + if (token->getType() == LLKeywordToken::TT_FUNCTION) { primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } @@ -469,24 +453,16 @@ BOOL LLScriptEdCore::postBuild() secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } } - - // Case-insensitive dictionary sort for primary keywords. We don't sort the secondary - // keywords. They're intelligently grouped in keywords.ini. - std::stable_sort( primary_keywords.begin(), primary_keywords.end(), LLSECKeywordCompare() ); - - for (std::vector<std::string>::const_iterator iter= primary_keywords.begin(); - iter!= primary_keywords.end(); ++iter) + for (string_vec_t::const_iterator iter = primary_keywords.begin(); + iter!= primary_keywords.end(); ++iter) { mFunctions->add(*iter); } - - for (std::vector<std::string>::const_iterator iter= secondary_keywords.begin(); - iter!= secondary_keywords.end(); ++iter) + for (string_vec_t::const_iterator iter = secondary_keywords.begin(); + iter!= secondary_keywords.end(); ++iter) { mFunctions->add(*iter); } - - return TRUE; } void LLScriptEdCore::initMenu() @@ -692,7 +668,7 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate) std::vector<LLTextSegmentPtr>::iterator segment_iter; for (segment_iter = selected_segments.begin(); segment_iter != selected_segments.end(); ++segment_iter) { - if((*segment_iter)->getToken() && (*segment_iter)->getToken()->getType() == LLKeywordToken::WORD) + if((*segment_iter)->getToken() && (*segment_iter)->getToken()->getType() == LLKeywordToken::TT_WORD) { segment = *segment_iter; break; @@ -703,7 +679,7 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate) if (!segment) { const LLTextSegmentPtr test_segment = mEditor->getPreviousSegment(); - if(test_segment->getToken() && test_segment->getToken()->getType() == LLKeywordToken::WORD) + if(test_segment->getToken() && test_segment->getToken()->getType() == LLKeywordToken::TT_WORD) { segment = test_segment; } @@ -1227,8 +1203,8 @@ bool LLScriptEdCore::enableLoadFromFileMenu(void* userdata) /// LLScriptEdContainer /// --------------------------------------------------------------------------- -LLScriptEdContainer::LLScriptEdContainer(const LLSD& key) -: LLPreview(key) +LLScriptEdContainer::LLScriptEdContainer(const LLSD& key) : + LLPreview(key) , mScriptEd(NULL) { } @@ -1290,8 +1266,8 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata) LLPreviewLSL::onSave, LLPreviewLSL::onSearchReplace, self, + false, 0); - return self->mScriptEd; } @@ -1306,7 +1282,7 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key ) // virtual BOOL LLPreviewLSL::postBuild() { - const LLInventoryItem* item = getItem(); + const LLInventoryItem* item = getItem(); llassert(item); if (item) @@ -1736,7 +1712,6 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset //static void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) { - LLLiveLSLEditor *self = (LLLiveLSLEditor*)userdata; self->mScriptEd = new LLScriptEdCore( @@ -1747,8 +1722,8 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) &LLLiveLSLEditor::onSave, &LLLiveLSLEditor::onSearchReplace, self, + true, 0); - return self->mScriptEd; } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index cb53d1df07..9ea191e928 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -34,10 +34,11 @@ #include "lliconctrl.h" #include "llframetimer.h" #include "llfloatergotoline.h" +#include "llsyntaxid.h" class LLLiveLSLFile; class LLMessageSystem; -class LLTextEditor; +class LLScriptEditor; class LLButton; class LLCheckBoxCtrl; class LLScrollListCtrl; @@ -71,11 +72,15 @@ protected: void (*save_callback)(void* userdata, BOOL close_after_save), void (*search_replace_callback)(void* userdata), void* userdata, + bool live, S32 bottom_pad = 0); // pad below bottom row of buttons public: ~LLScriptEdCore(); + void initializeKeywords(); void initMenu(); + void processKeywords(); + void processLoaded(); virtual void draw(); /*virtual*/ BOOL postBuild(); @@ -129,9 +134,11 @@ protected: void addHelpItemToHistory(const std::string& help_string); static void onErrorList(LLUICtrl*, void* user_data); + bool mLive; + private: std::string mSampleText; - LLTextEditor* mEditor; + LLScriptEditor* mEditor; void (*mLoadCallback)(void* userdata); void (*mSaveCallback)(void* userdata, BOOL close_after_save); void (*mSearchReplaceCallback) (void* userdata); @@ -150,6 +157,10 @@ private: LLLiveLSLFile* mLiveFile; LLScriptEdContainer* mContainer; // parent view + +public: + boost::signals2::connection mSyntaxIDConnection; + }; class LLScriptEdContainer : public LLPreview @@ -158,6 +169,7 @@ class LLScriptEdContainer : public LLPreview public: LLScriptEdContainer(const LLSD& key); + LLScriptEdContainer(const LLSD& key, const bool live); protected: std::string getTmpFileName(); @@ -167,7 +179,7 @@ protected: LLScriptEdCore* mScriptEd; }; -// Used to view and edit a LSL from your inventory. +// Used to view and edit an LSL script from your inventory. class LLPreviewLSL : public LLScriptEdContainer { public: @@ -212,7 +224,7 @@ protected: }; -// Used to view and edit an LSL that is attached to an object. +// Used to view and edit an LSL script that is attached to an object. class LLLiveLSLEditor : public LLScriptEdContainer { friend class LLLiveLSLFile; diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp new file mode 100644 index 0000000000..81920562a7 --- /dev/null +++ b/indra/newview/llscripteditor.cpp @@ -0,0 +1,289 @@ +/** + * @file llscripteditor.cpp + * @author Cinder Roxley + * @brief Text editor widget used for viewing and editing scripts + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, 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 "llscripteditor.h" + +#include "llsyntaxid.h" +#include "lllocalcliprect.h" + +const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32; +const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4; + +static LLDefaultChildRegistry::Register<LLScriptEditor> r("script_editor"); + +LLScriptEditor::Params::Params() +: show_line_numbers("show_line_numbers", true) +{} + + +LLScriptEditor::LLScriptEditor(const Params& p) +: LLTextEditor(p) +, mShowLineNumbers(p.show_line_numbers) +{ + if (mShowLineNumbers) + { + mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN; + updateRects(); + } +} + +void LLScriptEditor::draw() +{ + { + // pad clipping rectangle so that cursor can draw at full width + // when at left edge of mVisibleTextRect + LLRect clip_rect(mVisibleTextRect); + clip_rect.stretch(1); + LLLocalClipRect clip(clip_rect); + } + + LLTextBase::draw(); + drawLineNumbers(); + + drawPreeditMarker(); + + //RN: the decision was made to always show the orange border for keyboard focus but do not put an insertion caret + // when in readonly mode + mBorder->setKeyboardFocusHighlight( hasFocus() );// && !mReadOnly); +} + +void LLScriptEditor::drawLineNumbers() +{ + LLGLSUIDefault gls_ui; + LLRect scrolled_view_rect = getVisibleDocumentRect(); + LLRect content_rect = getVisibleTextRect(); + LLLocalClipRect clip(content_rect); + S32 first_line = getFirstVisibleLine(); + S32 num_lines = getLineCount(); + if (first_line >= num_lines) + { + return; + } + + S32 cursor_line = mLineInfoList[getLineNumFromDocIndex(mCursorPos)].mLineNum; + + if (mShowLineNumbers) + { + S32 left = 0; + S32 top = getRect().getHeight(); + S32 bottom = 0; + + gl_rect_2d(left, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN, bottom, mReadOnlyBgColor.get() ); // line number area always read-only + gl_rect_2d(UI_TEXTEDITOR_LINE_NUMBER_MARGIN, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN-1, bottom, LLColor4::grey3); // separator + + S32 last_line_num = -1; + + for (S32 cur_line = first_line; cur_line < num_lines; cur_line++) + { + line_info& line = mLineInfoList[cur_line]; + + if ((line.mRect.mTop - scrolled_view_rect.mBottom) < mVisibleTextRect.mBottom) + { + break; + } + + S32 line_bottom = line.mRect.mBottom - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom; + // draw the line numbers + if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop) + { + const LLFontGL *num_font = LLFontGL::getFontMonospace(); + const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum )); + BOOL is_cur_line = cursor_line == line.mLineNum; + const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL; + const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor; + num_font->render( + ltext, // string to draw + 0, // begin offset + UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2, // x + line_bottom, // y + fg_color, + LLFontGL::RIGHT, // horizontal alignment + LLFontGL::BOTTOM, // vertical alignment + style, + LLFontGL::NO_SHADOW, + S32_MAX, // max chars + UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2); // max pixels + last_line_num = line.mLineNum; + } + } + } +} + +void LLScriptEditor::initKeywords() +{ + mKeywords.initialize(LLSyntaxIdLSL::getInstance()->getKeywordsXML()); +} + +LLTrace::BlockTimerStatHandle FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); + +void LLScriptEditor::loadKeywords() +{ + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); + mKeywords.processTokens(); + + segment_vec_t segment_list; + mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + + mSegments.clear(); + segment_set_t::iterator insert_it = mSegments.begin(); + for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) + { + insert_it = mSegments.insert(insert_it, *list_it); + } +} + +void LLScriptEditor::updateSegments() +{ + if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) + { + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); + // HACK: No non-ascii keywords for now + segment_vec_t segment_list; + mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + + clearSegments(); + for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) + { + insertSegment(*list_it); + } + } + + LLTextBase::updateSegments(); +} + +void LLScriptEditor::clearSegments() +{ + if (!mSegments.empty()) + { + mSegments.clear(); + } +} + +// Most of this is shamelessly copied from LLTextBase +void LLScriptEditor::drawSelectionBackground() +{ + // Draw selection even if we don't have keyboard focus for search/replace + if( hasSelection() && !mLineInfoList.empty()) + { + std::vector<LLRect> selection_rects; + + S32 selection_left = llmin( mSelectionStart, mSelectionEnd ); + S32 selection_right = llmax( mSelectionStart, mSelectionEnd ); + + // Skip through the lines we aren't drawing. + LLRect content_display_rect = getVisibleDocumentRect(); + + // binary search for line that starts before top of visible buffer + line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), content_display_rect.mTop, LLTextBase::compare_bottom()); + line_list_t::const_iterator end_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), content_display_rect.mBottom, LLTextBase::compare_top()); + + bool done = false; + + // Find the coordinates of the selected area + for (;line_iter != end_iter && !done; ++line_iter) + { + // is selection visible on this line? + if (line_iter->mDocIndexEnd > selection_left && line_iter->mDocIndexStart < selection_right) + { + segment_set_t::iterator segment_iter; + S32 segment_offset; + getSegmentAndOffset(line_iter->mDocIndexStart, &segment_iter, &segment_offset); + + LLRect selection_rect; + selection_rect.mLeft = line_iter->mRect.mLeft; + selection_rect.mRight = line_iter->mRect.mLeft; + selection_rect.mBottom = line_iter->mRect.mBottom; + selection_rect.mTop = line_iter->mRect.mTop; + + for(;segment_iter != mSegments.end(); ++segment_iter, segment_offset = 0) + { + LLTextSegmentPtr segmentp = *segment_iter; + + S32 segment_line_start = segmentp->getStart() + segment_offset; + S32 segment_line_end = llmin(segmentp->getEnd(), line_iter->mDocIndexEnd); + + if (segment_line_start > segment_line_end) break; + + S32 segment_width = 0; + S32 segment_height = 0; + + // if selection after beginning of segment + if(selection_left >= segment_line_start) + { + S32 num_chars = llmin(selection_left, segment_line_end) - segment_line_start; + segmentp->getDimensions(segment_offset, num_chars, segment_width, segment_height); + selection_rect.mLeft += segment_width; + } + + // if selection_right == segment_line_end then that means we are the first character of the next segment + // or first character of the next line, in either case we want to add the length of the current segment + // to the selection rectangle and continue. + // if selection right > segment_line_end then selection spans end of current segment... + if (selection_right >= segment_line_end) + { + // extend selection slightly beyond end of line + // to indicate selection of newline character (use "n" character to determine width) + S32 num_chars = segment_line_end - segment_line_start; + segmentp->getDimensions(segment_offset, num_chars, segment_width, segment_height); + selection_rect.mRight += segment_width; + } + // else if selection ends on current segment... + else + { + S32 num_chars = selection_right - segment_line_start; + segmentp->getDimensions(segment_offset, num_chars, segment_width, segment_height); + selection_rect.mRight += segment_width; + + break; + } + } + selection_rects.push_back(selection_rect); + } + } + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + const LLColor4& color = mReadOnly ? mReadOnlyFgColor : mFgColor; + F32 alpha = hasFocus() ? 0.7f : 0.3f; + alpha *= getDrawContext().mAlpha; + // We want to shift the color to something readable but distinct + LLColor4 selection_color((1.f + color.mV[VRED]) * 0.5f, + (1.f + color.mV[VGREEN]) * 0.5f, + (1.f + color.mV[VBLUE]) * 0.5f, + alpha); + + for (std::vector<LLRect>::iterator rect_it = selection_rects.begin(); + rect_it != selection_rects.end(); + ++rect_it) + { + LLRect selection_rect = *rect_it; + selection_rect = *rect_it; + selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom); + gl_rect_2d(selection_rect, selection_color); + } + } +} diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h new file mode 100644 index 0000000000..f458203a39 --- /dev/null +++ b/indra/newview/llscripteditor.h @@ -0,0 +1,70 @@ +/** + * @file llscripteditor.h + * @author Cinder Roxley + * @brief Text editor widget used for viewing and editing scripts + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, 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_SCRIPTEDITOR_H +#define LL_SCRIPTEDITOR_H + +#include "lltexteditor.h" + +class LLScriptEditor : public LLTextEditor +{ +public: + + struct Params : public LLInitParam::Block<Params, LLTextEditor::Params> + { + Optional<bool> show_line_numbers; + + Params(); + }; + + virtual ~LLScriptEditor() {}; + + // LLView override + virtual void draw(); + + void initKeywords(); + void loadKeywords(); + /* virtual */ void clearSegments(); + LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); } + LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } + +protected: + friend class LLUICtrlFactory; + LLScriptEditor(const Params& p); + +private: + void drawLineNumbers(); + /* virtual */ void updateSegments(); + /* virtual */ void drawSelectionBackground(); + void loadKeywords(const std::string& filename_keywords, + const std::string& filename_colors); + + LLKeywords mKeywords; + bool mShowLineNumbers; +}; + +#endif // LL_SCRIPTEDITOR_H diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index d8ad071ba6..f61db77169 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -34,7 +34,11 @@ #include "lleconomy.h" #include "llfloaterperms.h" #include "llfloaterreg.h" -#include "llfloatersocial.h" +#include "llfloaterfacebook.h" +#include "llfloaterflickr.h" +#include "llfloatertwitter.h" +#include "llimagefilter.h" +#include "llimagefiltersmanager.h" #include "llimagebmp.h" #include "llimagej2c.h" #include "llimagejpeg.h" @@ -70,9 +74,11 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mColor(1.f, 0.f, 0.f, 0.5f), mCurImageIndex(0), mPreviewImage(NULL), - mThumbnailImage(NULL) , + mThumbnailImage(NULL) , + mBigThumbnailImage(NULL) , mThumbnailWidth(0), mThumbnailHeight(0), + mThumbnailSubsampled(FALSE), mPreviewImageEncoded(NULL), mFormattedImage(NULL), mShineCountdown(0), @@ -86,7 +92,11 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mCameraPos(LLViewerCamera::getInstance()->getOrigin()), mCameraRot(LLViewerCamera::getInstance()->getQuaternion()), mSnapshotActive(FALSE), - mSnapshotBufferType(LLViewerWindow::SNAPSHOT_TYPE_COLOR) + mSnapshotBufferType(LLViewerWindow::SNAPSHOT_TYPE_COLOR), + mFilterName(""), + mAllowRenderUI(TRUE), + mAllowFullScreenPreview(TRUE), + mViewContainer(NULL) { setSnapshotQuality(gSavedSettings.getS32("SnapshotQuality")); mSnapshotDelayTimer.setTimerExpirySec(0.0f); @@ -105,6 +115,7 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ; mThumbnailUpdateLock = FALSE ; mThumbnailUpToDate = FALSE ; + mBigThumbnailUpToDate = FALSE ; } LLSnapshotLivePreview::~LLSnapshotLivePreview() @@ -120,14 +131,7 @@ LLSnapshotLivePreview::~LLSnapshotLivePreview() void LLSnapshotLivePreview::setMaxImageSize(S32 size) { - if(size < MAX_SNAPSHOT_IMAGE_SIZE) - { - mMaxImageSize = size; - } - else - { - mMaxImageSize = MAX_SNAPSHOT_IMAGE_SIZE ; - } + mMaxImageSize = llmin(size,(S32)(MAX_SNAPSHOT_IMAGE_SIZE)); } LLViewerTexture* LLSnapshotLivePreview::getCurrentImage() @@ -135,97 +139,92 @@ LLViewerTexture* LLSnapshotLivePreview::getCurrentImage() return mViewerImage[mCurImageIndex]; } -F32 LLSnapshotLivePreview::getAspect() -{ - F32 image_aspect_ratio = ((F32)getWidth()) / ((F32)getHeight()); - F32 window_aspect_ratio = ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()); - - if (!mKeepAspectRatio)//gSavedSettings.getBOOL("KeepAspectForSnapshot")) - { - return image_aspect_ratio; - } - else - { - return window_aspect_ratio; - } -} - F32 LLSnapshotLivePreview::getImageAspect() { if (!getCurrentImage()) { return 0.f; } - - return getAspect() ; + // mKeepAspectRatio) == gSavedSettings.getBOOL("KeepAspectForSnapshot")) + return (mKeepAspectRatio ? ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()) : ((F32)getWidth()) / ((F32)getHeight())); } -void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay) +void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay) { - // Invalidate current image. - LL_DEBUGS() << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << LL_ENDL; - if (getSnapshotUpToDate()) - { - S32 old_image_index = mCurImageIndex; - mCurImageIndex = (mCurImageIndex + 1) % 2; - setSize(mWidth[old_image_index], mHeight[old_image_index]); - mFallAnimTimer.start(); - } - mSnapshotUpToDate = FALSE; - - // Update snapshot source rect depending on whether we keep the aspect ratio. - LLRect& rect = mImageRect[mCurImageIndex]; - rect.set(0, getRect().getHeight(), getRect().getWidth(), 0); - - F32 image_aspect_ratio = ((F32)getWidth()) / ((F32)getHeight()); - F32 window_aspect_ratio = ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()); - - if (mKeepAspectRatio)//gSavedSettings.getBOOL("KeepAspectForSnapshot")) - { - if (image_aspect_ratio > window_aspect_ratio) - { - // trim off top and bottom - S32 new_height = llround((F32)getRect().getWidth() / image_aspect_ratio); - rect.mBottom += (getRect().getHeight() - new_height) / 2; - rect.mTop -= (getRect().getHeight() - new_height) / 2; - } - else if (image_aspect_ratio < window_aspect_ratio) - { - // trim off left and right - S32 new_width = llround((F32)getRect().getHeight() * image_aspect_ratio); - rect.mLeft += (getRect().getWidth() - new_width) / 2; - rect.mRight -= (getRect().getWidth() - new_width) / 2; - } - } - - // Stop shining animation. - mShineAnimTimer.stop(); + lldebugs << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << llendl; // Update snapshot if requested. if (new_snapshot) { + if (getSnapshotUpToDate()) + { + S32 old_image_index = mCurImageIndex; + mCurImageIndex = (mCurImageIndex + 1) % 2; + setSize(mWidth[old_image_index], mHeight[old_image_index]); + mFallAnimTimer.start(); + } + mSnapshotUpToDate = FALSE; + + // Update snapshot source rect depending on whether we keep the aspect ratio. + LLRect& rect = mImageRect[mCurImageIndex]; + rect.set(0, getRect().getHeight(), getRect().getWidth(), 0); + + F32 image_aspect_ratio = ((F32)getWidth()) / ((F32)getHeight()); + F32 window_aspect_ratio = ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()); + + if (mKeepAspectRatio)//gSavedSettings.getBOOL("KeepAspectForSnapshot")) + { + if (image_aspect_ratio > window_aspect_ratio) + { + // trim off top and bottom + S32 new_height = llround((F32)getRect().getWidth() / image_aspect_ratio); + rect.mBottom += (getRect().getHeight() - new_height) / 2; + rect.mTop -= (getRect().getHeight() - new_height) / 2; + } + else if (image_aspect_ratio < window_aspect_ratio) + { + // trim off left and right + S32 new_width = llround((F32)getRect().getHeight() * image_aspect_ratio); + rect.mLeft += (getRect().getWidth() - new_width) / 2; + rect.mRight -= (getRect().getWidth() - new_width) / 2; + } + } + + // Stop shining animation. + mShineAnimTimer.stop(); mSnapshotDelayTimer.start(); mSnapshotDelayTimer.setTimerExpirySec(delay); - LLFloaterSnapshot::preUpdate(); - LLFloaterSocial::preUpdate(); + + // Tell the floater container that the snapshot is in the process of updating itself + if (mViewContainer) + { + mViewContainer->notify(LLSD().with("snapshot-updating", true)); + } } // Update thumbnail if requested. - if(new_thumbnail) + if (new_thumbnail) { mThumbnailUpToDate = FALSE ; + mBigThumbnailUpToDate = FALSE; } } -void LLSnapshotLivePreview::setSnapshotQuality(S32 quality) +// Return true if the quality has been changed, false otherwise +bool LLSnapshotLivePreview::setSnapshotQuality(S32 quality, bool set_by_user) { llclamp(quality, 0, 100); if (quality != mSnapshotQuality) { mSnapshotQuality = quality; - gSavedSettings.setS32("SnapshotQuality", quality); - mSnapshotUpToDate = FALSE; + if (set_by_user) + { + gSavedSettings.setS32("SnapshotQuality", quality); + } + mFormattedImage = NULL; // Invalidate the already formatted image if any + return true; } + return false; } void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y) @@ -459,68 +458,57 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare if (old_rect.getWidth() != width || old_rect.getHeight() != height) { LL_DEBUGS() << "window reshaped, updating thumbnail" << LL_ENDL; - updateSnapshot(FALSE, TRUE); + updateSnapshot(TRUE); } } BOOL LLSnapshotLivePreview::setThumbnailImageSize() { - if(getWidth() < 10 || getHeight() < 10) + if (getWidth() < 10 || getHeight() < 10) { return FALSE ; } - S32 window_width = gViewerWindow->getWindowWidthRaw() ; - S32 window_height = gViewerWindow->getWindowHeightRaw() ; + S32 width = (mThumbnailSubsampled ? mPreviewImage->getWidth() : gViewerWindow->getWindowWidthRaw()); + S32 height = (mThumbnailSubsampled ? mPreviewImage->getHeight() : gViewerWindow->getWindowHeightRaw()) ; - F32 window_aspect_ratio = ((F32)window_width) / ((F32)window_height); + F32 aspect_ratio = ((F32)width) / ((F32)height); // UI size for thumbnail - // *FIXME: the rect does not change, so maybe there's no need to recalculate max w/h. - const LLRect& thumbnail_rect = mThumbnailPlaceholderRect; - S32 max_width = thumbnail_rect.getWidth(); - S32 max_height = thumbnail_rect.getHeight(); + S32 max_width = mThumbnailPlaceholderRect.getWidth(); + S32 max_height = mThumbnailPlaceholderRect.getHeight(); - if (window_aspect_ratio > (F32)max_width / max_height) + if (aspect_ratio > (F32)max_width / (F32)max_height) { // image too wide, shrink to width mThumbnailWidth = max_width; - mThumbnailHeight = llround((F32)max_width / window_aspect_ratio); + mThumbnailHeight = llround((F32)max_width / aspect_ratio); } else { // image too tall, shrink to height mThumbnailHeight = max_height; - mThumbnailWidth = llround((F32)max_height * window_aspect_ratio); + mThumbnailWidth = llround((F32)max_height * aspect_ratio); } - - if(mThumbnailWidth > window_width || mThumbnailHeight > window_height) + + if (mThumbnailWidth > width || mThumbnailHeight > height) { return FALSE ;//if the window is too small, ignore thumbnail updating. } S32 left = 0 , top = mThumbnailHeight, right = mThumbnailWidth, bottom = 0 ; - if(!mKeepAspectRatio) + if (!mKeepAspectRatio) { - F32 ratio_x = (F32)getWidth() / window_width ; - F32 ratio_y = (F32)getHeight() / window_height ; - - //if(getWidth() > window_width || - // getHeight() > window_height ) - { - if(ratio_x > ratio_y) - { - top = (S32)(top * ratio_y / ratio_x) ; - } - else - { - right = (S32)(right * ratio_x / ratio_y) ; - } - } - //else - //{ - // right = (S32)(right * ratio_x) ; - // top = (S32)(top * ratio_y) ; - //} + F32 ratio_x = (F32)getWidth() / width ; + F32 ratio_y = (F32)getHeight() / height ; + + if (ratio_x > ratio_y) + { + top = (S32)(top * ratio_y / ratio_x) ; + } + else + { + right = (S32)(right * ratio_x / ratio_y) ; + } left = (S32)((mThumbnailWidth - right) * 0.5f) ; bottom = (S32)((mThumbnailHeight - top) * 0.5f) ; top += bottom ; @@ -556,25 +544,62 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) return ; } + // Invalidate the big thumbnail when we regenerate the small one + mBigThumbnailUpToDate = FALSE; + if(mThumbnailImage) { resetThumbnailImage() ; } LLPointer<LLImageRaw> raw = new LLImageRaw; - if(!gViewerWindow->thumbnailSnapshot(raw, - mThumbnailWidth, mThumbnailHeight, - gSavedSettings.getBOOL("RenderUIInSnapshot"), - FALSE, - mSnapshotBufferType) ) + + if (mThumbnailSubsampled) + { + // The thumbnail is be a subsampled version of the preview (used in SL Share previews, i.e. Flickr, Twitter, Facebook) + raw->resize( mPreviewImage->getWidth(), + mPreviewImage->getHeight(), + mPreviewImage->getComponents()); + raw->copy(mPreviewImage); + // Scale to the thumbnail size + if (!raw->scale(mThumbnailWidth, mThumbnailHeight)) + { + raw = NULL ; + } + } + else + { + // The thumbnail is a screen view with screen grab positioning preview + if(!gViewerWindow->thumbnailSnapshot(raw, + mThumbnailWidth, mThumbnailHeight, + mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"), + FALSE, + mSnapshotBufferType) ) + { + raw = NULL ; + } + } + + if (raw) { - raw = NULL ; - } - - if(raw) - { - raw->expandToPowerOfTwo(); - mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + // Filter the thumbnail + // Note: filtering needs to be done *before* the scaling to power of 2 or the effect is distorted + if (getFilter() != "") + { + std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(getFilter()); + if (filter_path != "") + { + LLImageFilter filter(filter_path); + filter.executeFilter(raw); + } + else + { + llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + } + } + // Scale to a power of 2 so it can be mapped to a texture + raw->expandToPowerOfTwo(); + mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); mThumbnailUpToDate = TRUE ; } @@ -582,6 +607,52 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) mThumbnailUpdateLock = FALSE ; } +LLViewerTexture* LLSnapshotLivePreview::getBigThumbnailImage() +{ + if (mThumbnailUpdateLock) //in the process of updating + { + return NULL; + } + if (mBigThumbnailUpToDate && mBigThumbnailImage)//already updated + { + return mBigThumbnailImage; + } + + LLPointer<LLImageRaw> raw = new LLImageRaw; + + if (raw) + { + // The big thumbnail is a new filtered version of the preview (used in SL Share previews, i.e. Flickr, Twitter, Facebook) + mBigThumbnailWidth = mPreviewImage->getWidth(); + mBigThumbnailHeight = mPreviewImage->getHeight(); + raw->resize( mBigThumbnailWidth, + mBigThumbnailHeight, + mPreviewImage->getComponents()); + raw->copy(mPreviewImage); + + // Filter + // Note: filtering needs to be done *before* the scaling to power of 2 or the effect is distorted + if (getFilter() != "") + { + std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(getFilter()); + if (filter_path != "") + { + LLImageFilter filter(filter_path); + filter.executeFilter(raw); + } + else + { + llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + } + } + // Scale to a power of 2 so it can be mapped to a texture + raw->expandToPowerOfTwo(); + mBigThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + mBigThumbnailUpToDate = TRUE ; + } + + return mBigThumbnailImage ; +} // Called often. Checks whether it's time to grab a new snapshot and if so, does it. // Returns TRUE if new snapshot generated, FALSE otherwise. @@ -598,7 +669,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) // If we're in freeze-frame mode and camera has moved, update snapshot. LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin(); LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion(); - if (gSavedSettings.getBOOL("FreezeTime") && + if (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview && (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)) { previewp->mCameraPos = new_camera_pos; @@ -616,157 +687,256 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mSnapshotActive = (previewp->mSnapshotDelayTimer.getStarted() && previewp->mSnapshotDelayTimer.hasExpired()) && !LLToolCamera::getInstance()->hasMouseCapture(); // don't take snapshots while ALT-zoom active - if ( ! previewp->mSnapshotActive) + if (!previewp->mSnapshotActive && previewp->getSnapshotUpToDate() && previewp->getThumbnailUpToDate()) { return FALSE; } // time to produce a snapshot - previewp->setThumbnailImageSize(); - - LL_DEBUGS() << "producing snapshot" << LL_ENDL; - if (!previewp->mPreviewImage) + if(!previewp->getSnapshotUpToDate()) + { + lldebugs << "producing snapshot" << llendl; + if (!previewp->mPreviewImage) + { + previewp->mPreviewImage = new LLImageRaw; + } + + previewp->setVisible(FALSE); + previewp->setEnabled(FALSE); + + previewp->getWindow()->incBusyCount(); + previewp->setImageScaled(FALSE); + + // grab the raw image + if (gViewerWindow->rawSnapshot( + previewp->mPreviewImage, + previewp->getWidth(), + previewp->getHeight(), + previewp->mKeepAspectRatio,//gSavedSettings.getBOOL("KeepAspectForSnapshot"), + previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_TEXTURE, + previewp->mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"), + FALSE, + previewp->mSnapshotBufferType, + previewp->getMaxImageSize())) + { + // Invalidate/delete any existing encoded image + previewp->mPreviewImageEncoded = NULL; + // Invalidate/delete any existing formatted image + previewp->mFormattedImage = NULL; + // Update the data size + previewp->estimateDataSize(); + + // Full size preview is set: get the decoded image result and save it for animation + if (gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview) + { + // Get the decoded version of the formatted image + previewp->getEncodedImage(); + + // We need to scale that a bit for display... + LLPointer<LLImageRaw> scaled = new LLImageRaw( + previewp->mPreviewImageEncoded->getData(), + previewp->mPreviewImageEncoded->getWidth(), + previewp->mPreviewImageEncoded->getHeight(), + previewp->mPreviewImageEncoded->getComponents()); + + if (!scaled->isBufferInvalid()) + { + // leave original image dimensions, just scale up texture buffer + if (previewp->mPreviewImageEncoded->getWidth() > 1024 || previewp->mPreviewImageEncoded->getHeight() > 1024) + { + // go ahead and shrink image to appropriate power of 2 for display + scaled->biasedScaleToPowerOfTwo(1024); + previewp->setImageScaled(TRUE); + } + else + { + // expand image but keep original image data intact + scaled->expandToPowerOfTwo(1024, FALSE); + } + + previewp->mViewerImage[previewp->mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), FALSE); + LLPointer<LLViewerTexture> curr_preview_image = previewp->mViewerImage[previewp->mCurImageIndex]; + gGL.getTexUnit(0)->bind(curr_preview_image); + curr_preview_image->setFilteringOption(previewp->getSnapshotType() == SNAPSHOT_TEXTURE ? LLTexUnit::TFO_ANISOTROPIC : LLTexUnit::TFO_POINT); + curr_preview_image->setAddressMode(LLTexUnit::TAM_CLAMP); + + previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); + previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame + } + } + // The snapshot is updated now... + previewp->mSnapshotUpToDate = TRUE; + + // We need to update the thumbnail though + previewp->setThumbnailImageSize(); + previewp->generateThumbnailImage(TRUE) ; + } + previewp->getWindow()->decBusyCount(); + previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview); // only show fullscreen preview when in freeze frame mode + previewp->mSnapshotDelayTimer.stop(); + previewp->mSnapshotActive = FALSE; + lldebugs << "done creating snapshot" << llendl; + } + + if (!previewp->getThumbnailUpToDate()) { - previewp->mPreviewImage = new LLImageRaw; + previewp->generateThumbnailImage() ; } + + // Tell the floater container that the snapshot is updated now + if (previewp->mViewContainer) + { + previewp->mViewContainer->notify(LLSD().with("snapshot-updated", true)); + } - if (!previewp->mPreviewImageEncoded) - { - previewp->mPreviewImageEncoded = new LLImageRaw; - } + return TRUE; +} - previewp->setVisible(FALSE); - previewp->setEnabled(FALSE); - - previewp->getWindow()->incBusyCount(); - previewp->setImageScaled(FALSE); - - // grab the raw image and encode it into desired format - if(gViewerWindow->rawSnapshot( - previewp->mPreviewImage, - previewp->getWidth(), - previewp->getHeight(), - previewp->mKeepAspectRatio,//gSavedSettings.getBOOL("KeepAspectForSnapshot"), - previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_TEXTURE, - gSavedSettings.getBOOL("RenderUIInSnapshot"), - FALSE, - previewp->mSnapshotBufferType, - previewp->getMaxImageSize())) - { - previewp->mPreviewImageEncoded->resize( - previewp->mPreviewImage->getWidth(), - previewp->mPreviewImage->getHeight(), - previewp->mPreviewImage->getComponents()); +S32 LLSnapshotLivePreview::getEncodedImageWidth() const +{ + S32 width = getWidth(); + if (getSnapshotType() == SNAPSHOT_TEXTURE) + { + width = LLImageRaw::biasedDimToPowerOfTwo(width,MAX_TEXTURE_SIZE); + } + return width; +} +S32 LLSnapshotLivePreview::getEncodedImageHeight() const +{ + S32 height = getHeight(); + if (getSnapshotType() == SNAPSHOT_TEXTURE) + { + height = LLImageRaw::biasedDimToPowerOfTwo(height,MAX_TEXTURE_SIZE); + } + return height; +} - if(previewp->getSnapshotType() == SNAPSHOT_TEXTURE) +LLPointer<LLImageRaw> LLSnapshotLivePreview::getEncodedImage() +{ + if (!mPreviewImageEncoded) + { + mPreviewImageEncoded = new LLImageRaw; + + mPreviewImageEncoded->resize( + mPreviewImage->getWidth(), + mPreviewImage->getHeight(), + mPreviewImage->getComponents()); + + if (getSnapshotType() == SNAPSHOT_TEXTURE) { + // We don't store the intermediate formatted image in mFormattedImage in the J2C case LL_DEBUGS() << "Encoding new image of format J2C" << LL_ENDL; LLPointer<LLImageJ2C> formatted = new LLImageJ2C; + // Copy the preview LLPointer<LLImageRaw> scaled = new LLImageRaw( - previewp->mPreviewImage->getData(), - previewp->mPreviewImage->getWidth(), - previewp->mPreviewImage->getHeight(), - previewp->mPreviewImage->getComponents()); - + mPreviewImage->getData(), + mPreviewImage->getWidth(), + mPreviewImage->getHeight(), + mPreviewImage->getComponents()); + // Scale it as required by J2C scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE); - previewp->setImageScaled(TRUE); + setImageScaled(TRUE); + // Compress to J2C if (formatted->encode(scaled, 0.f)) { - previewp->mDataSize = formatted->getDataSize(); - formatted->decode(previewp->mPreviewImageEncoded, 0); + // We can update the data size precisely at that point + mDataSize = formatted->getDataSize(); + // Decompress back + formatted->decode(mPreviewImageEncoded, 0); } } else { - // delete any existing image - previewp->mFormattedImage = NULL; - // now create the new one of the appropriate format. - LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotFormat(); - LL_DEBUGS() << "Encoding new image of format " << format << LL_ENDL; - - switch(format) - { - case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: - previewp->mFormattedImage = new LLImagePNG(); - break; - case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: - previewp->mFormattedImage = new LLImageJPEG(previewp->mSnapshotQuality); - break; - case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: - previewp->mFormattedImage = new LLImageBMP(); - break; - } - if (previewp->mFormattedImage->encode(previewp->mPreviewImage, 0)) - { - previewp->mDataSize = previewp->mFormattedImage->getDataSize(); - // special case BMP to copy instead of decode otherwise decode will crash. - if(format == LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP) - { - previewp->mPreviewImageEncoded->copy(previewp->mPreviewImage); - } - else - { - previewp->mFormattedImage->decode(previewp->mPreviewImageEncoded, 0); - } - } - } - - LLPointer<LLImageRaw> scaled = new LLImageRaw( - previewp->mPreviewImageEncoded->getData(), - previewp->mPreviewImageEncoded->getWidth(), - previewp->mPreviewImageEncoded->getHeight(), - previewp->mPreviewImageEncoded->getComponents()); - - if(!scaled->isBufferInvalid()) - { - // leave original image dimensions, just scale up texture buffer - if (previewp->mPreviewImageEncoded->getWidth() > 1024 || previewp->mPreviewImageEncoded->getHeight() > 1024) - { - // go ahead and shrink image to appropriate power of 2 for display - scaled->biasedScaleToPowerOfTwo(1024); - previewp->setImageScaled(TRUE); - } - else - { - // expand image but keep original image data intact - scaled->expandToPowerOfTwo(1024, FALSE); - } - - previewp->mViewerImage[previewp->mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), FALSE); - LLPointer<LLViewerTexture> curr_preview_image = previewp->mViewerImage[previewp->mCurImageIndex]; - gGL.getTexUnit(0)->bind(curr_preview_image); - if (previewp->getSnapshotType() != SNAPSHOT_TEXTURE) - { - curr_preview_image->setFilteringOption(LLTexUnit::TFO_POINT); - } - else - { - curr_preview_image->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC); - } - curr_preview_image->setAddressMode(LLTexUnit::TAM_CLAMP); - - previewp->mSnapshotUpToDate = TRUE; - previewp->generateThumbnailImage(TRUE) ; - - previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); - previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame + // Update mFormattedImage if necessary + getFormattedImage(); + if (getSnapshotFormat() == LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP) + { + // BMP hack : copy instead of decode otherwise decode will crash. + mPreviewImageEncoded->copy(mPreviewImage); + } + else + { + // Decode back + mFormattedImage->decode(mPreviewImageEncoded, 0); + } } } - previewp->getWindow()->decBusyCount(); - // only show fullscreen preview when in freeze frame mode - previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame")); - previewp->mSnapshotDelayTimer.stop(); - previewp->mSnapshotActive = FALSE; + return mPreviewImageEncoded; +} - if(!previewp->getThumbnailUpToDate()) - { - previewp->generateThumbnailImage() ; - } - LL_DEBUGS() << "done creating snapshot" << LL_ENDL; - LLFloaterSnapshot::postUpdate(); - LLFloaterSocial::postUpdate(); +// We actually estimate the data size so that we do not require actual compression when showing the preview +// Note : whenever formatted image is computed, mDataSize will be updated to reflect the true size +void LLSnapshotLivePreview::estimateDataSize() +{ + // Compression ratio + F32 ratio = 1.0; + + if (getSnapshotType() == SNAPSHOT_TEXTURE) + { + ratio = 8.0; // This is what we shoot for when compressing to J2C + } + else + { + LLFloaterSnapshot::ESnapshotFormat format = getSnapshotFormat(); + switch (format) + { + case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: + ratio = 3.0; // Average observed PNG compression ratio + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: + // Observed from JPG compression tests + ratio = (110 - mSnapshotQuality) / 2; + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: + ratio = 1.0; // No compression with BMP + break; + } + } + mDataSize = (S32)((F32)mPreviewImage->getDataSize() / ratio); +} - return TRUE; +LLPointer<LLImageFormatted> LLSnapshotLivePreview::getFormattedImage() +{ + if (!mFormattedImage) + { + // Apply the filter to mPreviewImage + if (getFilter() != "") + { + std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(getFilter()); + if (filter_path != "") + { + LLImageFilter filter(filter_path); + filter.executeFilter(mPreviewImage); + } + else + { + llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + } + } + + // Create the new formatted image of the appropriate format. + LLFloaterSnapshot::ESnapshotFormat format = getSnapshotFormat(); + lldebugs << "Encoding new image of format " << format << llendl; + + switch (format) + { + case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: + mFormattedImage = new LLImagePNG(); + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: + mFormattedImage = new LLImageJPEG(mSnapshotQuality); + break; + case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: + mFormattedImage = new LLImageBMP(); + break; + } + if (mFormattedImage->encode(mPreviewImage, 0)) + { + // We can update the data size precisely at that point + mDataSize = mFormattedImage->getDataSize(); + } + } + return mFormattedImage; } void LLSnapshotLivePreview::setSize(S32 w, S32 h) @@ -776,6 +946,15 @@ void LLSnapshotLivePreview::setSize(S32 w, S32 h) setHeight(h); } +void LLSnapshotLivePreview::setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat format) +{ + if (mSnapshotFormat != format) + { + mFormattedImage = NULL; // Invalidate the already formatted image if any + mSnapshotFormat = format; + } +} + void LLSnapshotLivePreview::getSize(S32& w, S32& h) const { w = getWidth(); @@ -817,8 +996,8 @@ void LLSnapshotLivePreview::saveTexture() LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, // Note: Snapshots to inventory is a special case of content upload - LLFloaterPerms::getGroupPerms(), // that is more permissive than other uploads - LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getGroupPerms("Uploads"), // that is more permissive than other uploads + LLFloaterPerms::getEveryonePerms("Uploads"), "Snapshot : " + pos_string, callback, expected_upload_cost, userdata); gViewerWindow->playSnapshotAnimAndSound(); @@ -836,6 +1015,10 @@ void LLSnapshotLivePreview::saveTexture() BOOL LLSnapshotLivePreview::saveLocal() { + // Update mFormattedImage if necessary + getFormattedImage(); + + // Save the formatted image BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage); if(success) @@ -844,3 +1027,4 @@ BOOL LLSnapshotLivePreview::saveLocal() } return success; } + diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index 0f09ef214a..e1937187a3 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -28,6 +28,7 @@ #define LL_LLSNAPSHOTLIVEPREVIEW_H #include "llpanelsnapshot.h" +#include "llviewertexture.h" #include "llviewerwindow.h" class LLImageJPEG; @@ -61,6 +62,8 @@ public: LLSnapshotLivePreview(const LLSnapshotLivePreview::Params& p); ~LLSnapshotLivePreview(); + void setContainer(LLView* container) { mViewContainer = container; } + /*virtual*/ void draw(); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); @@ -70,6 +73,9 @@ public: void getSize(S32& w, S32& h) const; S32 getWidth() const { return mWidth[mCurImageIndex]; } S32 getHeight() const { return mHeight[mCurImageIndex]; } + S32 getEncodedImageWidth() const; + S32 getEncodedImageHeight() const; + void estimateDataSize(); S32 getDataSize() const { return mDataSize; } void setMaxImageSize(S32 size) ; S32 getMaxImageSize() {return mMaxImageSize ;} @@ -83,36 +89,48 @@ public: S32 getThumbnailHeight() const { return mThumbnailHeight ; } BOOL getThumbnailLock() const { return mThumbnailUpdateLock ; } BOOL getThumbnailUpToDate() const { return mThumbnailUpToDate ;} + void setThumbnailSubsampled(BOOL subsampled) { mThumbnailSubsampled = subsampled; } + LLViewerTexture* getCurrentImage(); F32 getImageAspect(); - F32 getAspect() ; const LLRect& getImageRect() const { return mImageRect[mCurImageIndex]; } BOOL isImageScaled() const { return mImageScaled[mCurImageIndex]; } void setImageScaled(BOOL scaled) { mImageScaled[mCurImageIndex] = scaled; } const LLVector3d& getPosTakenGlobal() const { return mPosTakenGlobal; } void setSnapshotType(ESnapshotType type) { mSnapshotType = type; } - void setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat type) { mSnapshotFormat = type; } - void setSnapshotQuality(S32 quality); + void setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat format); + bool setSnapshotQuality(S32 quality, bool set_by_user = true); void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; } + void setAllowRenderUI(BOOL allow) { mAllowRenderUI = allow; } + void setAllowFullScreenPreview(BOOL allow) { mAllowFullScreenPreview = allow; } + void setFilter(std::string filter_name) { mFilterName = filter_name; } + std::string getFilter() const { return mFilterName; } void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f); void saveTexture(); BOOL saveLocal(); - LLPointer<LLImageFormatted> getFormattedImage() const { return mFormattedImage; } - LLPointer<LLImageRaw> getEncodedImage() const { return mPreviewImageEncoded; } + LLPointer<LLImageFormatted> getFormattedImage(); + LLPointer<LLImageRaw> getEncodedImage(); - /// Sets size of preview thumbnail image and thhe surrounding rect. + /// Sets size of preview thumbnail image and the surrounding rect. void setThumbnailPlaceholderRect(const LLRect& rect) {mThumbnailPlaceholderRect = rect; } BOOL setThumbnailImageSize() ; void generateThumbnailImage(BOOL force_update = FALSE) ; void resetThumbnailImage() { mThumbnailImage = NULL ; } void drawPreviewRect(S32 offset_x, S32 offset_y) ; + + LLViewerTexture* getBigThumbnailImage(); + S32 getBigThumbnailWidth() const { return mBigThumbnailWidth ; } + S32 getBigThumbnailHeight() const { return mBigThumbnailHeight ; } + // Returns TRUE when snapshot generated, FALSE otherwise. static BOOL onIdle( void* snapshot_preview ); private: + LLView* mViewContainer; + LLColor4 mColor; LLPointer<LLViewerTexture> mViewerImage[2]; //used to represent the scene when the frame is frozen. LLRect mImageRect[2]; @@ -129,11 +147,20 @@ private: BOOL mThumbnailUpdateLock ; BOOL mThumbnailUpToDate ; LLRect mThumbnailPlaceholderRect; + BOOL mThumbnailSubsampled; // TRUE if the thumbnail is a subsampled version of the mPreviewImage + + LLPointer<LLViewerTexture> mBigThumbnailImage ; + S32 mBigThumbnailWidth; + S32 mBigThumbnailHeight; + BOOL mBigThumbnailUpToDate; S32 mCurImageIndex; + // The logic is mPreviewImage (raw frame) -> mFormattedImage (formatted / filtered) -> mPreviewImageEncoded (decoded back, to show artifacts) LLPointer<LLImageRaw> mPreviewImage; LLPointer<LLImageRaw> mPreviewImageEncoded; LLPointer<LLImageFormatted> mFormattedImage; + BOOL mAllowRenderUI; + BOOL mAllowFullScreenPreview; LLFrameTimer mSnapshotDelayTimer; S32 mShineCountdown; LLFrameTimer mShineAnimTimer; @@ -150,6 +177,7 @@ private: LLQuaternion mCameraRot; BOOL mSnapshotActive; LLViewerWindow::ESnapshotType mSnapshotBufferType; + std::string mFilterName; public: static std::set<LLSnapshotLivePreview*> sList; diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp new file mode 100644 index 0000000000..b1194dcd1b --- /dev/null +++ b/indra/newview/llsyntaxid.cpp @@ -0,0 +1,330 @@ +/** + * @file LLSyntaxId + * @brief Handles downloading, saving, and checking of LSL keyword/syntax files + * for each region. + * @author Ima Mechanique, Cinder Roxley + * + * $LicenseInfo:firstyear=2013&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2013, 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 "llsyntaxid.h" +#include "llagent.h" +#include "llappviewer.h" +#include "llhttpclient.h" +#include "llsdserialize.h" +#include "llviewerregion.h" + +//----------------------------------------------------------------------------- +// fetchKeywordsFileResponder +//----------------------------------------------------------------------------- +class fetchKeywordsFileResponder : public LLHTTPClient::Responder +{ +public: + fetchKeywordsFileResponder(const std::string& filespec) + : mFileSpec(filespec) + { + LL_DEBUGS("SyntaxLSL") << "Instantiating with file saving to: '" << filespec << "'" << LL_ENDL; + } + + virtual void errorWithContent(U32 status, + const std::string& reason, + const LLSD& content) + { + LL_WARNS("SyntaxLSL") << "failed to fetch syntax file [status:" << status << "]: " << content << LL_ENDL; + } + + virtual void result(const LLSD& content_ref) + { + // Continue only if a valid LLSD object was returned. + if (content_ref.isMap()) + { + if (LLSyntaxIdLSL::getInstance()->isSupportedVersion(content_ref)) + { + LLSyntaxIdLSL::getInstance()->setKeywordsXml(content_ref); + + cacheFile(content_ref); + LLSyntaxIdLSL::getInstance()->handleFileFetched(mFileSpec); + } + else + { + LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; + } + } + else + { + LL_WARNS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD." << LL_ENDL; + } + } + + void cacheFile(const LLSD& content_ref) + { + std::stringstream str; + LLSDSerialize::toXML(content_ref, str); + const std::string xml = str.str(); + + // save the str to disk, usually to the cache. + llofstream file(mFileSpec, std::ios_base::out); + file.write(xml.c_str(), str.str().size()); + file.close(); + + LL_DEBUGS("SyntaxLSL") << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; + } + +private: + std::string mFileSpec; +}; + +//----------------------------------------------------------------------------- +// LLSyntaxIdLSL +//----------------------------------------------------------------------------- +const std::string SYNTAX_ID_CAPABILITY_NAME = "LSLSyntax"; +const std::string SYNTAX_ID_SIMULATOR_FEATURE = "LSLSyntaxId"; +const std::string FILENAME_DEFAULT = "keywords_lsl_default.xml"; + +/** + * @brief LLSyntaxIdLSL constructor + */ +LLSyntaxIdLSL::LLSyntaxIdLSL() +: mKeywordsXml(LLSD()) +, mCapabilityURL(std::string()) +, mFilePath(LL_PATH_APP_SETTINGS) +, mSyntaxId(LLUUID()) +{ + loadDefaultKeywordsIntoLLSD(); + mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLSyntaxIdLSL::handleRegionChanged, this)); + handleRegionChanged(); // Kick off an initial caps query and fetch +} + +void LLSyntaxIdLSL::buildFullFileSpec() +{ + ELLPath path = mSyntaxId.isNull() ? LL_PATH_APP_SETTINGS : LL_PATH_CACHE; + const std::string filename = mSyntaxId.isNull() ? FILENAME_DEFAULT : "keywords_lsl_" + mSyntaxId.asString() + ".llsd.xml"; + mFullFileSpec = gDirUtilp->getExpandedFilename(path, filename); +} + +//----------------------------------------------------------------------------- +// syntaxIdChange() +//----------------------------------------------------------------------------- +bool LLSyntaxIdLSL::syntaxIdChanged() +{ + LLViewerRegion* region = gAgent.getRegion(); + + if (region) + { + if (region->capabilitiesReceived()) + { + LLSD sim_features; + region->getSimulatorFeatures(sim_features); + + if (sim_features.has(SYNTAX_ID_SIMULATOR_FEATURE)) + { + // get and check the hash + LLUUID new_syntax_id = sim_features[SYNTAX_ID_SIMULATOR_FEATURE].asUUID(); + mCapabilityURL = region->getCapability(SYNTAX_ID_CAPABILITY_NAME); + LL_DEBUGS("SyntaxLSL") << SYNTAX_ID_SIMULATOR_FEATURE << " capability URL: " << mCapabilityURL << LL_ENDL; + if (new_syntax_id != mSyntaxId) + { + LL_DEBUGS("SyntaxLSL") << "New SyntaxID '" << new_syntax_id << "' found." << LL_ENDL; + mSyntaxId = new_syntax_id; + return true; + } + else + LL_DEBUGS("SyntaxLSL") << "SyntaxID matches what we have." << LL_ENDL; + } + } + else + { + region->setCapabilitiesReceivedCallback(boost::bind(&LLSyntaxIdLSL::handleCapsReceived, this, _1)); + LL_DEBUGS("SyntaxLSL") << "Region has not received capabilities. Waiting for caps..." << LL_ENDL; + } + } + return false; +} + +//----------------------------------------------------------------------------- +// fetchKeywordsFile +//----------------------------------------------------------------------------- +void LLSyntaxIdLSL::fetchKeywordsFile(const std::string& filespec) +{ + mInflightFetches.push_back(filespec); + LLHTTPClient::get(mCapabilityURL, + new fetchKeywordsFileResponder(filespec), + LLSD(), 30.f); + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is: " << mCapabilityURL << ". Filename to use is: '" << filespec << "'." << LL_ENDL; +} + + +//----------------------------------------------------------------------------- +// initialize +//----------------------------------------------------------------------------- +void LLSyntaxIdLSL::initialize() +{ + if (mSyntaxId.isNull()) + { + loadDefaultKeywordsIntoLLSD(); + } + else if (!mCapabilityURL.empty()) + { + LL_DEBUGS("SyntaxLSL") << "LSL version has changed, getting appropriate file." << LL_ENDL; + + // Need a full spec regardless of file source, so build it now. + buildFullFileSpec(); + if (mSyntaxId.notNull()) + { + if (!gDirUtilp->fileExists(mFullFileSpec)) + { // Does not exist, so fetch it from the capability + LL_DEBUGS("SyntaxLSL") << "LSL syntax not cached, attempting download." << LL_ENDL; + fetchKeywordsFile(mFullFileSpec); + } + else + { + LL_DEBUGS("SyntaxLSL") << "Found cached Syntax file: " << mFullFileSpec << " Loading keywords." << LL_ENDL; + loadKeywordsIntoLLSD(); + } + } + else + { + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId is null. Loading default values" << LL_ENDL; + loadDefaultKeywordsIntoLLSD(); + } + } + else + { + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL; + loadDefaultKeywordsIntoLLSD(); + } +} + +//----------------------------------------------------------------------------- +// isSupportedVersion +//----------------------------------------------------------------------------- +const U32 LLSD_SYNTAX_LSL_VERSION_EXPECTED = 2; +const std::string LLSD_SYNTAX_LSL_VERSION_KEY("llsd-lsl-syntax-version"); + +bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) +{ + bool is_valid = false; + /* + * If the schema used to store LSL keywords and hints changes, this value is incremented + * Note that it should _not_ be changed if the keywords and hints _content_ changes. + */ + + if (content.has(LLSD_SYNTAX_LSL_VERSION_KEY)) + { + LL_DEBUGS("SyntaxLSL") << "LSL syntax version: " << content[LLSD_SYNTAX_LSL_VERSION_KEY].asString() << LL_ENDL; + + if (content[LLSD_SYNTAX_LSL_VERSION_KEY].asInteger() == LLSD_SYNTAX_LSL_VERSION_EXPECTED) + { + is_valid = true; + } + } + else + { + LL_DEBUGS("SyntaxLSL") << "Missing LSL syntax version key." << LL_ENDL; + } + + return is_valid; +} + +//----------------------------------------------------------------------------- +// loadDefaultKeywordsIntoLLSD() +//----------------------------------------------------------------------------- +void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() +{ + mSyntaxId.setNull(); + buildFullFileSpec(); + loadKeywordsIntoLLSD(); +} + +//----------------------------------------------------------------------------- +// loadKeywordsFileIntoLLSD +//----------------------------------------------------------------------------- +/** + * @brief Load xml serialised LLSD + * @desc Opens the specified filespec and attempts to deserialise the + * contained data to the specified LLSD object. indicate success/failure with + * sLoaded/sLoadFailed members. + */ +void LLSyntaxIdLSL::loadKeywordsIntoLLSD() +{ + LLSD content; + llifstream file; + file.open(mFullFileSpec); + if (file.is_open()) + { + if (LLSDSerialize::fromXML(content, file) != LLSDParser::PARSE_FAILURE) + { + if (isSupportedVersion(content)) + { + LL_DEBUGS("SyntaxLSL") << "Deserialised: " << mFullFileSpec << LL_ENDL; + } + else + { + LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; + } + } + } + else + { + LL_WARNS("SyntaxLSL") << "Failed to open: " << mFullFileSpec << LL_ENDL; + } + mKeywordsXml = content; + mSyntaxIDChangedSignal(); +} + +bool LLSyntaxIdLSL::keywordFetchInProgress() +{ + return !mInflightFetches.empty(); +} + +void LLSyntaxIdLSL::handleRegionChanged() +{ + if (syntaxIdChanged()) + { + buildFullFileSpec(); + fetchKeywordsFile(mFullFileSpec); + } +} + +void LLSyntaxIdLSL::handleCapsReceived(const LLUUID& region_uuid) +{ + LLViewerRegion* current_region = gAgent.getRegion(); + + if (region_uuid.notNull() + && current_region->getRegionID() == region_uuid) + { + syntaxIdChanged(); + } +} + +void LLSyntaxIdLSL::handleFileFetched(const std::string& filepath) +{ + mInflightFetches.remove(filepath); + loadKeywordsIntoLLSD(); +} + +boost::signals2::connection LLSyntaxIdLSL::addSyntaxIDCallback(const syntax_id_changed_signal_t::slot_type& cb) +{ + return mSyntaxIDChangedSignal.connect(cb); +} diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h new file mode 100644 index 0000000000..504fb0997e --- /dev/null +++ b/indra/newview/llsyntaxid.h @@ -0,0 +1,73 @@ +/** + * @file llsyntaxid.h + * @brief Contains methods to access the LSLSyntaxId feature and LSLSyntax capability + * to use the appropriate syntax file for the current region's LSL version. + * @author Ima Mechanique, Cinder Roxley + * + * $LicenseInfo:firstyear=2013&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2013, 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_SYNTAXID_H +#define LL_SYNTAXID_H + +#include "llviewerprecompiledheaders.h" + +#include "llsingleton.h" + +class fetchKeywordsFileResponder; + +class LLSyntaxIdLSL : public LLSingleton<LLSyntaxIdLSL> +{ + friend class LLSingleton<LLSyntaxIdLSL>; + friend class fetchKeywordsFileResponder; + +private: + std::list<std::string> mInflightFetches; + typedef boost::signals2::signal<void()> syntax_id_changed_signal_t; + syntax_id_changed_signal_t mSyntaxIDChangedSignal; + boost::signals2::connection mRegionChangedCallback; + + bool syntaxIdChanged(); + bool isSupportedVersion(const LLSD& content); + void handleRegionChanged(); + void handleCapsReceived(const LLUUID& region_uuid); + void handleFileFetched(const std::string& filepath); + void setKeywordsXml(const LLSD& content) { mKeywordsXml = content; }; + void buildFullFileSpec(); + void fetchKeywordsFile(const std::string& filespec); + void loadDefaultKeywordsIntoLLSD(); + void loadKeywordsIntoLLSD(); + + std::string mCapabilityURL; + std::string mFullFileSpec; + ELLPath mFilePath; + LLUUID mSyntaxId; + LLSD mKeywordsXml; + +public: + LLSyntaxIdLSL(); + void initialize(); + bool keywordFetchInProgress(); + LLSD getKeywordsXML() const { return mKeywordsXml; }; + boost::signals2::connection addSyntaxIDCallback(const syntax_id_changed_signal_t::slot_type& cb); +}; + +#endif // LLSYNTAXID_H diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 14a42dd8dc..9ea46cab68 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2593,7 +2593,8 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const S32 desired_size; std::string exten = gDirUtilp->getExtension(url); - if (f_type == FTT_SERVER_BAKE) + //if (f_type == FTT_SERVER_BAKE) + if ((f_type == FTT_SERVER_BAKE) && !url.empty() && !exten.empty() && (LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C)) { // SH-4030: This case should be redundant with the following one, just // breaking it out here to clarify that it's intended behavior. diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 907baf0661..602c701a33 100755 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -46,7 +46,7 @@ const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding S32 BUTTON_WIDTH = 90; -// *TODO: magic numbers(???) - copied from llnotify.cpp(250) +// *TODO: magic numbers(?) - copied from llnotify.cpp(250) const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp new file mode 100644 index 0000000000..7088558b83 --- /dev/null +++ b/indra/newview/lltwitterconnect.cpp @@ -0,0 +1,503 @@ +/** + * @file lltwitterconnect.h + * @author Merov, Cho + * @brief Connection to Twitter Service + * + * $LicenseInfo:firstyear=2013&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2013, 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 "lltwitterconnect.h" + +#include "llagent.h" +#include "llcallingcard.h" // for LLAvatarTracker +#include "llcommandhandler.h" +#include "llhttpclient.h" +#include "llnotificationsutil.h" +#include "llurlaction.h" +#include "llimagepng.h" +#include "llimagejpeg.h" +#include "lltrans.h" +#include "llevents.h" +#include "llviewerregion.h" + +#include "llfloaterwebcontent.h" +#include "llfloaterreg.h" + +boost::scoped_ptr<LLEventPump> LLTwitterConnect::sStateWatcher(new LLEventStream("TwitterConnectState")); +boost::scoped_ptr<LLEventPump> LLTwitterConnect::sInfoWatcher(new LLEventStream("TwitterConnectInfo")); +boost::scoped_ptr<LLEventPump> LLTwitterConnect::sContentWatcher(new LLEventStream("TwitterConnectContent")); + +// Local functions +void log_twitter_connect_error(const std::string& request, U32 status, const std::string& reason, const std::string& code, const std::string& description) +{ + // Note: 302 (redirect) is *not* an error that warrants logging + if (status != 302) + { + LL_WARNS("TwitterConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << " (" << description << ")" << LL_ENDL; + } +} + +void toast_user_for_twitter_success() +{ + LLSD args; + args["MESSAGE"] = LLTrans::getString("twitter_post_success"); + LLNotificationsUtil::add("TwitterConnect", args); +} + +/////////////////////////////////////////////////////////////////////////////// +// +class LLTwitterConnectResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLTwitterConnectResponder); +public: + + LLTwitterConnectResponder() + { + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS); + } + + /* virtual */ void httpSuccess() + { + LL_DEBUGS("TwitterConnect") << "Connect successful. " << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTED); + } + + /* virtual */ void httpFailure() + { + if ( HTTP_FOUND == getStatus() ) + { + const std::string& location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) + { + LL_WARNS("TwitterConnect") << "Missing Location header " << dumpResponse() + << "[headers:" << getResponseHeaders() << "]" << LL_ENDL; + } + else + { + LLTwitterConnect::instance().openTwitterWeb(location); + } + } + else + { + LL_WARNS("TwitterConnect") << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED); + const LLSD& content = getContent(); + log_twitter_connect_error("Connect", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLTwitterShareResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLTwitterShareResponder); +public: + + LLTwitterShareResponder() + { + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_POSTING); + } + + /* virtual */ void httpSuccess() + { + toast_user_for_twitter_success(); + LL_DEBUGS("TwitterConnect") << "Post successful. " << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_POSTED); + } + + /* virtual */ void httpFailure() + { + if ( HTTP_FOUND == getStatus() ) + { + const std::string& location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) + { + LL_WARNS("TwitterConnect") << "Missing Location header " << dumpResponse() + << "[headers:" << getResponseHeaders() << "]" << LL_ENDL; + } + else + { + LLTwitterConnect::instance().openTwitterWeb(location); + } + } + else if ( HTTP_NOT_FOUND == getStatus() ) + { + LLTwitterConnect::instance().connectToTwitter(); + } + else + { + LL_WARNS("TwitterConnect") << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_POST_FAILED); + const LLSD& content = getContent(); + log_twitter_connect_error("Share", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLTwitterDisconnectResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLTwitterDisconnectResponder); +public: + + LLTwitterDisconnectResponder() + { + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_DISCONNECTING); + } + + void setUserDisconnected() + { + // Clear data + LLTwitterConnect::instance().clearInfo(); + + //Notify state change + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_NOT_CONNECTED); + } + + /* virtual */ void httpSuccess() + { + LL_DEBUGS("TwitterConnect") << "Disconnect successful. " << dumpResponse() << LL_ENDL; + setUserDisconnected(); + } + + /* virtual */ void httpFailure() + { + //User not found so already disconnected + if ( HTTP_NOT_FOUND == getStatus() ) + { + LL_DEBUGS("TwitterConnect") << "Already disconnected. " << dumpResponse() << LL_ENDL; + setUserDisconnected(); + } + else + { + LL_WARNS("TwitterConnect") << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_DISCONNECT_FAILED); + const LLSD& content = getContent(); + log_twitter_connect_error("Disconnect", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLTwitterConnectedResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLTwitterConnectedResponder); +public: + + LLTwitterConnectedResponder(bool auto_connect) : mAutoConnect(auto_connect) + { + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS); + } + + /* virtual */ void httpSuccess() + { + LL_DEBUGS("TwitterConnect") << "Connect successful. " << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTED); + } + + /* virtual */ void httpFailure() + { + // show the facebook login page if not connected yet + if ( HTTP_NOT_FOUND == getStatus() ) + { + LL_DEBUGS("TwitterConnect") << "Not connected. " << dumpResponse() << LL_ENDL; + if (mAutoConnect) + { + LLTwitterConnect::instance().connectToTwitter(); + } + else + { + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_NOT_CONNECTED); + } + } + else + { + LL_WARNS("TwitterConnect") << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED); + const LLSD& content = getContent(); + log_twitter_connect_error("Connected", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } + +private: + bool mAutoConnect; +}; + +/////////////////////////////////////////////////////////////////////////////// +// +class LLTwitterInfoResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLTwitterInfoResponder); +public: + + /* virtual */ void httpSuccess() + { + LL_INFOS("TwitterConnect") << "Twitter: Info received" << LL_ENDL; + LL_DEBUGS("TwitterConnect") << "Getting Twitter info successful. " << dumpResponse() << LL_ENDL; + LLTwitterConnect::instance().storeInfo(getContent()); + } + + /* virtual */ void httpFailure() + { + if ( HTTP_FOUND == getStatus() ) + { + const std::string& location = getResponseHeader(HTTP_IN_HEADER_LOCATION); + if (location.empty()) + { + LL_WARNS("TwitterConnect") << "Missing Location header " << dumpResponse() + << "[headers:" << getResponseHeaders() << "]" << LL_ENDL; + } + else + { + LLTwitterConnect::instance().openTwitterWeb(location); + } + } + else + { + LL_WARNS("TwitterConnect") << dumpResponse() << LL_ENDL; + const LLSD& content = getContent(); + log_twitter_connect_error("Info", getStatus(), getReason(), + content.get("error_code"), content.get("error_description")); + } + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// +LLTwitterConnect::LLTwitterConnect() +: mConnectionState(TWITTER_NOT_CONNECTED), + mConnected(false), + mInfo(), + mRefreshInfo(false), + mReadFromMaster(false) +{ +} + +void LLTwitterConnect::openTwitterWeb(std::string url) +{ + // Open the URL in an internal browser window without navigation UI + LLFloaterWebContent::Params p; + p.url(url); + p.show_chrome(true); + p.allow_address_entry(false); + p.allow_back_forward_navigation(false); + p.trusted_content(true); + p.clean_browser(true); + LLFloater *floater = LLFloaterReg::showInstance("twitter_web", p); + //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). + //So when showing the internal web browser, set focus to it's containing floater "twitter_web". When a mouse event + //occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus. + //twitter_web floater contains the "webbrowser" panel. JIRA: ACME-744 + gFocusMgr.setKeyboardFocus( floater ); + + //LLUrlAction::openURLExternal(url); +} + +std::string LLTwitterConnect::getTwitterConnectURL(const std::string& route, bool include_read_from_master) +{ + std::string url(""); + LLViewerRegion *regionp = gAgent.getRegion(); + if (regionp) + { + //url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + url = regionp->getCapability("TwitterConnect"); + url += route; + + if (include_read_from_master && mReadFromMaster) + { + url += "?read_from_master=true"; + } + } + return url; +} + +void LLTwitterConnect::connectToTwitter(const std::string& request_token, const std::string& oauth_verifier) +{ + LLSD body; + if (!request_token.empty()) + body["request_token"] = request_token; + if (!oauth_verifier.empty()) + body["oauth_verifier"] = oauth_verifier; + + LLHTTPClient::put(getTwitterConnectURL("/connection"), body, new LLTwitterConnectResponder()); +} + +void LLTwitterConnect::disconnectFromTwitter() +{ + LLHTTPClient::del(getTwitterConnectURL("/connection"), new LLTwitterDisconnectResponder()); +} + +void LLTwitterConnect::checkConnectionToTwitter(bool auto_connect) +{ + const bool follow_redirects = false; + const F32 timeout = HTTP_REQUEST_EXPIRY_SECS; + LLHTTPClient::get(getTwitterConnectURL("/connection", true), new LLTwitterConnectedResponder(auto_connect), + LLSD(), timeout, follow_redirects); +} + +void LLTwitterConnect::loadTwitterInfo() +{ + if(mRefreshInfo) + { + const bool follow_redirects = false; + const F32 timeout = HTTP_REQUEST_EXPIRY_SECS; + LLHTTPClient::get(getTwitterConnectURL("/info", true), new LLTwitterInfoResponder(), + LLSD(), timeout, follow_redirects); + } +} + +void LLTwitterConnect::uploadPhoto(const std::string& image_url, const std::string& status) +{ + LLSD body; + body["image"] = image_url; + body["status"] = status; + + // Note: we can use that route for different publish action. We should be able to use the same responder. + LLHTTPClient::post(getTwitterConnectURL("/share/photo", true), body, new LLTwitterShareResponder()); +} + +void LLTwitterConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& status) +{ + std::string imageFormat; + if (dynamic_cast<LLImagePNG*>(image.get())) + { + imageFormat = "png"; + } + else if (dynamic_cast<LLImageJPEG*>(image.get())) + { + imageFormat = "jpg"; + } + else + { + llwarns << "Image to upload is not a PNG or JPEG" << llendl; + return; + } + + // All this code is mostly copied from LLWebProfile::post() + const std::string boundary = "----------------------------0123abcdefab"; + + LLSD headers; + headers["Content-Type"] = "multipart/form-data; boundary=" + boundary; + + std::ostringstream body; + + // *NOTE: The order seems to matter. + body << "--" << boundary << "\r\n" + << "Content-Disposition: form-data; name=\"status\"\r\n\r\n" + << status << "\r\n"; + + body << "--" << boundary << "\r\n" + << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n" + << "Content-Type: image/" << imageFormat << "\r\n\r\n"; + + // Insert the image data. + // *FIX: Treating this as a string will probably screw it up ... + U8* image_data = image->getData(); + for (S32 i = 0; i < image->getDataSize(); ++i) + { + body << image_data[i]; + } + + body << "\r\n--" << boundary << "--\r\n"; + + // postRaw() takes ownership of the buffer and releases it later. + size_t size = body.str().size(); + U8 *data = new U8[size]; + memcpy(data, body.str().data(), size); + + // Note: we can use that route for different publish action. We should be able to use the same responder. + LLHTTPClient::postRaw(getTwitterConnectURL("/share/photo", true), data, size, new LLTwitterShareResponder(), headers); +} + +void LLTwitterConnect::updateStatus(const std::string& status) +{ + LLSD body; + body["status"] = status; + + // Note: we can use that route for different publish action. We should be able to use the same responder. + LLHTTPClient::post(getTwitterConnectURL("/share/status", true), body, new LLTwitterShareResponder()); +} + +void LLTwitterConnect::storeInfo(const LLSD& info) +{ + mInfo = info; + mRefreshInfo = false; + + sInfoWatcher->post(info); +} + +const LLSD& LLTwitterConnect::getInfo() const +{ + return mInfo; +} + +void LLTwitterConnect::clearInfo() +{ + mInfo = LLSD(); +} + +void LLTwitterConnect::setDataDirty() +{ + mRefreshInfo = true; +} + +void LLTwitterConnect::setConnectionState(LLTwitterConnect::EConnectionState connection_state) +{ + if(connection_state == TWITTER_CONNECTED) + { + mReadFromMaster = true; + setConnected(true); + setDataDirty(); + } + else if(connection_state == TWITTER_NOT_CONNECTED) + { + setConnected(false); + } + else if(connection_state == TWITTER_POSTED) + { + mReadFromMaster = false; + } + + if (mConnectionState != connection_state) + { + // set the connection state before notifying watchers + mConnectionState = connection_state; + + LLSD state_info; + state_info["enum"] = connection_state; + sStateWatcher->post(state_info); + } +} + +void LLTwitterConnect::setConnected(bool connected) +{ + mConnected = connected; +} diff --git a/indra/newview/lltwitterconnect.h b/indra/newview/lltwitterconnect.h new file mode 100644 index 0000000000..c1df13f18c --- /dev/null +++ b/indra/newview/lltwitterconnect.h @@ -0,0 +1,99 @@ +/** + * @file lltwitterconnect.h + * @author Merov, Cho + * @brief Connection to Twitter Service + * + * $LicenseInfo:firstyear=2013&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2013, 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_LLTWITTERCONNECT_H +#define LL_LLTWITTERCONNECT_H + +#include "llsingleton.h" +#include "llimage.h" + +class LLEventPump; + +/** + * @class LLTwitterConnect + * + * Manages authentication to, and interaction with, a web service allowing the + * the viewer to post status updates and upload photos to Twitter. + */ +class LLTwitterConnect : public LLSingleton<LLTwitterConnect> +{ + LOG_CLASS(LLTwitterConnect); +public: + enum EConnectionState + { + TWITTER_NOT_CONNECTED = 0, + TWITTER_CONNECTION_IN_PROGRESS = 1, + TWITTER_CONNECTED = 2, + TWITTER_CONNECTION_FAILED = 3, + TWITTER_POSTING = 4, + TWITTER_POSTED = 5, + TWITTER_POST_FAILED = 6, + TWITTER_DISCONNECTING = 7, + TWITTER_DISCONNECT_FAILED = 8 + }; + + void connectToTwitter(const std::string& request_token = "", const std::string& oauth_verifier = ""); // Initiate the complete Twitter connection. Please use checkConnectionToTwitter() in normal use. + void disconnectFromTwitter(); // Disconnect from the Twitter service. + void checkConnectionToTwitter(bool auto_connect = false); // Check if an access token is available on the Twitter service. If not, call connectToTwitter(). + + void loadTwitterInfo(); + void uploadPhoto(const std::string& image_url, const std::string& status); + void uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& status); + void updateStatus(const std::string& status); + + void storeInfo(const LLSD& info); + const LLSD& getInfo() const; + void clearInfo(); + void setDataDirty(); + + void setConnectionState(EConnectionState connection_state); + void setConnected(bool connected); + bool isConnected() { return mConnected; } + bool isTransactionOngoing() { return ((mConnectionState == TWITTER_CONNECTION_IN_PROGRESS) || (mConnectionState == TWITTER_POSTING) || (mConnectionState == TWITTER_DISCONNECTING)); } + EConnectionState getConnectionState() { return mConnectionState; } + + void openTwitterWeb(std::string url); + +private: + friend class LLSingleton<LLTwitterConnect>; + + LLTwitterConnect(); + ~LLTwitterConnect() {}; + std::string getTwitterConnectURL(const std::string& route = "", bool include_read_from_master = false); + + EConnectionState mConnectionState; + BOOL mConnected; + LLSD mInfo; + bool mRefreshInfo; + bool mReadFromMaster; + + static boost::scoped_ptr<LLEventPump> sStateWatcher; + static boost::scoped_ptr<LLEventPump> sInfoWatcher; + static boost::scoped_ptr<LLEventPump> sContentWatcher; +}; + +#endif // LL_LLTWITTERCONNECT_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e427bb1735..4e491f257d 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -39,6 +39,7 @@ #include "llfloateravatar.h" #include "llfloateravatarpicker.h" #include "llfloateravatartextures.h" +#include "llfloaterbigpreview.h" #include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbulkpermission.h" @@ -61,6 +62,8 @@ #include "llfloatereditwater.h" #include "llfloaterenvironmentsettings.h" #include "llfloaterevent.h" +#include "llfloaterfacebook.h" +#include "llfloaterflickr.h" #include "llfloaterfonttest.h" #include "llfloatergesture.h" #include "llfloatergodtools.h" @@ -98,13 +101,13 @@ #include "llfloaterreporter.h" #include "llfloatersceneloadstats.h" #include "llfloaterscriptdebug.h" +#include "llfloaterscriptedprefs.h" #include "llfloaterscriptlimits.h" #include "llfloatersearch.h" #include "llfloatersellland.h" #include "llfloatersettingsdebug.h" #include "llfloatersidepanelcontainer.h" #include "llfloatersnapshot.h" -#include "llfloatersocial.h" #include "llfloatersounddevices.h" #include "llfloaterspellchecksettings.h" #include "llfloatertelehub.h" @@ -116,6 +119,7 @@ #include "llfloatertos.h" #include "llfloatertoybox.h" #include "llfloatertranslationsettings.h" +#include "llfloatertwitter.h" #include "llfloateruipreview.h" #include "llfloatervoiceeffect.h" #include "llfloaterwebcontent.h" @@ -261,6 +265,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("pathfinding_linksets", "floater_pathfinding_linksets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingLinksets>); LLFloaterReg::add("pathfinding_console", "floater_pathfinding_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingConsole>); LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); + LLFloaterReg::add("perms_default", "floater_perms_default.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPermsDefault>); LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>); LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreferenceProxy>); @@ -269,7 +274,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTranslationSettings>); LLFloaterReg::add("prefs_spellchecker", "floater_spellcheck.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSpellCheckerSettings>); LLFloaterReg::add("prefs_autoreplace", "floater_autoreplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAutoReplaceSettings>); - LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPerms>); LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>); LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview"); @@ -282,6 +286,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewTexture>, "preview"); LLFloaterReg::add("properties", "floater_inventory_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterProperties>); LLFloaterReg::add("publish_classified", "floater_publish_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPublishClassifiedFloater>); + LLFloaterReg::add("script_colors", "floater_script_ed_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptEdPrefs>); LLFloaterReg::add("telehubs", "floater_telehub.xml",&LLFloaterReg::build<LLFloaterTelehub>); LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml", &LLFloaterReg::build<LLFloaterTestInspectors>); @@ -305,7 +310,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>); LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>); - LLFloaterReg::add("social", "floater_social.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSocial>); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>); LLFloaterReg::add("scene_load_stats", "floater_scene_load_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSceneLoadStats>); @@ -314,8 +318,16 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>); LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); - LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("fbc_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("flickr_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("twitter_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + + LLFloaterReg::add("facebook", "floater_facebook.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFacebook>); + LLFloaterReg::add("flickr", "floater_flickr.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFlickr>); + LLFloaterReg::add("twitter", "floater_twitter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTwitter>); + LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBigPreview>); LLFloaterUIPreviewUtil::registerFloater(); LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBvhPreview>, "upload"); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b236bba3b7..4e4c3471be 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -66,6 +66,7 @@ #include "llavataractions.h" #include "lllogininstance.h" #include "llfavoritesbar.h" +#include "llfloaterperms.h" #include "llclipboard.h" #include "llhttpretrypolicy.h" @@ -989,24 +990,73 @@ void activate_gesture_cb(const LLUUID& inv_item) LLGestureMgr::instance().activateGesture(inv_item); } -void create_gesture_cb(const LLUUID& inv_item) +void create_script_cb(const LLUUID& inv_item) { - if (inv_item.isNull()) - return; + if (!inv_item.isNull()) + { + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + LLPermissions perm = item->getPermissions(); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - LLGestureMgr::instance().activateGesture(inv_item); + item->setPermissions(perm); + + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + } + } +} + +void create_gesture_cb(const LLUUID& inv_item) +{ + if (!inv_item.isNull()) + { + LLGestureMgr::instance().activateGesture(inv_item); - LLViewerInventoryItem* item = gInventory.getItem(inv_item); - if (!item) return; - gInventory.updateItem(item); - gInventory.notifyObservers(); + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + LLPermissions perm = item->getPermissions(); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); + + item->setPermissions(perm); + + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); - LLPreviewGesture* preview = LLPreviewGesture::show(inv_item, LLUUID::null); - // Force to be entirely onscreen. - gFloaterView->adjustToFitScreen(preview, FALSE); + LLPreviewGesture* preview = LLPreviewGesture::show(inv_item, LLUUID::null); + // Force to be entirely onscreen. + gFloaterView->adjustToFitScreen(preview, FALSE); + } + } } +void create_notecard_cb(const LLUUID& inv_item) +{ + if (!inv_item.isNull()) + { + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + LLPermissions perm = item->getPermissions(); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Notecards")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Notecards")); + + item->setPermissions(perm); + + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + } + } +} + LLInventoryCallbackManager gInventoryCallbacks; void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, @@ -1719,22 +1769,45 @@ void create_new_item(const std::string& name, LLViewerAssetType::generateDescriptionFor(asset_type, desc); next_owner_perm = (next_owner_perm) ? next_owner_perm : PERM_MOVE | PERM_TRANSFER; - - if (inv_type == LLInventoryType::IT_GESTURE) - { - LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(create_gesture_cb); - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, - NOT_WEARABLE, next_owner_perm, cb); - } - else + LLPointer<LLInventoryCallback> cb = NULL; + + switch (inv_type) { - LLPointer<LLInventoryCallback> cb = NULL; - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, - NOT_WEARABLE, next_owner_perm, cb); + case LLInventoryType::IT_LSL: + { + cb = new LLBoostFuncInventoryCallback(create_script_cb); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Scripts"); + break; + } + + case LLInventoryType::IT_GESTURE: + { + cb = new LLBoostFuncInventoryCallback(create_gesture_cb); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Gestures"); + break; + } + + case LLInventoryType::IT_NOTECARD: + { + cb = new LLBoostFuncInventoryCallback(create_notecard_cb); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Notecards"); + break; + } + default: + break; } - + + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + parent_id, + LLTransactionID::tnull, + name, + desc, + asset_type, + inv_type, + NOT_WEARABLE, + next_owner_perm, + cb); } void slam_inventory_folder(const LLUUID& folder_id, @@ -1822,7 +1895,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, parent_id, LLAssetType::AT_LSL_TEXT, LLInventoryType::IT_LSL, - PERM_MOVE | PERM_TRANSFER); + PERM_MOVE | PERM_TRANSFER); // overridden in create_new_item } else if ("notecard" == type_name) { @@ -1831,7 +1904,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, parent_id, LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, - PERM_ALL); + PERM_ALL); // overridden in create_new_item } else if ("gesture" == type_name) { @@ -1840,7 +1913,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, parent_id, LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, - PERM_ALL); + PERM_ALL); // overridden in create_new_item } else { diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index c284c703d4..d345c49cfb 100755 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -252,7 +252,9 @@ void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachme void activate_gesture_cb(const LLUUID& inv_item); +void create_script_cb(const LLUUID& inv_item); void create_gesture_cb(const LLUUID& inv_item); +void create_notecard_cb(const LLUUID& inv_item); class AddFavoriteLandmarkCallback : public LLInventoryCallback { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ed26842035..8499012cfc 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -196,7 +196,7 @@ private: // 500 means "Internal Server error" but we decided it's okay to // accept this and go past it in the MIME type probe // 302 means the resource can be found temporarily in a different place - added this for join.secondlife.com - // 499 is a code specifc to join.secondlife.com (????) apparently safe to ignore + // 499 is a code specifc to join.secondlife.com (?) apparently safe to ignore // if( ((status >= 200) && (status < 300)) || // ((status >= 400) && (status < 499)) || // (status == 500) || @@ -1524,7 +1524,7 @@ void LLViewerMedia::createSpareBrowserMediaSource() // popping up at the moment we start a media plugin. if (!sSpareBrowserMediaSource && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")) { - // The null owner will keep the browser plugin from fully initializing + // The null owner will keep the browser plugin from fully initializing // (specifically, it keeps LLPluginClassMedia from negotiating a size change, // which keeps MediaPluginWebkit::initBrowserWindow from doing anything until we have some necessary data, like the background color) sSpareBrowserMediaSource = LLViewerMediaImpl::newSourceFromMediaType(HTTP_CONTENT_TEXT_HTML, NULL, 0, 0); @@ -1533,7 +1533,7 @@ void LLViewerMedia::createSpareBrowserMediaSource() ///////////////////////////////////////////////////////////////////////////////////////// // static -LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource() +LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource() { LLPluginClassMedia* result = sSpareBrowserMediaSource; sSpareBrowserMediaSource = NULL; @@ -1582,7 +1582,7 @@ std::string LLViewerMedia::getParcelAudioURL() // static void LLViewerMedia::initClass() { - gIdleCallbacks.addFunction(LLViewerMedia::updateMedia, NULL); + gIdleCallbacks.addFunction(LLViewerMedia::updateMedia, NULL); sTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> setTeleportFinishedCallback(boost::bind(&LLViewerMedia::onTeleportFinished)); } @@ -1670,7 +1670,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mNavigateSuspendedDeferred(false), mIsUpdated(false), mTrustedBrowser(false), - mZoomFactor(1.0) + mZoomFactor(1.0), + mCleanBrowser(false) { // Set up the mute list observer if it hasn't been set up already. @@ -1794,14 +1795,16 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) ////////////////////////////////////////////////////////////////////////////////////////// /*static*/ -LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target) +LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target, bool clean_browser) { std::string plugin_basename = LLMIMETypes::implType(media_type); LLPluginClassMedia* media_source = NULL; // HACK: we always try to keep a spare running webkit plugin around to improve launch times. // If a spare was already created before PluginAttachDebuggerToPlugins was set, don't use it. - if(plugin_basename == "media_plugin_webkit" && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")) + // Do not use a spare if launching with full viewer control (e.g. Facebook, Twitter and few others) + if ((plugin_basename == "media_plugin_webkit") && + !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins") && !clean_browser) { media_source = LLViewerMedia::getSpareBrowserMediaSource(); if(media_source) @@ -1813,7 +1816,6 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ return media_source; } } - if(plugin_basename.empty()) { LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; @@ -1857,18 +1859,18 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ // collect 'cookies enabled' setting from prefs and send to embedded browser bool cookies_enabled = gSavedSettings.getBOOL( "CookiesEnabled" ); - media_source->enable_cookies( cookies_enabled ); + media_source->enable_cookies( cookies_enabled || clean_browser); // collect 'plugins enabled' setting from prefs and send to embedded browser bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" ); - media_source->setPluginsEnabled( plugins_enabled ); + media_source->setPluginsEnabled( plugins_enabled || clean_browser); // collect 'javascript enabled' setting from prefs and send to embedded browser bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); - media_source->setJavascriptEnabled( javascript_enabled ); + media_source->setJavascriptEnabled( javascript_enabled || clean_browser); bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging"); - media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled ); + media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled || clean_browser); media_source->setTarget(target); @@ -1923,7 +1925,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) // Save the MIME type that really caused the plugin to load mCurrentMimeType = mMimeType; - LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight, mTarget); + LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight, mTarget, mCleanBrowser); if (media_source) { @@ -2544,7 +2546,7 @@ void LLViewerMediaImpl::unload() } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request) +void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request, bool clean_browser) { cancelMimeTypeProbe(); @@ -2557,6 +2559,7 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi // Always set the current URL and MIME type. mMediaURL = url; mMimeType = mime_type; + mCleanBrowser = clean_browser; // Clear the current media URL, since it will no longer be correct. mCurrentMediaURL.clear(); diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index fff5b3fc08..6803adfaa2 100755 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -234,7 +234,7 @@ public: void navigateReload(); void navigateHome(); void unload(); - void navigateTo(const std::string& url, const std::string& mime_type = "", bool rediscover_type = false, bool server_request = false); + void navigateTo(const std::string& url, const std::string& mime_type = "", bool rediscover_type = false, bool server_request = false, bool clean_browser = false); void navigateInternal(); void navigateStop(); bool handleKeyHere(KEY key, MASK mask); @@ -289,7 +289,7 @@ public: void setTarget(const std::string& target) { mTarget = target; } // utility function to create a ready-to-use media instance from a desired media type. - static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target = LLStringUtil::null); + static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target = LLStringUtil::null, bool clean_browser = false); // Internally set our desired browser user agent string, including // the Second Life version and skin name. Used because we can @@ -464,6 +464,7 @@ private: bool mTrustedBrowser; std::string mTarget; LLNotificationPtr mNotification; + bool mCleanBrowser; // force the creation of a clean browsing target with full options enabled private: BOOL mIsUpdated ; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 04697f3472..80f47ecab2 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -215,7 +215,8 @@ std::string build_extensions_string(LLFilePicker::ELoadFilter filter) #endif case LLFilePicker::FFLOAD_XML: return XML_EXTENSIONS; - case LLFilePicker::FFLOAD_ALL: + case LLFilePicker::FFLOAD_ALL: + case LLFilePicker::FFLOAD_EXE: return ALL_FILE_EXTENSIONS; #endif default: @@ -442,9 +443,9 @@ class LLFileUploadBulk : public view_listener_t 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - LLFloaterPerms::getNextOwnerPerms(), - LLFloaterPerms::getGroupPerms(), - LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, @@ -1006,9 +1007,9 @@ void upload_done_callback( 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - PERM_NONE, - PERM_NONE, - PERM_NONE, + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 0d1ffd2b51..be24c04dfc 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -651,25 +651,57 @@ void send_sound_trigger(const LLUUID& sound_id, F32 gain) gAgent.sendMessage(); } +static LLSD sSavedGroupInvite; +static LLSD sSavedResponse; + bool join_group_response(const LLSD& notification, const LLSD& response) { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +// A bit of variable saving and restoring is used to deal with the case where your group list is full and you +// receive an invitation to another group. The data from that invitation is stored in the sSaved +// variables. If you then drop a group and click on the Join button the stored data is restored and used +// to join the group. + LLSD notification_adjusted = notification; + LLSD response_adjusted = response; + + std::string action = notification["name"]; + +// Storing all the information by group id allows for the rare case of being at your maximum +// group count and receiving more than one invitation. + std::string id = notification_adjusted["payload"]["group_id"].asString(); + + if ("JoinGroup" == action || "JoinGroupCanAfford" == action) + { + sSavedGroupInvite[id] = notification; + sSavedResponse[id] = response; + } + else if ("JoinedTooManyGroupsMember" == action) + { + S32 opt = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == opt) // Join button pressed + { + notification_adjusted = sSavedGroupInvite[id]; + response_adjusted = sSavedResponse[id]; + } + } + + S32 option = LLNotificationsUtil::getSelectedOption(notification_adjusted, response_adjusted); bool accept_invite = false; - LLUUID group_id = notification["payload"]["group_id"].asUUID(); - LLUUID transaction_id = notification["payload"]["transaction_id"].asUUID(); - std::string name = notification["payload"]["name"].asString(); - std::string message = notification["payload"]["message"].asString(); - S32 fee = notification["payload"]["fee"].asInteger(); + LLUUID group_id = notification_adjusted["payload"]["group_id"].asUUID(); + LLUUID transaction_id = notification_adjusted["payload"]["transaction_id"].asUUID(); + std::string name = notification_adjusted["payload"]["name"].asString(); + std::string message = notification_adjusted["payload"]["message"].asString(); + S32 fee = notification_adjusted["payload"]["fee"].asInteger(); if (option == 2 && !group_id.isNull()) { LLGroupActions::show(group_id); LLSD args; args["MESSAGE"] = message; - LLNotificationsUtil::add("JoinGroup", args, notification["payload"]); + LLNotificationsUtil::add("JoinGroup", args, notification_adjusted["payload"]); return false; } + if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. @@ -684,7 +716,8 @@ bool join_group_response(const LLSD& notification, const LLSD& response) { LLSD args; args["NAME"] = name; - LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification["payload"]); + LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification_adjusted["payload"]); + return false; } } @@ -698,7 +731,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) args["COST"] = llformat("%d", fee); // Set the fee for next time to 0, so that we don't keep // asking about a fee. - LLSD next_payload = notification["payload"]; + LLSD next_payload = notification_adjusted["payload"]; next_payload["fee"] = 0; LLNotificationsUtil::add("JoinGroupCanAfford", args, @@ -724,6 +757,9 @@ bool join_group_response(const LLSD& notification, const LLSD& response) transaction_id); } + sSavedGroupInvite[id] = LLSD::emptyMap(); + sSavedResponse[id] = LLSD::emptyMap(); + return false; } @@ -1891,6 +1927,7 @@ void inventory_offer_handler(LLOfferInfo* info) return; } + bool bAutoAccept(false); // Avoid the Accept/Discard dialog if the user so desires. JC if (gSavedSettings.getBOOL("AutoAcceptNewInventory") && (info->mType == LLAssetType::AT_NOTECARD @@ -1899,8 +1936,7 @@ void inventory_offer_handler(LLOfferInfo* info) { // For certain types, just accept the items into the inventory, // and possibly open them on receipt depending upon "ShowNewInventory". - info->forceResponse(IOR_ACCEPT); - return; + bAutoAccept = true; } // Strip any SLURL from the message display. (DEV-2754) @@ -1968,7 +2004,7 @@ void inventory_offer_handler(LLOfferInfo* info) LLNotification::Params p; // Object -> Agent Inventory Offer - if (info->mFromObject) + if (info->mFromObject && !bAutoAccept) { // Inventory Slurls don't currently work for non agent transfers, so only display the object name. args["ITEM_SLURL"] = msg; @@ -2014,11 +2050,12 @@ void inventory_offer_handler(LLOfferInfo* info) send_do_not_disturb_message(gMessageSystem, info->mFromID); } - // Inform user that there is a script floater via toast system + if( !bAutoAccept ) // if we auto accept, do not pester the user { + // Inform user that there is a script floater via toast system payload["give_inventory_notification"] = TRUE; - p.payload = payload; - LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false); + p.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false); } } @@ -5892,7 +5929,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) } } - send_sound_trigger(LLUUID(gSavedSettings.getString("UISndRestart")), 1.0f); + make_ui_sound("UISndRestart"); } LLNotificationsUtil::add(notificationID, llsdBlock); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 7c60be7046..80592f01ce 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -100,6 +100,7 @@ #include "lltrans.h" #include "llsdutil.h" #include "llmediaentry.h" +#include "llfloaterperms.h" #include "llvocache.h" //#define DEBUG_UPDATE_TYPE @@ -2726,6 +2727,7 @@ void LLViewerObject::saveScript( * interaction with doUpdateInventory() called below. */ LL_DEBUGS() << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << LL_ENDL; + LLPointer<LLViewerInventoryItem> task_item = new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(), item->getAssetUUID(), item->getType(), diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 7f5d2ac125..7c36b30dd1 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -68,7 +68,7 @@ #include "u64.h" #include "llviewertexturelist.h" #include "lldatapacker.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include <zlib.h> #else #include "zlib/zlib.h" @@ -76,6 +76,7 @@ #include "object_flags.h" #include "llappviewer.h" +#include "llfloaterperms.h" #include "llvocache.h" extern F32 gMinObjectDistance; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index fd5df9b774..40d17ead76 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -72,6 +72,7 @@ #include "stringize.h" #include "llviewercontrol.h" #include "llsdserialize.h" +#include "llfloaterperms.h" #include "llvieweroctree.h" #include "llviewerdisplay.h" #include "llviewerwindow.h" @@ -2645,6 +2646,7 @@ void LLViewerRegion::unpackRegionHandshake() void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) { + capabilityNames.append("AgentPreferences"); capabilityNames.append("AgentState"); capabilityNames.append("AttachmentResources"); capabilityNames.append("AvatarPickerSearch"); @@ -2658,7 +2660,8 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); capabilityNames.append("FacebookConnect"); - //capabilityNames.append("FacebookRedirect"); + capabilityNames.append("FlickrConnect"); + capabilityNames.append("TwitterConnect"); if (gSavedSettings.getBOOL("UseHTTPInventory")) { @@ -2680,6 +2683,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); capabilityNames.append("LandResources"); + capabilityNames.append("LSLSyntax"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); capabilityNames.append("MeshUploadFlag"); @@ -2948,6 +2952,8 @@ void LLViewerRegion::setCapabilitiesReceived(bool received) { mCapabilitiesReceivedSignal(getRegionID()); + LLFloaterPermsDefault::sendInitialPerms(); + // This is a single-shot signal. Forget callbacks to save resources. mCapabilitiesReceivedSignal.disconnect_all_slots(); } diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 9937a1c42a..54b4119331 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -35,7 +35,7 @@ #include "llbufferstream.h" #include "llfile.h" #include "llmenugl.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include "expat.h" #else # include "expat/expat.h" diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index c325d72ba6..5e876fa2ef 100755 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -38,7 +38,7 @@ class LLVivoxProtocolParser; #include "llviewerregion.h" #include "llcallingcard.h" // for LLFriendObserver -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include "expat.h" #else # include "expat/expat.h" diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 21ccec5c0a..7d7b32f305 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1355,49 +1355,10 @@ void LLPipeline::createLUTBuffers() { if (!mLightFunc) { - /*U32 lightResX = gSavedSettings.getU32("RenderSpecularResX"); - U32 lightResY = gSavedSettings.getU32("RenderSpecularResY"); - U8* ls = new U8[lightResX*lightResY]; - F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); - // Calculate the (normalized) Blinn-Phong specular lookup texture. - for (U32 y = 0; y < lightResY; ++y) - { - for (U32 x = 0; x < lightResX; ++x) - { - ls[y*lightResX+x] = 0; - F32 sa = (F32) x/(lightResX-1); - F32 spec = (F32) y/(lightResY-1); - F32 n = spec * spec * specExp; - - // Nothing special here. Just your typical blinn-phong term. - spec = powf(sa, n); - - // Apply our normalization function. - // Note: This is the full equation that applies the full normalization curve, not an approximation. - // This is fine, given we only need to create our LUT once per buffer initialization. - // The only trade off is we have a really low dynamic range. - // This means we have to account for things not being able to exceed 0 to 1 in our shaders. - spec *= (((n + 2) * (n + 4)) / (8 * F_PI * (powf(2, -n/2) + n))); - - // Always sample at a 1.0/2.2 curve. - // This "Gamma corrects" our specular term, boosting our lower exponent reflections. - spec = powf(spec, 1.f/2.2f); - - // Easy fix for our dynamic range problem: divide by 6 here, multiply by 6 in our shaders. - // This allows for our specular term to exceed a value of 1 in our shaders. - // This is something that can be important for energy conserving specular models where higher exponents can result in highlights that exceed a range of 0 to 1. - // Technically, we could just use an R16F texture, but driver support for R16F textures can be somewhat spotty at times. - // This works remarkably well for higher specular exponents, though banding can sometimes be seen on lower exponents. - // Combined with a bit of noise and trilinear filtering, the banding is hardly noticable. - ls[y*lightResX+x] = (U8)(llclamp(spec * (1.f / 6), 0.f, 1.f) * 255); - } - }*/ - - U32 lightResX = gSavedSettings.getU32("RenderSpecularResX"); U32 lightResY = gSavedSettings.getU32("RenderSpecularResY"); F32* ls = new F32[lightResX*lightResY]; - //F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); // Note: only use this when creating new specular lighting functions. + F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); // Calculate the (normalized) blinn-phong specular lookup texture. (with a few tweaks) for (U32 y = 0; y < lightResY; ++y) { @@ -1406,7 +1367,7 @@ void LLPipeline::createLUTBuffers() ls[y*lightResX+x] = 0; F32 sa = (F32) x/(lightResX-1); F32 spec = (F32) y/(lightResY-1); - F32 n = spec * spec * 368; + F32 n = spec * spec * specExp; // Nothing special here. Just your typical blinn-phong term. spec = powf(sa, n); @@ -1419,23 +1380,6 @@ void LLPipeline::createLUTBuffers() // Since we use R16F, we no longer have a dynamic range issue we need to work around here. // Though some older drivers may not like this, newer drivers shouldn't have this problem. ls[y*lightResX+x] = spec; - - - //beckmann distribution - /*F32 alpha = acosf((F32) x/(lightResX-1)); - F32 m = 1.f - (F32) y/(lightResY-1); - - F32 cos4_alpha = cosf(alpha); - cos4_alpha *= cos4_alpha; - cos4_alpha *= cos4_alpha; - - F32 tan_alpha = tanf(alpha); - F32 tan2_alpha = tan_alpha*tan_alpha; - - F32 k = expf(-(tan2_alpha)/(m*m)) / - (3.14159f*m*m*cos4_alpha); - - ls[y*lightResX+x] = k;*/ } } @@ -1448,7 +1392,6 @@ void LLPipeline::createLUTBuffers() LLImageGL::generateTextures(1, &mLightFunc); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc); LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false); - //LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 3ebb64e3fa..bdc884885f 100755 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -56,7 +56,7 @@ <color name="Black" value="0 0 0 1" /> - <colork + <color name="Black_10" value="0 0 0 0.1" /> <color @@ -904,5 +904,45 @@ <color name="ResizebarBody" value="0.208 0.208 0.208 1"/> - + + <!-- syntax highlighting (LSL Scripts) --> + <color + name="ScriptText" + reference="Black" /> + <color + name="ScriptBackground" + reference="White" /> + <color + name="ScriptCursorColor" + reference="Black" /> + <color + name="SyntaxLslComment" + value="0 0.5 0 1" /> + <color + name="SyntaxLslConstant" + value="0 0.6 0.6 1" /> + <color + name="SyntaxLslControlFlow" + value="0.4 0 0.8 1" /> + <color + name="SyntaxLslControlLabel" + value="0 0 0.8 1" /> + <color + name="SyntaxLslDataType" + value="0.8 0.4 0 1" /> + <color + name="SyntaxLslDeprecated" + value="0.9 0.0 0.66, 1" /> + <color + name="SyntaxLslEvent" + value="0 0.3 0.5 1" /> + <color + name="SyntaxLslFunction" + value="0.3 0 0.5 1" /> + <color + name="SyntaxLslGodMode" + value="0.7 .2 .35 1" /> + <color + name="SyntaxLslStringLiteral" + value="1 0.14 0 1" /> </colors> diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 0eb9bbecb7..cc2680627e 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -133,6 +133,8 @@ with the same filename but different name <texture name="Command_Chat_Icon" file_name="toolbar_icons/chat.png" preload="true" /> <texture name="Command_Compass_Icon" file_name="toolbar_icons/land.png" preload="true" /> <texture name="Command_Destinations_Icon" file_name="toolbar_icons/destinations.png" preload="true" /> + <texture name="Command_Facebook_Icon" file_name="toolbar_icons/facebook.png" preload="true" /> + <texture name="Command_Flickr_Icon" file_name="toolbar_icons/flickr.png" preload="true" /> <texture name="Command_Gestures_Icon" file_name="toolbar_icons/gestures.png" preload="true" /> <texture name="Command_HowTo_Icon" file_name="toolbar_icons/howto.png" preload="true" /> <texture name="Command_Inventory_Icon" file_name="toolbar_icons/inventory.png" preload="true" /> @@ -148,9 +150,9 @@ with the same filename but different name <texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" /> <texture name="Command_Profile_Icon" file_name="toolbar_icons/profile.png" preload="true" /> <texture name="Command_Search_Icon" file_name="toolbar_icons/search.png" preload="true" /> - <texture name="Command_Social_Icon" file_name="toolbar_icons/facebook.png" preload="true" /> <texture name="Command_Snapshot_Icon" file_name="toolbar_icons/snapshot.png" preload="true" /> <texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" /> + <texture name="Command_Twitter_Icon" file_name="toolbar_icons/twitter.png" preload="true" /> <texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" /> <texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" /> <texture name="Caret_Bottom_Icon" file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" /> diff --git a/indra/newview/skins/default/textures/toolbar_icons/flickr.png b/indra/newview/skins/default/textures/toolbar_icons/flickr.png Binary files differnew file mode 100644 index 0000000000..7fce9f0df2 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/flickr.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/twitter.png b/indra/newview/skins/default/textures/toolbar_icons/twitter.png Binary files differnew file mode 100644 index 0000000000..a99c490887 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/twitter.png diff --git a/indra/newview/skins/default/xui/en/floater_big_preview.xml b/indra/newview/skins/default/xui/en/floater_big_preview.xml new file mode 100644 index 0000000000..c0bdd3d9bd --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_big_preview.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<floater + positioning="cascading" + can_close="true" + can_resize="true" + can_minimize="false" + help_topic="floater_big_preview" + layout="topleft" + name="floater_big_preview" + save_rect="true" + single_instance="true" + reuse_instance="true" + title="PREVIEW" + height="465" + width="770"> + <panel + height="450" + width="750" + visible="true" + name="big_preview_placeholder" + top="5" + follows="all" + left="10"> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml index 5fdd4aa49d..49be4290c7 100755 --- a/indra/newview/skins/default/xui/en/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml @@ -47,7 +47,7 @@ width="16" /> <scroll_list.columns name="text" - width="234" /> + relative_width="1" /> </scroll_list> <text type="string" @@ -77,7 +77,7 @@ width="16" /> <scroll_list.columns name="text" - width="234" /> + relative_width="1" /> </scroll_list> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_facebook.xml b/indra/newview/skins/default/xui/en/floater_facebook.xml new file mode 100644 index 0000000000..4535b9084e --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_facebook.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<floater + positioning="cascading" + can_close="true" + can_resize="true" + help_topic="floater_facebook" + layout="topleft" + name="floater_facebook" + save_rect="true" + single_instance="true" + reuse_instance="true" + title="POST TO FACEBOOK" + min_height="501" + min_width="304" + height="482" + width="304"> + <panel + height="482" + width="304" + visible="true" + name="background" + follows="all" + top="0" + left="0"> + <tab_container + name="tabs" + tab_group="1" + tab_min_width="70" + tab_height="30" + tab_position="top" + top="7" + height="437" + follows="all" + halign="center" + use_highlighting_on_hover="true"> + <panel + filename="panel_facebook_status.xml" + class="llfacebookstatuspanel" + follows="all" + label="STATUS" + name="panel_facebook_status"/> + <panel + filename="panel_facebook_photo.xml" + class="llfacebookphotopanel" + follows="all" + label="PHOTO" + name="panel_facebook_photo"/> + <panel + filename="panel_facebook_place.xml" + class="llfacebookcheckinpanel" + follows="all" + label="CHECK IN" + name="panel_facebook_place"/> + <panel + filename="panel_facebook_friends.xml" + class="llfacebookfriendspanel" + follows="all" + label="FRIENDS" + name="panel_facebook_friends"/> + <panel + filename="panel_facebook_account.xml" + class="llfacebookaccountpanel" + follows="all" + label="ACCOUNT" + name="panel_facebook_account"/> + </tab_container> + <panel + name="connection_status_panel" + follows="left|bottom|right" + height="24"> + <text + name="connection_error_text" + type="string" + follows="left|bottom|right" + top="5" + left="9" + width="250" + height="20" + wrap="true" + halign="left" + valign="center" + text_color="DrYellow" + font="SansSerif"> + Error + </text> + <loading_indicator + follows="left|bottom" + height="24" + width="24" + name="connection_loading_indicator" + top="2" + left="9" + visible="true"/> + <text + name="connection_loading_text" + type="string" + follows="left|bottom|right" + top="5" + left_pad="5" + width="250" + height="20" + wrap="true" + halign="left" + valign="center" + text_color="EmphasisColor" + font="SansSerif"> + Loading... + </text> + </panel> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_social.xml b/indra/newview/skins/default/xui/en/floater_flickr.xml index b7ff374d5f..1a9ffd0489 100644 --- a/indra/newview/skins/default/xui/en/floater_social.xml +++ b/indra/newview/skins/default/xui/en/floater_flickr.xml @@ -3,17 +3,17 @@ positioning="cascading" can_close="true" can_resize="false" - help_topic="floater_social" + help_topic="floater_flickr" layout="topleft" - name="floater_social" + name="floater_flickr" save_rect="true" single_instance="true" reuse_instance="true" - title="POST TO FACEBOOK" - height="482" + title="UPLOAD TO FLICKR" + height="622" width="304"> <panel - height="482" + height="622" width="304" visible="true" name="background" @@ -27,32 +27,21 @@ tab_height="30" tab_position="top" top="7" - height="437" - halign="center"> + height="577" + halign="center" + use_highlighting_on_hover="true"> <panel - filename="panel_social_status.xml" - class="llsocialstatuspanel" - follows="all" - label="STATUS" - name="panel_social_status"/> - <panel - filename="panel_social_photo.xml" - class="llsocialphotopanel" + filename="panel_flickr_photo.xml" + class="llflickrphotopanel" follows="all" label="PHOTO" - name="panel_social_photo"/> - <panel - filename="panel_social_place.xml" - class="llsocialcheckinpanel" - follows="all" - label="CHECK IN" - name="panel_social_place"/> + name="panel_flickr_photo"/> <panel - filename="panel_social_account.xml" - class="llsocialaccountpanel" + filename="panel_flickr_account.xml" + class="llflickraccountpanel" follows="all" label="ACCOUNT" - name="panel_social_account"/> + name="panel_flickr_account"/> </tab_container> <panel name="connection_status_panel" diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml deleted file mode 100755 index ff454e3ebf..0000000000 --- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<floater - legacy_header_height="18" - height="180" - layout="topleft" - name="perm prefs" - help_topic="perm_prefs" - save_rect="true" - title="DEFAULT UPLOAD PERMISSIONS" - width="315"> - <panel - follows="left|top|right|bottom" - height="120" - label="Permissions" - layout="topleft" - left="10" - name="permissions" - top="20" - width="315"> - <check_box - control_name="ShareWithGroup" - height="16" - label="Share with group" - layout="topleft" - left="10" - name="share_with_group" - top="5" - width="150" /> - <check_box - control_name="EveryoneCopy" - height="16" - label="Allow anyone to copy" - layout="topleft" - left_delta="0" - name="everyone_copy" - top_pad="5" - width="150" /> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="0" - name="NextOwnerLabel" - top_pad="5" - width="200"> - Next owner can: - </text> - <check_box - control_name="NextOwnerModify" - height="16" - label="Modify" - layout="topleft" - left_delta="0" - name="next_owner_modify" - top_pad="5" - width="150" /> - <check_box - control_name="NextOwnerCopy" - height="16" - label="Copy" - layout="topleft" - left_delta="0" - name="next_owner_copy" - top_pad="5" - width="150" > - <check_box.commit_callback - function="Perms.Copy" /> - </check_box> - <check_box - enabled_control="NextOwnerCopy" - control_name="NextOwnerTransfer" - enabled="false" - height="16" - initial_value="true" - label="Resell/Give away" - layout="topleft" - left_delta="0" - name="next_owner_transfer" - top_pad="5" - width="150" /> - </panel> - <button - height="20" - label="OK" - label_selected="OK" - layout="topleft" - left="90" - name="ok" - top="150" - width="100"> - <button.commit_callback - function="Perms.OK" /> - </button> - <button - height="20" - label="Cancel" - label_selected="Cancel" - layout="topleft" - left_pad="5" - name="cancel" - top_delta="0" - width="100"> - <button.commit_callback - function="Perms.Cancel" /> - </button> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml new file mode 100644 index 0000000000..ceb260fffb --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -0,0 +1,503 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + height="250" + layout="topleft" + name="perms default" + help_topic="perms_default" + save_rect="true" + title="DEFAULT CREATION PERMISSIONS" + width="700"> + <panel + follows="left|top|right|bottom" + height="200" + label="Default Permissions" + layout="topleft" + left="10" + name="default permissions" + top="20" + width="690"> + <view_border + bevel_style="none" + height="18" + top="8" + left="0" + width="430" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + halign="right" + layout="topleft" + left="0" + top="10" + width="115"> + Next owner: + </text> + <text + type="string" + length="1" + follows="left|top" + height="16" + halign="center" + layout="topleft" + left_pad="5" + top="10" + width="100"> + Copy + </text> + <text + type="string" + length="1" + follows="left|top" + height="16" + halign="center" + layout="topleft" + left_pad="5" + top="10" + width="100"> + Modify + </text> + <text + type="string" + length="1" + follows="left|top" + height="16" + halign="center" + layout="topleft" + left_pad="5" + top="10" + width="100"> + Transfer + </text> + <text + type="string" + length="1" + follows="left|top" + height="32" + halign="center" + layout="topleft" + left_pad="5" + top="10" + word_wrap="true" + width="100"> + Share with group + </text> + <text + type="string" + length="1" + follows="left|top" + height="32" + halign="center" + layout="topleft" + left_pad="5" + top="10" + word_wrap="true" + width="120"> + Allow anyone to copy + </text> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="0" + top_pad="10" + tool_tip="Set default permissions for when Objects are created" + width="100"> + Objects + </text> + <icon + follows="left|top" + height="16" + image_name="Inv_Object" + layout="topleft" + left_pad="2" + width="18"/> + <check_box + control_name="ObjectsNextOwnerCopy" + height="16" + layout="topleft" + name="objects_c" + left_pad="45" + top_delta="0" + width="100"> + <check_box.commit_callback + function="PermsDefault.Copy" + parameter="Objects" /> + </check_box> + <check_box + control_name="ObjectsNextOwnerModify" + height="16" + layout="topleft" + name="objects_m" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + enabled_control="ObjectsNextOwnerCopy" + control_name="ObjectsNextOwnerTransfer" + height="16" + layout="topleft" + name="objects_t" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + control_name="ObjectsShareWithGroup" + height="16" + layout="topleft" + name="objects_s" + left_pad="0" + top_delta="0" + width="120" /> + <check_box + control_name="ObjectsEveryoneCopy" + height="16" + layout="topleft" + name="objects_e" + left_pad="0" + top_delta="0" + width="100" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="0" + tool_tip="Set default permissions for uploaded items" + width="100"> + Uploads + </text> + <icon + follows="left|top" + height="16" + image_name="Inv_Texture" + layout="topleft" + left_pad="2" + width="18"/> + <check_box + control_name="UploadsNextOwnerCopy" + height="16" + layout="topleft" + name="uploads_c" + left_pad="45" + top_delta="0" + width="100"> + <check_box.commit_callback + function="PermsDefault.Copy" + parameter="Uploads" /> + </check_box> + <check_box + control_name="UploadsNextOwnerModify" + height="16" + layout="topleft" + name="uploads_m" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + enabled_control="UploadsNextOwnerCopy" + control_name="UploadsNextOwnerTransfer" + height="16" + layout="topleft" + name="uploads_t" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + control_name="UploadsShareWithGroup" + height="16" + layout="topleft" + name="uploads_s" + left_pad="0" + top_delta="0" + width="120" /> + <check_box + control_name="UploadsEveryoneCopy" + height="16" + layout="topleft" + name="uploads_e" + left_pad="0" + top_delta="0" + width="100" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="0" + tool_tip="Set default permissions for when Scripts are created" + width="100"> + Scripts + </text> + <icon + follows="left|top" + height="16" + image_name="Inv_Script" + layout="topleft" + left_pad="2" + width="18"/> + <check_box + control_name="ScriptsNextOwnerCopy" + height="16" + layout="topleft" + name="scripts_c" + left_pad="45" + top_delta="0" + width="100"> + <check_box.commit_callback + function="PermsDefault.Copy" + parameter="Scripts" /> + </check_box> + <check_box + control_name="ScriptsNextOwnerModify" + height="16" + layout="topleft" + name="scripts_m" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + enabled_control="ScriptsNextOwnerCopy" + control_name="ScriptsNextOwnerTransfer" + height="16" + layout="topleft" + name="scripts_t" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + control_name="ScriptsShareWithGroup" + height="16" + layout="topleft" + name="scripts_s" + left_pad="0" + top_delta="0" + width="120" /> + <check_box + control_name="ScriptsEveryoneCopy" + height="16" + layout="topleft" + name="scripts_e" + left_pad="0" + top_delta="0" + width="100" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="0" + tool_tip="Set default permissions for when Notecards are created" + width="100"> + Notecards + </text> + <icon + follows="left|top" + height="16" + image_name="Inv_Notecard" + layout="topleft" + left_pad="2" + width="18"/> + <check_box + control_name="NotecardsNextOwnerCopy" + height="16" + layout="topleft" + name="notecards_c" + left_pad="45" + top_delta="0" + width="100"> + <check_box.commit_callback + function="PermsDefault.Copy" + parameter="Notecards" /> + </check_box> + <check_box + control_name="NotecardsNextOwnerModify" + height="16" + layout="topleft" + name="notecards_m" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + enabled_control="NotecardsNextOwnerCopy" + control_name="NotecardsNextOwnerTransfer" + height="16" + layout="topleft" + name="notecards_t" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + control_name="NotecardsShareWithGroup" + height="16" + layout="topleft" + name="notecards_s" + left_pad="0" + top_delta="0" + width="120" /> + <check_box + control_name="NotecardsEveryoneCopy" + height="16" + layout="topleft" + name="notecards_e" + left_pad="0" + top_delta="0" + width="100" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="0" + tool_tip="Set default permissions for when Gestures are created" + width="100"> + Gestures + </text> + <icon + follows="left|top" + height="16" + image_name="Inv_Gesture" + layout="topleft" + left_pad="2" + width="18"/> + <check_box + control_name="GesturesNextOwnerCopy" + height="16" + layout="topleft" + name="gestures_c" + left_pad="45" + top_delta="0" + width="100"> + <check_box.commit_callback + function="PermsDefault.Copy" + parameter="Gestures" /> + </check_box> + <check_box + control_name="GesturesNextOwnerModify" + height="16" + layout="topleft" + name="gestures_m" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + enabled_control="GesturesNextOwnerCopy" + control_name="GesturesNextOwnerTransfer" + height="16" + layout="topleft" + name="gestures_t" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + control_name="GesturesShareWithGroup" + height="16" + layout="topleft" + name="gestures_s" + left_pad="0" + top_delta="0" + width="120" /> + <check_box + control_name="GesturesEveryoneCopy" + height="16" + layout="topleft" + name="gestures_a" + left_pad="0" + top_delta="0" + width="100" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="0" + tool_tip="Set default permissions for when Clothing or Body Parts are created" + width="100"> + Wearables + </text> + <icon + follows="left|top" + height="16" + image_name="Inv_BodyShape" + layout="topleft" + left_pad="2" + width="18"/> + <check_box + control_name="WearablesNextOwnerCopy" + height="16" + layout="topleft" + name="wearables_c" + left_pad="45" + top_delta="0" + width="100"> + <check_box.commit_callback + function="PermsDefault.Copy" + parameter="Wearables" /> + </check_box> + <check_box + control_name="WearablesNextOwnerModify" + height="16" + layout="topleft" + name="wearables_m" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + enabled_control="WearablesNextOwnerCopy" + control_name="WearablesNextOwnerTransfer" + height="16" + layout="topleft" + name="wearables_t" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + control_name="WearablesShareWithGroup" + height="16" + layout="topleft" + name="wearables_s" + left_pad="0" + top_delta="0" + width="120" /> + <check_box + control_name="WearablesEveryoneCopy" + height="16" + layout="topleft" + name="wearables_e" + left_pad="0" + top_delta="0" + width="100" /> + </panel> + <button + height="20" + label="OK" + label_selected="OK" + layout="topleft" + name="ok" + left="475" + width="100"> + <button.commit_callback + function="PermsDefault.OK" /> + </button> + <button + height="20" + label="Cancel" + label_selected="Cancel" + layout="topleft" + left_pad="5" + name="cancel" + top_delta="0" + width="100"> + <button.commit_callback + function="PermsDefault.Cancel" /> + </button> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_region_debug_console.xml b/indra/newview/skins/default/xui/en/floater_region_debug_console.xml index 99b812a880..11172d8a3e 100755 --- a/indra/newview/skins/default/xui/en/floater_region_debug_console.xml +++ b/indra/newview/skins/default/xui/en/floater_region_debug_console.xml @@ -21,7 +21,6 @@ layout="topleft" max_length="65536" name="region_debug_console_output" - show_line_numbers="false" word_wrap="true" track_end="true" read_only="true"> diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml new file mode 100644 index 0000000000..8e4bcb3eb0 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -0,0 +1,359 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + can_resize="false" + height="354" + layout="topleft" + name="floater_script_colors" + help_topic="script_colors" + save_rect="true" + title="SCRIPT COLORS" + width="320"> + <text + follows="left|top" + height="15" + layout="topleft" + left="12" + name="color_pickers_label" + top="30" + width="200"> + Choose desired colors: + </text> + + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="15" + name="text" + top="45" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="ScriptText" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="ScriptText" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="text_label" + top_delta="5" + width="100"> + Text + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="15" + name="cursor" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="ScriptCursorColor" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="ScriptCursorColor" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="cursor_label" + top_delta="5" + width="100"> + Cursor + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="15" + name="background" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="ScriptBackground" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="ScriptBackground" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="background_label" + top_delta="5" + width="100"> + Background + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="15" + name="datatype" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="SyntaxLslDataType" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="SyntaxLslDataType" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="datatype_label" + top_delta="5" + width="100"> + Data Types + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="15" + name="event" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="SyntaxLslEvent" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="SyntaxLslEvent" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="event_label" + top_delta="5" + width="100"> + Events + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="190" + name="string_literal" + top="45" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="SyntaxLslStringLiteral" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="SyntaxLslStringLiteral" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="string_literal_label" + top_delta="5" + width="100"> + String Literals + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="190" + name="constant" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="SyntaxLslConstant" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="SyntaxLslConstant" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="constant_label" + top_delta="5" + width="100"> + Constant + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="190" + name="flow_control" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="SyntaxLslControlFlow" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="SyntaxLslControlFlow" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="flow_control_label" + top_delta="5" + width="100"> + Flow Control + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="190" + name="function" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="SyntaxLslFunction" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="SyntaxLslFunction" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="function_label" + top_delta="5" + width="100"> + Function + </text> + <color_swatch + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="190" + name="comment" + top_pad="10" + width="44" > + <color_swatch.init_callback + function="ScriptPref.getUIColor" + parameter="SyntaxLslComment" /> + <color_swatch.commit_callback + function="ScriptPref.applyUIColor" + parameter="SyntaxLslComment" /> + </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_pad="5" + mouse_opaque="false" + name="comment_label" + top_delta="5" + width="100"> + Comment + </text> + + <script_editor + left="8" + right="-8" + top="176" + bottom="-8" + type="string" + length="1" + follows="left|top|right|bottom" + font="Monospace" + height="100" + ignore_tab="false" + layout="topleft" + max_length="300" + name="Script Preview" + text_color="ScriptText" + default_color="ScriptText" + bg_writeable_color="ScriptBackground" + bg_focus_color="ScriptBackground" + text_readonly_color="ScriptText" + bg_readonly_color="ScriptBackground" + bg_selected_color="ScriptSelectedColor" + cursor_color="ScriptCursorColor" + enable_tooltip_paste="true" + word_wrap="true"> +/* A sample script */ +default +{ + state_entry() + { + // Comment + string greeting = "Hello"; + llSay(PUBLIC_CHANNEL, greeting); + } +} + </script_editor> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 853c209bca..771035b40d 100755 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -10,7 +10,7 @@ help_topic="snapshot" save_rect="true" save_visibility="false" - title="SNAPSHOT PREVIEW" + title="SNAPSHOT" width="470"> <floater.string name="unknown"> @@ -381,5 +381,31 @@ top_pad="8" width="180" name="auto_snapshot_check" /> + <text + type="string" + length="1" + follows="left|top" + height="13" + layout="topleft" + left="10" + name="filter_list_label" + top_pad="10" + width="50"> + Filter: + </text> + <combo_box + control_name="PhotoFilters" + follows="left|right|top" + name="filters_combobox" + tool_tip="Image filters" + top_pad="8" + left="30" + height="21" + width="135"> + <combo_box.item + label="No Filter" + name="NoFilter" + value="NoFilter" /> + </combo_box> </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_twitter.xml b/indra/newview/skins/default/xui/en/floater_twitter.xml new file mode 100644 index 0000000000..aa5bfce2e9 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_twitter.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<floater + positioning="cascading" + can_close="true" + can_resize="false" + help_topic="floater_twitter" + layout="topleft" + name="floater_twitter" + save_rect="true" + single_instance="true" + reuse_instance="true" + title="TWITTER" + height="502" + width="304"> + <panel + height="502" + width="304" + visible="true" + name="background" + follows="all" + top="0" + left="0"> + <tab_container + name="tabs" + tab_group="1" + tab_min_width="70" + tab_height="30" + tab_position="top" + top="7" + height="457" + halign="center" + use_highlighting_on_hover="true"> + <panel + filename="panel_twitter_photo.xml" + class="lltwitterphotopanel" + follows="all" + label="COMPOSE" + name="panel_twitter_photo"/> + <panel + filename="panel_twitter_account.xml" + class="lltwitteraccountpanel" + follows="all" + label="ACCOUNT" + name="panel_twitter_account"/> + </tab_container> + <panel + name="connection_status_panel" + follows="left|bottom|right" + height="24"> + <text + name="connection_error_text" + type="string" + follows="left|bottom|right" + top="5" + left="9" + width="250" + height="20" + wrap="true" + halign="left" + valign="center" + text_color="DrYellow" + font="SansSerif"> + Error + </text> + <loading_indicator + follows="left|bottom|right" + height="24" + width="24" + name="connection_loading_indicator" + top="2" + left="9" + visible="true"/> + <text + name="connection_loading_text" + type="string" + follows="left|bottom|right" + top="5" + left_pad="5" + width="250" + height="20" + wrap="true" + halign="left" + valign="center" + text_color="EmphasisColor" + font="SansSerif"> + Loading... + </text> + </panel> + </panel> +</floater> diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index 29720a680b..afeb1bf226 100755 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -63,13 +63,6 @@ function="File.UploadBulk" parameter="" /> </menu_item_call> - <menu_item_call - label="Set Default Upload Permissions" - name="perm prefs"> - <menu_item_call.on_click - function="Floater.Toggle" - parameter="perm_prefs" /> - </menu_item_call> </menu> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ec20c25f14..c8fcda9858 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -16,14 +16,6 @@ parameter="agent" /> </menu_item_call> <menu_item_call - label="Post to Facebook..." - name="PostToFacebook"> - <menu_item_call.on_click - function="Floater.Toggle" - parameter="social"/> - </menu_item_call> - <menu_item_separator/> - <menu_item_call label="Appearance..." name="ChangeOutfit"> <menu_item_call.on_click @@ -288,6 +280,28 @@ parameter="conversation" /> </menu_item_check> <menu_item_separator/> + <menu_item_call + label="Facebook..." + name="Facebook"> + <menu_item_call.on_click + function="Floater.Toggle" + parameter="facebook"/> + </menu_item_call> + <menu_item_call + label="Twitter..." + name="Twitter"> + <menu_item_call.on_click + function="Floater.Toggle" + parameter="twitter"/> + </menu_item_call> + <menu_item_call + label="Flickr..." + name="Flickr"> + <menu_item_call.on_click + function="Floater.Toggle" + parameter="flickr"/> + </menu_item_call> + <menu_item_separator/> <menu label="Voice morphing" name="VoiceMorphing" @@ -1202,8 +1216,9 @@ <menu_item_call.on_enable function="SomethingSelected" /> </menu_item_call> + <menu_item_separator/> <menu_item_call - label="Grid Options" + label="Grid Options..." name="Grid Options" shortcut="control|shift|B"> <menu_item_call.on_click @@ -1212,6 +1227,13 @@ <menu_item_call.on_enable function="Tools.EnableToolNotPie" /> </menu_item_call> + <menu_item_call + label="Set Default Permissions..." + name="Set default permissions"> + <menu_item_call.on_click + function="Floater.ToggleOrBringToFront" + parameter="perms_default" /> + </menu_item_call> </menu> <menu create_jump_keys="true" @@ -1279,13 +1301,6 @@ function="File.UploadBulk" parameter="" /> </menu_item_call> - <menu_item_call - label="Set Default Upload Permissions" - name="perm prefs"> - <menu_item_call.on_click - function="Floater.Toggle" - parameter="perm_prefs" /> - </menu_item_call> </menu> <menu_item_separator/> <menu_item_call @@ -2593,6 +2608,16 @@ parameter="lights" /> </menu_item_check> <menu_item_check + label="Particles" + name="Particles"> + <menu_item_check.on_check + function="Advanced.CheckInfoDisplay" + parameter="particles" /> + <menu_item_check.on_click + function="Advanced.ToggleInfoDisplay" + parameter="particles" /> + </menu_item_check> + <menu_item_check label="Collision Skeleton" name="Collision Skeleton"> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 7297ba4fc0..f49f300868 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6065,7 +6065,21 @@ Please select at least one type of content to search (General, Moderate, or Adul type="notifytip"> [MESSAGE] </notification> - + + <notification + icon="notify.tga" + name="FlickrConnect" + type="notifytip"> + [MESSAGE] + </notification> + + <notification + icon="notify.tga" + name="TwitterConnect" + type="notifytip"> + [MESSAGE] + </notification> + <notification icon="notify.tga" name="PaymentReceived" @@ -10236,6 +10250,17 @@ Cannot create large prims that intersect other players. Please re-try when othe name="okignore" yestext="OK"/> </notification> + + <notification + icon="alertmodal.tga" + name="DefaultObjectPermissions" + type="alert"> + There was a problem saving the default permissions due to the following reason: [REASON]. Please try setting the default permissions later. + <tag>fail</tag> + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> <notification icon="alert.tga" diff --git a/indra/newview/skins/default/xui/en/panel_social_account.xml b/indra/newview/skins/default/xui/en/panel_facebook_account.xml index d7235396fe..122cbfb717 100644 --- a/indra/newview/skins/default/xui/en/panel_social_account.xml +++ b/indra/newview/skins/default/xui/en/panel_facebook_account.xml @@ -2,7 +2,8 @@ height="400" width="304" layout="topleft" - name="panel_social_account"> + follows="all" + name="panel_facebook_account"> <string name="facebook_connected" value="You are connected to Facebook as:" /> @@ -34,6 +35,7 @@ type="string"/> <panel layout="topleft" + follows="left|top" name="panel_buttons" height="345" left="9"> @@ -69,7 +71,7 @@ name="account_learn_more_label" top_pad="20" type="string"> - [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share/ta-p/2149711 Learn about posting to Facebook] + [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share-Facebook/ta-p/2149711 Learn about posting to Facebook] </text> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_facebook_friends.xml b/indra/newview/skins/default/xui/en/panel_facebook_friends.xml new file mode 100644 index 0000000000..9d21a3a293 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_facebook_friends.xml @@ -0,0 +1,72 @@ +<panel + height="400" + width="304" + layout="topleft" + follows="all" + name="panel_facebook_friends"> + <string + name="facebook_friends_empty" + value="You currently do not have any Facebook friends who are also Second Life residents. Ask your Facebook friends to join Second Life today!" /> + <string + name="facebook_friends_no_connected" + value="You're currently not connected to Facebook. Please go to the Account tab to connect and enable this feature." /> + <accordion + background_visible="true" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + follows="all" + height="408" + layout="topleft" + left="3" + name="friends_accordion" + right="-2" + top_pad="2"> + <accordion_tab + layout="topleft" + height="173" + name="tab_second_life_friends" + title="SL friends"> + <avatar_list + ignore_online_status="true" + allow_select="true" + follows="all" + height="173" + layout="topleft" + left="0" + name="second_life_friends" + show_permissions_granted="true" + top="0" + width="307" /> + </accordion_tab> + <accordion_tab + layout="topleft" + height="173" + name="tab_suggested_friends" + title="Add these people as SL friends"> + <avatar_list + ignore_online_status="true" + allow_select="true" + follows="all" + height="173" + layout="topleft" + left="0" + name="suggested_friends" + show_permissions_granted="true" + top="0" + width="307" /> + </accordion_tab> + </accordion> + <text + layout="topleft" + word_wrap="true" + height="64" + width="290" + follows="top|left|right" + font="SansSerif" + left="9" + name="facebook_friends_status" + top="21" + type="string"> + Not connected to Facebook. + </text> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_social_photo.xml b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml index c79a246d9d..b5b6dee004 100644 --- a/indra/newview/skins/default/xui/en/panel_social_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml @@ -2,7 +2,8 @@ height="400" width="304" layout="topleft" - name="panel_social_photo"> + follows="all" + name="panel_facebook_photo"> <layout_stack layout="topleft" border_size="0" @@ -15,7 +16,7 @@ name="snapshot_panel" height="367"> <combo_box - control_name="SocialPhotoResolution" + control_name="FacebookPhotoResolution" follows="left|top" top="6" left="9" @@ -39,27 +40,32 @@ label="1024x768" name="1024x768" value="[i1024,i768]" /> + <combo_box.item + label="1200x630" + name="1200x630" + value="[i1200,i630]" /> + </combo_box> + <combo_box + control_name="FacebookPhotoFilters" + follows="right|top" + name="filters_combobox" + tool_tip="Image filters" + top="6" + left="165" + height="21" + width="135"> + <combo_box.item + label="No Filter" + name="NoFilter" + value="NoFilter" /> </combo_box> - <text - follows="left|top" - font="SansSerifSmall" - height="14" - left="208" - length="1" - halign="right" - name="file_size_label" - top="9" - type="string" - width="50"> - [SIZE] KB - </text> <panel height="150" width="250" visible="true" name="thumbnail_placeholder" top="33" - follows="left|top" + follows="left|top|right" left="9"> </panel> <button @@ -81,7 +87,7 @@ text_color="EmphasisColor" height="14" top_pad="-19" - left_pad="-20" + left_pad="-30" length="1" halign="center" name="working_lbl" @@ -91,6 +97,20 @@ width="150"> Refreshing... </text> + <button + follows="right|top" + height="23" + label="Preview" + left="200" + top_pad="-19" + name="big_preview_btn" + tool_tip="Click to toggle preview" + is_toggle="true" + visible="true" + width="100" > + <button.commit_callback + function="SocialSharing.BigPreview" /> + </button> <text length="1" follows="top|left|right" @@ -103,7 +123,7 @@ Comment (optional): </text> <text_editor - follows="left|top" + follows="left|top|right|bottom" height="87" width="250" left="9" @@ -118,7 +138,7 @@ name="photo_button_panel" height="25"> <button - follows="left|top" + follows="left|bottom" top="0" left="9" height="23" @@ -129,7 +149,7 @@ function="SocialSharing.SendPhoto" /> </button> <button - follows="left|top" + follows="left|bottom" height="23" label="Cancel" name="cancel_photo_btn" diff --git a/indra/newview/skins/default/xui/en/panel_social_place.xml b/indra/newview/skins/default/xui/en/panel_facebook_place.xml index 13e94f6998..84c87df523 100644 --- a/indra/newview/skins/default/xui/en/panel_social_place.xml +++ b/indra/newview/skins/default/xui/en/panel_facebook_place.xml @@ -2,7 +2,8 @@ height="400" width="304" layout="topleft" - name="panel_social_place"> + follows="all" + name="panel_facebook_place"> <layout_stack layout="topleft" border_size="0" @@ -26,7 +27,7 @@ Say something about where you are: </text> <text_editor - follows="top|left" + follows="top|left|right" height="150" width="250" left="9" @@ -106,7 +107,7 @@ name="place_button_panel" height="25"> <button - follows="left|top" + follows="left|bottom" top="0" left="9" height="23" @@ -117,7 +118,7 @@ function="SocialSharing.SendCheckin" /> </button> <button - follows="left|top" + follows="left|bottom" height="23" label="Cancel" name="cancel_place_btn" diff --git a/indra/newview/skins/default/xui/en/panel_social_status.xml b/indra/newview/skins/default/xui/en/panel_facebook_status.xml index 54cfa3f524..480abec558 100644 --- a/indra/newview/skins/default/xui/en/panel_social_status.xml +++ b/indra/newview/skins/default/xui/en/panel_facebook_status.xml @@ -1,8 +1,9 @@ <panel height="400" width="304" + follows="all" layout="topleft" - name="panel_social_status"> + name="panel_facebook_status"> <layout_stack layout="topleft" border_size="0" @@ -26,7 +27,7 @@ What's on your mind? </text> <text_editor - follows="left|top" + follows="left|top|right" height="150" width="250" left="9" @@ -41,7 +42,7 @@ name="status_button_panel" height="25"> <button - follows="left|top" + follows="left|bottom" top="0" left="9" height="23" @@ -52,7 +53,7 @@ function="SocialSharing.SendStatus" /> </button> <button - follows="left|top" + follows="left|bottom" height="23" label="Cancel" name="cancel_status_btn" diff --git a/indra/newview/skins/default/xui/en/panel_flickr_account.xml b/indra/newview/skins/default/xui/en/panel_flickr_account.xml new file mode 100644 index 0000000000..506d2e2f74 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_flickr_account.xml @@ -0,0 +1,75 @@ +<panel + height="540" + width="304" + layout="topleft" + name="panel_flickr_account"> + <string + name="flickr_connected" + value="You are connected to Flickr as:" /> + <string + name="flickr_disconnected" + value="Not connected to Flickr" /> + <text + layout="topleft" + length="1" + follows="top|left" + font="SansSerif" + height="16" + left="9" + name="account_caption_label" + top="21" + type="string"> + Not connected to Flickr. + </text> + <text + layout="topleft" + top_pad="2" + length="1" + follows="top|left" + font="SansSerif" + height="16" + left="9" + name="account_name_label" + parse_urls="true" + type="string"/> + <panel + layout="topleft" + name="panel_buttons" + height="345" + left="9"> + <button + layout="topleft" + follows="left|top" + top_pad="9" + visible="true" + height="23" + label="Connect..." + name="connect_btn" + width="210"> + <commit_callback function="SocialSharing.Connect"/> + </button> + + <button + layout="topleft" + follows="left|top" + top_delta="0" + height="23" + label="Disconnect" + name="disconnect_btn" + width="210" + visible="false"> + <commit_callback function="SocialSharing.Disconnect"/> + </button> + <text + layout="topleft" + length="1" + follows="top|left" + height="16" + left="0" + name="account_learn_more_label" + top_pad="20" + type="string"> + [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share-Flickr/ta-p/2435609 Learn about posting to Flickr] + </text> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml new file mode 100644 index 0000000000..8d8ef45c0d --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml @@ -0,0 +1,245 @@ + <panel + height="540" + width="304" + layout="topleft" + name="panel_flickr_photo"> + <layout_stack + layout="topleft" + border_size="0" + height="532" + follows="all" + orientation="vertical" + name="stack_photo" + top="8"> + <layout_panel + name="snapshot_panel" + height="507"> + <combo_box + control_name="FlickrPhotoResolution" + follows="left|top" + top="6" + left="9" + name="resolution_combobox" + tool_tip="Image resolution" + height="21" + width="135"> + <combo_box.item + label="Current Window" + name="CurrentWindow" + value="[i0,i0]" /> + <combo_box.item + label="640x480" + name="640x480" + value="[i640,i480]" /> + <combo_box.item + label="800x600" + name="800x600" + value="[i800,i600]" /> + <combo_box.item + label="1024x768" + name="1024x768" + value="[i1024,i768]" /> + </combo_box> + <combo_box + control_name="FlickrPhotoFilters" + follows="right|top" + name="filters_combobox" + tool_tip="Image filters" + top="6" + left="165" + height="21" + width="135"> + <combo_box.item + label="No Filter" + name="NoFilter" + value="NoFilter" /> + </combo_box> + <panel + height="150" + width="250" + visible="true" + name="thumbnail_placeholder" + top="33" + follows="left|top" + left="9"> + </panel> + <button + follows="left|top" + height="23" + label="Refresh" + left="9" + top_pad="5" + name="new_snapshot_btn" + tool_tip="Click to refresh" + visible="true" + width="100" > + <button.commit_callback + function="SocialSharing.RefreshPhoto" /> + </button> + <text + follows="left|top" + font="SansSerif" + text_color="EmphasisColor" + height="14" + top_pad="-19" + left_pad="-30" + length="1" + halign="center" + name="working_lbl" + translate="false" + type="string" + visible="true" + width="150"> + Refreshing... + </text> + <button + follows="right|top" + height="23" + label="Preview" + left="200" + top_pad="-19" + name="big_preview_btn" + tool_tip="Click to toggle preview" + is_toggle="true" + visible="true" + width="100" > + <button.commit_callback + function="SocialSharing.BigPreview" /> + </button> + <text + length="1" + follows="top|left|right" + font="SansSerif" + height="16" + left="9" + name="title_label" + top_pad="15" + type="string"> + Title: + </text> + <line_editor + follows="left|top" + height="20" + width="250" + left="9" + length="1" + max_length="256" + name="photo_title" + type="string"> + </line_editor> + <text + length="1" + follows="top|left|right" + font="SansSerif" + height="16" + left="9" + name="description_label" + top_pad="10" + type="string"> + Description: + </text> + <text_editor + follows="left|top" + height="50" + width="250" + left="9" + length="1" + max_length="700" + name="photo_description" + type="string" + word_wrap="true"> + </text_editor> + <check_box + follows="left|top" + initial_value="true" + label="Include SL location at end of description" + name="add_location_cb" + left="9" + height="16" + top_pad="8"/> + <text + length="1" + follows="top|left|right" + font="SansSerif" + height="16" + left="9" + name="tags_label" + top_pad="10" + type="string"> + Tags: + </text> + <text + length="1" + follows="top|left" + font="SansSerifSmall" + text_color="White_50" + height="30" + name="tags_help_label" + left="50" + top_pad="-16" + type="string"> +Separate tags with spaces +Use "" for multi-word tags + </text> + <text_editor + follows="left|top" + height="50" + width="250" + left="9" + length="1" + max_length="700" + name="photo_tags" + type="string" + word_wrap="true"> + </text_editor> + <combo_box + control_name="FlickrPhotoRating" + follows="left|top" + top_pad="16" + left="9" + name="rating_combobox" + tool_tip="Flickr content rating" + height="21" + width="250"> + <combo_box.item + label="Safe Flickr rating" + name="SafeRating" + value="1" /> + <combo_box.item + label="Moderate Flickr rating" + name="ModerateRating" + value="2" /> + <combo_box.item + label="Restricted Flickr rating" + name="RestrictedRating" + value="3" /> + </combo_box> + </layout_panel> + <layout_panel + name="photo_button_panel" + height="25"> + <button + follows="left|top" + top="0" + left="9" + height="23" + label="Upload" + name="post_photo_btn" + width="100"> + <button.commit_callback + function="SocialSharing.SendPhoto" /> + </button> + <button + follows="left|top" + height="23" + label="Cancel" + name="cancel_photo_btn" + left_pad="15" + top_delta="0" + width="100"> + <button.commit_callback + function="SocialSharing.Cancel" /> + </button> + </layout_panel> + </layout_stack> + </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 50fd57494f..2e778014c5 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -222,4 +222,15 @@ name="show_develop_menu_check" top_pad="5" width="237"/> + <button + height="20" + label="Default Creation Permissions" + layout="topleft" + name="default_creation_permissions" + left="30" + top_pad = "20" + width="250"> + <button.commit_callback + function="Pref.PermsDefault" /> + </button> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index bcdef96138..eb1b954e61 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -70,6 +70,16 @@ label="Save to file..." layout="topleft" name="SaveToFile" /> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Colors..." + layout="topleft" + name="Colors"> + <menu_item_call.on_click + function="Floater.Toggle" + parameter="script_colors"/> + </menu_item_call> </menu> <menu top="0" @@ -148,8 +158,8 @@ name="Keyword Help..." /> </menu> </menu_bar> - <text_editor - left="0" + <script_editor + left="0" type="string" length="1" follows="left|top|right|bottom" @@ -157,15 +167,21 @@ height="376" ignore_tab="false" layout="topleft" - max_length="65536" + max_length="262144" name="Script Editor" - text_readonly_color="DkGray" width="487" - show_line_numbers="true" + text_color="ScriptText" + default_color="ScriptText" + bg_writeable_color="ScriptBackground" + bg_focus_color="ScriptBackground" + text_readonly_color="ScriptText" + bg_readonly_color="ScriptBackground" + cursor_color="ScriptCursorColor" enable_tooltip_paste="true" - word_wrap="true"> + word_wrap="true" + show_context_menu="true"> Loading... - </text_editor> + </script_editor> <scroll_list top_pad="10" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml index 61c8c971c2..eff60f8228 100755 --- a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml @@ -81,4 +81,40 @@ <button.commit_callback function="Snapshot.SaveToComputer" /> </button> + <text + font="SansSerif" + layout="topleft" + length="1" + follows="top|left" + height="16" + left="10" + name="send_to_facebook_textbox" + top_pad="10" + type="string"> + Send to: [secondlife:/// Facebook] + </text> + <text + font="SansSerif" + layout="topleft" + length="1" + follows="top|left" + height="16" + left="140" + name="send_to_twitter_textbox" + top_pad="-16" + type="string"> + [secondlife:/// Twitter] + </text> + <text + font="SansSerif" + layout="topleft" + length="1" + follows="top|left" + height="16" + left="190" + name="send_to_flickr_textbox" + top_pad="-16" + type="string"> + [secondlife:/// Flickr] + </text> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_twitter_account.xml b/indra/newview/skins/default/xui/en/panel_twitter_account.xml new file mode 100644 index 0000000000..ee4f6396e1 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_twitter_account.xml @@ -0,0 +1,75 @@ +<panel + height="400" + width="304" + layout="topleft" + name="panel_twitter_account"> + <string + name="twitter_connected" + value="You are connected to Twitter as:" /> + <string + name="twitter_disconnected" + value="Not connected to Twitter" /> + <text + layout="topleft" + length="1" + follows="top|left" + font="SansSerif" + height="16" + left="9" + name="account_caption_label" + top="21" + type="string"> + Not connected to Twitter. + </text> + <text + layout="topleft" + top_pad="2" + length="1" + follows="top|left" + font="SansSerif" + height="16" + left="9" + name="account_name_label" + parse_urls="true" + type="string"/> + <panel + layout="topleft" + name="panel_buttons" + height="345" + left="9"> + <button + layout="topleft" + follows="left|top" + top_pad="9" + visible="true" + height="23" + label="Connect..." + name="connect_btn" + width="210"> + <commit_callback function="SocialSharing.Connect"/> + </button> + + <button + layout="topleft" + follows="left|top" + top_delta="0" + height="23" + label="Disconnect" + name="disconnect_btn" + width="210" + visible="false"> + <commit_callback function="SocialSharing.Disconnect"/> + </button> + <text + layout="topleft" + length="1" + follows="top|left" + height="16" + left="0" + name="account_learn_more_label" + top_pad="20" + type="string"> + [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share-Twitter/ta-p/2435453 Learn about posting to Twitter] + </text> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml new file mode 100644 index 0000000000..c2be56da21 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml @@ -0,0 +1,193 @@ + <panel + height="420" + width="304" + layout="topleft" + name="panel_twitter_photo"> + <layout_stack + layout="topleft" + border_size="0" + height="412" + follows="all" + orientation="vertical" + name="stack_photo" + top="8"> + <layout_panel + name="text_panel" + height="160"> + <text + length="1" + follows="top|left|right" + font="SansSerif" + height="16" + left="9" + name="status_label" + top="3" + type="string"> + What's happening? + </text> + <text + length="1" + follows="top|left" + font="SansSerif" + text_color="EmphasisColor" + halign="right" + height="16" + width="30" + left="227" + name="status_counter_label" + top="3" + type="string"> + 140 + </text> + <text_editor + follows="left|top" + height="87" + width="250" + left="9" + length="1" + max_length="140" + name="photo_status" + type="string" + word_wrap="true"> + </text_editor> + <check_box + follows="left|top" + initial_value="true" + label="Include SL location" + name="add_location_cb" + left="9" + height="16" + top_pad="10"/> + <check_box + follows="left|top" + initial_value="true" + label="Include a photo" + name="add_photo_cb" + left="9" + height="16" + top_pad="10"/> + </layout_panel> + <layout_panel + name="snapshot_panel" + height="227"> + <combo_box + control_name="TwitterPhotoResolution" + follows="left|top" + top="6" + left="9" + name="resolution_combobox" + tool_tip="Image resolution" + height="21" + width="135"> + <combo_box.item + label="Current Window" + name="CurrentWindow" + value="[i0,i0]" /> + <combo_box.item + label="640x480" + name="640x480" + value="[i640,i480]" /> + <combo_box.item + label="800x600" + name="800x600" + value="[i800,i600]" /> + <combo_box.item + label="1024x768" + name="1024x768" + value="[i1024,i768]" /> + </combo_box> + <combo_box + control_name="TwitterPhotoFilters" + follows="right|top" + name="filters_combobox" + tool_tip="Image filters" + top="6" + left="165" + height="21" + width="135"> + <combo_box.item + label="No Filter" + name="NoFilter" + value="NoFilter" /> + </combo_box> + <panel + height="150" + width="250" + visible="true" + name="thumbnail_placeholder" + top="33" + follows="left|top" + left="9"> + </panel> + <button + follows="left|top" + height="23" + label="Refresh" + left="9" + top_pad="5" + name="new_snapshot_btn" + tool_tip="Click to refresh" + visible="true" + width="100" > + <button.commit_callback + function="SocialSharing.RefreshPhoto" /> + </button> + <text + follows="left|top" + font="SansSerif" + text_color="EmphasisColor" + height="14" + top_pad="-19" + left_pad="-30" + length="1" + halign="center" + name="working_lbl" + translate="false" + type="string" + visible="true" + width="150"> + Refreshing... + </text> + <button + follows="right|top" + height="23" + label="Preview" + left="200" + top_pad="-19" + name="big_preview_btn" + tool_tip="Click to toggle preview" + is_toggle="true" + visible="true" + width="100" > + <button.commit_callback + function="SocialSharing.BigPreview" /> + </button> + </layout_panel> + <layout_panel + name="photo_button_panel" + height="25"> + <button + follows="left|top" + top="0" + left="9" + height="23" + label="Tweet" + name="post_photo_btn" + width="100"> + <button.commit_callback + function="SocialSharing.SendPhoto" /> + </button> + <button + follows="left|top" + height="23" + label="Cancel" + name="cancel_photo_btn" + left_pad="15" + top_delta="0" + width="100"> + <button.commit_callback + function="SocialSharing.Cancel" /> + </button> + </layout_panel> + </layout_stack> + </panel> diff --git a/indra/newview/skins/default/xui/en/script_editor.xml b/indra/newview/skins/default/xui/en/script_editor.xml new file mode 100644 index 0000000000..f1c6161711 --- /dev/null +++ b/indra/newview/skins/default/xui/en/script_editor.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<script_editor + name="script_editor" + parse_urls="false" + show_context_menu="true" + show_line_numbers="true" + text_color="ScriptText" + default_color="ScriptText" + bg_writeable_color="ScriptBackground" + bg_focus_color="ScriptBackground"> +</script_editor> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3d129e09cc..ba95d701ab 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -184,15 +184,40 @@ Please try logging in again in a minute.</string> <string name="SentToInvalidRegion">You were sent to an invalid region.</string> <string name="TestingDisconnect">Testing viewer disconnect</string> - <!-- Facebook Connect and, eventually, other Social Network --> - <string name="SocialFacebookConnecting">Connecting to Facebook...</string> - <string name="SocialFacebookPosting">Posting...</string> - <string name="SocialFacebookDisconnecting">Disconnecting from Facebook...</string> - <string name="SocialFacebookErrorConnecting">Problem connecting to Facebook</string> - <string name="SocialFacebookErrorPosting">Problem posting to Facebook</string> - <string name="SocialFacebookErrorDisconnecting">Problem disconnecting from Facebook</string> + <!-- SLShare: Facebook, Flickr, and Twitter --> + <string name="SocialFacebookConnecting">Connecting to Facebook...</string> + <string name="SocialFacebookPosting">Posting...</string> + <string name="SocialFacebookDisconnecting">Disconnecting from Facebook...</string> + <string name="SocialFacebookErrorConnecting">Problem connecting to Facebook</string> + <string name="SocialFacebookErrorPosting">Problem posting to Facebook</string> + <string name="SocialFacebookErrorDisconnecting">Problem disconnecting from Facebook</string> + <string name="SocialFlickrConnecting">Connecting to Flickr...</string> + <string name="SocialFlickrPosting">Posting...</string> + <string name="SocialFlickrDisconnecting">Disconnecting from Flickr...</string> + <string name="SocialFlickrErrorConnecting">Problem connecting to Flickr</string> + <string name="SocialFlickrErrorPosting">Problem posting to Flickr</string> + <string name="SocialFlickrErrorDisconnecting">Problem disconnecting from Flickr</string> + <string name="SocialTwitterConnecting">Connecting to Twitter...</string> + <string name="SocialTwitterPosting">Posting...</string> + <string name="SocialTwitterDisconnecting">Disconnecting from Twitter...</string> + <string name="SocialTwitterErrorConnecting">Problem connecting to Twitter</string> + <string name="SocialTwitterErrorPosting">Problem posting to Twitter</string> + <string name="SocialTwitterErrorDisconnecting">Problem disconnecting from Twitter</string> - <!-- Tooltip --> + <!-- SLShare: User Friendly Filter Names Translation --> + <string name="BlackAndWhite">Black & White</string> + <string name="Colors1970">1970's Colors</string> + <string name="Intense">Intense</string> + <string name="Newspaper">Newsprint</string> + <string name="Sepia">Sepia</string> + <string name="Spotlight">Spotlight</string> + <string name="Video">Video</string> + <string name="Autocontrast">Autocontrast</string> + <string name="LensFlare">Lens Flare</string> + <string name="Miniature">Miniature</string> + <string name="Toycamera">Toy Camera</string> + + <!-- Tooltip --> <string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar --> <string name="TooltipNoName">(no name)</string> <!-- No name on an object --> <string name="TooltipOwner">Owner:</string> <!-- Owner name follows --> @@ -419,6 +444,8 @@ Please try logging in again in a minute.</string> <string name="multiple_textures">Multiple</string> <string name="use_texture">Use texture</string> + <string name="manip_hint1">Move mouse cursor over ruler</string> + <string name="manip_hint2">to snap to grid</string> <!-- world map --> <string name="texture_loading">Loading...</string> @@ -3491,6 +3518,12 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="facebook_post_success"> You posted to Facebook. </string> + <string name="flickr_post_success"> + You posted to Flickr. + </string> + <string name="twitter_post_success"> + You posted to Twitter. + </string> <string name="no_session_message"> (IM Session Doesn't Exist) @@ -3908,6 +3941,8 @@ Try enclosing path to the editor with double quotes. <string name="Command_Conversations_Label">Conversations</string> <string name="Command_Compass_Label">Compass</string> <string name="Command_Destinations_Label">Destinations</string> + <string name="Command_Facebook_Label">Facebook</string> + <string name="Command_Flickr_Label">Flickr</string> <string name="Command_Gestures_Label">Gestures</string> <string name="Command_HowTo_Label">How to</string> <string name="Command_Inventory_Label">Inventory</string> @@ -3923,8 +3958,8 @@ Try enclosing path to the editor with double quotes. <string name="Command_Profile_Label">Profile</string> <string name="Command_Search_Label">Search</string> <string name="Command_Snapshot_Label">Snapshot</string> - <string name="Command_Social_Label">Facebook</string> <string name="Command_Speak_Label">Speak</string> + <string name="Command_Twitter_Label">Twitter</string> <string name="Command_View_Label">Camera controls</string> <string name="Command_Voice_Label">Voice settings</string> @@ -3936,6 +3971,8 @@ Try enclosing path to the editor with double quotes. <string name="Command_Conversations_Tooltip">Converse with everyone</string> <string name="Command_Compass_Tooltip">Compass</string> <string name="Command_Destinations_Tooltip">Destinations of interest</string> + <string name="Command_Facebook_Tooltip">Post to Facebook</string> + <string name="Command_Flickr_Tooltip">Upload to Flickr</string> <string name="Command_Gestures_Tooltip">Gestures for your avatar</string> <string name="Command_HowTo_Tooltip">How to do common tasks</string> <string name="Command_Inventory_Tooltip">View and use your belongings</string> @@ -3951,8 +3988,8 @@ Try enclosing path to the editor with double quotes. <string name="Command_Profile_Tooltip">Edit or view your profile</string> <string name="Command_Search_Tooltip">Find places, events, people</string> <string name="Command_Snapshot_Tooltip">Take a picture</string> - <string name="Command_Social_Tooltip">Post to Facebook</string> <string name="Command_Speak_Tooltip">Speak with people nearby using your microphone</string> + <string name="Command_Twitter_Tooltip">Twitter</string> <string name="Command_View_Tooltip">Changing camera angle</string> <string name="Command_Voice_Tooltip">Volume controls for calls and people near you in world</string> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 965080c74b..f079f31c81 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=""): @@ -764,7 +767,7 @@ class Darwin_i386_Manifest(ViewerManifest): 'SLVoice', ): self.path2basename(libdir, libfile) - + # dylibs that vary based on configuration if self.args['configuration'].lower() == 'debug': for libfile in ( diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp index be0692557a..b7283f53a6 100755 --- a/indra/test/llsdmessagebuilder_tut.cpp +++ b/indra/test/llsdmessagebuilder_tut.cpp @@ -649,7 +649,7 @@ namespace tut template<> template<> void LLSDMessageBuilderTestObject::test<37>() { - LLQuaternion data(1,2,3,0); + LLQuaternion data(0.3713907f, 0.5570861f, 0.7427813f,0.0f); //we send a quaternion packed into a vec3 (w is infered) - so sizeof(vec) == 12 bytes not 16. LLVector3 vec = data.packToVector3(); diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 01765974ea..7b4b6a8b70 100755 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -319,7 +319,7 @@ namespace tut { LLMessageTemplate messageTemplate = defaultTemplate(); messageTemplate.addBlock(defaultBlock(MVT_LLQuaternion, 12)); - LLQuaternion outValue, inValue = LLQuaternion(1,2,3,0); + LLQuaternion outValue, inValue = LLQuaternion(0.3713907f, 0.5570861f, 0.7427813f,0.0f); LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addQuat(_PREHASH_Test0, inValue); LLTemplateMessageReader* reader = setReader(messageTemplate, builder); @@ -786,7 +786,7 @@ namespace tut { LLMessageTemplate messageTemplate = defaultTemplate(); messageTemplate.addBlock(defaultBlock(MVT_LLQuaternion, 12)); - LLQuaternion outValue, inValue = LLQuaternion(1,2,3,0); + LLQuaternion outValue, inValue = LLQuaternion(0.3713907f, 0.5570861f, 0.7427813f,0.0f); LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addQuat(_PREHASH_Test0, inValue); LLTemplateMessageReader* reader = setReader( |