diff options
Diffstat (limited to 'indra')
179 files changed, 3106 insertions, 2378 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 6d17a6f402..7ba43f4b13 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -72,9 +72,9 @@ if (VIEWER) add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins) # llplugin testbed code (is this the right way to include it?) - if (NOT LINUX) + if (LL_TESTS AND NOT LINUX) add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest) - endif (NOT LINUX) + endif (LL_TESTS AND NOT LINUX) if (LINUX) add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index ad1845d387..ba3dd6d6b4 100644 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -90,14 +90,16 @@ void LLAvatarName::fromLLSD(const LLSD& sd) std::string LLAvatarName::getCompleteName() const { std::string name; - if (!mUsername.empty()) + if (mUsername.empty() || mIsDisplayNameDefault) + // If the display name feature is off + // OR this particular display name is defaulted (i.e. based on user name), + // then display only the easier to read instance of the person's name. { - name = mDisplayName + " (" + mUsername + ")"; + name = mDisplayName; } else { - // ...display names are off, legacy name is in mDisplayName - name = mDisplayName; + name = mDisplayName + " (" + mUsername + ")"; } return name; } diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 7703132d90..15e3ffe1da 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -28,8 +28,8 @@ #define LL_LLVERSIONVIEWER_H const S32 LL_VERSION_MAJOR = 2; -const S32 LL_VERSION_MINOR = 7; -const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_MINOR = 5; +const S32 LL_VERSION_PATCH = 2; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 488bd45d8f..0a4cd51ea0 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -72,6 +72,7 @@ static const std::string PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] = "shopping", "stage", "other", + "rental" }; static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] = { @@ -89,6 +90,7 @@ static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] = "Shopping", "Stage", "Other", + "Rental", "Any", // valid string for parcel searches }; @@ -188,8 +190,6 @@ void LLParcel::init(const LLUUID &owner_id, mMediaID.setNull(); mMediaAutoScale = 0; mMediaLoop = TRUE; - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); @@ -685,8 +685,8 @@ void LLParcel::packMessage(LLSD& msg) msg["auto_scale"] = getMediaAutoScale(); msg["media_loop"] = getMediaLoop(); msg["media_current_url"] = getMediaCurrentURL(); - msg["obscure_media"] = getObscureMedia(); - msg["obscure_music"] = getObscureMusic(); + msg["obscure_media"] = false; // OBSOLETE - no longer used + msg["obscure_music"] = false; // OBSOLETE - no longer used msg["media_id"] = getMediaID(); msg["media_allow_navigate"] = getMediaAllowNavigate(); msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom(); @@ -750,16 +750,13 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getS32("MediaData", "MediaWidth", mMediaWidth); msg->getS32("MediaData", "MediaHeight", mMediaHeight); msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); - msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia ); - msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic ); + // the ObscureMedia and ObscureMusic flags previously set here are no longer used } else { setMediaType(std::string("video/vnd.secondlife.qt.legacy")); setMediaDesc(std::string("No Description available without Server Upgrade")); mMediaLoop = true; - mObscureMedia = true; - mObscureMusic = true; } if(msg->getNumberOfBlocks("MediaLinkSharing") > 0) @@ -1225,8 +1222,6 @@ void LLParcel::clearParcel() setMediaDesc(LLStringUtil::null); setMediaAutoScale(0); setMediaLoop(TRUE); - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index ae301af9f5..71b65d99ce 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -165,6 +165,7 @@ public: C_SHOPPING, C_STAGE, C_OTHER, + C_RENTAL, C_COUNT, C_ANY = -1 // only useful in queries }; @@ -238,8 +239,6 @@ public: void setMediaID(const LLUUID& id) { mMediaID = id; } void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; } void setMediaLoop (U8 loop) { mMediaLoop = loop; } - void setObscureMedia( U8 flagIn ) { mObscureMedia = flagIn; } - void setObscureMusic( U8 flagIn ) { mObscureMusic = flagIn; } void setMediaWidth(S32 width); void setMediaHeight(S32 height); void setMediaCurrentURL(const std::string& url); @@ -346,8 +345,6 @@ public: U8 getMediaAutoScale() const { return mMediaAutoScale; } U8 getMediaLoop() const { return mMediaLoop; } const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; } - U8 getObscureMedia() const { return mObscureMedia; } - U8 getObscureMusic() const { return mObscureMusic; } U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; } LLSD getMediaURLFilterList() const { return mMediaURLFilterList; } U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; } @@ -636,8 +633,6 @@ protected: U8 mMediaAutoScale; U8 mMediaLoop; std::string mMediaCurrentURL; - U8 mObscureMedia; - U8 mObscureMusic; LLUUID mMediaID; U8 mMediaURLFilterEnable; LLSD mMediaURLFilterList; diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index b20bceae1d..705473b0c0 100644 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp @@ -152,7 +152,7 @@ namespace tut void host_object::test<9>() { // skip("setHostByName(\"google.com\"); getHostName() -> (e.g.) \"yx-in-f100.1e100.net\""); - std::string hostStr = "linux.org"; + std::string hostStr = "lindenlab.com"; LLHost host; host.setHostByName(hostStr); diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 3d03209eaf..a9101378a4 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -810,6 +810,22 @@ BOOL LLModel::createVolumeFacesFromFile(const std::string& file_name) return FALSE; } +void LLModel::offsetMesh( const LLVector3& pivotPoint ) +{ + LLVector4a pivot( pivotPoint[VX], pivotPoint[VY], pivotPoint[VZ] ); + + for (std::vector<LLVolumeFace>::iterator faceIt = mVolumeFaces.begin(); faceIt != mVolumeFaces.end(); ) + { + std::vector<LLVolumeFace>:: iterator currentFaceIt = faceIt++; + LLVolumeFace& face = *currentFaceIt; + LLVector4a *pos = (LLVector4a*) face.mPositions; + + for (U32 i=0; i<face.mNumVertices; ++i ) + { + pos[i].add( pivot ); + } + } +} void LLModel::optimizeVolumeFaces() { diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index ebf37904d4..c10ca1c11b 100755 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -123,7 +123,7 @@ public: void normalizeVolumeFaces(); void optimizeVolumeFaces(); - + void offsetMesh( const LLVector3& pivotPoint ); void getNormalizedScaleTranslation(LLVector3& scale_out, LLVector3& translation_out); std::vector<std::string> mMaterialList; diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index f5e85aecda..0d3f5b81bc 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -49,6 +49,7 @@ U32 LLVertexBuffer::sSetCount = 0; S32 LLVertexBuffer::sCount = 0; S32 LLVertexBuffer::sGLCount = 0; S32 LLVertexBuffer::sMappedCount = 0; +BOOL LLVertexBuffer::sDisableVBOMapping = FALSE ; BOOL LLVertexBuffer::sEnableVBOs = TRUE; U32 LLVertexBuffer::sGLRenderBuffer = 0; U32 LLVertexBuffer::sGLRenderIndices = 0; @@ -351,9 +352,21 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const } //static -void LLVertexBuffer::initClass(bool use_vbo) +void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping) { - sEnableVBOs = use_vbo; + sEnableVBOs = use_vbo && gGLManager.mHasVertexBufferObject ; + if(sEnableVBOs) + { + //llassert_always(glBindBufferARB) ; //double check the extention for VBO is loaded. + + llinfos << "VBO is enabled." << llendl ; + } + else + { + llinfos << "VBO is disabled." << llendl ; + } + + sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ; LLGLNamePool::registerPool(&sDynamicVBOPool); LLGLNamePool::registerPool(&sDynamicIBOPool); LLGLNamePool::registerPool(&sStreamVBOPool); @@ -386,6 +399,8 @@ void LLVertexBuffer::cleanupClass() LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS); unbind(); clientCopy(); // deletes GL buffers + + //llassert_always(!sCount) ; } void LLVertexBuffer::clientCopy(F64 max_time) @@ -410,7 +425,9 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) : mGLBuffer(0), mGLIndices(0), mMappedData(NULL), - mMappedIndexData(NULL), mLocked(FALSE), + mMappedIndexData(NULL), + mVertexLocked(FALSE), + mIndexLocked(FALSE), mFinal(FALSE), mFilthy(FALSE), mEmpty(TRUE), @@ -497,6 +514,8 @@ LLVertexBuffer::~LLVertexBuffer() destroyGLBuffer(); destroyGLIndices(); sCount--; + + llassert_always(!mMappedData && !mMappedIndexData) ; }; //---------------------------------------------------------------------------- @@ -645,6 +664,8 @@ void LLVertexBuffer::destroyGLBuffer() { if (useVBOs()) { + freeClientBuffer() ; + if (mMappedData || mMappedIndexData) { llerrs << "Vertex buffer destroyed while mapped!" << llendl; @@ -672,6 +693,8 @@ void LLVertexBuffer::destroyGLIndices() { if (useVBOs()) { + freeClientBuffer() ; + if (mMappedData || mMappedIndexData) { llerrs << "Vertex buffer destroyed while mapped." << llendl; @@ -848,6 +871,7 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) if (mResized && useVBOs()) { + freeClientBuffer() ; setBuffer(0); } } @@ -871,43 +895,69 @@ BOOL LLVertexBuffer::useVBOs() const } //---------------------------------------------------------------------------- +void LLVertexBuffer::freeClientBuffer() +{ + if(useVBOs() && sDisableVBOMapping && (mMappedData || mMappedIndexData)) + { + free(mMappedData) ; + free(mMappedIndexData) ; + mMappedData = NULL ; + mMappedIndexData = NULL ; + } +} + +void LLVertexBuffer::allocateClientVertexBuffer() +{ + if(!mMappedData) + { + mMappedData = (U8*)malloc(getSize()); + } +} + +void LLVertexBuffer::allocateClientIndexBuffer() +{ + if(!mMappedIndexData) + { + mMappedIndexData = (U8*)malloc(getIndicesSize()); + } +} // Map for data access -U8* LLVertexBuffer::mapBuffer(S32 access) +U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 access) { LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); if (mFinal) { - llerrs << "LLVertexBuffer::mapBuffer() called on a finalized buffer." << llendl; + llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl; } if (!useVBOs() && !mMappedData && !mMappedIndexData) { - llerrs << "LLVertexBuffer::mapBuffer() called on unallocated buffer." << llendl; + llerrs << "LLVertexBuffer::mapVertexBuffer() called on unallocated buffer." << llendl; } - if (!mLocked && useVBOs()) + if (!mVertexLocked && useVBOs()) { { LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES); - setBuffer(0); - mLocked = TRUE; + setBuffer(0, type); + mVertexLocked = TRUE; stop_glerror(); - U8* src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); - mMappedData = LL_NEXT_ALIGNED_ADDRESS<U8>(src); - mAlignedOffset = mMappedData - src; + if(sDisableVBOMapping) + { + allocateClientVertexBuffer() ; + } + else + { + U8* src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + mMappedData = LL_NEXT_ALIGNED_ADDRESS<U8>(src); + mAlignedOffset = mMappedData - src; - stop_glerror(); - } - { - LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES); - U8* src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); - mMappedIndexData = LL_NEXT_ALIGNED_ADDRESS<U8>(src); - mAlignedIndexOffset = mMappedIndexData - src; - - stop_glerror(); + stop_glerror(); + } } - + + if (!mMappedData) { log_glerror(); @@ -918,80 +968,167 @@ U8* LLVertexBuffer::mapBuffer(S32 access) llinfos << "Available physical mwmory(KB): " << avail_phy_mem << llendl ; llinfos << "Available virtual memory(KB): " << avail_vir_mem << llendl; - //-------------------- - //print out more debug info before crash - llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl ; - GLint size ; - glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size) ; - llinfos << "GL_ARRAY_BUFFER_ARB size is " << size << llendl ; - //-------------------- + if(!sDisableVBOMapping) + { + //-------------------- + //print out more debug info before crash + llinfos << "vertex buffer size: (num verts : num indices) = " << getNumVerts() << " : " << getNumIndices() << llendl ; + GLint size ; + glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &size) ; + llinfos << "GL_ARRAY_BUFFER_ARB size is " << size << llendl ; + //-------------------- - GLint buff; - glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); - if ((GLuint)buff != mGLBuffer) + GLint buff; + glGetIntegerv(GL_ARRAY_BUFFER_BINDING_ARB, &buff); + if ((GLuint)buff != mGLBuffer) + { + llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; + } + + + llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl; + } + else { - llerrs << "Invalid GL vertex buffer bound: " << buff << llendl; + llerrs << "memory allocation for vertex data failed." << llendl ; } + } + sMappedCount++; + } + + return mMappedData; +} - - llerrs << "glMapBuffer returned NULL (no vertex data)" << llendl; +U8* LLVertexBuffer::mapIndexBuffer(S32 access) +{ + LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); + if (mFinal) + { + llerrs << "LLVertexBuffer::mapIndexBuffer() called on a finalized buffer." << llendl; + } + if (!useVBOs() && !mMappedData && !mMappedIndexData) + { + llerrs << "LLVertexBuffer::mapIndexBuffer() called on unallocated buffer." << llendl; + } + + if (!mIndexLocked && useVBOs()) + { + { + LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES); + + setBuffer(0, TYPE_INDEX); + mIndexLocked = TRUE; + stop_glerror(); + + if(sDisableVBOMapping) + { + allocateClientIndexBuffer() ; + } + else + { + U8* src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + mMappedIndexData = LL_NEXT_ALIGNED_ADDRESS<U8>(src); + mAlignedIndexOffset = mMappedIndexData - src; + stop_glerror(); + } } if (!mMappedIndexData) { log_glerror(); - GLint buff; - glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); - if ((GLuint)buff != mGLIndices) + if(!sDisableVBOMapping) { - llerrs << "Invalid GL index buffer bound: " << buff << llendl; - } + GLint buff; + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); + if ((GLuint)buff != mGLIndices) + { + llerrs << "Invalid GL index buffer bound: " << buff << llendl; + } - llerrs << "glMapBuffer returned NULL (no index data)" << llendl; + llerrs << "glMapBuffer returned NULL (no index data)" << llendl; + } + else + { + llerrs << "memory allocation for Index data failed. " << llendl ; + } } sMappedCount++; } - - return mMappedData; + + return mMappedIndexData ; } -void LLVertexBuffer::unmapBuffer() +void LLVertexBuffer::unmapBuffer(S32 type) { LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER); - if (mMappedData || mMappedIndexData) + if (!useVBOs()) + { + return ; //nothing to unmap + } + + bool updated_all = false ; + if (mMappedData && mVertexLocked && type != TYPE_INDEX) { - if (useVBOs() && mLocked) + updated_all = (mIndexLocked && type < 0) ; //both vertex and index buffers done updating + + if(sDisableVBOMapping) + { + stop_glerror(); + glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, getSize(), mMappedData); + stop_glerror(); + } + else { stop_glerror(); glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); stop_glerror(); + + mMappedData = NULL; + } + + mVertexLocked = FALSE ; + sMappedCount--; + } + + if(mMappedIndexData && mIndexLocked && (type < 0 || type == TYPE_INDEX)) + { + if(sDisableVBOMapping) + { + stop_glerror(); + glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0, getIndicesSize(), mMappedIndexData); + stop_glerror(); + } + else + { + stop_glerror(); glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB); stop_glerror(); - /*if (!sMapped) - { - llerrs << "Redundantly unmapped VBO!" << llendl; - } - sMapped = FALSE;*/ - sMappedCount--; - - if (mUsage == GL_STATIC_DRAW_ARB) - { //static draw buffers can only be mapped a single time - //throw out client data (we won't be using it again) - mEmpty = TRUE; - mFinal = TRUE; - } - else + mMappedIndexData = NULL ; + } + + mIndexLocked = FALSE ; + sMappedCount--; + } + + if(updated_all) + { + if(mUsage == GL_STATIC_DRAW_ARB) + { + //static draw buffers can only be mapped a single time + //throw out client data (we won't be using it again) + mEmpty = TRUE; + mFinal = TRUE; + if(sDisableVBOMapping) { - mEmpty = FALSE; + freeClientBuffer() ; } - - mMappedIndexData = NULL; - mMappedData = NULL; - - mLocked = FALSE; + } + else + { + mEmpty = FALSE; } } } @@ -1005,15 +1142,16 @@ template <class T,S32 type> struct VertexBufferStrider strider_t& strider, S32 index) { - if (vbo.mapBuffer() == NULL) - { - llwarns << "mapBuffer failed!" << llendl; - return FALSE; - } - if (type == LLVertexBuffer::TYPE_INDEX) { S32 stride = sizeof(T); + + if (vbo.mapIndexBuffer() == NULL) + { + llwarns << "mapIndexBuffer failed!" << llendl; + return FALSE; + } + strider = (T*)(vbo.getMappedIndices() + index*stride); strider.setStride(0); return TRUE; @@ -1021,6 +1159,13 @@ template <class T,S32 type> struct VertexBufferStrider else if (vbo.hasDataType(type)) { S32 stride = LLVertexBuffer::sTypeSize[type]; + + if (vbo.mapVertexBuffer(type) == NULL) + { + llwarns << "mapVertexBuffer failed!" << llendl; + return FALSE; + } + strider = (T*)(vbo.getMappedData() + vbo.getOffset(type)+index*stride); strider.setStride(stride); return TRUE; @@ -1087,7 +1232,7 @@ bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 in //---------------------------------------------------------------------------- // Set for rendering -void LLVertexBuffer::setBuffer(U32 data_mask) +void LLVertexBuffer::setBuffer(U32 data_mask, S32 type) { LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER); //set up pointers if the data mask is different ... @@ -1228,7 +1373,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { ll_fail("LLVertexBuffer::mapBuffer failed"); } - unmapBuffer(); + unmapBuffer(type); } else { diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index 77c9da2d6c..2bbc17fb12 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -94,7 +94,7 @@ public: static BOOL sUseStreamDraw; static BOOL sPreferStreamDraw; - static void initClass(bool use_vbo); + static void initClass(bool use_vbo, bool no_vbo_mapping); static void cleanupClass(); static void setupClientArrays(U32 data_mask); static void clientCopy(F64 max_time = 0.005); //copy data from client to GL @@ -158,19 +158,24 @@ protected: void updateNumVerts(S32 nverts); void updateNumIndices(S32 nindices); virtual BOOL useVBOs() const; - void unmapBuffer(); - + void unmapBuffer(S32 type); + void freeClientBuffer() ; + void allocateClientVertexBuffer() ; + void allocateClientIndexBuffer() ; + public: LLVertexBuffer(U32 typemask, S32 usage); // map for data access - U8* mapBuffer(S32 access = -1); + U8* mapVertexBuffer(S32 type = -1, S32 access = -1); + U8* mapIndexBuffer(S32 access = -1); + // set for rendering - virtual void setBuffer(U32 data_mask); // calls setupVertexBuffer() if data_mask is not 0 + virtual void setBuffer(U32 data_mask, S32 type = -1); // calls setupVertexBuffer() if data_mask is not 0 // allocate buffer void allocateBuffer(S32 nverts, S32 nindices, bool create); virtual void resizeBuffer(S32 newnverts, S32 newnindices); - + // Only call each getVertexPointer, etc, once before calling unmapBuffer() // call unmapBuffer() after calls to getXXXStrider() before any cals to setBuffer() // example: @@ -190,7 +195,7 @@ public: bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0); BOOL isEmpty() const { return mEmpty; } - BOOL isLocked() const { return mLocked; } + BOOL isLocked() const { return mVertexLocked || mIndexLocked; } S32 getNumVerts() const { return mNumVerts; } S32 getNumIndices() const { return mNumIndices; } S32 getRequestedVerts() const { return mRequestedNumVerts; } @@ -233,14 +238,15 @@ protected: U32 mGLIndices; // GL IBO handle U8* mMappedData; // pointer to currently mapped data (NULL if unmapped) U8* mMappedIndexData; // pointer to currently mapped indices (NULL if unmapped) - BOOL mLocked; // if TRUE, buffer is being or has been written to in client memory + BOOL mVertexLocked; // if TRUE, vertex buffer is being or has been written to in client memory + BOOL mIndexLocked; // if TRUE, index buffer is being or has been written to in client memory BOOL mFinal; // if TRUE, buffer can not be mapped again BOOL mFilthy; // if TRUE, entire buffer must be copied (used to prevent redundant dirty flags) - BOOL mEmpty; // if TRUE, client buffer is empty (or NULL). Old values have been discarded. - S32 mOffsets[TYPE_MAX]; + BOOL mEmpty; // if TRUE, client buffer is empty (or NULL). Old values have been discarded. BOOL mResized; // if TRUE, client buffer has been resized and GL buffer has not BOOL mDynamicSize; // if TRUE, buffer has been resized at least once (and should be padded) - + S32 mOffsets[TYPE_MAX]; + class DirtyRegion { public: @@ -264,6 +270,7 @@ public: static std::vector<U32> sDeleteList; typedef std::list<LLVertexBuffer*> buffer_list_t; + static BOOL sDisableVBOMapping; //disable glMapBufferARB static BOOL sEnableVBOs; static S32 sTypeSize[TYPE_MAX]; static U32 sGLMode[LLRender::NUM_MODES]; diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 701d1ff706..a4d1854bc8 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -320,7 +320,7 @@ void LLComboBox::setValue(const LLSD& value) LLScrollListItem* item = mList->getFirstSelected(); if (item) { - setLabel(getSelectedItemLabel()); + updateLabel(); } mLastSelectedIndex = mList->getFirstSelectedIndex(); } @@ -388,6 +388,23 @@ void LLComboBox::setLabel(const LLStringExplicit& name) } } +void LLComboBox::updateLabel() +{ + // Update the combo editor with the selected + // item label. + if (mTextEntry) + { + mTextEntry->setText(getSelectedItemLabel()); + mTextEntry->setTentative(FALSE); + } + + // If combo box doesn't allow text entry update + // the combo button label. + if (!mAllowTextEntry) + { + mButton->setLabel(getSelectedItemLabel()); + } +} BOOL LLComboBox::remove(const std::string& name) { @@ -705,13 +722,13 @@ void LLComboBox::onItemSelected(const LLSD& data) mLastSelectedIndex = getCurrentIndex(); if (mLastSelectedIndex != -1) { - setLabel(getSelectedItemLabel()); + updateLabel(); if (mAllowTextEntry) - { - gFocusMgr.setKeyboardFocus(mTextEntry); - mTextEntry->selectAll(); - } + { + gFocusMgr.setKeyboardFocus(mTextEntry); + mTextEntry->selectAll(); + } } // hiding the list reasserts the old value stored in the text editor/dropdown button hideList(); diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index 59beba509c..64dbaea306 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -149,6 +149,9 @@ public: // This is probably a UI abuse. void setLabel(const LLStringExplicit& name); + // Updates the combobox label to match the selected list item. + void updateLabel(); + BOOL remove(const std::string& name); // remove item "name", return TRUE if found and removed BOOL setCurrentByIndex( S32 index ); diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index f6f5a0beb3..5ed2c27160 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -160,8 +160,10 @@ bool LLDockControl::isDockVisible() case TOP: { // check is dock inside parent rect + // assume that parent for all dockable flaoters + // is the root view LLRect dockParentRect = - mDockWidget->getParent()->calcScreenRect(); + mDockWidget->getRootView()->calcScreenRect(); if (dockRect.mRight <= dockParentRect.mLeft || dockRect.mLeft >= dockParentRect.mRight) { diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 19ac4c58a8..9b6830a816 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -563,7 +563,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize) } // update resize bars with new limits - LLResizeBar* last_resize_bar = NULL; + LLLayoutPanel* last_resizeable_panel = NULL; for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it) { LLPanel* panelp = (*panel_it); @@ -585,17 +585,17 @@ void LLLayoutStack::updateLayout(BOOL force_resize) BOOL resize_bar_enabled = panelp->getVisible() && (*panel_it)->mUserResize; (*panel_it)->mResizeBar->setVisible(resize_bar_enabled); - if (resize_bar_enabled) + if ((*panel_it)->mUserResize || (*panel_it)->mAutoResize) { - last_resize_bar = (*panel_it)->mResizeBar; + last_resizeable_panel = (*panel_it); } } // hide last resize bar as there is nothing past it // resize bars need to be in between two resizable panels - if (last_resize_bar) + if (last_resizeable_panel) { - last_resize_bar->setVisible(FALSE); + last_resizeable_panel->mResizeBar->setVisible(FALSE); } // not enough room to fit existing contents diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index 451e81ae93..a34de1241d 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -1,6 +1,6 @@ /** * @file lldir_linux.h - * @brief Definition of directory utilities class for linux + * @brief Definition of directory utilities class for linux * * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_LINUX +#error This header must not be included when compiling for any target other than Linux. Consider including lldir.h instead. +#endif // !LL_LINUX + #ifndef LL_LLDIR_LINUX_H #define LL_LLDIR_LINUX_H @@ -40,7 +44,7 @@ public: /*virtual*/ void initAppDirs(const std::string &app_name, const std::string& app_read_only_data_dir); -public: + virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); @@ -53,7 +57,7 @@ private: DIR *mDirp; int mCurrentDirIndex; int mCurrentDirCount; - std::string mCurrentDir; + std::string mCurrentDir; }; #endif // LL_LLDIR_LINUX_H diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h index 4eac3c3ae6..b456d3afca 100644 --- a/indra/llvfs/lldir_mac.h +++ b/indra/llvfs/lldir_mac.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_DARWIN +#error This header must not be included when compiling for any target other than Mac OS. Consider including lldir.h instead. +#endif // !LL_DARWIN + #ifndef LL_LLDIR_MAC_H #define LL_LLDIR_MAC_H @@ -39,7 +43,7 @@ public: /*virtual*/ void initAppDirs(const std::string &app_name, const std::string& app_read_only_data_dir); -public: + virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask); virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h index 4a1794f539..70fac6f818 100644 --- a/indra/llvfs/lldir_solaris.h +++ b/indra/llvfs/lldir_solaris.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_SOLARIS +#error This header must not be included when compiling for any target other than Solaris. Consider including lldir.h instead. +#endif // !LL_SOLARIS + #ifndef LL_LLDIR_SOLARIS_H #define LL_LLDIR_SOLARIS_H @@ -40,7 +44,7 @@ public: /*virtual*/ void initAppDirs(const std::string &app_name, const std::string& app_read_only_data_dir); -public: + virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); @@ -50,7 +54,7 @@ private: DIR *mDirp; int mCurrentDirIndex; int mCurrentDirCount; - std::string mCurrentDir; + std::string mCurrentDir; }; #endif // LL_LLDIR_SOLARIS_H diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h index 9a07150f0f..b170ebbcd7 100755 --- a/indra/llvfs/lldir_win32.h +++ b/indra/llvfs/lldir_win32.h @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#if !LL_WINDOWS +#error This header must not be included when compiling for any target other than Windows. Consider including lldir.h instead. +#endif // !LL_WINDOWS + #ifndef LL_LLDIR_WIN32_H #define LL_LLDIR_WIN32_H @@ -48,7 +52,7 @@ public: private: BOOL getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname); - + void* mDirSearch_h; llutf16string mCurrentDir; }; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ec6b942e3e..01610f73ed 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1323,6 +1323,18 @@ <integer>0</integer> </map> + <key>CameraFocusTransitionTime</key> + <map> + <key>Comment</key> + <string>How many seconds it takes the camera to transition between focal distances</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.5</real> + </map> + <key>CameraFNumber</key> <map> <key>Comment</key> @@ -8799,6 +8811,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>RenderVBOMappingDisable</key> + <map> + <key>Comment</key> + <string>Disable VBO glMapBufferARB</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>RenderUseStreamVBO</key> <map> <key>Comment</key> diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index a1ebbda623..c7ad0df50b 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 22 +version 23 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -36,6 +36,7 @@ RenderFogRatio 1 4.0 RenderGamma 1 0 RenderGlowResolutionPow 1 9 RenderGround 1 1 +RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderNightBrightness 1 1.0 RenderObjectBump 1 1 @@ -74,6 +75,7 @@ RenderAvatarVP 1 0 RenderFarClip 1 64 RenderFlexTimeFactor 1 0 RenderGlowResolutionPow 1 8 +RenderLocalLights 1 0 RenderMaxPartCount 1 0 RenderObjectBump 1 0 RenderReflectionDetail 1 0 @@ -102,6 +104,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 +RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 RenderReflectionDetail 1 0 @@ -129,6 +132,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderLocalLights 1 1 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 RenderReflectionDetail 1 0 @@ -156,6 +160,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderObjectBump 1 1 RenderReflectionDetail 1 4 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index 6976bcf102..10aeffef01 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -36,6 +36,7 @@ RenderFogRatio 1 4.0 RenderGamma 1 0
RenderGlowResolutionPow 1 9
RenderGround 1 1
+RenderLocalLights 1 1
RenderMaxPartCount 1 8192
RenderNightBrightness 1 1.0
RenderObjectBump 1 1
@@ -75,6 +76,7 @@ RenderAvatarVP 1 0 RenderFarClip 1 64
RenderFlexTimeFactor 1 0
RenderGlowResolutionPow 1 8
+RenderLocalLights 1 0
RenderMaxPartCount 1 0
RenderObjectBump 1 0
RenderReflectionDetail 1 0
@@ -103,6 +105,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 96
RenderFlexTimeFactor 1 1.0
RenderGlowResolutionPow 1 8
+RenderLocalLights 1 1
RenderMaxPartCount 1 2048
RenderObjectBump 1 1
RenderReflectionDetail 1 0
@@ -130,6 +133,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 128
RenderFlexTimeFactor 1 1.0
RenderGlowResolutionPow 1 9
+RenderLocalLights 1 1
RenderMaxPartCount 1 4096
RenderObjectBump 1 1
RenderReflectionDetail 1 0
@@ -157,6 +161,7 @@ RenderAvatarVP 1 1 RenderFarClip 1 256
RenderFlexTimeFactor 1 1.0
RenderGlowResolutionPow 1 9
+RenderLocalLights 1 1
RenderMaxPartCount 1 8192
RenderObjectBump 1 1
RenderReflectionDetail 1 4
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index ff7dfccc0a..771419f60a 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -240,6 +240,9 @@ void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_i LLAvalineListItem* item = new LLAvalineListItem(/*hide_number=*/false); item->setAvatarId(item_id, session_id, true, false); item->setName(item_name); + item->showLastInteractionTime(mShowLastInteractionTime); + item->showSpeakingIndicator(mShowSpeakingIndicator); + item->setOnline(false); addItem(item, item_id); mIDs.push_back(item_id); @@ -286,9 +289,18 @@ void LLAvatarList::refresh() { // *NOTE: If you change the UI to show a different string, // be sure to change the filter code below. - addNewItem(buddy_id, - av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName, - LLAvatarTracker::instance().isBuddyOnline(buddy_id)); + if (LLRecentPeople::instance().isAvalineCaller(buddy_id)) + { + const LLSD& call_data = LLRecentPeople::instance().getData(buddy_id); + addAvalineItem(buddy_id, call_data["session_id"].asUUID(), call_data["call_number"].asString()); + } + else + { + addNewItem(buddy_id, + av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName, + LLAvatarTracker::instance().isBuddyOnline(buddy_id)); + } + modified = true; nadded++; } @@ -440,7 +452,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); - if ( mContextMenu ) + if ( mContextMenu && !isAvalineItemSelected()) { uuid_vec_t selected_uuids; getSelectedUUIDs(selected_uuids); @@ -449,6 +461,21 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) return handled; } +bool LLAvatarList::isAvalineItemSelected() +{ + std::vector<LLPanel*> selected_items; + getSelectedItems(selected_items); + std::vector<LLPanel*>::iterator it = selected_items.begin(); + + for(; it != selected_items.end(); ++it) + { + if (dynamic_cast<LLAvalineListItem*>(*it)) + return true; + } + + return false; +} + void LLAvatarList::setVisible(BOOL visible) { if ( visible == FALSE && mContextMenu ) diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index cacbcf7244..4814a88a79 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -112,6 +112,8 @@ protected: private: + bool isAvalineItemSelected(); + bool mIgnoreOnlineStatus; bool mShowLastInteractionTime; bool mDirty; diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 35e4548483..d8ec4b605c 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -67,10 +67,11 @@ BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask) { if (mCanDrag) { - S32 screenX, screenY; - localPointToScreen(x, y, &screenX, &screenY); - // pass hover to bottomtray - LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); + // pass hover to bottomtray + S32 screenX, screenY; + localPointToScreen(x, y, &screenX, &screenY); + LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); + return TRUE; } else @@ -200,6 +201,7 @@ LLBottomTray::LLBottomTray(const LLSD&) mSpeakBtn(NULL), mNearbyChatBar(NULL), mChatBarContainer(NULL), + mNearbyCharResizeHandlePanel(NULL), mToolbarStack(NULL), mMovementButton(NULL), mResizeState(RS_NORESIZE), @@ -505,6 +507,23 @@ void LLBottomTray::showSnapshotButton(BOOL visible) setTrayButtonVisibleIfPossible(RS_BUTTON_SNAPSHOT, visible); } +void LLBottomTray::showSpeakButton(bool visible) +{ + // Show/hide the button + setTrayButtonVisible(RS_BUTTON_SPEAK, visible); + + // and adjust other panels according to the occupied/freed space. + const S32 panel_width = mSpeakPanel->getRect().getWidth(); + if (visible) + { + processWidthDecreased(-panel_width); + } + else + { + processWidthIncreased(panel_width); + } +} + void LLBottomTray::toggleMovementControls() { if (mMovementButton) @@ -533,6 +552,7 @@ BOOL LLBottomTray::postBuild() LLHints::registerHintTarget("chat_bar", mNearbyChatBar->LLView::getHandle()); mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel"); + mNearbyCharResizeHandlePanel = getChild<LLPanel>("chat_bar_resize_handle_panel"); mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); mMovementButton = getChild<LLButton>("movement_btn"); @@ -651,12 +671,20 @@ void LLBottomTray::onDraggableButtonHover(S32 x, S32 y) gViewerWindow->getWindow()->setCursor(UI_CURSOR_NO); } } + else + { + // Reset cursor in case you move your mouse from the drag handle to a button. + getWindow()->setCursor(UI_CURSOR_ARROW); + + } } bool LLBottomTray::isCursorOverDraggableArea(S32 x, S32 y) { + // Draggable area lasts from the nearby chat input resize handle + // to the chiclet area (exlusively). bool result = getRect().pointInRect(x, y); - result = result && mNearbyChatBar->calcScreenRect().mRight < x; + result = result && mNearbyCharResizeHandlePanel->calcScreenRect().mRight < x; result = result && mChicletPanel->calcScreenRect().mRight > x; return result; } @@ -667,10 +695,7 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() // (and according to future possible changes in the way button order is saved between sessions). state_object_map_t::const_iterator it = mStateProcessedObjectMap.begin(); state_object_map_t::const_iterator it_end = mStateProcessedObjectMap.end(); - // Speak button is currently the only draggable button not in mStateProcessedObjectMap, - // so if dragged_state is not found in that map, it should be RS_BUTTON_SPEAK. Change this code if any other - // exclusions from mStateProcessedObjectMap will become draggable. - EResizeState dragged_state = RS_BUTTON_SPEAK; + EResizeState dragged_state = RS_NORESIZE; EResizeState landing_state = RS_NORESIZE; bool landing_state_found = false; // Find states for dragged item and landing tab @@ -686,7 +711,17 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() landing_state_found = true; } } - + + if (dragged_state == RS_NORESIZE) + { + llwarns << "Cannot determine what button is being dragged" << llendl; + llassert(dragged_state != RS_NORESIZE); + return; + } + + lldebugs << "Will place " << resizeStateToString(dragged_state) + << " before " << resizeStateToString(landing_state) << llendl; + // Update order of buttons according to drag'n'drop mButtonsOrder.erase(std::find(mButtonsOrder.begin(), mButtonsOrder.end(), dragged_state)); if (!landing_state_found && mLandingTab == getChild<LLPanel>(PANEL_CHICLET_NAME)) @@ -695,9 +730,10 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() } else { - if (!landing_state_found) landing_state = RS_BUTTON_SPEAK; + if (!landing_state_found) landing_state = RS_BUTTON_SPEAK; // just a random fallback mButtonsOrder.insert(std::find(mButtonsOrder.begin(), mButtonsOrder.end(), landing_state), dragged_state); } + // Synchronize button process order with their order resize_state_vec_t::const_iterator it1 = mButtonsOrder.begin(); const resize_state_vec_t::const_iterator it_end1 = mButtonsOrder.end(); @@ -774,11 +810,12 @@ void LLBottomTray::loadButtonsOrder() // placing panels in layout stack according to button order which we loaded in previous for for (resize_state_vec_t::const_reverse_iterator it = mButtonsOrder.rbegin(); it != it_end; ++it, ++i) { - LLPanel* panel_to_move = *it == RS_BUTTON_SPEAK ? mSpeakPanel : mStateProcessedObjectMap[*it]; + LLPanel* panel_to_move = getButtonPanel(*it); mToolbarStack->movePanel(panel_to_move, NULL, true); // prepend } // Nearbychat is not stored in order settings file, but it must be the first of the panels, so moving it - // manually here + // (along with its drag handle) manually here. + mToolbarStack->movePanel(getChild<LLLayoutPanel>("chat_bar_resize_handle_panel"), NULL, true); mToolbarStack->movePanel(mChatBarContainer, NULL, true); } @@ -1178,9 +1215,8 @@ void LLBottomTray::processShowButtons(S32& available_width) bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width) { lldebugs << "Trying to show object type: " << shown_object_type << llendl; - llassert(mStateProcessedObjectMap[shown_object_type] != NULL); - LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + LLPanel* panel = getButtonPanel(shown_object_type); if (NULL == panel) { lldebugs << "There is no object to process for state: " << shown_object_type << llendl; @@ -1226,9 +1262,7 @@ void LLBottomTray::processHideButtons(S32& required_width, S32& buttons_freed_wi void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& required_width, S32& buttons_freed_width) { lldebugs << "Trying to hide object type: " << processed_object_type << llendl; - llassert(mStateProcessedObjectMap[processed_object_type] != NULL); - - LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; + LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { lldebugs << "There is no object to process for state: " << processed_object_type << llendl; @@ -1273,7 +1307,6 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ // then shrink Speak button if (required_width < 0) { - S32 panel_min_width = 0; std::string panel_name = mSpeakPanel->getName(); bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width); @@ -1309,8 +1342,7 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& required_width) { - llassert(mStateProcessedObjectMap[processed_object_type] != NULL); - LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; + LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { lldebugs << "There is no object to process for type: " << processed_object_type << llendl; @@ -1411,8 +1443,7 @@ void LLBottomTray::processExtendButtons(S32& available_width) void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width) { - llassert(mStateProcessedObjectMap[processed_object_type] != NULL); - LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; + LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { lldebugs << "There is no object to process for type: " << processed_object_type << llendl; @@ -1480,6 +1511,7 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const void LLBottomTray::initResizeStateContainers() { // init map with objects should be processed for each type + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild<LLPanel>("speak_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLPanel>("gesture_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel"))); @@ -1512,22 +1544,22 @@ void LLBottomTray::initResizeStateContainers() { const EResizeState button_type = *it; // is there an appropriate object? - llassert(mStateProcessedObjectMap.count(button_type) > 0); - if (0 == mStateProcessedObjectMap.count(button_type)) continue; + LLPanel* button_panel = getButtonPanel(button_type); + if (!button_panel) continue; // set default width for it. - mObjectDefaultWidthMap[button_type] = mStateProcessedObjectMap[button_type]->getRect().getWidth(); + mObjectDefaultWidthMap[button_type] = button_panel->getRect().getWidth(); } // ... and add Speak button because it also can be shrunk. mObjectDefaultWidthMap[RS_BUTTON_SPEAK] = mSpeakPanel->getRect().getWidth(); - } // this method must be called before restoring of the chat entry field on startup // because it resets chatbar's width according to resize logic. void LLBottomTray::initButtonsVisibility() { + setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat")); setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton")); setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton")); setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton")); @@ -1540,6 +1572,7 @@ void LLBottomTray::initButtonsVisibility() void LLBottomTray::setButtonsControlsAndListeners() { + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); @@ -1568,8 +1601,7 @@ bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, cons void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) { - llassert(mStateProcessedObjectMap[shown_object_type] != NULL); - LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + LLPanel* panel = getButtonPanel(shown_object_type); if (NULL == panel) { lldebugs << "There is no object to show for state: " << shown_object_type << llendl; @@ -1592,7 +1624,15 @@ void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible) { - LLPanel* cur_panel = mStateProcessedObjectMap[object_type]; + // The Speak button is treated specially: if voice is enabled, + // the button should be displayed no matter how much space we've got. + if (object_type == RS_BUTTON_SPEAK) + { + showSpeakButton(visible); + return true; + } + + LLPanel* cur_panel = getButtonPanel(object_type); if (NULL == cur_panel) { lldebugs << "There is no object to process for state: " << object_type << llendl; @@ -1637,7 +1677,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible for (; it != it_end; ++it) { - LLPanel * cur_panel = mStateProcessedObjectMap[*it]; + LLPanel* cur_panel = getButtonPanel(*it); sum_of_min_widths += get_panel_min_width(mToolbarStack, cur_panel); sum_of_curr_widths += get_curr_width(cur_panel); } @@ -1695,6 +1735,19 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible return is_set; } +LLPanel* LLBottomTray::getButtonPanel(EResizeState button_type) +{ + // Don't use the operator[] because it inserts a NULL value if the key is not found. + if (mStateProcessedObjectMap.count(button_type) == 0) + { + llwarns << "Cannot find a panel for " << resizeStateToString(button_type) << llendl; + llassert(mStateProcessedObjectMap.count(button_type) == 1); + return NULL; + } + + return mStateProcessedObjectMap[button_type]; +} + void LLBottomTray::showWellButton(EResizeState object_type, bool visible) { llassert( ((RS_NOTIFICATION_WELL | RS_IM_WELL) & object_type) == object_type ); @@ -1752,4 +1805,29 @@ void LLBottomTray::processChatbarCustomization(S32 new_width) } } +// static +std::string LLBottomTray::resizeStateToString(EResizeState state) +{ + switch (state) + { + case RS_NORESIZE: return "RS_NORESIZE"; + case RS_CHICLET_PANEL: return "RS_CHICLET_PANEL"; + case RS_CHATBAR_INPUT: return "RS_CHATBAR_INPUT"; + case RS_BUTTON_SNAPSHOT: return "RS_BUTTON_SNAPSHOT"; + case RS_BUTTON_CAMERA: return "RS_BUTTON_CAMERA"; + case RS_BUTTON_MOVEMENT: return "RS_BUTTON_MOVEMENT"; + case RS_BUTTON_GESTURES: return "RS_BUTTON_GESTURES"; + case RS_BUTTON_SPEAK: return "RS_BUTTON_SPEAK"; + case RS_IM_WELL: return "RS_IM_WELL"; + case RS_NOTIFICATION_WELL: return "RS_NOTIFICATION_WELL"; + case RS_BUTTON_BUILD: return "RS_BUTTON_BUILD"; + case RS_BUTTON_SEARCH: return "RS_BUTTON_SEARCH"; + case RS_BUTTON_WORLD_MAP: return "RS_BUTTON_WORLD_MAP"; + case RS_BUTTON_MINI_MAP: return "RS_BUTTON_MINI_MAP"; + case RS_BUTTONS_CAN_BE_HIDDEN: return "RS_BUTTONS_CAN_BE_HIDDEN"; + // No default to track additions. + } + return "UNKNOWN_BUTTON"; +} + //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index dc98170049..04e5f5e9e0 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -116,6 +116,7 @@ public: void showMoveButton(BOOL visible); void showCameraButton(BOOL visible); void showSnapshotButton(BOOL visible); + void showSpeakButton(bool visible); void toggleMovementControls(); void toggleCameraControls(); @@ -391,6 +392,13 @@ private: bool setVisibleAndFitWidths(EResizeState object_type, bool visible); /** + * Get panel containing the given button. + * + * @see mStateProcessedObjectMap + */ + LLPanel* getButtonPanel(EResizeState button_type); + + /** * Shows/hides panel with specified well button (IM or Notification) * * @param[in] object_type - type of well button to be processed. @@ -409,12 +417,21 @@ private: */ void processChatbarCustomization(S32 new_width); + /// Get button name for debugging. + static std::string resizeStateToString(EResizeState state); + /// Buttons automatically hidden due to lack of space. MASK mResizeState; + /** + * Mapping of button types to the layout panels the buttons are wrapped in. + * + * Used by getButtonPanel(). + */ typedef std::map<EResizeState, LLPanel*> state_object_map_t; state_object_map_t mStateProcessedObjectMap; + /// Default (maximum) widths of the layout panels. typedef std::map<EResizeState, S32> state_object_width_map_t; state_object_width_map_t mObjectDefaultWidthMap; @@ -424,6 +441,7 @@ private: * Contains order in which child buttons should be processed in show/hide, extend/shrink methods. */ resize_state_vec_t mButtonsProcessOrder; + /** * Contains order in which child buttons are shown. * It traces order of all bottomtray buttons that may change place via drag'n'drop and should @@ -451,6 +469,7 @@ protected: LLSpeakButton* mSpeakBtn; LLNearbyChatBar* mNearbyChatBar; LLLayoutPanel* mChatBarContainer; + LLPanel* mNearbyCharResizeHandlePanel; LLLayoutStack* mToolbarStack; LLMenuGL* mBottomTrayContextMenu; LLButton* mCamButton; diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d370c72a04..bdc12ec0e3 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -708,7 +708,14 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) LLVOVolume* volume = getVOVolume(); if (volume) { - pos.set(getPositionGroup().getF32ptr()); + if (getSpatialGroup()) + { + pos.set(getPositionGroup().getF32ptr()); + } + else + { + pos = getPositionAgent(); + } if (isState(LLDrawable::HAS_ALPHA)) { @@ -820,8 +827,7 @@ void LLDrawable::shiftPos(const LLVector4a &shift_vector) if (!volume && facep->hasGeometry()) { - facep->mVertexBuffer = NULL; - facep->mLastVertexBuffer = NULL; + facep->clearVertexBuffer(); } } @@ -935,6 +941,18 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) { mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY); }*/ + + if (mSpatialGroupp != groupp && getVOVolume()) + { //NULL out vertex buffer references for volumes on spatial group change to maintain + //requirement that every face vertex buffer is either NULL or points to a vertex buffer + //contained by its drawable's spatial group + for (S32 i = 0; i < getNumFaces(); ++i) + { + LLFace* facep = getFace(i); + facep->clearVertexBuffer(); + } + } + mSpatialGroupp = groupp; } diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 7f1740e29f..a2a109d5ee 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -246,13 +246,25 @@ void LLDrawPoolAlpha::render(S32 pass) if (deferred_render && pass == 1) { gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.33f); + gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, LLRender::BF_ONE_MINUS_SOURCE_ALPHA); } + else + { + mColorSFactor = LLRender::BF_SOURCE_ALPHA; // } regular alpha blend + mColorDFactor = LLRender::BF_ONE_MINUS_SOURCE_ALPHA; // } + mAlphaSFactor = LLRender::BF_ZERO; // } glow suppression + mAlphaDFactor = LLRender::BF_ONE_MINUS_SOURCE_ALPHA; // } + gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor); - mColorSFactor = LLRender::BF_SOURCE_ALPHA; // } regular alpha blend - mColorDFactor = LLRender::BF_ONE_MINUS_SOURCE_ALPHA; // } - mAlphaSFactor = LLRender::BF_ZERO; // } glow suppression - mAlphaDFactor = LLRender::BF_ONE_MINUS_SOURCE_ALPHA; // } - gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor); + if (LLPipeline::sImpostorRender) + { + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); + } + else + { + gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); + } + } renderAlpha(getVertexDataMask()); @@ -321,22 +333,10 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask) BOOL light_enabled = TRUE; S32 diffuse_channel = 0; - //BOOL is_particle = FALSE; BOOL use_shaders = (LLPipeline::sUnderWaterRender && gPipeline.canUseVertexShaders()) || gPipeline.canUseWindLightShadersOnObjects(); - // check to see if it's a particle and if it's "close" - { - if (LLPipeline::sImpostorRender) - { - gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f); - } - else - { - gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); - } - } - + for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i) { LLSpatialGroup* group = *i; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index b044a89af8..645c7ebcae 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -99,19 +99,6 @@ S32 normal_channel = -1; S32 specular_channel = -1; S32 cube_channel = -1; -static const U32 rigged_data_mask[] = { - LLDrawPoolAvatar::RIGGED_SIMPLE_MASK, - LLDrawPoolAvatar::RIGGED_FULLBRIGHT_MASK, - LLDrawPoolAvatar::RIGGED_SHINY_MASK, - LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY_MASK, - LLDrawPoolAvatar::RIGGED_GLOW_MASK, - LLDrawPoolAvatar::RIGGED_ALPHA_MASK, - LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA_MASK, - LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP_MASK, - LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE_MASK, -}; - - static LLFastTimer::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); LLDrawPoolAvatar::LLDrawPoolAvatar() : @@ -347,7 +334,14 @@ void LLDrawPoolAvatar::renderPostDeferred(S32 pass) 9, //rigged glow }; - render(actual_pass[pass]); + pass = actual_pass[pass]; + + if (LLPipeline::sImpostorRender) + { //HACK for impostors so actual pass ends up being proper pass + pass -= 2; + } + + render(pass); } @@ -1143,7 +1137,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) if (impostor) { - if (LLPipeline::sRenderDeferred && avatarp->mImpostor.isComplete()) + if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete()) { if (normal_channel > -1) { @@ -1297,17 +1291,10 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* return; } - LLVertexBuffer* buffer = face->mVertexBuffer; - - U32 data_mask = 0; - for (U32 i = 0; i < face->mRiggedIndex.size(); ++i) - { - if (face->mRiggedIndex[i] > -1) - { - data_mask |= rigged_data_mask[i]; - } - } + LLVertexBuffer* buffer = face->getVertexBuffer(); + U32 data_mask = face->getRiggedVertexBufferDataMask(); + if (!buffer || buffer->getTypeMask() != data_mask || buffer->getRequestedVerts() != vol_face.mNumVertices) @@ -1316,16 +1303,19 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* face->setIndicesIndex(0); face->setSize(vol_face.mNumVertices, vol_face.mNumIndices, true); + if (sShaderLevel > 0) { - face->mVertexBuffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB); + buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB); } else { - face->mVertexBuffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB); + buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB); } - face->mVertexBuffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), true); + buffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), true); + + face->setVertexBuffer(buffer); U16 offset = 0; @@ -1341,7 +1331,6 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* LLMatrix3 mat_normal(mat3); face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true); - buffer = face->mVertexBuffer; } if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime()) @@ -1480,9 +1469,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) stop_glerror(); - U32 data_mask = rigged_data_mask[type]; + U32 data_mask = LLFace::getRiggedDataMask(type); - LLVertexBuffer* buff = face->mVertexBuffer; + LLVertexBuffer* buff = face->getVertexBuffer(); if (buff) { @@ -1624,49 +1613,38 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type) { - if (facep->mRiggedIndex.empty()) - { - facep->mRiggedIndex.resize(LLDrawPoolAvatar::NUM_RIGGED_PASSES); - for (U32 i = 0; i < facep->mRiggedIndex.size(); ++i) - { - facep->mRiggedIndex[i] = -1; - } - } - if (type >= NUM_RIGGED_PASSES) { llerrs << "Invalid rigged face type." << llendl; } - if (facep->mRiggedIndex[type] != -1) + if (facep->getRiggedIndex(type) != -1) { llerrs << "Tried to add a rigged face that's referenced elsewhere." << llendl; } - - facep->mRiggedIndex[type] = mRiggedFace[type].size(); - facep->mDrawPoolp = this; + facep->setRiggedIndex(type, mRiggedFace[type].size()); + facep->setPool(this); mRiggedFace[type].push_back(facep); } void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep) { - - facep->mDrawPoolp = NULL; + facep->setPool(NULL); for (U32 i = 0; i < NUM_RIGGED_PASSES; ++i) { - S32 index = facep->mRiggedIndex[i]; + S32 index = facep->getRiggedIndex(i); if (index > -1) { if (mRiggedFace[i].size() > index && mRiggedFace[i][index] == facep) { - facep->mRiggedIndex[i] = -1; + facep->setRiggedIndex(i,-1); mRiggedFace[i].erase(mRiggedFace[i].begin()+index); for (U32 j = index; j < mRiggedFace[i].size(); ++j) { //bump indexes down for faces referenced after erased face - mRiggedFace[i][j]->mRiggedIndex[i] = j; + mRiggedFace[i][j]->setRiggedIndex(i, j); } } else diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 0afa8b1794..38ff3083ce 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -1121,7 +1121,11 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI { bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries ); bump_image_map_t::iterator iter = entries_list.find(source_asset_id); - if (iter != entries_list.end()) // bump not cached yet + + if (iter != entries_list.end() || + iter->second.isNull() || + iter->second->getWidth() != src->getWidth() || + iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution { LLPointer<LLImageRaw> dst_image = new LLImageRaw(src->getWidth(), src->getHeight(), 1); U8* dst_data = dst_image->getData(); diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index f1198c9a8d..195ee60a2e 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -107,11 +107,12 @@ void LLDrawPoolTree::render(S32 pass) iter != mDrawFace.end(); iter++) { LLFace *face = *iter; - if(face->mVertexBuffer.notNull()) + LLVertexBuffer* buff = face->getVertexBuffer(); + if(buff) { - face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); - face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0); - gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()); + buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); + buff->drawRange(LLRender::TRIANGLES, 0, buff->getRequestedVerts()-1, buff->getRequestedIndices(), 0); + gPipeline.addTrianglesDrawn(buff->getRequestedIndices()); } } } @@ -200,13 +201,13 @@ void LLDrawPoolTree::renderTree(BOOL selecting) LLFace *face = *iter; LLDrawable *drawablep = face->getDrawable(); - if (drawablep->isDead() || face->mVertexBuffer.isNull()) + if (drawablep->isDead() || !face->getVertexBuffer()) { continue; } - face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); - U16* indicesp = (U16*) face->mVertexBuffer->getIndicesPointer(); + face->getVertexBuffer()->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); + U16* indicesp = (U16*) face->getVertexBuffer()->getIndicesPointer(); // Render each of the trees LLVOTree *treep = (LLVOTree *)drawablep->getVObj().get(); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 863e335f4a..290115417f 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -250,6 +250,11 @@ void LLFace::setWorldMatrix(const LLMatrix4 &mat) llerrs << "Faces on this drawable are not independently modifiable\n" << llendl; } +void LLFace::setPool(LLFacePool* pool) +{ + mDrawPoolp = pool; +} + void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep) { LLMemType mt1(LLMemType::MTYPE_DRAWABLE); @@ -375,8 +380,28 @@ void LLFace::setSize(S32 num_vertices, S32 num_indices, bool align) mVertexBuffer = NULL; mLastVertexBuffer = NULL; } + + llassert(verify()); +} + +void LLFace::setGeomIndex(U16 idx) +{ + if (mGeomIndex != idx) + { + mGeomIndex = idx; + mVertexBuffer = NULL; + } } +void LLFace::setIndicesIndex(S32 idx) +{ + if (mIndicesIndex != idx) + { + mIndicesIndex = idx; + mVertexBuffer = NULL; + } +} + //============================================================================ U16 LLFace::getGeometryAvatar( @@ -579,23 +604,26 @@ void LLFace::printDebugInfo() const llinfos << "II: " << mIndicesIndex << " Count:" << mIndicesCount << llendl; llinfos << llendl; - poolp->printDebugInfo(); - - S32 pool_references = 0; - for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin(); - iter != poolp->mReferences.end(); iter++) + if (poolp) { - LLFace *facep = *iter; - if (facep == this) + poolp->printDebugInfo(); + + S32 pool_references = 0; + for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin(); + iter != poolp->mReferences.end(); iter++) { - llinfos << "Pool reference: " << pool_references << llendl; - pool_references++; + LLFace *facep = *iter; + if (facep == this) + { + llinfos << "Pool reference: " << pool_references << llendl; + pool_references++; + } } - } - if (pool_references != 1) - { - llinfos << "Incorrect number of pool references!" << llendl; + if (pool_references != 1) + { + llinfos << "Incorrect number of pool references!" << llendl; + } } #if 0 @@ -976,6 +1004,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, bool force_rebuild) { LLFastTimer t(FTM_FACE_GET_GEOM); + llassert(verify()); const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mNumVertices; S32 num_indices = (S32) vf.mNumIndices; @@ -1842,24 +1871,15 @@ BOOL LLFace::verify(const U32* indices_array) const BOOL ok = TRUE; if( mVertexBuffer.isNull() ) - { - if( mGeomCount ) - { - // This happens before teleports as faces are torn down. - // Stop the crash in DEV-31893 with a null pointer check, - // but present this info. - // To clean up the log, the geometry could be cleared, or the - // face could otherwise be marked for no ::verify. - llinfos << "Face with no vertex buffer and " << mGeomCount << " mGeomCount" << llendl; - } + { //no vertex buffer, face is implicitly valid return TRUE; } // First, check whether the face data fits within the pool's range. - if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts()) + if ((mGeomIndex + mGeomCount) > mVertexBuffer->getRequestedVerts()) { ok = FALSE; - llinfos << "Face not within pool range!" << llendl; + llinfos << "Face references invalid vertices!" << llendl; } S32 indices_count = (S32)getIndicesCount(); @@ -1875,6 +1895,12 @@ BOOL LLFace::verify(const U32* indices_array) const llinfos << "Face has bogus indices count" << llendl; } + if (mIndicesIndex + mIndicesCount > mVertexBuffer->getRequestedIndices()) + { + ok = FALSE; + llinfos << "Face references invalid indices!" << llendl; + } + #if 0 S32 geom_start = getGeomStart(); S32 geom_count = mGeomCount; @@ -2183,3 +2209,78 @@ BOOL LLFace::switchTexture() return mUsingAtlas ; } + +void LLFace::setVertexBuffer(LLVertexBuffer* buffer) +{ + mVertexBuffer = buffer; + llassert(verify()); +} + +void LLFace::clearVertexBuffer() +{ + mVertexBuffer = NULL; + mLastVertexBuffer = NULL; +} + +//static +U32 LLFace::getRiggedDataMask(U32 type) +{ + static const U32 rigged_data_mask[] = { + LLDrawPoolAvatar::RIGGED_SIMPLE_MASK, + LLDrawPoolAvatar::RIGGED_FULLBRIGHT_MASK, + LLDrawPoolAvatar::RIGGED_SHINY_MASK, + LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY_MASK, + LLDrawPoolAvatar::RIGGED_GLOW_MASK, + LLDrawPoolAvatar::RIGGED_ALPHA_MASK, + LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA_MASK, + LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP_MASK, + LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE_MASK, + }; + + llassert(type < sizeof(rigged_data_mask)/sizeof(U32)); + + return rigged_data_mask[type]; +} + +U32 LLFace::getRiggedVertexBufferDataMask() const +{ + U32 data_mask = 0; + for (U32 i = 0; i < mRiggedIndex.size(); ++i) + { + if (mRiggedIndex[i] > -1) + { + data_mask |= LLFace::getRiggedDataMask(i); + } + } + + return data_mask; +} + +S32 LLFace::getRiggedIndex(U32 type) const +{ + if (mRiggedIndex.empty()) + { + return -1; + } + + llassert(type < mRiggedIndex.size()); + + return mRiggedIndex[type]; +} + +void LLFace::setRiggedIndex(U32 type, S32 index) +{ + if (mRiggedIndex.empty()) + { + mRiggedIndex.resize(LLDrawPoolAvatar::NUM_RIGGED_PASSES); + for (U32 i = 0; i < mRiggedIndex.size(); ++i) + { + mRiggedIndex[i] = -1; + } + } + + llassert(type < mRiggedIndex.size()); + + mRiggedIndex[type] = index; +} + diff --git a/indra/newview/llface.h b/indra/newview/llface.h index cc04bf2f1c..b2170c4cf3 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -131,14 +131,14 @@ public: LLDrawable* getDrawable() const { return mDrawablep; } LLViewerObject* getViewerObject() const { return mVObjp; } S32 getLOD() const { return mVObjp.notNull() ? mVObjp->getLOD() : 0; } - LLVertexBuffer* getVertexBuffer() const { return mVertexBuffer; } void setPoolType(U32 type) { mPoolType = type; } S32 getTEOffset() { return mTEOffset; } LLViewerTexture* getTexture() const; void setViewerObject(LLViewerObject* object); void setPool(LLFacePool *pool, LLViewerTexture *texturep); - + void setPool(LLFacePool* pool); + void setDrawable(LLDrawable *drawable); void setTEOffset(const S32 te_offset); @@ -196,8 +196,8 @@ public: BOOL verify(const U32* indices_array = NULL) const; void printDebugInfo() const; - void setGeomIndex(U16 idx) { mGeomIndex = idx; } - void setIndicesIndex(S32 idx) { mIndicesIndex = idx; } + void setGeomIndex(U16 idx); + void setIndicesIndex(S32 idx); void setDrawInfo(LLDrawInfo* draw_info); F32 getTextureVirtualSize() ; @@ -218,6 +218,16 @@ public: void removeAtlas() ; BOOL switchTexture() ; + //vertex buffer tracking + void setVertexBuffer(LLVertexBuffer* buffer); + void clearVertexBuffer(); //sets mVertexBuffer and mLastVertexBuffer to NULL + LLVertexBuffer* getVertexBuffer() const { return mVertexBuffer; } + U32 getRiggedVertexBufferDataMask() const; + S32 getRiggedIndex(U32 type) const; + void setRiggedIndex(U32 type, S32 index); + + static U32 getRiggedDataMask(U32 type); + public: //aligned members LLVector4a mExtents[2]; @@ -235,8 +245,6 @@ public: LLVector2 mTexExtents[2]; F32 mDistance; - LLPointer<LLVertexBuffer> mVertexBuffer; - LLPointer<LLVertexBuffer> mLastVertexBuffer; F32 mLastUpdateTime; F32 mLastSkinTime; F32 mLastMoveTime; @@ -244,10 +252,9 @@ public: LLDrawInfo* mDrawInfo; private: - friend class LLGeometryManager; - friend class LLVolumeGeometryManager; - friend class LLDrawPoolAvatar; - + LLPointer<LLVertexBuffer> mVertexBuffer; + LLPointer<LLVertexBuffer> mLastVertexBuffer; + U32 mState; LLFacePool* mDrawPoolp; U32 mPoolType; diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 252c7b51ae..c95b046707 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -351,8 +351,8 @@ void LLFloaterAuction::doResetParcel() body["media_height"] = (S32) 0; body["auto_scale"] = (S32) 0; body["media_loop"] = (S32) 0; - body["obscure_media"] = (S32) 0; - body["obscure_music"] = (S32) 0; + body["obscure_media"] = (S32) 0; // OBSOLETE - no longer used + body["obscure_music"] = (S32) 0; // OBSOLETE - no longer used body["media_id"] = LLUUID::null; body["group_id"] = MAINTENANCE_GROUP_ID; // Use maintenance group body["pass_price"] = (S32) 10; // Defaults to $10 diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index cf7ac354b6..f65fab41e7 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -174,7 +174,6 @@ std::string lod_label_name[NUM_LOD+1] = "I went off the end of the lod_label_name array. Me so smart." }; - bool validate_face(const LLVolumeFace& face) { for (U32 i = 0; i < face.mNumIndices; ++i) @@ -603,13 +602,13 @@ void LLFloaterModelPreview::draw() gGL.begin( LLRender::QUADS ); { gGL.texCoord2f(0.f, 1.f); - gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop); + gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop-1); gGL.texCoord2f(0.f, 0.f); gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mBottom); gGL.texCoord2f(1.f, 0.f); - gGL.vertex2i(mPreviewRect.mRight, mPreviewRect.mBottom); + gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom); gGL.texCoord2f(1.f, 1.f); - gGL.vertex2i(mPreviewRect.mRight, mPreviewRect.mTop); + gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mTop-1); } gGL.end(); @@ -774,11 +773,13 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data) if (stage == "Decompose") { + sInstance->setStatusMessage(sInstance->getString("decomposing")); sInstance->childSetVisible("Decompose", false); sInstance->childSetVisible("decompose_cancel", true); } else if (stage == "Simplify") { + sInstance->setStatusMessage(sInstance->getString("simplifying")); sInstance->childSetVisible("Simplify", false); sInstance->childSetVisible("simplify_cancel", true); } @@ -824,6 +825,8 @@ void LLFloaterModelPreview::onPhysicsStageCancel(LLUICtrl* ctrl, void*data) DecompRequest* req = *iter; req->mContinue = 0; } + + sInstance->mCurRequest.clear(); } } @@ -1675,10 +1678,42 @@ void LLModelLoader::run() processElement(scene); + handlePivotPoint( root ); + doOnIdleOneTime(boost::bind(&LLModelPreview::loadModelCallback,mPreview,mLod)); } } +void LLModelLoader::handlePivotPoint( daeElement* pRoot ) +{ + //Import an optional pivot point - a pivot point is just a node in the visual scene named "AssetPivot" + //If no assetpivot is found then the asset will use the SL default + daeElement* pScene = pRoot->getDescendant("visual_scene"); + if ( pScene ) + { + daeTArray< daeSmartRef<daeElement> > children = pScene->getChildren(); + S32 childCount = children.getCount(); + for (S32 i = 0; i < childCount; ++i) + { + domNode* pNode = daeSafeCast<domNode>(children[i]); + if ( pNode && isNodeAPivotPoint( pNode ) ) + { + LLMatrix4 workingTransform; + daeSIDResolver nodeResolver( pNode, "./translate" ); + domTranslate* pTranslate = daeSafeCast<domTranslate>( nodeResolver.getElement() ); + //Translation via SID was successful + //todo#extract via element as well + if ( pTranslate ) + { + extractTranslation( pTranslate, workingTransform ); + mPreview->setModelPivot( workingTransform.getTranslation() ); + mPreview->setHasPivot( true ); + } + } + } + } +} + bool LLModelLoader::doesJointArrayContainACompleteRig( const std::vector<std::string> &jointListFromModel ) { std::deque<std::string> :: const_iterator masterJointIt = mMasterJointList.begin(); @@ -1754,6 +1789,25 @@ bool LLModelLoader::isNodeAJoint( domNode* pNode ) return false; } +bool LLModelLoader::isNodeAPivotPoint( domNode* pNode ) +{ + bool result = false; + + if ( pNode && pNode->getName() ) + { + std::string name = pNode->getName(); + if ( name == "AssetPivot" ) + { + result = true; + } + else + { + result = false; + } + } + return result; +} + void LLModelLoader::extractTranslation( domTranslate* pTranslate, LLMatrix4& transform ) { domFloat3 jointTrans = pTranslate->getValue(); @@ -2181,10 +2235,18 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) mBuildBorderMode = GLOD_BORDER_UNLOCK; mBuildOperator = GLOD_OPERATOR_EDGE_COLLAPSE; + for (U32 i = 0; i < LLModel::NUM_LODS; ++i) + { + mRequestedTriangleCount[i] = 0; + } + mViewOption["show_textures"] = false; mFMP = fmp; + mHasPivot = false; + mModelPivot = LLVector3( 0.0f, 0.0f, 0.0f ); + glodInit(); } @@ -2292,6 +2354,28 @@ void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, childSetTextArg("physics cost", "[COST]", llformat("%.3f", physics_cost)); } +void LLModelPreview::alterModelsPivot( void ) +{ + for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter) + { + if ( *iter ) + { + (*iter)->offsetMesh( mModelPivot ); + } + } + + for ( int i=0;i<LLModel::NUM_LODS;++i ) + { + for (LLModelLoader::model_list::iterator iter = mModel[i].begin(); iter != mModel[i].end(); ++iter) + { + if ( *iter ) + { + (*iter)->offsetMesh( mModelPivot ); + } + } + } +} + void LLModelPreview::rebuildUploadData() { assert_main_thread(); @@ -2347,6 +2431,7 @@ void LLModelPreview::rebuildUploadData() LLModelInstance instance = *model_iter; LLModel* base_model = instance.mModel; + if (base_model) { base_model->mRequestedLabel = requested_name; @@ -2702,9 +2787,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim lod_mode = GLOD_TRIANGLE_BUDGET; if (which_lod != -1) { - //SH-632 take budget as supplied limit+1 to prevent GLOD from creating a smaller - //decimation when the given decimation is possible - limit = mFMP->childGetValue("lod_triangle_limit").asInteger(); //+1; + limit = mFMP->childGetValue("lod_triangle_limit").asInteger(); } } else @@ -2863,13 +2946,6 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim { start = end = which_lod; } - else - { - //SH-632 -- incremenet triangle count to avoid removing any triangles from - //highest LoD when auto-generating LoD - triangle_count++; - } - mMaxTriangleLimit = base_triangle_count; @@ -2905,21 +2981,33 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim U32 actual_verts = 0; U32 submeshes = 0; + mRequestedTriangleCount[lod] = triangle_count; + glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode); stop_gloderror(); glodGroupParameteri(mGroup, GLOD_ERROR_MODE, GLOD_OBJECT_SPACE_ERROR); stop_gloderror(); - glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, triangle_count); + glodGroupParameterf(mGroup, GLOD_OBJECT_SPACE_ERROR_THRESHOLD, lod_error_threshold); stop_gloderror(); - glodGroupParameterf(mGroup, GLOD_OBJECT_SPACE_ERROR_THRESHOLD, lod_error_threshold); + glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, 0); stop_gloderror(); glodAdaptGroup(mGroup); stop_gloderror(); + if (lod_mode == GLOD_TRIANGLE_BUDGET) + { //SH-632 Always adapt to 0 before adapting to actual desired amount, and always + //add 1 to desired amount to avoid decimating below desired amount + glodGroupParameteri(mGroup, GLOD_MAX_TRIANGLES, triangle_count+1); + stop_gloderror(); + + glodAdaptGroup(mGroup); + stop_gloderror(); + } + for (U32 mdl_idx = 0; mdl_idx < mBaseModel.size(); ++mdl_idx) { LLModel* base = mBaseModel[mdl_idx]; @@ -3386,7 +3474,7 @@ void LLModelPreview::updateStatusMessages() LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit"); limit->setMaxValue(mMaxTriangleLimit); - limit->setValue(total_tris[mPreviewLOD]); + limit->setValue(mRequestedTriangleCount[mPreviewLOD]); if (lod_mode == 0) { @@ -3394,6 +3482,7 @@ void LLModelPreview::updateStatusMessages() threshold->setVisible(false); limit->setMaxValue(mMaxTriangleLimit); + limit->setIncrement(mMaxTriangleLimit/32); } else { @@ -3441,6 +3530,7 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) U32 vertex_count = 0; U32 mesh_count = 0; + LLModelLoader::model_list* model = NULL; if (lod < 0 || lod > 4) @@ -3617,7 +3707,7 @@ BOOL LLModelPreview::render() gGL.pushMatrix(); glLoadIdentity(); - gGL.color4f(0.15f, 0.2f, 0.3f, 1.f); + gGL.color4f(0.169f, 0.169f, 0.169f, 1.f); gl_rect_2d_simple( width, height ); @@ -4085,6 +4175,10 @@ void LLModelPreview::setPreviewLOD(S32 lod) mFMP->childSetTextArg("lod_table_footer", "[DETAIL]", mFMP->getString(lod_name[mPreviewLOD])); mFMP->childSetText("lod_file", mLODFile[mPreviewLOD]); + // the wizard has two lod drop downs + LLComboBox* combo_box2 = mFMP->getChild<LLComboBox>("preview_lod_combo2"); + combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order + LLColor4 highlight_color = LLUIColorTable::instance().getColor("MeshImportTableHighlightColor"); LLColor4 normal_color = LLUIColorTable::instance().getColor("MeshImportTableNormalColor"); @@ -4125,6 +4219,11 @@ void LLFloaterModelPreview::onUpload(void* user_data) LLFloaterModelPreview* mp = (LLFloaterModelPreview*) user_data; + if ( mp && mp->mModelPreview->mHasPivot ) + { + mp->mModelPreview->alterModelsPivot(); + } + mp->mModelPreview->rebuildUploadData(); gMeshRepo.uploadModel(mp->mModelPreview->mUploadData, mp->mModelPreview->mPreviewScale, @@ -4215,10 +4314,13 @@ void LLFloaterModelPreview::setStatusMessage(const std::string& msg) S32 LLFloaterModelPreview::DecompRequest::statusCallback(const char* status, S32 p1, S32 p2) { - setStatusMessage(llformat("%s: %d/%d", status, p1, p2)); - if (LLFloaterModelPreview::sInstance) + if (mContinue) { - LLFloaterModelPreview::sInstance->setStatusMessage(mStatusMessage); + setStatusMessage(llformat("%s: %d/%d", status, p1, p2)); + if (LLFloaterModelPreview::sInstance) + { + LLFloaterModelPreview::sInstance->setStatusMessage(mStatusMessage); + } } return mContinue; @@ -4226,20 +4328,27 @@ S32 LLFloaterModelPreview::DecompRequest::statusCallback(const char* status, S32 void LLFloaterModelPreview::DecompRequest::completed() { //called from the main thread - mModel->setConvexHullDecomposition(mHull); - - if (sInstance) + if (mContinue) { - if (mContinue) + mModel->setConvexHullDecomposition(mHull); + + if (sInstance) { - if (sInstance->mModelPreview) + if (mContinue) { - sInstance->mModelPreview->mPhysicsMesh[mModel] = mHullMesh; - sInstance->mModelPreview->mDirty = true; - LLFloaterModelPreview::sInstance->mModelPreview->refresh(); + if (sInstance->mModelPreview) + { + sInstance->mModelPreview->mPhysicsMesh[mModel] = mHullMesh; + sInstance->mModelPreview->mDirty = true; + LLFloaterModelPreview::sInstance->mModelPreview->refresh(); + } } - } - sInstance->mCurRequest.erase(this); + sInstance->mCurRequest.erase(this); + } + } + else if (sInstance) + { + llassert(sInstance->mCurRequest.find(this) == sInstance->mCurRequest.end()); } } diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index e1c520134b..ffda565fef 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -114,6 +114,9 @@ public: bool doesJointArrayContainACompleteRig( const std::vector<std::string> &modelJointList ); bool checkForCompleteRig( const std::vector<std::string> &jointListFromModel ); + void handlePivotPoint( daeElement* pRoot ); + bool isNodeAPivotPoint( domNode* pNode ); + void setLoadState( U32 state ) { mState = state; } U32 getLoadState( void ) { return mState; } @@ -279,7 +282,7 @@ public: void loadModelCallback(S32 lod); void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false); void generateNormals(); - + void alterModelsPivot( void ); void clearMaterials(); U32 calcResourceCost(); void rebuildUploadData(); @@ -287,7 +290,10 @@ public: void updateStatusMessages(); void clearGLODGroup(); void onLODParamCommit(bool enforce_tri_limit); - + const bool getModelPivot( void ) const { return mHasPivot; } + void setHasPivot( bool val ) { mHasPivot = val; } + void setModelPivot( const LLVector3& pivot ) { mModelPivot = pivot; } + static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); boost::signals2::connection setDetailsCallback( const details_signal_t::slot_type& cb ){ return mDetailsSignal.connect(cb); } @@ -325,6 +331,8 @@ public: U32 mBuildQueueMode; U32 mBuildOperator; U32 mBuildBorderMode; + S32 mRequestedTriangleCount[LLModel::NUM_LODS]; + LLModelLoader* mModelLoader; @@ -347,6 +355,9 @@ public: details_signal_t mDetailsSignal; model_loaded_signal_t mModelLoadedSignal; + + LLVector3 mModelPivot; + bool mHasPivot; }; diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index 095499e6b0..be43216b0e 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -485,6 +485,7 @@ BOOL LLFloaterModelWizard::postBuild() getChild<LLUICtrl>("back")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickBack, this)); getChild<LLUICtrl>("next")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickNext, this)); getChild<LLUICtrl>("preview_lod_combo")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); + getChild<LLUICtrl>("preview_lod_combo2")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); getChild<LLUICtrl>("accuracy_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onAccuracyPerformance, this, _2)); getChild<LLUICtrl>("upload")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onUpload, this)); getChild<LLUICtrl>("physics_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPhysicsChanged, this)); @@ -630,17 +631,17 @@ void LLFloaterModelWizard::draw() LLRect item_rect; preview_panel->localRectToOtherView(preview_panel->getLocalRect(), &item_rect, this); - + gGL.begin( LLRender::QUADS ); { gGL.texCoord2f(0.f, 1.f); - gGL.vertex2i(item_rect.mLeft, item_rect.mTop); + gGL.vertex2i(item_rect.mLeft, item_rect.mTop-1); gGL.texCoord2f(0.f, 0.f); gGL.vertex2i(item_rect.mLeft, item_rect.mBottom); gGL.texCoord2f(1.f, 0.f); - gGL.vertex2i(item_rect.mRight, item_rect.mBottom); + gGL.vertex2i(item_rect.mRight-1, item_rect.mBottom); gGL.texCoord2f(1.f, 1.f); - gGL.vertex2i(item_rect.mRight, item_rect.mTop); + gGL.vertex2i(item_rect.mRight-1, item_rect.mTop-1); } gGL.end(); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index bef830a93e..257970aaaf 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -221,6 +221,8 @@ BOOL LLFloaterTools::postBuild() mRadioGroupEdit = getChild<LLRadioGroup>("edit_radio_group"); mBtnGridOptions = getChild<LLButton>("Options..."); mTitleMedia = getChild<LLMediaCtrl>("title_media"); + mBtnLink = getChild<LLButton>("link_btn"); + mBtnUnlink = getChild<LLButton>("unlink_btn"); mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts"); getChild<LLUICtrl>("checkbox edit linked parts")->setValue((BOOL)gSavedSettings.getBOOL("EditLinkedParts")); @@ -316,6 +318,9 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mBtnRotateReset(NULL), mBtnRotateRight(NULL), + mBtnLink(NULL), + mBtnUnlink(NULL), + mBtnDelete(NULL), mBtnDuplicate(NULL), mBtnDuplicateInPlace(NULL), @@ -342,7 +347,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mNeedMediaTitle(TRUE) { gFloaterTools = this; - + setAutoFocus(FALSE); mFactoryMap["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions mFactoryMap["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject @@ -367,6 +372,9 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mCommitCallbackRegistrar.add("BuildTool.DeleteMedia", boost::bind(&LLFloaterTools::onClickBtnDeleteMedia,this)); mCommitCallbackRegistrar.add("BuildTool.EditMedia", boost::bind(&LLFloaterTools::onClickBtnEditMedia,this)); + mCommitCallbackRegistrar.add("BuildTool.LinkObjects", boost::bind(&LLSelectMgr::linkObjects, LLSelectMgr::getInstance())); + mCommitCallbackRegistrar.add("BuildTool.UnlinkObjects", boost::bind(&LLSelectMgr::unlinkObjects, LLSelectMgr::getInstance())); + } LLFloaterTools::~LLFloaterTools() @@ -623,6 +631,12 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); getChildView("RenderingCost")->setVisible( !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost); + mBtnLink->setVisible(edit_visible); + mBtnUnlink->setVisible(edit_visible); + + mBtnLink->setEnabled(LLSelectMgr::instance().enableLinkObjects()); + mBtnUnlink->setEnabled(LLSelectMgr::instance().enableUnlinkObjects()); + if (mCheckSelectIndividual) { mCheckSelectIndividual->setVisible(edit_visible); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 87c3d2ab47..fd81a75397 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -135,6 +135,8 @@ public: LLRadioGroup* mRadioGroupEdit; LLCheckBoxCtrl *mCheckSelectIndividual; + LLButton* mBtnLink; + LLButton* mBtnUnlink; LLCheckBoxCtrl* mCheckSnapToGrid; LLButton* mBtnGridOptions; diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index e9f1e3bc22..70e789f490 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -28,6 +28,7 @@ #include "llfriendcard.h" +#include "llagent.h" #include "llavatarnamecache.h" #include "llinventory.h" #include "llinventoryfunctions.h" @@ -290,58 +291,6 @@ void LLFriendCardsManager::syncFriendCardsFolders() boost::bind(&LLFriendCardsManager::ensureFriendsFolderExists, this)); } -void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const -{ - folderBuddiesMap.clear(); - - static bool syncronize_friends_folders = true; - if (syncronize_friends_folders) - { - // Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" folder, - // fetches their contents if needed and synchronizes it with buddies list. - // If the folders are not found they are created. - LLFriendCardsManager::instance().syncFriendCardsFolders(); - syncronize_friends_folders = false; - } - - - LLInventoryModel::cat_array_t* listFolders; - LLInventoryModel::item_array_t* items; - - // get folders in the Friend folder. Items should be NULL due to Cards should be in lists. - gInventory.getDirectDescendentsOf(findFriendFolderUUIDImpl(), listFolders, items); - - if (NULL == listFolders) - return; - - LLInventoryModel::cat_array_t::const_iterator itCats; // to iterate Friend Lists (categories) - LLInventoryModel::item_array_t::const_iterator itBuddy; // to iterate Buddies in each List - LLInventoryModel::cat_array_t* fakeCatsArg; - for (itCats = listFolders->begin(); itCats != listFolders->end(); ++itCats) - { - if (items) - items->clear(); - - // *HACK: Only Friends/All content will be shown for now - // *TODO: Remove this hack, implement sorting if it will be needded by spec. - if ((*itCats)->getUUID() != findFriendAllSubfolderUUIDImpl()) - continue; - - gInventory.getDirectDescendentsOf((*itCats)->getUUID(), fakeCatsArg, items); - - if (NULL == items) - continue; - - uuid_vec_t buddyUUIDs; - for (itBuddy = items->begin(); itBuddy != items->end(); ++itBuddy) - { - buddyUUIDs.push_back((*itBuddy)->getCreatorUUID()); - } - - folderBuddiesMap.insert(make_pair((*itCats)->getUUID(), buddyUUIDs)); - } -} - /************************************************************************/ /* Private Methods */ @@ -499,23 +448,43 @@ void LLFriendCardsManager::syncFriendsFolder() LLAvatarTracker::buddy_map_t all_buddies; LLAvatarTracker::instance().copyBuddyList(all_buddies); - // 1. Remove Friend Cards for non-friends + // 1. Check if own calling card exists LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(findFriendAllSubfolderUUIDImpl(), cats, items, LLInventoryModel::EXCLUDE_TRASH); + LLUUID friends_all_folder_id = findFriendAllSubfolderUUIDImpl(); + gInventory.collectDescendents(friends_all_folder_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); + bool own_callingcard_found = false; LLInventoryModel::item_array_t::const_iterator it; for (it = items.begin(); it != items.end(); ++it) { - lldebugs << "Check if buddy is in list: " << (*it)->getName() << " " << (*it)->getCreatorUUID() << llendl; - if (NULL == get_ptr_in_map(all_buddies, (*it)->getCreatorUUID())) + if ((*it)->getCreatorUUID() == gAgentID) { - lldebugs << "NONEXISTS, so remove it" << llendl; - removeFriendCardFromInventory((*it)->getCreatorUUID()); + own_callingcard_found = true; + break; } } + // Create own calling card if it was not found in Friends/All folder + if (!own_callingcard_found) + { + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + + create_inventory_item(gAgentID, + gAgent.getSessionID(), + friends_all_folder_id, + LLTransactionID::tnull, + av_name.getCompleteName(), + gAgentID.asString(), + LLAssetType::AT_CALLINGCARD, + LLInventoryType::IT_CALLINGCARD, + NOT_WEARABLE, + PERM_MOVE | PERM_TRANSFER, + NULL); + } + // 2. Add missing Friend Cards for friends LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); llinfos << "try to build friends, count: " << all_buddies.size() << llendl; diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index b7f0bada14..48a9f70079 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -79,19 +79,6 @@ public: */ void syncFriendCardsFolders(); - /*! - * \brief - * Collects folders' IDs with the buddies' IDs in the Inventory Calling Card/Friends folder. - * - * \param folderBuddiesMap - * map into collected data will be put. It will be cleared before adding new data. - * - * Each item in the out map is a pair where first is an LLViewerInventoryCategory UUID, - * second is a vector with UUID of Avatars from this folder. - * - */ - void collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const; - private: typedef boost::function<void()> callback_t; diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index 8caf4d3d4c..82e1f2dfb5 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -146,24 +146,43 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector3& start, const LLVector3& mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); + LLVector3 position = mPositionAgent; + + if (mSourceObject) + { //get intersection of eye through mPositionAgent to plane of source object + //using this position keeps the camera from focusing on some seemingly random + //point several meters in front of the nametag + const LLVector3& p = mSourceObject->getPositionAgent(); + const LLVector3& n = LLViewerCamera::getInstance()->getAtAxis(); + const LLVector3& eye = LLViewerCamera::getInstance()->getOrigin(); + + LLVector3 ray = position-eye; + ray.normalize(); + + LLVector3 delta = p-position; + F32 dist = delta*n; + F32 dt = dist/(ray*n); + position += ray*dt; + } + // scale screen size of borders down //RN: for now, text on hud objects is never occluded LLVector3 x_pixel_vec; LLVector3 y_pixel_vec; - LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec); + LLViewerCamera::getInstance()->getPixelVectors(position, y_pixel_vec, x_pixel_vec); LLVector3 width_vec = mWidth * x_pixel_vec; LLVector3 height_vec = mHeight * y_pixel_vec; LLCoordGL screen_pos; - LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE); + LLViewerCamera::getInstance()->projectPosAgentToScreen(position, screen_pos, FALSE); LLVector2 screen_offset; screen_offset = updateScreenPos(mPositionOffset); - LLVector3 render_position = mPositionAgent + LLVector3 render_position = position + (x_pixel_vec * screen_offset.mV[VX]) + (y_pixel_vec * screen_offset.mV[VY]); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 342d15cf0f..db3b968730 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -483,9 +483,6 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryIte switch(item->getType()) { - case LLAssetType::AT_CALLINGCARD: - return false; - break; case LLAssetType::AT_OBJECT: case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 683f455179..dcbf17e31f 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -52,6 +52,7 @@ #include "llui.h" #include "llviewercamera.h" #include "llviewerobject.h" +#include "llviewerregion.h" #include "llviewerwindow.h" #include "llhudrender.h" #include "llworld.h" @@ -89,7 +90,10 @@ F32 get_default_max_prim_scale(bool is_flora) { // a bit of a hack, but if it's foilage, we don't want to use the // new larger scale which would result in giant trees and grass - if (gSavedSettings.getBOOL("MeshEnabled") && !is_flora) + if (gSavedSettings.getBOOL("MeshEnabled") && + gAgent.getRegion() && + !gAgent.getRegion()->getCapability("GetMesh").empty() && + !is_flora) { return DEFAULT_MAX_PRIM_SCALE; } diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index af8fdb17cf..a7059eb519 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -373,17 +373,19 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) // Must be after erase. setLoaded(); // why is this here? -MG } - - // Clean up any legacy mutes - string_set_t::iterator legacy_it = mLegacyMutes.find(mute.mName); - if (legacy_it != mLegacyMutes.end()) + else { - // Database representation of legacy mute is UUID null. - LLMute mute(LLUUID::null, *legacy_it, LLMute::BY_NAME); - updateRemove(mute); - mLegacyMutes.erase(legacy_it); - // Must be after erase. - setLoaded(); // why is this here? -MG + // Clean up any legacy mutes + string_set_t::iterator legacy_it = mLegacyMutes.find(mute.mName); + if (legacy_it != mLegacyMutes.end()) + { + // Database representation of legacy mute is UUID null. + LLMute mute(LLUUID::null, *legacy_it, LLMute::BY_NAME); + updateRemove(mute); + mLegacyMutes.erase(legacy_it); + // Must be after erase. + setLoaded(); // why is this here? -MG + } } return found; @@ -607,7 +609,8 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c } // empty names can't be legacy-muted - if (name.empty()) return FALSE; + bool avatar = mute_object && mute_object->isAvatar(); + if (name.empty() || avatar) return FALSE; // Look in legacy pile string_set_t::const_iterator legacy_it = mLegacyMutes.find(name); diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index 5a943bc61d..f9730d9b71 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -91,9 +91,6 @@ BOOL LLPanelLandAudio::postBuild() mMusicURLEdit = getChild<LLLineEditor>("music_url"); childSetCommitCallback("music_url", onCommitAny, this); - mMusicUrlCheck = getChild<LLCheckBoxCtrl>("hide_music_url"); - childSetCommitCallback("hide_music_url", onCommitAny, this); - return TRUE; } @@ -117,9 +114,6 @@ void LLPanelLandAudio::refresh() mCheckSoundLocal->set( parcel->getSoundLocal() ); mCheckSoundLocal->setEnabled( can_change_media ); - mMusicUrlCheck->set( parcel->getObscureMusic() ); - mMusicUrlCheck->setEnabled( can_change_media ); - bool allow_voice = parcel->getParcelFlagAllowVoice(); LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); @@ -148,13 +142,6 @@ void LLPanelLandAudio::refresh() mCheckParcelEnableVoice->set(allow_voice); mCheckParcelVoiceLocal->set(!parcel->getParcelFlagUseEstateVoiceChannel()); - // don't display urls if you're not able to change it - // much requested change in forums so people can't 'steal' urls - // NOTE: bug#2009 means this is still vunerable - however, bug - // should be closed since this bug opens up major security issues elsewhere. - bool obscure_music = ! can_change_media && parcel->getObscureMusic(); - - mMusicURLEdit->setDrawAsterixes(obscure_music); mMusicURLEdit->setText(parcel->getMusicURL()); mMusicURLEdit->setEnabled( can_change_media ); } @@ -173,7 +160,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) // Extract data from UI BOOL sound_local = self->mCheckSoundLocal->get(); std::string music_url = self->mMusicURLEdit->getText(); - U8 obscure_music = self->mMusicUrlCheck->get(); BOOL voice_enabled = self->mCheckParcelEnableVoice->get(); BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get(); @@ -186,7 +172,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); parcel->setMusicURL(music_url); - parcel->setObscureMusic(obscure_music); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index f17defda55..b3adfac8a2 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -68,8 +68,7 @@ LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel) mMediaSizeCtrlLabel(NULL), mMediaTextureCtrl(NULL), mMediaAutoScaleCheck(NULL), - mMediaLoopCheck(NULL), - mMediaUrlCheck(NULL) + mMediaLoopCheck(NULL) { } @@ -94,9 +93,6 @@ BOOL LLPanelLandMedia::postBuild() mMediaLoopCheck = getChild<LLCheckBoxCtrl>("media_loop"); childSetCommitCallback("media_loop", onCommitAny, this ); - mMediaUrlCheck = getChild<LLCheckBoxCtrl>("hide_media_url"); - childSetCommitCallback("hide_media_url", onCommitAny, this ); - mMediaURLEdit = getChild<LLLineEditor>("media_url"); childSetCommitCallback("media_url", onCommitAny, this ); @@ -153,25 +149,6 @@ void LLPanelLandMedia::refresh() mMediaTypeCombo->setEnabled( can_change_media ); getChild<LLUICtrl>("mime_type")->setValue(mime_type); - mMediaUrlCheck->set( parcel->getObscureMedia() ); - mMediaUrlCheck->setEnabled( can_change_media ); - - // don't display urls if you're not able to change it - // much requested change in forums so people can't 'steal' urls - // NOTE: bug#2009 means this is still vunerable - however, bug - // should be closed since this bug opens up major security issues elsewhere. - bool obscure_media = ! can_change_media && parcel->getObscureMedia(); - - // Special code to disable asterixes for html type - if(mime_type == "text/html") - { - obscure_media = false; - mMediaUrlCheck->set( 0 ); - mMediaUrlCheck->setEnabled( false ); - } - - mMediaURLEdit->setDrawAsterixes( obscure_media ); - mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () ); mMediaAutoScaleCheck->setEnabled ( can_change_media ); @@ -301,7 +278,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) std::string mime_type = self->getChild<LLUICtrl>("mime_type")->getValue().asString(); U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); U8 media_loop = self->mMediaLoopCheck->get(); - U8 obscure_media = self->mMediaUrlCheck->get(); S32 media_width = (S32)self->mMediaWidthCtrl->get(); S32 media_height = (S32)self->mMediaHeightCtrl->get(); LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID(); @@ -321,7 +297,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) parcel->setMediaID(media_id); parcel->setMediaAutoScale ( media_auto_scale ); parcel->setMediaLoop ( media_loop ); - parcel->setObscureMedia( obscure_media ); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 8d3b1fd7a0..3b5830f8e0 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -81,6 +81,9 @@ const S32 MAX_PASSWORD = 16; LLPanelLogin *LLPanelLogin::sInstance = NULL; BOOL LLPanelLogin::sCapslockDidNotification = FALSE; +// Helper for converting a user name into the canonical "Firstname Lastname" form. +// For new accounts without a last name "Resident" is added as a last name. +static std::string canonicalize_username(const std::string& name); class LLLoginRefreshHandler : public LLCommandHandler { @@ -298,7 +301,14 @@ void LLPanelLogin::addFavoritesToStartLocation() for (LLSD::map_const_iterator iter = fav_llsd.beginMap(); iter != fav_llsd.endMap(); ++iter) { - if(iter->first != getChild<LLComboBox>("username_combo")->getSimple()) continue; + std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple(); + + // The account name in stored_favorites.xml has Resident last name even if user has + // a single word account name, so it can be compared case-insensitive with the + // user defined "firstname lastname". + S32 res = LLStringUtil::compareInsensitive(canonicalize_username(user_defined_name), iter->first); + if (res != 0) continue; + combo->addSeparator(); LLSD user_llsd = iter->second; for (LLSD::array_const_iterator iter1 = user_llsd.beginArray(); @@ -1156,3 +1166,28 @@ void LLPanelLogin::updateLoginPanelLinks() sInstance->getChildView("create_new_account_text")->setVisible( system_grid); sInstance->getChildView("forgot_password_text")->setVisible( system_grid); } + +std::string canonicalize_username(const std::string& name) +{ + std::string cname = name; + LLStringUtil::trim(cname); + + // determine if the username is a first/last form or not. + size_t separator_index = cname.find_first_of(" ._"); + std::string first = cname.substr(0, separator_index); + std::string last; + if (separator_index != cname.npos) + { + last = cname.substr(separator_index+1, cname.npos); + LLStringUtil::trim(last); + } + else + { + // ...on Linden grids, single username users as considered to have + // last name "Resident" + last = "Resident"; + } + + // Username in traditional "firstname lastname" form. + return first + ' ' + last; +} diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index fc6bc09b82..2bbd15ae11 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -564,16 +564,14 @@ void LLPanelNearByMedia::refreshParcelItems() if (NULL != mParcelMediaItem) { std::string name, url, tooltip; - if (!LLViewerParcelMgr::getInstance()->getAgentParcel()->getObscureMedia()) + getNameAndUrlHelper(LLViewerParcelMedia::getParcelMedia(), name, url, ""); + if (name.empty() || name == url) { - getNameAndUrlHelper(LLViewerParcelMedia::getParcelMedia(), name, url, ""); - if (name.empty() || name == url) - { - tooltip = url; - } - else { - tooltip = name + " : " + url; - } + tooltip = url; + } + else + { + tooltip = name + " : " + url; } LLViewerMediaImpl *impl = LLViewerParcelMedia::getParcelMedia(); updateListItem(mParcelMediaItem, @@ -611,10 +609,8 @@ void LLPanelNearByMedia::refreshParcelItems() bool is_playing = LLViewerMedia::isParcelAudioPlaying(); std::string url; - if (!LLViewerParcelMgr::getInstance()->getAgentParcel()->getObscureMusic()) - { - url = LLViewerMedia::getParcelAudioURL(); - } + url = LLViewerMedia::getParcelAudioURL(); + updateListItem(mParcelAudioItem, mParcelAudioName, url, diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 42da966b92..0300ea0c92 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1178,13 +1178,13 @@ void LLPanelObject::getState( ) if (mCtrlSculptMirror) { mCtrlSculptMirror->set(sculpt_mirror); - mCtrlSculptMirror->setEnabled(editable && (sculpt_stitching != LL_SCULPT_TYPE_MESH)); + mCtrlSculptMirror->setEnabled(editable); } if (mCtrlSculptInvert) { mCtrlSculptInvert->set(sculpt_invert); - mCtrlSculptInvert->setEnabled(editable && (!isMesh)); + mCtrlSculptInvert->setEnabled(editable); } if (mLabelSculptType) diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index b07a46a222..b52f33ec3b 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -384,6 +384,16 @@ private: { lldebugs << "Inventory changed: " << mask << llendl; + static bool synchronize_friends_folders = true; + if (synchronize_friends_folders) + { + // Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" folder, + // fetches their contents if needed and synchronizes it with buddies list. + // If the folders are not found they are created. + LLFriendCardsManager::instance().syncFriendCardsFolders(); + synchronize_friends_folders = false; + } + // *NOTE: deleting of InventoryItem is performed via moving to Trash. // That means LLInventoryObserver::STRUCTURE is present in MASK instead of LLInventoryObserver::REMOVE if ((CALLINGCARD_ADDED & mask) == CALLINGCARD_ADDED) @@ -750,18 +760,23 @@ void LLPanelPeople::updateFriendList() all_friendsp.clear(); online_friendsp.clear(); - LLFriendCardsManager::folderid_buddies_map_t listMap; + uuid_vec_t buddies_uuids; + LLAvatarTracker::buddy_map_t::const_iterator buddies_iter; + + // Fill the avatar list with friends UUIDs + for (buddies_iter = all_buddies.begin(); buddies_iter != all_buddies.end(); ++buddies_iter) + { + buddies_uuids.push_back(buddies_iter->first); + } - // *NOTE: For now collectFriendsLists returns data only for Friends/All folder. EXT-694. - LLFriendCardsManager::instance().collectFriendsLists(listMap); - if (listMap.size() > 0) + if (buddies_uuids.size() > 0) { - lldebugs << "Friends Cards were found, count: " << listMap.begin()->second.size() << llendl; - all_friendsp = listMap.begin()->second; + lldebugs << "Friends added to the list: " << buddies_uuids.size() << llendl; + all_friendsp = buddies_uuids; } else { - lldebugs << "Friends Cards were not found" << llendl; + lldebugs << "No friends found" << llendl; } LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp index 959fd51bbf..7689cd1a52 100644 --- a/indra/newview/llrecentpeople.cpp +++ b/indra/newview/llrecentpeople.cpp @@ -33,7 +33,7 @@ using namespace LLOldEvents; -bool LLRecentPeople::add(const LLUUID& id) +bool LLRecentPeople::add(const LLUUID& id, const LLSD& userdata) { if (id == gAgent.getID()) return false; @@ -42,10 +42,16 @@ bool LLRecentPeople::add(const LLUUID& id) if (is_not_group_id) { - LLDate date_added = LLDate::now(); + // For each avaline call the id of caller is different even if + // the phone number is the same. + // To avoid duplication of avaline list items in the recent list + // of panel People, deleting id's with similar phone number. + const LLUUID& caller_id = getIDByPhoneNumber(userdata); + if (caller_id.notNull()) + mPeople.erase(caller_id); - //[] instead of insert to replace existing id->date with new date value - mPeople[id] = date_added; + //[] instead of insert to replace existing id->llsd["date"] with new date value + mPeople[id] = userdata; mChangedSignal(); } @@ -64,15 +70,55 @@ void LLRecentPeople::get(uuid_vec_t& result) const result.push_back((*pos).first); } -const LLDate& LLRecentPeople::getDate(const LLUUID& id) const +const LLDate LLRecentPeople::getDate(const LLUUID& id) const { recent_people_t::const_iterator it = mPeople.find(id); - if (it!= mPeople.end()) return (*it).second; + if (it!= mPeople.end()) return it->second["date"].asDate(); static LLDate no_date = LLDate(); return no_date; } +const LLSD& LLRecentPeople::getData(const LLUUID& id) const +{ + recent_people_t::const_iterator it = mPeople.find(id); + + if (it != mPeople.end()) + return it->second; + + static LLSD no_data = LLSD(); + return no_data; +} + +bool LLRecentPeople::isAvalineCaller(const LLUUID& id) const +{ + recent_people_t::const_iterator it = mPeople.find(id); + + if (it != mPeople.end()) + { + const LLSD& user = it->second; + return user["avaline_call"].asBoolean(); + } + + return false; +} + +const LLUUID& LLRecentPeople::getIDByPhoneNumber(const LLSD& userdata) +{ + if (!userdata["avaline_call"].asBoolean()) + return LLUUID::null; + + for (recent_people_t::const_iterator it = mPeople.begin(); it != mPeople.end(); ++it) + { + const LLSD& user_info = it->second; + + if (user_info["call_number"].asString() == userdata["call_number"].asString()) + return it->first; + } + + return LLUUID::null; +} + // virtual bool LLRecentPeople::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { diff --git a/indra/newview/llrecentpeople.h b/indra/newview/llrecentpeople.h index 852a92ff80..d0d6376867 100644 --- a/indra/newview/llrecentpeople.h +++ b/indra/newview/llrecentpeople.h @@ -58,9 +58,15 @@ public: * Add specified avatar to the list if it's not there already. * * @param id avatar to add. + * + * @param userdata additional information about last interaction party. + * For example when last interaction party is not an avatar + * but an avaline caller, additional info (such as phone + * number, session id and etc.) should be added. + * * @return false if the avatar is in the list already, true otherwise */ - bool add(const LLUUID& id); + bool add(const LLUUID& id, const LLSD& userdata = LLSD().with("date", LLDate::now())); /** * @param id avatar to search. @@ -75,7 +81,25 @@ public: */ void get(uuid_vec_t& result) const; - const LLDate& getDate(const LLUUID& id) const; + /** + * Returns last interaction time with specified participant + * + */ + const LLDate getDate(const LLUUID& id) const; + + /** + * Returns data about specified participant + * + * @param id identifier of specific participant + */ + const LLSD& getData(const LLUUID& id) const; + + /** + * Checks whether specific participant is an avaline caller + * + * @param id identifier of specific participant + */ + bool isAvalineCaller(const LLUUID& id) const; /** * Set callback to be called when the list changed. @@ -92,7 +116,10 @@ public: /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); private: - typedef std::map<LLUUID, LLDate> recent_people_t; + + const LLUUID& getIDByPhoneNumber(const LLSD& userdata); + + typedef std::map<LLUUID, LLSD> recent_people_t; recent_people_t mPeople; signal_t mChangedSignal; }; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 93c9131424..b139ba361e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -66,6 +66,7 @@ #include "llmenugl.h" #include "llmeshrepository.h" #include "llmutelist.h" +#include "llnotificationsutil.h" #include "llsidepaneltaskinfo.h" #include "llslurl.h" #include "llstatusbar.h" @@ -562,6 +563,103 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id) return object_found; } +bool LLSelectMgr::linkObjects() +{ + if (!LLSelectMgr::getInstance()->selectGetAllRootsValid()) + { + LLNotificationsUtil::add("UnableToLinkWhileDownloading"); + return true; + } + + S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); + if (object_count > MAX_CHILDREN_PER_TASK + 1) + { + LLSD args; + args["COUNT"] = llformat("%d", object_count); + int max = MAX_CHILDREN_PER_TASK+1; + args["MAX"] = llformat("%d", max); + LLNotificationsUtil::add("UnableToLinkObjects", args); + return true; + } + + if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) + { + LLNotificationsUtil::add("CannotLinkIncompleteSet"); + return true; + } + + if (!LLSelectMgr::getInstance()->selectGetRootsModify()) + { + LLNotificationsUtil::add("CannotLinkModify"); + return true; + } + + LLUUID owner_id; + std::string owner_name; + if (!LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name)) + { + // we don't actually care if you're the owner, but novices are + // the most likely to be stumped by this one, so offer the + // easiest and most likely solution. + LLNotificationsUtil::add("CannotLinkDifferentOwners"); + return true; + } + + LLSelectMgr::getInstance()->sendLink(); + + return true; +} + +bool LLSelectMgr::unlinkObjects() +{ + LLSelectMgr::getInstance()->sendDelink(); + return true; +} + +// in order to link, all objects must have the same owner, and the +// agent must have the ability to modify all of the objects. However, +// we're not answering that question with this method. The question +// we're answering is: does the user have a reasonable expectation +// that a link operation should work? If so, return true, false +// otherwise. this allows the handle_link method to more finely check +// the selection and give an error message when the uer has a +// reasonable expectation for the link to work, but it will fail. +bool LLSelectMgr::enableLinkObjects() +{ + bool new_value = false; + // check if there are at least 2 objects selected, and that the + // user can modify at least one of the selected objects. + + // in component mode, can't link + if (!gSavedSettings.getBOOL("EditLinkedParts")) + { + if(LLSelectMgr::getInstance()->selectGetAllRootsValid() && LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() >= 2) + { + struct f : public LLSelectedObjectFunctor + { + virtual bool apply(LLViewerObject* object) + { + return object->permModify(); + } + } func; + const bool firstonly = true; + new_value = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly); + } + } + return new_value; +} + +bool LLSelectMgr::enableUnlinkObjects() +{ + LLViewerObject* first_editable_object = LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject(); + + bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() && + first_editable_object && + !first_editable_object->isAttachment(); + + return new_value; +} + void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim, BOOL include_entire_object) { // bail if nothing selected or if object wasn't selected in the first place @@ -3804,6 +3902,26 @@ void LLSelectMgr::sendDelink() return; } + struct f : public LLSelectedObjectFunctor + { //on delink, any modifyable object should + f() {} + + virtual bool apply(LLViewerObject* object) + { + if (object->permModify()) + { + if (object->getPhysicsShapeType() == LLViewerObject::PHYSICS_SHAPE_NONE) + { + object->setPhysicsShapeType(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL); + object->updateFlags(); + } + } + return true; + } + } sendfunc; + getSelection()->applyToObjects(&sendfunc); + + // Delink needs to send individuals so you can unlink a single object from // a linked set. sendListToRegions( @@ -5468,7 +5586,10 @@ void pushWireframe(LLDrawable* drawable) for (S32 i = 0; i < drawable->getNumFaces(); ++i) { LLFace* face = drawable->getFace(i); - pushVerts(face, LLVertexBuffer::MAP_VERTEX); + if (face->verify()) + { + pushVerts(face, LLVertexBuffer::MAP_VERTEX); + } } } } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 1b354f983a..031898d7c5 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -449,6 +449,17 @@ public: BOOL removeObjectFromSelections(const LLUUID &id); //////////////////////////////////////////////////////////////// + // Selection editing + //////////////////////////////////////////////////////////////// + bool linkObjects(); + + bool unlinkObjects(); + + bool enableLinkObjects(); + + bool enableUnlinkObjects(); + + //////////////////////////////////////////////////////////////// // Selection accessors //////////////////////////////////////////////////////////////// LLObjectSelectionHandle getSelection() { return mSelectedObjects; } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 14775f0f21..5e7af6bbb3 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1486,8 +1486,7 @@ void LLSpatialGroup::destroyGL() for (S32 j = 0; j < drawable->getNumFaces(); j++) { LLFace* facep = drawable->getFace(j); - facep->mVertexBuffer = NULL; - facep->mLastVertexBuffer = NULL; + facep->clearVertexBuffer(); } } } @@ -2433,7 +2432,9 @@ void pushVerts(LLSpatialGroup* group, U32 mask) void pushVerts(LLFace* face, U32 mask) { - LLVertexBuffer* buffer = face->mVertexBuffer; + llassert(face->verify()); + + LLVertexBuffer* buffer = face->getVertexBuffer(); if (buffer) { @@ -2580,7 +2581,7 @@ void renderOctree(LLSpatialGroup* group) for (S32 j = 0; j < drawable->getNumFaces(); j++) { LLFace* face = drawable->getFace(j); - if (face->mVertexBuffer.notNull()) + if (face->getVertexBuffer()) { if (gFrameTimeSeconds - face->mLastUpdateTime < 0.5f) { @@ -2595,10 +2596,10 @@ void renderOctree(LLSpatialGroup* group) continue; } - face->mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX); + face->getVertexBuffer()->setBuffer(LLVertexBuffer::MAP_VERTEX); //drawBox((face->mExtents[0] + face->mExtents[1])*0.5f, // (face->mExtents[1]-face->mExtents[0])*0.5f); - face->mVertexBuffer->draw(LLRender::TRIANGLES, face->getIndicesCount(), face->getIndicesStart()); + face->getVertexBuffer()->draw(LLRender::TRIANGLES, face->getIndicesCount(), face->getIndicesStart()); } } @@ -3374,7 +3375,7 @@ void renderPhysicsShapes(LLSpatialGroup* group) for (S32 i = 0; i < drawable->getNumFaces(); ++i) { LLFace* face = drawable->getFace(i); - LLVertexBuffer* buff = face->mVertexBuffer; + LLVertexBuffer* buff = face->getVertexBuffer(); if (buff) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp index a69592b61c..4bde2dfcab 100644 --- a/indra/newview/llsprite.cpp +++ b/indra/newview/llsprite.cpp @@ -186,14 +186,15 @@ void LLSprite::updateFace(LLFace &face) U16 index_offset; // Setup face - if (face.mVertexBuffer.isNull()) + if (!face.getVertexBuffer()) { - face.mVertexBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | + LLVertexBuffer* buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STREAM_DRAW_ARB); - face.mVertexBuffer->allocateBuffer(4, 12, TRUE); + buff->allocateBuffer(4, 12, TRUE); face.setGeomIndex(0); face.setIndicesIndex(0); + face.setVertexBuffer(buff); } index_offset = face.getGeometry(verticesp,normalsp,tex_coordsp, indicesp); @@ -242,7 +243,7 @@ void LLSprite::updateFace(LLFace &face) *indicesp++ = 3 + index_offset; } - face.mVertexBuffer->setBuffer(0); + face.getVertexBuffer()->setBuffer(0); face.mCenterAgent = mPosition; } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 46aa44b2bb..9385a6ae84 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -628,6 +628,7 @@ void settings_setup_listeners() gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); + gSavedSettings.getControl("RenderVBOMappingDisable")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderUseStreamVBO")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderPreferStreamDraw")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _2)); diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index aa6da5c9f3..77c8bb0329 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -511,7 +511,7 @@ int compare_int(const void *a, const void *b) U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) { if (!mValid || !mMesh || !mFace || !mVisible || - mFace->mVertexBuffer.isNull() || + !mFace->getVertexBuffer() || mMesh->getNumFaces() == 0) { return 0; @@ -582,7 +582,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) gGL.getTexUnit(diffuse_channel)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT)); } - mFace->mVertexBuffer->setBuffer(sRenderMask); + mFace->getVertexBuffer()->setBuffer(sRenderMask); U32 start = mMesh->mFaceVertexOffset; U32 end = start + mMesh->mFaceVertexCount - 1; @@ -599,14 +599,14 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) } } - mFace->mVertexBuffer->drawRange(LLRender::TRIANGLES, start, end, count, offset); + mFace->getVertexBuffer()->drawRange(LLRender::TRIANGLES, start, end, count, offset); } else { glPushMatrix(); LLMatrix4 jointToWorld = getWorldMatrix(); glMultMatrixf((GLfloat*)jointToWorld.mMatrix); - mFace->mVertexBuffer->drawRange(LLRender::TRIANGLES, start, end, count, offset); + mFace->getVertexBuffer()->drawRange(LLRender::TRIANGLES, start, end, count, offset); glPopMatrix(); } gPipeline.addTrianglesDrawn(count); @@ -661,7 +661,7 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w mFace = face; - if (mFace->mVertexBuffer.isNull()) + if (!mFace->getVertexBuffer()) { return; } @@ -693,7 +693,7 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w if (num_verts) { face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp); - face->mVertexBuffer->getIndexStrider(indicesp); + face->getVertexBuffer()->getIndexStrider(indicesp); verticesp += mMesh->mFaceVertexOffset; normalsp += mMesh->mFaceVertexOffset; @@ -758,7 +758,7 @@ void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh) LLStrider<LLVector3> o_normals; //get vertex and normal striders - LLVertexBuffer* buffer = mFace->mVertexBuffer; + LLVertexBuffer* buffer = mFace->getVertexBuffer(); buffer->getVertexStrider(o_vertices, 0); buffer->getNormalStrider(o_normals, 0); @@ -869,7 +869,7 @@ void LLViewerJointMesh::updateJointGeometry() && mMesh && mFace && mMesh->hasWeights() - && mFace->mVertexBuffer.notNull() + && mFace->getVertexBuffer() && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) == 0)) { return; diff --git a/indra/newview/llviewerjointmesh_sse.cpp b/indra/newview/llviewerjointmesh_sse.cpp index e3b40f6943..400b49d046 100644 --- a/indra/newview/llviewerjointmesh_sse.cpp +++ b/indra/newview/llviewerjointmesh_sse.cpp @@ -83,7 +83,7 @@ void LLViewerJointMesh::updateGeometrySSE(LLFace *face, LLPolyMesh *mesh) LLStrider<LLVector3> o_vertices; LLStrider<LLVector3> o_normals; - LLVertexBuffer *buffer = face->mVertexBuffer; + LLVertexBuffer *buffer = face->getVertexBuffer(); buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset); buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset); diff --git a/indra/newview/llviewerjointmesh_sse2.cpp b/indra/newview/llviewerjointmesh_sse2.cpp index 5871823dde..c2296dd569 100644 --- a/indra/newview/llviewerjointmesh_sse2.cpp +++ b/indra/newview/llviewerjointmesh_sse2.cpp @@ -90,7 +90,7 @@ void LLViewerJointMesh::updateGeometrySSE2(LLFace *face, LLPolyMesh *mesh) LLStrider<LLVector3> o_vertices; LLStrider<LLVector3> o_normals; - LLVertexBuffer *buffer = face->mVertexBuffer; + LLVertexBuffer *buffer = face->getVertexBuffer(); buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset); buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 37aa080228..3323828d4f 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -937,6 +937,10 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_FACE_AREA; } + else if ("lod info" == info_display) + { + return LLPipeline::RENDER_DEBUG_LOD_INFO; + } else if ("build queue" == info_display) { return LLPipeline::RENDER_DEBUG_BUILD_QUEUE; @@ -2848,7 +2852,7 @@ class LLObjectMute : public view_listener_t } LLMute mute(id, name, type); - if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) + if (LLMuteList::getInstance()->isMuted(mute.mID)) { LLMuteList::getInstance()->remove(mute); } @@ -4794,110 +4798,6 @@ class LLToolsSelectNextPart : public view_listener_t } }; -// in order to link, all objects must have the same owner, and the -// agent must have the ability to modify all of the objects. However, -// we're not answering that question with this method. The question -// we're answering is: does the user have a reasonable expectation -// that a link operation should work? If so, return true, false -// otherwise. this allows the handle_link method to more finely check -// the selection and give an error message when the uer has a -// reasonable expectation for the link to work, but it will fail. -class LLToolsEnableLink : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = false; - // check if there are at least 2 objects selected, and that the - // user can modify at least one of the selected objects. - - // in component mode, can't link - if (!gSavedSettings.getBOOL("EditLinkedParts")) - { - if(LLSelectMgr::getInstance()->selectGetAllRootsValid() && LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() >= 2) - { - struct f : public LLSelectedObjectFunctor - { - virtual bool apply(LLViewerObject* object) - { - return object->permModify(); - } - } func; - const bool firstonly = true; - new_value = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly); - } - } - return new_value; - } -}; - -class LLToolsLink : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - if(!LLSelectMgr::getInstance()->selectGetAllRootsValid()) - { - LLNotificationsUtil::add("UnableToLinkWhileDownloading"); - return true; - } - - S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); - if (object_count > MAX_CHILDREN_PER_TASK + 1) - { - LLSD args; - args["COUNT"] = llformat("%d", object_count); - int max = MAX_CHILDREN_PER_TASK+1; - args["MAX"] = llformat("%d", max); - LLNotificationsUtil::add("UnableToLinkObjects", args); - return true; - } - - if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2) - { - LLNotificationsUtil::add("CannotLinkIncompleteSet"); - return true; - } - if(!LLSelectMgr::getInstance()->selectGetRootsModify()) - { - LLNotificationsUtil::add("CannotLinkModify"); - return true; - } - LLUUID owner_id; - std::string owner_name; - if(!LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name)) - { - // we don't actually care if you're the owner, but novices are - // the most likely to be stumped by this one, so offer the - // easiest and most likely solution. - LLNotificationsUtil::add("CannotLinkDifferentOwners"); - return true; - } - LLSelectMgr::getInstance()->sendLink(); - return true; - } -}; - -class LLToolsEnableUnlink : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLViewerObject* first_editable_object = LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject(); - bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() && - first_editable_object && - !first_editable_object->isAttachment(); - return new_value; - } -}; - -class LLToolsUnlink : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLSelectMgr::getInstance()->sendDelink(); - return true; - } -}; - - class LLToolsStopAllAnimations : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7915,8 +7815,8 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY"); view_listener_t::addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid"); view_listener_t::addMenu(new LLToolsSelectNextPart(), "Tools.SelectNextPart"); - view_listener_t::addMenu(new LLToolsLink(), "Tools.Link"); - view_listener_t::addMenu(new LLToolsUnlink(), "Tools.Unlink"); + commit.add("Tools.Link", boost::bind(&LLSelectMgr::linkObjects, LLSelectMgr::getInstance())); + commit.add("Tools.Unlink", boost::bind(&LLSelectMgr::unlinkObjects, LLSelectMgr::getInstance())); view_listener_t::addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations"); view_listener_t::addMenu(new LLToolsReleaseKeys(), "Tools.ReleaseKeys"); view_listener_t::addMenu(new LLToolsEnableReleaseKeys(), "Tools.EnableReleaseKeys"); @@ -7929,8 +7829,8 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie"); view_listener_t::addMenu(new LLToolsEnableSelectNextPart(), "Tools.EnableSelectNextPart"); - view_listener_t::addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); - view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); + enable.add("Tools.EnableLink", boost::bind(&LLSelectMgr::enableLinkObjects, LLSelectMgr::getInstance())); + enable.add("Tools.EnableUnlink", boost::bind(&LLSelectMgr::enableUnlinkObjects, LLSelectMgr::getInstance())); view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f3cbb8cce3..d0de742283 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3761,8 +3761,19 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) } else { - // This is likely just the initial logging in phase. + // This is initial log-in or a region crossing gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); + + if(LLStartUp::getStartupState() < STATE_STARTED) + { // This is initial log-in, not a region crossing: + // Set the camera looking ahead of the AV so send_agent_update() below + // will report the correct location to the server. + LLVector3 look_at_point = look_at; + look_at_point = agent_pos + look_at_point.rotVec(gAgent.getQuat()); + + static LLVector3 up_direction(0.0f, 0.0f, 1.0f); + LLViewerCamera::getInstance()->lookAt(agent_pos, look_at_point, up_direction); + } } if ( LLTracker::isTracking(NULL) ) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 4f71f8ea87..1aa9987fd9 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1184,13 +1184,14 @@ void LLViewerObjectList::clearDebugText() void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { LLMemType mt(LLMemType::MTYPE_OBJECT); - if (mDeadObjects.count(objectp->mID)) + if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) { - llinfos << "Object " << objectp->mID << " already on dead list, ignoring cleanup!" << llendl; - return; + llinfos << "Object " << objectp->mID << " already on dead list!" << llendl; + } + else + { + mDeadObjects.insert(objectp->mID); } - - mDeadObjects.insert(std::pair<LLUUID, LLPointer<LLViewerObject> >(objectp->mID, objectp)); // Cleanup any references we have to this object // Remove from object map so noone can look it up. @@ -1506,6 +1507,45 @@ bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp) return false ; } +//make sure the region is cleaned up. +void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp) +{ + std::set<LLViewerObject*> dead_object_list ; + std::set<LLViewerObject*> region_object_list ; + for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) + { + LLViewerObject* objectp = *iter; + + if(objectp->isDead()) + { + dead_object_list.insert(objectp) ; + } + else if(objectp->getRegion() == regionp) + { + region_object_list.insert(objectp) ; + } + } + + if(dead_object_list.size() > 0) + { + llwarns << "There are " << dead_object_list.size() << " dead objects on the map!" << llendl ; + + for(std::set<LLViewerObject*>::iterator iter = dead_object_list.begin(); iter != dead_object_list.end(); ++iter) + { + cleanupReferences(*iter) ; + } + } + if(region_object_list.size() > 0) + { + llwarns << "There are " << region_object_list.size() << " objects not removed from the deleted region!" << llendl ; + + for(std::set<LLViewerObject*>::iterator iter = region_object_list.begin(); iter != region_object_list.end(); ++iter) + { + (*iter)->markDead() ; + } + } +} + void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); @@ -1525,7 +1565,11 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLViewerObject* objectp = *iter; - llassert_always(!objectp->isDead()); + //llassert_always(!objectp->isDead()); + if(objectp->isDead())//some dead objects somehow not cleaned. + { + continue ; + } if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment()) { diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 4830f5912b..65374bca70 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -104,6 +104,7 @@ public: void shiftObjects(const LLVector3 &offset); bool hasMapObjectInRegion(LLViewerRegion* regionp) ; + void clearAllMapObjectsInRegion(LLViewerRegion* regionp) ; void renderObjectsForMap(LLNetMap &netmap); void renderObjectBounds(const LLVector3 ¢er); @@ -197,8 +198,7 @@ protected: vobj_list_t mMapObjects; - typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map; - vo_map mDeadObjects; // Need to keep multiple entries per UUID + std::set<LLUUID> mDeadObjects; std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1c573eab00..093e94add0 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -318,6 +318,14 @@ public: std::string rwind_vector_text; std::string audio_text; + static const std::string beacon_particle = LLTrans::getString("BeaconParticle"); + static const std::string beacon_physical = LLTrans::getString("BeaconPhysical"); + static const std::string beacon_scripted = LLTrans::getString("BeaconScripted"); + static const std::string beacon_scripted_touch = LLTrans::getString("BeaconScriptedTouch"); + static const std::string beacon_sound = LLTrans::getString("BeaconSound"); + static const std::string beacon_media = LLTrans::getString("BeaconMedia"); + static const std::string particle_hiding = LLTrans::getString("ParticleHiding"); + // Draw the statistics in a light gray // and in a thin font mTextColor = LLColor4( 0.86f, 0.86f, 0.86f, 1.f ); @@ -611,33 +619,33 @@ public: { if (LLPipeline::getRenderParticleBeacons(NULL)) { - addText(xpos, ypos, "Viewing particle beacons (blue)"); + addText(xpos, ypos, beacon_particle); ypos += y_inc; } if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES)) { - addText(xpos, ypos, "Hiding particles"); + addText(xpos, ypos, particle_hiding); ypos += y_inc; } if (LLPipeline::getRenderPhysicalBeacons(NULL)) { - addText(xpos, ypos, "Viewing physical object beacons (green)"); + addText(xpos, ypos, beacon_physical); ypos += y_inc; } if (LLPipeline::getRenderScriptedBeacons(NULL)) { - addText(xpos, ypos, "Viewing scripted object beacons (red)"); + addText(xpos, ypos, beacon_scripted); ypos += y_inc; } else if (LLPipeline::getRenderScriptedTouchBeacons(NULL)) { - addText(xpos, ypos, "Viewing scripted object with touch function beacons (red)"); + addText(xpos, ypos, beacon_scripted_touch); ypos += y_inc; } if (LLPipeline::getRenderSoundBeacons(NULL)) { - addText(xpos, ypos, "Viewing sound beacons (yellow)"); + addText(xpos, ypos, beacon_sound); ypos += y_inc; } } @@ -1569,7 +1577,7 @@ LLViewerWindow::LLViewerWindow( { gSavedSettings.setBOOL("RenderVBOEnable", FALSE); } - LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable")); + LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable")); if (LLFeatureManager::getInstance()->isSafe() || (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion()) @@ -3715,7 +3723,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de { found = gPipeline.lineSegmentIntersectInWorld(mouse_world_start, mouse_world_end, pick_transparent, face_hit, intersection, uv, normal, binormal); - if (found) + if (found && !pick_transparent) { gDebugRaycastIntersection = *intersection; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e982df1c92..a73bac39cf 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1428,7 +1428,7 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) if (attached_object && !attached_object->isHUDAttachment())
{
LLDrawable* drawable = attached_object->mDrawable;
- if (drawable)
+ if (drawable && !drawable->isState(LLDrawable::RIGGED))
{
LLSpatialBridge* bridge = drawable->getSpatialBridge();
if (bridge)
@@ -2016,26 +2016,29 @@ void LLVOAvatar::updateMeshData() bool terse_update = false;
- if(facep->mVertexBuffer.isNull())
+ facep->setGeomIndex(0);
+ facep->setIndicesIndex(0);
+
+ LLVertexBuffer* buff = facep->getVertexBuffer();
+ if(!facep->getVertexBuffer())
{
- facep->mVertexBuffer = new LLVertexBufferAvatar();
- facep->mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE);
+ buff = new LLVertexBufferAvatar();
+ buff->allocateBuffer(num_vertices, num_indices, TRUE);
+ facep->setVertexBuffer(buff);
}
else
{
- if (facep->mVertexBuffer->getRequestedIndices() == num_indices &&
- facep->mVertexBuffer->getRequestedVerts() == num_vertices)
+ if (buff->getRequestedIndices() == num_indices &&
+ buff->getRequestedVerts() == num_vertices)
{
terse_update = true;
}
else
{
- facep->mVertexBuffer->resizeBuffer(num_vertices, num_indices) ;
- }
+ buff->resizeBuffer(num_vertices, num_indices);
+ }
}
-
- facep->setGeomIndex(0);
- facep->setIndicesIndex(0);
+
// This is a hack! Avatars have their own pool, so we are detecting
// the case of more than one avatar in the pool (thus > 0 instead of >= 0)
@@ -2050,7 +2053,7 @@ void LLVOAvatar::updateMeshData() }
stop_glerror();
- facep->mVertexBuffer->setBuffer(0);
+ buff->setBuffer(0);
if(!f_num)
{
@@ -4006,7 +4009,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) LLFace* face = mDrawable->getFace(0);
- bool needs_rebuild = !face || face->mVertexBuffer.isNull() || mDrawable->isState(LLDrawable::REBUILD_GEOMETRY);
+ bool needs_rebuild = !face || !face->getVertexBuffer() || mDrawable->isState(LLDrawable::REBUILD_GEOMETRY);
if (needs_rebuild || mDirtyMesh)
{ //LOD changed or new mesh created, allocate new vertex buffer if needed
@@ -4041,7 +4044,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) mNeedsSkin = FALSE;
mLastSkinTime = gFrameTimeSeconds;
- LLVertexBuffer* vb = mDrawable->getFace(0)->mVertexBuffer;
+ LLVertexBuffer* vb = mDrawable->getFace(0)->getVertexBuffer();
if (vb)
{
vb->setBuffer(0);
@@ -8150,7 +8153,7 @@ BOOL LLVOAvatar::updateLOD() BOOL res = updateJointLODs();
LLFace* facep = mDrawable->getFace(0);
- if (facep->mVertexBuffer.isNull())
+ if (!facep->getVertexBuffer())
{
dirtyMesh(2);
}
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index edd41089c0..32822e1181 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -453,7 +453,7 @@ void LLVOGrass::plantBlades() face->setTexture(getTEImage(0)); face->setState(LLFace::GLOBAL); face->setSize(mNumBlades * 8, mNumBlades * 12); - face->mVertexBuffer = NULL; + face->setVertexBuffer(NULL); face->setTEOffset(0); face->mCenterLocal = mPosition + mRegionp->getOriginAgent(); diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index f032ae8780..ce256fdedf 100644 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -97,13 +97,14 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable) drawable->addFace(poolp, NULL); face = drawable->getFace(0); - if (face->mVertexBuffer.isNull()) + if (!face->getVertexBuffer()) { face->setSize(5, 12); - face->mVertexBuffer = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); - face->mVertexBuffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); face->setGeomIndex(0); face->setIndicesIndex(0); + face->setVertexBuffer(buff); } index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp); @@ -161,7 +162,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable) *(texCoordsp++) = LLVector2(0.f, 1.f); *(texCoordsp++) = LLVector2(0.5f, 0.5f); - face->mVertexBuffer->setBuffer(0); + face->getVertexBuffer()->setBuffer(0); LLPipeline::sCompiles++; return TRUE; } diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b692093fb9..a71539266d 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -853,7 +853,7 @@ void LLVoiceChannelP2P::activate() } // Add the party to the list of people with which we've recently interacted. - LLRecentPeople::instance().add(mOtherUserID); + addToTheRecentPeopleList(); //Default mic is ON on initiating/joining P2P calls if (!LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) @@ -938,3 +938,25 @@ void LLVoiceChannelP2P::setState(EState state) LLVoiceChannel::setState(state); } + +void LLVoiceChannelP2P::addToTheRecentPeopleList() +{ + bool avaline_call = LLIMModel::getInstance()->findIMSession(mSessionID)->isAvalineSessionType(); + + if (avaline_call) + { + LLSD call_data; + std::string call_number = LLVoiceChannel::getSessionName(); + + call_data["avaline_call"] = true; + call_data["session_id"] = mSessionID; + call_data["call_number"] = call_number; + call_data["date"] = LLDate::now(); + + LLRecentPeople::instance().add(mOtherUserID, call_data); + } + else + { + LLRecentPeople::instance().add(mOtherUserID); + } +} diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 7cef3c13d1..b8597ee5cb 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -191,6 +191,13 @@ protected: virtual void setState(EState state); private: + + /** + * Add the caller to the list of people with which we've recently interacted + * + **/ + void addToTheRecentPeopleList(); + std::string mSessionHandle; LLUUID mOtherUserID; BOOL mReceivedCall; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index f762f04d8e..6f354b78b1 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -463,7 +463,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) LLAlphaObject* object = (LLAlphaObject*) facep->getViewerObject(); facep->setGeomIndex(vertex_count); facep->setIndicesIndex(index_count); - facep->mVertexBuffer = buffer; + facep->setVertexBuffer(buffer); facep->setPoolType(LLDrawPool::POOL_ALPHA); object->getGeometry(facep->getTEOffset(), verticesp, normalsp, texcoordsp, colorsp, indicesp); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 80f43e51d2..288d335e1d 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1182,7 +1182,7 @@ BOOL LLVOSky::updateSky() } } - if (mDrawable.notNull() && mDrawable->getFace(0) && mDrawable->getFace(0)->mVertexBuffer.isNull()) + if (mDrawable.notNull() && mDrawable->getFace(0) && !mDrawable->getFace(0)->getVertexBuffer()) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); } @@ -1233,10 +1233,11 @@ void LLVOSky::createDummyVertexBuffer() mFace[FACE_DUMMY] = mDrawable->addFace(poolp, NULL); } - if(mFace[FACE_DUMMY]->mVertexBuffer.isNull()) + if(!mFace[FACE_DUMMY]->getVertexBuffer()) { - mFace[FACE_DUMMY]->mVertexBuffer = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB); - mFace[FACE_DUMMY]->mVertexBuffer->allocateBuffer(1, 1, TRUE); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB); + buff->allocateBuffer(1, 1, TRUE); + mFace[FACE_DUMMY]->setVertexBuffer(buff); } } @@ -1255,13 +1256,13 @@ void LLVOSky::updateDummyVertexBuffer() LLFastTimer t(FTM_RENDER_FAKE_VBO_UPDATE) ; - if(!mFace[FACE_DUMMY] || mFace[FACE_DUMMY]->mVertexBuffer.isNull()) + if(!mFace[FACE_DUMMY] || !mFace[FACE_DUMMY]->getVertexBuffer()) createDummyVertexBuffer() ; LLStrider<LLVector3> vertices ; - mFace[FACE_DUMMY]->mVertexBuffer->getVertexStrider(vertices, 0); + mFace[FACE_DUMMY]->getVertexBuffer()->getVertexStrider(vertices, 0); *vertices = mCameraPosAgent ; - mFace[FACE_DUMMY]->mVertexBuffer->setBuffer(0) ; + mFace[FACE_DUMMY]->getVertexBuffer()->setBuffer(0) ; } //---------------------------------- //end of fake vertex buffer updating @@ -1304,14 +1305,15 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) { face = mFace[FACE_SIDE0 + side]; - if (face->mVertexBuffer.isNull()) + if (!face->getVertexBuffer()) { face->setSize(4, 6); face->setGeomIndex(0); face->setIndicesIndex(0); - face->mVertexBuffer = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); - face->mVertexBuffer->allocateBuffer(4, 6, TRUE); - + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + buff->allocateBuffer(4, 6, TRUE); + face->setVertexBuffer(buff); + index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp); S32 vtx = 0; @@ -1344,7 +1346,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) *indicesp++ = index_offset + 3; *indicesp++ = index_offset + 2; - face->mVertexBuffer->setBuffer(0); + buff->setBuffer(0); } } @@ -1471,13 +1473,14 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons facep = mFace[f]; - if (facep->mVertexBuffer.isNull()) + if (!facep->getVertexBuffer()) { - facep->setSize(4, 6); - facep->mVertexBuffer = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); - facep->mVertexBuffer->allocateBuffer(facep->getGeomCount(), facep->getIndicesCount(), TRUE); + facep->setSize(4, 6); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolSky::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + buff->allocateBuffer(facep->getGeomCount(), facep->getIndicesCount(), TRUE); facep->setGeomIndex(0); facep->setIndicesIndex(0); + facep->setVertexBuffer(buff); } index_offset = facep->getGeometry(verticesp,normalsp,texCoordsp, indicesp); @@ -1506,7 +1509,7 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons *indicesp++ = index_offset + 2; *indicesp++ = index_offset + 3; - facep->mVertexBuffer->setBuffer(0); + facep->getVertexBuffer()->setBuffer(0); if (is_sun) { @@ -1875,13 +1878,14 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, LLFace *face = mFace[FACE_REFLECTION]; - if (face->mVertexBuffer.isNull() || quads*4 != face->getGeomCount()) + if (!face->getVertexBuffer() || quads*4 != face->getGeomCount()) { face->setSize(quads * 4, quads * 6); - face->mVertexBuffer = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); - face->mVertexBuffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); face->setIndicesIndex(0); face->setGeomIndex(0); + face->setVertexBuffer(buff); } LLStrider<LLVector3> verticesp; @@ -2019,7 +2023,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, } } - face->mVertexBuffer->setBuffer(0); + face->getVertexBuffer()->setBuffer(0); } diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 690530939e..dbcd4f50ca 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -890,7 +890,7 @@ void LLVOSurfacePatch::dirtyGeom() if (mDrawable) { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); - mDrawable->getFace(0)->mVertexBuffer = NULL; + mDrawable->getFace(0)->setVertexBuffer(NULL); mDrawable->movePartition(); } } @@ -1119,7 +1119,7 @@ void LLTerrainPartition::getGeometry(LLSpatialGroup* group) facep->setIndicesIndex(indices_index); facep->setGeomIndex(index_offset); - facep->mVertexBuffer = buffer; + facep->setVertexBuffer(buffer); LLVOSurfacePatch* patchp = (LLVOSurfacePatch*) facep->getViewerObject(); patchp->getGeometry(vertices, normals, colors, texcoords, texcoords2, indices); diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 1b5aed804f..e6f2b19e07 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -525,11 +525,11 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) if(mTrunkLOD >= sMAX_NUM_TREE_LOD_LEVELS) //do not display the tree. { mReferenceBuffer = NULL ; - mDrawable->getFace(0)->mVertexBuffer = NULL ; + mDrawable->getFace(0)->setVertexBuffer(NULL); return TRUE ; } - if (mReferenceBuffer.isNull() || mDrawable->getFace(0)->mVertexBuffer.isNull()) + if (mReferenceBuffer.isNull() || !mDrawable->getFace(0)->getVertexBuffer()) { const F32 SRR3 = 0.577350269f; // sqrt(1/3) const F32 SRR2 = 0.707106781f; // sqrt(1/2) @@ -863,7 +863,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) if (gSavedSettings.getBOOL("RenderAnimateTrees")) { - mDrawable->getFace(0)->mVertexBuffer = mReferenceBuffer; + mDrawable->getFace(0)->setVertexBuffer(mReferenceBuffer); } else { @@ -921,8 +921,9 @@ void LLVOTree::updateMesh() calcNumVerts(vert_count, index_count, mTrunkLOD, stop_depth, mDepth, mTrunkDepth, mBranches); LLFace* facep = mDrawable->getFace(0); - facep->mVertexBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB); - facep->mVertexBuffer->allocateBuffer(vert_count, index_count, TRUE); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, GL_STATIC_DRAW_ARB); + buff->allocateBuffer(vert_count, index_count, TRUE); + facep->setVertexBuffer(buff); LLStrider<LLVector3> vertices; LLStrider<LLVector3> normals; @@ -930,16 +931,15 @@ void LLVOTree::updateMesh() LLStrider<U16> indices; U16 idx_offset = 0; - facep->mVertexBuffer->getVertexStrider(vertices); - facep->mVertexBuffer->getNormalStrider(normals); - facep->mVertexBuffer->getTexCoord0Strider(tex_coords); - facep->mVertexBuffer->getIndexStrider(indices); + buff->getVertexStrider(vertices); + buff->getNormalStrider(normals); + buff->getTexCoord0Strider(tex_coords); + buff->getIndexStrider(indices); genBranchPipeline(vertices, normals, tex_coords, indices, idx_offset, scale_mat, mTrunkLOD, stop_depth, mDepth, mTrunkDepth, 1.0, mTwist, droop, mBranches, alpha); mReferenceBuffer->setBuffer(0); - facep->mVertexBuffer->setBuffer(0); - + buff->setBuffer(0); } void LLVOTree::appendMesh(LLStrider<LLVector3>& vertices, diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5c1d10ba7d..1186d4d8d9 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1204,10 +1204,26 @@ BOOL LLVOVolume::calcLOD() S32 cur_detail = 0;
- F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
- F32 distance = mDrawable->mDistanceWRTCamera; //llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE);
+ F32 radius;
+ F32 distance;
+
+ if (mDrawable->isState(LLDrawable::RIGGED))
+ {
+ LLVOAvatar* avatar = getAvatar();
+ distance = avatar->mDrawable->mDistanceWRTCamera;
+ radius = avatar->getBinRadius();
+ }
+ else
+ {
+ distance = mDrawable->mDistanceWRTCamera;
+ radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length();
+ }
+
+ //hold onto unmodified distance for debugging
+ F32 debug_distance = distance;
+
distance *= sDistanceFactor;
-
+
F32 rampDist = LLVOVolume::sLODFactor * 2;
if (distance < rampDist)
@@ -1224,6 +1240,12 @@ BOOL LLVOVolume::calcLOD() cur_detail = computeLODDetail(llround(distance, 0.01f),
llround(radius, 0.01f));
+
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO))
+ {
+ setDebugText(llformat("%.2f:%.2f, %d", debug_distance, radius, cur_detail));
+ }
+
if (cur_detail != mLOD)
{
mAppAngle = llround((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
@@ -3352,8 +3374,15 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e end_face = face+1;
}
+ bool special_cursor = specialHoverCursor();
for (S32 i = start_face; i < end_face; ++i)
{
+ if (!special_cursor && !pick_transparent && getTE(i)->getColor().mV[3] == 0.f)
+ { //don't attempt to pick completely transparent faces unless
+ //pick_transparent is true
+ continue;
+ }
+
face_hit = volume->lineSegmentIntersect(v_start, v_end, i,
&p, &tc, &n, &bn);
@@ -3669,7 +3698,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, (type == LLRenderPass::PASS_INVISIBLE) ||
(type == LLRenderPass::PASS_ALPHA && facep->isState(LLFace::FULLBRIGHT));
- if (!fullbright && type != LLRenderPass::PASS_GLOW && !facep->mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_NORMAL))
+ if (!fullbright && type != LLRenderPass::PASS_GLOW && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_NORMAL))
{
llwarns << "Non fullbright face has no normals!" << llendl;
return;
@@ -3703,13 +3732,8 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U8 glow = (U8) (facep->getTextureEntry()->getGlow() * 255);
- if (facep->mVertexBuffer.isNull())
- {
- llerrs << "WTF?" << llendl;
- }
-
if (idx >= 0 &&
- draw_vec[idx]->mVertexBuffer == facep->mVertexBuffer &&
+ draw_vec[idx]->mVertexBuffer == facep->getVertexBuffer() &&
draw_vec[idx]->mEnd == facep->getGeomIndex()-1 &&
(LLPipeline::sTextureBindTest || draw_vec[idx]->mTexture == tex) &&
#if LL_DARWIN
@@ -3736,7 +3760,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 offset = facep->getIndicesStart();
U32 count = facep->getIndicesCount();
LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset, tex,
- facep->mVertexBuffer, fullbright, bump);
+ facep->getVertexBuffer(), fullbright, bump);
draw_info->mGroup = group;
draw_info->mVSize = facep->getVirtualSize();
draw_vec.push_back(draw_info);
@@ -3876,16 +3900,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) //for each face
for (S32 i = 0; i < drawablep->getNumFaces(); i++)
{
+ LLFace* facep = drawablep->getFace(i);
+
+ //ALWAYS null out vertex buffer on rebuild -- if the face lands in a render
+ // batch, it will recover its vertex buffer reference from the spatial group
+ facep->setVertexBuffer(NULL);
+
//sum up face verts and indices
drawablep->updateFaceSize(i);
- LLFace* facep = drawablep->getFace(i);
+
+
if (rigged)
{
if (!facep->isState(LLFace::RIGGED))
- {
- facep->mVertexBuffer = NULL;
- facep->mLastVertexBuffer = NULL;
+ { //completely reset vertex buffer
+ facep->clearVertexBuffer();
}
facep->setState(LLFace::RIGGED);
@@ -4043,14 +4073,13 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0)
{
- facep->mVertexBuffer = NULL;
- facep->mLastVertexBuffer = NULL;
+ facep->clearVertexBuffer();
continue;
}
cur_total += facep->getGeomCount();
- if (facep->hasGeometry() && facep->mPixelArea > FORCE_CULL_AREA)
+ if (facep->hasGeometry() && facep->getPixelArea() > FORCE_CULL_AREA)
{
const LLTextureEntry* te = facep->getTextureEntry();
LLViewerTexture* tex = facep->getTexture();
@@ -4063,7 +4092,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) }
}
- BOOL force_simple = (facep->mPixelArea < FORCE_SIMPLE_RENDER_AREA);
+ BOOL force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA);
U32 type = gPipeline.getPoolTypeFromTE(te, tex);
if (type != LLDrawPool::POOL_ALPHA && force_simple)
{
@@ -4149,8 +4178,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) }
else
{ //face has no renderable geometry
- facep->mVertexBuffer = NULL;
- facep->mLastVertexBuffer = NULL;
+ facep->clearVertexBuffer();
}
}
@@ -4176,7 +4204,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) {
bump_mask |= LLVertexBuffer::MAP_BINORMAL;
}
-
+
genDrawInfo(group, simple_mask, simple_faces);
genDrawInfo(group, bump_mask, bump_faces);
genDrawInfo(group, fullbright_mask, fullbright_faces);
@@ -4231,7 +4259,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
{
LLFace* face = drawablep->getFace(i);
- if (face && face->mVertexBuffer.notNull())
+ if (face && face->getVertexBuffer())
{
face->getGeometryVolume(*volume, face->getTEOffset(),
vobj->getRelativeXform(), vobj->getRelativeXformInvTrans(), face->getGeomIndex());
@@ -4283,9 +4311,10 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) for (S32 i = 0; i < drawablep->getNumFaces(); ++i)
{
LLFace* face = drawablep->getFace(i);
- if (face && face->mVertexBuffer.notNull() && face->mVertexBuffer->isLocked())
+ LLVertexBuffer* buff = face->getVertexBuffer();
+ if (face && buff && buff->isLocked())
{
- face->mVertexBuffer->setBuffer(0) ;
+ buff->setBuffer(0) ;
}
}
}
@@ -4355,7 +4384,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: U32 index_count = facep->getIndicesCount();
U32 geom_count = facep->getGeomCount();
- //sum up vertices needed for this texture
+ //sum up vertices needed for this render batch
std::vector<LLFace*>::iterator i = face_iter;
++i;
@@ -4365,7 +4394,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: facep = *i;
if (geom_count + facep->getGeomCount() > max_vertices)
- { //cut vertex buffers on geom count too big
+ { //cut batches on geom count too big
break;
}
@@ -4393,10 +4422,11 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: buffer->allocateBuffer(geom_count, index_count, TRUE);
}
else
- {
- if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != group->mBufferUsage)
+ { //resize pre-existing buffer
+ if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != group->mBufferUsage ||
+ buffer->getTypeMask() != mask)
{
- buffer = createVertexBuffer(group->mSpatialPartition->mVertexDataMask,
+ buffer = createVertexBuffer(mask,
group->mBufferUsage);
buffer->allocateBuffer(geom_count, index_count, TRUE);
}
@@ -4414,15 +4444,18 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: U16 index_offset = 0;
while (face_iter < i)
- {
+ { //update face indices for new buffer
facep = *face_iter;
- facep->mIndicesIndex = indices_index;
- facep->mGeomIndex = index_offset;
- facep->mVertexBuffer = buffer;
+ facep->setIndicesIndex(indices_index);
+ facep->setGeomIndex(index_offset);
+ facep->setVertexBuffer(buffer);
+
{
+ //for debugging, set last time face was updated vs moved
facep->updateRebuildFlags();
+
if (!LLPipeline::sDelayVBUpdate)
- {
+ { //copy face geometry into vertex buffer
LLDrawable* drawablep = facep->getDrawable();
LLVOVolume* vobj = drawablep->getVOVolume();
LLVolume* volume = vobj->getVolume();
@@ -4439,9 +4472,12 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: }
index_offset += facep->getGeomCount();
- indices_index += facep->mIndicesCount;
+ indices_index += facep->getIndicesCount();
+
+
+ //append face to appropriate render batch
- BOOL force_simple = facep->mPixelArea < FORCE_SIMPLE_RENDER_AREA;
+ BOOL force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA;
BOOL fullbright = facep->isState(LLFace::FULLBRIGHT);
if ((mask & LLVertexBuffer::MAP_NORMAL) == 0)
{ //paranoia check to make sure GL doesn't try to read non-existant normals
@@ -4608,7 +4644,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun //sum up face verts and indices
drawablep->updateFaceSize(i);
LLFace* facep = drawablep->getFace(i);
- if (facep->hasGeometry() && facep->mPixelArea > FORCE_CULL_AREA)
+ if (facep->hasGeometry() && facep->getPixelArea() > FORCE_CULL_AREA)
{
vertex_count += facep->getGeomCount();
index_count += facep->getIndicesCount();
@@ -4618,8 +4654,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun }
else
{
- facep->mVertexBuffer = NULL;
- facep->mLastVertexBuffer = NULL;
+ facep->clearVertexBuffer();
}
}
}
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 77875859e9..69ebad61ac 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -166,16 +166,18 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) face->setSize(vertices_per_quad * num_quads, indices_per_quad * num_quads); - if (face->mVertexBuffer.isNull()) + LLVertexBuffer* buff = face->getVertexBuffer(); + if (!buff) { - face->mVertexBuffer = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB); - face->mVertexBuffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); + buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB); + buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); face->setIndicesIndex(0); face->setGeomIndex(0); + face->setVertexBuffer(buff); } else { - face->mVertexBuffer->resizeBuffer(face->getGeomCount(), face->getIndicesCount()); + buff->resizeBuffer(face->getGeomCount(), face->getIndicesCount()); } index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp); @@ -229,7 +231,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) } } - face->mVertexBuffer->setBuffer(0); + buff->setBuffer(0); mDrawable->movePartition(); LLPipeline::sCompiles++; diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 85871f21d6..96bc8cbdd9 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1,877 +1,879 @@ -/** - * @file llworld.cpp - * @brief Initial test structure to organize viewer regions - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llworld.h" -#include "llrender.h" - -#include "indra_constants.h" -#include "llstl.h" - -#include "llagent.h" -#include "llviewercontrol.h" -#include "lldrawpool.h" -#include "llglheaders.h" -#include "llhttpnode.h" -#include "llregionhandle.h" -#include "llsurface.h" -#include "lltrans.h" -#include "llviewercamera.h" -#include "llviewertexture.h" -#include "llviewertexturelist.h" -#include "llviewernetwork.h" -#include "llviewerobjectlist.h" -#include "llviewerparceloverlay.h" -#include "llviewerregion.h" -#include "llviewerstats.h" -#include "llvlcomposition.h" -#include "llvoavatar.h" -#include "llvowater.h" -#include "message.h" -#include "pipeline.h" -#include "llappviewer.h" // for do_disconnect() - -#include <deque> -#include <queue> -#include <map> -#include <cstring> - -// -// Globals -// -U32 gAgentPauseSerialNum = 0; - -// -// Constants -// -const S32 MAX_NUMBER_OF_CLOUDS = 750; -const S32 WORLD_PATCH_SIZE = 16; - -extern LLColor4U MAX_WATER_COLOR; - -const U32 LLWorld::mWidth = 256; - -// meters/point, therefore mWidth * mScale = meters per edge -const F32 LLWorld::mScale = 1.f; - -const F32 LLWorld::mWidthInMeters = mWidth * mScale; - -// -// Functions -// - -// allocate the stack -LLWorld::LLWorld() : - mLandFarClip(DEFAULT_FAR_PLANE), - mLastPacketsIn(0), - mLastPacketsOut(0), - mLastPacketsLost(0), - mSpaceTimeUSec(0), - mClassicCloudsEnabled(TRUE) -{ - for (S32 i = 0; i < 8; i++) - { - mEdgeWaterObjects[i] = NULL; - } - - if (gNoRender) - { - return; - } - - LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,4); - U8 *default_texture = raw->getData(); - *(default_texture++) = MAX_WATER_COLOR.mV[0]; - *(default_texture++) = MAX_WATER_COLOR.mV[1]; - *(default_texture++) = MAX_WATER_COLOR.mV[2]; - *(default_texture++) = MAX_WATER_COLOR.mV[3]; - - mDefaultWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); - gGL.getTexUnit(0)->bind(mDefaultWaterTexturep); - mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - -} - - -void LLWorld::destroyClass() -{ - mHoleWaterObjects.clear(); - gObjectList.destroy(); - for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); ) - { - LLViewerRegion* region_to_delete = *region_it++; - removeRegion(region_to_delete->getHost()); - } - if(LLVOCache::hasInstance()) - { - LLVOCache::getInstance()->destroyClass() ; - } - LLViewerPartSim::getInstance()->destroyClass(); -} - - -LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) -{ - LLMemType mt(LLMemType::MTYPE_REGIONS); - llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; - LLViewerRegion *regionp = getRegionFromHandle(region_handle); - if (regionp) - { - llinfos << "Region exists, removing it " << llendl; - LLHost old_host = regionp->getHost(); - // region already exists! - if (host == old_host && regionp->isAlive()) - { - // This is a duplicate for the same host and it's alive, don't bother. - return regionp; - } - - if (host != old_host) - { - llwarns << "LLWorld::addRegion exists, but old host " << old_host - << " does not match new host " << host << llendl; - } - if (!regionp->isAlive()) - { - llwarns << "LLWorld::addRegion exists, but isn't alive" << llendl; - } - - // Kill the old host, and then we can continue on and add the new host. We have to kill even if the host - // matches, because all the agent state for the new camera is completely different. - removeRegion(old_host); - } - - U32 iindex = 0; - U32 jindex = 0; - from_region_handle(region_handle, &iindex, &jindex); - S32 x = (S32)(iindex/mWidth); - S32 y = (S32)(jindex/mWidth); - llinfos << "Adding new region (" << x << ":" << y << ")" << llendl; - llinfos << "Host: " << host << llendl; - - LLVector3d origin_global; - - origin_global = from_region_handle(region_handle); - - regionp = new LLViewerRegion(region_handle, - host, - mWidth, - WORLD_PATCH_SIZE, - getRegionWidthInMeters() ); - if (!regionp) - { - llerrs << "Unable to create new region!" << llendl; - } - - regionp->mCloudLayer.create(regionp); - regionp->mCloudLayer.setWidth((F32)mWidth); - regionp->mCloudLayer.setWindPointer(®ionp->mWind); - - mRegionList.push_back(regionp); - mActiveRegionList.push_back(regionp); - mCulledRegionList.push_back(regionp); - - - // Find all the adjacent regions, and attach them. - // Generate handles for all of the adjacent regions, and attach them in the correct way. - // connect the edges - F32 adj_x = 0.f; - F32 adj_y = 0.f; - F32 region_x = 0.f; - F32 region_y = 0.f; - U64 adj_handle = 0; - - F32 width = getRegionWidthInMeters(); - - LLViewerRegion *neighborp; - from_region_handle(region_handle, ®ion_x, ®ion_y); - - // Iterate through all directions, and connect neighbors if there. - S32 dir; - for (dir = 0; dir < 8; dir++) - { - adj_x = region_x + width * gDirAxes[dir][0]; - adj_y = region_y + width * gDirAxes[dir][1]; - to_region_handle(adj_x, adj_y, &adj_handle); - - neighborp = getRegionFromHandle(adj_handle); - if (neighborp) - { - //llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << llendl; - regionp->connectNeighbor(neighborp, dir); - } - } - - updateWaterObjects(); - - return regionp; -} - - -void LLWorld::removeRegion(const LLHost &host) -{ - F32 x, y; - - LLViewerRegion *regionp = getRegion(host); - if (!regionp) - { - llwarns << "Trying to remove region that doesn't exist!" << llendl; - return; - } - - if (regionp == gAgent.getRegion()) - { - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* reg = *iter; - llwarns << "RegionDump: " << reg->getName() - << " " << reg->getHost() - << " " << reg->getOriginGlobal() - << llendl; - } - - llwarns << "Agent position global " << gAgent.getPositionGlobal() - << " agent " << gAgent.getPositionAgent() - << llendl; - - llwarns << "Regions visited " << gAgent.getRegionsVisited() << llendl; - - llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; - - llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; - LLAppViewer::instance()->forceDisconnect(LLTrans::getString("YouHaveBeenDisconnected")); - - regionp->saveObjectCache() ; //force to save objects here in case that the object cache is about to be destroyed. - return; - } - - from_region_handle(regionp->getHandle(), &x, &y); - llinfos << "Removing region " << x << ":" << y << llendl; - - mRegionList.remove(regionp); - mActiveRegionList.remove(regionp); - mCulledRegionList.remove(regionp); - mVisibleRegionList.remove(regionp); - - delete regionp; - - updateWaterObjects(); - - llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ; -} - - -LLViewerRegion* LLWorld::getRegion(const LLHost &host) -{ - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - if (regionp->getHost() == host) - { - return regionp; - } - } - return NULL; -} - -LLViewerRegion* LLWorld::getRegionFromPosAgent(const LLVector3 &pos) -{ - return getRegionFromPosGlobal(gAgent.getPosGlobalFromAgent(pos)); -} - -LLViewerRegion* LLWorld::getRegionFromPosGlobal(const LLVector3d &pos) -{ - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - if (regionp->pointInRegionGlobal(pos)) - { - return regionp; - } - } - return NULL; -} - - -LLVector3d LLWorld::clipToVisibleRegions(const LLVector3d &start_pos, const LLVector3d &end_pos) -{ - if (positionRegionValidGlobal(end_pos)) - { - return end_pos; - } - - LLViewerRegion* regionp = getRegionFromPosGlobal(start_pos); - if (!regionp) - { - return start_pos; - } - - LLVector3d delta_pos = end_pos - start_pos; - LLVector3d delta_pos_abs; - delta_pos_abs.setVec(delta_pos); - delta_pos_abs.abs(); - - LLVector3 region_coord = regionp->getPosRegionFromGlobal(end_pos); - F64 clip_factor = 1.0; - F32 region_width = regionp->getWidth(); - if (region_coord.mV[VX] < 0.f) - { - if (region_coord.mV[VY] < region_coord.mV[VX]) - { - // clip along y - - clip_factor = -(region_coord.mV[VY] / delta_pos_abs.mdV[VY]); - } - else - { - // clip along x - - clip_factor = -(region_coord.mV[VX] / delta_pos_abs.mdV[VX]); - } - } - else if (region_coord.mV[VX] > region_width) - { - if (region_coord.mV[VY] > region_coord.mV[VX]) - { - // clip along y + - clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY]; - } - else - { - //clip along x + - clip_factor = (region_coord.mV[VX] - region_width) / delta_pos_abs.mdV[VX]; - } - } - else if (region_coord.mV[VY] < 0.f) - { - // clip along y - - clip_factor = -(region_coord.mV[VY] / delta_pos_abs.mdV[VY]); - } - else if (region_coord.mV[VY] > region_width) - { - // clip along y + - clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY]; - } - - // clamp to within region dimensions - LLVector3d final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor); - final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], 0.0, - (F64)(region_width - F_ALMOST_ZERO)); - final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], 0.0, - (F64)(region_width - F_ALMOST_ZERO)); - final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0, - (F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO)); - return regionp->getPosGlobalFromRegion(LLVector3(final_region_pos)); -} - -LLViewerRegion* LLWorld::getRegionFromHandle(const U64 &handle) -{ - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - if (regionp->getHandle() == handle) - { - return regionp; - } - } - return NULL; -} - - -void LLWorld::updateAgentOffset(const LLVector3d &offset_global) -{ -#if 0 - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->setAgentOffset(offset_global); - } -#endif -} - - -BOOL LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global) -{ - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - if (regionp->pointInRegionGlobal(pos_global)) - { - return TRUE; - } - } - return FALSE; -} - - -// Allow objects to go up to their radius underground. -F32 LLWorld::getMinAllowedZ(LLViewerObject* object, const LLVector3d &global_pos) -{ - F32 land_height = resolveLandHeightGlobal(global_pos); - F32 radius = 0.5f * object->getScale().length(); - return land_height - radius; -} - - - -LLViewerRegion* LLWorld::resolveRegionGlobal(LLVector3 &pos_region, const LLVector3d &pos_global) -{ - LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global); - - if (regionp) - { - pos_region = regionp->getPosRegionFromGlobal(pos_global); - return regionp; - } - - return NULL; -} - - -LLViewerRegion* LLWorld::resolveRegionAgent(LLVector3 &pos_region, const LLVector3 &pos_agent) -{ - LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent); - LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global); - - if (regionp) - { - pos_region = regionp->getPosRegionFromGlobal(pos_global); - return regionp; - } - - return NULL; -} - - -F32 LLWorld::resolveLandHeightAgent(const LLVector3 &pos_agent) -{ - LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent); - return resolveLandHeightGlobal(pos_global); -} - - -F32 LLWorld::resolveLandHeightGlobal(const LLVector3d &pos_global) -{ - LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global); - if (regionp) - { - return regionp->getLand().resolveHeightGlobal(pos_global); - } - return 0.0f; -} - - -// Takes a line defined by "point_a" and "point_b" and determines the closest (to point_a) -// point where the the line intersects an object or the land surface. Stores the results -// in "intersection" and "intersection_normal" and returns a scalar value that represents -// the normalized distance along the line from "point_a" to "intersection". -// -// Currently assumes point_a and point_b only differ in z-direction, -// but it may eventually become more general. -F32 LLWorld::resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d &point_a, const LLVector3d &point_b, - LLVector3d &intersection, LLVector3 &intersection_normal, - LLViewerObject **viewerObjectPtr) -{ - // initialize return value to null - if (viewerObjectPtr) - { - *viewerObjectPtr = NULL; - } - - LLViewerRegion *regionp = getRegionFromPosGlobal(point_a); - if (!regionp) - { - // We're outside the world - intersection = 0.5f * (point_a + point_b); - intersection_normal.setVec(0.0f, 0.0f, 1.0f); - return 0.5f; - } - - // calculate the length of the segment - F32 segment_length = (F32)((point_a - point_b).length()); - if (0.0f == segment_length) - { - intersection = point_a; - intersection_normal.setVec(0.0f, 0.0f, 1.0f); - return segment_length; - } - - // get land height - // Note: we assume that the line is parallel to z-axis here - LLVector3d land_intersection = point_a; - F32 normalized_land_distance; - - land_intersection.mdV[VZ] = regionp->getLand().resolveHeightGlobal(point_a); - normalized_land_distance = (F32)(point_a.mdV[VZ] - land_intersection.mdV[VZ]) / segment_length; - intersection = land_intersection; - intersection_normal = resolveLandNormalGlobal(land_intersection); - - if (avatarp && !avatarp->mFootPlane.isExactlyClear()) - { - LLVector3 foot_plane_normal(avatarp->mFootPlane.mV); - LLVector3 start_pt = avatarp->getRegion()->getPosRegionFromGlobal(point_a); - // added 0.05 meters to compensate for error in foot plane reported by Havok - F32 norm_dist_from_plane = ((start_pt * foot_plane_normal) - avatarp->mFootPlane.mV[VW]) + 0.05f; - norm_dist_from_plane = llclamp(norm_dist_from_plane / segment_length, 0.f, 1.f); - if (norm_dist_from_plane < normalized_land_distance) - { - // collided with object before land - normalized_land_distance = norm_dist_from_plane; - intersection = point_a; - intersection.mdV[VZ] -= norm_dist_from_plane * segment_length; - intersection_normal = foot_plane_normal; - } - else - { - intersection = land_intersection; - intersection_normal = resolveLandNormalGlobal(land_intersection); - } - } - - return normalized_land_distance; -} - - -LLSurfacePatch * LLWorld::resolveLandPatchGlobal(const LLVector3d &pos_global) -{ - // returns a pointer to the patch at this location - LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global); - if (!regionp) - { - return NULL; - } - - return regionp->getLand().resolvePatchGlobal(pos_global); -} - - -LLVector3 LLWorld::resolveLandNormalGlobal(const LLVector3d &pos_global) -{ - LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global); - if (!regionp) - { - return LLVector3::z_axis; - } - - return regionp->getLand().resolveNormalGlobal(pos_global); -} - - -void LLWorld::updateVisibilities() -{ - F32 cur_far_clip = LLViewerCamera::getInstance()->getFar(); - - LLViewerCamera::getInstance()->setFar(mLandFarClip); - - F32 diagonal_squared = F_SQRT2 * F_SQRT2 * mWidth * mWidth; - // Go through the culled list and check for visible regions - for (region_list_t::iterator iter = mCulledRegionList.begin(); - iter != mCulledRegionList.end(); ) - { - region_list_t::iterator curiter = iter++; - LLViewerRegion* regionp = *curiter; - F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ(); - F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared); - if (!regionp->getLand().hasZData() - || LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius)) - { - mCulledRegionList.erase(curiter); - mVisibleRegionList.push_back(regionp); - } - } - - // Update all of the visible regions - for (region_list_t::iterator iter = mVisibleRegionList.begin(); - iter != mVisibleRegionList.end(); ) - { - region_list_t::iterator curiter = iter++; - LLViewerRegion* regionp = *curiter; - if (!regionp->getLand().hasZData()) - { - continue; - } - - F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ(); - F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared); - if (LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius)) - { - regionp->calculateCameraDistance(); - if (!gNoRender) - { - regionp->getLand().updatePatchVisibilities(gAgent); - } - } - else - { - mVisibleRegionList.erase(curiter); - mCulledRegionList.push_back(regionp); - } - } - - // Sort visible regions - mVisibleRegionList.sort(LLViewerRegion::CompareDistance()); - - LLViewerCamera::getInstance()->setFar(cur_far_clip); -} - -void LLWorld::updateRegions(F32 max_update_time) -{ - LLMemType mt_ur(LLMemType::MTYPE_IDLE_UPDATE_REGIONS); - LLTimer update_timer; - BOOL did_one = FALSE; - - // Perform idle time updates for the regions (and associated surfaces) - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - F32 max_time = max_update_time - update_timer.getElapsedTimeF32(); - if (did_one && max_time <= 0.f) - break; - max_time = llmin(max_time, max_update_time*.1f); - did_one |= regionp->idleUpdate(max_update_time); - } -} - -void LLWorld::updateParticles() -{ - LLViewerPartSim::getInstance()->updateSimulation(); -} - -void LLWorld::updateClouds(const F32 dt) -{ - static LLFastTimer::DeclareTimer ftm("World Clouds"); - LLFastTimer t(ftm); - - if ( gSavedSettings.getBOOL("FreezeTime") ) - { - // don't move clouds in snapshot mode - return; - } - - if ( - mClassicCloudsEnabled != - gSavedSettings.getBOOL("SkyUseClassicClouds") ) - { - // The classic cloud toggle has been flipped - // gotta update all of the cloud layers - mClassicCloudsEnabled = - gSavedSettings.getBOOL("SkyUseClassicClouds"); - - if ( !mClassicCloudsEnabled && mActiveRegionList.size() ) - { - // We've transitioned to having classic clouds disabled - // reset all cloud layers. - for ( - region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); - ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->mCloudLayer.reset(); - } - - return; - } - } - else if ( !mClassicCloudsEnabled ) return; - - if (mActiveRegionList.size()) - { - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->mCloudLayer.updatePuffs(dt); - } - - // Reshuffle who owns which puffs - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->mCloudLayer.updatePuffOwnership(); - } - - // Add new puffs - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->mCloudLayer.updatePuffCount(); - } - } -} - -LLCloudGroup* LLWorld::findCloudGroup(const LLCloudPuff &puff) -{ - if (mActiveRegionList.size()) - { - // Update all the cloud puff positions, and timer based stuff - // such as death decay - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - LLCloudGroup *groupp = regionp->mCloudLayer.findCloudGroup(puff); - if (groupp) - { - return groupp; - } - } - } - return NULL; -} - - -void LLWorld::renderPropertyLines() -{ - S32 region_count = 0; - S32 vertex_count = 0; - - for (region_list_t::iterator iter = mVisibleRegionList.begin(); - iter != mVisibleRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - region_count++; - vertex_count += regionp->renderPropertyLines(); - } -} - - -void LLWorld::updateNetStats() -{ - F32 bits = 0.f; - U32 packets = 0; - - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->updateNetStats(); - bits += regionp->mBitStat.getCurrent(); - packets += llfloor( regionp->mPacketsStat.getCurrent() ); - } - - S32 packets_in = gMessageSystem->mPacketsIn - mLastPacketsIn; - S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; - S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - - S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); - S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); - LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); - LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); - LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); - LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets); - if (packets_in) - { - LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in)); - } - else - { - LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f); - } - - mLastPacketsIn = gMessageSystem->mPacketsIn; - mLastPacketsOut = gMessageSystem->mPacketsOut; - mLastPacketsLost = gMessageSystem->mDroppedPackets; -} - - -void LLWorld::printPacketsLost() -{ - llinfos << "Simulators:" << llendl; - llinfos << "----------" << llendl; - - LLCircuitData *cdp = NULL; - for (region_list_t::iterator iter = mActiveRegionList.begin(); - iter != mActiveRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - cdp = gMessageSystem->mCircuitInfo.findCircuit(regionp->getHost()); - if (cdp) - { - LLVector3d range = regionp->getCenterGlobal() - gAgent.getPositionGlobal(); - - llinfos << regionp->getHost() << ", range: " << range.length() - << " packets lost: " << cdp->getPacketsLost() << llendl; - } - } -} - -void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data) -{ - LLViewerRegion* region = LLWorld::getInstance()->getRegion(msg->getSender()); - if( region ) - { - region->updateCoarseLocations(msg); - } -} - -F32 LLWorld::getLandFarClip() const -{ - return mLandFarClip; -} - -void LLWorld::setLandFarClip(const F32 far_clip) -{ - static S32 const rwidth = (S32)REGION_WIDTH_U32; - S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth; - S32 const n2 = (llceil(far_clip) - 1) / rwidth; - bool need_water_objects_update = n1 != n2; - - mLandFarClip = far_clip; - - if (need_water_objects_update) - { - updateWaterObjects(); - } -} - -// Some region that we're connected to, but not the one we're in, gave us -// a (possibly) new water height. Update it in our local copy. -void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_height) -{ - for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) - { - if ((*iter)->getName() == sim_name) - { - (*iter)->setWaterHeight(water_height); - break; - } - } -} - +/**
+ * @file llworld.cpp
+ * @brief Initial test structure to organize viewer regions
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llworld.h"
+#include "llrender.h"
+
+#include "indra_constants.h"
+#include "llstl.h"
+
+#include "llagent.h"
+#include "llviewercontrol.h"
+#include "lldrawpool.h"
+#include "llglheaders.h"
+#include "llhttpnode.h"
+#include "llregionhandle.h"
+#include "llsurface.h"
+#include "lltrans.h"
+#include "llviewercamera.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
+#include "llviewernetwork.h"
+#include "llviewerobjectlist.h"
+#include "llviewerparceloverlay.h"
+#include "llviewerregion.h"
+#include "llviewerstats.h"
+#include "llvlcomposition.h"
+#include "llvoavatar.h"
+#include "llvowater.h"
+#include "message.h"
+#include "pipeline.h"
+#include "llappviewer.h" // for do_disconnect()
+
+#include <deque>
+#include <queue>
+#include <map>
+#include <cstring>
+
+//
+// Globals
+//
+U32 gAgentPauseSerialNum = 0;
+
+//
+// Constants
+//
+const S32 MAX_NUMBER_OF_CLOUDS = 750;
+const S32 WORLD_PATCH_SIZE = 16;
+
+extern LLColor4U MAX_WATER_COLOR;
+
+const U32 LLWorld::mWidth = 256;
+
+// meters/point, therefore mWidth * mScale = meters per edge
+const F32 LLWorld::mScale = 1.f;
+
+const F32 LLWorld::mWidthInMeters = mWidth * mScale;
+
+//
+// Functions
+//
+
+// allocate the stack
+LLWorld::LLWorld() :
+ mLandFarClip(DEFAULT_FAR_PLANE),
+ mLastPacketsIn(0),
+ mLastPacketsOut(0),
+ mLastPacketsLost(0),
+ mSpaceTimeUSec(0),
+ mClassicCloudsEnabled(TRUE)
+{
+ for (S32 i = 0; i < 8; i++)
+ {
+ mEdgeWaterObjects[i] = NULL;
+ }
+
+ if (gNoRender)
+ {
+ return;
+ }
+
+ LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,4);
+ U8 *default_texture = raw->getData();
+ *(default_texture++) = MAX_WATER_COLOR.mV[0];
+ *(default_texture++) = MAX_WATER_COLOR.mV[1];
+ *(default_texture++) = MAX_WATER_COLOR.mV[2];
+ *(default_texture++) = MAX_WATER_COLOR.mV[3];
+
+ mDefaultWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ gGL.getTexUnit(0)->bind(mDefaultWaterTexturep);
+ mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
+
+}
+
+
+void LLWorld::destroyClass()
+{
+ mHoleWaterObjects.clear();
+ gObjectList.destroy();
+ for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); )
+ {
+ LLViewerRegion* region_to_delete = *region_it++;
+ removeRegion(region_to_delete->getHost());
+ }
+ if(LLVOCache::hasInstance())
+ {
+ LLVOCache::getInstance()->destroyClass() ;
+ }
+ LLViewerPartSim::getInstance()->destroyClass();
+}
+
+
+LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
+{
+ LLMemType mt(LLMemType::MTYPE_REGIONS);
+ llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
+ LLViewerRegion *regionp = getRegionFromHandle(region_handle);
+ if (regionp)
+ {
+ llinfos << "Region exists, removing it " << llendl;
+ LLHost old_host = regionp->getHost();
+ // region already exists!
+ if (host == old_host && regionp->isAlive())
+ {
+ // This is a duplicate for the same host and it's alive, don't bother.
+ return regionp;
+ }
+
+ if (host != old_host)
+ {
+ llwarns << "LLWorld::addRegion exists, but old host " << old_host
+ << " does not match new host " << host << llendl;
+ }
+ if (!regionp->isAlive())
+ {
+ llwarns << "LLWorld::addRegion exists, but isn't alive" << llendl;
+ }
+
+ // Kill the old host, and then we can continue on and add the new host. We have to kill even if the host
+ // matches, because all the agent state for the new camera is completely different.
+ removeRegion(old_host);
+ }
+
+ U32 iindex = 0;
+ U32 jindex = 0;
+ from_region_handle(region_handle, &iindex, &jindex);
+ S32 x = (S32)(iindex/mWidth);
+ S32 y = (S32)(jindex/mWidth);
+ llinfos << "Adding new region (" << x << ":" << y << ")" << llendl;
+ llinfos << "Host: " << host << llendl;
+
+ LLVector3d origin_global;
+
+ origin_global = from_region_handle(region_handle);
+
+ regionp = new LLViewerRegion(region_handle,
+ host,
+ mWidth,
+ WORLD_PATCH_SIZE,
+ getRegionWidthInMeters() );
+ if (!regionp)
+ {
+ llerrs << "Unable to create new region!" << llendl;
+ }
+
+ regionp->mCloudLayer.create(regionp);
+ regionp->mCloudLayer.setWidth((F32)mWidth);
+ regionp->mCloudLayer.setWindPointer(®ionp->mWind);
+
+ mRegionList.push_back(regionp);
+ mActiveRegionList.push_back(regionp);
+ mCulledRegionList.push_back(regionp);
+
+
+ // Find all the adjacent regions, and attach them.
+ // Generate handles for all of the adjacent regions, and attach them in the correct way.
+ // connect the edges
+ F32 adj_x = 0.f;
+ F32 adj_y = 0.f;
+ F32 region_x = 0.f;
+ F32 region_y = 0.f;
+ U64 adj_handle = 0;
+
+ F32 width = getRegionWidthInMeters();
+
+ LLViewerRegion *neighborp;
+ from_region_handle(region_handle, ®ion_x, ®ion_y);
+
+ // Iterate through all directions, and connect neighbors if there.
+ S32 dir;
+ for (dir = 0; dir < 8; dir++)
+ {
+ adj_x = region_x + width * gDirAxes[dir][0];
+ adj_y = region_y + width * gDirAxes[dir][1];
+ to_region_handle(adj_x, adj_y, &adj_handle);
+
+ neighborp = getRegionFromHandle(adj_handle);
+ if (neighborp)
+ {
+ //llinfos << "Connecting " << region_x << ":" << region_y << " -> " << adj_x << ":" << adj_y << llendl;
+ regionp->connectNeighbor(neighborp, dir);
+ }
+ }
+
+ updateWaterObjects();
+
+ return regionp;
+}
+
+
+void LLWorld::removeRegion(const LLHost &host)
+{
+ F32 x, y;
+
+ LLViewerRegion *regionp = getRegion(host);
+ if (!regionp)
+ {
+ llwarns << "Trying to remove region that doesn't exist!" << llendl;
+ return;
+ }
+
+ if (regionp == gAgent.getRegion())
+ {
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* reg = *iter;
+ llwarns << "RegionDump: " << reg->getName()
+ << " " << reg->getHost()
+ << " " << reg->getOriginGlobal()
+ << llendl;
+ }
+
+ llwarns << "Agent position global " << gAgent.getPositionGlobal()
+ << " agent " << gAgent.getPositionAgent()
+ << llendl;
+
+ llwarns << "Regions visited " << gAgent.getRegionsVisited() << llendl;
+
+ llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl;
+
+ llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl;
+ LLAppViewer::instance()->forceDisconnect(LLTrans::getString("YouHaveBeenDisconnected"));
+
+ regionp->saveObjectCache() ; //force to save objects here in case that the object cache is about to be destroyed.
+ return;
+ }
+
+ from_region_handle(regionp->getHandle(), &x, &y);
+ llinfos << "Removing region " << x << ":" << y << llendl;
+
+ mRegionList.remove(regionp);
+ mActiveRegionList.remove(regionp);
+ mCulledRegionList.remove(regionp);
+ mVisibleRegionList.remove(regionp);
+
+ delete regionp;
+
+ updateWaterObjects();
+
+ //double check all objects of this region are removed.
+ gObjectList.clearAllMapObjectsInRegion(regionp) ;
+ //llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
+}
+
+
+LLViewerRegion* LLWorld::getRegion(const LLHost &host)
+{
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ if (regionp->getHost() == host)
+ {
+ return regionp;
+ }
+ }
+ return NULL;
+}
+
+LLViewerRegion* LLWorld::getRegionFromPosAgent(const LLVector3 &pos)
+{
+ return getRegionFromPosGlobal(gAgent.getPosGlobalFromAgent(pos));
+}
+
+LLViewerRegion* LLWorld::getRegionFromPosGlobal(const LLVector3d &pos)
+{
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ if (regionp->pointInRegionGlobal(pos))
+ {
+ return regionp;
+ }
+ }
+ return NULL;
+}
+
+
+LLVector3d LLWorld::clipToVisibleRegions(const LLVector3d &start_pos, const LLVector3d &end_pos)
+{
+ if (positionRegionValidGlobal(end_pos))
+ {
+ return end_pos;
+ }
+
+ LLViewerRegion* regionp = getRegionFromPosGlobal(start_pos);
+ if (!regionp)
+ {
+ return start_pos;
+ }
+
+ LLVector3d delta_pos = end_pos - start_pos;
+ LLVector3d delta_pos_abs;
+ delta_pos_abs.setVec(delta_pos);
+ delta_pos_abs.abs();
+
+ LLVector3 region_coord = regionp->getPosRegionFromGlobal(end_pos);
+ F64 clip_factor = 1.0;
+ F32 region_width = regionp->getWidth();
+ if (region_coord.mV[VX] < 0.f)
+ {
+ if (region_coord.mV[VY] < region_coord.mV[VX])
+ {
+ // clip along y -
+ clip_factor = -(region_coord.mV[VY] / delta_pos_abs.mdV[VY]);
+ }
+ else
+ {
+ // clip along x -
+ clip_factor = -(region_coord.mV[VX] / delta_pos_abs.mdV[VX]);
+ }
+ }
+ else if (region_coord.mV[VX] > region_width)
+ {
+ if (region_coord.mV[VY] > region_coord.mV[VX])
+ {
+ // clip along y +
+ clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY];
+ }
+ else
+ {
+ //clip along x +
+ clip_factor = (region_coord.mV[VX] - region_width) / delta_pos_abs.mdV[VX];
+ }
+ }
+ else if (region_coord.mV[VY] < 0.f)
+ {
+ // clip along y -
+ clip_factor = -(region_coord.mV[VY] / delta_pos_abs.mdV[VY]);
+ }
+ else if (region_coord.mV[VY] > region_width)
+ {
+ // clip along y +
+ clip_factor = (region_coord.mV[VY] - region_width) / delta_pos_abs.mdV[VY];
+ }
+
+ // clamp to within region dimensions
+ LLVector3d final_region_pos = LLVector3d(region_coord) - (delta_pos * clip_factor);
+ final_region_pos.mdV[VX] = llclamp(final_region_pos.mdV[VX], 0.0,
+ (F64)(region_width - F_ALMOST_ZERO));
+ final_region_pos.mdV[VY] = llclamp(final_region_pos.mdV[VY], 0.0,
+ (F64)(region_width - F_ALMOST_ZERO));
+ final_region_pos.mdV[VZ] = llclamp(final_region_pos.mdV[VZ], 0.0,
+ (F64)(LLWorld::getInstance()->getRegionMaxHeight() - F_ALMOST_ZERO));
+ return regionp->getPosGlobalFromRegion(LLVector3(final_region_pos));
+}
+
+LLViewerRegion* LLWorld::getRegionFromHandle(const U64 &handle)
+{
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ if (regionp->getHandle() == handle)
+ {
+ return regionp;
+ }
+ }
+ return NULL;
+}
+
+
+void LLWorld::updateAgentOffset(const LLVector3d &offset_global)
+{
+#if 0
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->setAgentOffset(offset_global);
+ }
+#endif
+}
+
+
+BOOL LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global)
+{
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ if (regionp->pointInRegionGlobal(pos_global))
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
+// Allow objects to go up to their radius underground.
+F32 LLWorld::getMinAllowedZ(LLViewerObject* object, const LLVector3d &global_pos)
+{
+ F32 land_height = resolveLandHeightGlobal(global_pos);
+ F32 radius = 0.5f * object->getScale().length();
+ return land_height - radius;
+}
+
+
+
+LLViewerRegion* LLWorld::resolveRegionGlobal(LLVector3 &pos_region, const LLVector3d &pos_global)
+{
+ LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global);
+
+ if (regionp)
+ {
+ pos_region = regionp->getPosRegionFromGlobal(pos_global);
+ return regionp;
+ }
+
+ return NULL;
+}
+
+
+LLViewerRegion* LLWorld::resolveRegionAgent(LLVector3 &pos_region, const LLVector3 &pos_agent)
+{
+ LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
+ LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global);
+
+ if (regionp)
+ {
+ pos_region = regionp->getPosRegionFromGlobal(pos_global);
+ return regionp;
+ }
+
+ return NULL;
+}
+
+
+F32 LLWorld::resolveLandHeightAgent(const LLVector3 &pos_agent)
+{
+ LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
+ return resolveLandHeightGlobal(pos_global);
+}
+
+
+F32 LLWorld::resolveLandHeightGlobal(const LLVector3d &pos_global)
+{
+ LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global);
+ if (regionp)
+ {
+ return regionp->getLand().resolveHeightGlobal(pos_global);
+ }
+ return 0.0f;
+}
+
+
+// Takes a line defined by "point_a" and "point_b" and determines the closest (to point_a)
+// point where the the line intersects an object or the land surface. Stores the results
+// in "intersection" and "intersection_normal" and returns a scalar value that represents
+// the normalized distance along the line from "point_a" to "intersection".
+//
+// Currently assumes point_a and point_b only differ in z-direction,
+// but it may eventually become more general.
+F32 LLWorld::resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d &point_a, const LLVector3d &point_b,
+ LLVector3d &intersection, LLVector3 &intersection_normal,
+ LLViewerObject **viewerObjectPtr)
+{
+ // initialize return value to null
+ if (viewerObjectPtr)
+ {
+ *viewerObjectPtr = NULL;
+ }
+
+ LLViewerRegion *regionp = getRegionFromPosGlobal(point_a);
+ if (!regionp)
+ {
+ // We're outside the world
+ intersection = 0.5f * (point_a + point_b);
+ intersection_normal.setVec(0.0f, 0.0f, 1.0f);
+ return 0.5f;
+ }
+
+ // calculate the length of the segment
+ F32 segment_length = (F32)((point_a - point_b).length());
+ if (0.0f == segment_length)
+ {
+ intersection = point_a;
+ intersection_normal.setVec(0.0f, 0.0f, 1.0f);
+ return segment_length;
+ }
+
+ // get land height
+ // Note: we assume that the line is parallel to z-axis here
+ LLVector3d land_intersection = point_a;
+ F32 normalized_land_distance;
+
+ land_intersection.mdV[VZ] = regionp->getLand().resolveHeightGlobal(point_a);
+ normalized_land_distance = (F32)(point_a.mdV[VZ] - land_intersection.mdV[VZ]) / segment_length;
+ intersection = land_intersection;
+ intersection_normal = resolveLandNormalGlobal(land_intersection);
+
+ if (avatarp && !avatarp->mFootPlane.isExactlyClear())
+ {
+ LLVector3 foot_plane_normal(avatarp->mFootPlane.mV);
+ LLVector3 start_pt = avatarp->getRegion()->getPosRegionFromGlobal(point_a);
+ // added 0.05 meters to compensate for error in foot plane reported by Havok
+ F32 norm_dist_from_plane = ((start_pt * foot_plane_normal) - avatarp->mFootPlane.mV[VW]) + 0.05f;
+ norm_dist_from_plane = llclamp(norm_dist_from_plane / segment_length, 0.f, 1.f);
+ if (norm_dist_from_plane < normalized_land_distance)
+ {
+ // collided with object before land
+ normalized_land_distance = norm_dist_from_plane;
+ intersection = point_a;
+ intersection.mdV[VZ] -= norm_dist_from_plane * segment_length;
+ intersection_normal = foot_plane_normal;
+ }
+ else
+ {
+ intersection = land_intersection;
+ intersection_normal = resolveLandNormalGlobal(land_intersection);
+ }
+ }
+
+ return normalized_land_distance;
+}
+
+
+LLSurfacePatch * LLWorld::resolveLandPatchGlobal(const LLVector3d &pos_global)
+{
+ // returns a pointer to the patch at this location
+ LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global);
+ if (!regionp)
+ {
+ return NULL;
+ }
+
+ return regionp->getLand().resolvePatchGlobal(pos_global);
+}
+
+
+LLVector3 LLWorld::resolveLandNormalGlobal(const LLVector3d &pos_global)
+{
+ LLViewerRegion *regionp = getRegionFromPosGlobal(pos_global);
+ if (!regionp)
+ {
+ return LLVector3::z_axis;
+ }
+
+ return regionp->getLand().resolveNormalGlobal(pos_global);
+}
+
+
+void LLWorld::updateVisibilities()
+{
+ F32 cur_far_clip = LLViewerCamera::getInstance()->getFar();
+
+ LLViewerCamera::getInstance()->setFar(mLandFarClip);
+
+ F32 diagonal_squared = F_SQRT2 * F_SQRT2 * mWidth * mWidth;
+ // Go through the culled list and check for visible regions
+ for (region_list_t::iterator iter = mCulledRegionList.begin();
+ iter != mCulledRegionList.end(); )
+ {
+ region_list_t::iterator curiter = iter++;
+ LLViewerRegion* regionp = *curiter;
+ F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
+ F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
+ if (!regionp->getLand().hasZData()
+ || LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
+ {
+ mCulledRegionList.erase(curiter);
+ mVisibleRegionList.push_back(regionp);
+ }
+ }
+
+ // Update all of the visible regions
+ for (region_list_t::iterator iter = mVisibleRegionList.begin();
+ iter != mVisibleRegionList.end(); )
+ {
+ region_list_t::iterator curiter = iter++;
+ LLViewerRegion* regionp = *curiter;
+ if (!regionp->getLand().hasZData())
+ {
+ continue;
+ }
+
+ F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
+ F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
+ if (LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
+ {
+ regionp->calculateCameraDistance();
+ if (!gNoRender)
+ {
+ regionp->getLand().updatePatchVisibilities(gAgent);
+ }
+ }
+ else
+ {
+ mVisibleRegionList.erase(curiter);
+ mCulledRegionList.push_back(regionp);
+ }
+ }
+
+ // Sort visible regions
+ mVisibleRegionList.sort(LLViewerRegion::CompareDistance());
+
+ LLViewerCamera::getInstance()->setFar(cur_far_clip);
+}
+
+void LLWorld::updateRegions(F32 max_update_time)
+{
+ LLMemType mt_ur(LLMemType::MTYPE_IDLE_UPDATE_REGIONS);
+ LLTimer update_timer;
+ BOOL did_one = FALSE;
+
+ // Perform idle time updates for the regions (and associated surfaces)
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ F32 max_time = max_update_time - update_timer.getElapsedTimeF32();
+ if (did_one && max_time <= 0.f)
+ break;
+ max_time = llmin(max_time, max_update_time*.1f);
+ did_one |= regionp->idleUpdate(max_update_time);
+ }
+}
+
+void LLWorld::updateParticles()
+{
+ LLViewerPartSim::getInstance()->updateSimulation();
+}
+
+void LLWorld::updateClouds(const F32 dt)
+{
+ static LLFastTimer::DeclareTimer ftm("World Clouds");
+ LLFastTimer t(ftm);
+
+ if ( gSavedSettings.getBOOL("FreezeTime") )
+ {
+ // don't move clouds in snapshot mode
+ return;
+ }
+
+ if (
+ mClassicCloudsEnabled !=
+ gSavedSettings.getBOOL("SkyUseClassicClouds") )
+ {
+ // The classic cloud toggle has been flipped
+ // gotta update all of the cloud layers
+ mClassicCloudsEnabled =
+ gSavedSettings.getBOOL("SkyUseClassicClouds");
+
+ if ( !mClassicCloudsEnabled && mActiveRegionList.size() )
+ {
+ // We've transitioned to having classic clouds disabled
+ // reset all cloud layers.
+ for (
+ region_list_t::iterator iter = mActiveRegionList.begin();
+ iter != mActiveRegionList.end();
+ ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->mCloudLayer.reset();
+ }
+
+ return;
+ }
+ }
+ else if ( !mClassicCloudsEnabled ) return;
+
+ if (mActiveRegionList.size())
+ {
+ for (region_list_t::iterator iter = mActiveRegionList.begin();
+ iter != mActiveRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->mCloudLayer.updatePuffs(dt);
+ }
+
+ // Reshuffle who owns which puffs
+ for (region_list_t::iterator iter = mActiveRegionList.begin();
+ iter != mActiveRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->mCloudLayer.updatePuffOwnership();
+ }
+
+ // Add new puffs
+ for (region_list_t::iterator iter = mActiveRegionList.begin();
+ iter != mActiveRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->mCloudLayer.updatePuffCount();
+ }
+ }
+}
+
+LLCloudGroup* LLWorld::findCloudGroup(const LLCloudPuff &puff)
+{
+ if (mActiveRegionList.size())
+ {
+ // Update all the cloud puff positions, and timer based stuff
+ // such as death decay
+ for (region_list_t::iterator iter = mActiveRegionList.begin();
+ iter != mActiveRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ LLCloudGroup *groupp = regionp->mCloudLayer.findCloudGroup(puff);
+ if (groupp)
+ {
+ return groupp;
+ }
+ }
+ }
+ return NULL;
+}
+
+
+void LLWorld::renderPropertyLines()
+{
+ S32 region_count = 0;
+ S32 vertex_count = 0;
+
+ for (region_list_t::iterator iter = mVisibleRegionList.begin();
+ iter != mVisibleRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ region_count++;
+ vertex_count += regionp->renderPropertyLines();
+ }
+}
+
+
+void LLWorld::updateNetStats()
+{
+ F32 bits = 0.f;
+ U32 packets = 0;
+
+ for (region_list_t::iterator iter = mActiveRegionList.begin();
+ iter != mActiveRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->updateNetStats();
+ bits += regionp->mBitStat.getCurrent();
+ packets += llfloor( regionp->mPacketsStat.getCurrent() );
+ }
+
+ S32 packets_in = gMessageSystem->mPacketsIn - mLastPacketsIn;
+ S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut;
+ S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost;
+
+ S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits();
+ S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits();
+ LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f);
+ LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f);
+ LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f);
+ LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in);
+ LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out);
+ LLViewerStats::getInstance()->mPacketsLostStat.addValue(gMessageSystem->mDroppedPackets);
+ if (packets_in)
+ {
+ LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(100.f*((F32)packets_lost/(F32)packets_in));
+ }
+ else
+ {
+ LLViewerStats::getInstance()->mPacketsLostPercentStat.addValue(0.f);
+ }
+
+ mLastPacketsIn = gMessageSystem->mPacketsIn;
+ mLastPacketsOut = gMessageSystem->mPacketsOut;
+ mLastPacketsLost = gMessageSystem->mDroppedPackets;
+}
+
+
+void LLWorld::printPacketsLost()
+{
+ llinfos << "Simulators:" << llendl;
+ llinfos << "----------" << llendl;
+
+ LLCircuitData *cdp = NULL;
+ for (region_list_t::iterator iter = mActiveRegionList.begin();
+ iter != mActiveRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ cdp = gMessageSystem->mCircuitInfo.findCircuit(regionp->getHost());
+ if (cdp)
+ {
+ LLVector3d range = regionp->getCenterGlobal() - gAgent.getPositionGlobal();
+
+ llinfos << regionp->getHost() << ", range: " << range.length()
+ << " packets lost: " << cdp->getPacketsLost() << llendl;
+ }
+ }
+}
+
+void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data)
+{
+ LLViewerRegion* region = LLWorld::getInstance()->getRegion(msg->getSender());
+ if( region )
+ {
+ region->updateCoarseLocations(msg);
+ }
+}
+
+F32 LLWorld::getLandFarClip() const
+{
+ return mLandFarClip;
+}
+
+void LLWorld::setLandFarClip(const F32 far_clip)
+{
+ static S32 const rwidth = (S32)REGION_WIDTH_U32;
+ S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth;
+ S32 const n2 = (llceil(far_clip) - 1) / rwidth;
+ bool need_water_objects_update = n1 != n2;
+
+ mLandFarClip = far_clip;
+
+ if (need_water_objects_update)
+ {
+ updateWaterObjects();
+ }
+}
+
+// Some region that we're connected to, but not the one we're in, gave us
+// a (possibly) new water height. Update it in our local copy.
+void LLWorld::waterHeightRegionInfo(std::string const& sim_name, F32 water_height)
+{
+ for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter)
+ {
+ if ((*iter)->getName() == sim_name)
+ {
+ (*iter)->setWaterHeight(water_height);
+ break;
+ }
+ }
+}
+
void LLWorld::updateWaterObjects()
{
if (!gAgent.getRegion())
@@ -1013,298 +1015,334 @@ void LLWorld::updateWaterObjects() gObjectList.updateActive(waterp);
}
}
- - -void LLWorld::shiftRegions(const LLVector3& offset) -{ - for (region_list_t::const_iterator i = getRegionList().begin(); i != getRegionList().end(); ++i) - { - LLViewerRegion* region = *i; - region->updateRenderMatrix(); - } - - LLViewerPartSim::getInstance()->shift(offset); -} - -LLViewerTexture* LLWorld::getDefaultWaterTexture() -{ - return mDefaultWaterTexturep; -} - -void LLWorld::setSpaceTimeUSec(const U64 space_time_usec) -{ - mSpaceTimeUSec = space_time_usec; -} - -U64 LLWorld::getSpaceTimeUSec() const -{ - return mSpaceTimeUSec; -} - -void LLWorld::requestCacheMisses() -{ - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->requestCacheMisses(); - } -} - -void LLWorld::getInfo(LLSD& info) -{ - LLSD region_info; - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - regionp->getInfo(region_info); - info["World"].append(region_info); - } -} - -void LLWorld::disconnectRegions() -{ - LLMessageSystem* msg = gMessageSystem; - for (region_list_t::iterator iter = mRegionList.begin(); - iter != mRegionList.end(); ++iter) - { - LLViewerRegion* regionp = *iter; - if (regionp == gAgent.getRegion()) - { - // Skip the main agent - continue; - } - - llinfos << "Sending AgentQuitCopy to: " << regionp->getHost() << llendl; - msg->newMessageFast(_PREHASH_AgentQuitCopy); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_FuseBlock); - msg->addU32Fast(_PREHASH_ViewerCircuitCode, gMessageSystem->mOurCircuitCode); - msg->sendMessage(regionp->getHost()); - } -} - -static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim"); - -void process_enable_simulator(LLMessageSystem *msg, void **user_data) -{ - LLFastTimer t(FTM_ENABLE_SIMULATOR); - // enable the appropriate circuit for this simulator and - // add its values into the gSimulator structure - U64 handle; - U32 ip_u32; - U16 port; - - msg->getU64Fast(_PREHASH_SimulatorInfo, _PREHASH_Handle, handle); - msg->getIPAddrFast(_PREHASH_SimulatorInfo, _PREHASH_IP, ip_u32); - msg->getIPPortFast(_PREHASH_SimulatorInfo, _PREHASH_Port, port); - - // which simulator should we modify? - LLHost sim(ip_u32, port); - - // Viewer trusts the simulator. - msg->enableCircuit(sim, TRUE); - LLWorld::getInstance()->addRegion(handle, sim); - - // give the simulator a message it can use to get ip and port - llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl; - msg->newMessageFast(_PREHASH_UseCircuitCode); - msg->nextBlockFast(_PREHASH_CircuitCode); - msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); - msg->sendReliable(sim); -} - -class LLEstablishAgentCommunication : public LLHTTPNode -{ - LOG_CLASS(LLEstablishAgentCommunication); -public: - virtual void describe(Description& desc) const - { - desc.shortInfo("seed capability info for a region"); - desc.postAPI(); - desc.input( - "{ seed-capability: ..., sim-ip: ..., sim-port }"); - desc.source(__FILE__, __LINE__); - } - - virtual void post(ResponsePtr response, const LLSD& context, const LLSD& input) const - { - if (!input["body"].has("agent-id") || - !input["body"].has("sim-ip-and-port") || - !input["body"].has("seed-capability")) - { - llwarns << "invalid parameters" << llendl; - return; - } - - LLHost sim(input["body"]["sim-ip-and-port"].asString()); - - LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(sim); - if (!regionp) - { - llwarns << "Got EstablishAgentCommunication for unknown region " - << sim << llendl; - return; - } - regionp->setSeedCapability(input["body"]["seed-capability"]); - } -}; - -// disable the circuit to this simulator -// Called in response to "DisableSimulator" message. -void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data) -{ - LLHost host = mesgsys->getSender(); - - //llinfos << "Disabling simulator with message from " << host << llendl; - LLWorld::getInstance()->removeRegion(host); - - mesgsys->disableCircuit(host); -} - - -void process_region_handshake(LLMessageSystem* msg, void** user_data) -{ - LLHost host = msg->getSender(); - LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(host); - if (!regionp) - { - llwarns << "Got region handshake for unknown region " - << host << llendl; - return; - } - - regionp->unpackRegionHandshake(); -} - - -void send_agent_pause() -{ - // *NOTE:Mani Pausing the mainloop timeout. Otherwise a long modal event may cause - // the thread monitor to timeout. - LLAppViewer::instance()->pauseMainloopTimeout(); - - // Note: used to check for LLWorld initialization before it became a singleton. - // Rather than just remove this check I'm changing it to assure that the message - // system has been initialized. -MG - if (!gMessageSystem) - { - return; - } - - gMessageSystem->newMessageFast(_PREHASH_AgentPause); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); - - gAgentPauseSerialNum++; - gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum); - - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) - { - LLViewerRegion* regionp = *iter; - gMessageSystem->sendReliable(regionp->getHost()); - } - - gObjectList.mWasPaused = TRUE; -} - - -void send_agent_resume() -{ - // Note: used to check for LLWorld initialization before it became a singleton. - // Rather than just remove this check I'm changing it to assure that the message - // system has been initialized. -MG - if (!gMessageSystem) - { - return; - } - - gMessageSystem->newMessageFast(_PREHASH_AgentResume); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); - - gAgentPauseSerialNum++; - gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum); - - - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) - { - LLViewerRegion* regionp = *iter; - gMessageSystem->sendReliable(regionp->getHost()); - } - - // Reset the FPS counter to avoid an invalid fps - LLViewerStats::getInstance()->mFPSStat.start(); - - LLAppViewer::instance()->resumeMainloopTimeout(); -} - -static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin) -{ - LLVector3d pos_global; - LLVector3 pos_local; - U8 bits; - - bits = compact_local & 0xFF; - pos_local.mV[VZ] = F32(bits) * 4.f; - compact_local >>= 8; - - bits = compact_local & 0xFF; - pos_local.mV[VY] = (F32)bits; - compact_local >>= 8; - - bits = compact_local & 0xFF; - pos_local.mV[VX] = (F32)bits; - - pos_global.setVec( pos_local ); - pos_global += region_origin; - return pos_global; -} - -void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const -{ - if(avatar_ids != NULL) - { - avatar_ids->clear(); - } - if(positions != NULL) - { - positions->clear(); - } - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) - { - LLViewerRegion* regionp = *iter; - const LLVector3d& origin_global = regionp->getOriginGlobal(); - S32 count = regionp->mMapAvatars.count(); - for (S32 i = 0; i < count; i++) - { - LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global); - if(dist_vec(pos_global, relative_to) <= radius) - { - if(positions != NULL) - { - positions->push_back(pos_global); - } - if(avatar_ids != NULL) - { - avatar_ids->push_back(regionp->mMapAvatarIDs.get(i)); - } - } - } - } -} - - -LLHTTPRegistration<LLEstablishAgentCommunication> - gHTTPRegistrationEstablishAgentCommunication( - "/message/EstablishAgentCommunication"); +
+
+void LLWorld::shiftRegions(const LLVector3& offset)
+{
+ for (region_list_t::const_iterator i = getRegionList().begin(); i != getRegionList().end(); ++i)
+ {
+ LLViewerRegion* region = *i;
+ region->updateRenderMatrix();
+ }
+
+ LLViewerPartSim::getInstance()->shift(offset);
+}
+
+LLViewerTexture* LLWorld::getDefaultWaterTexture()
+{
+ return mDefaultWaterTexturep;
+}
+
+void LLWorld::setSpaceTimeUSec(const U64 space_time_usec)
+{
+ mSpaceTimeUSec = space_time_usec;
+}
+
+U64 LLWorld::getSpaceTimeUSec() const
+{
+ return mSpaceTimeUSec;
+}
+
+void LLWorld::requestCacheMisses()
+{
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->requestCacheMisses();
+ }
+}
+
+void LLWorld::getInfo(LLSD& info)
+{
+ LLSD region_info;
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ regionp->getInfo(region_info);
+ info["World"].append(region_info);
+ }
+}
+
+void LLWorld::disconnectRegions()
+{
+ LLMessageSystem* msg = gMessageSystem;
+ for (region_list_t::iterator iter = mRegionList.begin();
+ iter != mRegionList.end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ if (regionp == gAgent.getRegion())
+ {
+ // Skip the main agent
+ continue;
+ }
+
+ llinfos << "Sending AgentQuitCopy to: " << regionp->getHost() << llendl;
+ msg->newMessageFast(_PREHASH_AgentQuitCopy);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_FuseBlock);
+ msg->addU32Fast(_PREHASH_ViewerCircuitCode, gMessageSystem->mOurCircuitCode);
+ msg->sendMessage(regionp->getHost());
+ }
+}
+
+static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim");
+
+void process_enable_simulator(LLMessageSystem *msg, void **user_data)
+{
+ LLFastTimer t(FTM_ENABLE_SIMULATOR);
+ // enable the appropriate circuit for this simulator and
+ // add its values into the gSimulator structure
+ U64 handle;
+ U32 ip_u32;
+ U16 port;
+
+ msg->getU64Fast(_PREHASH_SimulatorInfo, _PREHASH_Handle, handle);
+ msg->getIPAddrFast(_PREHASH_SimulatorInfo, _PREHASH_IP, ip_u32);
+ msg->getIPPortFast(_PREHASH_SimulatorInfo, _PREHASH_Port, port);
+
+ // which simulator should we modify?
+ LLHost sim(ip_u32, port);
+
+ // Viewer trusts the simulator.
+ msg->enableCircuit(sim, TRUE);
+ LLWorld::getInstance()->addRegion(handle, sim);
+
+ // give the simulator a message it can use to get ip and port
+ llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl;
+ msg->newMessageFast(_PREHASH_UseCircuitCode);
+ msg->nextBlockFast(_PREHASH_CircuitCode);
+ msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
+ msg->sendReliable(sim);
+}
+
+class LLEstablishAgentCommunication : public LLHTTPNode
+{
+ LOG_CLASS(LLEstablishAgentCommunication);
+public:
+ virtual void describe(Description& desc) const
+ {
+ desc.shortInfo("seed capability info for a region");
+ desc.postAPI();
+ desc.input(
+ "{ seed-capability: ..., sim-ip: ..., sim-port }");
+ desc.source(__FILE__, __LINE__);
+ }
+
+ virtual void post(ResponsePtr response, const LLSD& context, const LLSD& input) const
+ {
+ if (!input["body"].has("agent-id") ||
+ !input["body"].has("sim-ip-and-port") ||
+ !input["body"].has("seed-capability"))
+ {
+ llwarns << "invalid parameters" << llendl;
+ return;
+ }
+
+ LLHost sim(input["body"]["sim-ip-and-port"].asString());
+
+ LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(sim);
+ if (!regionp)
+ {
+ llwarns << "Got EstablishAgentCommunication for unknown region "
+ << sim << llendl;
+ return;
+ }
+ regionp->setSeedCapability(input["body"]["seed-capability"]);
+ }
+};
+
+// disable the circuit to this simulator
+// Called in response to "DisableSimulator" message.
+void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
+{
+ LLHost host = mesgsys->getSender();
+
+ //llinfos << "Disabling simulator with message from " << host << llendl;
+ LLWorld::getInstance()->removeRegion(host);
+
+ mesgsys->disableCircuit(host);
+}
+
+
+void process_region_handshake(LLMessageSystem* msg, void** user_data)
+{
+ LLHost host = msg->getSender();
+ LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(host);
+ if (!regionp)
+ {
+ llwarns << "Got region handshake for unknown region "
+ << host << llendl;
+ return;
+ }
+
+ regionp->unpackRegionHandshake();
+}
+
+
+void send_agent_pause()
+{
+ // *NOTE:Mani Pausing the mainloop timeout. Otherwise a long modal event may cause
+ // the thread monitor to timeout.
+ LLAppViewer::instance()->pauseMainloopTimeout();
+
+ // Note: used to check for LLWorld initialization before it became a singleton.
+ // Rather than just remove this check I'm changing it to assure that the message
+ // system has been initialized. -MG
+ if (!gMessageSystem)
+ {
+ return;
+ }
+
+ gMessageSystem->newMessageFast(_PREHASH_AgentPause);
+ gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID);
+ gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
+
+ gAgentPauseSerialNum++;
+ gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum);
+
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ gMessageSystem->sendReliable(regionp->getHost());
+ }
+
+ gObjectList.mWasPaused = TRUE;
+}
+
+
+void send_agent_resume()
+{
+ // Note: used to check for LLWorld initialization before it became a singleton.
+ // Rather than just remove this check I'm changing it to assure that the message
+ // system has been initialized. -MG
+ if (!gMessageSystem)
+ {
+ return;
+ }
+
+ gMessageSystem->newMessageFast(_PREHASH_AgentResume);
+ gMessageSystem->nextBlockFast(_PREHASH_AgentData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID);
+ gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
+
+ gAgentPauseSerialNum++;
+ gMessageSystem->addU32Fast(_PREHASH_SerialNum, gAgentPauseSerialNum);
+
+
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ gMessageSystem->sendReliable(regionp->getHost());
+ }
+
+ // Reset the FPS counter to avoid an invalid fps
+ LLViewerStats::getInstance()->mFPSStat.start();
+
+ LLAppViewer::instance()->resumeMainloopTimeout();
+}
+
+static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin)
+{
+ LLVector3d pos_global;
+ LLVector3 pos_local;
+ U8 bits;
+
+ bits = compact_local & 0xFF;
+ pos_local.mV[VZ] = F32(bits) * 4.f;
+ compact_local >>= 8;
+
+ bits = compact_local & 0xFF;
+ pos_local.mV[VY] = (F32)bits;
+ compact_local >>= 8;
+
+ bits = compact_local & 0xFF;
+ pos_local.mV[VX] = (F32)bits;
+
+ pos_global.setVec( pos_local );
+ pos_global += region_origin;
+ return pos_global;
+}
+
+void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const
+{
+ if(avatar_ids != NULL)
+ {
+ avatar_ids->clear();
+ }
+ if(positions != NULL)
+ {
+ positions->clear();
+ }
+ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
+ iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ const LLVector3d& origin_global = regionp->getOriginGlobal();
+ S32 count = regionp->mMapAvatars.count();
+ for (S32 i = 0; i < count; i++)
+ {
+ LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global);
+ if(dist_vec(pos_global, relative_to) <= radius)
+ {
+ if(positions != NULL)
+ {
+ positions->push_back(pos_global);
+ }
+ if(avatar_ids != NULL)
+ {
+ avatar_ids->push_back(regionp->mMapAvatarIDs.get(i));
+ }
+ }
+ }
+ }
+ // retrieve the list of close avatars from viewer objects as well
+ // for when we are above 1000m, only do this when we are retrieving
+ // uuid's too as there could be duplicates
+ if(avatar_ids != NULL)
+ {
+ for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
+ iter != LLCharacter::sInstances.end(); ++iter)
+ {
+ LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
+ if(pVOAvatar->isDead() || pVOAvatar->isSelf())
+ continue;
+ LLUUID uuid = pVOAvatar->getID();
+ if(uuid.isNull())
+ continue;
+ LLVector3d pos_global = pVOAvatar->getPositionGlobal();
+ if(dist_vec(pos_global, relative_to) <= radius)
+ {
+ bool found = false;
+ uuid_vec_t::iterator sel_iter = avatar_ids->begin();
+ for (; sel_iter != avatar_ids->end(); sel_iter++)
+ {
+ if(*sel_iter == uuid)
+ {
+ found = true;
+ break;
+ }
+ }
+ if(!found)
+ {
+ if(positions != NULL)
+ positions->push_back(pos_global);
+ avatar_ids->push_back(uuid);
+ }
+ }
+ }
+ }
+}
+
+
+LLHTTPRegistration<LLEstablishAgentCommunication>
+ gHTTPRegistrationEstablishAgentCommunication(
+ "/message/EstablishAgentCommunication");
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a8e36df294..eaa6ba231d 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -75,6 +75,7 @@ #include "lltool.h" #include "lltoolmgr.h" #include "llviewercamera.h" +#include "llviewermediafocus.h" #include "llviewertexturelist.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" @@ -191,19 +192,20 @@ std::string gPoolNames[] = // Correspond to LLDrawpool enum render type "NONE", "POOL_SIMPLE", - "POOL_TERRAIN", + "POOL_GROUND", + "POOL_FULLBRIGHT", "POOL_BUMP", - "POOL_TREE", + "POOL_TERRAIN," "POOL_SKY", "POOL_WL_SKY", - "POOL_GROUND", + "POOL_TREE", + "POOL_GRASS", "POOL_INVISIBLE", "POOL_AVATAR", + "POOL_VOIDWATER", "POOL_WATER", - "POOL_GRASS", - "POOL_FULLBRIGHT", "POOL_GLOW", - "POOL_ALPHA", + "POOL_ALPHA" }; void drawBox(const LLVector3& c, const LLVector3& r); @@ -823,6 +825,7 @@ void LLPipeline::releaseGLBuffers() mGlow[i].release(); } + gBumpImageList.destroyGL(); LLVOAvatar::resetImpostors(); } @@ -945,6 +948,8 @@ void LLPipeline::createGLBuffers() addDeferredAttachments(mGIMap); } } + + gBumpImageList.restoreGL(); } void LLPipeline::restoreGL() @@ -2741,7 +2746,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD) { - if (drawablep->isVisible()) + //if (drawablep->isVisible()) isVisible() check here is redundant, if it wasn't visible, it wouldn't be here { if (!drawablep->isActive()) { @@ -3968,6 +3973,8 @@ void LLPipeline::renderDebug() glLoadMatrixd(gGLModelView); gGL.setColorMask(true, false); + bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); + // Debug stuff. for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -3978,7 +3985,8 @@ void LLPipeline::renderDebug() LLSpatialPartition* part = region->getSpatialPartition(i); if (part) { - if (hasRenderType(part->mDrawableType)) + if ( hud_only && (part->mDrawableType == RENDER_TYPE_HUD || part->mDrawableType == RENDER_TYPE_HUD_PARTICLES) || + !hud_only && hasRenderType(part->mDrawableType) ) { part->renderDebug(); } @@ -5786,21 +5794,12 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable) for (S32 i = 0; i < drawable->getNumFaces(); i++) { LLFace* facep = drawable->getFace(i); - facep->mVertexBuffer = NULL; - facep->mLastVertexBuffer = NULL; + facep->clearVertexBuffer(); } } void LLPipeline::resetVertexBuffers() -{ - sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); - sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); - LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO"); - LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw"); - LLVertexBuffer::sEnableVBOs = gSavedSettings.getBOOL("RenderVBOEnable"); - sBakeSunlight = gSavedSettings.getBOOL("RenderBakeSunlight"); - sNoAlpha = gSavedSettings.getBOOL("RenderNoAlpha"); - +{ for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -5840,8 +5839,16 @@ void LLPipeline::resetVertexBuffers() llwarns << "VBO name pool cleanup failed." << llendl; } - LLVertexBuffer::unbind(); - + LLVertexBuffer::unbind(); + + sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); + sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); + LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO"); + LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw"); + LLVertexBuffer::sEnableVBOs = gSavedSettings.getBOOL("RenderVBOEnable"); + LLVertexBuffer::sDisableVBOMapping = LLVertexBuffer::sEnableVBOs && gSavedSettings.getBOOL("RenderVBOMappingDisable") ; + sBakeSunlight = gSavedSettings.getBOOL("RenderBakeSunlight"); + sNoAlpha = gSavedSettings.getBOOL("RenderNoAlpha"); LLPipeline::sTextureBindTest = gSavedSettings.getBOOL("RenderDebugTextureBind"); } @@ -6160,7 +6167,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) LLVertexBuffer::unbind(); - if (LLPipeline::sRenderDeferred) + if (LLPipeline::sRenderDeferred && !LLViewerCamera::getInstance()->cameraUnderWater()) { LLGLSLShader* shader = &gDeferredPostProgram; if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2) @@ -6173,29 +6180,88 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) //depth of field focal plane calculations - F32 subject_distance = 16.f; - if (LLViewerJoystick::getInstance()->getOverrideCamera()) + static F32 current_distance = 16.f; + static F32 start_distance = 16.f; + static F32 transition_time = 1.f; + + LLVector3 focus_point; + + LLViewerObject* obj = LLViewerMediaFocus::getInstance()->getFocusedObject(); + if (obj && obj->mDrawable && obj->isSelected()) { - //flycam mode, use mouse cursor as focus point - LLVector3 eye = LLViewerCamera::getInstance()->getOrigin(); - subject_distance = (eye-gDebugRaycastIntersection).magVec(); + S32 face_idx = LLViewerMediaFocus::getInstance()->getFocusedFace(); + if (obj && obj->mDrawable) + { + LLFace* face = obj->mDrawable->getFace(face_idx); + if (face) + { + focus_point = face->getPositionAgent(); + } + } } - else - { - LLViewerObject* obj = gAgentCamera.getFocusObject(); - if (obj) +
+ if (focus_point.isExactlyZero())
+ {
+ if (LLViewerJoystick::getInstance()->getOverrideCamera())
+ { + focus_point = gDebugRaycastIntersection; + } + else if (gAgentCamera.cameraMouselook()) { - LLVector3 focus = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal()); - LLVector3 eye = LLViewerCamera::getInstance()->getOrigin(); - subject_distance = (focus-eye).magVec(); + gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, + NULL, + &focus_point); } + else + { + LLViewerObject* obj = gAgentCamera.getFocusObject();
+ if (obj)
+ {
+ focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal());
+ } + else + { + focus_point = gDebugRaycastIntersection; + } + } + } + + LLVector3 eye = LLViewerCamera::getInstance()->getOrigin(); + F32 target_distance = 16.f; + if (!focus_point.isExactlyZero()) + { + target_distance = LLViewerCamera::getInstance()->getAtAxis() * (focus_point-eye); + } + + if (transition_time >= 1.f && + fabsf(current_distance-target_distance)/current_distance > 0.01f) + { //large shift happened, interpolate smoothly to new target distance + transition_time = 0.f; + start_distance = current_distance; + } + else if (transition_time < 1.f) + { //currently in a transition, continue interpolating + transition_time += 1.f/gSavedSettings.getF32("CameraFocusTransitionTime")*gFrameIntervalSeconds; + transition_time = llmin(transition_time, 1.f); + + F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f; + current_distance = start_distance + (target_distance-start_distance)*t; + } + else + { //small or no change, just snap to target distance + current_distance = target_distance; } //convert to mm - subject_distance *= 1000.f; + F32 subject_distance = current_distance*1000.f; F32 fnumber = gSavedSettings.getF32("CameraFNumber"); - const F32 default_focal_length = gSavedSettings.getF32("CameraFocalLength"); - + F32 default_focal_length = gSavedSettings.getF32("CameraFocalLength"); + + if (LLToolMgr::getInstance()->inBuildMode()) + { //squish focal length when in build mode so DoF doesn't make editing objects difficult + default_focal_length = 5.f; + } + F32 fov = LLViewerCamera::getInstance()->getView(); const F32 default_fov = gSavedSettings.getF32("CameraFieldOfView") * F_PI/180.f; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 32ac93388d..be58af947c 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -447,6 +447,7 @@ public: RENDER_DEBUG_UPDATE_TYPE = 0x0800000, RENDER_DEBUG_PHYSICS_SHAPES = 0x1000000, RENDER_DEBUG_NORMALS = 0x2000000, + RENDER_DEBUG_LOD_INFO = 0x4000000, }; public: diff --git a/indra/newview/skins/default/textures/bottomtray/ChatBarHandle.png b/indra/newview/skins/default/textures/bottomtray/ChatBarHandle.png Binary files differnew file mode 100644 index 0000000000..8b58db0cba --- /dev/null +++ b/indra/newview/skins/default/textures/bottomtray/ChatBarHandle.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 10aeef7c8a..87d8e54a89 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -131,6 +131,7 @@ with the same filename but different name <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" /> + <texture name="ChatBarHandle" file_name="bottomtray/ChatBarHandle.png" preload="false" /> <texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="false" /> <texture name="DownArrow_Off" file_name="icons/DownArrow_Off.png" preload="false" /> <texture name="Dragbar" file_name="windows/Dragbar.png" preload="false" scale.left="35" scale.top="5" scale.right="29" scale.bottom="5" /> diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml index a096a87928..e78924a1ab 100644 --- a/indra/newview/skins/default/xui/da/floater_about_land.xml +++ b/indra/newview/skins/default/xui/da/floater_about_land.xml @@ -87,15 +87,9 @@ Gå til 'Verden' > 'Om land' eller vælg en anden parcel <text name="Owner:"> Ejer: </text> - <text name="OwnerText"> - Leyla Linden - </text> <text name="Group:"> Gruppe: </text> - <text name="GroupText"> - Leyla Linden - </text> <button label="Vælg" name="Set..."/> <check_box label="Tillad dedikering til gruppe" name="check deed" tool_tip="En gruppe administrator kan dedikere denne jord til gruppen, så det vil blive støttet af gruppen's jord tildeling."/> <button label="Dedikér" name="Deed..." tool_tip="Du kan kun dedikere jord, hvis du er en administrator i den valgte gruppe."/> @@ -396,7 +390,6 @@ Kun større parceller kan vises i søgning. Hjemmeside: </text> <button label="Vælg" name="set_media_url"/> - <check_box label="Skjul medie URL" name="hide_media_url" tool_tip="Klik her for at skjule medie adressen så det kun er dig og evt. parcel gruppens ejer/administratorer der kan se den."/> <text left="4" name="Description:"> Beskrivelse: </text> @@ -424,7 +417,6 @@ Kun større parceller kan vises i søgning. <check_box label="Gentag afspil" name="media_loop" tool_tip="Gentager automatisk medie, når det er færdigt med at spille starter det automatisk forfra."/> </panel> <panel label="LYD" name="land_audio_panel"> - <check_box label="Skjul URL" name="hide_music_url" tool_tip="Ved at vælge her, vil musik URL skjules for alle ikke autoriserede brugere der læser denne parcels information."/> <check_box label="Tillad stemmer" name="parcel_enable_voice_channel"/> <check_box label="Tillad stemmer (håndteret af estate)" name="parcel_enable_voice_channel_is_estate_disabled"/> <check_box label="Begræns stemme chat til denne parcel" name="parcel_enable_voice_channel_local"/> diff --git a/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml index fa36fab762..59dcc87140 100644 --- a/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> Skaber: </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Profil..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> Ejer: </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Profil..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Erhvervet: diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml index 781adcd50b..9e673d0d5b 100644 --- a/indra/newview/skins/default/xui/da/floater_tools.xml +++ b/indra/newview/skins/default/xui/da/floater_tools.xml @@ -167,15 +167,9 @@ <text name="Creator:"> Skaber: </text> - <text name="Creator Name"> - Mrs. Esbee Linden (esbee.linden) - </text> <text name="Owner:"> Ejer: </text> - <text name="Owner Name"> - Mrs. Erica "Moose" Linden (erica.linden) - </text> <text name="Group:"> Gruppe: </text> diff --git a/indra/newview/skins/default/xui/da/inspect_avatar.xml b/indra/newview/skins/default/xui/da/inspect_avatar.xml index f581210e1b..dc1ed562eb 100644 --- a/indra/newview/skins/default/xui/da/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/da/inspect_avatar.xml @@ -10,8 +10,6 @@ <string name="Details"> [SL_PROFILE] </string> - <text name="user_name_small" value="Grumpity ProductEngine med et langt navn"/> - <text name="user_slid" value="james.linden"/> <text name="user_details"> Dette er min second life beskrivelse og jeg synes den er rigtig god. Men af en eller ande grund er min beskrivelse meget lang fordi jeg taler en hel masse </text> diff --git a/indra/newview/skins/default/xui/da/panel_edit_profile.xml b/indra/newview/skins/default/xui/da/panel_edit_profile.xml index 80b20f15e9..14fd48ba2f 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_profile.xml @@ -26,11 +26,7 @@ <text name="display_name_label" value="Visningsnavn:"/> <text name="solo_username_label" value="Bugernavn:"/> <button name="set_name" tool_tip="Sæt visningsnavn"/> - <text name="solo_user_name" value="Hamilton Hitchings"/> - <text name="user_name" value="Hamilton Hitchings"/> - <text name="user_name_small" value="Hamilton Hitchings"/> <text name="user_label" value="Brugernavn:"/> - <text name="user_slid" value="hamilton.linden"/> <panel name="lifes_images_panel"> <icon label="" name="2nd_life_edit_icon" tool_tip="Klik for at vælge et billede"/> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_profile_view.xml b/indra/newview/skins/default/xui/da/panel_profile_view.xml index 5e0a51eb28..e6e8ca4d10 100644 --- a/indra/newview/skins/default/xui/da/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/da/panel_profile_view.xml @@ -10,10 +10,8 @@ <text name="solo_username_label" value="Brugernavn:"/> <text name="status" value="Online"/> <text name="user_name_small" value="Se på mig med dette enormt ekstremt super lange navn"/> - <text name="user_name" value="Jack Linden"/> <button name="copy_to_clipboard" tool_tip="Kopiér til udskriftsholder"/> <text name="user_label" value="Brugernavn:"/> - <text name="user_slid" value="jack.linden"/> <tab_container name="tabs"> <panel label="PROFIL" name="panel_profile"/> <panel label="FAVORITTER" name="panel_picks"/> diff --git a/indra/newview/skins/default/xui/da/sidepanel_task_info.xml b/indra/newview/skins/default/xui/da/sidepanel_task_info.xml index 746cf201bc..f80d5aeb15 100644 --- a/indra/newview/skins/default/xui/da/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> Skaber: </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> Ejer: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> Gruppe: </text> diff --git a/indra/newview/skins/default/xui/de/floater_about_land.xml b/indra/newview/skins/default/xui/de/floater_about_land.xml index f9169ed748..8783b52013 100644 --- a/indra/newview/skins/default/xui/de/floater_about_land.xml +++ b/indra/newview/skins/default/xui/de/floater_about_land.xml @@ -86,15 +86,9 @@ <text name="Owner:"> Eigentümer: </text> - <text name="OwnerText"> - Leyla Linden - </text> <text name="Group:"> Gruppe: </text> - <text name="GroupText"> - Leyla Linden - </text> <button label="Festlegen" label_selected="Einstellen..." name="Set..." width="90"/> <check_box label="Übertragung an Gruppe zulassen" name="check deed" tool_tip="Ein Gruppen-Officer kann dieses Land der Gruppe übertragen. Das Land wird dann über die Landzuteilung der Gruppe verwaltet."/> <button label="Übertragung" label_selected="Übertragen..." name="Deed..." tool_tip="Sie können Land nur übertragen, wenn Sie in der ausgewählten Gruppe Officer sind."/> @@ -398,7 +392,6 @@ Nur große Parzellen können in der Suche aufgeführt werden. Homepage: </text> <button label="Festlegen" name="set_media_url"/> - <check_box label="URL ausblenden" name="hide_media_url" tool_tip="Aktivieren Sie diese Option, wenn Sie nicht möchten, dass unautorisierte Personen die Medien-URL sehen können. Diese Option ist für HTML-Medien nicht verfügbar."/> <text name="Description:"> Inhalt: </text> @@ -428,7 +421,6 @@ Nur große Parzellen können in der Suche aufgeführt werden. <text name="MusicURL:"> Musik-URL: </text> - <check_box label="URL ausblenden" name="hide_music_url" tool_tip="Aktivieren Sie diese Option, wenn Sie nicht möchten, dass unautorisierte Personen die Musik-URL sehen können"/> <text name="Sound:"> Sound: </text> diff --git a/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml index f98e23bbc4..7f48105460 100644 --- a/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> Ersteller: </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Profil..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> Eigentümer: </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Profil..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Erworben: diff --git a/indra/newview/skins/default/xui/de/floater_script_search.xml b/indra/newview/skins/default/xui/de/floater_script_search.xml index de959cbb28..ffae96f6a1 100644 --- a/indra/newview/skins/default/xui/de/floater_script_search.xml +++ b/indra/newview/skins/default/xui/de/floater_script_search.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="script search" title="SKRIPT-SUCHE"> - <check_box label="Groß-/Kleinschreibung irrelevant" name="case_text"/> + <check_box label="Groß-/Kleinschreibung ignorieren" name="case_text"/> <button label="Suchen" label_selected="Suchen" name="search_btn"/> <button label="Ersetzen" label_selected="Ersetzen" name="replace_btn"/> <button label="Alle ersetzen" label_selected="Alle ersetzen" name="replace_all_btn"/> diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index 2d30814974..d201fc327c 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -170,15 +170,9 @@ <text name="Creator:"> Ersteller: </text> - <text name="Creator Name"> - Frau Esbee Linden (esbee.linden) - </text> <text name="Owner:"> Eigentümer: </text> - <text name="Owner Name"> - Frau Erica "Elch" Linden (erica.linden) - </text> <text name="Group:"> Gruppe: </text> diff --git a/indra/newview/skins/default/xui/de/inspect_avatar.xml b/indra/newview/skins/default/xui/de/inspect_avatar.xml index 92d9bc37c4..4b8fd8a0ad 100644 --- a/indra/newview/skins/default/xui/de/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/de/inspect_avatar.xml @@ -10,9 +10,6 @@ <string name="Details"> [SL_PROFILE] </string> - <text name="user_name_small" value="Launische Produktengine mit langem Namen"/> - <text name="user_name" value="Grumpity ProductEngine"/> - <text name="user_slid" value="james.linden"/> <text name="user_subtitle" value="11 Monate und 3 Tage alt"/> <text name="user_details"> Dies ist meine Second Life-Beschreibung und ich finde sie wirklich gut! Meine Beschreibung ist deshalb so lang, weil ich gerne rede. diff --git a/indra/newview/skins/default/xui/de/inspect_group.xml b/indra/newview/skins/default/xui/de/inspect_group.xml index badb47bf08..d85ca7ce4d 100644 --- a/indra/newview/skins/default/xui/de/inspect_group.xml +++ b/indra/newview/skins/default/xui/de/inspect_group.xml @@ -16,9 +16,6 @@ <string name="YouAreMember"> Sie sind Mitglied </string> - <text name="group_name"> - Grumpitys schlecht gelaunte Elche - </text> <text name="group_subtitle"> 123 Mitglieder </text> diff --git a/indra/newview/skins/default/xui/de/panel_activeim_row.xml b/indra/newview/skins/default/xui/de/panel_activeim_row.xml deleted file mode 100644 index 84272752cf..0000000000 --- a/indra/newview/skins/default/xui/de/panel_activeim_row.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_activeim_row"> - <text name="contact_name"> - Grumpity ProductEngine - </text> -</panel> diff --git a/indra/newview/skins/default/xui/de/panel_chat_header.xml b/indra/newview/skins/default/xui/de/panel_chat_header.xml index babbff3132..7916bf5155 100644 --- a/indra/newview/skins/default/xui/de/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/de/panel_chat_header.xml @@ -1,5 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="im_header" name="im_header"> - <text_editor name="user_name" value="Ericag Vader"/> <text name="time_box" value="23:30"/> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_edit_profile.xml b/indra/newview/skins/default/xui/de/panel_edit_profile.xml index be124050e8..03974e7f7f 100644 --- a/indra/newview/skins/default/xui/de/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/de/panel_edit_profile.xml @@ -29,11 +29,7 @@ <text name="display_name_label" value="Anzeigename:"/> <text name="solo_username_label" value="Benutzername:"/> <button name="set_name" tool_tip="Anzeigenamen festlegen"/> - <text name="solo_user_name" value="Hamilton Hitchings"/> - <text name="user_name" value="Hamilton Hitchings"/> - <text name="user_name_small" value="Hamilton Hitchings"/> <text name="user_label" value="Benutzername:"/> - <text name="user_slid" value="hamilton.linden"/> <panel name="lifes_images_panel"> <panel name="second_life_image_panel"> <text name="second_life_photo_title_text" value="[SECOND_LIFE]:"/> diff --git a/indra/newview/skins/default/xui/de/panel_group_invite.xml b/indra/newview/skins/default/xui/de/panel_group_invite.xml index 4e3a304609..5f323d80dd 100644 --- a/indra/newview/skins/default/xui/de/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/de/panel_group_invite.xml @@ -10,7 +10,7 @@ Einige der ausgewählten Einwohner sind bereits Gruppenmitglieder und haben aus diesem Grund keine Einladung erhalten. </panel.string> <text name="help_text"> - Sie können mehrere Einwohner Ihre Gruppe einladen. Klicken Sie hierzu auf „Einwohnerliste öffnen“. + Sie können mehrere Einwohner in Ihre Gruppe einladen. Klicken Sie hierzu auf „Einwohnerliste öffnen“. </text> <button label="Einwohnerliste öffnen" name="add_button" tool_tip=""/> <name_list name="invitee_list" tool_tip="Halten Sie zur Mehrfachauswahl die Strg-Taste gedrückt und klicken Sie auf die Namen."/> diff --git a/indra/newview/skins/default/xui/de/panel_instant_message.xml b/indra/newview/skins/default/xui/de/panel_instant_message.xml index 1433552c15..372def78ca 100644 --- a/indra/newview/skins/default/xui/de/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/de/panel_instant_message.xml @@ -4,7 +4,6 @@ 6 </string> <panel label="im_header" name="im_header"> - <text name="user_name" value="Erica Vader"/> <text name="time_box" value="23:30"/> </panel> <button label="Antworten" name="reply"/> diff --git a/indra/newview/skins/default/xui/de/panel_profile_view.xml b/indra/newview/skins/default/xui/de/panel_profile_view.xml index b44c128000..7e93bd1ede 100644 --- a/indra/newview/skins/default/xui/de/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/de/panel_profile_view.xml @@ -10,10 +10,8 @@ <text name="solo_username_label" value="Benutzername:"/> <text name="status" value="Online"/> <text name="user_name_small" value="Dieser Name ist ein ganz außerordentlich langer Name"/> - <text name="user_name" value="Jack Linden"/> <button name="copy_to_clipboard" tool_tip="In Zwischenablage kopieren"/> <text name="user_label" value="Benutzername:"/> - <text name="user_slid" value="jack.linden"/> <tab_container name="tabs" tab_min_width="60"> <panel label="PROFIL" name="panel_profile"/> <panel label="AUSWAHL" name="panel_picks"/> diff --git a/indra/newview/skins/default/xui/de/sidepanel_task_info.xml b/indra/newview/skins/default/xui/de/sidepanel_task_info.xml index 6474576c0f..7b46ee7c9b 100644 --- a/indra/newview/skins/default/xui/de/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/de/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> Ersteller: </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> Eigentümer: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> Gruppe: </text> diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 937a97797d..6e985e0476 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -220,9 +220,10 @@ layout="topleft" left_pad="2" name="OwnerText" + translate="false" use_ellipses="true" width="360"> - Leyla Linden + TestString PleaseIgnore </text> <button follows="right" @@ -260,8 +261,10 @@ left_pad="2" layout="topleft" name="GroupText" + translate="false" width="240"> -Leyla Linden </text> + TestString PleaseIgnore + </text> <button follows="right" height="23" @@ -1405,6 +1408,10 @@ Only large parcels can be listed in search. name="item11" value="shopping" /> <combo_box.item + label="Rental" + name="item13" + value="rental" /> + <combo_box.item label="Other" name="item12" value="other" /> @@ -1462,6 +1469,10 @@ Only large parcels can be listed in search. name="item11" value="shopping" /> <combo_box.item + label="Rental" + name="item13" + value="rental" /> + <combo_box.item label="Other" name="item12" value="other" /> @@ -1638,16 +1649,6 @@ Only large parcels can be listed in search. name="set_media_url" width="70" top_delta="0"/> - <check_box - follows="top|left" - height="16" - label="Hide URL" - layout="topleft" - left="110" - name="hide_media_url" - tool_tip="Checking this option will hide the media url to any non-authorized viewers of this parcel information. Note this is not available for HTML types." - width="50" - top_pad="5"/> <text type="string" length="1" @@ -1825,15 +1826,6 @@ Only large parcels can be listed in search. top_delta="0" right="-15" select_on_focus="true" /> - <check_box - height="16" - label="Hide URL" - layout="topleft" - name="hide_music_url" - tool_tip="Checking this option will hide the music url to any non-authorized viewers of this parcel information." - left_delta="10" - top_pad="5" - width="292" /> <text type="string" length="1" @@ -2078,7 +2070,7 @@ Only large parcels can be listed in search. layout="topleft" left_pad="10" name="remove_allowed" - right="-1" + right="-10" width="100" /> </panel> <panel @@ -2128,7 +2120,7 @@ Only large parcels can be listed in search. layout="topleft" left_pad="10" name="remove_banned" - right="-1" + right="-10" width="100" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 0ea42f9757..a97c697b24 100644 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -96,7 +96,7 @@ left="10" max_val="2" name="gamma" - top_pad="7" + top_pad="11" width="262" /> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index 29f09dd0b2..0cf07926c2 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -106,9 +106,10 @@ left_delta="78" name="LabelCreatorName" top_delta="0" + translate="false" use_ellipses="true" width="170"> - Nicole Linden + TestString PleaseIgnore </text> <button follows="top|right" @@ -140,9 +141,10 @@ left_delta="78" name="LabelOwnerName" top_delta="0" + translate="false" use_ellipses="true" width="170"> - Thrax Linden + TestString PleaseIgnore </text> <button follows="top|right" diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index 201e971f4c..ca4e4a3a2a 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -18,6 +18,9 @@ <string name="mesh_status_too_many_vertices">Level of detail has too many vertices.</string> <string name="mesh_status_missing_lod">Missing required level of detail.</string> <string name="layer_all">All</string> <!-- Text to display in physics layer combo box for "all layers" --> + <string name="decomposing">Analyzing...</string> + <string name="simplifying">Simplifying...</string> + <text left="15" bottom="25" follows="top|left" height="15" name="name_label"> Name: @@ -58,6 +61,9 @@ <panel name="preview_panel" left="15" + bevel_style="none" + border_style="line" + border="true" width="290" height="290" follows="all"/> @@ -159,8 +165,8 @@ Error Threshold </combo_item> </combo_box> - <spinner follows="top|left" name="lod_triangle_limit" left_pad="5" height="20" width="100" decimal_digits="0" enabled="true"/> - <spinner left_delta="0" bottom_delta="0" follows="top|left" name="lod_error_threshold" min_val="0" max_val="100" height="20" width="100" decimal_digits="3" visible="false" enabled="true"/> + <spinner follows="top|left" name="lod_triangle_limit" increment="10" left_pad="5" height="20" width="100" decimal_digits="0" enabled="true"/> + <spinner left_delta="0" bottom_delta="0" increment="0.01" follows="top|left" name="lod_error_threshold" min_val="0" max_val="100" height="20" width="100" decimal_digits="3" visible="false" enabled="true"/> <text follows="top|left" name="build_operator_text" left="45" top_pad="10" width="100" height="15"> Build Operator: diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index 2377a9e4ef..f133d75eee 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -101,7 +101,7 @@ height="388" top_pad="0" name="choose_file_panel" - visible="false" + visible="true" width="530" left="0"> <panel @@ -196,7 +196,7 @@ top_pad="0" name="preview_panel" bevel_style="none" - border_style="line" + highlight_light_color="0.09 0.09 0.09 1" border="true" height="150" follows="all" @@ -395,7 +395,7 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se Model Preview: </text> <combo_box left_pad="5" top_delta="-2" follows="left|top" list_position="below" height="18" - name="preview_lod_combo" width="90" tool_tip="LOD to view in preview render"> + name="preview_lod_combo2" width="90" tool_tip="LOD to view in preview render"> <combo_item name="high"> High </combo_item> @@ -414,6 +414,7 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se top_pad="5" name="preview_panel" bevel_style="none" + highlight_light_color="0.09 0.09 0.09 1" border_style="line" border="true" height="175" @@ -600,7 +601,7 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se height="388" top_delta="0" name="review_panel" - visible="true" + visible="false" width="530" left="0"> <panel @@ -670,6 +671,7 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se top_pad="10" name="preview_panel" bevel_style="none" + highlight_light_color="0.09 0.09 0.09 1" border_style="line" border="true" height="190" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 53cc808e70..73190a05ca 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -248,30 +248,53 @@ function="BuildTool.commitRadioEdit"/> </radio_group> <check_box - left="10" + left="5" follows="left|top" height="28" control_name="EditLinkedParts" label="Edit linked" layout="topleft" name="checkbox edit linked parts" - top_pad="2"> + top_pad="-10"> <check_box.commit_callback function="BuildTool.selectComponent"/> </check_box> - <text - text_color="LtGray_50" - follows="top|left" - halign="left" - left="13" - name="RenderingCost" - tool_tip="Shows the rendering cost calculated for this object" - top_pad="0" - type="string" - width="100"> - þ: [COUNT] - </text> + <button + follows="left|top" + height="23" + label="Link" + top_pad="2" + layout="topleft" + left="5" + name="link_btn" + width="50"> + <button.commit_callback + function="BuildTool.LinkObjects"/> + </button> + <button + follows="left|top" + height="23" + label="Unlink" + layout="topleft" + left_pad="2" + name="unlink_btn" + width="50"> + <button.commit_callback + function="BuildTool.UnlinkObjects"/> + </button> + <text + text_color="LtGray_50" + follows="top|left" + halign="left" + left_pad="3" + name="RenderingCost" + tool_tip="Shows the rendering cost calculated for this object" + top_delta="11" + type="string" + width="100"> + þ: [COUNT] + </text> <check_box control_name="ScaleUniform" height="19" @@ -299,7 +322,7 @@ layout="topleft" left="143" name="checkbox stretch textures" - top_pad="7" + top_pad="-6" width="134" /> <check_box control_name="SnapEnabled" @@ -757,7 +780,7 @@ follows="left|top" halign="right" layout="topleft" - right="-100" + right="-120" name="linked_set_count" top="144" width="80"> @@ -772,7 +795,7 @@ halign="right" layout="topleft" top_delta="0" - right="-10" + right="-8" name="linked_set_cost" tool_tip="Cost of currently selected linked sets as [prims],[physics complexity]" width="80"> @@ -786,7 +809,7 @@ halign="right" layout="topleft" top_pad="5" - right="-100" + right="-120" name="object_count" width="80"> Objects: [COUNT] @@ -799,7 +822,7 @@ halign="right" layout="topleft" top_delta="0" - right="-10" + right="-8" name="object_cost" tool_tip="Cost of currently selected objects as [prims] / [physics complexity]" width="80"> @@ -843,7 +866,8 @@ tab_height="25" top="173" width="295"> - <panel + +<panel border="false" follows="all" label="General" @@ -959,10 +983,11 @@ layout="topleft" name="Creator Name" top_delta="0" + translate="false" width="190" word_wrap="true" use_ellipses="true"> - Mrs. Esbee Linden (esbee.linden) + TestString PleaseIgnore (please.ignore) </text> <text type="string" @@ -986,10 +1011,11 @@ name="Owner Name" left_pad="0" top_delta="0" + translate="false" width="190" word_wrap="true" use_ellipses="true"> - Mrs. Erica "Moose" Linden (erica.linden) + TestString PleaseIgnore (please.ignore) </text> <text type="string" @@ -1537,17 +1563,18 @@ even though the user gets a free copy. layout="topleft" left_delta="0" name="label physicsshapetype" - top_pad="10" + top_pad="50" width="121"> Physics Shape Type: </text> <combo_box height="23" + top_delta="-5" layout="topleft" follows="left|top" name="Physics Shape Type Combo Ctrl" tool_tip="Choose the physics shape type" - left_pad="0" + left_pad="5" width="108"/> <spinner diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index 853d5f8735..bd9e367d1f 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -40,10 +40,11 @@ name="user_name_small" top="7" text_color="White" + translate="false" use_ellipses="true" word_wrap="true" visible="false" - value="Grumpity ProductEngine with a long name" + value="TestString PleaseIgnore" width="185" /> <text follows="top|left" @@ -53,8 +54,9 @@ name="user_name" top="10" text_color="White" + translate="false" use_ellipses="true" - value="Grumpity ProductEngine" + value="TestString PleaseIgnore" width="190" /> <text follows="top|left" @@ -63,7 +65,8 @@ name="user_slid" font="SansSerifSmallBold" text_color="EmphasisColor" - value="james.linden" + translate="false" + value="teststring.pleaseignore" width="185" use_ellipses="true" /> <text diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml index bcdb63228d..324ff3eabd 100644 --- a/indra/newview/skins/default/xui/en/inspect_group.xml +++ b/indra/newview/skins/default/xui/en/inspect_group.xml @@ -28,10 +28,11 @@ name="group_name" top="10" text_color="White" + translate="false" use_ellipses="true" width="175" word_wrap="false"> - Grumpity's Grumpy Group of Moose + TestString PleaseIgnore </text> <text follows="all" diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml index 5beafef4e4..1b55fa4fd3 100644 --- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml @@ -9,6 +9,18 @@ visible="false" width="128"> <menu_item_check + label="Voice Enabled" + layout="topleft" + name="EnableVoiceChat"> + <menu_item_check.on_click + function="ToggleControl" + parameter="EnableVoiceChat" /> + <menu_item_check.on_check + function="CheckControl" + parameter="EnableVoiceChat" /> + </menu_item_check> + <menu_item_separator/> + <menu_item_check label="Gesture button" layout="topleft" name="ShowGestureButton"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0a6be2899b..38e9165613 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2278,6 +2278,16 @@ parameter="face area" /> </menu_item_check> <menu_item_check + label="LOD Info" + name="LOD Info"> + <menu_item_check.on_check + function="Advanced.CheckInfoDisplay" + parameter="lod info" /> + <menu_item_check.on_click + function="Advanced.ToggleInfoDisplay" + parameter="lod info" /> + </menu_item_check> + <menu_item_check label="Build Queue" name="Build Queue"> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml index 72f41c62f4..1d8bfa0672 100644 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml @@ -65,6 +65,7 @@ speaker.visible="false"> </chiclet_im_adhoc> <text + translate="false" type="string" name="contact_name" layout="topleft" @@ -76,7 +77,7 @@ follows="right|left" use_ellipses="true" font="SansSerifBold"> - Grumpity ProductEngine + TestString PleaseIgnore </text> <button top="10" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 013a8090f7..a92cc886e7 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -45,11 +45,11 @@ min_width="214" height="28" mouse_opaque="false" - name="chat_bar_layout_panel" + name="chat_bar_layout_panel" user_resize="true" - width="308" > + width="310" > <panel - name="chat_bar" + name="chat_bar" filename="panel_nearby_chat_bar.xml" left="0" height="28" @@ -60,11 +60,30 @@ /> </layout_panel> <!-- - There is resize bar between chatbar and Speak button. It has 2px width (is is set as 2*UIResizeBarOverlap) + This 5px Panel is an indicator of where the resize handle is. + The panel provides a gap between the resize handle icon and a button to the right. --> <layout_panel auto_resize="false" - follows="right" + layout="topleft" + max_width="5" + min_width="5" + name="chat_bar_resize_handle_panel" + user_resize="false" + width="5"> + <icon + follows="top|right" + height="25" + image_name="ChatBarHandle" + layout="topleft" + left="-7" + name="resize_handle" + top="4" + width="5" /> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" height="28" layout="topleft" min_height="28" @@ -72,13 +91,13 @@ mouse_opaque="false" name="speak_panel" top_delta="0" - user_resize="true" - width="110"> + user_resize="false" + width="108"> <talk_button follows="left|right" height="23" layout="topleft" - left="2" + left="0" name="talk" top="5" width="105"> diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 17e8d4d2df..2645d472f9 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -35,9 +35,10 @@ text_color="white" bg_readonly_color="black" top="0" + translate="false" use_ellipses="true" valign="bottom" - value="Ericag Vader" /> + value="TestString PleaseIgnore" /> <text allow_scroll="false" font="SansSerifSmall" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index a028e3ab9f..82dfb445da 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -183,17 +183,17 @@ left="8" name="bottom_panel" top_pad="5" - width="303"> + width="315"> <layout_stack follows="bottom|left|right" height="23" layout="topleft" name="layout_stack1" - left="2" + left="0" orientation="horizontal" top_pad="0" - width="303"> + width="313"> <layout_panel follows="bottom|left|right" @@ -223,7 +223,7 @@ name="layout_panel1" user_resize="false" auto_resize="true" - width="150"> + width="146"> <button follows="bottom|left|right" height="23" @@ -232,7 +232,7 @@ name="cancel_btn" top="0" left="1" - width="149" /> + width="145" /> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index 37265d65f1..442eb8c28d 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -127,7 +127,8 @@ name="solo_user_name" text_color="white" top_delta="3" - value="Hamilton Hitchings" + translate="false" + value="TestString PleaseIgnore" use_ellipses="true" visible="false" width="275" /> @@ -140,7 +141,8 @@ name="user_name" text_color="white" top_delta="0" - value="Hamilton Hitchings" + translate="false" + value="TestString PleaseIgnore" use_ellipses="true" visible="true" width="250" /> @@ -153,7 +155,8 @@ name="user_name_small" text_color="white" top_delta="-4" - value="Hamilton Hitchings" + translate="false" + value="TestString PleaseIgnore" use_ellipses="true" visible="false" wrap="true" @@ -177,8 +180,9 @@ text_color="EmphasisColor" font="SansSerifBold" top_delta="-2" + translate="false" use_ellipses="true" - value="hamilton.linden" + value="teststring.pleaseignore" wrap="true" width="205" /> <panel diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 70b96ca5eb..38b680ba86 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -21,7 +21,7 @@ Hover your mouse over the options for more help. </panel.string> <panel name="group_info_top" - follows="top|left" + follows="top|left|right" top="0" left="0" height="129" @@ -43,7 +43,7 @@ Hover your mouse over the options for more help. font="SansSerifSmall" text_color="White_50" width="190" - follows="top|left" + follows="top|left|right" layout="topleft" mouse_opaque="false" type="string" @@ -55,7 +55,7 @@ Hover your mouse over the options for more help. Founder: </text> <text - follows="left|top" + follows="left|top|right" height="16" layout="topleft" left_delta="-2" diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml index 021cf00d03..46c1add739 100644 --- a/indra/newview/skins/default/xui/en/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml @@ -65,8 +65,9 @@ name="user_name" text_color="white" top="8" + translate="false" use_ellipses="true" - value="Erica Vader" + value="TestString PleaseIgnore" width="205" /> <!-- TIME STAMP --> <text diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 96633cb5b4..0df9aa2868 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -46,7 +46,7 @@ label="Filter Inventory" layout="topleft" left="10" - max_length="300" + max_length_chars="300" name="inventory search editor" top="18" width="303" /> diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 88c82313dd..2ad2416179 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -76,7 +76,7 @@ left="0" orientation="horizontal" top="0" - width="313"> + width="308"> <layout_panel follows="bottom|left|right" height="23" @@ -120,16 +120,16 @@ name="wear_btn_lp" user_resize="false" auto_resize="true" - width="152"> + width="147"> <button follows="bottom|left|right" height="23" label="Wear" layout="topleft" name="wear_btn" - left="0" + left="1" top="0" - width="152" /> + width="146" /> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index d9c357f277..daf571297f 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -176,7 +176,7 @@ background_visible="true" left="0" orientation="horizontal" top="0" - width="120"> + width="113"> <layout_panel follows="bottom|left|right" @@ -214,7 +214,9 @@ background_visible="true" <menu_button follows="bottom|left|right" height="23" - label="▼" + image_disabled="ComboButton_UpOff" + image_unselected="ComboButton_UpOff" + image_selected="ComboButton_UpSelected" layout="topleft" mouse_opaque="false" name="overflow_btn" @@ -236,7 +238,7 @@ background_visible="true" left="0" orientation="horizontal" top="0" - width="120"> + width="110"> <layout_panel follows="bottom|left|right" height="23" @@ -246,7 +248,7 @@ background_visible="true" name="profile_btn_lp" user_resize="false" auto_resize="true" - width="112"> + width="102"> <button follows="bottom|left|right" height="23" @@ -257,7 +259,7 @@ background_visible="true" left="1" tool_tip="Show place profile" top="0" - width="111" /> + width="101" /> </layout_panel> </layout_stack> @@ -272,7 +274,7 @@ background_visible="true" left="0" orientation="horizontal" top="0" - width="120"> + width="112"> <layout_panel follows="bottom|left|right" height="23" @@ -283,7 +285,7 @@ background_visible="true" top="0" user_resize="false" auto_resize="true" - width="61"> + width="51"> <button follows="bottom|left|right" height="23" @@ -293,7 +295,7 @@ background_visible="true" name="close_btn" left="1" top="0" - width="60" /> + width="50" /> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index c553a3aba0..646875b52e 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -83,8 +83,9 @@ left="45" name="user_name" text_color="LtGray" + translate="false" top="25" - value="Jack Linden" + value="TestString PleaseIgnore" visible="true" use_ellipses="true" width="258" /> @@ -118,8 +119,9 @@ text_color="EmphasisColor" font="SansSerifBold" top_delta="-2" + translate="false" use_ellipses="true" - value="jack.linden" + value="teststring.pleaseignore" width="195" wrap="true "/> <tab_container diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index f3c6895cee..8997c1a6d7 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -37,7 +37,7 @@ name="button_panel" left="9" top_pad="-2" - width="313"> + width="308"> <layout_stack follows="bottom|left|right" height="23" @@ -47,7 +47,7 @@ left="0" orientation="horizontal" top="0" - width="313"> + width="308"> <layout_panel follows="bottom|left|right" height="23" @@ -57,7 +57,7 @@ name="info_btn_lp" user_resize="false" auto_resize="true" - width="103"> + width="101"> <button enabled="true" follows="bottom|left|right" @@ -68,62 +68,62 @@ name="info_btn" tool_tip="Show object profile" top="0" - width="102" /> + width="100" /> </layout_panel> <layout_panel follows="bottom|left|right" height="23" layout="bottomleft" - left_pad="3" + left_pad="1" mouse_opaque="false" name="share_btn_lp" user_resize="false" auto_resize="true" - width="102"> + width="100"> <button enabled="true" follows="bottom|left|right" height="23" label="Share" layout="topleft" - left="0" + left="1" name="share_btn" tool_tip="Share an inventory item" top="0" - width="102" /> + width="99" /> </layout_panel> <layout_panel follows="bottom|left|right" height="23" layout="bottomleft" - left_pad="3" + left_pad="1" mouse_opaque="false" name="shop_btn_lp" user_resize="false" auto_resize="true" - width="102"> + width="100"> <button enabled="true" follows="bottom|left|right" height="23" label="Shop" layout="topleft" - left="0" + left="1" name="shop_btn" tool_tip="Open Marketplace webpage" top="0" - width="102" /> + width="99" /> <button enabled="false" follows="bottom|left|right" height="23" label="Wear" layout="topleft" - left="0" + left="1" name="wear_btn" tool_tip="Wear seleceted outfit" top="0" - width="102" /> + width="99" /> <button enabled="false" follows="bottom|left|right" @@ -131,20 +131,20 @@ label="Play" layout="topleft" name="play_btn" - left="0" + left="1" top="0" - width="102" /> + width="99" /> <button enabled="false" follows="bottom|left|right" height="23" label="Teleport" layout="topleft" - left="0" + left="1" name="teleport_btn" tool_tip="Teleport to the selected area" top="0" - width="102" /> + width="99" /> </layout_panel> </layout_stack> </panel> 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 e2b3d81bf6..c2394a3fa2 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -168,9 +168,10 @@ left_pad="0" name="Creator Name" top_delta="0" + translate="false" use_ellipses="true" width="225"> - Erica Linden + TestString PleaseIgnore </text> <text type="string" @@ -193,9 +194,10 @@ left_pad="0" name="Owner Name" top_delta="0" + translate="false" use_ellipses="true" width="225"> - Erica Linden + TestString PleaseIgnore </text> <text type="string" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 4b871343e2..b7bf2526ab 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2372,6 +2372,7 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh <!--<string name="Shopping">Shopping</string> --> <string name="Stage">Stage</string> <string name="Other">Other</string> + <string name="Rental">Rental</string> <string name="Any">Any</string> <string name="You">You</string> @@ -3427,4 +3428,13 @@ Abuse Report</string> <string name="Z">Z</string> <!-- Key names end --> + <!-- llviewerwindow --> + <string name="BeaconParticle">Viewing particle beacons (blue)</string> + <string name="BeaconPhysical">Viewing physical object beacons (green)</string> + <string name="BeaconScripted">Viewing scripted object beacons (red)</string> + <string name="BeaconScriptedTouch">Viewing scripted object with touch function beacons (red)</string> + <string name="BeaconSound">Viewing sound beacons (yellow)</string> + <string name="BeaconMedia">Viewing media beacons (white)</string> + <string name="ParticleHiding">Hiding Particles</string> + </strings> diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml index be5b5d011c..3f50437c13 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -87,15 +87,9 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s <text name="Owner:"> Propietario: </text> - <text name="OwnerText"> - Leyla Linden - </text> <text name="Group:"> Grupo: </text> - <text name="GroupText"> - Leyla Linden - </text> <button label="Configurar" name="Set..."/> <check_box label="Permitir transferir al grupo" name="check deed" tool_tip="Un oficial del grupo puede transferir este terreno al grupo. El terreno será apoyado por el grupo en sus asignaciones de terreno."/> <button label="Transferir" name="Deed..." tool_tip="Sólo si es usted un oficial del grupo seleccionado puede transferir terreno."/> @@ -398,7 +392,6 @@ Sólo las parcelas más grandes pueden listarse en la búsqueda. </text> <line_editor left="97" name="media_url"/> <button label="Definir" name="set_media_url"/> - <check_box label="Ocultar la URL del media" left="97" name="hide_media_url" tool_tip="Marcando esta opción esconderá en la información de esta parcela -a quien no esté autorizado a verla- la URL del media. Note que esto no está disponible para HTML."/> <text name="Description:"> Descripción: </text> @@ -430,7 +423,6 @@ los media: <text name="MusicURL:"> URL de música: </text> - <check_box label="Ocultar la URL" name="hide_music_url" tool_tip="Al marcar esta opción se ocultará la URL de la música a quien no esté autorizado a ver la información de esta parcela."/> <text name="Sound:"> Sonido: </text> diff --git a/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml index 5746688962..bf84c3d808 100644 --- a/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> Creador: </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Perfil..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> Propietario: </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Perfil..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Adquirido: diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml index d85b43b7e8..e2ff4a25ce 100644 --- a/indra/newview/skins/default/xui/es/floater_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_tools.xml @@ -170,15 +170,9 @@ <text name="Creator:"> Creador: </text> - <text name="Creator Name"> - Dª Esbee Linden (esbee.linden) - </text> <text name="Owner:"> Propietario: </text> - <text name="Owner Name"> - Dª Erica "Moose" Linden (erica.linden) - </text> <text name="Group:"> Grupo: </text> diff --git a/indra/newview/skins/default/xui/es/inspect_avatar.xml b/indra/newview/skins/default/xui/es/inspect_avatar.xml index 119f252db2..1d70fa6a90 100644 --- a/indra/newview/skins/default/xui/es/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/es/inspect_avatar.xml @@ -10,8 +10,6 @@ <string name="Details"> [SL_PROFILE] </string> - <text name="user_name_small" value="Grumpity ProductEngine con un nombre demasiado largo"/> - <text name="user_slid" value="james.linden"/> <text name="user_details"> Ésta es mi descripción de Second Life que, por cierto, me encanta. Pero, por lo que sea, me he enrollado más de la cuenta y la descripción es larguísima. </text> diff --git a/indra/newview/skins/default/xui/es/panel_edit_profile.xml b/indra/newview/skins/default/xui/es/panel_edit_profile.xml index 56d03dccc2..8e5e09cfec 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_profile.xml @@ -25,11 +25,7 @@ <text name="display_name_label" value="Nombre mostrado:"/> <text name="solo_username_label" value="Nombre de usuario:"/> <button name="set_name" tool_tip="Configurar nombre mostrado"/> - <text name="solo_user_name" value="Hamilton Hitchings"/> - <text name="user_name" value="Hamilton Hitchings"/> - <text name="user_name_small" value="Hamilton Hitchings"/> <text name="user_label" value="Nombre de usuario:"/> - <text name="user_slid" value="hamilton.linden"/> <panel name="lifes_images_panel"> <icon label="" name="2nd_life_edit_icon" tool_tip="Pulsa para elegir una imagen"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_profile_view.xml b/indra/newview/skins/default/xui/es/panel_profile_view.xml index a11fc31607..cb374dee52 100644 --- a/indra/newview/skins/default/xui/es/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/es/panel_profile_view.xml @@ -10,10 +10,8 @@ <text name="solo_username_label" value="Nombre de usuario:"/> <text name="status" value="Conectado/a"/> <text name="user_name_small" value="Jack, ¿has visto esto? Es un nombre larguísimo."/> - <text name="user_name" value="Jack Linden"/> <button name="copy_to_clipboard" tool_tip="Copiar al portapapeles"/> <text name="user_label" value="Nombre de usuario:"/> - <text name="user_slid" value="jack.linden"/> <tab_container name="tabs"> <panel label="PERFIL" name="panel_profile"/> <panel label="DESTACADOS" name="panel_picks"/> diff --git a/indra/newview/skins/default/xui/es/panel_region_covenant.xml b/indra/newview/skins/default/xui/es/panel_region_covenant.xml index 0a5d7c2786..06f4fffacf 100644 --- a/indra/newview/skins/default/xui/es/panel_region_covenant.xml +++ b/indra/newview/skins/default/xui/es/panel_region_covenant.xml @@ -27,8 +27,8 @@ </text_editor> <button label="Cambiar" name="reset_covenant"/> <text name="covenant_help_text"> - Los cambios en el contrato se mostrarán en todas las parcelas - del estado. + Los cambios en el contrato se mostrarán en todas las parcelas +del estado. </text> <text bottom_delta="-31" name="covenant_instructions"> Arrastra y suelta una nota para cambiar el contrato de este estado. @@ -73,7 +73,8 @@ El terreno comprado en esta región no se podrá revender. </string> <string name="can_change"> - El terreno comprado en esta región se podrá unir o subdividir. + El terreno comprado en esta región se podrá unir o +subdividir. </string> <string name="can_not_change"> El terreno comprado en esta región no se podrá unir ni diff --git a/indra/newview/skins/default/xui/es/sidepanel_task_info.xml b/indra/newview/skins/default/xui/es/sidepanel_task_info.xml index e6d9e28aff..bd814ecc66 100644 --- a/indra/newview/skins/default/xui/es/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/es/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> Creador: </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> Propietario: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> Grupo: </text> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 19adf29d29..df40a2b6b4 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -1692,7 +1692,7 @@ <string name="RegionNoCovenantOtherOwner"> No se ha aportado un contrato para este estado. El terreno de este estado lo vende el propietario del estado, no Linden Lab. Por favor, contacta con ese propietario para informarte sobre la venta. </string> - <string name="covenant_last_modified" value="Última modificación:"/> + <string name="covenant_last_modified" value="Última modificación: "/> <string name="none_text" value="(no hay)"/> <string name="never_text" value=" (nunca)"/> <string name="GroupOwned"> diff --git a/indra/newview/skins/default/xui/fr/floater_about_land.xml b/indra/newview/skins/default/xui/fr/floater_about_land.xml index b0ef1cf8df..6e6409725f 100644 --- a/indra/newview/skins/default/xui/fr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_about_land.xml @@ -88,15 +88,9 @@ <text name="Owner:"> Propriétaire : </text> - <text name="OwnerText"> - Leyla Linden - </text> <text name="Group:"> Groupe : </text> - <text name="GroupText"> - Leyla Linden - </text> <button label="Choisir" label_selected="Définir..." name="Set..."/> <check_box label="Autoriser la cession au groupe" name="check deed" tool_tip="Un officier du groupe peut céder ce terrain à ce groupe, afin qu'il soit pris en charge par l'allocation de terrains du groupe."/> <button label="Céder" label_selected="Céder..." name="Deed..." tool_tip="Vous ne pouvez céder le terrain que si vous avez un rôle d'officier dans le groupe sélectionné."/> @@ -403,7 +397,6 @@ Seules les parcelles de grande taille peuvent apparaître dans la recherche. </text> <line_editor left="97" name="media_url"/> <button label="Choisir" name="set_media_url"/> - <check_box label="Masquer l'URL" left="97" name="hide_media_url" tool_tip="Si vous cochez cette option, les personnes non autorisées à accéder aux infos de cette parcelle ne verront pas l'URL du média. Cette option n'est pas disponible pour les fichiers HTML."/> <text name="Description:"> Description : </text> @@ -435,7 +428,6 @@ texture : URL de la musique : </text> - <check_box label="Masquer l'URL" name="hide_music_url" tool_tip="Si vous cochez cette option, l'URL de musique sera masquée et invisible pour tous les utilisateurs non autorisés des informations de cette parcelle."/> <text name="Sound:"> Son : </text> diff --git a/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml index 29b61fc98d..f2eb3cb6bc 100644 --- a/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> Créateur : </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Profil..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> Propriétaire : </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Profil..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Acquis : diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml index 46a27e960c..01274b4cbc 100644 --- a/indra/newview/skins/default/xui/fr/floater_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_tools.xml @@ -170,15 +170,9 @@ <text name="Creator:"> Créateur : </text> - <text name="Creator Name"> - Mrs. Esbee Linden (esbee.linden) - </text> <text name="Owner:"> Propriétaire : </text> - <text name="Owner Name"> - Mrs. Erica "Moose" Linden (erica.linden) - </text> <text name="Group:"> Groupe : </text> diff --git a/indra/newview/skins/default/xui/fr/inspect_avatar.xml b/indra/newview/skins/default/xui/fr/inspect_avatar.xml index f34ca1f8dd..553646f8e9 100644 --- a/indra/newview/skins/default/xui/fr/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/fr/inspect_avatar.xml @@ -10,9 +10,6 @@ <string name="Details"> [SL_PROFILE] </string> - <text name="user_name_small" value="Grumpity ProductEngine with a long name"/> - <text name="user_name" value="Grumpity ProductEngine"/> - <text name="user_slid" value="james.linden"/> <text name="user_subtitle" value="11 mois, 3 jours"/> <text name="user_details"> This is my second life description and I really think it is great. But for some reason my description is super extra long because I like to talk a whole lot diff --git a/indra/newview/skins/default/xui/fr/inspect_group.xml b/indra/newview/skins/default/xui/fr/inspect_group.xml index 4519c380c5..e8c528c1ac 100644 --- a/indra/newview/skins/default/xui/fr/inspect_group.xml +++ b/indra/newview/skins/default/xui/fr/inspect_group.xml @@ -16,9 +16,6 @@ <string name="YouAreMember"> Vous êtes membre </string> - <text name="group_name"> - Groupe grognon des Orignaux Grumpity - </text> <text name="group_subtitle"> 123 membres </text> diff --git a/indra/newview/skins/default/xui/fr/panel_activeim_row.xml b/indra/newview/skins/default/xui/fr/panel_activeim_row.xml deleted file mode 100644 index 84272752cf..0000000000 --- a/indra/newview/skins/default/xui/fr/panel_activeim_row.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_activeim_row"> - <text name="contact_name"> - Grumpity ProductEngine - </text> -</panel> diff --git a/indra/newview/skins/default/xui/fr/panel_chat_header.xml b/indra/newview/skins/default/xui/fr/panel_chat_header.xml index babbff3132..7916bf5155 100644 --- a/indra/newview/skins/default/xui/fr/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/fr/panel_chat_header.xml @@ -1,5 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="im_header" name="im_header"> - <text_editor name="user_name" value="Ericag Vader"/> <text name="time_box" value="23:30"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_edit_profile.xml b/indra/newview/skins/default/xui/fr/panel_edit_profile.xml index ef65d2fe24..9e63c88221 100644 --- a/indra/newview/skins/default/xui/fr/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/fr/panel_edit_profile.xml @@ -29,11 +29,7 @@ <text name="display_name_label" value="Nom d'affichage :"/> <text name="solo_username_label" value="Nom d'utilisateur :"/> <button name="set_name" tool_tip="Définir un nom d'affichage"/> - <text name="solo_user_name" value="Hamilton Hitchings"/> - <text name="user_name" value="Hamilton Hitchings"/> - <text name="user_name_small" value="Hamilton Hitchings"/> <text name="user_label" value="Nom d'utilisateur :"/> - <text name="user_slid" value="hamilton.linden"/> <panel name="lifes_images_panel"> <panel name="second_life_image_panel"> <text name="second_life_photo_title_text" value="[SECOND_LIFE]:"/> diff --git a/indra/newview/skins/default/xui/fr/panel_instant_message.xml b/indra/newview/skins/default/xui/fr/panel_instant_message.xml index bf3720f411..305d2d853c 100644 --- a/indra/newview/skins/default/xui/fr/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/fr/panel_instant_message.xml @@ -4,7 +4,6 @@ 6 </string> <panel label="im_header" name="im_header"> - <text name="user_name" value="Erica Vader"/> <text name="time_box" value="23:30"/> </panel> <button label="Répondre" name="reply"/> diff --git a/indra/newview/skins/default/xui/fr/panel_profile_view.xml b/indra/newview/skins/default/xui/fr/panel_profile_view.xml index 0447618420..76ba44e899 100644 --- a/indra/newview/skins/default/xui/fr/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/fr/panel_profile_view.xml @@ -10,10 +10,8 @@ <text name="solo_username_label" value="Nom d'utilisateur :"/> <text name="status" value="En ligne"/> <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/> - <text name="user_name" value="Jack Linden"/> <button name="copy_to_clipboard" tool_tip="Copier dans le presse-papiers"/> <text name="user_label" value="Nom d'utilisateur :"/> - <text name="user_slid" value="jack.linden"/> <tab_container name="tabs"> <panel label="PROFIL" name="panel_profile"/> <panel label="FAVORIS" name="panel_picks"/> diff --git a/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml b/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml index c8e76118a1..bd8a39fe16 100644 --- a/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/fr/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> Créateur : </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> Propriétaire : </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> Groupe : </text> diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml index d6834fa70a..186ed59e36 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -87,15 +87,11 @@ Vai al menu Mondo > Informazioni sul terreno oppure seleziona un altro appezz <text name="Owner:"> Proprietario: </text> - <text left="119" name="OwnerText" width="227"> - Leyla Linden - </text> + <text left="119" name="OwnerText" width="227"/> <text name="Group:"> Gruppo: </text> - <text left="119" name="GroupText" width="227"> - Leyla Linden - </text> + <text left="119" name="GroupText" width="227"/> <button label="Imposta" name="Set..."/> <check_box label="Permetti cessione al gruppo" left="119" name="check deed" tool_tip="Un funzionario del gruppo può cedere questa terra al gruppo stesso cosicchè essa sarà supportata dalle terre del gruppo."/> <button label="Cedi" name="Deed..." tool_tip="Puoi solo offrire terra se sei un funzionario del gruppo selezionato."/> @@ -401,7 +397,6 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. </text> <line_editor left="97" name="media_url"/> <button label="Imposta" name="set_media_url"/> - <check_box label="Nascondi indirizzo URL Media" left="94" name="hide_media_url" tool_tip="Abilitando questa opzione nasconderai l'indirizzo url dei media a tutte le persone non autorizzate a vedere le informazioni del terreno. Nota che questo non è disponibile per contenuto di tipo HTML."/> <text name="Description:"> Descrizione: </text> @@ -433,7 +428,6 @@ Media: <text name="MusicURL:"> URL musica: </text> - <check_box label="Nascondi URL" name="hide_music_url" tool_tip="Questa opzione consente di nascondere l'url della musica a chi non è autorizzato a visionare le informazioni di questo parcel."/> <text name="Sound:"> Audio: </text> diff --git a/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml index d3dc4d7eae..7ed3486b9b 100644 --- a/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> Creatore: </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Profilo..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> proprietario: </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Profilo..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Acquisito: diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index a8c985cb12..fc13e09d1c 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -171,15 +171,9 @@ <text name="Creator:"> Creatore: </text> - <text name="Creator Name"> - Thrax Linden - </text> <text name="Owner:"> Proprietario: </text> - <text name="Owner Name"> - Thrax Linden - </text> <text name="Group:"> Gruppo: </text> diff --git a/indra/newview/skins/default/xui/it/panel_profile_view.xml b/indra/newview/skins/default/xui/it/panel_profile_view.xml index 20c62d4ceb..cf65aabebc 100644 --- a/indra/newview/skins/default/xui/it/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/it/panel_profile_view.xml @@ -6,7 +6,6 @@ <string name="status_offline"> Offline </string> - <text_editor name="user_name" value="(Caricamento in corso...)"/> <text name="status" value="Online"/> <tab_container name="tabs"> <panel label="PROFILO" name="panel_profile"/> diff --git a/indra/newview/skins/default/xui/it/sidepanel_task_info.xml b/indra/newview/skins/default/xui/it/sidepanel_task_info.xml index 67870d9b76..cfabdc81b0 100644 --- a/indra/newview/skins/default/xui/it/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/it/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> Ideatore: </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> Proprietario: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> Gruppo: </text> diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml index 2de9e781d4..eefe71c9a5 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -87,15 +87,9 @@ <text name="Owner:"> 所有者: </text> - <text name="OwnerText"> - Leyla Linden - </text> <text name="Group:"> グループ: </text> - <text name="GroupText"> - Leyla Linden - </text> <button label="設定" label_selected="設定..." name="Set..."/> <check_box label="グループへの譲渡を許可" name="check deed" tool_tip="グループのオフィサーはこの土地をグループに譲渡できます。グループの土地割り当てによってサポートされます。"/> <button label="譲渡" label_selected="譲渡..." name="Deed..." tool_tip="選択したグループのオフィサーのみ、土地を譲渡できます。"/> @@ -399,7 +393,6 @@ ホームページ: </text> <button label="設定" name="set_media_url"/> - <check_box label="URL を非表示" name="hide_media_url" tool_tip="このオプションをオンにすると、許可なしでこの区画情報にアクセスしているユーザーにはメディア URL が表示されません。 これは HTML タイプには使用できませんのでご注意ください。"/> <text name="Description:"> 説明: </text> @@ -429,7 +422,6 @@ <text name="MusicURL:"> 音楽 URL: </text> - <check_box label="URL を非表示にする" name="hide_music_url" tool_tip="このオプションにチェックを入れると、権限のない人が区画情報を見たときに音楽の URL が隠れます。"/> <text name="Sound:"> サウンド: </text> diff --git a/indra/newview/skins/default/xui/ja/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/ja/floater_inventory_item_properties.xml index 7480b04856..725214086a 100644 --- a/indra/newview/skins/default/xui/ja/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/ja/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> クリエーター </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="情報" label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> オーナー: </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="情報" label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> 入手日時: diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index bbd78fb818..2272234d7a 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -170,15 +170,9 @@ <text name="Creator:"> 制作者: </text> - <text name="Creator Name"> - Esbee Linden - </text> <text name="Owner:"> 所有者: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group:"> グループ: </text> diff --git a/indra/newview/skins/default/xui/ja/inspect_avatar.xml b/indra/newview/skins/default/xui/ja/inspect_avatar.xml index fb4937242b..f3ea794bc7 100644 --- a/indra/newview/skins/default/xui/ja/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/ja/inspect_avatar.xml @@ -10,7 +10,6 @@ <string name="Details"> [SL_PROFILE] </string> - <text name="user_name" value="Grumpity ProductEngine"/> <text name="user_subtitle" value="11 Months, 3 days old"/> <text name="user_details"> This is my second life description and I really think it is great. diff --git a/indra/newview/skins/default/xui/ja/inspect_group.xml b/indra/newview/skins/default/xui/ja/inspect_group.xml index b461b93f65..be628befdf 100644 --- a/indra/newview/skins/default/xui/ja/inspect_group.xml +++ b/indra/newview/skins/default/xui/ja/inspect_group.xml @@ -16,9 +16,6 @@ <string name="YouAreMember"> あなたはメンバーです </string> - <text name="group_name"> - Grumpity's Grumpy Group of Moose - </text> <text name="group_subtitle"> 123 メートル </text> diff --git a/indra/newview/skins/default/xui/ja/panel_activeim_row.xml b/indra/newview/skins/default/xui/ja/panel_activeim_row.xml deleted file mode 100644 index 84272752cf..0000000000 --- a/indra/newview/skins/default/xui/ja/panel_activeim_row.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel name="panel_activeim_row"> - <text name="contact_name"> - Grumpity ProductEngine - </text> -</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_chat_header.xml b/indra/newview/skins/default/xui/ja/panel_chat_header.xml index babbff3132..7916bf5155 100644 --- a/indra/newview/skins/default/xui/ja/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/ja/panel_chat_header.xml @@ -1,5 +1,4 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="im_header" name="im_header"> - <text_editor name="user_name" value="Ericag Vader"/> <text name="time_box" value="23:30"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_instant_message.xml b/indra/newview/skins/default/xui/ja/panel_instant_message.xml index 9fd0cb3b0d..bf4cbcdc46 100644 --- a/indra/newview/skins/default/xui/ja/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/ja/panel_instant_message.xml @@ -4,7 +4,6 @@ 6 </string> <panel label="im_header" name="im_header"> - <text name="user_name" value="Erica Vader"/> <text name="time_box" value="23:30"/> </panel> <button label="返信" name="reply"/> diff --git a/indra/newview/skins/default/xui/ja/panel_profile_view.xml b/indra/newview/skins/default/xui/ja/panel_profile_view.xml index 5666a93cf0..82807bc8fc 100644 --- a/indra/newview/skins/default/xui/ja/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/ja/panel_profile_view.xml @@ -6,7 +6,6 @@ <string name="status_offline"> オフライン </string> - <text_editor name="user_name" value="(ローディング...)"/> <text name="status" value="オンライン"/> <tab_container name="tabs"> <panel label="プロフィール" name="panel_profile"/> diff --git a/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml b/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml index ff9b5dc6aa..eb2bfa993b 100644 --- a/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/ja/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> 制作者: </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> 所有者: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> グループ: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_about_land.xml b/indra/newview/skins/default/xui/nl/floater_about_land.xml index 4271ad5b82..d51ea1c0f8 100644 --- a/indra/newview/skins/default/xui/nl/floater_about_land.xml +++ b/indra/newview/skins/default/xui/nl/floater_about_land.xml @@ -23,9 +23,7 @@ <text name="Owner:"> Eigenaar: </text> - <text name="OwnerText" left="102" width="242"> - Leyla Linden - </text> + <text name="OwnerText" left="102" width="242"/> <button label="Profiel" name="Profile..."/> <text name="Group:"> Groep: @@ -427,8 +425,6 @@ hebt geklikt.) </text> <check_box label="Automatisch schalen" name="media_auto_scale" tool_tip="Het aanvinken van deze optie zal de inhoud voor dit perceel automatisch schalen. Het kan enigszins trager zijn en de visuele kwaliteit kan iets lager zijn, maar er zal geen andere textuurschaling of uitlijning nodig zijn."/> <check_box label="Herhaal media" name="media_loop" tool_tip="Speel media af in een lus. Wanneer de media klaar is met afspelen zal het herstarten vanaf het begin."/> - <check_box label="Verberg media URL" name="hide_media_url" tool_tip="Het aanvinken van deze optie zal de media URL verbergen voor alle niet-geautoriseerde bekijkers van de perceelinformatie. Let op: dit is niet beschikbaar voor HTML types."/> - <check_box label="Verberg muziek URL" name="hide_music_url" tool_tip="Het aanvinken van deze optie zal de muziek URL verbergen voor alle niet-geautoriseerde bekijkers van de perceelinformatie."/> <text name="media_size" tool_tip="Grootte om webmedia weer te geven, laat op 0 staan voor standaard." width="120"> Media grootte: </text> diff --git a/indra/newview/skins/default/xui/nl/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/nl/floater_inventory_item_properties.xml index 63cfafab81..81a823acd4 100644 --- a/indra/newview/skins/default/xui/nl/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/nl/floater_inventory_item_properties.xml @@ -9,16 +9,10 @@ <text name="LabelCreatorTitle"> Maker: </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Profiel..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> Eigenaar </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Profiel..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Verworven: diff --git a/indra/newview/skins/default/xui/nl/floater_tools.xml b/indra/newview/skins/default/xui/nl/floater_tools.xml index 4ffe675831..98339383e4 100644 --- a/indra/newview/skins/default/xui/nl/floater_tools.xml +++ b/indra/newview/skins/default/xui/nl/floater_tools.xml @@ -98,16 +98,10 @@ <text name="Creator:"> Maker: </text> - <text name="Creator Name"> - Thrax Linden - </text> <button label="Profiel..." label_selected="Profiel..." name="button creator profile"/> <text name="Owner:"> Eigenaar: </text> - <text name="Owner Name"> - Thrax Linden - </text> <button label="Profiel..." label_selected="Profiel..." name="button owner profile"/> <text name="Group:"> Groep: diff --git a/indra/newview/skins/default/xui/pl/floater_about_land.xml b/indra/newview/skins/default/xui/pl/floater_about_land.xml index 0974518a1f..b935615fcb 100644 --- a/indra/newview/skins/default/xui/pl/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pl/floater_about_land.xml @@ -87,15 +87,9 @@ Idź do Świat > O Posiadłości albo wybierz inną posiadłość żeby pokaz <text name="Owner:"> Właściciel: </text> - <text name="OwnerText"> - Leyla Linden - </text> <text name="Group:"> Grupa: </text> - <text name="GroupText"> - Leyla Linden - </text> <button label="Ustaw" name="Set..."/> <check_box label="Udostępnij przypisywanie na Grupę" name="check deed" tool_tip="Oficer Grupy ma prawo przepisać prawo własności Posiadłości na Grupę. Posiadłość wspierana jest przez przydziały pochodzące od członków Grupy."/> <button label="Przypisz" name="Deed..." tool_tip="Prawo przypisania Posiadłości na Grupę może dokonać jedynie oficer Grupy."/> @@ -399,7 +393,6 @@ Jedynie większe posiadłości mogą być umieszczone w bazie wyszukiwarki. URL mediów: </text> <button label="Ustaw" name="set_media_url"/> - <check_box label="Ukryj URL mediów" name="hide_media_url" tool_tip="Wybranie tej opcji, zablokuje widok adresu do medów wszystkim nieautoryzowanym Rezydentom. Nie dotyczy to jednak typów HTML."/> <text name="Description:"> Opis: </text> @@ -428,7 +421,6 @@ Mediów: <check_box label="Powtórka Odtwarzania" name="media_loop" tool_tip="Odtwarzaj media z powtórką. Po wyświetleniu materialu, rozpocznie się odtwarzanie od początku."/> </panel> <panel label="DŹWIĘK" name="land_audio_panel"> - <check_box label="Ukryj URL muzyki" name="hide_music_url" tool_tip="Wybranie tej opcji, zablokuje widok adresu do medów muzycznych w posiadłości wszystkim nieautoryzowanym Użytkownikom"/> <check_box label="Rozmowy dozwolone" name="parcel_enable_voice_channel"/> <check_box label="Rozmowy dozwolone (ustawione przez Majątek)" name="parcel_enable_voice_channel_is_estate_disabled"/> <check_box label="Ogranicz komunikację głosową w tej Posiadłości." name="parcel_enable_voice_channel_local"/> diff --git a/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml index 1e63987585..054d74b234 100644 --- a/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> Twórca: </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Profil..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> Właściciel: </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Profil..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Nabyte: diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml index 7c1ced0eae..337998efc9 100644 --- a/indra/newview/skins/default/xui/pl/floater_tools.xml +++ b/indra/newview/skins/default/xui/pl/floater_tools.xml @@ -173,15 +173,9 @@ <text name="Creator:"> Twórca: </text> - <text name="Creator Name"> - Pani Esbee Linden (esbee.linden) - </text> <text name="Owner:"> Właściciel: </text> - <text name="Owner Name"> - Pani Erica "Moose" Linden (erica.linden) - </text> <text name="Group:"> Grupa: </text> diff --git a/indra/newview/skins/default/xui/pl/inspect_avatar.xml b/indra/newview/skins/default/xui/pl/inspect_avatar.xml index 1db3339352..5e982c0185 100644 --- a/indra/newview/skins/default/xui/pl/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/pl/inspect_avatar.xml @@ -10,8 +10,6 @@ <string name="Details"> [SL_PROFILE] </string> - <text name="user_name_small" value="Grumpity ProductEngine with a long name"/> - <text name="user_slid" value="james.linden"/> <text name="user_details"> To jest mój opis w Second Life. </text> diff --git a/indra/newview/skins/default/xui/pl/panel_edit_profile.xml b/indra/newview/skins/default/xui/pl/panel_edit_profile.xml index c409666ec9..e6fd8b18f8 100644 --- a/indra/newview/skins/default/xui/pl/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/pl/panel_edit_profile.xml @@ -25,11 +25,7 @@ <text name="display_name_label" value="Wyświetlana nazwa:"/> <text name="solo_username_label" value="Nazwa użytkownika:"/> <button name="set_name" tool_tip="Ustaw wyświetlanią nazwę."/> - <text name="solo_user_name" value="Hamilton Hitchings"/> - <text name="user_name" value="Hamilton Hitchings"/> - <text name="user_name_small" value="Hamilton Hitchings"/> <text name="user_label" value="Nazwa użytkownika:"/> - <text name="user_slid" value="hamilton.linden"/> <panel name="lifes_images_panel"> <icon label="" name="2nd_life_edit_icon" tool_tip="Kliknij aby wybrać teksturę"/> </panel> diff --git a/indra/newview/skins/default/xui/pl/panel_profile_view.xml b/indra/newview/skins/default/xui/pl/panel_profile_view.xml index 3590e9222e..1fd6bc1d10 100644 --- a/indra/newview/skins/default/xui/pl/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/pl/panel_profile_view.xml @@ -10,10 +10,8 @@ <text name="solo_username_label" value="Nazwa użytkownika:"/> <text name="status" value="Obecnie w SL"/> <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/> - <text name="user_name" value="Jack Linden"/> <button name="copy_to_clipboard" tool_tip="Kopiuj do schowka"/> <text name="user_label" value="Nazwa użytkownika:"/> - <text name="user_slid" value="jack.linden"/> <tab_container name="tabs"> <panel label="PROFIL" name="panel_profile"/> <panel label="ULUBIONE" name="panel_picks"/> diff --git a/indra/newview/skins/default/xui/pl/sidepanel_task_info.xml b/indra/newview/skins/default/xui/pl/sidepanel_task_info.xml index d8cf456c64..eb8c9cdbbb 100644 --- a/indra/newview/skins/default/xui/pl/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/pl/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> Twórca: </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> Właściciel: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> Grupa: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml index 3fb4bc272e..ffd1cce76c 100644 --- a/indra/newview/skins/default/xui/pt/floater_about_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml @@ -87,15 +87,9 @@ Vá para o menu Mundo > Sobre o terreno ou selecione outro lote para mostrar <text name="Owner:"> Proprietário: </text> - <text name="OwnerText"> - Leyla Linden - </text> <text name="Group:"> Grupo: </text> - <text name="GroupText"> - Leyla Linden - </text> <button label="Ajustar" name="Set..."/> <check_box label="Permitir doação para o grupo" name="check deed" tool_tip="Oficiais do grupo podem doar esse terreno ao grupo, passando a administração para o gestor da ilha"/> <button label="Passar" name="Deed..." tool_tip="Você só pode doar o terreno se você for um dos oficiais do grupo selecionado."/> @@ -398,7 +392,6 @@ Apenas lotes maiores podem ser listados na busca. </text> <line_editor left="97" name="media_url"/> <button label="Definir..." label_selected="Definir..." name="set_media_url"/> - <check_box label="Esconder a URL da mídia" left="97" name="hide_media_url" tool_tip="Ativando esta opção, a URL da mídia se ocultará para quaisquer visualizadores não autorizados a ver esta informação do lote. Notar que isto não está disponível para tipos HTML."/> <text name="Description:"> Descrição: </text> @@ -430,7 +423,6 @@ Mídia: <text name="MusicURL:"> URL de música: </text> - <check_box label="Ocultar URL" name="hide_music_url" tool_tip="Selecionar esta opção oculta o URL de música a visitantes não autorizados aos dados do terreno."/> <text name="Sound:"> Som: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml index 8fe69c097d..8a8f1f5b34 100644 --- a/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/pt/floater_inventory_item_properties.xml @@ -24,16 +24,10 @@ <text name="LabelCreatorTitle"> Criador: </text> - <text name="LabelCreatorName"> - Nicole Linden - </text> <button label="Perfil..." label_selected="" name="BtnCreator"/> <text name="LabelOwnerTitle"> Dono: </text> - <text name="LabelOwnerName"> - Thrax Linden - </text> <button label="Perfil..." label_selected="" name="BtnOwner"/> <text name="LabelAcquiredTitle"> Adquirido: diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index bd5fbf80d1..f90097bf22 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -170,15 +170,9 @@ <text name="Creator:"> Criador: </text> - <text name="Creator Name"> - Mrs. Esbee Linden (esbee.linden) - </text> <text name="Owner:"> Proprietário: </text> - <text name="Owner Name"> - Mrs. Erica "Moose" Linden (erica.linden) - </text> <text name="Group:"> Grupo: </text> diff --git a/indra/newview/skins/default/xui/pt/inspect_avatar.xml b/indra/newview/skins/default/xui/pt/inspect_avatar.xml index a95d5ff31a..a199c58c15 100644 --- a/indra/newview/skins/default/xui/pt/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/pt/inspect_avatar.xml @@ -10,8 +10,6 @@ <string name="Details"> [PERFIL_SL] </string> - <text name="user_name_small" value="Grumpity ProductEngine with a long name"/> - <text name="user_slid" value="james.linden"/> <text name="user_details"> This is my second life description and I really think it is great. But for some reason my description is super extra long because I like to talk a whole lot </text> diff --git a/indra/newview/skins/default/xui/pt/panel_edit_profile.xml b/indra/newview/skins/default/xui/pt/panel_edit_profile.xml index 4066842b25..0ba7382845 100644 --- a/indra/newview/skins/default/xui/pt/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/pt/panel_edit_profile.xml @@ -25,11 +25,7 @@ <text name="display_name_label" value="Nome de tela:"/> <text name="solo_username_label" value="Nome de usuário:"/> <button name="set_name" tool_tip="Definir nome de tela"/> - <text name="solo_user_name" value="Hamilton Hitchings"/> - <text name="user_name" value="Hamilton Hitchings"/> - <text name="user_name_small" value="Hamilton Hitchings"/> <text name="user_label" value="Nome de usuário:"/> - <text name="user_slid" value="hamilton.linden"/> <panel name="lifes_images_panel"> <icon label="" name="2nd_life_edit_icon" tool_tip="Selecione uma imagem"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_group_roles.xml b/indra/newview/skins/default/xui/pt/panel_group_roles.xml index c861e29624..11a31570d1 100644 --- a/indra/newview/skins/default/xui/pt/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/pt/panel_group_roles.xml @@ -6,8 +6,8 @@ <panel.string name="want_apply_text"> Deseja salvar essas mudanças? </panel.string> - <tab_container height="164" name="roles_tab_container"> - <panel height="148" label="MEMBROS" name="members_sub_tab" tool_tip="Membros"> + <tab_container name="roles_tab_container"> + <panel label="MEMBROS" name="members_sub_tab" tool_tip="Membros"> <panel.string name="help_text"> Você pode adicionar ou remover as funções designadas aos membros. Selecione vários membros, segurando a tecla Ctrl e clicando em seus nomes. </panel.string> @@ -15,15 +15,15 @@ [AREA] m² </panel.string> <filter_editor label="Filtrar por membro" name="filter_input"/> - <name_list bottom_delta="-105" height="104" name="member_list"> + <name_list name="member_list"> <name_list.columns label="Membro" name="name"/> <name_list.columns label="Doações" name="donated"/> <name_list.columns label="Status" name="online"/> </name_list> - <button label="Convidar" name="member_invite" width="165"/> + <button label="Convidar" name="member_invite" /> <button label="Ejetar" name="member_eject"/> </panel> - <panel height="148" label="CARGOS" name="roles_sub_tab"> + <panel label="CARGOS" name="roles_sub_tab"> <panel.string name="help_text"> Cada cargo tem um nome e uma lista das funções que membros designados podem desempenhar. Os membros podem ter um ou mais cargos. @@ -36,7 +36,7 @@ Inv_FolderClosed </panel.string> <filter_editor label="Filtrar por cargo" name="filter_input"/> - <scroll_list bottom_delta="-104" height="104" name="role_list"> + <scroll_list name="role_list"> <scroll_list.columns label="Cargo" name="name"/> <scroll_list.columns label="Título" name="title"/> <scroll_list.columns label="#" name="members"/> diff --git a/indra/newview/skins/default/xui/pt/panel_profile_view.xml b/indra/newview/skins/default/xui/pt/panel_profile_view.xml index d3ec9b82bc..d81ee08e6c 100644 --- a/indra/newview/skins/default/xui/pt/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/pt/panel_profile_view.xml @@ -10,10 +10,8 @@ <text name="solo_username_label" value="Nome de usuário:"/> <text name="status" value="Conectado"/> <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/> - <text name="user_name" value="Jack Linden"/> <button name="copy_to_clipboard" tool_tip="Copiar para área de transferência"/> <text name="user_label" value="Nome de usuário:"/> - <text name="user_slid" value="jack.linden"/> <tab_container name="tabs"> <panel label="PERFIL" name="panel_profile"/> <panel label="DESTAQUES" name="panel_picks"/> diff --git a/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml b/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml index dd65810b22..8092e6c145 100644 --- a/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/pt/sidepanel_task_info.xml @@ -48,15 +48,9 @@ <text name="CreatorNameLabel"> Criador: </text> - <text name="Creator Name"> - Erica Linden - </text> <text name="Owner:"> Proprietário: </text> - <text name="Owner Name"> - Erica Linden - </text> <text name="Group_label"> Grupo: </text> diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt index b4043b0fd9..02d7031b81 100644 --- a/indra/test_apps/llplugintest/CMakeLists.txt +++ b/indra/test_apps/llplugintest/CMakeLists.txt @@ -1,5 +1,4 @@ # -*- cmake -*- - project(llplugintest) include(00-Common) |