summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.hgtags11
-rw-r--r--BuildParams11
-rwxr-xr-xbuild.sh2
-rw-r--r--indra/cmake/GooglePerfTools.cmake2
-rw-r--r--indra/llcommon/llmemory.h24
-rw-r--r--indra/llmath/llvolume.cpp19
-rw-r--r--indra/llmath/tests/alignment_test.cpp33
-rw-r--r--indra/llmessage/tests/llhttpclient_test.cpp1
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp2
-rw-r--r--indra/llprimitive/CMakeLists.txt2
-rw-r--r--indra/llprimitive/llmaterialid.cpp112
-rw-r--r--indra/llprimitive/llmaterialid.h62
-rwxr-xr-xindra/llprimitive/llprimitive.cpp34
-rw-r--r--indra/llprimitive/llprimitive.h2
-rw-r--r--indra/llprimitive/llprimtexturelist.cpp10
-rw-r--r--indra/llprimitive/llprimtexturelist.h2
-rw-r--r--indra/llprimitive/lltextureentry.cpp17
-rw-r--r--indra/llprimitive/lltextureentry.h4
-rw-r--r--indra/llrender/llvertexbuffer.cpp1
-rwxr-xr-xindra/newview/CMakeLists.txt3
-rw-r--r--indra/newview/lldrawpoolalpha.cpp6
-rw-r--r--indra/newview/lldriverparam.h10
-rwxr-xr-x[-rw-r--r--]indra/newview/llface.cpp3
-rw-r--r--indra/newview/llfloaterbuycontents.cpp4
-rw-r--r--indra/newview/llfloaterdebugmaterials.cpp1525
-rw-r--r--indra/newview/llfloaterdebugmaterials.h187
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp56
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h7
-rw-r--r--indra/newview/llfolderview.cpp3
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp8
-rw-r--r--indra/newview/llpolymesh.cpp2
-rw-r--r--indra/newview/llpolymesh.h10
-rw-r--r--indra/newview/llpolymorph.cpp60
-rw-r--r--indra/newview/llpolymorph.h13
-rw-r--r--indra/newview/lltexlayerparams.h20
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp12
-rw-r--r--indra/newview/llviewerobject.cpp92
-rw-r--r--indra/newview/llviewerobject.h15
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/llvovolume.cpp12
-rw-r--r--indra/newview/llvovolume.h2
-rw-r--r--indra/newview/pipeline.cpp21
-rw-r--r--indra/newview/skins/default/colors.xml9
-rw-r--r--indra/newview/skins/default/xui/de/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_debug_materials.xml899
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_ctrl.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml11
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml1088
-rw-r--r--indra/newview/tests/llmediadataclient_test.cpp1
-rw-r--r--indra/newview/viewer_manifest.py11
53 files changed, 3759 insertions, 712 deletions
diff --git a/.hgtags b/.hgtags
index c5b40e9b9a..68d1bdaf31 100755
--- a/.hgtags
+++ b/.hgtags
@@ -274,7 +274,6 @@ cbea6356ce9cb0c313b6777f10c5c14783264fcc DRTVWR-174
eb539c65e6ee26eea2bf373af2d0f4b52dc91289 DRTVWR-177
a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3
888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
-4ad8a3afe40e0200309e3ada68932c4295ac2795 DRTVWR-179
4281aa899fb2cedb7a9ca7ce91c5c29d4aa69594 DRTVWR-180
5c08e1d8edd871807153603b690e3ee9dbb548aa DRTVWR-183
6c75f220b103db1420919c8b635fe53e2177f318 3.3.4-beta4
@@ -311,3 +310,13 @@ de3be913f68813a9bac7d1c671fef96d1159bcd6 DRTVWR-202
7b22c612fc756e0ea63b10b163e81d107f85dbf8 DRTVWR-206
8c9085066c78ed5f6c9379dc054c82a6fcdb1851 DRTVWR-207
351eea5f9dc192fc5ddea3b02958de97677a0a12 3.3.4-release3
+af7b28e75bd5a629cd9e0dc46fb3f1757626f493 DRTVWR-212
+015012c2b740ccdec8a8c3d6e5f898449ecfe0b8 DRTVWR-213
+62b07aa81b1957897c3846292bb9412977b0af6c 3.3.4-beta6
+ceed0b65a69f1eac20d523e0203320a32f9a3f3c DRTVWR-215
+733ceac77583874f3626ef7a15c105b83ef0f5bb 3.4.0-beta7
+97977c67245f52db20eb15f1918cc0f24778cabc 3.4.0-release
+5adb2b8f96c3cac88ad7c7d996d707f1b29df336 3.4.1-beta1
+b3f74858a1c8720c82d0978f3877a3fc8ba459ec 3.4.1-beta1a
+45028c687415ae2d6ca0c13fefca62cba60e013f DRTVWR-179
+b61afe175b829c149d369524a4e974dfda99facf DRTVWR-219
diff --git a/BuildParams b/BuildParams
index bdb9d5439d..05ae10281d 100644
--- a/BuildParams
+++ b/BuildParams
@@ -136,6 +136,17 @@ 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 = "Project Viewer - Materials"
+viewer-materials.login_channel = "Project Viewer - Materials"
+viewer-materials.viewer_grid = aditi
+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/build.sh b/build.sh
index b5876738e6..15f0463aff 100755
--- a/build.sh
+++ b/build.sh
@@ -78,7 +78,7 @@ pre_build()
check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries
- end_section "Pre$variant"
+ end_section "Pre$variant"
}
package_llphysicsextensions_tpv()
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake
index 09501e0406..73b3642ae6 100644
--- a/indra/cmake/GooglePerfTools.cmake
+++ b/indra/cmake/GooglePerfTools.cmake
@@ -3,7 +3,7 @@ include(Prebuilt)
# If you want to enable or disable TCMALLOC in viewer builds, this is the place.
# set ON or OFF as desired.
-set (USE_TCMALLOC ON)
+set (USE_TCMALLOC OFF)
if (STANDALONE)
include(FindGooglePerfTools)
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 9dd776ff57..f37e8459ff 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -58,27 +58,35 @@ inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed wi
#endif
}
-inline void* ll_aligned_realloc_16(void* ptr, size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
+inline void ll_aligned_free_16(void *p)
{
#if defined(LL_WINDOWS)
- return _aligned_realloc(ptr, size, 16);
+ _aligned_free(p);
#elif defined(LL_DARWIN)
- return realloc(ptr,size); // default osx malloc is 16 byte aligned.
+ return free(p);
#else
- return realloc(ptr,size); // FIXME not guaranteed to be aligned.
+ free(p); // posix_memalign() is compatible with heap deallocator
#endif
}
-inline void ll_aligned_free_16(void *p)
+inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // returned hunk MUST be freed with ll_aligned_free_16().
{
#if defined(LL_WINDOWS)
- _aligned_free(p);
+ return _aligned_realloc(ptr, size, 16);
#elif defined(LL_DARWIN)
- return free(p);
+ return realloc(ptr,size); // default osx malloc is 16 byte aligned.
#else
- free(p); // posix_memalign() is compatible with heap deallocator
+ //FIXME: memcpy is SLOW
+ void* ret = ll_aligned_malloc_16(size);
+ if (ptr)
+ {
+ memcpy(ret, ptr, old_size);
+ ll_aligned_free_16(ptr);
+ }
+ return ret;
#endif
}
+
#else // USE_TCMALLOC
// ll_aligned_foo_16 are not needed with tcmalloc
#define ll_aligned_malloc_16 malloc
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 53d56e96da..85ea14f9bc 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -6979,19 +6979,20 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con
{
S32 new_verts = mNumVertices+1;
S32 new_size = new_verts*16;
-// S32 old_size = mNumVertices*16;
+ S32 old_size = mNumVertices*16;
//positions
- mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_size);
+ mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_size, old_size);
ll_assert_aligned(mPositions,16);
//normals
- mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_size);
+ mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_size, old_size);
ll_assert_aligned(mNormals,16);
//tex coords
new_size = ((new_verts*8)+0xF) & ~0xF;
- mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, new_size);
+ old_size = ((mNumVertices*8)+0xF) & ~0xF;
+ mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, new_size, old_size);
ll_assert_aligned(mTexCoords,16);
@@ -7045,7 +7046,7 @@ void LLVolumeFace::pushIndex(const U16& idx)
S32 old_size = ((mNumIndices*2)+0xF) & ~0xF;
if (new_size != old_size)
{
- mIndices = (U16*) ll_aligned_realloc_16(mIndices, new_size);
+ mIndices = (U16*) ll_aligned_realloc_16(mIndices, new_size, old_size);
ll_assert_aligned(mIndices,16);
}
@@ -7087,11 +7088,11 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
}
//allocate new buffer space
- mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_count*sizeof(LLVector4a));
+ mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_count*sizeof(LLVector4a), mNumVertices*sizeof(LLVector4a));
ll_assert_aligned(mPositions, 16);
- mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_count*sizeof(LLVector4a));
+ mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_count*sizeof(LLVector4a), mNumVertices*sizeof(LLVector4a));
ll_assert_aligned(mNormals, 16);
- mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF);
+ mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF, (mNumVertices*sizeof(LLVector2)+0xF) & ~0xF);
ll_assert_aligned(mTexCoords, 16);
mNumVertices = new_count;
@@ -7138,7 +7139,7 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
new_count = mNumIndices + face.mNumIndices;
//allocate new index buffer
- mIndices = (U16*) ll_aligned_realloc_16(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF);
+ mIndices = (U16*) ll_aligned_realloc_16(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF, (mNumIndices*sizeof(U16)+0xF) & ~0xF);
//get destination address into new index buffer
U16* dst_idx = mIndices+mNumIndices;
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp
index ac0c45ae6f..9105b1c1fd 100644
--- a/indra/llmath/tests/alignment_test.cpp
+++ b/indra/llmath/tests/alignment_test.cpp
@@ -34,16 +34,6 @@
#include "../llsimdmath.h"
#include "../llvector4a.h"
-void* operator new(size_t size)
-{
- return ll_aligned_malloc_16(size);
-}
-
-void operator delete(void *p)
-{
- ll_aligned_free_16(p);
-}
-
namespace tut
{
@@ -59,6 +49,27 @@ tut::alignment_test_t tut_alignment_test("LLAlignment");
LL_ALIGN_PREFIX(16)
class MyVector4a
{
+public:
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void *p)
+ {
+ ll_aligned_free_16(p);
+ }
+
+ void* operator new[](size_t count)
+ { // try to allocate count bytes for an array
+ return ll_aligned_malloc_16(count);
+ }
+
+ void operator delete[](void *p)
+ {
+ ll_aligned_free_16(p);
+ }
+
LLQuad mQ;
} LL_ALIGN_POSTFIX(16);
@@ -78,7 +89,7 @@ void alignment_test_object_t::test<1>()
align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a));
ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16));
- align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a));
+ align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a), sizeof(MyVector4a));
ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16));
ll_aligned_free_16(align_ptr);
diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp
index e338d4ec71..843c3bcc4b 100644
--- a/indra/llmessage/tests/llhttpclient_test.cpp
+++ b/indra/llmessage/tests/llhttpclient_test.cpp
@@ -258,7 +258,6 @@ namespace tut
void HTTPClientTestObject::test<1>()
{
LLHTTPClient::get(local_server, newResult());
-
runThePump();
ensureStatusOK();
ensure("result object wasn't destroyed", mResultDeleted);
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index dbd96673a1..0644d2638c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -1074,7 +1074,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
mAuthURL = message.getValue("url");
mAuthRealm = message.getValue("realm");
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
- }
+ }
else if(message_name == "debug_message")
{
mDebugMessageText = message.getValue("message_text");
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index e4d9de7eb6..82d0f892f2 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -20,6 +20,7 @@ include_directories(
)
set(llprimitive_SOURCE_FILES
+ llmaterialid.cpp
llmaterialtable.cpp
llmediaentry.cpp
llmodel.cpp
@@ -37,6 +38,7 @@ set(llprimitive_HEADER_FILES
CMakeLists.txt
legacy_object_types.h
+ llmaterialid.h
llmaterialtable.h
llmediaentry.h
llmodel.h
diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp
new file mode 100644
index 0000000000..4355a8ea3f
--- /dev/null
+++ b/indra/llprimitive/llmaterialid.cpp
@@ -0,0 +1,112 @@
+/**
+* @file llmaterialid.cpp
+* @brief Implementation of llmaterialid
+* @author Stinson@lindenlab.com
+*
+* $LicenseInfo:firstyear=2012&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 "linden_common.h"
+
+#include "llmaterialid.h"
+
+const LLMaterialID LLMaterialID::null;
+
+LLMaterialID::LLMaterialID()
+{
+ clear();
+}
+
+LLMaterialID::LLMaterialID(const LLSD& pMaterialID)
+{
+ llassert(pMaterialID.isBinary());
+ parseFromBinary(pMaterialID.asBinary());
+}
+
+LLMaterialID::LLMaterialID(const LLSD::Binary& pMaterialID)
+{
+ parseFromBinary(pMaterialID);
+}
+
+LLMaterialID::LLMaterialID(const LLMaterialID& pOtherMaterialID)
+{
+ copyFromOtherMaterialID(pOtherMaterialID);
+}
+
+LLMaterialID::~LLMaterialID()
+{
+}
+
+bool LLMaterialID::operator == (const LLMaterialID& pOtherMaterialID) const
+{
+ return (compareToOtherMaterialID(pOtherMaterialID) == 0);
+}
+
+bool LLMaterialID::operator != (const LLMaterialID& pOtherMaterialID) const
+{
+ return (compareToOtherMaterialID(pOtherMaterialID) != 0);
+}
+
+LLMaterialID& LLMaterialID::operator = (const LLMaterialID& pOtherMaterialID)
+{
+ copyFromOtherMaterialID(pOtherMaterialID);
+ return (*this);
+}
+
+bool LLMaterialID::isNull() const
+{
+ return (compareToOtherMaterialID(LLMaterialID::null) == 0);
+}
+
+const U8* LLMaterialID::get() const
+{
+ return mID;
+}
+
+void LLMaterialID::set(const void* pMemory)
+{
+ llassert(pMemory != NULL);
+
+ // assumes that the required size of memory is available
+ memcpy(mID, pMemory, MATERIAL_ID_SIZE * sizeof(U8));
+}
+
+void LLMaterialID::clear()
+{
+ memset(mID, 0, MATERIAL_ID_SIZE * sizeof(U8));
+}
+
+void LLMaterialID::parseFromBinary (const LLSD::Binary& pMaterialID)
+{
+ llassert(pMaterialID.size() == (MATERIAL_ID_SIZE * sizeof(U8)));
+ memcpy(mID, &pMaterialID[0], MATERIAL_ID_SIZE * sizeof(U8));
+}
+
+void LLMaterialID::copyFromOtherMaterialID(const LLMaterialID& pOtherMaterialID)
+{
+ memcpy(mID, pOtherMaterialID.mID, MATERIAL_ID_SIZE * sizeof(U8));
+}
+
+int LLMaterialID::compareToOtherMaterialID(const LLMaterialID& pOtherMaterialID) const
+{
+ return memcmp(mID, pOtherMaterialID.mID, MATERIAL_ID_SIZE * sizeof(U8));
+}
diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h
new file mode 100644
index 0000000000..4551550db5
--- /dev/null
+++ b/indra/llprimitive/llmaterialid.h
@@ -0,0 +1,62 @@
+/**
+* @file llmaterialid.h
+* @brief Header file for llmaterialid
+* @author Stinson@lindenlab.com
+*
+* $LicenseInfo:firstyear=2012&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_LLMATERIALID_H
+#define LL_LLMATERIALID_H
+
+#define MATERIAL_ID_SIZE 16
+
+class LLMaterialID
+{
+public:
+ LLMaterialID();
+ LLMaterialID(const LLSD& pMaterialID);
+ LLMaterialID(const LLSD::Binary& pMaterialID);
+ LLMaterialID(const LLMaterialID& pOtherMaterialID);
+ ~LLMaterialID();
+
+ bool operator == (const LLMaterialID& pOtherMaterialID) const;
+ bool operator != (const LLMaterialID& pOtherMaterialID) const;
+ LLMaterialID& operator = (const LLMaterialID& pOtherMaterialID);
+
+ bool isNull() const;
+
+ const U8* get() const;
+ void set(const void* pMemory);
+ void clear();
+
+ static const LLMaterialID null;
+
+private:
+ void parseFromBinary(const LLSD::Binary& pMaterialID);
+ void copyFromOtherMaterialID(const LLMaterialID& pOtherMaterialID);
+ int compareToOtherMaterialID(const LLMaterialID& pOtherMaterialID) const;
+
+ U8 mID[MATERIAL_ID_SIZE];
+} ;
+
+#endif // LL_LLMATERIALID_H
+
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 6dee192783..86aa371368 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -39,6 +39,7 @@
#include "lldatapacker.h"
#include "llsdutil_math.h"
#include "llprimtexturelist.h"
+#include "llmaterialid.h"
/**
* exported constants
@@ -366,6 +367,11 @@ S32 LLPrimitive::setTEGlow(const U8 index, const F32 glow)
return mTextureList.setGlow(index, glow);
}
+S32 LLPrimitive::setTEMaterialID(const U8 index, const LLMaterialID& pMaterialID)
+{
+ return mTextureList.setMaterialID(index, pMaterialID);
+}
+
LLPCode LLPrimitive::legacyToPCode(const U8 legacy)
{
@@ -1091,6 +1097,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
U8 bump[MAX_TES];
U8 media_flags[MAX_TES];
U8 glow[MAX_TES];
+ U8 material_data[MAX_TES*16];
const U32 MAX_TE_BUFFER = 4096;
U8 packed_buffer[MAX_TE_BUFFER];
@@ -1128,6 +1135,9 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
bump[face_index] = te->getBumpShinyFullbright();
media_flags[face_index] = te->getMediaTexGen();
glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
+
+ // Directly sending material_ids is not safe!
+ memcpy(&material_data[face_index*16],getTE(face_index)->getMaterialID().get(),16); /* Flawfinder: ignore */
}
cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID);
@@ -1149,6 +1159,8 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8);
*cur_ptr++ = 0;
cur_ptr += packTEField(cur_ptr, (U8 *)glow, 1 ,last_face_index, MVT_U8);
+ *cur_ptr++ = 0;
+ cur_ptr += packTEField(cur_ptr, (U8 *)material_data, 16, last_face_index, MVT_LLUUID);
}
mesgsys->addBinaryDataFast(_PREHASH_TextureEntry, packed_buffer, (S32)(cur_ptr - packed_buffer));
@@ -1170,6 +1182,7 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
U8 bump[MAX_TES];
U8 media_flags[MAX_TES];
U8 glow[MAX_TES];
+ U8 material_data[MAX_TES*16];
const U32 MAX_TE_BUFFER = 4096;
U8 packed_buffer[MAX_TE_BUFFER];
@@ -1207,6 +1220,9 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
bump[face_index] = te->getBumpShinyFullbright();
media_flags[face_index] = te->getMediaTexGen();
glow[face_index] = (U8) llround((llclamp(te->getGlow(), 0.0f, 1.0f) * (F32)0xFF));
+
+ // Directly sending material_ids is not safe!
+ memcpy(&material_data[face_index*16],getTE(face_index)->getMaterialID().get(),16); /* Flawfinder: ignore */
}
cur_ptr += packTEField(cur_ptr, (U8 *)image_ids, sizeof(LLUUID),last_face_index, MVT_LLUUID);
@@ -1228,6 +1244,8 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
cur_ptr += packTEField(cur_ptr, (U8 *)media_flags, 1 ,last_face_index, MVT_U8);
*cur_ptr++ = 0;
cur_ptr += packTEField(cur_ptr, (U8 *)glow, 1 ,last_face_index, MVT_U8);
+ *cur_ptr++ = 0;
+ cur_ptr += packTEField(cur_ptr, (U8 *)material_data, 16, last_face_index, MVT_LLUUID);
}
dp.packBinaryData(packed_buffer, (S32)(cur_ptr - packed_buffer), "TextureEntry");
@@ -1246,6 +1264,7 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_nam
const U32 MAX_TES = 32;
// Avoid construction of 32 UUIDs per call. JC
+ static LLMaterialID material_ids[MAX_TES];
U8 image_data[MAX_TES*16];
U8 colors[MAX_TES*4];
@@ -1257,6 +1276,7 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_nam
U8 bump[MAX_TES];
U8 media_flags[MAX_TES];
U8 glow[MAX_TES];
+ U8 material_data[MAX_TES*16];
const U32 MAX_TE_BUFFER = 4096;
U8 packed_buffer[MAX_TE_BUFFER];
@@ -1309,6 +1329,13 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_nam
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8);
cur_ptr++;
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8);
+ cur_ptr++;
+ cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)material_data, 16, face_count, MVT_LLUUID);
+
+ for (U32 i = 0; i < face_count; i++)
+ {
+ material_ids[i].set(&material_data[i * 16]);
+ }
LLColor4 color;
LLColor4U coloru;
@@ -1321,6 +1348,7 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_nam
retval |= setTEBumpShinyFullbright(i, bump[i]);
retval |= setTEMediaTexGen(i, media_flags[i]);
retval |= setTEGlow(i, (F32)glow[i] / (F32)0xFF);
+ retval |= setTEMaterialID(i, material_ids[i]);
coloru = LLColor4U(colors + 4*i);
// Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
@@ -1346,6 +1374,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
// Avoid construction of 32 UUIDs per call
static LLUUID image_ids[MAX_TES];
+ static LLMaterialID material_ids[MAX_TES];
U8 image_data[MAX_TES*16];
U8 colors[MAX_TES*4];
@@ -1357,6 +1386,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
U8 bump[MAX_TES];
U8 media_flags[MAX_TES];
U8 glow[MAX_TES];
+ U8 material_data[MAX_TES*16];
const U32 MAX_TE_BUFFER = 4096;
U8 packed_buffer[MAX_TE_BUFFER];
@@ -1399,10 +1429,13 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8);
cur_ptr++;
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8);
+ cur_ptr++;
+ cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)material_data, 16, face_count, MVT_LLUUID);
for (i = 0; i < face_count; i++)
{
memcpy(image_ids[i].mData,&image_data[i*16],16); /* Flawfinder: ignore */
+ material_ids[i].set(&material_data[i * 16]);
}
LLColor4 color;
@@ -1416,6 +1449,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
retval |= setTEBumpShinyFullbright(i, bump[i]);
retval |= setTEMediaTexGen(i, media_flags[i]);
retval |= setTEGlow(i, (F32)glow[i] / (F32)0xFF);
+ retval |= setTEMaterialID(i, material_ids[i]);
coloru = LLColor4U(colors + 4*i);
// Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 8dcaa8c740..e1635740ef 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -42,6 +42,7 @@ class LLMessageSystem;
class LLVolumeParams;
class LLColor4;
class LLColor3;
+class LLMaterialID;
class LLTextureEntry;
class LLDataPacker;
class LLVolumeMgr;
@@ -353,6 +354,7 @@ public:
virtual S32 setTEFullbright(const U8 te, const U8 fullbright);
virtual S32 setTEMediaFlags(const U8 te, const U8 flags);
virtual S32 setTEGlow(const U8 te, const F32 glow);
+ virtual S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID);
virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed
void copyTEs(const LLPrimitive *primitive);
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index 36e04df7b7..20438578b3 100644
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
@@ -27,6 +27,7 @@
#include "linden_common.h"
#include "llprimtexturelist.h"
+#include "llmaterialid.h"
#include "lltextureentry.h"
#include "llmemtype.h"
@@ -359,6 +360,15 @@ S32 LLPrimTextureList::setGlow(const U8 index, const F32 glow)
return TEM_CHANGE_NONE;
}
+S32 LLPrimTextureList::setMaterialID(const U8 index, const LLMaterialID& pMaterialID)
+{
+ if (index < mEntryList.size())
+ {
+ return mEntryList[index]->setMaterialID(pMaterialID);
+ }
+ return TEM_CHANGE_NONE;
+}
+
S32 LLPrimTextureList::size() const
{
return mEntryList.size();
diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h
index 3cfa52f1d5..691df44c18 100644
--- a/indra/llprimitive/llprimtexturelist.h
+++ b/indra/llprimitive/llprimtexturelist.h
@@ -34,6 +34,7 @@
class LLTextureEntry;
+class LLMaterialID;
// this is a list of LLTextureEntry*'s because in practice the list's elements
// are of some derived class: LLFooTextureEntry
@@ -102,6 +103,7 @@ public:
S32 setFullbright(const U8 index, const U8 t);
S32 setMediaFlags(const U8 index, const U8 media_flags);
S32 setGlow(const U8 index, const F32 glow);
+ S32 setMaterialID(const U8 index, const LLMaterialID& pMaterialID);
S32 size() const;
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 34eff17519..b04fa809d2 100644
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -29,6 +29,7 @@
#include "lluuid.h"
#include "llmediaentry.h"
#include "lltextureentry.h"
+#include "llmaterialid.h"
#include "llsdutil_math.h"
#include "v4color.h"
@@ -83,6 +84,8 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs)
mBump = rhs.mBump;
mMediaFlags = rhs.mMediaFlags;
mGlow = rhs.mGlow;
+ mMaterialID = rhs.mMaterialID;
+
if (rhs.mMediaEntry != NULL) {
// Make a copy
mMediaEntry = new LLMediaEntry(*rhs.mMediaEntry);
@@ -103,6 +106,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs)
mBump = rhs.mBump;
mMediaFlags = rhs.mMediaFlags;
mGlow = rhs.mGlow;
+ mMaterialID = rhs.mMaterialID;
if (mMediaEntry != NULL) {
delete mMediaEntry;
}
@@ -130,6 +134,7 @@ void LLTextureEntry::init(const LLUUID& tex_id, F32 scale_s, F32 scale_t, F32 of
mBump = bump;
mMediaFlags = 0x0;
mGlow = 0;
+ mMaterialID.clear();
setColor(LLColor4(1.f, 1.f, 1.f, 1.f));
if (mMediaEntry != NULL) {
@@ -159,6 +164,7 @@ bool LLTextureEntry::operator!=(const LLTextureEntry &rhs) const
if (mBump != rhs.mBump) return (true);
if (mMediaFlags != rhs.mMediaFlags) return (true);
if (mGlow != rhs.mGlow) return (true);
+ if (mMaterialID != rhs.mMaterialID) return (true);
return(false);
}
@@ -174,6 +180,7 @@ bool LLTextureEntry::operator==(const LLTextureEntry &rhs) const
if (mBump != rhs.mBump) return (false);
if (mMediaFlags != rhs.mMediaFlags) return false;
if (mGlow != rhs.mGlow) return false;
+ if (mMaterialID != rhs.mMaterialID) return (false);
return(true);
}
@@ -523,6 +530,16 @@ S32 LLTextureEntry::setGlow(F32 glow)
return TEM_CHANGE_NONE;
}
+S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID)
+{
+ if (mMaterialID != pMaterialID)
+ {
+ mMaterialID = pMaterialID;
+ return TEM_CHANGE_TEXTURE;
+ }
+ return TEM_CHANGE_NONE;
+}
+
void LLTextureEntry::setMediaData(const LLMediaEntry &media_entry)
{
mMediaFlags |= MF_HAS_MEDIA;
diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h
index 437b85e03f..b681ce8ca7 100644
--- a/indra/llprimitive/lltextureentry.h
+++ b/indra/llprimitive/lltextureentry.h
@@ -30,6 +30,7 @@
#include "lluuid.h"
#include "v4color.h"
#include "llsd.h"
+#include "llmaterialid.h"
// These bits are used while unpacking TEM messages to tell which aspects of
// the texture entry changed.
@@ -121,6 +122,7 @@ public:
S32 setTexGen(U8 texGen);
S32 setMediaTexGen(U8 media);
S32 setGlow(F32 glow);
+ S32 setMaterialID(const LLMaterialID& pMaterialID);
virtual const LLUUID &getID() const { return mID; }
const LLColor4 &getColor() const { return mColor; }
@@ -139,6 +141,7 @@ public:
U8 getTexGen() const { return mMediaFlags & TEM_TEX_GEN_MASK; }
U8 getMediaTexGen() const { return mMediaFlags; }
F32 getGlow() const { return mGlow; }
+ const LLMaterialID& getMaterialID() const { return mMaterialID; };
// *NOTE: it is possible for hasMedia() to return true, but getMediaData() to return NULL.
// CONVERSELY, it is also possible for hasMedia() to return false, but getMediaData()
@@ -193,6 +196,7 @@ protected:
U8 mBump; // Bump map, shiny, and fullbright
U8 mMediaFlags; // replace with web page, movie, etc.
F32 mGlow;
+ LLMaterialID mMaterialID;
// Note the media data is not sent via the same message structure as the rest of the TE
LLMediaEntry* mMediaEntry; // The media data for the face
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 28a14b23b9..eadef93c89 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -291,7 +291,6 @@ void LLVBOPool::seedPool()
-
void LLVBOPool::cleanup()
{
U32 size = LL_VBO_BLOCK_SIZE;
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0031362210..9d379063a5 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -191,6 +191,7 @@ set(viewer_SOURCE_FILES
llfloaterbuyland.cpp
llfloatercamera.cpp
llfloatercolorpicker.cpp
+ llfloaterdebugmaterials.cpp
llfloaterdeleteenvpreset.cpp
llfloaterdestinations.cpp
llfloaterdisplayname.cpp
@@ -767,6 +768,7 @@ set(viewer_HEADER_FILES
llfloaterbuyland.h
llfloatercamera.h
llfloatercolorpicker.h
+ llfloaterdebugmaterials.h
llfloaterdeleteenvpreset.h
llfloaterdestinations.h
llfloaterdisplayname.h
@@ -1564,6 +1566,7 @@ set(PACKAGE ON CACHE BOOL
if (WINDOWS)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
+ # *TODO -reenable this once we get server usage sorted out
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF"
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index b4f6bf9383..313b310e1e 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -411,12 +411,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
continue;
}
- if ((params.mVertexBuffer->getTypeMask() & mask) != mask)
- { //FIXME!
- llwarns << "Missing required components, skipping render batch." << llendl;
- continue;
- }
-
LLRenderPass::applyModelMatrix(params);
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index 7a4d711d4e..c0976d1d43 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -83,6 +83,16 @@ public:
LLDriverParam(LLWearable *wearablep);
~LLDriverParam();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; }
// This sets mInfo and calls initialization functions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4a0c94df33..188f943f13 100644..100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -166,7 +166,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
//special value to indicate uninitialized position
mIndicesIndex = 0xFFFFFFFF;
-
+
+ mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
mTextureIndex = 255;
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 809d344d01..bca4b5e447 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -211,8 +211,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
BOOL item_is_multi = FALSE;
if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
- || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
- && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
+ || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
+ && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
{
item_is_multi = TRUE;
}
diff --git a/indra/newview/llfloaterdebugmaterials.cpp b/indra/newview/llfloaterdebugmaterials.cpp
new file mode 100644
index 0000000000..85a0fc7a2f
--- /dev/null
+++ b/indra/newview/llfloaterdebugmaterials.cpp
@@ -0,0 +1,1525 @@
+/**
+* @file llfloaterdebugmaterials.cpp
+* @brief Implementation of llfloaterdebugmaterials
+* @author Stinson@lindenlab.com
+*
+* $LicenseInfo:firstyear=2012&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 "llfloaterdebugmaterials.h"
+
+#include <string>
+#include <vector>
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+#include <boost/signals2.hpp>
+
+#include "llagent.h"
+#include "llbutton.h"
+#include "llcolorswatch.h"
+#include "llenvmanager.h"
+#include "llfloater.h"
+#include "llfontgl.h"
+#include "llhttpclient.h"
+#include "lllineeditor.h"
+#include "llmaterialid.h"
+#include "llscrolllistcell.h"
+#include "llscrolllistctrl.h"
+#include "llscrolllistitem.h"
+#include "llsd.h"
+#include "llselectmgr.h"
+#include "llstring.h"
+#include "llstyle.h"
+#include "lltextbase.h"
+#include "lltexturectrl.h"
+#include "lltextvalidate.h"
+#include "lluicolortable.h"
+#include "lluictrl.h"
+#include "lluuid.h"
+#include "llviewerobject.h"
+#include "llviewerobjectlist.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
+#include "v4color.h"
+#include "v4coloru.h"
+
+#define MATERIALS_CAPABILITY_NAME "RenderMaterials"
+
+#define MATERIALS_CAP_FULL_PER_FACE_FIELD "FullMaterialsPerFace"
+#define MATERIALS_CAP_FACE_FIELD "Face"
+#define MATERIALS_CAP_MATERIAL_FIELD "Material"
+#define MATERIALS_CAP_OBJECT_ID_FIELD "ID"
+#define MATERIALS_CAP_MATERIAL_ID_FIELD "MaterialID"
+
+#define MATERIALS_CAP_NORMAL_MAP_FIELD "NormMap"
+#define MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD "NormOffsetX"
+#define MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD "NormOffsetY"
+#define MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD "NormRepeatX"
+#define MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD "NormRepeatY"
+#define MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD "NormRotation"
+
+#define MATERIALS_CAP_SPECULAR_MAP_FIELD "SpecMap"
+#define MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD "SpecOffsetX"
+#define MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD "SpecOffsetY"
+#define MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD "SpecRepeatX"
+#define MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD "SpecRepeatY"
+#define MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD "SpecRotation"
+
+#define MATERIALS_CAP_SPECULAR_COLOR_FIELD "SpecColor"
+#define MATERIALS_CAP_SPECULAR_EXP_FIELD "SpecExp"
+#define MATERIALS_CAP_ENV_INTENSITY_FIELD "EnvIntensity"
+#define MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD "AlphaMaskCutoff"
+#define MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD "DiffuseAlphaMode"
+
+class MaterialsResponder : public LLHTTPClient::Responder
+{
+public:
+ typedef boost::function<void (bool, const LLSD&)> CallbackFunction;
+
+ MaterialsResponder(const std::string& pMethod, const std::string& pCapabilityURL, CallbackFunction pCallback);
+ virtual ~MaterialsResponder();
+
+ virtual void result(const LLSD& pContent);
+ virtual void error(U32 pStatus, const std::string& pReason);
+
+protected:
+
+private:
+ std::string mMethod;
+ std::string mCapabilityURL;
+ CallbackFunction mCallback;
+};
+
+BOOL LLFloaterDebugMaterials::postBuild()
+{
+ mStatusText = findChild<LLTextBase>("material_status");
+ llassert(mStatusText != NULL);
+
+ mGetButton = findChild<LLButton>("get_button");
+ llassert(mGetButton != NULL);
+ mGetButton->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onGetClicked, this));
+
+ mGetNormalMapScrollList = findChild<LLScrollListCtrl>("normal_map_attrs_scroll_list");
+ llassert(mGetNormalMapScrollList != NULL);
+
+ mGetSpecularMapScrollList = findChild<LLScrollListCtrl>("specular_map_attrs_scroll_list");
+ llassert(mGetSpecularMapScrollList != NULL);
+
+ mGetOtherDataScrollList = findChild<LLScrollListCtrl>("other_data_scroll_list");
+ llassert(mGetOtherDataScrollList != NULL);
+
+ mNormalMap = findChild<LLTextureCtrl>("normal_map");
+ llassert(mNormalMap != NULL);
+
+ mNormalMapOffsetX = findChild<LLLineEditor>("normal_map_offset_x");
+ llassert(mNormalMapOffsetX != NULL);
+ mNormalMapOffsetX->setPrevalidate(LLTextValidate::validateInt);
+ mNormalMapOffsetX->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mNormalMapOffsetY = findChild<LLLineEditor>("normal_map_offset_y");
+ llassert(mNormalMapOffsetY != NULL);
+ mNormalMapOffsetY->setPrevalidate(LLTextValidate::validateInt);
+ mNormalMapOffsetY->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mNormalMapRepeatX = findChild<LLLineEditor>("normal_map_repeat_x");
+ llassert(mNormalMapRepeatX != NULL);
+ mNormalMapRepeatX->setPrevalidate(LLTextValidate::validateInt);
+ mNormalMapRepeatX->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mNormalMapRepeatY = findChild<LLLineEditor>("normal_map_repeat_y");
+ llassert(mNormalMapRepeatY != NULL);
+ mNormalMapRepeatY->setPrevalidate(LLTextValidate::validateInt);
+ mNormalMapRepeatY->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mNormalMapRotation = findChild<LLLineEditor>("normal_map_rotation");
+ llassert(mNormalMapRotation != NULL);
+ mNormalMapRotation->setPrevalidate(LLTextValidate::validateInt);
+ mNormalMapRotation->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mSpecularMap = findChild<LLTextureCtrl>("specular_map");
+ llassert(mSpecularMap != NULL);
+
+ mSpecularMapOffsetX = findChild<LLLineEditor>("specular_map_offset_x");
+ llassert(mSpecularMapOffsetX != NULL);
+ mSpecularMapOffsetX->setPrevalidate(LLTextValidate::validateInt);
+ mSpecularMapOffsetX->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mSpecularMapOffsetY = findChild<LLLineEditor>("specular_map_offset_y");
+ llassert(mSpecularMapOffsetY != NULL);
+ mSpecularMapOffsetY->setPrevalidate(LLTextValidate::validateInt);
+ mSpecularMapOffsetY->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mSpecularMapRepeatX = findChild<LLLineEditor>("specular_map_repeat_x");
+ llassert(mSpecularMapRepeatX != NULL);
+ mSpecularMapRepeatX->setPrevalidate(LLTextValidate::validateInt);
+ mSpecularMapRepeatX->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mSpecularMapRepeatY = findChild<LLLineEditor>("specular_map_repeat_y");
+ llassert(mSpecularMapRepeatY != NULL);
+ mSpecularMapRepeatY->setPrevalidate(LLTextValidate::validateInt);
+ mSpecularMapRepeatY->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mSpecularMapRotation = findChild<LLLineEditor>("specular_map_rotation");
+ llassert(mSpecularMapRotation != NULL);
+ mSpecularMapRotation->setPrevalidate(LLTextValidate::validateInt);
+ mSpecularMapRotation->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mSpecularColor = findChild<LLColorSwatchCtrl>("specular_color");
+ llassert(mSpecularColor != NULL);
+
+ mSpecularExponent = findChild<LLLineEditor>("specular_exponent");
+ llassert(mSpecularExponent != NULL);
+ mSpecularExponent->setPrevalidate(LLTextValidate::validateInt);
+ mSpecularExponent->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mEnvironmentExponent = findChild<LLLineEditor>("environment_exponent");
+ llassert(mEnvironmentExponent != NULL);
+ mEnvironmentExponent->setPrevalidate(LLTextValidate::validateInt);
+ mEnvironmentExponent->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mAlphaMaskCutoff = findChild<LLLineEditor>("alpha_mask_cutoff");
+ llassert(mAlphaMaskCutoff != NULL);
+ mAlphaMaskCutoff->setPrevalidate(LLTextValidate::validateInt);
+ mAlphaMaskCutoff->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mDiffuseAlphaMode = findChild<LLLineEditor>("diffuse_alpha_mode");
+ llassert(mDiffuseAlphaMode != NULL);
+ mDiffuseAlphaMode->setPrevalidate(LLTextValidate::validateInt);
+ mDiffuseAlphaMode->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onValueEntered, this, _1));
+
+ mPutSetButton = findChild<LLButton>("put_set_button");
+ llassert(mPutSetButton != NULL);
+ mPutSetButton->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onPutSetClicked, this));
+
+ mPutClearButton = findChild<LLButton>("put_clear_button");
+ llassert(mPutClearButton != NULL);
+ mPutClearButton->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onPutClearClicked, this));
+
+ mPutScrollList = findChild<LLScrollListCtrl>("put_scroll_list");
+ llassert(mPutScrollList != NULL);
+
+ mQueryVisibleObjectsButton = findChild<LLButton>("query_visible_object_button");
+ llassert(mQueryVisibleObjectsButton != NULL);
+ mQueryVisibleObjectsButton->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onQueryVisibleObjectsClicked, this));
+
+ mGoodPostButton = findChild<LLButton>("good_post_button");
+ llassert(mGoodPostButton != NULL);
+ mGoodPostButton->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onGoodPostClicked, this));
+
+ mBadPostButton = findChild<LLButton>("bad_post_button");
+ llassert(mBadPostButton != NULL);
+ mBadPostButton->setCommitCallback(boost::bind(&LLFloaterDebugMaterials::onBadPostClicked, this));
+
+ mPostScrollList = findChild<LLScrollListCtrl>("post_scroll_list");
+ llassert(mPostScrollList != NULL);
+
+ mDefaultSpecularColor = LLUIColorTable::instance().getColor("White");
+
+ mWarningColor = LLUIColorTable::instance().getColor("MaterialWarningColor");
+ mErrorColor = LLUIColorTable::instance().getColor("MaterialErrorColor");
+
+ setState(kNoRegion);
+
+ return LLFloater::postBuild();
+}
+
+void LLFloaterDebugMaterials::onOpen(const LLSD& pKey)
+{
+ LLFloater::onOpen(pKey);
+
+ if (!mRegionCrossConnection.connected())
+ {
+ mRegionCrossConnection = LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterDebugMaterials::onRegionCross, this));
+ }
+
+ if (!mTeleportFailedConnection.connected())
+ {
+ mTeleportFailedConnection = LLViewerParcelMgr::getInstance()->setTeleportFailedCallback(boost::bind(&LLFloaterDebugMaterials::onRegionCross, this));
+ }
+
+ if (!mSelectionUpdateConnection.connected())
+ {
+ mSelectionUpdateConnection = LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterDebugMaterials::onInWorldSelectionChange, this));
+ }
+
+ checkRegionMaterialStatus();
+ resetObjectEditInputs();
+ clearGetResults();
+ clearPutResults();
+ clearPostResults();
+}
+
+void LLFloaterDebugMaterials::onClose(bool pIsAppQuitting)
+{
+ resetObjectEditInputs();
+ clearGetResults();
+ clearPutResults();
+ clearPostResults();
+
+ if (mSelectionUpdateConnection.connected())
+ {
+ mSelectionUpdateConnection.disconnect();
+ }
+
+ if (mTeleportFailedConnection.connected())
+ {
+ mTeleportFailedConnection.disconnect();
+ }
+
+ if (mRegionCrossConnection.connected())
+ {
+ mRegionCrossConnection.disconnect();
+ }
+
+ LLFloater::onClose(pIsAppQuitting);
+}
+
+LLFloaterDebugMaterials::LLFloaterDebugMaterials(const LLSD& pParams)
+ : LLFloater(pParams),
+ mStatusText(NULL),
+ mGetButton(NULL),
+ mGetNormalMapScrollList(NULL),
+ mGetSpecularMapScrollList(NULL),
+ mGetOtherDataScrollList(NULL),
+ mNormalMap(NULL),
+ mNormalMapOffsetX(NULL),
+ mNormalMapOffsetY(NULL),
+ mNormalMapRepeatX(NULL),
+ mNormalMapRepeatY(NULL),
+ mNormalMapRotation(NULL),
+ mSpecularMap(NULL),
+ mSpecularMapOffsetX(NULL),
+ mSpecularMapOffsetY(NULL),
+ mSpecularMapRepeatX(NULL),
+ mSpecularMapRepeatY(NULL),
+ mSpecularMapRotation(NULL),
+ mSpecularColor(NULL),
+ mSpecularExponent(NULL),
+ mEnvironmentExponent(NULL),
+ mAlphaMaskCutoff(NULL),
+ mDiffuseAlphaMode(NULL),
+ mPutSetButton(NULL),
+ mPutClearButton(NULL),
+ mPutScrollList(NULL),
+ mQueryVisibleObjectsButton(NULL),
+ mGoodPostButton(NULL),
+ mBadPostButton(NULL),
+ mPostScrollList(NULL),
+ mState(kNoRegion),
+ mWarningColor(),
+ mErrorColor(),
+ mRegionCrossConnection(),
+ mTeleportFailedConnection(),
+ mSelectionUpdateConnection()
+{
+}
+
+LLFloaterDebugMaterials::~LLFloaterDebugMaterials()
+{
+}
+
+void LLFloaterDebugMaterials::onGetClicked()
+{
+ requestGetMaterials();
+}
+
+void LLFloaterDebugMaterials::onValueEntered(LLUICtrl* pUICtrl)
+{
+ LLLineEditor *pLineEditor = static_cast<LLLineEditor *>(pUICtrl);
+ llassert(pLineEditor != NULL);
+
+ const std::string &valueString = pLineEditor->getText();
+
+ S32 intValue = 0;
+ bool doResetValue = (!valueString.empty() && !LLStringUtil::convertToS32(valueString, intValue));
+
+ if (doResetValue)
+ {
+ llwarns << "cannot parse string '" << valueString << "' to an S32 value" <<llendl;
+ LLSD value = static_cast<LLSD::Integer>(intValue);
+ pLineEditor->setValue(value);
+ }
+}
+
+void LLFloaterDebugMaterials::onPutSetClicked()
+{
+ requestPutMaterials(true);
+}
+
+void LLFloaterDebugMaterials::onPutClearClicked()
+{
+ requestPutMaterials(false);
+}
+
+void LLFloaterDebugMaterials::onQueryVisibleObjectsClicked()
+{
+ S32 numViewerObjects = gObjectList.getNumObjects();
+ for (S32 viewerObjectIndex = 0; viewerObjectIndex < numViewerObjects; ++viewerObjectIndex)
+ {
+ const LLViewerObject *viewerObject = gObjectList.getObject(viewerObjectIndex);
+ if ((viewerObject != NULL) && !viewerObject->isDead())
+ {
+ U8 objectNumTEs = viewerObject->getNumTEs();
+
+ if (objectNumTEs > 0U)
+ {
+ const LLUUID& objectId = viewerObject->getID();
+ U32 objectLocalId = viewerObject->getLocalID();
+ S32 objectNumFaces = viewerObject->getNumFaces();
+ const LLViewerRegion* objectRegion = viewerObject->getRegion();
+ for (U8 curTEIndex = 0U; curTEIndex < objectNumTEs; ++curTEIndex)
+ {
+ const LLTextureEntry* objectTE = viewerObject->getTE(curTEIndex);
+ llassert(objectTE != NULL);
+ const LLMaterialID& objectMaterialID = objectTE->getMaterialID();
+ if (!objectMaterialID.isNull())
+ {
+ llinfos << "STINSON DEBUG: #" << (viewerObjectIndex + 1) << ": " << objectId.asString()
+ << " (" << ((objectRegion != NULL) ? objectRegion->getRegionID().asString() : "<null>")
+ << ") [" << objectLocalId << "] {" << static_cast<unsigned int>(curTEIndex)
+ << "} : numFaces(" << objectNumFaces << ") material("
+ << convertToPrintableMaterialID(objectMaterialID) << ")" << llendl;
+ }
+ }
+ }
+
+ }
+ }
+}
+
+void LLFloaterDebugMaterials::onGoodPostClicked()
+{
+ requestPostMaterials(true);
+}
+
+void LLFloaterDebugMaterials::onBadPostClicked()
+{
+ requestPostMaterials(false);
+}
+
+void LLFloaterDebugMaterials::onRegionCross()
+{
+ checkRegionMaterialStatus();
+ clearGetResults();
+ clearPutResults();
+ clearPostResults();
+}
+
+void LLFloaterDebugMaterials::onInWorldSelectionChange()
+{
+ updateControls();
+}
+
+void LLFloaterDebugMaterials::onDeferredCheckRegionMaterialStatus(LLUUID regionId)
+{
+ checkRegionMaterialStatus(regionId);
+}
+
+void LLFloaterDebugMaterials::onDeferredRequestGetMaterials(LLUUID regionId)
+{
+ requestGetMaterials(regionId);
+}
+
+void LLFloaterDebugMaterials::onDeferredRequestPutMaterials(LLUUID regionId, bool pIsDoSet)
+{
+ requestPutMaterials(regionId, pIsDoSet);
+}
+
+void LLFloaterDebugMaterials::onDeferredRequestPostMaterials(LLUUID regionId, bool pUseGoodData)
+{
+ requestPostMaterials(regionId, pUseGoodData);
+}
+
+void LLFloaterDebugMaterials::onGetResponse(bool pRequestStatus, const LLSD& pContent)
+{
+ if (pRequestStatus)
+ {
+ setState(kRequestCompleted);
+ parseGetResponse(pContent);
+ }
+ else
+ {
+ setState(kError);
+ }
+}
+
+void LLFloaterDebugMaterials::onPutResponse(bool pRequestStatus, const LLSD& pContent)
+{
+ if (pRequestStatus)
+ {
+ setState(kRequestCompleted);
+ parsePutResponse(pContent);
+ }
+ else
+ {
+ setState(kError);
+ }
+}
+
+void LLFloaterDebugMaterials::onPostResponse(bool pRequestStatus, const LLSD& pContent)
+{
+ if (pRequestStatus)
+ {
+ setState(kRequestCompleted);
+ parsePostResponse(pContent);
+ }
+ else
+ {
+ setState(kError);
+ }
+}
+
+void LLFloaterDebugMaterials::checkRegionMaterialStatus()
+{
+ LLViewerRegion *region = gAgent.getRegion();
+
+ if (region == NULL)
+ {
+ llwarns << "Region is NULL" << llendl;
+ setState(kNoRegion);
+ }
+ else if (!region->capabilitiesReceived())
+ {
+ setState(kCapabilitiesLoading);
+ region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterDebugMaterials::onDeferredCheckRegionMaterialStatus, this, region->getRegionID()));
+ }
+ else
+ {
+ std::string capURL = region->getCapability(MATERIALS_CAPABILITY_NAME);
+
+ if (capURL.empty())
+ {
+ llwarns << "Capability '" << MATERIALS_CAPABILITY_NAME << "' is not defined on the current region '"
+ << region->getName() << "'" << llendl;
+ setState(kNotEnabled);
+ }
+ else
+ {
+ setState(kReady);
+ }
+ }
+}
+
+void LLFloaterDebugMaterials::checkRegionMaterialStatus(const LLUUID& regionId)
+{
+ const LLViewerRegion *region = gAgent.getRegion();
+
+ if ((region != NULL) && (region->getRegionID() == regionId))
+ {
+ checkRegionMaterialStatus();
+ }
+}
+
+void LLFloaterDebugMaterials::requestGetMaterials()
+{
+ LLViewerRegion *region = gAgent.getRegion();
+
+ if (region == NULL)
+ {
+ llwarns << "Region is NULL" << llendl;
+ setState(kNoRegion);
+ }
+ else if (!region->capabilitiesReceived())
+ {
+ setState(kCapabilitiesLoading);
+ region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterDebugMaterials::onDeferredRequestGetMaterials, this, region->getRegionID()));
+ }
+ else
+ {
+ std::string capURL = region->getCapability(MATERIALS_CAPABILITY_NAME);
+
+ if (capURL.empty())
+ {
+ llwarns << "Capability '" << MATERIALS_CAPABILITY_NAME << "' is not defined on the current region '"
+ << region->getName() << "'" << llendl;
+ setState(kNotEnabled);
+ }
+ else
+ {
+ setState(kRequestStarted);
+ LLHTTPClient::ResponderPtr materialsResponder = new MaterialsResponder("GET", capURL, boost::bind(&LLFloaterDebugMaterials::onGetResponse, this, _1, _2));
+ llinfos << "STINSON DEBUG: sending request GET to capability '" << MATERIALS_CAPABILITY_NAME
+ << "' with url '" << capURL << "'" << llendl;
+ LLHTTPClient::get(capURL, materialsResponder);
+ }
+ }
+}
+
+void LLFloaterDebugMaterials::requestGetMaterials(const LLUUID& regionId)
+{
+ const LLViewerRegion *region = gAgent.getRegion();
+
+ if ((region != NULL) && (region->getRegionID() == regionId))
+ {
+ requestGetMaterials();
+ }
+}
+
+void LLFloaterDebugMaterials::requestPutMaterials(bool pIsDoSet)
+{
+ LLViewerRegion *region = gAgent.getRegion();
+
+ if (region == NULL)
+ {
+ llwarns << "Region is NULL" << llendl;
+ setState(kNoRegion);
+ }
+ else if (!region->capabilitiesReceived())
+ {
+ setState(kCapabilitiesLoading);
+ region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterDebugMaterials::onDeferredRequestPutMaterials, this, region->getRegionID(), pIsDoSet));
+ }
+ else
+ {
+ std::string capURL = region->getCapability(MATERIALS_CAPABILITY_NAME);
+
+ if (capURL.empty())
+ {
+ llwarns << "Capability '" << MATERIALS_CAPABILITY_NAME << "' is not defined on the current region '"
+ << region->getName() << "'" << llendl;
+ setState(kNotEnabled);
+ }
+ else
+ {
+ setState(kRequestStarted);
+
+ LLSD facesData = LLSD::emptyArray();
+
+
+ LLObjectSelectionHandle selectionHandle = LLSelectMgr::getInstance()->getEditSelection();
+ for (LLObjectSelection::valid_iterator objectIter = selectionHandle->valid_begin();
+ objectIter != selectionHandle->valid_end(); ++objectIter)
+ {
+ LLSelectNode* objectNode = *objectIter;
+ LLViewerObject* viewerObject = objectNode->getObject();
+
+ S32 numFaces = viewerObject->getNumFaces();
+ for (S32 curFaceIndex = 0; curFaceIndex < numFaces; ++curFaceIndex)
+ {
+ LLSD materialData = LLSD::emptyMap();
+
+ materialData[MATERIALS_CAP_NORMAL_MAP_FIELD] = mNormalMap->getImageAssetID();
+ materialData[MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD] = static_cast<LLSD::Integer>(getNormalMapOffsetX());
+ materialData[MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD] = static_cast<LLSD::Integer>(getNormalMapOffsetY());
+ materialData[MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD] = static_cast<LLSD::Integer>(getNormalMapRepeatX());
+ materialData[MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD] = static_cast<LLSD::Integer>(getNormalMapRepeatY());
+ materialData[MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD] = static_cast<LLSD::Integer>(getNormalMapRotation());
+
+ materialData[MATERIALS_CAP_SPECULAR_MAP_FIELD] = mSpecularMap->getImageAssetID();
+ materialData[MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD] = static_cast<LLSD::Integer>(getSpecularMapOffsetX());
+ materialData[MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD] = static_cast<LLSD::Integer>(getSpecularMapOffsetY());
+ materialData[MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD] = static_cast<LLSD::Integer>(getSpecularMapRepeatX());
+ materialData[MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD] = static_cast<LLSD::Integer>(getSpecularMapRepeatY());
+ materialData[MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD] = static_cast<LLSD::Integer>(getSpecularMapRotation());
+
+ const LLColor4& specularColor = mSpecularColor->get();
+ LLColor4U specularColor4U = specularColor;
+ materialData[MATERIALS_CAP_SPECULAR_COLOR_FIELD] = specularColor4U.getValue();
+
+ materialData[MATERIALS_CAP_SPECULAR_EXP_FIELD] = static_cast<LLSD::Integer>(getSpecularExponent());
+ materialData[MATERIALS_CAP_ENV_INTENSITY_FIELD] = static_cast<LLSD::Integer>(getEnvironmentExponent());
+ materialData[MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD] = static_cast<LLSD::Integer>(getAlphMaskCutoff());
+ materialData[MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD] = static_cast<LLSD::Integer>(getDiffuseAlphaMode());
+
+ LLSD faceData = LLSD::emptyMap();
+ faceData[MATERIALS_CAP_FACE_FIELD] = static_cast<LLSD::Integer>(curFaceIndex);
+ faceData[MATERIALS_CAP_OBJECT_ID_FIELD] = static_cast<LLSD::Integer>(viewerObject->getLocalID());
+ if (pIsDoSet)
+ {
+ faceData[MATERIALS_CAP_MATERIAL_FIELD] = materialData;
+ }
+ facesData.append(faceData);
+ }
+ }
+
+ LLSD putData = LLSD::emptyMap();
+ putData[MATERIALS_CAP_FULL_PER_FACE_FIELD] = facesData;
+
+ LLHTTPClient::ResponderPtr materialsResponder = new MaterialsResponder("PUT", capURL, boost::bind(&LLFloaterDebugMaterials::onPutResponse, this, _1, _2));
+ llinfos << "STINSON DEBUG: sending request PUT to capability '" << MATERIALS_CAPABILITY_NAME
+ << "' with url '" << capURL << "' and with data " << putData << llendl;
+ LLHTTPClient::put(capURL, putData, materialsResponder);
+ }
+ }
+}
+
+void LLFloaterDebugMaterials::requestPutMaterials(const LLUUID& regionId, bool pIsDoSet)
+{
+ const LLViewerRegion *region = gAgent.getRegion();
+
+ if ((region != NULL) && (region->getRegionID() == regionId))
+ {
+ requestPutMaterials(pIsDoSet);
+ }
+}
+
+void LLFloaterDebugMaterials::requestPostMaterials(bool pUseGoodData)
+{
+#if 0
+ LLViewerRegion *region = gAgent.getRegion();
+
+ if (region == NULL)
+ {
+ llwarns << "Region is NULL" << llendl;
+ setState(kNoRegion);
+ }
+ else if (!region->capabilitiesReceived())
+ {
+ setState(kCapabilitiesLoading);
+ region->setCapabilitiesReceivedCallback(boost::bind(&LLFloaterDebugMaterials::onDeferredRequestPostMaterials, this, region->getRegionID(), pUseGoodData));
+ }
+ else
+ {
+ std::string capURL = region->getCapability(MATERIALS_CAPABILITY_NAME);
+
+ if (capURL.empty())
+ {
+ llwarns << "Capability '" << MATERIALS_CAPABILITY_NAME << "' is not defined on the current region '"
+ << region->getName() << "'" << llendl;
+ setState(kNotEnabled);
+ }
+ else
+ {
+ setState(kRequestStarted);
+ LLSD postData = LLSD::emptyArray();
+
+ if (pUseGoodData)
+ {
+ std::vector<LLScrollListItem*> selectedItems = mGetScrollList->getAllSelected();
+ for (std::vector<LLScrollListItem*>::const_iterator selectedItemIter = selectedItems.begin();
+ selectedItemIter != selectedItems.end(); ++selectedItemIter)
+ {
+ const LLScrollListItem* selectedItem = *selectedItemIter;
+ postData.append(selectedItem->getValue());
+ }
+ }
+ else
+ {
+ S32 crapArray[4];
+ for (int i = 0; i < 4; ++i)
+ {
+ crapArray[i] = ll_rand();
+ if (ll_frand() < 0.5)
+ {
+ crapArray[i] = -crapArray[i];
+ }
+ }
+
+ std::vector<unsigned char> crapMem;
+ crapMem.resize(16);
+ memcpy(&crapMem[0], &crapArray, 16 * sizeof(unsigned char));
+
+ LLSD::Binary crapBinary = crapMem;
+ LLSD crapData = crapBinary;
+ postData.append(crapData);
+ }
+
+ LLHTTPClient::ResponderPtr materialsResponder = new MaterialsResponder("POST", capURL, boost::bind(&LLFloaterDebugMaterials::onPostResponse, this, _1, _2));
+ llinfos << "STINSON DEBUG: sending request POST to capability '" << MATERIALS_CAPABILITY_NAME
+ << "' with url '" << capURL << "' and with data " << postData << llendl;
+ LLHTTPClient::post(capURL, postData, materialsResponder);
+ }
+ }
+#endif
+}
+
+void LLFloaterDebugMaterials::requestPostMaterials(const LLUUID& regionId, bool pUseGoodData)
+{
+ const LLViewerRegion *region = gAgent.getRegion();
+
+ if ((region != NULL) && (region->getRegionID() == regionId))
+ {
+ requestPostMaterials(pUseGoodData);
+ }
+}
+
+void LLFloaterDebugMaterials::parseGetResponse(const LLSD& pContent)
+{
+ printResponse("GET", pContent);
+ clearGetResults();
+
+ LLScrollListCell::Params cellParams;
+ LLScrollListItem::Params normalMapRowParams;
+ LLScrollListItem::Params specularMapRowParams;
+ LLScrollListItem::Params otherDataRowParams;
+
+ llassert(pContent.isArray());
+ for (LLSD::array_const_iterator materialIter = pContent.beginArray(); materialIter != pContent.endArray();
+ ++materialIter)
+ {
+ const LLSD &material = *materialIter;
+ llassert(material.isMap());
+ llassert(material.has(MATERIALS_CAP_OBJECT_ID_FIELD));
+ llassert(material.get(MATERIALS_CAP_OBJECT_ID_FIELD).isBinary());
+ const LLSD &materialID = material.get(MATERIALS_CAP_OBJECT_ID_FIELD);
+ std::string materialIDString = convertToPrintableMaterialID(materialID);
+
+ llassert(material.has(MATERIALS_CAP_MATERIAL_FIELD));
+ const LLSD &materialData = material.get(MATERIALS_CAP_MATERIAL_FIELD);
+ llassert(materialData.isMap());
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_FIELD).isUUID());
+ const LLUUID &normalMapID = materialData.get(MATERIALS_CAP_NORMAL_MAP_FIELD).asUUID();
+
+#ifndef NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ bool hasExtraData = materialData.has(MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD);
+ S32 normalMapOffsetX = 0;
+ S32 normalMapOffsetY = 0;
+ S32 normalMapRepeatX = 0;
+ S32 normalMapRepeatY = 0;
+ S32 normalMapRotation = 0;
+
+ if (hasExtraData)
+ {
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD).isInteger());
+ normalMapOffsetX = materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD).isInteger());
+ normalMapOffsetY = materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD).isInteger());
+ normalMapRepeatX = materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD).isInteger());
+ normalMapRepeatY = materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD).isInteger());
+ normalMapRotation = materialData.get(MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD).asInteger();
+ }
+#else // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD).isInteger());
+ S32 normalMapOffsetX = materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD).isInteger());
+ S32 normalMapOffsetY = materialData.get(MATERIALS_CAP_NORMAL_MAP_OFFSET_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD).isInteger());
+ S32 normalMapRepeatX = materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD).isInteger());
+ S32 normalMapRepeatY = materialData.get(MATERIALS_CAP_NORMAL_MAP_REPEAT_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD).isInteger());
+ S32 normalMapRotation = materialData.get(MATERIALS_CAP_NORMAL_MAP_ROTATION_FIELD).asInteger();
+#endif // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_FIELD).isUUID());
+ const LLUUID &specularMapID = materialData.get(MATERIALS_CAP_SPECULAR_MAP_FIELD).asUUID();
+
+#ifndef NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ S32 specularMapOffsetX = 0;
+ S32 specularMapOffsetY = 0;
+ S32 specularMapRepeatX = 0;
+ S32 specularMapRepeatY = 0;
+ S32 specularMapRotation = 0;
+
+ if (hasExtraData)
+ {
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD).isInteger());
+ specularMapOffsetX = materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD).isInteger());
+ specularMapOffsetY = materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD).isInteger());
+ specularMapRepeatX = materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD).isInteger());
+ specularMapRepeatY = materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD).isInteger());
+ specularMapRotation = materialData.get(MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD).asInteger();
+ }
+#else // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD).isInteger());
+ S32 specularMapOffsetX = materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD).isInteger());
+ S32 specularMapOffsetY = materialData.get(MATERIALS_CAP_SPECULAR_MAP_OFFSET_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD).isInteger());
+ S32 specularMapRepeatX = materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_X_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD).isInteger());
+ S32 specularMapRepeatY = materialData.get(MATERIALS_CAP_SPECULAR_MAP_REPEAT_Y_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD).isInteger());
+ S32 specularMapRotation = materialData.get(MATERIALS_CAP_SPECULAR_MAP_ROTATION_FIELD).asInteger();
+#endif // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_COLOR_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_COLOR_FIELD).isArray());
+ LLColor4U specularColor;
+ specularColor.setValue(materialData.get(MATERIALS_CAP_SPECULAR_COLOR_FIELD));
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_EXP_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_EXP_FIELD).isInteger());
+ S32 specularExp = materialData.get(MATERIALS_CAP_SPECULAR_EXP_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_ENV_INTENSITY_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_ENV_INTENSITY_FIELD).isInteger());
+ S32 envIntensity = materialData.get(MATERIALS_CAP_ENV_INTENSITY_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).isInteger());
+ S32 alphaMaskCutoff = materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).isInteger());
+ S32 diffuseAlphaMode = materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).asInteger();
+
+ cellParams.font = LLFontGL::getFontMonospace();
+
+ cellParams.column = "id";
+ cellParams.value = materialIDString;
+ normalMapRowParams.columns.add(cellParams);
+ specularMapRowParams.columns.add(cellParams);
+ otherDataRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list";
+ cellParams.value = normalMapID.asString();
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.font = LLFontGL::getFontSansSerif();
+
+#ifndef NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ if (hasExtraData)
+ {
+ cellParams.column = "normal_map_list_offset_x";
+ cellParams.value = llformat("%d", normalMapOffsetX);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_offset_y";
+ cellParams.value = llformat("%d", normalMapOffsetY);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_repeat_x";
+ cellParams.value = llformat("%d", normalMapRepeatX);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_repeat_y";
+ cellParams.value = llformat("%d", normalMapRepeatY);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_rotation";
+ cellParams.value = llformat("%d", normalMapRotation);
+ normalMapRowParams.columns.add(cellParams);
+ }
+ else
+ {
+ cellParams.column = "normal_map_list_offset_x";
+ cellParams.value = "--";
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_offset_y";
+ cellParams.value = "--";
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_repeat_x";
+ cellParams.value = "--";
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_repeat_y";
+ cellParams.value = "--";
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_rotation";
+ cellParams.value = "--";
+ normalMapRowParams.columns.add(cellParams);
+ }
+#else // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ cellParams.column = "normal_map_list_offset_x";
+ cellParams.value = llformat("%d", normalMapOffsetX);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_offset_y";
+ cellParams.value = llformat("%d", normalMapOffsetY);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_repeat_x";
+ cellParams.value = llformat("%d", normalMapRepeatX);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_repeat_y";
+ cellParams.value = llformat("%d", normalMapRepeatY);
+ normalMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map_list_rotation";
+ cellParams.value = llformat("%d", normalMapRotation);
+ normalMapRowParams.columns.add(cellParams);
+#endif // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+
+ cellParams.font = LLFontGL::getFontMonospace();
+
+ cellParams.column = "specular_map_list";
+ cellParams.value = specularMapID.asString();
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.font = LLFontGL::getFontSansSerif();
+
+#ifndef NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ if (hasExtraData)
+ {
+ cellParams.column = "specular_map_list_offset_x";
+ cellParams.value = llformat("%d", specularMapOffsetX);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_offset_y";
+ cellParams.value = llformat("%d", specularMapOffsetY);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_repeat_x";
+ cellParams.value = llformat("%d", specularMapRepeatX);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_repeat_y";
+ cellParams.value = llformat("%d", specularMapRepeatY);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_rotation";
+ cellParams.value = llformat("%d", specularMapRotation);
+ specularMapRowParams.columns.add(cellParams);
+ }
+ else
+ {
+ cellParams.column = "specular_map_list_offset_x";
+ cellParams.value = "--";
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_offset_y";
+ cellParams.value = "--";
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_repeat_x";
+ cellParams.value = "--";
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_repeat_y";
+ cellParams.value = "--";
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_rotation";
+ cellParams.value = "--";
+ specularMapRowParams.columns.add(cellParams);
+ }
+#else // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+ cellParams.column = "specular_map_list_offset_x";
+ cellParams.value = llformat("%d", specularMapOffsetX);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_offset_y";
+ cellParams.value = llformat("%d", specularMapOffsetY);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_repeat_x";
+ cellParams.value = llformat("%d", specularMapRepeatX);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_repeat_y";
+ cellParams.value = llformat("%d", specularMapRepeatY);
+ specularMapRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map_list_rotation";
+ cellParams.value = llformat("%d", specularMapRotation);
+ specularMapRowParams.columns.add(cellParams);
+#endif // NEW_DATA_FIELDS_DEPLOYED_TO_SERVER
+
+ cellParams.column = "specular_color";
+ cellParams.value = llformat("(%d, %d, %d, %d)", specularColor.mV[0],
+ specularColor.mV[1], specularColor.mV[2], specularColor.mV[3]);
+ otherDataRowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_exponent";
+ cellParams.value = llformat("%d", specularExp);
+ otherDataRowParams.columns.add(cellParams);
+
+ cellParams.column = "env_intensity";
+ cellParams.value = llformat("%d", envIntensity);
+ otherDataRowParams.columns.add(cellParams);
+
+ cellParams.column = "alpha_mask_cutoff";
+ cellParams.value = llformat("%d", alphaMaskCutoff);
+ otherDataRowParams.columns.add(cellParams);
+
+ cellParams.column = "diffuse_alpha_mode";
+ cellParams.value = llformat("%d", diffuseAlphaMode);
+ otherDataRowParams.columns.add(cellParams);
+
+ normalMapRowParams.value = materialID;
+ specularMapRowParams.value = materialID;
+ otherDataRowParams.value = materialID;
+
+ mGetNormalMapScrollList->addRow(normalMapRowParams);
+ mGetSpecularMapScrollList->addRow(specularMapRowParams);
+ mGetOtherDataScrollList->addRow(otherDataRowParams);
+ }
+}
+
+void LLFloaterDebugMaterials::parsePutResponse(const LLSD& pContent)
+{
+ printResponse("PUT", pContent);
+ clearPutResults();
+
+ LLScrollListCell::Params cellParams;
+ LLScrollListItem::Params rowParams;
+
+ llassert(pContent.isArray());
+ for (LLSD::array_const_iterator faceIter = pContent.beginArray(); faceIter != pContent.endArray();
+ ++faceIter)
+ {
+ const LLSD &face = *faceIter;
+ llassert(face.isMap());
+
+ llassert(face.has(MATERIALS_CAP_FACE_FIELD));
+ llassert(face.get(MATERIALS_CAP_FACE_FIELD).isInteger());
+ S32 faceId = face.get(MATERIALS_CAP_FACE_FIELD).asInteger();
+
+ llassert(face.has(MATERIALS_CAP_OBJECT_ID_FIELD));
+ llassert(face.get(MATERIALS_CAP_OBJECT_ID_FIELD).isInteger());
+ S32 objectId = face.get(MATERIALS_CAP_OBJECT_ID_FIELD).asInteger();
+
+ llassert(face.has(MATERIALS_CAP_MATERIAL_ID_FIELD));
+ llassert(face.get(MATERIALS_CAP_MATERIAL_ID_FIELD).isBinary());
+ std::string materialIDString = convertToPrintableMaterialID(face.get(MATERIALS_CAP_MATERIAL_ID_FIELD));
+
+ cellParams.font = LLFontGL::getFontMonospace();
+
+ cellParams.column = "material_id";
+ cellParams.value = materialIDString;
+ rowParams.columns.add(cellParams);
+
+ cellParams.font = LLFontGL::getFontSansSerif();
+
+ cellParams.column = "object_id";
+ cellParams.value = llformat("%d", objectId);
+ rowParams.columns.add(cellParams);
+
+ cellParams.column = "face_index";
+ cellParams.value = llformat("%d", faceId);
+ rowParams.columns.add(cellParams);
+
+ mPutScrollList->addRow(rowParams);
+ }
+}
+
+void LLFloaterDebugMaterials::parsePostResponse(const LLSD& pContent)
+{
+ printResponse("POST", pContent);
+ clearPostResults();
+
+ LLScrollListCell::Params cellParams;
+ LLScrollListItem::Params rowParams;
+
+ llassert(pContent.isArray());
+ for (LLSD::array_const_iterator materialIter = pContent.beginArray(); materialIter != pContent.endArray();
+ ++materialIter)
+ {
+ const LLSD &material = *materialIter;
+ llassert(material.isMap());
+ llassert(material.has(MATERIALS_CAP_OBJECT_ID_FIELD));
+ llassert(material.get(MATERIALS_CAP_OBJECT_ID_FIELD).isBinary());
+ const LLSD &materialID = material.get(MATERIALS_CAP_OBJECT_ID_FIELD);
+ std::string materialIDString = convertToPrintableMaterialID(materialID);
+
+ llassert(material.has(MATERIALS_CAP_MATERIAL_FIELD));
+ const LLSD &materialData = material.get(MATERIALS_CAP_MATERIAL_FIELD);
+ llassert(materialData.isMap());
+
+ llassert(materialData.has(MATERIALS_CAP_NORMAL_MAP_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_NORMAL_MAP_FIELD).isUUID());
+ const LLUUID &normalMapID = materialData.get(MATERIALS_CAP_NORMAL_MAP_FIELD).asUUID();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_MAP_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_MAP_FIELD).isUUID());
+ const LLUUID &specularMapID = materialData.get(MATERIALS_CAP_SPECULAR_MAP_FIELD).asUUID();
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_COLOR_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_COLOR_FIELD).isArray());
+ LLColor4U specularColor;
+ specularColor.setValue(materialData.get(MATERIALS_CAP_SPECULAR_COLOR_FIELD));
+
+ llassert(materialData.has(MATERIALS_CAP_SPECULAR_EXP_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_SPECULAR_EXP_FIELD).isInteger());
+ S32 specularExp = materialData.get(MATERIALS_CAP_SPECULAR_EXP_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_ENV_INTENSITY_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_ENV_INTENSITY_FIELD).isInteger());
+ S32 envIntensity = materialData.get(MATERIALS_CAP_ENV_INTENSITY_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).isInteger());
+ S32 alphaMaskCutoff = materialData.get(MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD).asInteger();
+
+ llassert(materialData.has(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD));
+ llassert(materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).isInteger());
+ S32 diffuseAlphaMode = materialData.get(MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD).asInteger();
+
+
+ cellParams.font = LLFontGL::getFontMonospace();
+
+ cellParams.column = "id";
+ cellParams.value = materialIDString;
+ rowParams.columns.add(cellParams);
+
+ cellParams.column = "normal_map";
+ cellParams.value = normalMapID.asString();
+ rowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_map";
+ cellParams.value = specularMapID.asString();
+ rowParams.columns.add(cellParams);
+
+ cellParams.font = LLFontGL::getFontSansSerif();
+
+ cellParams.column = "specular_color";
+ cellParams.value = llformat("(%d, %d, %d, %d)", specularColor.mV[0],
+ specularColor.mV[1], specularColor.mV[2], specularColor.mV[3]);
+ rowParams.columns.add(cellParams);
+
+ cellParams.column = "specular_exponent";
+ cellParams.value = llformat("%d", specularExp);
+ rowParams.columns.add(cellParams);
+
+ cellParams.column = "env_intensity";
+ cellParams.value = llformat("%d", envIntensity);
+ rowParams.columns.add(cellParams);
+
+ cellParams.column = "alpha_mask_cutoff";
+ cellParams.value = llformat("%d", alphaMaskCutoff);
+ rowParams.columns.add(cellParams);
+
+ cellParams.column = "diffuse_alpha_mode";
+ cellParams.value = llformat("%d", diffuseAlphaMode);
+ rowParams.columns.add(cellParams);
+ rowParams.value = materialID;
+
+ mPostScrollList->addRow(rowParams);
+ }
+}
+
+void LLFloaterDebugMaterials::printResponse(const std::string& pRequestType, const LLSD& pContent) const
+{
+ llinfos << "--------------------------------------------------------------------------" << llendl;
+ llinfos << pRequestType << " Response: '" << pContent << "'" << llendl;
+ llinfos << "--------------------------------------------------------------------------" << llendl;
+}
+
+void LLFloaterDebugMaterials::setState(EState pState)
+{
+ mState = pState;
+ updateStatusMessage();
+ updateControls();
+}
+
+void LLFloaterDebugMaterials::resetObjectEditInputs()
+{
+ const LLSD zeroValue = static_cast<LLSD::Integer>(0);
+
+ mNormalMap->clear();
+ mNormalMapOffsetX->setValue(zeroValue);
+ mNormalMapOffsetY->setValue(zeroValue);
+ mNormalMapRepeatX->setValue(zeroValue);
+ mNormalMapRepeatY->setValue(zeroValue);
+ mNormalMapRotation->setValue(zeroValue);
+
+ mSpecularMap->clear();
+ mSpecularMapOffsetX->setValue(zeroValue);
+ mSpecularMapOffsetY->setValue(zeroValue);
+ mSpecularMapRepeatX->setValue(zeroValue);
+ mSpecularMapRepeatY->setValue(zeroValue);
+ mSpecularMapRotation->setValue(zeroValue);
+
+ mSpecularColor->clear();
+ mSpecularExponent->setValue(zeroValue);
+ mEnvironmentExponent->setValue(zeroValue);
+ mAlphaMaskCutoff->setValue(zeroValue);
+ mDiffuseAlphaMode->setValue(zeroValue);
+
+ mSpecularColor->set(mDefaultSpecularColor);
+}
+
+void LLFloaterDebugMaterials::clearGetResults()
+{
+ mGetNormalMapScrollList->deleteAllItems();
+ mGetSpecularMapScrollList->deleteAllItems();
+ mGetOtherDataScrollList->deleteAllItems();
+}
+
+void LLFloaterDebugMaterials::clearPutResults()
+{
+ mPutScrollList->deleteAllItems();
+}
+
+void LLFloaterDebugMaterials::clearPostResults()
+{
+ mPostScrollList->deleteAllItems();
+}
+
+void LLFloaterDebugMaterials::updateStatusMessage()
+{
+ std::string statusText;
+ LLStyle::Params styleParams;
+
+ switch (getState())
+ {
+ case kNoRegion :
+ statusText = getString("status_no_region");
+ styleParams.color = mErrorColor;
+ break;
+ case kCapabilitiesLoading :
+ statusText = getString("status_capabilities_loading");
+ styleParams.color = mWarningColor;
+ break;
+ case kReady :
+ statusText = getString("status_ready");
+ break;
+ case kRequestStarted :
+ statusText = getString("status_request_started");
+ styleParams.color = mWarningColor;
+ break;
+ case kRequestCompleted :
+ statusText = getString("status_request_completed");
+ break;
+ case kNotEnabled :
+ statusText = getString("status_not_enabled");
+ styleParams.color = mErrorColor;
+ break;
+ case kError :
+ statusText = getString("status_error");
+ styleParams.color = mErrorColor;
+ break;
+ default :
+ statusText = getString("status_ready");
+ llassert(0);
+ break;
+ }
+
+ mStatusText->setText((LLStringExplicit)statusText, styleParams);
+}
+
+void LLFloaterDebugMaterials::updateControls()
+{
+ LLObjectSelectionHandle selectionHandle = LLSelectMgr::getInstance()->getEditSelection();
+ bool isPutEnabled = (selectionHandle->valid_begin() != selectionHandle->valid_end());
+
+ bool isGoodPostEnabled = false;
+
+ switch (getState())
+ {
+ case kNoRegion :
+ case kCapabilitiesLoading :
+ case kRequestStarted :
+ case kNotEnabled :
+ mGetButton->setEnabled(FALSE);
+ mPutSetButton->setEnabled(FALSE);
+ mPutClearButton->setEnabled(FALSE);
+ mGoodPostButton->setEnabled(FALSE);
+ mBadPostButton->setEnabled(FALSE);
+ break;
+ case kReady :
+ case kRequestCompleted :
+ case kError :
+ mGetButton->setEnabled(TRUE);
+ mPutSetButton->setEnabled(isPutEnabled);
+ mPutClearButton->setEnabled(isPutEnabled);
+ mGoodPostButton->setEnabled(isGoodPostEnabled);
+ mBadPostButton->setEnabled(TRUE);
+ break;
+ default :
+ mGetButton->setEnabled(TRUE);
+ mPutSetButton->setEnabled(isPutEnabled);
+ mPutClearButton->setEnabled(isPutEnabled);
+ mGoodPostButton->setEnabled(isGoodPostEnabled);
+ mBadPostButton->setEnabled(TRUE);
+ llassert(0);
+ break;
+ }
+}
+
+std::string LLFloaterDebugMaterials::convertToPrintableMaterialID(const LLSD& pBinaryHash) const
+{
+ llassert(pBinaryHash.isBinary());
+ const LLSD::Binary &materialIDValue = pBinaryHash.asBinary();
+ unsigned int valueSize = materialIDValue.size();
+
+ llassert(valueSize == 16);
+ std::string materialID(reinterpret_cast<const char *>(&materialIDValue[0]), valueSize);
+ std::string materialIDString;
+ for (unsigned int i = 0U; i < (valueSize / 4); ++i)
+ {
+ if (i != 0U)
+ {
+ materialIDString += "-";
+ }
+ const U32 *value = reinterpret_cast<const U32*>(&materialID.c_str()[i * 4]);
+ materialIDString += llformat("%08x", *value);
+ }
+ return materialIDString;
+}
+
+std::string LLFloaterDebugMaterials::convertToPrintableMaterialID(const LLMaterialID& pMaterialID) const
+{
+ std::string materialID(reinterpret_cast<const char *>(pMaterialID.get()), 16);
+ std::string materialIDString;
+ for (unsigned int i = 0U; i < 4; ++i)
+ {
+ if (i != 0U)
+ {
+ materialIDString += "-";
+ }
+ const U32 *value = reinterpret_cast<const U32*>(&materialID.c_str()[i * 4]);
+ materialIDString += llformat("%08x", *value);
+ }
+ return materialIDString;
+}
+
+S32 LLFloaterDebugMaterials::getNormalMapOffsetX() const
+{
+ return getLineEditorValue(mNormalMapOffsetX);
+}
+
+S32 LLFloaterDebugMaterials::getNormalMapOffsetY() const
+{
+ return getLineEditorValue(mNormalMapOffsetY);
+}
+
+S32 LLFloaterDebugMaterials::getNormalMapRepeatX() const
+{
+ return getLineEditorValue(mNormalMapRepeatX);
+}
+
+S32 LLFloaterDebugMaterials::getNormalMapRepeatY() const
+{
+ return getLineEditorValue(mNormalMapRepeatY);
+}
+
+S32 LLFloaterDebugMaterials::getNormalMapRotation() const
+{
+ return getLineEditorValue(mNormalMapRotation);
+}
+
+S32 LLFloaterDebugMaterials::getSpecularMapOffsetX() const
+{
+ return getLineEditorValue(mSpecularMapOffsetX);
+}
+
+S32 LLFloaterDebugMaterials::getSpecularMapOffsetY() const
+{
+ return getLineEditorValue(mSpecularMapOffsetY);
+}
+
+S32 LLFloaterDebugMaterials::getSpecularMapRepeatX() const
+{
+ return getLineEditorValue(mSpecularMapRepeatX);
+}
+
+S32 LLFloaterDebugMaterials::getSpecularMapRepeatY() const
+{
+ return getLineEditorValue(mSpecularMapRepeatY);
+}
+
+S32 LLFloaterDebugMaterials::getSpecularMapRotation() const
+{
+ return getLineEditorValue(mSpecularMapRotation);
+}
+
+S32 LLFloaterDebugMaterials::getSpecularExponent() const
+{
+ return getLineEditorValue(mSpecularExponent);
+}
+
+S32 LLFloaterDebugMaterials::getEnvironmentExponent() const
+{
+ return getLineEditorValue(mEnvironmentExponent);
+}
+
+S32 LLFloaterDebugMaterials::getAlphMaskCutoff() const
+{
+ return getLineEditorValue(mAlphaMaskCutoff);
+}
+
+S32 LLFloaterDebugMaterials::getDiffuseAlphaMode() const
+{
+ return getLineEditorValue(mDiffuseAlphaMode);
+}
+
+S32 LLFloaterDebugMaterials::getLineEditorValue(const LLLineEditor *pLineEditor) const
+{
+ S32 value = 0;
+
+ LLStringUtil::convertToS32(pLineEditor->getText(), value);
+
+ return value;
+}
+
+MaterialsResponder::MaterialsResponder(const std::string& pMethod, const std::string& pCapabilityURL, CallbackFunction pCallback)
+ : LLHTTPClient::Responder(),
+ mMethod(pMethod),
+ mCapabilityURL(pCapabilityURL),
+ mCallback(pCallback)
+{
+}
+
+MaterialsResponder::~MaterialsResponder()
+{
+}
+
+void MaterialsResponder::result(const LLSD& pContent)
+{
+ mCallback(true, pContent);
+}
+
+void MaterialsResponder::error(U32 pStatus, const std::string& pReason)
+{
+ llwarns << "--------------------------------------------------------------------------" << llendl;
+ llwarns << mMethod << " Error[" << pStatus << "] cannot access cap '" << MATERIALS_CAPABILITY_NAME
+ << "' with url '" << mCapabilityURL << "' because " << pReason << llendl;
+ llwarns << "--------------------------------------------------------------------------" << llendl;
+
+ LLSD emptyResult;
+ mCallback(false, emptyResult);
+}
diff --git a/indra/newview/llfloaterdebugmaterials.h b/indra/newview/llfloaterdebugmaterials.h
new file mode 100644
index 0000000000..8419535ac0
--- /dev/null
+++ b/indra/newview/llfloaterdebugmaterials.h
@@ -0,0 +1,187 @@
+/**
+* @file llfloaterdebugmaterials.h
+* @brief Header file for llfloaterdebugmaterials
+* @author Stinson@lindenlab.com
+*
+* $LicenseInfo:firstyear=2012&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_LLFLOATERDEBUGMATERIALS_H
+#define LL_LLFLOATERDEBUGMATERIALS_H
+
+#include <string>
+
+#include <boost/signals2.hpp>
+
+#include "llfloater.h"
+#include "lluuid.h"
+#include "v4color.h"
+
+class LLButton;
+class LLColorSwatchCtrl;
+class LLLineEditor;
+class LLMaterialID;
+class LLScrollListCtrl;
+class LLSD;
+class LLTextBase;
+class LLTextureCtrl;
+class LLUICtrl;
+
+class LLFloaterDebugMaterials : public LLFloater
+{
+public:
+ virtual BOOL postBuild();
+
+ virtual void onOpen(const LLSD& pKey);
+ virtual void onClose(bool pIsAppQuitting);
+
+protected:
+
+private:
+ friend class LLFloaterReg;
+
+ typedef enum {
+ kNoRegion,
+ kCapabilitiesLoading,
+ kReady,
+ kRequestStarted,
+ kRequestCompleted,
+ kNotEnabled,
+ kError
+ } EState;
+
+ LLFloaterDebugMaterials(const LLSD& pParams);
+ virtual ~LLFloaterDebugMaterials();
+
+ void onGetClicked();
+ void onValueEntered(LLUICtrl* pUICtrl);
+ void onPutSetClicked();
+ void onPutClearClicked();
+ void onQueryVisibleObjectsClicked();
+ void onGoodPostClicked();
+ void onBadPostClicked();
+ void onRegionCross();
+ void onInWorldSelectionChange();
+ void onDeferredCheckRegionMaterialStatus(LLUUID regionId);
+ void onDeferredRequestGetMaterials(LLUUID regionId);
+ void onDeferredRequestPutMaterials(LLUUID regionId, bool pIsDoSet);
+ void onDeferredRequestPostMaterials(LLUUID regionId, bool pUseGoodData);
+ void onGetResponse(bool pRequestStatus, const LLSD& pContent);
+ void onPutResponse(bool pRequestStatus, const LLSD& pContent);
+ void onPostResponse(bool pRequestStatus, const LLSD& pContent);
+
+ void checkRegionMaterialStatus();
+ void checkRegionMaterialStatus(const LLUUID& regionId);
+
+ void requestGetMaterials();
+ void requestGetMaterials(const LLUUID& regionId);
+
+ void requestPutMaterials(bool pIsDoSet);
+ void requestPutMaterials(const LLUUID& regionId, bool pIsDoSet);
+
+ void requestPostMaterials(bool pUseGoodData);
+ void requestPostMaterials(const LLUUID& regionId, bool pUseGoodData);
+
+ void parseGetResponse(const LLSD& pContent);
+ void parsePutResponse(const LLSD& pContent);
+ void parsePostResponse(const LLSD& pContent);
+ void printResponse(const std::string& pRequestType, const LLSD& pContent) const;
+
+ void setState(EState pState);
+ inline EState getState() const;
+
+ void resetObjectEditInputs();
+ void clearGetResults();
+ void clearPutResults();
+ void clearPostResults();
+
+ void updateStatusMessage();
+ void updateControls();
+ std::string convertToPrintableMaterialID(const LLSD& pBinaryHash) const;
+ std::string convertToPrintableMaterialID(const LLMaterialID& pMaterialID) const;
+
+ S32 getNormalMapOffsetX() const;
+ S32 getNormalMapOffsetY() const;
+ S32 getNormalMapRepeatX() const;
+ S32 getNormalMapRepeatY() const;
+ S32 getNormalMapRotation() const;
+
+ S32 getSpecularMapOffsetX() const;
+ S32 getSpecularMapOffsetY() const;
+ S32 getSpecularMapRepeatX() const;
+ S32 getSpecularMapRepeatY() const;
+ S32 getSpecularMapRotation() const;
+
+ S32 getSpecularExponent() const;
+ S32 getEnvironmentExponent() const;
+ S32 getAlphMaskCutoff() const;
+ S32 getDiffuseAlphaMode() const;
+ S32 getLineEditorValue(const LLLineEditor *pLineEditor) const;
+
+ LLTextBase* mStatusText;
+ LLButton* mGetButton;
+ LLScrollListCtrl* mGetNormalMapScrollList;
+ LLScrollListCtrl* mGetSpecularMapScrollList;
+ LLScrollListCtrl* mGetOtherDataScrollList;
+ LLTextureCtrl* mNormalMap;
+ LLLineEditor* mNormalMapOffsetX;
+ LLLineEditor* mNormalMapOffsetY;
+ LLLineEditor* mNormalMapRepeatX;
+ LLLineEditor* mNormalMapRepeatY;
+ LLLineEditor* mNormalMapRotation;
+ LLTextureCtrl* mSpecularMap;
+ LLLineEditor* mSpecularMapOffsetX;
+ LLLineEditor* mSpecularMapOffsetY;
+ LLLineEditor* mSpecularMapRepeatX;
+ LLLineEditor* mSpecularMapRepeatY;
+ LLLineEditor* mSpecularMapRotation;
+ LLColorSwatchCtrl* mSpecularColor;
+ LLLineEditor* mSpecularExponent;
+ LLLineEditor* mEnvironmentExponent;
+ LLLineEditor* mAlphaMaskCutoff;
+ LLLineEditor* mDiffuseAlphaMode;
+ LLButton* mPutSetButton;
+ LLButton* mPutClearButton;
+ LLScrollListCtrl* mPutScrollList;
+ LLButton* mQueryVisibleObjectsButton;
+ LLButton* mGoodPostButton;
+ LLButton* mBadPostButton;
+ LLScrollListCtrl* mPostScrollList;
+
+ LLColor4 mDefaultSpecularColor;
+
+ EState mState;
+ LLColor4 mWarningColor;
+ LLColor4 mErrorColor;
+
+ boost::signals2::connection mRegionCrossConnection;
+ boost::signals2::connection mTeleportFailedConnection;
+ boost::signals2::connection mSelectionUpdateConnection;
+};
+
+
+
+LLFloaterDebugMaterials::EState LLFloaterDebugMaterials::getState() const
+{
+ return mState;
+}
+
+#endif // LL_LLFLOATERDEBUGMATERIALS_H
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 0fe0e151fb..1e46d7a402 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -98,7 +98,11 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed)
mLabelSuggestedUseD(NULL),
mEditD(NULL),
mApplyEditsButton(NULL),
- mBeaconColor()
+ mBeaconColor(),
+ mPreviousValueA(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueB(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueC(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE)
{
}
@@ -168,7 +172,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditA = findChild<LLLineEditor>("edit_a_value");
llassert(mEditA != NULL);
mEditA->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueA));
mLabelEditB = findChild<LLTextBase>("edit_b_label");
llassert(mLabelEditB != NULL);
@@ -179,7 +183,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditB = findChild<LLLineEditor>("edit_b_value");
llassert(mEditB != NULL);
mEditB->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueB));
mLabelEditC = findChild<LLTextBase>("edit_c_label");
llassert(mLabelEditC != NULL);
@@ -190,7 +194,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditC = findChild<LLLineEditor>("edit_c_value");
llassert(mEditC != NULL);
mEditC->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueC));
mLabelEditD = findChild<LLTextBase>("edit_d_label");
llassert(mLabelEditD != NULL);
@@ -201,7 +205,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditD = findChild<LLLineEditor>("edit_d_value");
llassert(mEditD != NULL);
mEditD->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueD));
mApplyEditsButton = findChild<LLButton>("apply_edit_values");
llassert(mApplyEditsButton != NULL);
@@ -323,26 +327,38 @@ void LLFloaterPathfindingLinksets::onClearFiltersClicked()
rebuildObjectsScrollList();
}
-void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl)
+void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue)
{
LLLineEditor *pLineEditor = static_cast<LLLineEditor *>(pUICtrl);
llassert(pLineEditor != NULL);
const std::string &valueString = pLineEditor->getText();
- S32 value;
- if (LLStringUtil::convertToS32(valueString, value))
+ S32 intValue;
+ LLSD value;
+ bool doResetValue = false;
+
+ if (valueString.empty())
{
- if ((value < LLPathfindingLinkset::MIN_WALKABILITY_VALUE) || (value > LLPathfindingLinkset::MAX_WALKABILITY_VALUE))
- {
- value = llclamp(value, LLPathfindingLinkset::MIN_WALKABILITY_VALUE, LLPathfindingLinkset::MAX_WALKABILITY_VALUE);
- pLineEditor->setValue(LLSD(value));
- }
+ value = pPreviousValue;
+ doResetValue = true;
+ }
+ else if (LLStringUtil::convertToS32(valueString, intValue))
+ {
+ doResetValue = ((intValue < LLPathfindingLinkset::MIN_WALKABILITY_VALUE) || (intValue > LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
+ value = LLSD(llclamp(intValue, LLPathfindingLinkset::MIN_WALKABILITY_VALUE, LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
}
else
{
- pLineEditor->setValue(LLSD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
+ value = LLSD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE);
+ doResetValue = true;
+ }
+
+ if (doResetValue)
+ {
+ pLineEditor->setValue(value);
}
+ pPreviousValue = value;
}
void LLFloaterPathfindingLinksets::onApplyChangesClicked()
@@ -376,10 +392,14 @@ void LLFloaterPathfindingLinksets::updateEditFieldValues()
const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(firstSelectedObjectPtr.get());
setEditLinksetUse(linkset->getLinksetUse());
- mEditA->setValue(LLSD(linkset->getWalkabilityCoefficientA()));
- mEditB->setValue(LLSD(linkset->getWalkabilityCoefficientB()));
- mEditC->setValue(LLSD(linkset->getWalkabilityCoefficientC()));
- mEditD->setValue(LLSD(linkset->getWalkabilityCoefficientD()));
+ mPreviousValueA = LLSD(linkset->getWalkabilityCoefficientA());
+ mPreviousValueB = LLSD(linkset->getWalkabilityCoefficientB());
+ mPreviousValueC = LLSD(linkset->getWalkabilityCoefficientC());
+ mPreviousValueD = LLSD(linkset->getWalkabilityCoefficientD());
+ mEditA->setValue(mPreviousValueA);
+ mEditB->setValue(mPreviousValueB);
+ mEditC->setValue(mPreviousValueC);
+ mEditD->setValue(mPreviousValueD);
}
}
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index 6538308122..7149da9215 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -74,7 +74,7 @@ private:
void onApplyAllFilters();
void onClearFiltersClicked();
- void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl);
+ void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue);
void onApplyChangesClicked();
void clearFilters();
@@ -132,6 +132,11 @@ private:
LLButton *mApplyEditsButton;
LLColor4 mBeaconColor;
+
+ LLSD mPreviousValueA;
+ LLSD mPreviousValueB;
+ LLSD mPreviousValueC;
+ LLSD mPreviousValueD;
};
#endif // LL_LLFLOATERPATHFINDINGLINKSETS_H
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index d4080ab3f7..8e540a0cc8 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2234,12 +2234,11 @@ void LLFolderView::doIdle()
mDebugFilters = debug_filters;
arrangeAll();
}
-
BOOL filter_modified_and_active = mFilter->isModified() && mFilter->isNotDefault();
mNeedsAutoSelect = filter_modified_and_active &&
!(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
mFilter->clearModified();
-
+
// filter to determine visibility before arranging
filterFromRoot();
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 66c9c323cb..5d75375847 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -115,8 +115,8 @@ void LLPanelMarketplaceInbox::onFocusReceived()
if (sidepanel_inventory)
{
sidepanel_inventory->clearSelections(true, false);
- }
-
+ }
+
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
@@ -168,8 +168,8 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const
if (inbox_item_view && inbox_item_view->isFresh())
{
fresh_item_count++;
- }
- }
+ }
+ }
}
}
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 70f3b5335e..9902d047e4 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -241,7 +241,7 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
mBaseNormals[i].clear();
mBaseBinormals[i].clear();
mTexCoords[i].clear();
- mWeights[i] = 0.f;
+ mWeights[i] = 0.f;
}
mNumVertices = numVertices;
return TRUE;
diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h
index ffb11a3f7e..850171d169 100644
--- a/indra/newview/llpolymesh.h
+++ b/indra/newview/llpolymesh.h
@@ -406,6 +406,16 @@ public:
LLPolySkeletalDistortion(LLVOAvatar *avatarp);
~LLPolySkeletalDistortion();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; }
// This sets mInfo and calls initialization functions
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp
index d25d1420ee..bd96608641 100644
--- a/indra/newview/llpolymorph.cpp
+++ b/indra/newview/llpolymorph.cpp
@@ -73,9 +73,9 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
{
const S32 numVertices = mNumIndices;
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
@@ -89,17 +89,12 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
}
}
-
//-----------------------------------------------------------------------------
// ~LLPolyMorphData()
//-----------------------------------------------------------------------------
LLPolyMorphData::~LLPolyMorphData()
{
- delete [] mVertexIndices;
- delete [] mCoords;
- delete [] mNormals;
- delete [] mBinormals;
- delete [] mTexCoords;
+ freeData();
}
//-----------------------------------------------------------------------------
@@ -119,11 +114,16 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
}
//-------------------------------------------------------------------------
+ // free any existing data
+ //-------------------------------------------------------------------------
+ freeData();
+
+ //-------------------------------------------------------------------------
// allocate vertices
//-------------------------------------------------------------------------
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mTexCoords = new LLVector2[numVertices];
// Actually, we are allocating more space than we need for the skiplist
mVertexIndices = new U32[numVertices];
@@ -207,6 +207,42 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
}
//-----------------------------------------------------------------------------
+// freeData()
+//-----------------------------------------------------------------------------
+void LLPolyMorphData::freeData()
+{
+ if (mCoords != NULL)
+ {
+ ll_aligned_free_16(mCoords);
+ mCoords = NULL;
+ }
+
+ if (mNormals != NULL)
+ {
+ ll_aligned_free_16(mNormals);
+ mNormals = NULL;
+ }
+
+ if (mBinormals != NULL)
+ {
+ ll_aligned_free_16(mBinormals);
+ mBinormals = NULL;
+ }
+
+ if (mTexCoords != NULL)
+ {
+ delete [] mTexCoords;
+ mTexCoords = NULL;
+ }
+
+ if (mVertexIndices != NULL)
+ {
+ delete [] mVertexIndices;
+ mVertexIndices = NULL;
+ }
+}
+
+//-----------------------------------------------------------------------------
// LLPolyMorphTargetInfo()
//-----------------------------------------------------------------------------
LLPolyMorphTargetInfo::LLPolyMorphTargetInfo()
diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h
index 46e23b7792..678599d7e1 100644
--- a/indra/newview/llpolymorph.h
+++ b/indra/newview/llpolymorph.h
@@ -48,6 +48,16 @@ public:
~LLPolyMorphData();
LLPolyMorphData(const LLPolyMorphData &rhs);
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
const std::string& getName() { return mName; }
@@ -67,6 +77,9 @@ public:
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
+
+private:
+ void freeData();
};
//-----------------------------------------------------------------------------
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 2c0da60b48..fffe20208f 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -67,6 +67,16 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
@@ -143,6 +153,16 @@ public:
LLTexLayerParamColor( LLVOAvatar* avatar );
/* virtual */ ~LLTexLayerParamColor();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 1f7cf0cdd4..136e8fa0c4 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -50,6 +50,7 @@
#include "llfloaterbump.h"
#include "llfloaterbvhpreview.h"
#include "llfloatercamera.h"
+#include "llfloaterdebugmaterials.h"
#include "llfloaterdeleteenvpreset.h"
#include "llfloaterdisplayname.h"
#include "llfloatereditdaycycle.h"
@@ -255,6 +256,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("pathfinding_characters", "floater_pathfinding_characters.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingCharacters>);
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("debug_materials", "floater_debug_materials.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDebugMaterials>);
LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 01a54509ef..d11e7e32c7 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5134,12 +5134,6 @@ class LLEditDelete : public view_listener_t
}
};
-bool enable_object_return()
-{
- return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() &&
- (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER)));
-}
-
void handle_spellcheck_replace_with_suggestion(const LLUICtrl* ctrl, const LLSD& param)
{
const LLContextMenu* menu = dynamic_cast<const LLContextMenu*>(ctrl->getParent());
@@ -5212,6 +5206,12 @@ bool enable_spellcheck_add_to_ignore(const LLUICtrl* ctrl)
return (spellcheck_handler) && (spellcheck_handler->canAddToIgnore());
}
+bool enable_object_return()
+{
+ return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() &&
+ (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER)));
+}
+
bool enable_object_delete()
{
bool new_value =
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 444bbb2776..212b135a78 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -41,6 +41,7 @@
#include "llframetimer.h"
#include "llinventory.h"
#include "llinventorydefines.h"
+#include "llmaterialid.h"
#include "llmaterialtable.h"
#include "llmutelist.h"
#include "llnamevalue.h"
@@ -237,6 +238,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mTimeDilation(1.f),
mRotTime(0.f),
mAngularVelocityRot(),
+ mPreviousRotation(),
mState(0),
mMedia(NULL),
mClickAction(0),
@@ -784,7 +786,7 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
}
LLDrawable* old_parent = mDrawable->mParent;
mDrawable->mParent = parentp;
-
+
if (parentp && mDrawable->isActive())
{
parentp->makeActive();
@@ -1410,9 +1412,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#else
val = (U16 *) &data[count];
#endif
- setAngularVelocity( U16_to_F32(val[VX], -size, size),
+ new_angv.set(U16_to_F32(val[VX], -size, size),
U16_to_F32(val[VY], -size, size),
U16_to_F32(val[VZ], -size, size));
+ setAngularVelocity(new_angv);
break;
case 16:
@@ -1436,9 +1439,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f);
new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f);
- setAngularVelocity( U8_to_F32(data[13], -size, size),
+ new_angv.set(U8_to_F32(data[13], -size, size),
U8_to_F32(data[14], -size, size),
U8_to_F32(data[15], -size, size) );
+ setAngularVelocity(new_angv);
break;
}
@@ -1510,9 +1514,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
dp->unpackU16(val[VX], "AccX");
dp->unpackU16(val[VY], "AccY");
dp->unpackU16(val[VZ], "AccZ");
- setAngularVelocity( U16_to_F32(val[VX], -64.f, 64.f),
+ new_angv.set(U16_to_F32(val[VX], -64.f, 64.f),
U16_to_F32(val[VY], -64.f, 64.f),
U16_to_F32(val[VZ], -64.f, 64.f));
+ setAngularVelocity(new_angv);
}
break;
case OUT_FULL_COMPRESSED:
@@ -1556,8 +1561,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (value & 0x80)
{
- dp->unpackVector3(vec, "Omega");
- setAngularVelocity(vec);
+ dp->unpackVector3(new_angv, "Omega");
+ setAngularVelocity(new_angv);
}
if (value & 0x20)
@@ -2038,12 +2043,16 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
- if (new_rot != getRotation()
- || new_angv != old_angv)
+ if ((new_rot != getRotation())
+ || (new_angv != old_angv))
+ {
+ if (new_rot != mPreviousRotation)
{
- if (new_angv != old_angv)
+ resetRot();
+ }
+ else if (new_angv != old_angv)
{
- if (flagUsePhysics())
+ if (flagUsePhysics() || new_angv.isExactlyZero())
{
resetRot();
}
@@ -2053,6 +2062,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
+ // Remember the last rotation value
+ mPreviousRotation = new_rot;
+
// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
setRotation(new_rot * mAngularVelocityRot);
setChanged(ROTATED | SILHOUETTE);
@@ -2159,29 +2171,29 @@ void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
if (!mDead)
{
- // CRO - don't velocity interp linked objects!
- // Leviathan - but DO velocity interp joints
- if (!mStatic && sVelocityInterpolate && !isSelected())
- {
- // calculate dt from last update
- F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
- F32 dt = mTimeDilation * dt_raw;
+ // CRO - don't velocity interp linked objects!
+ // Leviathan - but DO velocity interp joints
+ if (!mStatic && sVelocityInterpolate && !isSelected())
+ {
+ // calculate dt from last update
+ F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
+ F32 dt = mTimeDilation * dt_raw;
applyAngularVelocity(dt);
-
+
if (isAttachment())
- {
- mLastInterpUpdateSecs = time;
+ {
+ mLastInterpUpdateSecs = time;
return;
- }
- else
- { // Move object based on it's velocity and rotation
- interpolateLinearMotion(time, dt);
- }
}
-
- updateDrawable(FALSE);
+ else
+ { // Move object based on it's velocity and rotation
+ interpolateLinearMotion(time, dt);
+ }
}
+
+ updateDrawable(FALSE);
+}
}
@@ -4256,6 +4268,26 @@ S32 LLViewerObject::setTEGlow(const U8 te, const F32 glow)
return retval;
}
+S32 LLViewerObject::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
+{
+ S32 retval = 0;
+ const LLTextureEntry *tep = getTE(te);
+ if (!tep)
+ {
+ llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ }
+ else if (pMaterialID != tep->getMaterialID())
+ {
+ retval = LLPrimitive::setTEMaterialID(te, pMaterialID);
+ setChanged(TEXTURE);
+ if (mDrawable.notNull() && retval)
+ {
+ gPipeline.markTextured(mDrawable);
+ }
+ }
+ return retval;
+}
+
S32 LLViewerObject::setTEScale(const U8 te, const F32 s, const F32 t)
{
@@ -5384,9 +5416,9 @@ void LLViewerObject::setPhysicsShapeType(U8 type)
mPhysicsShapeUnknown = false;
if (type != mPhysicsShapeType)
{
- mPhysicsShapeType = type;
- mCostStale = true;
- }
+ mPhysicsShapeType = type;
+ mCostStale = true;
+}
}
void LLViewerObject::setPhysicsGravity(F32 gravity)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 277bd1c430..255d0cd080 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -56,6 +56,7 @@ class LLDrawable;
class LLHost;
class LLHUDText;
class LLWorld;
+class LLMaterialID;
class LLNameValue;
class LLNetMap;
class LLMessageSystem;
@@ -88,18 +89,6 @@ typedef void (*inventory_callback)(LLViewerObject*,
S32 serial_num,
void*);
-// for exporting textured materials from SL
-struct LLMaterialExportInfo
-{
-public:
- LLMaterialExportInfo(S32 mat_index, S32 texture_index, LLColor4 color) :
- mMaterialIndex(mat_index), mTextureIndex(texture_index), mColor(color) {};
-
- S32 mMaterialIndex;
- S32 mTextureIndex;
- LLColor4 mColor;
-};
-
struct PotentialReturnableObject
{
LLBBox box;
@@ -320,6 +309,7 @@ public:
/*virtual*/ S32 setTEFullbright(const U8 te, const U8 fullbright );
/*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags );
/*virtual*/ S32 setTEGlow(const U8 te, const F32 glow);
+ /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID);
/*virtual*/ BOOL setMaterial(const U8 material);
virtual void setTEImage(const U8 te, LLViewerTexture *imagep); // Not derived from LLPrimitive
virtual void changeTEImage(S32 index, LLViewerTexture* new_image) ;
@@ -725,6 +715,7 @@ protected:
F32 mTimeDilation; // Time dilation sent with the object.
F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega)
LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations
+ LLQuaternion mPreviousRotation;
U8 mState; // legacy
LLViewerObjectMedia* mMedia; // NULL if no media associated
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index effa368b7a..755879f591 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1558,6 +1558,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("ProductInfoRequest");
capabilityNames.append("ProvisionVoiceAccountRequest");
capabilityNames.append("RemoteParcelRequest");
+ capabilityNames.append("RenderMaterials");
capabilityNames.append("RequestTextureDownload");
capabilityNames.append("ResourceCostSelected");
capabilityNames.append("RetrieveNavMeshSrc");
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e99898a83c..fb53e5c677 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -36,6 +36,7 @@
#include "lldir.h"
#include "llflexibleobject.h"
#include "llfloatertools.h"
+#include "llmaterialid.h"
#include "llmaterialtable.h"
#include "llprimitive.h"
#include "llvolume.h"
@@ -1960,6 +1961,17 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow)
return res;
}
+S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)
+{
+ S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID);
+ if (res)
+ {
+ gPipeline.markTextured(mDrawable);
+ mFaceMappingChanged = TRUE;
+ }
+ return res;
+}
+
S32 LLVOVolume::setTEScale(const U8 te, const F32 s, const F32 t)
{
S32 res = LLViewerObject::setTEScale(te, s, t);
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 5482c80f2b..ff6dca9737 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -37,6 +37,7 @@
class LLViewerTextureAnim;
class LLDrawPool;
+class LLMaterialID;
class LLSelectNode;
class LLObjectMediaDataClient;
class LLObjectMediaNavigateClient;
@@ -185,6 +186,7 @@ public:
/*virtual*/ S32 setTEBumpShinyFullbright(const U8 te, const U8 bump);
/*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags);
/*virtual*/ S32 setTEGlow(const U8 te, const F32 glow);
+ /*virtual*/ S32 setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID);
/*virtual*/ S32 setTEScale(const U8 te, const F32 s, const F32 t);
/*virtual*/ S32 setTEScaleS(const U8 te, const F32 s);
/*virtual*/ S32 setTEScaleT(const U8 te, const F32 t);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 28fc70e38a..8c989ca77f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2328,7 +2328,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
bound_shader = true;
gOcclusionCubeProgram.bind();
}
-
+
if (sUseOcclusion > 1)
{
if (mCubeVB.isNull())
@@ -2506,7 +2506,7 @@ void LLPipeline::doOcclusion(LLCamera& camera)
{
gOcclusionCubeProgram.bind();
}
- }
+ }
if (mCubeVB.isNull())
{ //cube VB will be used for issuing occlusion queries
@@ -2563,11 +2563,6 @@ void LLPipeline::updateGL()
glu->mInQ = FALSE;
LLGLUpdate::sGLQ.pop_front();
}
-
- { //seed VBO Pools
- LLFastTimer t(FTM_SEED_VBO_POOLS);
- LLVertexBuffer::seedPools();
- }
}
{ //seed VBO Pools
@@ -3376,11 +3371,11 @@ void renderScriptedTouchBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderPhysicalBeacons(LLDrawable* drawablep)
{
@@ -3405,11 +3400,11 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderMOAPBeacons(LLDrawable* drawablep)
{
@@ -3445,11 +3440,11 @@ void renderMOAPBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderParticleBeacons(LLDrawable* drawablep)
{
@@ -3474,11 +3469,11 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderSoundHighlights(LLDrawable* drawablep)
{
@@ -3496,11 +3491,11 @@ void renderSoundHighlights(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void LLPipeline::postSort(LLCamera& camera)
{
@@ -3713,7 +3708,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (facep)
{
gPipeline.mSelectedFaces.push_back(facep);
- }
+ }
}
return true;
}
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 9bf2922033..48a9430fdc 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -645,6 +645,15 @@
name="PathfindingGoodColor"
reference="LtGreen" />
<color
+ name="MaterialErrorColor"
+ reference="LtRed" />
+ <color
+ name="MaterialWarningColor"
+ reference="DrYellow" />
+ <color
+ name="MaterialGoodColor"
+ reference="LtGreen" />
+ <color
name="PathfindingDefaultBeaconColor"
reference="Red_80" />
<color
diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml
index 6ee708ed62..845df1f050 100644
--- a/indra/newview/skins/default/xui/de/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/de/menu_viewer.xml
@@ -21,6 +21,7 @@
<menu_item_call label="Beschäftigt" name="Set Busy"/>
</menu>
<menu_item_call label="L$ kaufen..." name="Buy and Sell L$"/>
+ <menu_item_call label="Händler-Outbox..." name="MerchantOutbox"/>
<menu_item_call label="Kontoübersicht..." name="Manage My Account">
<menu_item_call.on_click name="ManageMyAccount_url" parameter="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=de"/>
</menu_item_call>
diff --git a/indra/newview/skins/default/xui/en/floater_debug_materials.xml b/indra/newview/skins/default/xui/en/floater_debug_materials.xml
new file mode 100644
index 0000000000..17ca0e3450
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_debug_materials.xml
@@ -0,0 +1,899 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ positioning="cascading"
+ can_tear_off="false"
+ can_resize="true"
+ height="680"
+ width="1244"
+ min_height="600"
+ min_width="1100"
+ layout="topleft"
+ name="debug_materials"
+ reuse_instance="true"
+ save_rect="false"
+ single_instance="true"
+ title="Debug materials">
+ <floater.string name="status_no_region">No current region available.</floater.string>
+ <floater.string name="status_capabilities_loading">Region capabilities are loading.</floater.string>
+ <floater.string name="status_ready">Materials are enabled for this region.</floater.string>
+ <floater.string name="status_request_started">Request sent.</floater.string>
+ <floater.string name="status_request_completed">Request received.</floater.string>
+ <floater.string name="status_not_enabled">Materials are not enabled for this region.</floater.string>
+ <floater.string name="status_error">An error occurred during the request.</floater.string>
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top"
+ layout="topleft"
+ left="12"
+ top_pad="10"
+ height="61"
+ width="214">
+ <text
+ height="13"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ layout="topleft"
+ left="0"
+ top_pad="0"
+ width="214">
+ Status
+ </text>
+ <text
+ height="40"
+ word_wrap="true"
+ use_ellipses="false"
+ type="string"
+ text_color="MaterialGoodColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="0"
+ name="material_status"
+ top_pad="8"
+ width="214">
+ </text>
+ </panel>
+ <view_border
+ bevel_style="none"
+ follows="left|right|top"
+ height="0"
+ layout="topleft"
+ name="horiz_separator"
+ top_pad="0"
+ left="12"
+ width="1220"/>
+ <tab_container
+ follows="left|top|right"
+ layout="topleft"
+ tab_position="top"
+ name="view_test_tab_container"
+ left="10"
+ top_pad="10"
+ height="500"
+ width="1220">
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ label="Region"
+ height="167"
+ top_pad="10"
+ width="1220">
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ height="167"
+ top_pad="10"
+ width="1220">
+ <button
+ follows="left|top"
+ height="22"
+ label="Get"
+ layout="topleft"
+ name="get_button"
+ top_pad="0"
+ width="214"/>
+ <scroll_list
+ column_padding="0"
+ draw_heading="true"
+ follows="left|top|right"
+ height="135"
+ layout="topleft"
+ top_pad="10"
+ tab_stop="false"
+ multi_select="true"
+ name="normal_map_attrs_scroll_list"
+ width="1010">
+ <scroll_list.columns
+ label="Material ID"
+ name="id"
+ width="225" />
+ <scroll_list.columns
+ label="Normal Map"
+ name="normal_map_list"
+ width="225" />
+ <scroll_list.columns
+ label="Offset X"
+ name="normal_map_list_offset_x"
+ width="112" />
+ <scroll_list.columns
+ label="Offset Y"
+ name="normal_map_list_offset_y"
+ width="112" />
+ <scroll_list.columns
+ label="Repeat X"
+ name="normal_map_list_repeat_x"
+ width="112" />
+ <scroll_list.columns
+ label="Repeat Y"
+ name="normal_map_list_repeat_y"
+ width="112" />
+ <scroll_list.columns
+ label="Rotation"
+ name="normal_map_list_rotation"
+ width="112" />
+ </scroll_list>
+ <scroll_list
+ column_padding="0"
+ draw_heading="true"
+ follows="left|top|right"
+ height="135"
+ layout="topleft"
+ top_pad="10"
+ tab_stop="false"
+ multi_select="true"
+ name="specular_map_attrs_scroll_list"
+ width="1010">
+ <scroll_list.columns
+ label="Material ID"
+ name="id"
+ width="225" />
+ <scroll_list.columns
+ label="Specular Map"
+ name="specular_map_list"
+ width="225" />
+ <scroll_list.columns
+ label="Offset X"
+ name="specular_map_list_offset_x"
+ width="112" />
+ <scroll_list.columns
+ label="Offset Y"
+ name="specular_map_list_offset_y"
+ width="112" />
+ <scroll_list.columns
+ label="Repeat X"
+ name="specular_map_list_repeat_x"
+ width="112" />
+ <scroll_list.columns
+ label="Repeat Y"
+ name="specular_map_list_repeat_y"
+ width="112" />
+ <scroll_list.columns
+ label="Rotation"
+ name="specular_map_list_rotation"
+ width="112" />
+ </scroll_list>
+ <scroll_list
+ column_padding="0"
+ draw_heading="true"
+ follows="left|top|right"
+ height="135"
+ layout="topleft"
+ top_pad="10"
+ tab_stop="false"
+ multi_select="true"
+ name="other_data_scroll_list"
+ width="765">
+ <scroll_list.columns
+ label="Material ID"
+ name="id"
+ width="225" />
+ <scroll_list.columns
+ label="Specular Color"
+ name="specular_color"
+ width="120" />
+ <scroll_list.columns
+ label="Specular Exponent"
+ name="specular_exponent"
+ width="112" />
+ <scroll_list.columns
+ label="Env Intensity"
+ name="env_intensity"
+ width="80" />
+ <scroll_list.columns
+ label="Alpha Mask Cutoff"
+ name="alpha_mask_cutoff"
+ width="110" />
+ <scroll_list.columns
+ label="Diffuse Alpha Mode"
+ name="diffuse_alpha_mode"
+ width="118" />
+ </scroll_list>
+ </panel>
+ </panel>
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ label="Object editing"
+ height="167"
+ top_pad="10"
+ width="1220">
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ left="2"
+ top_pad="10"
+ height="410"
+ width="810">
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ height="265"
+ top_pad="0"
+ width="810">
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ height="226"
+ top_pad="0"
+ width="263">
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="0"
+ top_pad="38"
+ width="160">
+ Normal Map
+ </text>
+ <texture_picker
+ allow_no_texture="true"
+ can_apply_immediately="true"
+ default_image_name="Default"
+ follows="left|top"
+ left_pad="0"
+ top_pad="-50"
+ label_width="0"
+ height="100"
+ width="100"
+ mouse_opaque="true"
+ name="normal_map"
+ tool_tip="Click to open texture picker" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-260"
+ top_pad="10"
+ width="160">
+ Normal Map Offset X
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="normal_map_offset_x"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Normal Map Offset Y
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="normal_map_offset_y"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Normal Map Repeat X
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="normal_map_repeat_x"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Normal Map Repeat Y
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="normal_map_repeat_y"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Normal Map Rotation
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="normal_map_rotation"
+ width="80" />
+ </panel>
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ height="226"
+ top_pad="-226"
+ left_pad="20"
+ width="263">
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="0"
+ top_pad="38"
+ width="160">
+ Specular Map
+ </text>
+ <texture_picker
+ allow_no_texture="true"
+ can_apply_immediately="true"
+ default_image_name="Default"
+ follows="left|top"
+ left_pad="0"
+ top_pad="-50"
+ label_width="0"
+ height="100"
+ width="100"
+ mouse_opaque="true"
+ name="specular_map"
+ tool_tip="Click to open texture picker" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-260"
+ top_pad="10"
+ width="160">
+ Specular Map Offset X
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="specular_map_offset_x"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Specular Map Offset Y
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="specular_map_offset_y"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Specular Map Repeat X
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="specular_map_repeat_x"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Specular Map Repeat Y
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="specular_map_repeat_y"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Specular Map Rotation
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="specular_map_rotation"
+ width="80" />
+ </panel>
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ height="132"
+ top_pad="-226"
+ left_pad="20"
+ width="243">
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="0"
+ top_pad="10"
+ width="160">
+ Specular Color
+ </text>
+ <color_swatch
+ can_apply_immediately="true"
+ color="1 1 1 1"
+ follows="left|top"
+ height="30"
+ layout="topleft"
+ label_height="0"
+ label_width="0"
+ left_pad="0"
+ top_pad="-22"
+ name="specular_color"
+ tool_tip="Click to open color picker"
+ width="40" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-200"
+ top_pad="10"
+ width="160">
+ Specular Exponent
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="specular_exponent"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Environment Exponent
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="environment_exponent"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Alpha Mask Cuttoff
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="alpha_mask_cutoff"
+ width="80" />
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="-240"
+ top_pad="10"
+ width="160">
+ Diffuse Alpha Mode
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ default_text="0"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="0"
+ top_pad="-18"
+ max_length_chars="255"
+ name="diffuse_alpha_mode"
+ width="80" />
+ </panel>
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ height="22"
+ left="0"
+ top_pad="110"
+ width="450">
+ <button
+ follows="left|top"
+ height="22"
+ label="Set Face Data"
+ layout="topleft"
+ name="put_set_button"
+ left="0"
+ top="0"
+ width="214"/>
+ <button
+ follows="left|top"
+ height="22"
+ label="Clear Face Data"
+ layout="topleft"
+ name="put_clear_button"
+ left_pad="20"
+ width="214"/>
+ </panel>
+
+ </panel>
+ <view_border
+ bevel_style="none"
+ follows="left|right|top"
+ height="0"
+ layout="topleft"
+ name="horiz_separator"
+ top_pad="10"
+ left="0"
+ width="810"/>
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ height="125"
+ top_pad="20"
+ width="400">
+ <text
+ height="13"
+ word_wrap="false"
+ use_ellipses="false"
+ type="string"
+ text_color="LabelTextColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="0"
+ top_pad="0"
+ width="160">
+ Results
+ </text>
+ <scroll_list
+ column_padding="0"
+ draw_heading="true"
+ follows="left|top|right"
+ height="100"
+ layout="topleft"
+ left="0"
+ top_pad="10"
+ tab_stop="false"
+ multi_select="true"
+ name="put_scroll_list"
+ width="400">
+ <scroll_list.columns
+ label="Object ID"
+ name="object_id"
+ width="80" />
+ <scroll_list.columns
+ label="Face Index"
+ name="face_index"
+ width="70" />
+ <scroll_list.columns
+ label="MaterialID"
+ name="material_id"
+ dynamic_width="true" />
+ </scroll_list>
+ </panel>
+ </panel>
+ </panel>
+ <panel
+ border="true"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ label="Viewable objects"
+ height="167"
+ top_pad="10"
+ width="1220">
+ <panel
+ border="false"
+ bevel_style="none"
+ follows="left|top|right"
+ layout="topleft"
+ left="12"
+ top_pad="10"
+ height="132"
+ width="1220">
+ <button
+ follows="left|top"
+ height="22"
+ label="Query Visible Objects"
+ layout="topleft"
+ name="query_visible_object_button"
+ top_pad="0"
+ width="214"/>
+ <button
+ follows="left|top"
+ height="22"
+ label="Post Good Material ID"
+ layout="topleft"
+ name="good_post_button"
+ top_pad="0"
+ width="214"/>
+ <button
+ follows="left|top"
+ height="22"
+ label="Post Bad Material ID"
+ layout="topleft"
+ name="bad_post_button"
+ left_pad="20"
+ width="214"/>
+ <scroll_list
+ column_padding="0"
+ draw_heading="true"
+ follows="left|top|right"
+ height="100"
+ layout="topleft"
+ top_pad="10"
+ left="0"
+ tab_stop="false"
+ multi_select="true"
+ name="post_scroll_list"
+ width="1220">
+ <scroll_list.columns
+ label="Material ID"
+ name="id"
+ dynamic_width="true" />
+ <scroll_list.columns
+ label="Normal Map"
+ name="normal_map"
+ width="225" />
+ <scroll_list.columns
+ label="Specular Map"
+ name="specular_map"
+ width="225" />
+ <scroll_list.columns
+ label="Specular Color"
+ name="specular_color"
+ width="120" />
+ <scroll_list.columns
+ label="Specular Exponent"
+ name="specular_exponent"
+ width="112" />
+ <scroll_list.columns
+ label="Env Intensity"
+ name="env_intensity"
+ width="80" />
+ <scroll_list.columns
+ label="Alpha Mask Cutoff"
+ name="alpha_mask_cutoff"
+ width="110" />
+ <scroll_list.columns
+ label="Diffuse Alpha Mode"
+ name="diffuse_alpha_mode"
+ width="118" />
+ </scroll_list>
+ </panel>
+ </panel>
+ </tab_container>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
index 9bc5c7d5a4..4a457fb929 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -6,7 +6,7 @@
height="395"
width="1075"
min_height="395"
- min_width="1075"
+ min_width="990"
layout="topleft"
name="floater_pathfinding_linksets"
help_topic="floater_pathfinding_linksets"
@@ -524,7 +524,7 @@
tool_tip="Walkability for characters of type D. Example character type is other."
width="45" />
<button
- follows="right|bottom"
+ follows="left|bottom"
height="21"
label="Apply changes"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
index 2e29c61cb2..6021ba0a5a 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
@@ -134,16 +134,6 @@
top_delta="-25"
name="Pipette"
width="28" />
- <check_box
- follows="left|bottom"
- height="20"
- initial_value="true"
- label="Live Preview"
- layout="topleft"
- left="4"
- name="apply_immediate_check"
- top="262"
- width="120" />
<text
follows="left|bottom"
height="20"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 1aa55acf2d..8b47f3a25d 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2611,6 +2611,17 @@
<menu_item_check.on_enable
function="Advanced.EnableRenderDeferredOptions" />
</menu_item_check>
+
+ <menu_item_separator/>
+
+ <menu_item_call
+ label="Debug materials ..."
+ name="DebugMaterialsMenu">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="debug_materials" />
+ </menu_item_call>
+
<menu_item_separator />
<menu_item_check
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index f0a126724b..8e6de6ed4f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7576,18 +7576,6 @@ We cannot display a preview of this texture because it is no-copy and/or no-tran
<notification
icon="alertmodal.tga"
- name="LivePreviewUnavailable"
- type="alert">
-
-We cannot display a preview of this texture because it is no-copy and/or no-transfer.
- <usetemplate
- ignoretext="Warn me that Live Preview mode is not available for no-copy and/or no-transfer textures"
- name="okignore"
- yestext="OK"/>
- </notification>
-
- <notification
- icon="alertmodal.tga"
name="ConfirmLeaveCall"
type="alert">
Are you sure you want to leave this call?
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index e9a787cef0..e69a17e037 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- height="570"
- layout="topleft"
- name="object properties"
- help_topic="object_properties"
- title="Object Profile"
- width="333">
- <panel.string
- name="text deed continued">
- Deed
- </panel.string>
- <panel.string
- name="text deed">
- Deed
- </panel.string>
- <panel.string
- name="text modify info 1">
- You can modify this object
- </panel.string>
- <panel.string
- name="text modify info 2">
- You can modify these objects
- </panel.string>
- <panel.string
- name="text modify info 3">
- You can't modify this object
- </panel.string>
- <panel.string
- name="text modify info 4">
- You can't modify these objects
- </panel.string>
- <panel.string
+ height="570"
+ layout="topleft"
+ name="object properties"
+ help_topic="object_properties"
+ title="Object Profile"
+ width="333">
+ <panel.string
+ name="text deed continued">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text deed">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text modify info 1">
+ You can modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 2">
+ You can modify these objects
+ </panel.string>
+ <panel.string
+ name="text modify info 3">
+ You can't modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 4">
+ You can't modify these objects
+ </panel.string>
+ <panel.string
name="text modify info 5">
You can't modify this object across a region boundary
</panel.string>
@@ -39,399 +39,399 @@
You can't modify these objects across a region boundary
</panel.string>
<panel.string
- name="text modify warning">
- This object has linked parts
- </panel.string>
- <panel.string
- name="Cost Default">
- Price: L$
- </panel.string>
- <panel.string
- name="Cost Total">
- Total Price: L$
- </panel.string>
- <panel.string
- name="Cost Per Unit">
- Price Per: L$
- </panel.string>
- <panel.string
- name="Cost Mixed">
- Mixed Price
- </panel.string>
- <panel.string
- name="Sale Mixed">
- Mixed Sale
- </panel.string>
- <button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- left="8"
- name="back_btn"
- tab_stop="false"
- top="0"
- width="30"
- use_draw_context_alpha="false" />
- <text
- follows="top|left|right"
- font="SansSerifHuge"
- height="26"
- layout="topleft"
- left_pad="10"
- name="title"
- text_color="LtGray"
- top="0"
- use_ellipses="true"
- value="Object Profile"
- width="290" />
- <text
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="where"
- text_color="LtGray_50"
- value="(Inworld)"
- width="150" />
- <panel
- follows="all"
- height="490"
- label=""
- layout="topleft"
- left="10"
- help_topic=""
- name="properties_panel"
- top="45"
- width="313"
- background_visible="true"
- bg_alpha_color="DkGray2">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Name:"
- top="10"
- width="78">
- Name:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="20"
- layout="topleft"
- left_delta="78"
- max_length_bytes="63"
- name="Object Name"
- top_delta="0"
- width="225" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Description:"
- top_pad="10"
- width="78">
- Description:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="23"
- layout="topleft"
- name="Object Description"
- select_on_focus="true"
- left_delta="78"
- max_length_bytes="127"
- top_delta="-5"
- width="225"/>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="CreatorNameLabel"
- top_pad="12"
- width="78">
- Creator:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Creator Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Owner:"
- top_pad="15"
- width="78">
- Owner:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Owner Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Group_label"
- top_pad="15"
- width="78">
- Group:
- </text>
+ name="text modify warning">
+ This object has linked parts
+ </panel.string>
+ <panel.string
+ name="Cost Default">
+ Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Total">
+ Total Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Per Unit">
+ Price Per: L$
+ </panel.string>
+ <panel.string
+ name="Cost Mixed">
+ Mixed Price
+ </panel.string>
+ <panel.string
+ name="Sale Mixed">
+ Mixed Sale
+ </panel.string>
<button
- follows="top|left"
- height="10"
- image_disabled="Activate_Checkmark"
- image_selected="Activate_Checkmark"
- image_unselected="Activate_Checkmark"
- image_color="White_50"
- layout="topleft"
- left_pad="0"
- top_delta="0"
- name="button set group"
- tab_stop="false"
- tool_tip="Choose a group to share this object's permissions"
- width="10" />
- <name_box
- follows="left|top"
- height="18"
- initial_value="Loading..."
- layout="topleft"
- left_pad="5"
- top_delta="-1"
- name="Group Name Proxy"
- width="150" />
- <button
- follows="top|left"
- height="23"
- label="Deed"
- label_selected="Deed"
- layout="topleft"
- name="button deed"
- top_pad="0"
- left="81"
- tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
- width="100" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="9"
- layout="topleft"
- top_pad="5"
- left="5"
- name="label click action"
- width="280">
- Click to:
- </text>
- <combo_box
- follows="left|top"
- height="23"
- layout="topleft"
- name="clickaction"
- width="168"
- left="81">
- <combo_box.item
- label="Touch (default)"
- name="Touch/grab(default)"
+ follows="top|left"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
+ layout="topleft"
+ left="8"
+ name="back_btn"
+ tab_stop="false"
+ top="0"
+ width="30"
+ use_draw_context_alpha="false" />
+ <text
+ follows="top|left|right"
+ font="SansSerifHuge"
+ height="26"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="LtGray"
+ top="0"
+ use_ellipses="true"
+ value="Object Profile"
+ width="290" />
+ <text
+ follows="top|left"
+ height="13"
+ layout="topleft"
+ left="45"
+ name="where"
+ text_color="LtGray_50"
+ value="(Inworld)"
+ width="150" />
+ <panel
+ follows="all"
+ height="490"
+ label=""
+ layout="topleft"
+ left="10"
+ help_topic=""
+ name="properties_panel"
+ top="45"
+ width="313"
+ background_visible="true"
+ bg_alpha_color="DkGray2">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Name:"
+ top="10"
+ width="78">
+ Name:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="20"
+ layout="topleft"
+ left_delta="78"
+ max_length_bytes="63"
+ name="Object Name"
+ top_delta="0"
+ width="225" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Description:"
+ top_pad="10"
+ width="78">
+ Description:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ name="Object Description"
+ select_on_focus="true"
+ left_delta="78"
+ max_length_bytes="127"
+ top_delta="-5"
+ width="225"/>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="CreatorNameLabel"
+ top_pad="12"
+ width="78">
+ Creator:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Creator Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Owner:"
+ top_pad="15"
+ width="78">
+ Owner:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Owner Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Group_label"
+ top_pad="15"
+ width="78">
+ Group:
+ </text>
+ <button
+ follows="top|left"
+ height="10"
+ image_disabled="Activate_Checkmark"
+ image_selected="Activate_Checkmark"
+ image_unselected="Activate_Checkmark"
+ image_color="White_50"
+ layout="topleft"
+ left_pad="0"
+ top_delta="0"
+ name="button set group"
+ tab_stop="false"
+ tool_tip="Choose a group to share this object's permissions"
+ width="10" />
+ <name_box
+ follows="left|top"
+ height="18"
+ initial_value="Loading..."
+ layout="topleft"
+ left_pad="5"
+ top_delta="-1"
+ name="Group Name Proxy"
+ width="150" />
+ <button
+ follows="top|left"
+ height="23"
+ label="Deed"
+ label_selected="Deed"
+ layout="topleft"
+ name="button deed"
+ top_pad="0"
+ left="81"
+ tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="9"
+ layout="topleft"
+ top_pad="5"
+ left="5"
+ name="label click action"
+ width="280">
+ Click to:
+ </text>
+ <combo_box
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ name="clickaction"
+ width="168"
+ left="81">
+ <combo_box.item
+ label="Touch (default)"
+ name="Touch/grab(default)"
value="Touch" />
- <combo_box.item
- label="Sit on object"
- name="Sitonobject"
+ <combo_box.item
+ label="Sit on object"
+ name="Sitonobject"
value="Sit" />
- <combo_box.item
- label="Buy object"
- name="Buyobject"
+ <combo_box.item
+ label="Buy object"
+ name="Buyobject"
value="Buy" />
- <combo_box.item
- label="Pay object"
- name="Payobject"
+ <combo_box.item
+ label="Pay object"
+ name="Payobject"
value="Pay" />
- <combo_box.item
- label="Open"
- name="Open"
- value="Open" />
- </combo_box>
- <panel
- border="false"
- follows="left|top"
- layout="topleft"
- mouse_opaque="false"
- background_visible="true"
- bg_alpha_color="DkGray"
- name="perms_inv"
- left="0"
- top_pad="15"
- height="135"
- width="313">
- <text
- type="string"
- length="1"
+ <combo_box.item
+ label="Open"
+ name="Open"
+ value="Open" />
+ </combo_box>
+ <panel
+ border="false"
+ follows="left|top"
+ layout="topleft"
+ mouse_opaque="false"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ name="perms_inv"
+ left="0"
+ top_pad="15"
+ height="135"
+ width="313">
+ <text
+ type="string"
+ length="1"
left="5"
- top_pad="15"
- text_color="EmphasisColor"
- height="15"
- follows="left|top|right"
- layout="topleft"
- name="perm_modify"
- width="310">
- You can modify this object
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="Anyone can:"
- top_pad="8"
- width="100">
- Anyone:
- </text>
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox allow everyone copy"
- top_delta="-2"
- width="90" />
- <check_box
- height="18"
- label="Move"
- layout="topleft"
- name="checkbox allow everyone move"
- left_pad="0"
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="GroupLabel"
- top_pad="8"
- width="100">
- Group:
- </text>
- <check_box
- height="18"
- label="Share"
- layout="topleft"
- left_pad="90"
- top_delta="-2"
- name="checkbox share with group"
- tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="NextOwnerLabel"
- top_pad="8"
- width="200"
- word_wrap="true">
- Next owner:
- </text>
- <check_box
- height="18"
- label="Modify"
- layout="topleft"
- left="20"
- top_pad="0"
- name="checkbox next owner can modify"
- width="90" />
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can copy"
- width="90" />
- <check_box
- height="18"
- label="Transfer"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can transfer"
- tool_tip="Next owner can give away or resell this object"
- width="106" />
- </panel>
- <check_box
- height="23"
- label="For Sale"
- layout="topleft"
- left="20"
- name="checkbox for sale"
- top_pad="10"
- width="100" />
- <combo_box
- height="23"
- left_pad="0"
- layout="topleft"
- follows="left|top"
- name="sale type"
- width="170">
- <combo_box.item
- name="Copy"
- label="Copy"
- value="2" />
- <combo_box.item
- name="Contents"
- label="Contents"
- value="3" />
- <combo_box.item
- name="Original"
- label="Original"
- value="1" />
- </combo_box>
- <spinner
+ top_pad="15"
+ text_color="EmphasisColor"
+ height="15"
+ follows="left|top|right"
+ layout="topleft"
+ name="perm_modify"
+ width="310">
+ You can modify this object
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="Anyone can:"
+ top_pad="8"
+ width="100">
+ Anyone:
+ </text>
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox allow everyone copy"
+ top_delta="-2"
+ width="90" />
+ <check_box
+ height="18"
+ label="Move"
+ layout="topleft"
+ name="checkbox allow everyone move"
+ left_pad="0"
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="GroupLabel"
+ top_pad="8"
+ width="100">
+ Group:
+ </text>
+ <check_box
+ height="18"
+ label="Share"
+ layout="topleft"
+ left_pad="90"
+ top_delta="-2"
+ name="checkbox share with group"
+ tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="NextOwnerLabel"
+ top_pad="8"
+ width="200"
+ word_wrap="true">
+ Next owner:
+ </text>
+ <check_box
+ height="18"
+ label="Modify"
+ layout="topleft"
+ left="20"
+ top_pad="0"
+ name="checkbox next owner can modify"
+ width="90" />
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can copy"
+ width="90" />
+ <check_box
+ height="18"
+ label="Transfer"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can transfer"
+ tool_tip="Next owner can give away or resell this object"
+ width="106" />
+ </panel>
+ <check_box
+ height="23"
+ label="For Sale"
+ layout="topleft"
+ left="20"
+ name="checkbox for sale"
+ top_pad="10"
+ width="100" />
+ <combo_box
+ height="23"
+ left_pad="0"
+ layout="topleft"
+ follows="left|top"
+ name="sale type"
+ width="170">
+ <combo_box.item
+ name="Copy"
+ label="Copy"
+ value="2" />
+ <combo_box.item
+ name="Contents"
+ label="Contents"
+ value="3" />
+ <combo_box.item
+ name="Original"
+ label="Original"
+ value="1" />
+ </combo_box>
+ <spinner
follows="left|top"
decimal_digits="0"
increment="1"
@@ -445,17 +445,17 @@
min_val="1"
height="20"
max_val="999999999" />
- <check_box
- height="20"
- width="110"
- top_pad="6"
- label="Show in search"
- layout="topleft"
- left="120"
- name="search_check"
- tool_tip="Let people see this object in search results" />
- <text
- type="string"
+ <check_box
+ height="20"
+ width="110"
+ top_pad="6"
+ label="Show in search"
+ layout="topleft"
+ left="120"
+ name="search_check"
+ tool_tip="Let people see this object in search results" />
+ <text
+ type="string"
follows="left|top"
name="pathfinding_attributes_label"
top_pad="6"
@@ -466,7 +466,7 @@
<text
type="string"
follows="left|top"
- text_color="EmphasisColor"
+ text_color="EmphasisColor"
name="pathfinding_attributes_value"
width="130"
word_wrap="false"
@@ -475,120 +475,120 @@
<text
type="string"
text_color="EmphasisColor"
- length="1"
+ length="1"
top_pad="10"
- follows="left|top"
- layout="topleft"
- left="10"
- name="B:"
- height="10"
- width="50">
- B:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="O:"
- height="10"
- width="50">
- O:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="G:"
- height="10"
- width="50">
- G:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- left_pad="0"
- layout="topleft"
- name="E:"
- height="10"
- width="50">
- E:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="N:"
- height="10"
- width="50">
- N:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="F:"
- height="10"
- width="50">
- F:
- </text>
- </panel>
- <panel
- height="25"
- layout="bottomright"
- name="button_panel"
- left="5"
- bottom="5"
- width="313">
- <button
- follows="bottom|left"
- height="23"
- label="Open"
- layout="topleft"
- left="5"
- name="open_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Pay"
- layout="topleft"
- left_pad="5"
- name="pay_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Buy"
- layout="topleft"
- left_pad="5"
- name="buy_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Details"
- layout="topleft"
- left_pad="5"
- name="details_btn"
- top="0"
- width="74" />
+ follows="left|top"
+ layout="topleft"
+ left="10"
+ name="B:"
+ height="10"
+ width="50">
+ B:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="O:"
+ height="10"
+ width="50">
+ O:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="G:"
+ height="10"
+ width="50">
+ G:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ left_pad="0"
+ layout="topleft"
+ name="E:"
+ height="10"
+ width="50">
+ E:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="N:"
+ height="10"
+ width="50">
+ N:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="F:"
+ height="10"
+ width="50">
+ F:
+ </text>
+ </panel>
+ <panel
+ height="25"
+ layout="bottomright"
+ name="button_panel"
+ left="5"
+ bottom="5"
+ width="313">
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Open"
+ layout="topleft"
+ left="5"
+ name="open_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Pay"
+ layout="topleft"
+ left_pad="5"
+ name="pay_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Buy"
+ layout="topleft"
+ left_pad="5"
+ name="buy_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Details"
+ layout="topleft"
+ left_pad="5"
+ name="details_btn"
+ top="0"
+ width="74" />
- </panel>
+ </panel>
</panel>
diff --git a/indra/newview/tests/llmediadataclient_test.cpp b/indra/newview/tests/llmediadataclient_test.cpp
index 0254c5881f..37f94b82df 100644
--- a/indra/newview/tests/llmediadataclient_test.cpp
+++ b/indra/newview/tests/llmediadataclient_test.cpp
@@ -39,6 +39,7 @@
#include "../llvovolume.h"
#include "../../llprimitive/llmediaentry.cpp"
+#include "../../llprimitive/llmaterialid.cpp"
#include "../../llprimitive/lltextureentry.cpp"
#include "../../llmessage/tests/llcurl_stub.cpp"
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 3c3aba23f8..1bc8306826 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -1086,7 +1086,6 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libalut.so")
self.path("libopenal.so", "libopenal.so.1")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
-
# KLUDGE: As of 2012-04-11, the 'fontconfig' package installs
# libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1
# and libfontconfig.so. Before we added support for library-file
@@ -1105,7 +1104,15 @@ class Linux_i686Manifest(LinuxManifest):
# previous call did, without having to explicitly state the
# version number.
self.path("libfontconfig.so.*.*")
- self.path("libtcmalloc.so*") #formerly called google perf tools
+ try:
+ self.path("libtcmalloc.so", "libtcmalloc.so") #formerly called google perf tools
+ self.path("libtcmalloc.so.0", "libtcmalloc.so.0") #formerly called google perf tools
+ self.path("libtcmalloc.so.0.1.0", "libtcmalloc.so.0.1.0") #formerly called google perf tools
+ pass
+ except:
+ print "tcmalloc files not found, skipping"
+ pass
+
try:
self.path("libfmod-3.75.so")
pass