From ae035a0d66604e25b1277c4fa303aea8d798e719 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 22 Apr 2014 08:58:38 -0700 Subject: Modify importer to (optionally) improve debug output, perform name-based LOD association, and handle models with many materials. --- indra/newview/CMakeLists.txt | 2 - indra/newview/app_settings/settings.xml | 22 + indra/newview/llcallbacklist.cpp | 305 ---- indra/newview/llcallbacklist.h | 72 - indra/newview/llfloatermodelpreview.cpp | 2846 ++++++------------------------- indra/newview/llfloatermodelpreview.h | 121 +- indra/newview/llmeshrepository.cpp | 281 ++- indra/newview/llmeshrepository.h | 50 +- 8 files changed, 770 insertions(+), 2929 deletions(-) delete mode 100755 indra/newview/llcallbacklist.cpp delete mode 100755 indra/newview/llcallbacklist.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0bf0152b30..889e26b532 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -132,7 +132,6 @@ set(viewer_SOURCE_FILES llbreadcrumbview.cpp llbrowsernotification.cpp llbuycurrencyhtml.cpp - llcallbacklist.cpp llcallingcard.cpp llcapabilitylistener.cpp llcaphttpsender.cpp @@ -720,7 +719,6 @@ set(viewer_HEADER_FILES llbox.h llbreadcrumbview.h llbuycurrencyhtml.h - llcallbacklist.h llcallingcard.h llcapabilitylistener.h llcapabilityprovider.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index de11309394..4343c7f70c 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2,6 +2,28 @@ + ImporterDebug + + Comment + Enable debug output to more precisely identify sources of import errors. Warning: the output can slow down import on many machines. + Persist + 0 + Type + Integer + Value + 0 + + IMShowTime + + Comment + Enable(disable) timestamp showing in the chat. + Persist + 1 + Type + Boolean + Value + 1 + IMShowTime Comment diff --git a/indra/newview/llcallbacklist.cpp b/indra/newview/llcallbacklist.cpp deleted file mode 100755 index 79ec43dfe9..0000000000 --- a/indra/newview/llcallbacklist.cpp +++ /dev/null @@ -1,305 +0,0 @@ -/** - * @file llcallbacklist.cpp - * @brief A simple list of callback functions to call. - * - * $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 "llcallbacklist.h" -#include "lleventtimer.h" - -// Library includes -#include "llerror.h" - - -// -// Globals -// -LLCallbackList gIdleCallbacks; - -// -// Member functions -// - -LLCallbackList::LLCallbackList() -{ - // nothing -} - -LLCallbackList::~LLCallbackList() -{ -} - - -void LLCallbackList::addFunction( callback_t func, void *data) -{ - if (!func) - { - llerrs << "LLCallbackList::addFunction - function is NULL" << llendl; - return; - } - - // only add one callback per func/data pair - callback_pair_t t(func, data); - callback_list_t::iterator iter = std::find(mCallbackList.begin(), mCallbackList.end(), t); - if (iter == mCallbackList.end()) - { - mCallbackList.push_back(t); - } -} - - -BOOL LLCallbackList::containsFunction( callback_t func, void *data) -{ - callback_pair_t t(func, data); - callback_list_t::iterator iter = std::find(mCallbackList.begin(), mCallbackList.end(), t); - if (iter != mCallbackList.end()) - { - return TRUE; - } - else - { - return FALSE; - } -} - - -BOOL LLCallbackList::deleteFunction( callback_t func, void *data) -{ - callback_pair_t t(func, data); - callback_list_t::iterator iter = std::find(mCallbackList.begin(), mCallbackList.end(), t); - if (iter != mCallbackList.end()) - { - mCallbackList.erase(iter); - return TRUE; - } - else - { - return FALSE; - } -} - - -void LLCallbackList::deleteAllFunctions() -{ - mCallbackList.clear(); -} - - -void LLCallbackList::callFunctions() -{ - for (callback_list_t::iterator iter = mCallbackList.begin(); iter != mCallbackList.end(); ) - { - callback_list_t::iterator curiter = iter++; - curiter->first(curiter->second); - } -} - -// Shim class to allow arbitrary boost::bind -// expressions to be run as one-time idle callbacks. -class OnIdleCallbackOneTime -{ -public: - OnIdleCallbackOneTime(nullary_func_t callable): - mCallable(callable) - { - } - static void onIdle(void *data) - { - gIdleCallbacks.deleteFunction(onIdle, data); - OnIdleCallbackOneTime* self = reinterpret_cast(data); - self->call(); - delete self; - } - void call() - { - mCallable(); - } -private: - nullary_func_t mCallable; -}; - -void doOnIdleOneTime(nullary_func_t callable) -{ - OnIdleCallbackOneTime* cb_functor = new OnIdleCallbackOneTime(callable); - gIdleCallbacks.addFunction(&OnIdleCallbackOneTime::onIdle,cb_functor); -} - -// Shim class to allow generic boost functions to be run as -// recurring idle callbacks. Callable should return true when done, -// false to continue getting called. -class OnIdleCallbackRepeating -{ -public: - OnIdleCallbackRepeating(bool_func_t callable): - mCallable(callable) - { - } - // Will keep getting called until the callable returns true. - static void onIdle(void *data) - { - OnIdleCallbackRepeating* self = reinterpret_cast(data); - bool done = self->call(); - if (done) - { - gIdleCallbacks.deleteFunction(onIdle, data); - delete self; - } - } - bool call() - { - return mCallable(); - } -private: - bool_func_t mCallable; -}; - -void doOnIdleRepeating(bool_func_t callable) -{ - OnIdleCallbackRepeating* cb_functor = new OnIdleCallbackRepeating(callable); - gIdleCallbacks.addFunction(&OnIdleCallbackRepeating::onIdle,cb_functor); -} - -class NullaryFuncEventTimer: public LLEventTimer -{ -public: - NullaryFuncEventTimer(nullary_func_t callable, F32 seconds): - LLEventTimer(seconds), - mCallable(callable) - { - } - -private: - BOOL tick() - { - mCallable(); - return TRUE; - } - - nullary_func_t mCallable; -}; - -// Call a given callable once after specified interval. -void doAfterInterval(nullary_func_t callable, F32 seconds) -{ - new NullaryFuncEventTimer(callable, seconds); -} - -class BoolFuncEventTimer: public LLEventTimer -{ -public: - BoolFuncEventTimer(bool_func_t callable, F32 seconds): - LLEventTimer(seconds), - mCallable(callable) - { - } -private: - BOOL tick() - { - return mCallable(); - } - - bool_func_t mCallable; -}; - -// Call a given callable every specified number of seconds, until it returns true. -void doPeriodically(bool_func_t callable, F32 seconds) -{ - new BoolFuncEventTimer(callable, seconds); -} - -#ifdef _DEBUG - -void test1(void *data) -{ - S32 *s32_data = (S32 *)data; - llinfos << "testfunc1 " << *s32_data << llendl; -} - - -void test2(void *data) -{ - S32 *s32_data = (S32 *)data; - llinfos << "testfunc2 " << *s32_data << llendl; -} - - -void -LLCallbackList::test() -{ - S32 a = 1; - S32 b = 2; - LLCallbackList *list = new LLCallbackList; - - llinfos << "Testing LLCallbackList" << llendl; - - if (!list->deleteFunction(NULL)) - { - llinfos << "passed 1" << llendl; - } - else - { - llinfos << "error, removed function from empty list" << llendl; - } - - // llinfos << "This should crash" << llendl; - // list->addFunction(NULL); - - list->addFunction(&test1, &a); - list->addFunction(&test1, &a); - - llinfos << "Expect: test1 1, test1 1" << llendl; - list->callFunctions(); - - list->addFunction(&test1, &b); - list->addFunction(&test2, &b); - - llinfos << "Expect: test1 1, test1 1, test1 2, test2 2" << llendl; - list->callFunctions(); - - if (list->deleteFunction(&test1, &b)) - { - llinfos << "passed 3" << llendl; - } - else - { - llinfos << "error removing function" << llendl; - } - - llinfos << "Expect: test1 1, test1 1, test2 2" << llendl; - list->callFunctions(); - - list->deleteAllFunctions(); - - llinfos << "Expect nothing" << llendl; - list->callFunctions(); - - llinfos << "nothing :-)" << llendl; - - delete list; - - llinfos << "test complete" << llendl; -} - -#endif // _DEBUG diff --git a/indra/newview/llcallbacklist.h b/indra/newview/llcallbacklist.h deleted file mode 100755 index 0516c9cdb4..0000000000 --- a/indra/newview/llcallbacklist.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file llcallbacklist.h - * @brief A simple list of callback functions to call. - * - * $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$ - */ - -#ifndef LL_LLCALLBACKLIST_H -#define LL_LLCALLBACKLIST_H - -#include "llstl.h" - -class LLCallbackList -{ -public: - typedef void (*callback_t)(void*); - - LLCallbackList(); - ~LLCallbackList(); - - void addFunction( callback_t func, void *data = NULL ); // register a callback, which will be called as func(data) - BOOL containsFunction( callback_t func, void *data = NULL ); // true if list already contains the function/data pair - BOOL deleteFunction( callback_t func, void *data = NULL ); // removes the first instance of this function/data pair from the list, false if not found - void callFunctions(); // calls all functions - void deleteAllFunctions(); - - static void test(); - -protected: - // Use a list so that the callbacks are ordered in case that matters - typedef std::pair callback_pair_t; - typedef std::list callback_list_t; - callback_list_t mCallbackList; -}; - -typedef boost::function nullary_func_t; -typedef boost::function bool_func_t; - -// Call a given callable once in idle loop. -void doOnIdleOneTime(nullary_func_t callable); - -// Repeatedly call a callable in idle loop until it returns true. -void doOnIdleRepeating(bool_func_t callable); - -// Call a given callable once after specified interval. -void doAfterInterval(nullary_func_t callable, F32 seconds); - -// Call a given callable every specified number of seconds, until it returns true. -void doPeriodically(bool_func_t callable, F32 seconds); - -extern LLCallbackList gIdleCallbacks; - -#endif diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 855836af7a..01809d38c1 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -26,35 +26,8 @@ #include "llviewerprecompiledheaders.h" -#if LL_MSVC -#pragma warning (disable : 4263) -#pragma warning (disable : 4264) -#endif -#include "dae.h" -//#include "dom.h" -#include "dom/domAsset.h" -#include "dom/domBind_material.h" -#include "dom/domCOLLADA.h" -#include "dom/domConstants.h" -#include "dom/domController.h" -#include "dom/domEffect.h" -#include "dom/domGeometry.h" -#include "dom/domInstance_geometry.h" -#include "dom/domInstance_material.h" -#include "dom/domInstance_node.h" -#include "dom/domInstance_effect.h" -#include "dom/domMaterial.h" -#include "dom/domMatrix.h" -#include "dom/domNode.h" -#include "dom/domProfile_COMMON.h" -#include "dom/domRotate.h" -#include "dom/domScale.h" -#include "dom/domTranslate.h" -#include "dom/domVisual_scene.h" -#if LL_MSVC -#pragma warning (default : 4263) -#pragma warning (default : 4264) -#endif +#include "llmodelloader.h" +#include "lldaeloader.h" #include "llfloatermodelpreview.h" @@ -112,16 +85,13 @@ #include "llanimationstates.h" #include "llviewernetwork.h" #include "llviewershadermgr.h" + #include "glod/glod.h" #include - -const S32 SLM_SUPPORTED_VERSION = 3; - //static S32 LLFloaterModelPreview::sUploadAmount = 10; LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL; -std::list LLModelLoader::sActiveLoaderList; const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; @@ -207,190 +177,37 @@ std::string lod_label_name[NUM_LOD+1] = "I went off the end of the lod_label_name array. Me so smart." }; -std::string colladaVersion[VERSIONTYPE_COUNT+1] = -{ - "1.4.0", - "1.4.1", - "Unsupported" -}; - - -#define LL_DEGENERACY_TOLERANCE 1e-7f - -inline F32 dot3fpu(const LLVector4a& a, const LLVector4a& b) -{ - volatile F32 p0 = a[0] * b[0]; - volatile F32 p1 = a[1] * b[1]; - volatile F32 p2 = a[2] * b[2]; - return p0 + p1 + p2; -} - -bool ll_is_degenerate(const LLVector4a& a, const LLVector4a& b, const LLVector4a& c, F32 tolerance = LL_DEGENERACY_TOLERANCE) -{ - // small area check - { - LLVector4a edge1; edge1.setSub( a, b ); - LLVector4a edge2; edge2.setSub( a, c ); - ////////////////////////////////////////////////////////////////////////// - /// Linden Modified - ////////////////////////////////////////////////////////////////////////// - - // If no one edge is more than 10x longer than any other edge, we weaken - // the tolerance by a factor of 1e-4f. - - LLVector4a edge3; edge3.setSub( c, b ); - const F32 len1sq = edge1.dot3(edge1).getF32(); - const F32 len2sq = edge2.dot3(edge2).getF32(); - const F32 len3sq = edge3.dot3(edge3).getF32(); - bool abOK = (len1sq <= 100.f * len2sq) && (len1sq <= 100.f * len3sq); - bool acOK = (len2sq <= 100.f * len1sq) && (len1sq <= 100.f * len3sq); - bool cbOK = (len3sq <= 100.f * len1sq) && (len1sq <= 100.f * len2sq); - if ( abOK && acOK && cbOK ) - { - tolerance *= 1e-4f; - } - - ////////////////////////////////////////////////////////////////////////// - /// End Modified - ////////////////////////////////////////////////////////////////////////// - - LLVector4a cross; cross.setCross3( edge1, edge2 ); - - LLVector4a edge1b; edge1b.setSub( b, a ); - LLVector4a edge2b; edge2b.setSub( b, c ); - LLVector4a crossb; crossb.setCross3( edge1b, edge2b ); - - if ( ( cross.dot3(cross).getF32() < tolerance ) || ( crossb.dot3(crossb).getF32() < tolerance )) - { - return true; - } - } - - // point triangle distance check - { - LLVector4a Q; Q.setSub(a, b); - LLVector4a R; R.setSub(c, b); - - const F32 QQ = dot3fpu(Q, Q); - const F32 RR = dot3fpu(R, R); - const F32 QR = dot3fpu(R, Q); - - volatile F32 QQRR = QQ * RR; - volatile F32 QRQR = QR * QR; - F32 Det = (QQRR - QRQR); - - if( Det == 0.0f ) - { - return true; - } - } - - return false; -} - -bool validate_face(const LLVolumeFace& face) +BOOL stop_gloderror() { + GLuint error = glodGetError(); - for (U32 v = 0; v < face.mNumVertices; v++) - { - if(face.mPositions && !face.mPositions[v].isFinite3()) - { - llwarns << "NaN position data in face found!" << llendl; - return false; - } - - if(face.mNormals && !face.mNormals[v].isFinite3()) - { - llwarns << "NaN normal data in face found!" << llendl; - return false; - } - } - - for (U32 i = 0; i < face.mNumIndices; ++i) - { - if (face.mIndices[i] >= face.mNumVertices) - { - llwarns << "Face has invalid index." << llendl; - return false; - } - } - - if (face.mNumIndices % 3 != 0 || face.mNumIndices == 0) + if (error != GLOD_NO_ERROR) { - llwarns << "Face has invalid number of indices." << llendl; - return false; + llwarns << "GLOD error detected, cannot generate LOD: " << std::hex << error << llendl; + return TRUE; } - - /*const LLVector4a scale(0.5f); - - - for (U32 i = 0; i < face.mNumIndices; i+=3) - { - U16 idx1 = face.mIndices[i]; - U16 idx2 = face.mIndices[i+1]; - U16 idx3 = face.mIndices[i+2]; - - LLVector4a v1; v1.setMul(face.mPositions[idx1], scale); - LLVector4a v2; v2.setMul(face.mPositions[idx2], scale); - LLVector4a v3; v3.setMul(face.mPositions[idx3], scale); - - if (ll_is_degenerate(v1,v2,v3)) - { - llwarns << "Degenerate face found!" << llendl; - return false; - } - }*/ - return true; + return FALSE; } -bool validate_model(const LLModel* mdl) +LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& material) { - if (mdl->getNumVolumeFaces() == 0) - { - llwarns << "Model has no faces!" << llendl; - return false; - } + LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_PREVIEW); - for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i) + if (texture) { - if (mdl->getVolumeFace(i).mNumVertices == 0) - { - llwarns << "Face has no vertices." << llendl; - return false; - } - - if (mdl->getVolumeFace(i).mNumIndices == 0) - { - llwarns << "Face has no indices." << llendl; - return false; - } - - if (!validate_face(mdl->getVolumeFace(i))) + if (texture->getDiscardLevel() > -1) { - return false; + gGL.getTexUnit(0)->bind(texture, true); + return texture; } } - return true; -} - -BOOL stop_gloderror() -{ - GLuint error = glodGetError(); - - if (error != GLOD_NO_ERROR) - { - llwarns << "GLOD error detected, cannot generate LOD: " << std::hex << error << llendl; - return TRUE; - } - - return FALSE; + return NULL; } - LLMeshFilePicker::LLMeshFilePicker(LLModelPreview* mp, S32 lod) - : LLFilePickerThread(LLFilePicker::FFLOAD_COLLADA) +: LLFilePickerThread(LLFilePicker::FFLOAD_COLLADA) { mMP = mp; mLOD = lod; @@ -401,6 +218,29 @@ void LLMeshFilePicker::notify(const std::string& filename) mMP->loadModel(mFile, mLOD); } +void FindModel(LLModelLoader::scene& scene, const std::string& name_to_match, LLModel*& baseModelOut, LLMatrix4& matOut) +{ + LLModelLoader::scene::iterator base_iter = scene.begin(); + bool found = false; + while (!found && (base_iter != scene.end())) + { + matOut = base_iter->first; + + LLModelLoader::model_instance_list::iterator base_instance_iter = base_iter->second.begin(); + while (!found && (base_instance_iter != base_iter->second.end())) + { + LLModelInstance& base_instance = *base_instance_iter++; + LLModel* base_model = base_instance.mModel; + + if (base_model && (base_model->mLabel == name_to_match)) + { + baseModelOut = base_model; + return; + } + } + base_iter++; + } +} //----------------------------------------------------------------------------- // LLFloaterModelPreview() @@ -535,16 +375,9 @@ BOOL LLFloaterModelPreview::postBuild() mUploadBtn = getChild("ok_btn"); mCalculateBtn = getChild("calculate_btn"); - if (LLConvexDecomposition::getInstance() != NULL) - { - mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this)); + mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this)); - toggleCalculateButton(true); - } - else - { - mCalculateBtn->setEnabled(false); - } + toggleCalculateButton(true); return TRUE; } @@ -801,7 +634,7 @@ void LLFloaterModelPreview::draw() else if ( mModelPreview->getLoadState() == LLModelLoader::ERROR_PARSING ) { - childSetTextArg("status", "[STATUS]", getString("status_parse_error")); + childSetTextArg("status", "[STATUS]", getString("status_parse_error_dae")); toggleCalculateButton(false); } else @@ -1262,1859 +1095,52 @@ void LLFloaterModelPreview::initDecompControls() LLComboBox* combo_box = getChild(name); for (S32 k = 0; k < param[i].mDetails.mEnumValues.mNumEnums; ++k) { - //llinfos << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue - // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << llendl; - - std::string name(param[i].mDetails.mEnumValues.mEnumsArray[k].mName); - std::string localized_name; - bool is_localized = LLTrans::findString(localized_name, name); - - combo_box->add(is_localized ? localized_name : name, - LLSD::Integer(param[i].mDetails.mEnumValues.mEnumsArray[k].mValue)); - } - combo_box->setValue(param[i].mDefault.mIntOrEnumValue); - combo_box->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); - } - - //llinfos << "----" << llendl; - } - //llinfos << "-----------------------------" << llendl; - } - } - - childSetCommitCallback("physics_explode", LLFloaterModelPreview::onExplodeCommit, this); -} - -void LLFloaterModelPreview::createSmoothComboBox(LLComboBox* combo_box, float min, float max) -{ - float delta = (max - min) / SMOOTH_VALUES_NUMBER; - int ilabel = 0; - - combo_box->add("0 (none)", ADD_BOTTOM, true); - - for(float value = min + delta; value < max; value += delta) - { - std::string label = (++ilabel == SMOOTH_VALUES_NUMBER) ? "10 (max)" : llformat("%.1d", ilabel); - combo_box->add(label, value, ADD_BOTTOM, true); - } - - -} - -//----------------------------------------------------------------------------- -// onMouseCaptureLost() -//----------------------------------------------------------------------------- -// static -void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handler) -{ - gViewerWindow->showCursor(); -} - -//----------------------------------------------------------------------------- -// LLModelLoader -//----------------------------------------------------------------------------- -LLModelLoader::LLModelLoader( std::string filename, S32 lod, LLModelPreview* preview, JointTransformMap& jointMap, - std::deque& jointsFromNodes ) -: mJointList( jointMap ) -, mJointsFromNode( jointsFromNodes ) -, LLThread("Model Loader"), mFilename(filename), mLod(lod), mPreview(preview), mFirstTransform(TRUE), mNumOfFetchingTextures(0) -{ - mJointMap["mPelvis"] = "mPelvis"; - mJointMap["mTorso"] = "mTorso"; - mJointMap["mChest"] = "mChest"; - mJointMap["mNeck"] = "mNeck"; - mJointMap["mHead"] = "mHead"; - mJointMap["mSkull"] = "mSkull"; - mJointMap["mEyeRight"] = "mEyeRight"; - mJointMap["mEyeLeft"] = "mEyeLeft"; - mJointMap["mCollarLeft"] = "mCollarLeft"; - mJointMap["mShoulderLeft"] = "mShoulderLeft"; - mJointMap["mElbowLeft"] = "mElbowLeft"; - mJointMap["mWristLeft"] = "mWristLeft"; - mJointMap["mCollarRight"] = "mCollarRight"; - mJointMap["mShoulderRight"] = "mShoulderRight"; - mJointMap["mElbowRight"] = "mElbowRight"; - mJointMap["mWristRight"] = "mWristRight"; - mJointMap["mHipRight"] = "mHipRight"; - mJointMap["mKneeRight"] = "mKneeRight"; - mJointMap["mAnkleRight"] = "mAnkleRight"; - mJointMap["mFootRight"] = "mFootRight"; - mJointMap["mToeRight"] = "mToeRight"; - mJointMap["mHipLeft"] = "mHipLeft"; - mJointMap["mKneeLeft"] = "mKneeLeft"; - mJointMap["mAnkleLeft"] = "mAnkleLeft"; - mJointMap["mFootLeft"] = "mFootLeft"; - mJointMap["mToeLeft"] = "mToeLeft"; - - mJointMap["avatar_mPelvis"] = "mPelvis"; - mJointMap["avatar_mTorso"] = "mTorso"; - mJointMap["avatar_mChest"] = "mChest"; - mJointMap["avatar_mNeck"] = "mNeck"; - mJointMap["avatar_mHead"] = "mHead"; - mJointMap["avatar_mSkull"] = "mSkull"; - mJointMap["avatar_mEyeRight"] = "mEyeRight"; - mJointMap["avatar_mEyeLeft"] = "mEyeLeft"; - mJointMap["avatar_mCollarLeft"] = "mCollarLeft"; - mJointMap["avatar_mShoulderLeft"] = "mShoulderLeft"; - mJointMap["avatar_mElbowLeft"] = "mElbowLeft"; - mJointMap["avatar_mWristLeft"] = "mWristLeft"; - mJointMap["avatar_mCollarRight"] = "mCollarRight"; - mJointMap["avatar_mShoulderRight"] = "mShoulderRight"; - mJointMap["avatar_mElbowRight"] = "mElbowRight"; - mJointMap["avatar_mWristRight"] = "mWristRight"; - mJointMap["avatar_mHipRight"] = "mHipRight"; - mJointMap["avatar_mKneeRight"] = "mKneeRight"; - mJointMap["avatar_mAnkleRight"] = "mAnkleRight"; - mJointMap["avatar_mFootRight"] = "mFootRight"; - mJointMap["avatar_mToeRight"] = "mToeRight"; - mJointMap["avatar_mHipLeft"] = "mHipLeft"; - mJointMap["avatar_mKneeLeft"] = "mKneeLeft"; - mJointMap["avatar_mAnkleLeft"] = "mAnkleLeft"; - mJointMap["avatar_mFootLeft"] = "mFootLeft"; - mJointMap["avatar_mToeLeft"] = "mToeLeft"; - - - mJointMap["hip"] = "mPelvis"; - mJointMap["abdomen"] = "mTorso"; - mJointMap["chest"] = "mChest"; - mJointMap["neck"] = "mNeck"; - mJointMap["head"] = "mHead"; - mJointMap["figureHair"] = "mSkull"; - mJointMap["lCollar"] = "mCollarLeft"; - mJointMap["lShldr"] = "mShoulderLeft"; - mJointMap["lForeArm"] = "mElbowLeft"; - mJointMap["lHand"] = "mWristLeft"; - mJointMap["rCollar"] = "mCollarRight"; - mJointMap["rShldr"] = "mShoulderRight"; - mJointMap["rForeArm"] = "mElbowRight"; - mJointMap["rHand"] = "mWristRight"; - mJointMap["rThigh"] = "mHipRight"; - mJointMap["rShin"] = "mKneeRight"; - mJointMap["rFoot"] = "mFootRight"; - mJointMap["lThigh"] = "mHipLeft"; - mJointMap["lShin"] = "mKneeLeft"; - mJointMap["lFoot"] = "mFootLeft"; - - if (mPreview) - { - //only try to load from slm if viewer is configured to do so and this is the - //initial model load (not an LoD or physics shape) - mTrySLM = gSavedSettings.getBOOL("MeshImportUseSLM") && mPreview->mUploadData.empty(); - mPreview->setLoadState(STARTING); - } - else - { - mTrySLM = false; - } - - assert_main_thread(); - sActiveLoaderList.push_back(this) ; -} - -LLModelLoader::~LLModelLoader() -{ - assert_main_thread(); - sActiveLoaderList.remove(this); -} - -void stretch_extents(LLModel* model, LLMatrix4a& mat, LLVector4a& min, LLVector4a& max, BOOL& first_transform) -{ - LLVector4a box[] = - { - LLVector4a(-1, 1,-1), - LLVector4a(-1, 1, 1), - LLVector4a(-1,-1,-1), - LLVector4a(-1,-1, 1), - LLVector4a( 1, 1,-1), - LLVector4a( 1, 1, 1), - LLVector4a( 1,-1,-1), - LLVector4a( 1,-1, 1), - }; - - for (S32 j = 0; j < model->getNumVolumeFaces(); ++j) - { - const LLVolumeFace& face = model->getVolumeFace(j); - - LLVector4a center; - center.setAdd(face.mExtents[0], face.mExtents[1]); - center.mul(0.5f); - LLVector4a size; - size.setSub(face.mExtents[1],face.mExtents[0]); - size.mul(0.5f); - - for (U32 i = 0; i < 8; i++) - { - LLVector4a t; - t.setMul(size, box[i]); - t.add(center); - - LLVector4a v; - - mat.affineTransform(t, v); - - if (first_transform) - { - first_transform = FALSE; - min = max = v; - } - else - { - update_min_max(min, max, v); - } - } - } -} - -void stretch_extents(LLModel* model, LLMatrix4& mat, LLVector3& min, LLVector3& max, BOOL& first_transform) -{ - LLVector4a mina, maxa; - LLMatrix4a mata; - - mata.loadu(mat); - mina.load3(min.mV); - maxa.load3(max.mV); - - stretch_extents(model, mata, mina, maxa, first_transform); - - min.set(mina.getF32ptr()); - max.set(maxa.getF32ptr()); -} - -void LLModelLoader::run() -{ - doLoadModel(); - doOnIdleOneTime(boost::bind(&LLModelLoader::loadModelCallback,this)); -} - -bool LLModelLoader::doLoadModel() -{ - //first, look for a .slm file of the same name that was modified later - //than the .dae - - if (mTrySLM) - { - std::string filename = mFilename; - - std::string::size_type i = filename.rfind("."); - if (i != std::string::npos) - { - filename.replace(i, filename.size()-1, ".slm"); - llstat slm_status; - if (LLFile::stat(filename, &slm_status) == 0) - { //slm file exists - llstat dae_status; - if (LLFile::stat(mFilename, &dae_status) != 0 || - dae_status.st_mtime < slm_status.st_mtime) - { - if (loadFromSLM(filename)) - { //slm successfully loaded, if this fails, fall through and - //try loading from dae - - mLod = -1; //successfully loading from an slm implicitly sets all - //LoDs - return true; - } - } - } - } - } - - //no suitable slm exists, load from the .dae file - DAE dae; - domCOLLADA* dom = dae.open(mFilename); - - if (!dom) - { - llinfos<<" Error with dae - traditionally indicates a corrupt file."<getVersion(); - //0=1.4 - //1=1.4.1 - //2=Currently unsupported, however may work - if (docVersion > 1 ) - { - docVersion = VERSIONTYPE_COUNT; - } - llinfos<<"Dae version "<getElementCount(NULL, COLLADA_TYPE_MESH); - - daeDocument* doc = dae.getDoc(mFilename); - if (!doc) - { - llwarns << "can't find internal doc" << llendl; - return false; - } - - daeElement* root = doc->getDomRoot(); - if (!root) - { - llwarns << "document has no root" << llendl; - return false; - } - - //Verify some basic properties of the dae - //1. Basic validity check on controller - U32 controllerCount = (int) db->getElementCount( NULL, "controller" ); - bool result = false; - for ( int i=0; igetElement( (daeElement**) &pController, i , NULL, "controller" ); - result = mPreview->verifyController( pController ); - if (!result) - { - setLoadState( ERROR_PARSING ); - return true; - } - } - - - //get unit scale - mTransform.setIdentity(); - - domAsset::domUnit* unit = daeSafeCast(root->getDescendant(daeElement::matchType(domAsset::domUnit::ID()))); - - if (unit) - { - F32 meter = unit->getMeter(); - mTransform.mMatrix[0][0] = meter; - mTransform.mMatrix[1][1] = meter; - mTransform.mMatrix[2][2] = meter; - } - - //get up axis rotation - LLMatrix4 rotation; - - domUpAxisType up = UPAXISTYPE_Y_UP; // default is Y_UP - domAsset::domUp_axis* up_axis = - daeSafeCast(root->getDescendant(daeElement::matchType(domAsset::domUp_axis::ID()))); - - if (up_axis) - { - up = up_axis->getValue(); - } - - if (up == UPAXISTYPE_X_UP) - { - rotation.initRotation(0.0f, 90.0f * DEG_TO_RAD, 0.0f); - } - else if (up == UPAXISTYPE_Y_UP) - { - rotation.initRotation(90.0f * DEG_TO_RAD, 0.0f, 0.0f); - } - - rotation *= mTransform; - mTransform = rotation; - - - for (daeInt idx = 0; idx < count; ++idx) - { //build map of domEntities to LLModel - domMesh* mesh = NULL; - db->getElement((daeElement**) &mesh, idx, NULL, COLLADA_TYPE_MESH); - - if (mesh) - { - LLPointer model = LLModel::loadModelFromDomMesh(mesh); - - if(model->getStatus() != LLModel::NO_ERRORS) - { - setLoadState(ERROR_PARSING + model->getStatus()) ; - return false; //abort - } - - if (model.notNull() && validate_model(model)) - { - mModelList.push_back(model); - mModel[mesh] = model; - } - } - } - - count = db->getElementCount(NULL, COLLADA_TYPE_SKIN); - for (daeInt idx = 0; idx < count; ++idx) - { //add skinned meshes as instances - domSkin* skin = NULL; - db->getElement((daeElement**) &skin, idx, NULL, COLLADA_TYPE_SKIN); - - if (skin) - { - domGeometry* geom = daeSafeCast(skin->getSource().getElement()); - - if (geom) - { - domMesh* mesh = geom->getMesh(); - if (mesh) - { - LLModel* model = mModel[mesh]; - if (model) - { - LLVector3 mesh_scale_vector; - LLVector3 mesh_translation_vector; - model->getNormalizedScaleTranslation(mesh_scale_vector, mesh_translation_vector); - - LLMatrix4 normalized_transformation; - normalized_transformation.setTranslation(mesh_translation_vector); - - LLMatrix4 mesh_scale; - mesh_scale.initScale(mesh_scale_vector); - mesh_scale *= normalized_transformation; - normalized_transformation = mesh_scale; - - glh::matrix4f inv_mat((F32*) normalized_transformation.mMatrix); - inv_mat = inv_mat.inverse(); - LLMatrix4 inverse_normalized_transformation(inv_mat.m); - - domSkin::domBind_shape_matrix* bind_mat = skin->getBind_shape_matrix(); - - if (bind_mat) - { //get bind shape matrix - domFloat4x4& dom_value = bind_mat->getValue(); - - LLMeshSkinInfo& skin_info = model->mSkinInfo; - - for (int i = 0; i < 4; i++) - { - for(int j = 0; j < 4; j++) - { - skin_info.mBindShapeMatrix.mMatrix[i][j] = dom_value[i + j*4]; - } - } - - LLMatrix4 trans = normalized_transformation; - trans *= skin_info.mBindShapeMatrix; - skin_info.mBindShapeMatrix = trans; - } - - - //Some collada setup for accessing the skeleton - daeElement* pElement = 0; - dae.getDatabase()->getElement( &pElement, 0, 0, "skeleton" ); - - //Try to get at the skeletal instance controller - domInstance_controller::domSkeleton* pSkeleton = daeSafeCast( pElement ); - bool missingSkeletonOrScene = false; - - //If no skeleton, do a breadth-first search to get at specific joints - bool rootNode = false; - - //Need to test for a skeleton that does not have a root node - //This occurs when your instance controller does not have an associated scene - if ( pSkeleton ) - { - daeElement* pSkeletonRootNode = pSkeleton->getValue().getElement(); - if ( pSkeletonRootNode ) - { - rootNode = true; - } - - } - if ( !pSkeleton || !rootNode ) - { - daeElement* pScene = root->getDescendant("visual_scene"); - if ( !pScene ) - { - llwarns<<"No visual scene - unable to parse bone offsets "< > children = pScene->getChildren(); - S32 childCount = children.getCount(); - - //Process any children that are joints - //Not all children are joints, some code be ambient lights, cameras, geometry etc.. - for (S32 i = 0; i < childCount; ++i) - { - domNode* pNode = daeSafeCast(children[i]); - if ( isNodeAJoint( pNode ) ) - { - processJointNode( pNode, mJointList ); - } - } - } - } - else - //Has Skeleton - { - //Get the root node of the skeleton - daeElement* pSkeletonRootNode = pSkeleton->getValue().getElement(); - if ( pSkeletonRootNode ) - { - //Once we have the root node - start acccessing it's joint components - const int jointCnt = mJointMap.size(); - std::map :: const_iterator jointIt = mJointMap.begin(); - - //Loop over all the possible joints within the .dae - using the allowed joint list in the ctor. - for ( int i=0; i( resolver.getElement() ); - if ( pJoint ) - { - //Pull out the translate id and store it in the jointTranslations map - daeSIDResolver jointResolverA( pJoint, "./translate" ); - domTranslate* pTranslateA = daeSafeCast( jointResolverA.getElement() ); - daeSIDResolver jointResolverB( pJoint, "./location" ); - domTranslate* pTranslateB = daeSafeCast( jointResolverB.getElement() ); - - LLMatrix4 workingTransform; - - //Translation via SID - if ( pTranslateA ) - { - extractTranslation( pTranslateA, workingTransform ); - } - else - if ( pTranslateB ) - { - extractTranslation( pTranslateB, workingTransform ); - } - else - { - //Translation via child from element - daeElement* pTranslateElement = getChildFromElement( pJoint, "translate" ); - if ( pTranslateElement && pTranslateElement->typeID() != domTranslate::ID() ) - { - llwarns<< "The found element is not a translate node" <getJoints(); - - domInputLocal_Array& joint_input = joints->getInput_array(); - - for (size_t i = 0; i < joint_input.getCount(); ++i) - { - domInputLocal* input = joint_input.get(i); - xsNMTOKEN semantic = input->getSemantic(); - - if (strcmp(semantic, COMMON_PROFILE_INPUT_JOINT) == 0) - { //found joint source, fill model->mJointMap and model->mSkinInfo.mJointNames - daeElement* elem = input->getSource().getElement(); - - domSource* source = daeSafeCast(elem); - if (source) - { - - - domName_array* names_source = source->getName_array(); - - if (names_source) - { - domListOfNames &names = names_source->getValue(); - - for (size_t j = 0; j < names.getCount(); ++j) - { - std::string name(names.get(j)); - if (mJointMap.find(name) != mJointMap.end()) - { - name = mJointMap[name]; - } - model->mSkinInfo.mJointNames.push_back(name); - model->mSkinInfo.mJointMap[name] = j; - } - } - else - { - domIDREF_array* names_source = source->getIDREF_array(); - if (names_source) - { - xsIDREFS& names = names_source->getValue(); - - for (size_t j = 0; j < names.getCount(); ++j) - { - std::string name(names.get(j).getID()); - if (mJointMap.find(name) != mJointMap.end()) - { - name = mJointMap[name]; - } - model->mSkinInfo.mJointNames.push_back(name); - model->mSkinInfo.mJointMap[name] = j; - } - } - } - } - } - else if (strcmp(semantic, COMMON_PROFILE_INPUT_INV_BIND_MATRIX) == 0) - { //found inv_bind_matrix array, fill model->mInvBindMatrix - domSource* source = daeSafeCast(input->getSource().getElement()); - if (source) - { - domFloat_array* t = source->getFloat_array(); - if (t) - { - domListOfFloats& transform = t->getValue(); - S32 count = transform.getCount()/16; - - for (S32 k = 0; k < count; ++k) - { - LLMatrix4 mat; - - for (int i = 0; i < 4; i++) - { - for(int j = 0; j < 4; j++) - { - mat.mMatrix[i][j] = transform[k*16 + i + j*4]; - } - } - - model->mSkinInfo.mInvBindMatrix.push_back(mat); - } - } - } - } - } - - //Now that we've parsed the joint array, let's determine if we have a full rig - //(which means we have all the joint sthat are required for an avatar versus - //a skinned asset attached to a node in a file that contains an entire skeleton, - //but does not use the skeleton). - buildJointToNodeMappingFromScene( root ); - mPreview->critiqueRigForUploadApplicability( model->mSkinInfo.mJointNames ); - - if ( !missingSkeletonOrScene ) - { - //Set the joint translations on the avatar - if it's a full mapping - //The joints are reset in the dtor - if ( mPreview->getRigWithSceneParity() ) - { - std::map :: const_iterator masterJointIt = mJointMap.begin(); - std::map :: const_iterator masterJointItEnd = mJointMap.end(); - for (;masterJointIt!=masterJointItEnd;++masterJointIt ) - { - std::string lookingForJoint = (*masterJointIt).first.c_str(); - - if ( mJointList.find( lookingForJoint ) != mJointList.end() ) - { - //llinfos<<"joint "<getPreviewAvatar()->getJoint( lookingForJoint ); - if ( pJoint ) - { - pJoint->storeCurrentXform( jointTransform.getTranslation() ); - } - else - { - //Most likely an error in the asset. - llwarns<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << llendl; - } - } - } - } - } //missingSkeletonOrScene - - - //We need to construct the alternate bind matrix (which contains the new joint positions) - //in the same order as they were stored in the joint buffer. The joints associated - //with the skeleton are not stored in the same order as they are in the exported joint buffer. - //This remaps the skeletal joints to be in the same order as the joints stored in the model. - std::vector :: const_iterator jointIt = model->mSkinInfo.mJointNames.begin(); - const int jointCnt = model->mSkinInfo.mJointNames.size(); - for ( int i=0; imSkinInfo.mInvBindMatrix[i]; - newInverse.setTranslation( mJointList[lookingForJoint].getTranslation() ); - model->mSkinInfo.mAlternateBindMatrix.push_back( newInverse ); - } - else - { - llwarns<<"Possibly misnamed/missing joint [" <getVertices(); - if (verts) - { - domInputLocal_Array& inputs = verts->getInput_array(); - for (size_t i = 0; i < inputs.getCount() && model->mPosition.empty(); ++i) - { - if (strcmp(inputs[i]->getSemantic(), COMMON_PROFILE_INPUT_POSITION) == 0) - { - domSource* pos_source = daeSafeCast(inputs[i]->getSource().getElement()); - if (pos_source) - { - domFloat_array* pos_array = pos_source->getFloat_array(); - if (pos_array) - { - domListOfFloats& pos = pos_array->getValue(); - - for (size_t j = 0; j < pos.getCount(); j += 3) - { - if (pos.getCount() <= j+2) - { - llerrs << "Invalid position array size." << llendl; - } - - LLVector3 v(pos[j], pos[j+1], pos[j+2]); - - //transform from COLLADA space to volume space - v = v * inverse_normalized_transformation; - - model->mPosition.push_back(v); - } - } - } - } - } - } - - //grab skin weights array - domSkin::domVertex_weights* weights = skin->getVertex_weights(); - if (weights) - { - domInputLocalOffset_Array& inputs = weights->getInput_array(); - domFloat_array* vertex_weights = NULL; - for (size_t i = 0; i < inputs.getCount(); ++i) - { - if (strcmp(inputs[i]->getSemantic(), COMMON_PROFILE_INPUT_WEIGHT) == 0) - { - domSource* weight_source = daeSafeCast(inputs[i]->getSource().getElement()); - if (weight_source) - { - vertex_weights = weight_source->getFloat_array(); - } - } - } - - if (vertex_weights) - { - domListOfFloats& w = vertex_weights->getValue(); - domListOfUInts& vcount = weights->getVcount()->getValue(); - domListOfInts& v = weights->getV()->getValue(); - - U32 c_idx = 0; - for (size_t vc_idx = 0; vc_idx < vcount.getCount(); ++vc_idx) - { //for each vertex - daeUInt count = vcount[vc_idx]; - - //create list of weights that influence this vertex - LLModel::weight_list weight_list; - - for (daeUInt i = 0; i < count; ++i) - { //for each weight - daeInt joint_idx = v[c_idx++]; - daeInt weight_idx = v[c_idx++]; - - if (joint_idx == -1) - { - //ignore bindings to bind_shape_matrix - continue; - } - - F32 weight_value = w[weight_idx]; - - weight_list.push_back(LLModel::JointWeight(joint_idx, weight_value)); - } - - //sort by joint weight - std::sort(weight_list.begin(), weight_list.end(), LLModel::CompareWeightGreater()); - - std::vector wght; - - F32 total = 0.f; - - for (U32 i = 0; i < llmin((U32) 4, (U32) weight_list.size()); ++i) - { //take up to 4 most significant weights - if (weight_list[i].mWeight > 0.f) - { - wght.push_back( weight_list[i] ); - total += weight_list[i].mWeight; - } - } - - F32 scale = 1.f/total; - if (scale != 1.f) - { //normalize weights - for (U32 i = 0; i < wght.size(); ++i) - { - wght[i].mWeight *= scale; - } - } - - model->mSkinWeights[model->mPosition[vc_idx]] = wght; - } - - //add instance to scene for this model - - LLMatrix4 transformation = mTransform; - // adjust the transformation to compensate for mesh normalization - - LLMatrix4 mesh_translation; - mesh_translation.setTranslation(mesh_translation_vector); - mesh_translation *= transformation; - transformation = mesh_translation; - - LLMatrix4 mesh_scale; - mesh_scale.initScale(mesh_scale_vector); - mesh_scale *= transformation; - transformation = mesh_scale; - - std::map materials; - for (U32 i = 0; i < model->mMaterialList.size(); ++i) - { - materials[model->mMaterialList[i]] = LLImportMaterial(); - } - mScene[transformation].push_back(LLModelInstance(model, model->mLabel, transformation, materials)); - stretch_extents(model, transformation, mExtents[0], mExtents[1], mFirstTransform); - } - } - } - } - } - } - } - - daeElement* scene = root->getDescendant("visual_scene"); - - if (!scene) - { - llwarns << "document has no visual_scene" << llendl; - setLoadState( ERROR_PARSING ); - return true; - } - - setLoadState( DONE ); - - bool badElement = false; - - processElement( scene, badElement ); - - if ( badElement ) - { - setLoadState( ERROR_PARSING ); - } - - return true; -} - -void LLModelLoader::setLoadState(U32 state) -{ - if (mPreview) - { - mPreview->setLoadState(state); - } -} - -bool LLModelLoader::loadFromSLM(const std::string& filename) -{ - //only need to populate mScene with data from slm - llstat stat; - - if (LLFile::stat(filename, &stat)) - { //file does not exist - return false; - } - - S32 file_size = (S32) stat.st_size; - - llifstream ifstream(filename, std::ifstream::in | std::ifstream::binary); - LLSD data; - LLSDSerialize::fromBinary(data, ifstream, file_size); - ifstream.close(); - - //build model list for each LoD - model_list model[LLModel::NUM_LODS]; - - if (data["version"].asInteger() != SLM_SUPPORTED_VERSION) - { //unsupported version - return false; - } - - LLSD& mesh = data["mesh"]; - - LLVolumeParams volume_params; - volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE); - - for (S32 lod = 0; lod < LLModel::NUM_LODS; ++lod) - { - for (U32 i = 0; i < mesh.size(); ++i) - { - std::stringstream str(mesh[i].asString()); - LLPointer loaded_model = new LLModel(volume_params, (F32) lod); - if (loaded_model->loadModel(str)) - { - loaded_model->mLocalID = i; - model[lod].push_back(loaded_model); - - if (lod == LLModel::LOD_HIGH && !loaded_model->mSkinInfo.mJointNames.empty()) - { - //check to see if rig is valid - mPreview->critiqueRigForUploadApplicability( loaded_model->mSkinInfo.mJointNames ); - } - } - } - } - - if (model[LLModel::LOD_HIGH].empty()) - { //failed to load high lod - return false; - } - - // Set name. - std::string name = data["name"]; - if (!name.empty()) - { - model[LLModel::LOD_HIGH][0]->mLabel = name; - } - - - //load instance list - model_instance_list instance_list; - - LLSD& instance = data["instance"]; - - for (U32 i = 0; i < instance.size(); ++i) - { - //deserialize instance list - instance_list.push_back(LLModelInstance(instance[i])); - - //match up model instance pointers - S32 idx = instance_list[i].mLocalMeshID; - - for (U32 lod = 0; lod < LLModel::NUM_LODS; ++lod) - { - if (!model[lod].empty()) - { - instance_list[i].mLOD[lod] = model[lod][idx]; - } - } - - instance_list[i].mModel = model[LLModel::LOD_HIGH][idx]; - } - - - //convert instance_list to mScene - mFirstTransform = TRUE; - for (U32 i = 0; i < instance_list.size(); ++i) - { - LLModelInstance& cur_instance = instance_list[i]; - mScene[cur_instance.mTransform].push_back(cur_instance); - stretch_extents(cur_instance.mModel, cur_instance.mTransform, mExtents[0], mExtents[1], mFirstTransform); - } - - setLoadState( DONE ); - - return true; -} - -//static -bool LLModelLoader::isAlive(LLModelLoader* loader) -{ - if(!loader) - { - return false ; - } - - std::list::iterator iter = sActiveLoaderList.begin() ; - for(; iter != sActiveLoaderList.end() && (*iter) != loader; ++iter) ; - - return *iter == loader ; -} - -void LLModelLoader::loadModelCallback() -{ - assert_main_thread(); - - if (mPreview) - { - mPreview->loadModelCallback(mLod); - } - - while (!isStopped()) - { //wait until this thread is stopped before deleting self - apr_sleep(100); - } - - //doubel check if "this" is valid before deleting it, in case it is aborted during running. - if(!isAlive(this)) - { - return ; - } - - //cleanup model loader - if (mPreview) - { - mPreview->mModelLoader = NULL; - } - - delete this; -} -//----------------------------------------------------------------------------- -// buildJointToNodeMappingFromScene() -//----------------------------------------------------------------------------- -void LLModelLoader::buildJointToNodeMappingFromScene( daeElement* pRoot ) -{ - daeElement* pScene = pRoot->getDescendant("visual_scene"); - if ( pScene ) - { - daeTArray< daeSmartRef > children = pScene->getChildren(); - S32 childCount = children.getCount(); - for (S32 i = 0; i < childCount; ++i) - { - domNode* pNode = daeSafeCast(children[i]); - processJointToNodeMapping( pNode ); - } - } -} -//----------------------------------------------------------------------------- -// processJointToNodeMapping() -//----------------------------------------------------------------------------- -void LLModelLoader::processJointToNodeMapping( domNode* pNode ) -{ - if ( isNodeAJoint( pNode ) ) - { - //1.Store the parent - std::string nodeName = pNode->getName(); - if ( !nodeName.empty() ) - { - mJointsFromNode.push_front( pNode->getName() ); - } - //2. Handle the kiddo's - processChildJoints( pNode ); - } - else - { - //Determine if the're any children wrt to this failed node. - //This occurs when an armature is exported and ends up being what essentially amounts to - //as the root for the visual_scene - if ( pNode ) - { - processChildJoints( pNode ); - } - else - { - llinfos<<"Node is NULL"< > childOfChild = pParentNode->getChildren(); - S32 childOfChildCount = childOfChild.getCount(); - for (S32 i = 0; i < childOfChildCount; ++i) - { - domNode* pChildNode = daeSafeCast( childOfChild[i] ); - if ( pChildNode ) - { - processJointToNodeMapping( pChildNode ); - } - } -} - -//----------------------------------------------------------------------------- -// critiqueRigForUploadApplicability() -//----------------------------------------------------------------------------- -void LLModelPreview::critiqueRigForUploadApplicability( const std::vector &jointListFromAsset ) -{ - critiqueJointToNodeMappingFromScene(); - - //Determines the following use cases for a rig: - //1. It is suitable for upload with skin weights & joint positions, or - //2. It is suitable for upload as standard av with just skin weights - - bool isJointPositionUploadOK = isRigSuitableForJointPositionUpload( jointListFromAsset ); - bool isRigLegacyOK = isRigLegacy( jointListFromAsset ); - - //It's OK that both could end up being true, both default to false - if ( isJointPositionUploadOK ) - { - setRigValidForJointPositionUpload( true ); - } - - if ( isRigLegacyOK) - { - setLegacyRigValid( true ); - } - -} -//----------------------------------------------------------------------------- -// critiqueJointToNodeMappingFromScene() -//----------------------------------------------------------------------------- -void LLModelPreview::critiqueJointToNodeMappingFromScene( void ) -{ - //Do the actual nodes back the joint listing from the dae? - //if yes then this is a fully rigged asset, otherwise it's just a partial rig - - std::deque::iterator jointsFromNodeIt = mJointsFromNode.begin(); - std::deque::iterator jointsFromNodeEndIt = mJointsFromNode.end(); - bool result = true; - - if ( !mJointsFromNode.empty() ) - { - for ( ;jointsFromNodeIt!=jointsFromNodeEndIt;++jointsFromNodeIt ) - { - std::string name = *jointsFromNodeIt; - if ( mJointTransformMap.find( name ) != mJointTransformMap.end() ) - { - continue; - } - else - { - llinfos<<"critiqueJointToNodeMappingFromScene is missing a: "< &jointListFromAsset ) -{ - //No joints in asset - if ( jointListFromAsset.size() == 0 ) - { - return false; - } - - bool result = false; - - std::deque :: const_iterator masterJointIt = mMasterLegacyJointList.begin(); - std::deque :: const_iterator masterJointEndIt = mMasterLegacyJointList.end(); - - std::vector :: const_iterator modelJointIt = jointListFromAsset.begin(); - std::vector :: const_iterator modelJointItEnd = jointListFromAsset.end(); - - for ( ;masterJointIt!=masterJointEndIt;++masterJointIt ) - { - result = false; - modelJointIt = jointListFromAsset.begin(); - - for ( ;modelJointIt!=modelJointItEnd; ++modelJointIt ) - { - if ( *masterJointIt == *modelJointIt ) - { - result = true; - break; - } - } - if ( !result ) - { - llinfos<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< llendl; - break; - } - } - return result; -} -//----------------------------------------------------------------------------- -// isRigSuitableForJointPositionUpload() -//----------------------------------------------------------------------------- -bool LLModelPreview::isRigSuitableForJointPositionUpload( const std::vector &jointListFromAsset ) -{ - bool result = false; - - std::deque :: const_iterator masterJointIt = mMasterJointList.begin(); - std::deque :: const_iterator masterJointEndIt = mMasterJointList.end(); - - std::vector :: const_iterator modelJointIt = jointListFromAsset.begin(); - std::vector :: const_iterator modelJointItEnd = jointListFromAsset.end(); - - for ( ;masterJointIt!=masterJointEndIt;++masterJointIt ) - { - result = false; - modelJointIt = jointListFromAsset.begin(); - - for ( ;modelJointIt!=modelJointItEnd; ++modelJointIt ) - { - if ( *masterJointIt == *modelJointIt ) - { - result = true; - break; - } - } - if ( !result ) - { - llinfos<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< llendl; - break; - } - } - return result; -} - - -//called in the main thread -void LLModelLoader::loadTextures() -{ - BOOL is_paused = isPaused() ; - pause() ; //pause the loader - - for(scene::iterator iter = mScene.begin(); iter != mScene.end(); ++iter) - { - for(U32 i = 0 ; i < iter->second.size(); i++) - { - for(std::map::iterator j = iter->second[i].mMaterial.begin(); - j != iter->second[i].mMaterial.end(); ++j) - { - LLImportMaterial& material = j->second; - - if(!material.mDiffuseMapFilename.empty()) - { - material.mDiffuseMap = - LLViewerTextureManager::getFetchedTextureFromUrl("file://" + material.mDiffuseMapFilename, FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_PREVIEW); - material.mDiffuseMap->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, mPreview, NULL, FALSE); - material.mDiffuseMap->forceToSaveRawImage(0, F32_MAX); - mNumOfFetchingTextures++ ; - } - } - } - } - - if(!is_paused) - { - unpause() ; - } -} - -//----------------------------------------------------------------------------- -// isNodeAJoint() -//----------------------------------------------------------------------------- -bool LLModelLoader::isNodeAJoint( domNode* pNode ) -{ - if ( !pNode ) - { - llinfos<<"Created node is NULL"<getName() == NULL ) - { - llinfos<<"Parsed node has no name "<getId() ) - { - llinfos<<"Parsed node ID: "<getId()<getName() ) != mJointMap.end() ) - { - return true; - } - - return false; -} -//----------------------------------------------------------------------------- -// verifyCount -//----------------------------------------------------------------------------- -bool LLModelPreview::verifyCount( int expected, int result ) -{ - if ( expected != result ) - { - llinfos<< "Error: (expected/got)"<getSkin(); - - if ( pSkin ) - { - xsAnyURI & uri = pSkin->getSource(); - domElement* pElement = uri.getElement(); - - if ( !pElement ) - { - llinfos<<"Can't resolve skin source"<getTypeName(); - if ( stricmp(type_str, "geometry") == 0 ) - { - //Skin is reference directly by geometry and get the vertex count from skin - domSkin::domVertex_weights* pVertexWeights = pSkin->getVertex_weights(); - U32 vertexWeightsCount = pVertexWeights->getCount(); - domGeometry* pGeometry = (domGeometry*) (domElement*) uri.getElement(); - domMesh* pMesh = pGeometry->getMesh(); - - if ( pMesh ) - { - //Get vertex count from geometry - domVertices* pVertices = pMesh->getVertices(); - if ( !pVertices ) - { - llinfos<<"No vertices!"<getInput_array()[0]->getSource(); - domSource* pSource = (domSource*) (domElement*) src.getElement(); - U32 verticesCount = pSource->getTechnique_common()->getAccessor()->getCount(); - result = verifyCount( verticesCount, vertexWeightsCount ); - if ( !result ) - { - return result; - } - } - } - - U32 vcountCount = (U32) pVertexWeights->getVcount()->getValue().getCount(); - result = verifyCount( vcountCount, vertexWeightsCount ); - if ( !result ) - { - return result; - } - - domInputLocalOffset_Array& inputs = pVertexWeights->getInput_array(); - U32 sum = 0; - for (size_t i=0; igetVcount()->getValue()[i]; - } - result = verifyCount( sum * inputs.getCount(), (domInt) pVertexWeights->getV()->getValue().getCount() ); - } - } - - return result; -} - -//----------------------------------------------------------------------------- -// extractTranslation() -//----------------------------------------------------------------------------- -void LLModelLoader::extractTranslation( domTranslate* pTranslate, LLMatrix4& transform ) -{ - domFloat3 jointTrans = pTranslate->getValue(); - LLVector3 singleJointTranslation( jointTrans[0], jointTrans[1], jointTrans[2] ); - transform.setTranslation( singleJointTranslation ); -} -//----------------------------------------------------------------------------- -// extractTranslationViaElement() -//----------------------------------------------------------------------------- -void LLModelLoader::extractTranslationViaElement( daeElement* pTranslateElement, LLMatrix4& transform ) -{ - if ( pTranslateElement ) - { - domTranslate* pTranslateChild = dynamic_cast( pTranslateElement ); - domFloat3 translateChild = pTranslateChild->getValue(); - LLVector3 singleJointTranslation( translateChild[0], translateChild[1], translateChild[2] ); - transform.setTranslation( singleJointTranslation ); - } -} -//----------------------------------------------------------------------------- -// extractTranslationViaSID() -//----------------------------------------------------------------------------- -void LLModelLoader::extractTranslationViaSID( daeElement* pElement, LLMatrix4& transform ) -{ - if ( pElement ) - { - daeSIDResolver resolver( pElement, "./transform" ); - domMatrix* pMatrix = daeSafeCast( resolver.getElement() ); - //We are only extracting out the translational component atm - LLMatrix4 workingTransform; - if ( pMatrix ) - { - domFloat4x4 domArray = pMatrix->getValue(); - for ( int i = 0; i < 4; i++ ) - { - for( int j = 0; j < 4; j++ ) - { - workingTransform.mMatrix[i][j] = domArray[i + j*4]; - } - } - LLVector3 trans = workingTransform.getTranslation(); - transform.setTranslation( trans ); - } - } - else - { - llwarns<<"Element is nonexistent - empty/unsupported node."<getName() == NULL) - { - llwarns << "nameless node, can't process" << llendl; - return; - } - - //llwarns<<"ProcessJointNode# Node:" <getName()<( jointResolverA.getElement() ); - daeSIDResolver jointResolverB( pNode, "./location" ); - domTranslate* pTranslateB = daeSafeCast( jointResolverB.getElement() ); - - //Translation via SID was successful - if ( pTranslateA ) - { - extractTranslation( pTranslateA, workingTransform ); - } - else - if ( pTranslateB ) - { - extractTranslation( pTranslateB, workingTransform ); - } - else - { - //Translation via child from element - daeElement* pTranslateElement = getChildFromElement( pNode, "translate" ); - if ( !pTranslateElement || pTranslateElement->typeID() != domTranslate::ID() ) - { - //llwarns<< "The found element is not a translate node" <( jointResolver.getElement() ); - if ( pMatrix ) - { - //llinfos<<"A matrix SID was however found!"<getValue(); - for ( int i = 0; i < 4; i++ ) - { - for( int j = 0; j < 4; j++ ) - { - workingTransform.mMatrix[i][j] = domArray[i + j*4]; - } - } - } - else - { - llwarns<< "The found element is not translate or matrix node - most likely a corrupt export!" <getName() ] = workingTransform; - - //2. handle the nodes children - - //Gather and handle the incoming nodes children - daeTArray< daeSmartRef > childOfChild = pNode->getChildren(); - S32 childOfChildCount = childOfChild.getCount(); - - for (S32 i = 0; i < childOfChildCount; ++i) - { - domNode* pChildNode = daeSafeCast( childOfChild[i] ); - if ( pChildNode ) - { - processJointNode( pChildNode, jointTransforms ); - } - } -} -//----------------------------------------------------------------------------- -// getChildFromElement() -//----------------------------------------------------------------------------- -daeElement* LLModelLoader::getChildFromElement( daeElement* pElement, std::string const & name ) -{ - daeElement* pChildOfElement = pElement->getChild( name.c_str() ); - if ( pChildOfElement ) - { - return pChildOfElement; - } - llwarns<< "Could not find a child [" << name << "] for the element: \"" << pElement->getAttribute("id") << "\"" << llendl; - return NULL; -} - -void LLModelLoader::processElement( daeElement* element, bool& badElement ) -{ - LLMatrix4 saved_transform = mTransform; - - domTranslate* translate = daeSafeCast(element); - if (translate) - { - domFloat3 dom_value = translate->getValue(); - - LLMatrix4 translation; - translation.setTranslation(LLVector3(dom_value[0], dom_value[1], dom_value[2])); - - translation *= mTransform; - mTransform = translation; - } - - domRotate* rotate = daeSafeCast(element); - if (rotate) - { - domFloat4 dom_value = rotate->getValue(); - - LLMatrix4 rotation; - rotation.initRotTrans(dom_value[3] * DEG_TO_RAD, LLVector3(dom_value[0], dom_value[1], dom_value[2]), LLVector3(0, 0, 0)); - - rotation *= mTransform; - mTransform = rotation; - } - - domScale* scale = daeSafeCast(element); - if (scale) - { - domFloat3 dom_value = scale->getValue(); - - - LLVector3 scale_vector = LLVector3(dom_value[0], dom_value[1], dom_value[2]); - scale_vector.abs(); // Set all values positive, since we don't currently support mirrored meshes - LLMatrix4 scaling; - scaling.initScale(scale_vector); - - scaling *= mTransform; - mTransform = scaling; - } - - domMatrix* matrix = daeSafeCast(element); - if (matrix) - { - domFloat4x4 dom_value = matrix->getValue(); - - LLMatrix4 matrix_transform; - - for (int i = 0; i < 4; i++) - { - for(int j = 0; j < 4; j++) - { - matrix_transform.mMatrix[i][j] = dom_value[i + j*4]; - } - } - - matrix_transform *= mTransform; - mTransform = matrix_transform; - } - - domInstance_geometry* instance_geo = daeSafeCast(element); - if (instance_geo) - { - domGeometry* geo = daeSafeCast(instance_geo->getUrl().getElement()); - if (geo) - { - domMesh* mesh = daeSafeCast(geo->getDescendant(daeElement::matchType(domMesh::ID()))); - if (mesh) - { - LLModel* model = mModel[mesh]; - if (model) - { - LLMatrix4 transformation = mTransform; - - if (mTransform.determinant() < 0) - { //negative scales are not supported - llinfos << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << llendl; - badElement = true; - } - - std::map materials = getMaterials(model, instance_geo); - - // adjust the transformation to compensate for mesh normalization - LLVector3 mesh_scale_vector; - LLVector3 mesh_translation_vector; - model->getNormalizedScaleTranslation(mesh_scale_vector, mesh_translation_vector); - - LLMatrix4 mesh_translation; - mesh_translation.setTranslation(mesh_translation_vector); - mesh_translation *= transformation; - transformation = mesh_translation; - - LLMatrix4 mesh_scale; - mesh_scale.initScale(mesh_scale_vector); - mesh_scale *= transformation; - transformation = mesh_scale; - - std::string label = getElementLabel(instance_geo); - mScene[transformation].push_back(LLModelInstance(model, label, transformation, materials)); - - stretch_extents(model, transformation, mExtents[0], mExtents[1], mFirstTransform); - } - } - } - else - { - llinfos<<"Unable to resolve geometry URL."<(element); - if (instance_node) - { - daeElement* instance = instance_node->getUrl().getElement(); - if (instance) - { - processElement(instance,badElement); - } - } - - //process children - daeTArray< daeSmartRef > children = element->getChildren(); - int childCount = children.getCount(); - for (S32 i = 0; i < childCount; i++) - { - processElement(children[i],badElement); - } - - domNode* node = daeSafeCast(element); - if (node) - { //this element was a node, restore transform before processiing siblings - mTransform = saved_transform; - } -} - -std::map LLModelLoader::getMaterials(LLModel* model, domInstance_geometry* instance_geo) -{ - std::map materials; - for (int i = 0; i < model->mMaterialList.size(); i++) - { - LLImportMaterial import_material; - - domInstance_material* instance_mat = NULL; - - domBind_material::domTechnique_common* technique = - daeSafeCast(instance_geo->getDescendant(daeElement::matchType(domBind_material::domTechnique_common::ID()))); - - if (technique) - { - daeTArray< daeSmartRef > inst_materials = technique->getChildrenByType(); - for (int j = 0; j < inst_materials.getCount(); j++) - { - std::string symbol(inst_materials[j]->getSymbol()); - - if (symbol == model->mMaterialList[i]) // found the binding - { - instance_mat = inst_materials[j]; - } - } - } - - if (instance_mat) - { - domMaterial* material = daeSafeCast(instance_mat->getTarget().getElement()); - if (material) - { - domInstance_effect* instance_effect = - daeSafeCast(material->getDescendant(daeElement::matchType(domInstance_effect::ID()))); - if (instance_effect) - { - domEffect* effect = daeSafeCast(instance_effect->getUrl().getElement()); - if (effect) - { - domProfile_COMMON* profile = - daeSafeCast(effect->getDescendant(daeElement::matchType(domProfile_COMMON::ID()))); - if (profile) - { - import_material = profileToMaterial(profile); - } - } - } - } - } - - import_material.mBinding = model->mMaterialList[i]; - materials[model->mMaterialList[i]] = import_material; - } - - return materials; -} - -LLImportMaterial LLModelLoader::profileToMaterial(domProfile_COMMON* material) -{ - LLImportMaterial mat; - mat.mFullbright = FALSE; - - daeElement* diffuse = material->getDescendant("diffuse"); - if (diffuse) - { - domCommon_color_or_texture_type_complexType::domTexture* texture = - daeSafeCast(diffuse->getDescendant("texture")); - if (texture) - { - domCommon_newparam_type_Array newparams = material->getNewparam_array(); - for (S32 i = 0; i < newparams.getCount(); i++) - { - domFx_surface_common* surface = newparams[i]->getSurface(); - if (surface) - { - domFx_surface_init_common* init = surface->getFx_surface_init_common(); - if (init) - { - domFx_surface_init_from_common_Array init_from = init->getInit_from_array(); + //llinfos << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue + // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << llendl; - if (init_from.getCount() > i) - { - domImage* image = daeSafeCast(init_from[i]->getValue().getElement()); - if (image) - { - // we only support init_from now - embedded data will come later - domImage::domInit_from* init = image->getInit_from(); - if (init) - { - mat.mDiffuseMapFilename = cdom::uriToNativePath(init->getValue().str()); - mat.mDiffuseMapLabel = getElementLabel(material); - } - } - } + std::string name(param[i].mDetails.mEnumValues.mEnumsArray[k].mName); + std::string localized_name; + bool is_localized = LLTrans::findString(localized_name, name); + + combo_box->add(is_localized ? localized_name : name, + LLSD::Integer(param[i].mDetails.mEnumValues.mEnumsArray[k].mValue)); } + combo_box->setValue(param[i].mDefault.mIntOrEnumValue); + combo_box->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); } - } - } - - domCommon_color_or_texture_type_complexType::domColor* color = - daeSafeCast(diffuse->getDescendant("color")); - if (color) - { - domFx_color_common domfx_color = color->getValue(); - LLColor4 value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]); - mat.mDiffuseColor = value; - } - } - daeElement* emission = material->getDescendant("emission"); - if (emission) - { - LLColor4 emission_color = getDaeColor(emission); - if (((emission_color[0] + emission_color[1] + emission_color[2]) / 3.0) > 0.25) - { - mat.mFullbright = TRUE; + //llinfos << "----" << llendl; + } + //llinfos << "-----------------------------" << llendl; } } - return mat; + childSetCommitCallback("physics_explode", LLFloaterModelPreview::onExplodeCommit, this); } -// try to get a decent label for this element -std::string LLModelLoader::getElementLabel(daeElement *element) +void LLFloaterModelPreview::createSmoothComboBox(LLComboBox* combo_box, float min, float max) { - // if we have a name attribute, use it - std::string name = element->getAttribute("name"); - if (name.length()) - { - return name; - } + float delta = (max - min) / SMOOTH_VALUES_NUMBER; + int ilabel = 0; - // if we have an ID attribute, use it - if (element->getID()) - { - return std::string(element->getID()); - } + combo_box->add("0 (none)", ADD_BOTTOM, true); - // if we have a parent, use it - daeElement* parent = element->getParent(); - if (parent) + for(float value = min + delta; value < max; value += delta) { - // if parent has a name, use it - std::string name = parent->getAttribute("name"); - if (name.length()) - { - return name; - } - - // if parent has an ID, use it - if (parent->getID()) - { - return std::string(parent->getID()); - } + std::string label = (++ilabel == SMOOTH_VALUES_NUMBER) ? "10 (max)" : llformat("%.1d", ilabel); + combo_box->add(label, value, ADD_BOTTOM, true); } - // try to use our type - daeString element_name = element->getElementName(); - if (element_name) - { - return std::string(element_name); - } - // if all else fails, use "object" - return std::string("object"); } -LLColor4 LLModelLoader::getDaeColor(daeElement* element) +//----------------------------------------------------------------------------- +// onMouseCaptureLost() +//----------------------------------------------------------------------------- +// static +void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handler) { - LLColor4 value; - domCommon_color_or_texture_type_complexType::domColor* color = - daeSafeCast(element->getDescendant("color")); - if (color) - { - domFx_color_common domfx_color = color->getValue(); - value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]); - } - - return value; + gViewerWindow->showCursor(); } //----------------------------------------------------------------------------- @@ -3171,51 +1197,20 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) glodInit(); - //move into joint mapper class - //1. joints for joint offset verification - mMasterJointList.push_front("mPelvis"); - mMasterJointList.push_front("mTorso"); - mMasterJointList.push_front("mChest"); - mMasterJointList.push_front("mNeck"); - mMasterJointList.push_front("mHead"); - mMasterJointList.push_front("mCollarLeft"); - mMasterJointList.push_front("mShoulderLeft"); - mMasterJointList.push_front("mElbowLeft"); - mMasterJointList.push_front("mWristLeft"); - mMasterJointList.push_front("mCollarRight"); - mMasterJointList.push_front("mShoulderRight"); - mMasterJointList.push_front("mElbowRight"); - mMasterJointList.push_front("mWristRight"); - mMasterJointList.push_front("mHipRight"); - mMasterJointList.push_front("mKneeRight"); - mMasterJointList.push_front("mFootRight"); - mMasterJointList.push_front("mHipLeft"); - mMasterJointList.push_front("mKneeLeft"); - mMasterJointList.push_front("mFootLeft"); - //2. legacy joint list - used to verify rigs that will not be using joint offsets - mMasterLegacyJointList.push_front("mPelvis"); - mMasterLegacyJointList.push_front("mTorso"); - mMasterLegacyJointList.push_front("mChest"); - mMasterLegacyJointList.push_front("mNeck"); - mMasterLegacyJointList.push_front("mHead"); - mMasterLegacyJointList.push_front("mHipRight"); - mMasterLegacyJointList.push_front("mKneeRight"); - mMasterLegacyJointList.push_front("mFootRight"); - mMasterLegacyJointList.push_front("mHipLeft"); - mMasterLegacyJointList.push_front("mKneeLeft"); - mMasterLegacyJointList.push_front("mFootLeft"); - createPreviewAvatar(); } LLModelPreview::~LLModelPreview() { - if (mModelLoader) - { - mModelLoader->mPreview = NULL; - mModelLoader = NULL; - } - //*HACK : *TODO : turn this back on when we understand why this crashes + // glod apparently has internal mem alignment issues that are angering + // the heap-check code in windows, these should be hunted down in that + // TP code, if possible + // + // kernel32.dll!HeapFree() + 0x14 bytes + // msvcr100.dll!free(void * pBlock) Line 51 C + // glod.dll!glodGetGroupParameteriv() + 0x119 bytes + // glod.dll!glodShutdown() + 0x77 bytes + // //glodShutdown(); } @@ -3281,7 +1276,9 @@ U32 LLModelPreview::calcResourceCost() decomp, mFMP->childGetValue("upload_skin").asBoolean(), mFMP->childGetValue("upload_joints").asBoolean(), - TRUE); + TRUE, + FALSE, + instance.mModel->mSubmodelID); num_hulls += decomp.mHull.size(); for (U32 i = 0; i < decomp.mHull.size(); ++i) @@ -3348,29 +1345,9 @@ void LLModelPreview::rebuildUploadData() F32 max_scale = 0.f; - //reorder materials to match mBaseModel - for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) - { - if (mBaseModel.size() == mModel[i].size()) - { - for (U32 j = 0; j < mBaseModel.size(); ++j) - { - - int refFaceCnt = 0; - int modelFaceCnt = 0; - - if ( !mModel[i][j]->matchMaterialOrder(mBaseModel[j], refFaceCnt, modelFaceCnt ) ) - { - setLoadState( LLModelLoader::ERROR_MATERIALS ); - mFMP->childDisable( "calculate_btn" ); - } - } - } - } - for (LLModelLoader::scene::iterator iter = mBaseScene.begin(); iter != mBaseScene.end(); ++iter) { //for each transform in scene - LLMatrix4 mat = iter->first; + LLMatrix4 mat = iter->first; // compute position LLVector3 position = LLVector3(0, 0, 0) * mat; @@ -3387,41 +1364,176 @@ void LLModelPreview::rebuildUploadData() mat *= scale_mat; - for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_iter) - { //for each instance with said transform applied - LLModelInstance instance = *model_iter; + for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end();) + { //for each instance with said transform applied + LLModelInstance instance = *model_iter++; LLModel* base_model = instance.mModel; - if (base_model) + if (base_model && !requested_name.empty()) { base_model->mRequestedLabel = requested_name; base_model->mMetric = metric; } - S32 idx = 0; - for (idx = 0; idx < mBaseModel.size(); ++idx) - { //find reference instance for this model - if (mBaseModel[idx] == base_model) - { - break; - } + for (int i = LLModel::NUM_LODS - 1; i >= LLModel::LOD_IMPOSTOR; i--) + { // Fill LOD slots by finding matching meshes by label with name extensions + // in the appropriate scene for each LOD. This fixes all kinds of issues + // where the indexed method below fails in spectacular fashion. + // If you don't take the time to name your LOD and PHYS meshes + // with the name of their corresponding mesh in the HIGH LOD, + // then the indexed method will be attempted below. + + LLModel* lod_model = NULL; + LLMatrix4 transform; + + std::string name_to_match = instance.mLabel; + llassert(!name_to_match.empty()); + + switch (i) + { + case LLModel::LOD_IMPOSTOR: name_to_match += "_LOD0"; break; + case LLModel::LOD_LOW: name_to_match += "_LOD1"; break; + case LLModel::LOD_MEDIUM: name_to_match += "_LOD2"; break; + case LLModel::LOD_PHYSICS: name_to_match += "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } + + FindModel(mScene[i], name_to_match, lod_model, transform); + + S32 importerDebug = gSavedSettings.getS32("ImporterDebug"); + + // Fall back to old method of index-based association if + // we could not find a match based on the mesh names + // + if (lod_model) + { + + if (i == LLModel::LOD_PHYSICS) + { + if (importerDebug > 0) + { + llinfos << "Assigning collision for " << instance.mLabel << " to match " << lod_model->mLabel << llendl; + } + instance.mLOD[i] = lod_model; + } + else + { + if (importerDebug > 0) + { + llinfos << "Assigning LOD" << i << " for " << instance.mLabel << " to found match " << lod_model->mLabel << llendl; + } + instance.mLOD[i] = lod_model; + } + } + else + { + int searchLOD = (i > LLModel::LOD_HIGH) ? LLModel::LOD_HIGH : i; + while ((searchLOD <= LLModel::LOD_HIGH) && !lod_model) + { + std::string name_to_match = instance.mLabel; + llassert(!name_to_match.empty()); + + switch (searchLOD) + { + case LLModel::LOD_IMPOSTOR: name_to_match += "_LOD0"; break; + case LLModel::LOD_LOW: name_to_match += "_LOD1"; break; + case LLModel::LOD_MEDIUM: name_to_match += "_LOD2"; break; + case LLModel::LOD_PHYSICS: name_to_match += "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } + + // See if we can find an appropriately named model in LOD 'searchLOD' + // + FindModel(mScene[searchLOD], name_to_match, lod_model, transform); + searchLOD++; + } + + // Fall back to old method of index-based association if + // we could not find a match based on the mesh names at all. + // + if (lod_model) + { + if (i == LLModel::LOD_PHYSICS) + { + if (importerDebug > 0) + { + llinfos << "Falling back collision for " << instance.mLabel << " to " << lod_model->mLabel << llendl; + } + instance.mLOD[i] = lod_model; + } + else + { + if (importerDebug > 0) + { + llinfos << "Falling back LOD" << i << " for " << instance.mLabel << " to found " << lod_model->mLabel << llendl; + } + instance.mLOD[i] = lod_model; + } + } + else + { + S32 idx = 0; + for (idx = 0; idx < mBaseModel.size(); ++idx) + { //find reference instance for this model + if (mBaseModel[idx] == base_model) + { + if (importerDebug > 0) + { + llinfos << "Falling back to model index " << idx << " for LOD " << i << " of " << instance.mLabel << llendl; + } + break; + } + } + + // If the model list for the current LOD includes that index... + // + if (mModel[i].size() > idx) + { + // Assign that index from the model list for our LOD as the LOD model for this instance + // + lod_model = mModel[i][idx]; + instance.mLOD[i] = lod_model; + if (i == LLModel::LOD_PHYSICS) + { + if (importerDebug > 0) + { + llinfos << "Indexed fallback to model index " << idx << ": LOD " << i << " named " << lod_model->mLabel << " for collision for " << instance.mLabel << llendl; + } + } + else + { + if (importerDebug > 0) + { + llinfos << "Indexed fallback to model index " << idx << " LOD " << i << " named " << lod_model->mLabel << " for LOD " << i << " for " << instance.mLabel << llendl; + } + } + } + else + { + if (importerDebug > 0) + { + llinfos << "List of models for LOD " << i << " did not include index " << idx << llendl; + } + } + } + } } - if(idx < mBaseModel.size()) - { - for (U32 i = 0; i < LLModel::NUM_LODS; i++) - { //fill LOD slots based on reference model index - if (mModel[i].size() > idx) - { - instance.mLOD[i] = mModel[i][idx]; - } - else - { - instance.mLOD[i] = NULL; - } + LLModel* high_lod_model = instance.mLOD[LLModel::LOD_HIGH]; + llassert(high_lod_model); + + for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) + { + int refFaceCnt = 0; + int modelFaceCnt = 0; + llassert(instance.mLOD[i]); + if (instance.mLOD[i] && !instance.mLOD[i]->matchMaterialOrder(high_lod_model, refFaceCnt, modelFaceCnt ) ) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); } - } + } instance.mTransform = mat; mUploadData.push_back(instance); } @@ -3493,7 +1605,6 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw meshes.insert(instance.mModel); std::stringstream str; - LLModel::Decomposition& decomp = instance.mLOD[LLModel::LOD_PHYSICS].notNull() ? instance.mLOD[LLModel::LOD_PHYSICS]->mPhysics : @@ -3506,8 +1617,8 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw instance.mLOD[LLModel::LOD_LOW], instance.mLOD[LLModel::LOD_IMPOSTOR], decomp, - save_skinweights, save_joint_positions, FALSE, TRUE); - + save_skinweights, save_joint_positions, + FALSE, TRUE, instance.mModel->mSubmodelID); data["mesh"][instance.mModel->mLocalID] = str.str(); } @@ -3575,7 +1686,16 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable clearGLODGroup(); } - mModelLoader = new LLModelLoader(filename, lod, this, mJointTransformMap, mJointsFromNode ); + mModelLoader = new LLDAELoader( + filename, + lod, + &LLModelPreview::loadedCallback, + &LLModelPreview::lookupJointByName, + &LLModelPreview::loadTextures, + &LLModelPreview::stateChangedCallback, + this, + mJointTransformMap, + mJointsFromNode ); if (force_disable_slm) { @@ -3683,9 +1803,15 @@ void LLModelPreview::loadModelCallback(S32 lod) if(getLoadState() >= LLModelLoader::ERROR_PARSING) { mLoading = false ; + mModelLoader = NULL; return ; } + // Copy determinations about rig so UI will reflect them + // + setRigValidForJointPositionUpload(mModelLoader->isRigValidForJointPositionUpload()); + setLegacyRigValid(mModelLoader->isLegacyRigValid()); + mModelLoader->loadTextures() ; if (lod == -1) @@ -3720,6 +1846,11 @@ void LLModelPreview::loadModelCallback(S32 lod) //override displayed model with current LoD list_iter->mModel = list_iter->mLOD[lod]; + if (!list_iter->mModel) + { + continue; + } + //add current model to current LoD's model list (LLModel::mLocalID makes a good vector index) S32 idx = list_iter->mModel->mLocalID; @@ -3728,7 +1859,7 @@ void LLModelPreview::loadModelCallback(S32 lod) mModel[lod].resize(idx+1); } - mModel[lod][idx] = list_iter->mModel; + mModel[lod][idx] = list_iter->mModel; if (!list_iter->mModel->mSkinWeights.empty()) { skin_weights = true; @@ -3817,6 +1948,8 @@ void LLModelPreview::loadModelCallback(S32 lod) refresh(); mModelLoadedSignal(); + + mModelLoader = NULL; } void LLModelPreview::resetPreviewTarget() @@ -4104,6 +2237,19 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE); mModel[lod][mdl_idx] = new LLModel(volume_params, 0.f); + std::string name = base->mLabel; + + switch (lod) + { + case LLModel::LOD_IMPOSTOR: name += "_LOD0"; break; + case LLModel::LOD_LOW: name += "_LOD1"; break; + case LLModel::LOD_MEDIUM: name += "_LOD2"; break; + case LLModel::LOD_PHYSICS: name += "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } + + mModel[lod][mdl_idx]->mLabel = name; + GLint* sizes = new GLint[patch_count*2]; glodGetObjectParameteriv(mObject[base], GLOD_PATCH_SIZES, sizes); stop_gloderror(); @@ -4216,17 +2362,6 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim { shader->bind(); } - - /*if (which_lod == -1 && mScene[LLModel::LOD_PHYSICS].empty()) - { //build physics scene - mScene[LLModel::LOD_PHYSICS] = mScene[LLModel::LOD_LOW]; - mModel[LLModel::LOD_PHYSICS] = mModel[LLModel::LOD_LOW]; - - for (U32 i = 1; i < mModel[LLModel::LOD_PHYSICS].size(); ++i) - { - mPhysicsQ.push(mModel[LLModel::LOD_PHYSICS][i]); - } - }*/ } void LLModelPreview::updateStatusMessages() @@ -4243,43 +2378,88 @@ void LLModelPreview::updateStatusMessages() S32 total_verts[LLModel::NUM_LODS]; S32 total_submeshes[LLModel::NUM_LODS]; - for (S32 lod = 0; lod < LLModel::NUM_LODS; ++lod) + for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) + { + total_tris[i] = 0; + total_verts[i] = 0; + total_submeshes[i] = 0; + } + + for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) { - //initialize total for this lod to 0 - total_tris[lod] = total_verts[lod] = total_submeshes[lod] = 0; + LLModelInstance& instance = *iter; + + LLModel* model_high_lod = instance.mLOD[LLModel::LOD_HIGH]; + llassert(model_high_lod); - for (LLModelLoader::scene::iterator iter = mScene[lod].begin(), endIter = mScene[lod].end(); iter != endIter; ++iter) + for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) { - for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) - { - LLModel* model = instance->mModel; - if (model) - { - //for each model in the lod - S32 cur_tris = 0; - S32 cur_verts = 0; - S32 cur_submeshes = model->getNumVolumeFaces(); + LLModel* lod_model = instance.mLOD[i]; + llassert(lod_model); + if (!lod_model) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + } - for (S32 j = 0; j < cur_submeshes; ++j) - { //for each submesh (face), add triangles and vertices to current total - const LLVolumeFace& face = model->getVolumeFace(j); - cur_tris += face.mNumIndices/3; - cur_verts += face.mNumVertices; - } + int refFaceCnt = 0; + int modelFaceCnt = 0; - //add this model to the lod total - total_tris[lod] += cur_tris; - total_verts[lod] += cur_verts; - total_submeshes[lod] += cur_submeshes; + if (!lod_model->matchMaterialOrder(model_high_lod, refFaceCnt, modelFaceCnt ) ) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + } + + if (lod_model) + { + //for each model in the lod + S32 cur_tris = 0; + S32 cur_verts = 0; + S32 cur_submeshes = lod_model->getNumVolumeFaces(); - //store this model's counts to asset data - tris[lod].push_back(cur_tris); - verts[lod].push_back(cur_verts); - submeshes[lod].push_back(cur_submeshes); + for (S32 j = 0; j < cur_submeshes; ++j) + { //for each submesh (face), add triangles and vertices to current total + const LLVolumeFace& face = lod_model->getVolumeFace(j); + cur_tris += face.mNumIndices/3; + cur_verts += face.mNumVertices; } + + std::string instance_name = instance.mLabel; + + S32 importerDebug = gSavedSettings.getS32("ImporterDebug"); + if (importerDebug > 0) + { + // Useful for debugging generalized complaints below about total submeshes which don't have enough + // context to address exactly what needs to be fixed to move towards compliance with the rules. + // + llinfos << "Instance " << lod_model->mLabel << " LOD " << i << " Verts: " << cur_verts << llendl; + llinfos << "Instance " << lod_model->mLabel << " LOD " << i << " Tris: " << cur_tris << llendl; + llinfos << "Instance " << lod_model->mLabel << " LOD " << i << " Faces: " << cur_submeshes << llendl; + + if (importerDebug > 1) + { + LLModel::material_list::iterator mat_iter = lod_model->mMaterialList.begin(); + while (mat_iter != lod_model->mMaterialList.end()) + { + llinfos << "Instance " << lod_model->mLabel << " LOD " << i << " Material " << *(mat_iter) << llendl; + mat_iter++; + } + } + } + + //add this model to the lod total + total_tris[i] += cur_tris; + total_verts[i] += cur_verts; + total_submeshes[i] += cur_submeshes; + + //store this model's counts to asset data + tris[i].push_back(cur_tris); + verts[i].push_back(cur_verts); + submeshes[i].push_back(cur_submeshes); } } - } + } if (mMaxTriangleLimit == 0) { @@ -4293,28 +2473,36 @@ void LLModelPreview::updateStatusMessages() const LLVector4a scale(0.5f); for (U32 i = 0; i < mModel[lod].size() && !has_degenerate; ++i) { //for each model in the lod - if (mModel[lod][i]->mPhysics.mHull.empty()) + if (mModel[lod][i] && mModel[lod][i]->mPhysics.mHull.empty()) { //no decomp exists S32 cur_submeshes = mModel[lod][i]->getNumVolumeFaces(); for (S32 j = 0; j < cur_submeshes && !has_degenerate; ++j) { //for each submesh (face), add triangles and vertices to current total - const LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j); - for (S32 k = 0; k < face.mNumIndices && !has_degenerate; ) + LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j); + for (S32 k = 0; (k < face.mNumIndices) && !has_degenerate; ) { - LLVector4a v1; v1.setMul(face.mPositions[face.mIndices[k++]], scale); - LLVector4a v2; v2.setMul(face.mPositions[face.mIndices[k++]], scale); - LLVector4a v3; v3.setMul(face.mPositions[face.mIndices[k++]], scale); + U16 index_a = face.mIndices[k+0]; + U16 index_b = face.mIndices[k+1]; + U16 index_c = face.mIndices[k+2]; + + LLVector4a v1; v1.setMul(face.mPositions[index_a], scale); + LLVector4a v2; v2.setMul(face.mPositions[index_b], scale); + LLVector4a v3; v3.setMul(face.mPositions[index_c], scale); if (ll_is_degenerate(v1,v2,v3)) { has_degenerate = true; } + else + { + k += 3; + } } } } } } - + mFMP->childSetTextArg("submeshes_info", "[SUBMESHES]", llformat("%d", total_submeshes[LLModel::LOD_HIGH])); std::string mesh_status_na = mFMP->getString("mesh_status_na"); @@ -4417,13 +2605,16 @@ void LLModelPreview::updateStatusMessages() { LLModel* mdl = mModel[LLModel::LOD_PHYSICS][i]; - for (U32 j = 0; upload_ok && j < mdl->mPhysics.mHull.size(); ++j) + if (mdl) { - if (mdl->mPhysics.mHull[j].size() > 256) + for (U32 j = 0; upload_ok && j < mdl->mPhysics.mHull.size(); ++j) { - upload_ok = false; + if (mdl->mPhysics.mHull[j].size() > 256) + { + upload_ok = false; + } } - } + } } bool errorStateFromLoader = getLoadState() >= LLModelLoader::ERROR_PARSING ? true : false; @@ -4939,6 +3130,58 @@ void LLModelPreview::createPreviewAvatar( void ) } } +void LLModelPreview::loadedCallback( + LLModelLoader::scene& scene, + LLModelLoader::model_list& model_list, + S32 lod, + void* opaque) +{ + LLModelPreview* pPreview = static_cast< LLModelPreview* >(opaque); + if (pPreview) + { + pPreview->loadModelCallback(lod); + } +} + +void LLModelPreview::stateChangedCallback(U32 state,void* opaque) +{ + LLModelPreview* pPreview = static_cast< LLModelPreview* >(opaque); + if (pPreview) + { + pPreview->setLoadState(state); + } +} + +LLJoint* LLModelPreview::lookupJointByName(const std::string& str, void* opaque) +{ + LLModelPreview* pPreview = static_cast< LLModelPreview* >(opaque); + if (pPreview) + { + return pPreview->getPreviewAvatar()->getJoint(str); + } + return NULL; +} + +U32 LLModelPreview::loadTextures(LLImportMaterial& material,void* opaque) +{ + (void)opaque; + + if (material.mDiffuseMapFilename.size()) + { + material.mOpaqueData = new LLPointer< LLViewerFetchedTexture >; + LLPointer< LLViewerFetchedTexture >& tex = (*reinterpret_cast< LLPointer< LLViewerFetchedTexture > * >(material.mOpaqueData)); + + tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + material.mDiffuseMapFilename, FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_PREVIEW); + tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, opaque, NULL, FALSE); + tex->forceToSaveRawImage(0, F32_MAX); + material.setDiffuseMap(tex->getID()); // record tex ID + return 1; + } + + material.mOpaqueData = NULL; + return 0; +} + void LLModelPreview::addEmptyFace( LLModel* pTarget ) { U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; @@ -5181,24 +3424,6 @@ BOOL LLModelPreview::render() } } - //make sure material lists all match - for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) - { - if (mBaseModel.size() == mModel[i].size()) - { - for (U32 j = 0; j < mBaseModel.size(); ++j) - { - int refFaceCnt = 0; - int modelFaceCnt = 0; - - if ( !mModel[i][j]->matchMaterialOrder(mBaseModel[j], refFaceCnt, modelFaceCnt ) ) - { - mFMP->childDisable( "calculate_btn" ); - } - } - } - } - if (regen) { genBuffers(mPreviewLOD, skin_weight); @@ -5212,62 +3437,61 @@ BOOL LLModelPreview::render() LLModel* model = instance.mLOD[mPreviewLOD]; - if (!model) - { - continue; - } + if (!model) + { + continue; + } - gGL.pushMatrix(); - LLMatrix4 mat = instance.mTransform; + gGL.pushMatrix(); + LLMatrix4 mat = instance.mTransform; - gGL.multMatrix((GLfloat*) mat.mMatrix); + gGL.multMatrix((GLfloat*) mat.mMatrix); - for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i) - { - LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i]; + for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i) + { + LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i]; - buffer->setBuffer(type_mask & buffer->getTypeMask()); + buffer->setBuffer(type_mask & buffer->getTypeMask()); - if (textures) - { - int materialCnt = instance.mModel->mMaterialList.size(); - if ( i < materialCnt ) + if (textures) { - const std::string& binding = instance.mModel->mMaterialList[i]; - const LLImportMaterial& material = instance.mMaterial[binding]; + int materialCnt = instance.mModel->mMaterialList.size(); + if ( i < materialCnt ) + { + const std::string& binding = instance.mModel->mMaterialList[i]; + const LLImportMaterial& material = instance.mMaterial[binding]; - gGL.diffuseColor4fv(material.mDiffuseColor.mV); + gGL.diffuseColor4fv(material.mDiffuseColor.mV); - if (material.mDiffuseMap.notNull()) - { - if (material.mDiffuseMap->getDiscardLevel() > -1) + // Find the tex for this material, bind it, and add it to our set + // + LLViewerFetchedTexture* tex = bindMaterialDiffuseTexture(material); + if (tex) { - gGL.getTexUnit(0)->bind(material.mDiffuseMap, true); - mTextureSet.insert(material.mDiffuseMap.get()); + mTextureSet.insert(tex); } } } - } - else - { - gGL.diffuseColor4f(1,1,1,1); - } - - buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.diffuseColor3f(0.4f, 0.4f, 0.4f); + else + { + gGL.diffuseColor4f(1,1,1,1); + } - if (edges) - { - glLineWidth(3.f); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.diffuseColor3f(0.4f, 0.4f, 0.4f); + + if (edges) + { + glLineWidth(3.f); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glLineWidth(1.f); + } } + gGL.popMatrix(); } - gGL.popMatrix(); - } if (physics) { @@ -5295,97 +3519,97 @@ BOOL LLModelPreview::render() LLModel* model = instance.mLOD[LLModel::LOD_PHYSICS]; - if (!model) - { - continue; - } + if (!model) + { + continue; + } - gGL.pushMatrix(); - LLMatrix4 mat = instance.mTransform; + gGL.pushMatrix(); + LLMatrix4 mat = instance.mTransform; gGL.multMatrix((GLfloat*) mat.mMatrix); - bool render_mesh = true; + bool render_mesh = true; - LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; - if (decomp) - { - LLMutexLock(decomp->mMutex); + LLPhysicsDecomp* decomp = gMeshRepo.mDecompThread; + if (decomp) + { + LLMutexLock(decomp->mMutex); - LLModel::Decomposition& physics = model->mPhysics; + LLModel::Decomposition& physics = model->mPhysics; - if (!physics.mHull.empty()) - { - render_mesh = false; + if (!physics.mHull.empty()) + { + render_mesh = false; - if (physics.mMesh.empty()) - { //build vertex buffer for physics mesh - gMeshRepo.buildPhysicsMesh(physics); - } + if (physics.mMesh.empty()) + { //build vertex buffer for physics mesh + gMeshRepo.buildPhysicsMesh(physics); + } - if (!physics.mMesh.empty()) - { //render hull instead of mesh - for (U32 i = 0; i < physics.mMesh.size(); ++i) - { - if (explode > 0.f) + if (!physics.mMesh.empty()) + { //render hull instead of mesh + for (U32 i = 0; i < physics.mMesh.size(); ++i) { - gGL.pushMatrix(); + if (explode > 0.f) + { + gGL.pushMatrix(); - LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters; - offset *= explode; + LLVector3 offset = model->mHullCenter[i]-model->mCenterOfHullCenters; + offset *= explode; - gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]); - } + gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]); + } - static std::vector hull_colors; + static std::vector hull_colors; - if (i+1 >= hull_colors.size()) - { - hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128)); - } + if (i+1 >= hull_colors.size()) + { + hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128)); + } - gGL.diffuseColor4ubv(hull_colors[i].mV); - LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals); + gGL.diffuseColor4ubv(hull_colors[i].mV); + LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals); - if (explode > 0.f) - { - gGL.popMatrix(); + if (explode > 0.f) + { + gGL.popMatrix(); + } } } } } - } - - if (render_mesh) - { - if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) - { - genBuffers(LLModel::LOD_PHYSICS, false); - } - for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i) + + if (render_mesh) { - LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i]; + if (mVertexBuffer[LLModel::LOD_PHYSICS].empty()) + { + genBuffers(LLModel::LOD_PHYSICS, false); + } + for (U32 i = 0; i < mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); ++i) + { + LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i]; - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.diffuseColor4f(0.4f, 0.4f, 0.0f, 0.4f); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.diffuseColor4f(0.4f, 0.4f, 0.0f, 0.4f); - buffer->setBuffer(type_mask & buffer->getTypeMask()); - buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); + buffer->setBuffer(type_mask & buffer->getTypeMask()); + buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); - gGL.diffuseColor3f(1.f, 1.f, 0.f); + gGL.diffuseColor3f(1.f, 1.f, 0.f); - glLineWidth(2.f); - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); + glLineWidth(2.f); + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glLineWidth(1.f); + } } - } - gGL.popMatrix(); - } + gGL.popMatrix(); + } glLineWidth(3.f); glPointSize(8.f); @@ -5572,13 +3796,13 @@ BOOL LLModelPreview::render() buffer->setBuffer(type_mask & buffer->getTypeMask()); gGL.diffuseColor4fv(material.mDiffuseColor.mV); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - if (material.mDiffuseMap.notNull()) + + // Find the tex for this material, bind it, and add it to our set + // + LLViewerFetchedTexture* tex = bindMaterialDiffuseTexture(material); + if (tex) { - if (material.mDiffuseMap->getDiscardLevel() > -1) - { - gGL.getTexUnit(0)->bind(material.mDiffuseMap, true); - mTextureSet.insert(material.mDiffuseMap.get()); - } + mTextureSet.insert(tex); } buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0); diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index e588418f7b..9948bb35a8 100755 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -37,6 +37,8 @@ #include "llviewermenufile.h" #include "llfloatermodeluploadbase.h" +#include "lldaeloader.h" + class LLComboBox; class LLJoint; class LLViewerJointMesh; @@ -45,103 +47,18 @@ class LLTextBox; class LLVertexBuffer; class LLModelPreview; class LLFloaterModelPreview; +class DAE; class daeElement; class domProfile_COMMON; class domInstance_geometry; class domNode; class domTranslate; class domController; +class domSkin; +class domMesh; class LLMenuButton; class LLToggleableMenu; -typedef std::map JointTransformMap; -typedef std::map:: iterator JointTransformMapIt; - -const S32 NUM_LOD = 4; - -class LLModelLoader : public LLThread -{ -public: - typedef enum - { - STARTING = 0, - READING_FILE, - CREATING_FACES, - GENERATING_VERTEX_BUFFERS, - GENERATING_LOD, - DONE, - ERROR_PARSING, //basically loading failed - ERROR_MATERIALS, - } eLoadState; - - U32 mState; - std::string mFilename; - S32 mLod; - LLModelPreview* mPreview; - LLMatrix4 mTransform; - BOOL mFirstTransform; - LLVector3 mExtents[2]; - bool mTrySLM; - - std::map > mModel; - - typedef std::vector > model_list; - model_list mModelList; - - typedef std::vector model_instance_list; - - typedef std::map scene; - - scene mScene; - - typedef std::queue > model_queue; - - //queue of models that need a physics rep - model_queue mPhysicsQ; - - LLModelLoader( std::string filename, S32 lod, LLModelPreview* preview, JointTransformMap& jointMap, - std::deque& jointsFromNodes ); - ~LLModelLoader() ; - - virtual void run(); - bool doLoadModel(); - bool loadFromSLM(const std::string& filename); - void loadModelCallback(); - - void loadTextures() ; //called in the main thread. - void processElement(daeElement* element, bool& badElement); - std::map getMaterials(LLModel* model, domInstance_geometry* instance_geo); - LLImportMaterial profileToMaterial(domProfile_COMMON* material); - std::string getElementLabel(daeElement *element); - LLColor4 getDaeColor(daeElement* element); - - daeElement* getChildFromElement( daeElement* pElement, std::string const & name ); - - bool isNodeAJoint( domNode* pNode ); - void processJointNode( domNode* pNode, std::map& jointTransforms ); - void extractTranslation( domTranslate* pTranslate, LLMatrix4& transform ); - void extractTranslationViaElement( daeElement* pTranslateElement, LLMatrix4& transform ); - void extractTranslationViaSID( daeElement* pElement, LLMatrix4& transform ); - - void setLoadState(U32 state); - - void buildJointToNodeMappingFromScene( daeElement* pRoot ); - void processJointToNodeMapping( domNode* pNode ); - void processChildJoints( domNode* pParentNode ); - - //map of avatar joints as named in COLLADA assets to internal joint names - std::map mJointMap; - JointTransformMap& mJointList; - std::deque& mJointsFromNode; - - S32 mNumOfFetchingTextures ; //updated in the main thread - bool areTexturesReady() { return !mNumOfFetchingTextures; } //called in the main thread. - -private: - static std::list sActiveLoaderList; - static bool isAlive(LLModelLoader* loader) ; -}; - class LLFloaterModelPreview : public LLFloaterModelUploadBase { public: @@ -358,21 +275,14 @@ public: void setHasPivot( bool val ) { mHasPivot = val; } void setModelPivot( const LLVector3& pivot ) { mModelPivot = pivot; } - //Determines the viability of an asset to be used as an avatar rig (w or w/o joint upload caps) - void critiqueRigForUploadApplicability( const std::vector &jointListFromAsset ); - void critiqueJointToNodeMappingFromScene( void ); //Is a rig valid so that it can be used as a criteria for allowing for uploading of joint positions //Accessors for joint position upload friendly rigs const bool isRigValidForJointPositionUpload( void ) const { return mRigValidJointUpload; } void setRigValidForJointPositionUpload( bool rigValid ) { mRigValidJointUpload = rigValid; } - bool isRigSuitableForJointPositionUpload( const std::vector &jointListFromAsset ); - //Determines if a rig is a legacy from the joint list - bool isRigLegacy( const std::vector &jointListFromAsset ); + //Accessors for the legacy rigs const bool isLegacyRigValid( void ) const { return mLegacyRigValid; } - void setLegacyRigValid( bool rigValid ) { mLegacyRigValid = rigValid; } - //Verify that a controller matches vertex counts - bool verifyController( domController* pController ); + void setLegacyRigValid( bool rigValid ) { mLegacyRigValid = rigValid; } static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); @@ -387,6 +297,14 @@ public: LLVector3 getTranslationForJointOffset( std::string joint ); +protected: + + static void loadedCallback(LLModelLoader::scene& scene,LLModelLoader::model_list& model_list, S32 lod, void* opaque); + static void stateChangedCallback(U32 state, void* opaque); + + static LLJoint* lookupJointByName(const std::string&, void* opaque); + static U32 loadTextures(LLImportMaterial& material, void* opaque); + private: //Utility function for controller vertex compare bool verifyCount( int expected, int result ); @@ -452,7 +370,7 @@ private: U32 mMaxTriangleLimit; LLMeshUploadThread::instance_list mUploadData; - std::set mTextureSet; + std::set mTextureSet; //map of vertex buffers to models (one vertex buffer in vector per face in model std::map > > mVertexBuffer[LLModel::NUM_LODS+1]; @@ -470,11 +388,10 @@ private: bool mLegacyRigValid; bool mLastJointUpdate; + + JointSet mJointsFromNode; + JointTransformMap mJointTransformMap; - std::deque mMasterJointList; - std::deque mMasterLegacyJointList; - std::deque mJointsFromNode; - JointTransformMap mJointTransformMap; LLPointer mPreviewAvatar; }; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 5afd2cb329..f36fb971b5 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -498,6 +498,12 @@ void get_vertex_buffer_from_mesh(LLCDMeshData& mesh, LLModel::PhysicsMesh& res, } } +LLViewerFetchedTexture* LLMeshUploadThread::FindViewerTexture(const LLImportMaterial& material) +{ + LLPointer< LLViewerFetchedTexture > * ppTex = static_cast< LLPointer< LLViewerFetchedTexture > * >(material.mOpaqueData); + return ppTex ? (*ppTex).get() : NULL; +} + volatile S32 LLMeshRepoThread::sActiveHeaderRequests = 0; volatile S32 LLMeshRepoThread::sActiveLODRequests = 0; U32 LLMeshRepoThread::sMaxConcurrentRequests = 1; @@ -2027,6 +2033,14 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) { LLMeshUploadData data; data.mBaseModel = iter->first; + + if (data.mBaseModel->mSubmodelID) + { + // These are handled below to insure correct parenting order on creation + // due to map walking being based on model address (aka random) + continue; + } + LLModelInstance& first_instance = *(iter->second.begin()); for (S32 i = 0; i < 5; i++) { @@ -2064,7 +2078,10 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) data.mModel[LLModel::LOD_IMPOSTOR], decomp, mUploadSkin, - mUploadJoints); + mUploadJoints, + FALSE, + FALSE, + data.mBaseModel->mSubmodelID); data.mAssetData = ostr.str(); std::string str = ostr.str(); @@ -2098,17 +2115,26 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) instance_entry["scale"] = ll_sd_from_vector3(scale); instance_entry["material"] = LL_MCODE_WOOD; - instance_entry["physics_shape_type"] = (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL); + instance_entry["physics_shape_type"] = data.mModel[LLModel::LOD_PHYSICS].notNull() ? (U8)(LLViewerObject::PHYSICS_SHAPE_PRIM) : (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL); instance_entry["mesh"] = mesh_index[data.mBaseModel]; instance_entry["face_list"] = LLSD::emptyArray(); - S32 end = llmin((S32)data.mBaseModel->mMaterialList.size(), data.mBaseModel->getNumVolumeFaces()) ; + // We want to be able to allow more than 8 materials... + // + S32 end = llmin((S32)instance.mMaterial.size(), instance.mModel->getNumVolumeFaces()) ; + for (S32 face_num = 0; face_num < end; face_num++) { LLImportMaterial& material = instance.mMaterial[data.mBaseModel->mMaterialList[face_num]]; LLSD face_entry = LLSD::emptyMap(); - LLViewerFetchedTexture *texture = material.mDiffuseMap.get(); + + LLViewerFetchedTexture *texture = NULL; + + if (material.mDiffuseMapFilename.size()) + { + texture = FindViewerTexture(material); + } if ((texture != NULL) && (textures.find(texture) == textures.end())) @@ -2123,9 +2149,171 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) { LLPointer upload_file = LLViewerTextureList::convertToUploadFile(texture->getSavedRawImage()); + + if (!upload_file.isNull() && upload_file->getDataSize()) + { + texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize()); + } + } + } + + if (texture != NULL && + mUploadTextures && + texture_index.find(texture) == texture_index.end()) + { + texture_index[texture] = texture_num; + std::string str = texture_str.str(); + res["texture_list"][texture_num] = LLSD::Binary(str.begin(),str.end()); + texture_num++; + } + + // Subset of TextureEntry fields. + if (texture != NULL && mUploadTextures) + { + face_entry["image"] = texture_index[texture]; + face_entry["scales"] = 1.0; + face_entry["scalet"] = 1.0; + face_entry["offsets"] = 0.0; + face_entry["offsett"] = 0.0; + face_entry["imagerot"] = 0.0; + } + face_entry["diffuse_color"] = ll_sd_from_color4(material.mDiffuseColor); + face_entry["fullbright"] = material.mFullbright; + instance_entry["face_list"][face_num] = face_entry; + } + + res["instance_list"][instance_num] = instance_entry; + instance_num++; + } + } + + for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter) + { + LLMeshUploadData data; + data.mBaseModel = iter->first; + + if (!data.mBaseModel->mSubmodelID) + { + // These were handled above already... + // + continue; + } + + LLModelInstance& first_instance = *(iter->second.begin()); + for (S32 i = 0; i < 5; i++) + { + data.mModel[i] = first_instance.mLOD[i]; + } + + if (mesh_index.find(data.mBaseModel) == mesh_index.end()) + { + // Have not seen this model before - create a new mesh_list entry for it. + if (model_name.empty()) + { + model_name = data.mBaseModel->getName(); + } + + if (model_metric.empty()) + { + model_metric = data.mBaseModel->getMetric(); + } + + std::stringstream ostr; + + LLModel::Decomposition& decomp = + data.mModel[LLModel::LOD_PHYSICS].notNull() ? + data.mModel[LLModel::LOD_PHYSICS]->mPhysics : + data.mBaseModel->mPhysics; + + decomp.mBaseHull = mHullMap[data.mBaseModel]; + + LLSD mesh_header = LLModel::writeModel( + ostr, + data.mModel[LLModel::LOD_PHYSICS], + data.mModel[LLModel::LOD_HIGH], + data.mModel[LLModel::LOD_MEDIUM], + data.mModel[LLModel::LOD_LOW], + data.mModel[LLModel::LOD_IMPOSTOR], + decomp, + mUploadSkin, + mUploadJoints, + FALSE, + FALSE, + data.mBaseModel->mSubmodelID); + + data.mAssetData = ostr.str(); + std::string str = ostr.str(); + + res["mesh_list"][mesh_num] = LLSD::Binary(str.begin(),str.end()); + mesh_index[data.mBaseModel] = mesh_num; + mesh_num++; + } + + // For all instances that use this model + for (instance_list::iterator instance_iter = iter->second.begin(); + instance_iter != iter->second.end(); + ++instance_iter) + { + + LLModelInstance& instance = *instance_iter; + + LLSD instance_entry; + + for (S32 i = 0; i < 5; i++) + { + data.mModel[i] = instance.mLOD[i]; + } + + LLVector3 pos, scale; + LLQuaternion rot; + LLMatrix4 transformation = instance.mTransform; + decomposeMeshMatrix(transformation,pos,rot,scale); + instance_entry["position"] = ll_sd_from_vector3(pos); + instance_entry["rotation"] = ll_sd_from_quaternion(rot); + instance_entry["scale"] = ll_sd_from_vector3(scale); + + instance_entry["material"] = LL_MCODE_WOOD; + instance_entry["physics_shape_type"] = (U8)(LLViewerObject::PHYSICS_SHAPE_NONE); + instance_entry["mesh"] = mesh_index[data.mBaseModel]; + + instance_entry["face_list"] = LLSD::emptyArray(); + + // We want to be able to allow more than 8 materials... + // + S32 end = llmin((S32)instance.mMaterial.size(), instance.mModel->getNumVolumeFaces()) ; + + for (S32 face_num = 0; face_num < end; face_num++) + { + LLImportMaterial& material = instance.mMaterial[data.mBaseModel->mMaterialList[face_num]]; + LLSD face_entry = LLSD::emptyMap(); + + LLViewerFetchedTexture *texture = NULL; + + if (material.mDiffuseMapFilename.size()) + { + texture = FindViewerTexture(material); + } + + if ((texture != NULL) && + (textures.find(texture) == textures.end())) + { + textures.insert(texture); + } + + std::stringstream texture_str; + if (texture != NULL && include_textures && mUploadTextures) + { + if(texture->hasSavedRawImage()) + { + LLPointer upload_file = + LLViewerTextureList::convertToUploadFile(texture->getSavedRawImage()); + + if (!upload_file.isNull() && upload_file->getDataSize()) + { texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize()); } } + } if (texture != NULL && mUploadTextures && @@ -3756,37 +3944,6 @@ void LLMeshUploadThread::decomposeMeshMatrix(LLMatrix4& transformation, result_rot = quat_rotation; } -bool LLImportMaterial::operator<(const LLImportMaterial &rhs) const -{ - if (mDiffuseMap != rhs.mDiffuseMap) - { - return mDiffuseMap < rhs.mDiffuseMap; - } - - if (mDiffuseMapFilename != rhs.mDiffuseMapFilename) - { - return mDiffuseMapFilename < rhs.mDiffuseMapFilename; - } - - if (mDiffuseMapLabel != rhs.mDiffuseMapLabel) - { - return mDiffuseMapLabel < rhs.mDiffuseMapLabel; - } - - if (mDiffuseColor != rhs.mDiffuseColor) - { - return mDiffuseColor < rhs.mDiffuseColor; - } - - if (mBinding != rhs.mBinding) - { - return mBinding < rhs.mBinding; - } - - return mFullbright < rhs.mFullbright; -} - - void LLMeshRepository::updateInventory(inventory_data data) { LLMutexLock lock(mMeshMutex); @@ -4372,60 +4529,6 @@ void LLPhysicsDecomp::Request::setStatusMessage(const std::string& msg) mStatusMessage = msg; } -LLModelInstance::LLModelInstance(LLSD& data) -{ - mLocalMeshID = data["mesh_id"].asInteger(); - mLabel = data["label"].asString(); - mTransform.setValue(data["transform"]); - - for (U32 i = 0; i < data["material"].size(); ++i) - { - LLImportMaterial mat(data["material"][i]); - mMaterial[mat.mBinding] = mat; - } -} - - -LLSD LLModelInstance::asLLSD() -{ - LLSD ret; - - ret["mesh_id"] = mModel->mLocalID; - ret["label"] = mLabel; - ret["transform"] = mTransform.getValue(); - - U32 i = 0; - for (std::map::iterator iter = mMaterial.begin(); iter != mMaterial.end(); ++iter) - { - ret["material"][i++] = iter->second.asLLSD(); - } - - return ret; -} - -LLImportMaterial::LLImportMaterial(LLSD& data) -{ - mDiffuseMapFilename = data["diffuse"]["filename"].asString(); - mDiffuseMapLabel = data["diffuse"]["label"].asString(); - mDiffuseColor.setValue(data["diffuse"]["color"]); - mFullbright = data["fullbright"].asBoolean(); - mBinding = data["binding"].asString(); -} - - -LLSD LLImportMaterial::asLLSD() -{ - LLSD ret; - - ret["diffuse"]["filename"] = mDiffuseMapFilename; - ret["diffuse"]["label"] = mDiffuseMapLabel; - ret["diffuse"]["color"] = mDiffuseColor.getValue(); - ret["fullbright"] = mFullbright; - ret["binding"] = mBinding; - - return ret; -} - void LLMeshRepository::buildPhysicsMesh(LLModel::Decomposition& decomp) { decomp.mMesh.resize(decomp.mHull.size()); diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 39280bea3a..688cd01a87 100755 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -90,54 +90,6 @@ public: } }; -class LLImportMaterial -{ -public: - LLPointer mDiffuseMap; - std::string mDiffuseMapFilename; - std::string mDiffuseMapLabel; - std::string mBinding; - LLColor4 mDiffuseColor; - bool mFullbright; - - bool operator<(const LLImportMaterial ¶ms) const; - - LLImportMaterial() - : mFullbright(false) - { - mDiffuseColor.set(1,1,1,1); - } - - LLImportMaterial(LLSD& data); - - LLSD asLLSD(); -}; - -class LLModelInstance -{ -public: - LLPointer mModel; - LLPointer mLOD[5]; - - std::string mLabel; - - LLUUID mMeshID; - S32 mLocalMeshID; - - LLMatrix4 mTransform; - std::map mMaterial; - - LLModelInstance(LLModel* model, const std::string& label, LLMatrix4& transform, std::map& materials) - : mModel(model), mLabel(label), mTransform(transform), mMaterial(materials) - { - mLocalMeshID = -1; - } - - LLModelInstance(LLSD& data); - - LLSD asLLSD(); -}; - class LLPhysicsDecomp : public LLThread { public: @@ -483,6 +435,8 @@ public: // Inherited from LLCore::HttpHandler virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response); + LLViewerFetchedTexture* FindViewerTexture(const LLImportMaterial& material); + private: LLHandle mFeeObserverHandle; LLHandle mUploadObserverHandle; -- cgit v1.2.3 From cf143bd4610dc279f1aa790e0b37fbad5c86f654 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 29 May 2014 04:59:41 -0700 Subject: Fix files apparently missed by whomever did the great log macro renaming (pox be upon them) --- indra/newview/llinventoryobserver.cpp | 2 +- indra/newview/lllogchat.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 2cbf9bb8b6..26643d8671 100755 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -702,7 +702,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask) LLViewerInventoryCategory* category = gInventory.getCategory(cat_id); if (!category) { - llwarns << "Category : Category id = " << cat_id << " disappeared" << llendl; + LL_WARNS() << "Category : Category id = " << cat_id << " disappeared" << LL_ENDL; cat_data.mCallback(); // Keep track of those deleted categories so we can remove them deleted_categories_ids.push_back(cat_id); diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 06e517a861..cadbc16f1e 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -1022,7 +1022,7 @@ void LLLoadHistoryThread::run() { loadHistory(mFileName, mMessages, mLoadParams); int count = mMessages->size(); - llinfos << "mMessages->size(): " << count << llendl; + LL_INFOS() << "mMessages->size(): " << count << LL_ENDL; setFinished(); } } -- cgit v1.2.3 From 3501487bfc9463bf2b732d790819bc2938816287 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 28 Aug 2014 11:25:17 -0700 Subject: Make ImporterDebug facilities work again --- indra/newview/app_settings/settings.xml | 6 +++--- indra/newview/llfloatermodelpreview.cpp | 33 +++++++++++++++------------------ 2 files changed, 18 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8895bba472..b63cba75ec 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7,11 +7,11 @@ Comment Enable debug output to more precisely identify sources of import errors. Warning: the output can slow down import on many machines. Persist - 0 + 1 Type - Integer + Boolean Value - 0 + 1 IMShowTime diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 78a087b050..685048ace7 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1408,7 +1408,7 @@ void LLModelPreview::rebuildUploadData() FindModel(mScene[i], name_to_match, lod_model, transform); - S32 importerDebug = gSavedSettings.getS32("ImporterDebug"); + BOOL importerDebug = gSavedSettings.getBOOL("ImporterDebug"); // Fall back to old method of index-based association if // we could not find a match based on the mesh names @@ -1418,7 +1418,7 @@ void LLModelPreview::rebuildUploadData() if (i == LLModel::LOD_PHYSICS) { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "Assigning collision for " << instance.mLabel << " to match " << lod_model->mLabel << LL_ENDL; } @@ -1426,7 +1426,7 @@ void LLModelPreview::rebuildUploadData() } else { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "Assigning LOD" << i << " for " << instance.mLabel << " to found match " << lod_model->mLabel << LL_ENDL; } @@ -1463,7 +1463,7 @@ void LLModelPreview::rebuildUploadData() { if (i == LLModel::LOD_PHYSICS) { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "Falling back collision for " << instance.mLabel << " to " << lod_model->mLabel << LL_ENDL; } @@ -1471,7 +1471,7 @@ void LLModelPreview::rebuildUploadData() } else { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "Falling back LOD" << i << " for " << instance.mLabel << " to found " << lod_model->mLabel << LL_ENDL; } @@ -1485,7 +1485,7 @@ void LLModelPreview::rebuildUploadData() { //find reference instance for this model if (mBaseModel[idx] == base_model) { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "Falling back to model index " << idx << " for LOD " << i << " of " << instance.mLabel << LL_ENDL; } @@ -1503,14 +1503,14 @@ void LLModelPreview::rebuildUploadData() instance.mLOD[i] = lod_model; if (i == LLModel::LOD_PHYSICS) { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "Indexed fallback to model index " << idx << ": LOD " << i << " named " << lod_model->mLabel << " for collision for " << instance.mLabel << LL_ENDL; } } else { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "Indexed fallback to model index " << idx << " LOD " << i << " named " << lod_model->mLabel << " for LOD " << i << " for " << instance.mLabel << LL_ENDL; } @@ -1518,7 +1518,7 @@ void LLModelPreview::rebuildUploadData() } else { - if (importerDebug > 0) + if (importerDebug) { LL_INFOS() << "List of models for LOD " << i << " did not include index " << idx << LL_ENDL; } @@ -2434,8 +2434,8 @@ void LLModelPreview::updateStatusMessages() std::string instance_name = instance.mLabel; - S32 importerDebug = gSavedSettings.getS32("ImporterDebug"); - if (importerDebug > 0) + BOOL importerDebug = gSavedSettings.getBOOL("ImporterDebug"); + if (importerDebug) { // Useful for debugging generalized complaints below about total submeshes which don't have enough // context to address exactly what needs to be fixed to move towards compliance with the rules. @@ -2444,14 +2444,11 @@ void LLModelPreview::updateStatusMessages() LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Tris: " << cur_tris << LL_ENDL; LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Faces: " << cur_submeshes << LL_ENDL; - if (importerDebug > 1) + LLModel::material_list::iterator mat_iter = lod_model->mMaterialList.begin(); + while (mat_iter != lod_model->mMaterialList.end()) { - LLModel::material_list::iterator mat_iter = lod_model->mMaterialList.begin(); - while (mat_iter != lod_model->mMaterialList.end()) - { - LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Material " << *(mat_iter) << LL_ENDL; - mat_iter++; - } + LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Material " << *(mat_iter) << LL_ENDL; + mat_iter++; } } -- cgit v1.2.3 From da5bd17afd1b78fbd41b247986567204d9470275 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 29 Aug 2014 04:59:14 -0700 Subject: Fix issue with double-addition of LOD/PHYS modifiers in some codepaths --- indra/newview/llfloatermodelpreview.cpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 685048ace7..52f9f5af66 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1397,13 +1397,19 @@ void LLModelPreview::rebuildUploadData() std::string name_to_match = instance.mLabel; llassert(!name_to_match.empty()); + std::string toAdd; switch (i) { - case LLModel::LOD_IMPOSTOR: name_to_match += "_LOD0"; break; - case LLModel::LOD_LOW: name_to_match += "_LOD1"; break; - case LLModel::LOD_MEDIUM: name_to_match += "_LOD2"; break; - case LLModel::LOD_PHYSICS: name_to_match += "_PHYS"; break; - case LLModel::LOD_HIGH: break; + case LLModel::LOD_IMPOSTOR: toAdd = "_LOD0"; break; + case LLModel::LOD_LOW: toAdd = "_LOD1"; break; + case LLModel::LOD_MEDIUM: toAdd = "_LOD2"; break; + case LLModel::LOD_PHYSICS: toAdd = "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } + + if (name_to_match.find(toAdd) == -1) + { + name_to_match += toAdd; } FindModel(mScene[i], name_to_match, lod_model, transform); @@ -1441,13 +1447,19 @@ void LLModelPreview::rebuildUploadData() std::string name_to_match = instance.mLabel; llassert(!name_to_match.empty()); + std::string toAdd; switch (searchLOD) { - case LLModel::LOD_IMPOSTOR: name_to_match += "_LOD0"; break; - case LLModel::LOD_LOW: name_to_match += "_LOD1"; break; - case LLModel::LOD_MEDIUM: name_to_match += "_LOD2"; break; - case LLModel::LOD_PHYSICS: name_to_match += "_PHYS"; break; - case LLModel::LOD_HIGH: break; + case LLModel::LOD_IMPOSTOR: toAdd = "_LOD0"; break; + case LLModel::LOD_LOW: toAdd = "_LOD1"; break; + case LLModel::LOD_MEDIUM: toAdd = "_LOD2"; break; + case LLModel::LOD_PHYSICS: toAdd = "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } + + if (name_to_match.find(toAdd) == -1) + { + name_to_match += toAdd; } // See if we can find an appropriately named model in LOD 'searchLOD' -- cgit v1.2.3 From 297aefd933c1f9646268556eb81132770fd3ce70 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 29 Aug 2014 11:29:37 -0700 Subject: Merge up to 3.7.15 and fix many deprecated logging statements skipped by flickrfolk --- indra/newview/llfloaterflickr.cpp | 6 ++--- indra/newview/llfloatergroupbulkban.cpp | 2 +- indra/newview/llfloatermodelpreview.cpp | 42 ++++++++++++++++----------------- indra/newview/llpanelgroupbulk.cpp | 2 +- indra/newview/llpanelgroupinvite.cpp | 2 +- indra/newview/llpanelgrouproles.cpp | 5 ++-- indra/newview/llsnapshotlivepreview.cpp | 14 +++++------ 7 files changed, 36 insertions(+), 37 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index c4cf9cc8f0..5d44e9619c 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -457,13 +457,13 @@ void LLFlickrPhotoPanel::updateResolution(BOOL do_update) if (width == 0 || height == 0) { // take resolution from current window size - lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl; + LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL; previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); } else { // use the resolution from the selected pre-canned drop-down choice - lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl; + LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL; previewp->setSize(width, height); } @@ -726,7 +726,7 @@ void LLFloaterFlickr::showPhotoPanel() LLTabContainer* parent = dynamic_cast(mFlickrPhotoPanel->getParent()); if (!parent) { - llwarns << "Cannot find panel container" << llendl; + LL_WARNS() << "Cannot find panel container" << LL_ENDL; return; } diff --git a/indra/newview/llfloatergroupbulkban.cpp b/indra/newview/llfloatergroupbulkban.cpp index 54a2283b13..44074047a7 100644 --- a/indra/newview/llfloatergroupbulkban.cpp +++ b/indra/newview/llfloatergroupbulkban.cpp @@ -101,7 +101,7 @@ void LLFloaterGroupBulkBan::showForGroup(const LLUUID& group_id, uuid_vec_t* age // Make sure group_id isn't null if (group_id.isNull()) { - llwarns << "LLFloaterGroupInvite::showForGroup with null group_id!" << llendl; + LL_WARNS() << "LLFloaterGroupInvite::showForGroup with null group_id!" << LL_ENDL; return; } diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 52f9f5af66..6aa41ef768 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1809,7 +1809,7 @@ void LLModelPreview::clearGLODGroup() } } -void LLModelPreview::loadModelCallback(S32 lod) +void LLModelPreview::loadModelCallback(S32 loaded_lod) { assert_main_thread(); @@ -1833,7 +1833,7 @@ void LLModelPreview::loadModelCallback(S32 lod) mModelLoader->loadTextures() ; - if (lod == -1) + if (loaded_lod == -1) { //populate all LoDs from model loader scene mBaseModel.clear(); mBaseScene.clear(); @@ -1849,7 +1849,7 @@ void LLModelPreview::loadModelCallback(S32 lod) mModel[lod].clear(); mVertexBuffer[lod].clear(); - if (mModelLoader->mScene.begin()->second[0].mLOD[lod].notNull()) + if (mModelLoader->mScene.begin()->second[0].mLOD[loaded_lod].notNull()) { //if this LoD exists in the loaded scene //copy scene to current LoD @@ -1921,31 +1921,31 @@ void LLModelPreview::loadModelCallback(S32 lod) } else { //only replace given LoD - mModel[lod] = mModelLoader->mModelList; - mScene[lod] = mModelLoader->mScene; - mVertexBuffer[lod].clear(); + mModel[loaded_lod] = mModelLoader->mModelList; + mScene[loaded_lod] = mModelLoader->mScene; + mVertexBuffer[loaded_lod].clear(); - setPreviewLOD(lod); + setPreviewLOD(loaded_lod); - if (lod == LLModel::LOD_HIGH) + if (loaded_lod == LLModel::LOD_HIGH) { //save a copy of the highest LOD for automatic LOD manipulation if (mBaseModel.empty()) { //first time we've loaded a model, auto-gen LoD mGenLOD = true; } - mBaseModel = mModel[lod]; + mBaseModel = mModel[loaded_lod]; clearGLODGroup(); - mBaseScene = mScene[lod]; + mBaseScene = mScene[loaded_lod]; mVertexBuffer[5].clear(); } - clearIncompatible(lod); + clearIncompatible(loaded_lod); mDirty = true; - if (lod == LLModel::LOD_HIGH) + if (loaded_lod == LLModel::LOD_HIGH) { resetPreviewTarget(); } @@ -3092,23 +3092,23 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights) void LLModelPreview::update() { - if (mDirty) + if (mGenLOD) { - mDirty = false; - mResourceCost = calcResourceCost(); + mGenLOD = false; + genLODs(); refresh(); updateStatusMessages(); } - if (mGenLOD) + if (mDirty) { - mGenLOD = false; - genLODs(); + mDirty = false; + mResourceCost = calcResourceCost(); refresh(); updateStatusMessages(); } - } + //----------------------------------------------------------------------------- // getTranslationForJointOffset() //----------------------------------------------------------------------------- @@ -3933,14 +3933,14 @@ void LLFloaterModelPreview::onReset(void* user_data) LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) user_data; fmp->childDisable("reset_btn"); LLModelPreview* mp = fmp->mModelPreview; - std::string filename = mp->mLODFile[3]; + std::string filename = mp->mLODFile[LLModel::LOD_HIGH]; fmp->resetDisplayOptions(); //reset model preview fmp->initModelPreview(); mp = fmp->mModelPreview; - mp->loadModel(filename,3,true); + mp->loadModel(filename,LLModel::LOD_HIGH,true); } //static diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp index 1eafc5bd64..76792cc6fd 100644 --- a/indra/newview/llpanelgroupbulk.cpp +++ b/indra/newview/llpanelgroupbulk.cpp @@ -387,7 +387,7 @@ void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids) } else { - llwarns << "llPanelGroupBulk: Selected avatar has no name: " << dest->getID() << llendl; + LL_WARNS() << "llPanelGroupBulk: Selected avatar has no name: " << dest->getID() << LL_ENDL; names.push_back("(Unknown)"); } } diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 236ad861a5..e662a05dfc 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -492,7 +492,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) } else { - llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl; + LL_WARNS() << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << LL_ENDL; names.push_back("(Unknown)"); } } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 1d7ba4d741..2e747bc4da 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1961,7 +1961,7 @@ bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if(!gdatap) { - llwarns << "Unable to get group data for group " << mGroupID << llendl; + LL_WARNS() << "Unable to get group data for group " << mGroupID << LL_ENDL; return false; } @@ -2389,8 +2389,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) } else { - llwarns << "Unable to look up role information for role id: " - << role_id << llendl; + LL_WARNS() << "Unable to look up role information for role id: " << role_id << LL_ENDL; } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index f61db77169..bc5993ec76 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -151,7 +151,7 @@ F32 LLSnapshotLivePreview::getImageAspect() void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay) { - lldebugs << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << llendl; + LL_DEBUGS() << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << LL_ENDL; // Update snapshot if requested. if (new_snapshot) @@ -594,7 +594,7 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) } else { - llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + LL_WARNS() << "Couldn't find a path to the following filter : " << getFilter() << LL_ENDL; } } // Scale to a power of 2 so it can be mapped to a texture @@ -642,7 +642,7 @@ LLViewerTexture* LLSnapshotLivePreview::getBigThumbnailImage() } else { - llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + LL_WARNS() << "Couldn't find a path to the following filter : " << getFilter() << LL_ENDL; } } // Scale to a power of 2 so it can be mapped to a texture @@ -695,7 +695,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) // time to produce a snapshot if(!previewp->getSnapshotUpToDate()) { - lldebugs << "producing snapshot" << llendl; + LL_DEBUGS() << "producing snapshot" << LL_ENDL; if (!previewp->mPreviewImage) { previewp->mPreviewImage = new LLImageRaw; @@ -775,7 +775,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview); // only show fullscreen preview when in freeze frame mode previewp->mSnapshotDelayTimer.stop(); previewp->mSnapshotActive = FALSE; - lldebugs << "done creating snapshot" << llendl; + LL_DEBUGS() << "done creating snapshot" << LL_ENDL; } if (!previewp->getThumbnailUpToDate()) @@ -910,13 +910,13 @@ LLPointer LLSnapshotLivePreview::getFormattedImage() } else { - llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + LL_WARNS() << "Couldn't find a path to the following filter : " << getFilter() << LL_ENDL; } } // Create the new formatted image of the appropriate format. LLFloaterSnapshot::ESnapshotFormat format = getSnapshotFormat(); - lldebugs << "Encoding new image of format " << format << llendl; + LL_DEBUGS() << "Encoding new image of format " << format << LL_ENDL; switch (format) { -- cgit v1.2.3 From 6004ad167458914c3b85438b96e81ea8796e368b Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 29 Aug 2014 14:03:09 -0700 Subject: Fix for degen phys tris from falling back to non-hull geo --- indra/newview/llfloatermodelpreview.cpp | 63 +++++++++++++++------------------ 1 file changed, 28 insertions(+), 35 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 6aa41ef768..cfe2ea0307 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1441,31 +1441,35 @@ void LLModelPreview::rebuildUploadData() } else { - int searchLOD = (i > LLModel::LOD_HIGH) ? LLModel::LOD_HIGH : i; - while ((searchLOD <= LLModel::LOD_HIGH) && !lod_model) - { - std::string name_to_match = instance.mLabel; - llassert(!name_to_match.empty()); - std::string toAdd; - switch (searchLOD) + if (i != LLModel::LOD_PHYSICS) + { + int searchLOD = (i > LLModel::LOD_HIGH) ? LLModel::LOD_HIGH : i; + while ((searchLOD <= LLModel::LOD_HIGH) && !lod_model) { - case LLModel::LOD_IMPOSTOR: toAdd = "_LOD0"; break; - case LLModel::LOD_LOW: toAdd = "_LOD1"; break; - case LLModel::LOD_MEDIUM: toAdd = "_LOD2"; break; - case LLModel::LOD_PHYSICS: toAdd = "_PHYS"; break; - case LLModel::LOD_HIGH: break; - } + std::string name_to_match = instance.mLabel; + llassert(!name_to_match.empty()); - if (name_to_match.find(toAdd) == -1) - { - name_to_match += toAdd; - } + std::string toAdd; + switch (searchLOD) + { + case LLModel::LOD_IMPOSTOR: toAdd = "_LOD0"; break; + case LLModel::LOD_LOW: toAdd = "_LOD1"; break; + case LLModel::LOD_MEDIUM: toAdd = "_LOD2"; break; + case LLModel::LOD_PHYSICS: toAdd = "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } - // See if we can find an appropriately named model in LOD 'searchLOD' - // - FindModel(mScene[searchLOD], name_to_match, lod_model, transform); - searchLOD++; + if (name_to_match.find(toAdd) == -1) + { + name_to_match += toAdd; + } + + // See if we can find an appropriately named model in LOD 'searchLOD' + // + FindModel(mScene[searchLOD], name_to_match, lod_model, transform); + searchLOD++; + } } // Fall back to old method of index-based association if @@ -1473,22 +1477,11 @@ void LLModelPreview::rebuildUploadData() // if (lod_model) { - if (i == LLModel::LOD_PHYSICS) - { - if (importerDebug) - { - LL_INFOS() << "Falling back collision for " << instance.mLabel << " to " << lod_model->mLabel << LL_ENDL; - } - instance.mLOD[i] = lod_model; - } - else + if (importerDebug) { - if (importerDebug) - { - LL_INFOS() << "Falling back LOD" << i << " for " << instance.mLabel << " to found " << lod_model->mLabel << LL_ENDL; - } - instance.mLOD[i] = lod_model; + LL_INFOS() << "Falling back LOD" << i << " for " << instance.mLabel << " to found " << lod_model->mLabel << LL_ENDL; } + instance.mLOD[i] = lod_model; } else { -- cgit v1.2.3 From 8f8055996d18b030195b6fc617aef948aae11ba7 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 25 Sep 2014 10:40:40 -0700 Subject: Maint 4470 fix material subset crash in the face of bogus content --- indra/newview/llfloatermodelpreview.cpp | 40 ++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index cfe2ea0307..3aa191cf51 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1533,19 +1533,25 @@ void LLModelPreview::rebuildUploadData() } LLModel* high_lod_model = instance.mLOD[LLModel::LOD_HIGH]; - llassert(high_lod_model); - - for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) - { - int refFaceCnt = 0; - int modelFaceCnt = 0; - llassert(instance.mLOD[i]); - if (instance.mLOD[i] && !instance.mLOD[i]->matchMaterialOrder(high_lod_model, refFaceCnt, modelFaceCnt ) ) - { - setLoadState( LLModelLoader::ERROR_MATERIALS ); - mFMP->childDisable( "calculate_btn" ); - } - } + if (!high_lod_model) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + } + else + { + for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) + { + int refFaceCnt = 0; + int modelFaceCnt = 0; + llassert(instance.mLOD[i]); + if (instance.mLOD[i] && !instance.mLOD[i]->matchMaterialOrder(high_lod_model, refFaceCnt, modelFaceCnt ) ) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + } + } + } instance.mTransform = mat; mUploadData.push_back(instance); } @@ -2402,12 +2408,16 @@ void LLModelPreview::updateStatusMessages() LLModelInstance& instance = *iter; LLModel* model_high_lod = instance.mLOD[LLModel::LOD_HIGH]; - llassert(model_high_lod); + if (!model_high_lod) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + continue; + } for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) { LLModel* lod_model = instance.mLOD[i]; - llassert(lod_model); if (!lod_model) { setLoadState( LLModelLoader::ERROR_MATERIALS ); -- cgit v1.2.3 From 7e4ec481aee7287e98e44767b10968302426c3ff Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 16 Oct 2014 16:38:11 +0300 Subject: MAINT-4405 FIXED ImporterDebug defaults to false now --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6a905eabb1..b33166bfcf 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11,7 +11,7 @@ Type Boolean Value - 1 + 0 IMShowTime -- cgit v1.2.3 From 2c7019a4d32bc78a76440da43385604b70868401 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 22 Oct 2014 11:47:11 +0300 Subject: MAINT-4542 FIXED [loader mods] viewer does not display error when Material is not a subset of reference model. --- indra/newview/llfloatermodelpreview.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 3aa191cf51..9d372766a8 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1550,7 +1550,21 @@ void LLModelPreview::rebuildUploadData() setLoadState( LLModelLoader::ERROR_MATERIALS ); mFMP->childDisable( "calculate_btn" ); } - } + else + { + if (mBaseModel.size() == mModel[i].size()) + { + for (U32 idx = 0; idx < mBaseModel.size(); ++idx) + { + if (mModel[i][idx] && !mModel[i][idx]->matchMaterialOrder(mBaseModel[idx], refFaceCnt, modelFaceCnt ) ) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + } + } + } + } + } } instance.mTransform = mat; mUploadData.push_back(instance); -- cgit v1.2.3 From 74cf2c804eb413237529666a992c85dd3d61a0ca Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 22 Oct 2014 12:11:50 +0300 Subject: MAINT-4487 FIXED [loader mods] triangle limits from .slm are ignored when uploading the model the second time. --- indra/newview/llfloatermodelpreview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 9d372766a8..1e1e96acef 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1733,7 +1733,12 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable { mModelLoader->mTrySLM = false; } - + else + { + //only try to load from slm if viewer is configured to do so and this is the + //initial model load (not an LoD or physics shape) + mModelLoader->mTrySLM = gSavedSettings.getBOOL("MeshImportUseSLM") && mUploadData.empty(); + } mModelLoader->start(); mFMP->childSetTextArg("status", "[STATUS]", mFMP->getString("status_reading_file")); -- cgit v1.2.3 From f9d82b83a894418090fdf4268401c73fb632f2ef Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 29 Oct 2014 17:50:19 +0200 Subject: MAINT-4632 FIXED [loader mods] teamcity linux build fails --- indra/newview/llfloatermodelpreview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 1e1e96acef..c7dd20065c 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1867,7 +1867,7 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) mModel[lod].clear(); mVertexBuffer[lod].clear(); - if (mModelLoader->mScene.begin()->second[0].mLOD[loaded_lod].notNull()) + if (mModelLoader->mScene.begin()->second[0].mLOD[lod].notNull()) { //if this LoD exists in the loaded scene //copy scene to current LoD -- cgit v1.2.3 From 4193f9da922fd42ff6acb811c1bf302decbc6750 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Sat, 20 Dec 2014 02:21:04 +0200 Subject: Fix of build issues after merge --- indra/newview/llfloatermodelpreview.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index efe8b6c266..27c2a1ed42 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1151,9 +1151,6 @@ void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handl } //----------------------------------------------------------------------------- - LLUUID fake_mesh_id; - fake_mesh_id.generate(); - pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), fake_mesh_id, gAgentAvatarp->avString()); // LLModelPreview //----------------------------------------------------------------------------- -- cgit v1.2.3 From e5d6a14f05f857ecbbbd9b464db3ece82d1d099f Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Fri, 9 Jan 2015 20:17:39 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - initial version Works: 1) All new notices shown on "Invites" tab of new floater "NOTIFICATIONS TABBED" in condensed view To be done: 1) Show other types of notices, like transactions and system 2) Separate notices between tabs "Invites", "System", "Transactions" 3) Design full notice view (in addition to condensed view) --- indra/newview/CMakeLists.txt | 2 + indra/newview/llchannelmanager.cpp | 4 +- indra/newview/llchiclet.cpp | 10 +- indra/newview/llchicletbar.cpp | 4 +- indra/newview/llfloaternotificationstabbed.cpp | 377 +++++++++++++++++++++ indra/newview/llfloaternotificationstabbed.h | 143 ++++++++ indra/newview/llsyswellitem.cpp | 80 +++++ indra/newview/llsyswellitem.h | 54 +++ indra/newview/llviewerfloaterreg.cpp | 6 +- .../textures/icons/Icon_Attachment_Large.png | Bin 0 -> 4182 bytes .../textures/icons/Icon_Attachment_Small.png | Bin 0 -> 3774 bytes .../default/textures/icons/Icon_Group_Large.png | Bin 0 -> 12280 bytes .../default/textures/icons/Icon_Group_Small.png | Bin 0 -> 4473 bytes .../textures/icons/Icon_Notification_Condense.png | Bin 0 -> 262 bytes .../textures/icons/Icon_Notification_Expand.png | Bin 0 -> 239 bytes indra/newview/skins/default/textures/textures.xml | 7 + .../xui/en/floater_notifications_tabbed.xml | 134 ++++++++ .../skins/default/xui/en/language_settings.xml | 2 +- indra/newview/skins/default/xui/en/menu_login.xml | 2 +- .../xui/en/panel_notification_tabbed_item.xml | 53 +++ 20 files changed, 870 insertions(+), 8 deletions(-) create mode 100644 indra/newview/llfloaternotificationstabbed.cpp create mode 100644 indra/newview/llfloaternotificationstabbed.h create mode 100644 indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Group_Large.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Group_Small.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png create mode 100644 indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml create mode 100644 indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e8f4144e70..b17811d644 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -262,6 +262,7 @@ set(viewer_SOURCE_FILES llfloatermodeluploadbase.cpp llfloaternamedesc.cpp llfloaternotificationsconsole.cpp + llfloaternotificationstabbed.cpp llfloaterobjectweights.cpp llfloateropenobject.cpp llfloateroutbox.cpp @@ -870,6 +871,7 @@ set(viewer_HEADER_FILES llfloatermodeluploadbase.h llfloaternamedesc.h llfloaternotificationsconsole.h + llfloaternotificationstabbed.h llfloaterobjectweights.h llfloateropenobject.h llfloateroutbox.h diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index b0537a83f1..49a71b0018 100755 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -35,6 +35,7 @@ #include "llviewerwindow.h" #include "llrootview.h" #include "llsyswellwindow.h" +#include "llfloaternotificationstabbed.h" #include "llfloaterreg.h" #include @@ -131,7 +132,8 @@ void LLChannelManager::onLoginCompleted() S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); - mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); + //mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); + mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4)); mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index c0823182c0..6435c934b9 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -35,6 +35,7 @@ #include "llscriptfloater.h" #include "llsingleton.h" #include "llsyswellwindow.h" +#include "llfloaternotificationstabbed.h" static LLDefaultChildRegistry::Register t1("chiclet_panel"); static LLDefaultChildRegistry::Register t2("chiclet_notification"); @@ -165,7 +166,8 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) mNotificationChannel.reset(new ChicletNotificationChannel(this)); // ensure that notification well window exists, to synchronously // handle toast add/delete events. - LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); + //LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); + LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this); } void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) @@ -173,7 +175,8 @@ void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) std::string action = user_data.asString(); if("close all" == action) { - LLNotificationWellWindow::getInstance()->closeAll(); + //LLNotificationWellWindow::getInstance()->closeAll(); + LLFloaterNotificationsTabbed::getInstance()->closeAll(); LLIMWellWindow::getInstance()->closeAll(); } } @@ -224,7 +227,8 @@ bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNo bool displayNotification; if ( (notification->getName() == "ScriptDialog") // special case for scripts // if there is no toast window for the notification, filter it - || (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID())) + //|| (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID())) + || (!LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID())) ) { displayNotification = false; diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index 28e367fbe1..45510d0824 100755 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -31,6 +31,7 @@ #include "lllayoutstack.h" #include "llpaneltopinfobar.h" #include "llsyswellwindow.h" +#include "llfloaternotificationstabbed.h" namespace { @@ -59,7 +60,8 @@ BOOL LLChicletBar::postBuild() mToolbarStack = getChild("toolbar_stack"); mChicletPanel = getChild("chiclet_list"); - showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + //showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + showWellButton("notification_well", !LLFloaterNotificationsTabbed::getInstance()->isWindowEmpty()); LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp new file mode 100644 index 0000000000..09f0a0ed5e --- /dev/null +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -0,0 +1,377 @@ +/** + * @file llfloaternotificationstabbed.cpp + * @brief // TODO + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" // must be first include +#include "llfloaternotificationstabbed.h" + +#include "llchiclet.h" +#include "llchicletbar.h" +#include "llflatlistview.h" +#include "llfloaterreg.h" +#include "llnotificationmanager.h" +#include "llnotificationsutil.h" +#include "llscriptfloater.h" +#include "llspeakers.h" +#include "lltoastpanel.h" +#include "lltoastnotifypanel.h" + +//--------------------------------------------------------------------------------- +LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), + mChannel(NULL), + mMessageList(NULL), + mSysWellChiclet(NULL), + NOTIFICATION_TABBED_ANCHOR_NAME("notification_well_panel"), + IM_WELL_ANCHOR_NAME("im_well_panel"), + mIsReshapedByUser(false) + +{ + setOverlapsScreenChannel(true); + mNotificationUpdates.reset(new NotificationTabbedChannel(this)); +} + +//--------------------------------------------------------------------------------- +BOOL LLFloaterNotificationsTabbed::postBuild() +{ + mMessageList = getChild("notification_list"); + + // get a corresponding channel + initChannel(); + BOOL rv = LLTransientDockableFloater::postBuild(); + + //LLNotificationWellWindow::postBuild() + //-------------------------- + setTitle(getString("title_notification_tabbed_window")); + return rv; +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setMinimized(BOOL minimize) +{ + LLTransientDockableFloater::setMinimized(minimize); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::handleReshape(const LLRect& rect, bool by_user) +{ + mIsReshapedByUser |= by_user; // mark floater that it is reshaped by user + LLTransientDockableFloater::handleReshape(rect, by_user); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onStartUpToastClick(S32 x, S32 y, MASK mask) +{ + // just set floater visible. Screen channels will be cleared. + setVisible(TRUE); +} + +void LLFloaterNotificationsTabbed::setSysWellChiclet(LLSysWellChiclet* chiclet) +{ + mSysWellChiclet = chiclet; + if(NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } +} + +//--------------------------------------------------------------------------------- +LLFloaterNotificationsTabbed::~LLFloaterNotificationsTabbed() +{ +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id) +{ + if(mMessageList->removeItemByValue(id)) + { + if (NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } + reshapeWindow(); + } + else + { + LL_WARNS() << "Unable to remove notification from the list, ID: " << id + << LL_ENDL; + } + + // hide chiclet window if there are no items left + if(isWindowEmpty()) + { + setVisible(FALSE); + } +} + +//--------------------------------------------------------------------------------- +LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id) +{ + return mMessageList->getItemByValue(id); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::initChannel() +{ + LLNotificationsUI::LLScreenChannelBase* channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID( + LLUUID(gSavedSettings.getString("NotificationChannelUUID"))); + mChannel = dynamic_cast(channel); + if(NULL == mChannel) + { + LL_WARNS() << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << LL_ENDL; + } + + //LLSysWellWindow::initChannel(); + //--------------------------------------------------------------------------------- + if(mChannel) + { + mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setVisible(BOOL visible) +{ + //LLNotificationWellWindow::setVisible + //-------------------------- + if (visible) + { + // when Notification channel is cleared, storable toasts will be added into the list. + clearScreenChannels(); + } + //-------------------------- + if (visible) + { + if (NULL == getDockControl() && getDockTongue().notNull()) + { + setDockControl(new LLDockControl( + LLChicletBar::getInstance()->getChild(getAnchorViewName()), this, + getDockTongue(), LLDockControl::BOTTOM)); + } + } + + // do not show empty window + if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; + + LLTransientDockableFloater::setVisible(visible); + + // update notification channel state + initChannel(); // make sure the channel still exists + if(mChannel) + { + mChannel->updateShowToastsState(); + mChannel->redrawToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setDocked(bool docked, bool pop_on_undock) +{ + LLTransientDockableFloater::setDocked(docked, pop_on_undock); + + // update notification channel state + if(mChannel) + { + mChannel->updateShowToastsState(); + mChannel->redrawToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::reshapeWindow() +{ + // save difference between floater height and the list height to take it into account while calculating new window height + // it includes height from floater top to list top and from floater bottom and list bottom + static S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); + + if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. + { + S32 notif_list_height = mMessageList->getItemsRect().getHeight() + 2 * mMessageList->getBorderWidth(); + + LLRect curRect = getRect(); + + S32 new_window_height = notif_list_height + parent_list_delta_height; + + if (new_window_height > MAX_WINDOW_HEIGHT) + { + new_window_height = MAX_WINDOW_HEIGHT; + } + S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth(); + + curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height); + reshape(curRect.getWidth(), curRect.getHeight(), TRUE); + setRect(curRect); + } + + // update notification channel state + // update on a window reshape is important only when a window is visible and docked + if(mChannel && getVisible() && isDocked()) + { + mChannel->updateShowToastsState(); + } +} + +//--------------------------------------------------------------------------------- +bool LLFloaterNotificationsTabbed::isWindowEmpty() +{ + return mMessageList->size() == 0; +} + +LLFloaterNotificationsTabbed::NotificationTabbedChannel::NotificationTabbedChannel(LLFloaterNotificationsTabbed* notifications_tabbed_window) + : LLNotificationChannel(LLNotificationChannel::Params().name(notifications_tabbed_window->getPathname())), + mNotificationsTabbedWindow(notifications_tabbed_window) +{ + connectToChannel("Notifications"); + connectToChannel("Group Notifications"); + connectToChannel("Offer"); +} + +/* +LLFloaterNotificationsTabbed::LLNotificationWellWindow(const LLSD& key) + : LLSysWellWindow(key) +{ + mNotificationUpdates.reset(new NotificationTabbedChannel(this)); +} +*/ + +// static +LLFloaterNotificationsTabbed* LLFloaterNotificationsTabbed::getInstance(const LLSD& key /*= LLSD()*/) +{ + return LLFloaterReg::getTypedInstance("notification_well_window", key); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::addItem(LLNotificationTabbedItem::Params p) +{ + LLSD value = p.notification_id; + // do not add clones + if( mMessageList->getItemByValue(value)) + return; + + LLNotificationTabbedItem* new_item = new LLNotificationTabbedItem(p); + if (mMessageList->addItem(new_item, value, ADD_TOP)) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + reshapeWindow(); + new_item->setOnItemCloseCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClose, this, _1)); + new_item->setOnItemClickCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClick, this, _1)); + } + else + { + LL_WARNS() << "Unable to add Notification into the list, notification ID: " << p.notification_id + << ", title: " << p.title + << LL_ENDL; + + new_item->die(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::closeAll() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector items; + mMessageList->getItems(items); + for (std::vector::iterator + iter = items.begin(), + iter_end = items.end(); + iter != iter_end; ++iter) + { + LLNotificationTabbedItem* sys_well_item = dynamic_cast(*iter); + if (sys_well_item) + onItemClose(sys_well_item); + } +} + +////////////////////////////////////////////////////////////////////////// +// PRIVATE METHODS +//void LLFloaterNotificationsTabbed::initChannel() +//{ +// LLFloaterNotificationsTabbed::initChannel(); +// if(mChannel) +// { +// mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); +// } +//} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::clearScreenChannels() +{ + // 1 - remove StartUp toast and channel if present + if(!LLNotificationsUI::LLScreenChannel::getStartUpToastShown()) + { + LLNotificationsUI::LLChannelManager::getInstance()->onStartUpToastClose(); + } + + // 2 - remove toasts in Notification channel + if(mChannel) + { + mChannel->removeAndStoreAllStorableToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) +{ + LLNotificationTabbedItem::Params p; + p.notification_id = id; + p.title = static_cast(info_panel)->getTitle(); + LLNotificationsUI::LLToast* toast = mChannel->getToastByNotificationID(id); + LLSD payload = toast->getNotification()->getPayload(); + LLDate time_stamp = toast->getNotification()->getDate(); + p.group_id = payload["group_id"]; + p.sender = payload["name"]; + p.time_stamp = time_stamp; + addItem(p); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onItemClick(LLNotificationTabbedItem* item) +{ + LLUUID id = item->getID(); + LLFloaterReg::showInstance("inspect_toast", id); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onItemClose(LLNotificationTabbedItem* item) +{ + LLUUID id = item->getID(); + + if(mChannel) + { + // removeItemByID() is invoked from killToastByNotificationID() and item will removed; + mChannel->killToastByNotificationID(id); + } + else + { + // removeItemByID() should be called one time for each item to remove it from notification well + removeItemByID(id); + } + +} + +void LLFloaterNotificationsTabbed::onAdd( LLNotificationPtr notify ) +{ + removeItemByID(notify->getID()); +} diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h new file mode 100644 index 0000000000..1fd60826cb --- /dev/null +++ b/indra/newview/llfloaternotificationstabbed.h @@ -0,0 +1,143 @@ +/** + * @file llfloaternotificationstabbed.h + * @brief // TODO + * + * $LicenseInfo:firstyear=2003&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$ + */ + +#ifndef LL_FLOATERNOTIFICATIONSTABBED_H +#define LL_FLOATERNOTIFICATIONSTABBED_H + +#include "llimview.h" +#include "llnotifications.h" +#include "llscreenchannel.h" +#include "llsyswellitem.h" +#include "lltransientdockablefloater.h" + +class LLAvatarName; +class LLChiclet; +class LLFlatListView; +class LLIMChiclet; +class LLScriptChiclet; +class LLSysWellChiclet; + +class LLFloaterNotificationsTabbed : public LLTransientDockableFloater +{ +public: + LOG_CLASS(LLFloaterNotificationsTabbed); + + LLFloaterNotificationsTabbed(const LLSD& key); + virtual ~LLFloaterNotificationsTabbed(); + BOOL postBuild(); + + // other interface functions + // check is window empty + bool isWindowEmpty(); + + // Operating with items + void removeItemByID(const LLUUID& id); + LLPanel * findItemByID(const LLUUID& id); + + // Operating with outfit + virtual void setVisible(BOOL visible); + void adjustWindowPosition();//not used - ? + + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + // override LLFloater's minimization according to EXT-1216 + /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); + + void onStartUpToastClick(S32 x, S32 y, MASK mask); + + void setSysWellChiclet(LLSysWellChiclet* chiclet); + + // size constants for the window and for its elements + static const S32 MAX_WINDOW_HEIGHT = 200; + static const S32 MIN_WINDOW_WIDTH = 318; + +protected: + // init Window's channel + virtual void initChannel(); + + const std::string NOTIFICATION_TABBED_ANCHOR_NAME; + const std::string IM_WELL_ANCHOR_NAME; + //virtual const std::string& getAnchorViewName() = 0; + + void reshapeWindow(); + + // pointer to a corresponding channel's instance + LLNotificationsUI::LLScreenChannel* mChannel; + LLFlatListView* mMessageList; + + /** + * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 + */ + LLSysWellChiclet* mSysWellChiclet; + + bool mIsReshapedByUser; + +public: + static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); + + /*virtual*/ //BOOL postBuild(); + /*virtual*/ //void setVisible(BOOL visible); + /*virtual*/ void onAdd(LLNotificationPtr notify); + // Operating with items + void addItem(LLNotificationTabbedItem::Params p); + + // Closes all notifications and removes them from the Notification Well + void closeAll(); + +protected: + struct NotificationTabbedChannel : public LLNotificationChannel + { + NotificationTabbedChannel(LLFloaterNotificationsTabbed*); + void onDelete(LLNotificationPtr notify) + { + mNotificationsTabbedWindow->removeItemByID(notify->getID()); + } + + LLFloaterNotificationsTabbed* mNotificationsTabbedWindow; + }; + + LLNotificationChannelPtr mNotificationUpdates; + virtual const std::string& getAnchorViewName() { return NOTIFICATION_TABBED_ANCHOR_NAME; } + +private: + // init Window's channel + // void initChannel(); + void clearScreenChannels(); + + void onStoreToast(LLPanel* info_panel, LLUUID id); + + // Handlers + void onItemClick(LLNotificationTabbedItem* item); + void onItemClose(LLNotificationTabbedItem* item); + + // ID of a toast loaded by user (by clicking notification well item) + LLUUID mLoadedToastId; +}; + +#endif // LL_FLOATERNOTIFICATIONSTABBED_H + + + diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp index 057d80457c..bc8333d5fc 100755 --- a/indra/newview/llsyswellitem.cpp +++ b/indra/newview/llsyswellitem.cpp @@ -31,6 +31,7 @@ #include "llwindow.h" #include "v4color.h" +#include "lltrans.h" #include "lluicolortable.h" //--------------------------------------------------------------------------------- @@ -90,4 +91,83 @@ void LLSysWellItem::onMouseLeave(S32 x, S32 y, MASK mask) //--------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------- +LLNotificationTabbedItem::LLNotificationTabbedItem(const Params& p) : LLPanel(p), + mTitle(NULL), + mSender(NULL), + mCloseBtn(NULL) +{ + buildFromFile( "panel_notification_tabbed_item.xml"); + + mTitle = getChild("GroupName_NoticeTitle"); + mSender = getChild("Sender_Resident"); + mTimeBox = getChild("Time_Box"); + mGroupIcon = getChild("group_icon_small"); + mCloseBtn = getChild("close_btn"); + + mTitle->setValue(p.title); + mSender->setValue("Sender: " + p.sender); + mTimeBox->setValue(buildNotificationDate(p.time_stamp)); + mGroupIcon->setValue(p.group_id); + + mCloseBtn->setClickedCallback(boost::bind(&LLNotificationTabbedItem::onClickCloseBtn,this)); + + mID = p.notification_id; +} + +//--------------------------------------------------------------------------------- +LLNotificationTabbedItem::~LLNotificationTabbedItem() +{ +} +//--------------------------------------------------------------------------------- +//static +std::string LLNotificationTabbedItem::buildNotificationDate(const LLDate& time_stamp) +{ + std::string timeStr = "[" + LLTrans::getString("LTimeMthNum") + "]/[" + +LLTrans::getString("LTimeDay")+"]/[" + +LLTrans::getString("LTimeYear")+"] [" + +LLTrans::getString("LTimeHour")+"]:[" + +LLTrans::getString("LTimeMin")+"]"; + + LLSD substitution; + substitution["datetime"] = time_stamp; + LLStringUtil::format(timeStr, substitution); + return timeStr; +} + +//--------------------------------------------------------------------------------- +void LLNotificationTabbedItem::setTitle( std::string title ) +{ + mTitle->setValue(title); +} + +//--------------------------------------------------------------------------------- +void LLNotificationTabbedItem::onClickCloseBtn() +{ + mOnItemClose(this); +} + +//--------------------------------------------------------------------------------- +BOOL LLNotificationTabbedItem::handleMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL res = LLPanel::handleMouseDown(x, y, mask); + if(!mCloseBtn->getRect().pointInRect(x, y)) + //if(!mCloseBtn->getRect().pointInRect(x, y)) + //if(!mCloseBtn->getLocalRect().pointInRect(x, y)) + mOnItemClick(this); + + return res; +} + +//--------------------------------------------------------------------------------- +void LLNotificationTabbedItem::onMouseEnter(S32 x, S32 y, MASK mask) +{ + //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemSelected" )); +} + +//--------------------------------------------------------------------------------- +void LLNotificationTabbedItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); +} diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h index d961708a01..4379b8dc22 100755 --- a/indra/newview/llsyswellitem.h +++ b/indra/newview/llsyswellitem.h @@ -32,6 +32,8 @@ #include "llbutton.h" #include "lliconctrl.h" +#include "llgroupmgr.h" + #include class LLSysWellItem : public LLPanel @@ -76,6 +78,58 @@ private: LLUUID mID; }; +class LLNotificationTabbedItem : public LLPanel +{ +public: + struct Params : public LLInitParam::Block + { + LLUUID notification_id; + LLUUID group_id; + std::string title; + std::string sender; + LLDate time_stamp; + Params() {}; + }; + + + LLNotificationTabbedItem(const Params& p); + virtual ~LLNotificationTabbedItem(); + + // title + void setTitle( std::string title ); + void setGroupID(const LLUUID& group_id); + void setGroupIconID(const LLUUID& group_icon_id); + void setGroupName(const std::string& group_name); + + // get item's ID + LLUUID getID() { return mID; } + + // handlers + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual void onMouseEnter(S32 x, S32 y, MASK mask); + virtual void onMouseLeave(S32 x, S32 y, MASK mask); + + //callbacks + typedef boost::function item_callback_t; + typedef boost::signals2::signal item_signal_t; + item_signal_t mOnItemClose; + item_signal_t mOnItemClick; + boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } + boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } + +private: + static std::string buildNotificationDate(const LLDate&); + void onClickCloseBtn(); + + LLTextBox* mTitle; + LLTextBox* mSender; + LLTextBox* mTimeBox; + LLIconCtrl* mGroupIcon; + LLButton* mCloseBtn; + LLUUID mID; + LLUUID mGroupID; +}; + #endif // LL_LLSYSWELLITEM_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e19fe9ca75..d20b8e342a 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -85,6 +85,7 @@ #include "llfloatermodelpreview.h" #include "llfloaternamedesc.h" #include "llfloaternotificationsconsole.h" +#include "llfloaternotificationstabbed.h" #include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloateroutbox.h" @@ -255,7 +256,10 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + + LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + //LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + //LLFloaterReg::add("notifications_tabbed", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png new file mode 100644 index 0000000000..0732a33d93 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png new file mode 100644 index 0000000000..8124554902 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Group_Large.png b/indra/newview/skins/default/textures/icons/Icon_Group_Large.png new file mode 100644 index 0000000000..6dc0cbda0b Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Group_Large.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Group_Small.png b/indra/newview/skins/default/textures/icons/Icon_Group_Small.png new file mode 100644 index 0000000000..ef2b521a1f Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Group_Small.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png b/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png new file mode 100644 index 0000000000..4d245eb57a Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png b/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png new file mode 100644 index 0000000000..186822da43 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 1f10d966d5..0744962064 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -795,4 +795,11 @@ with the same filename but different name + + + + + + + diff --git a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml new file mode 100644 index 0000000000..b627707056 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -0,0 +1,134 @@ + + + + NOTIFICATIONS TABBED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml index 51779e4bfd..3ad0f04469 100755 --- a/indra/newview/skins/default/xui/en/language_settings.xml +++ b/indra/newview/skins/default/xui/en/language_settings.xml @@ -50,7 +50,7 @@ second,datetime,local hour,datetime,local min,datetime,local - year,datetime,local + year,datetime,local weekday,datetime,utc day,datetime,utc diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index e91eea04d1..0d9612990d 100755 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -303,7 +303,7 @@ + + + + + + + + + + + + + Group Name:Notice Title + + + + + + Sender.Resident + + + + + + + + - + - diff --git a/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml b/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml index bc4f90858b..603a3312e0 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml @@ -2,8 +2,8 @@ + + Sender: "[SENDER_RESIDENT]" + @@ -24,16 +28,16 @@ - - Group Name:Notice Title + Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle - + - Sender.Resident + Sender:Resident diff --git a/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml new file mode 100644 index 0000000000..150225af27 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file -- cgit v1.2.3 From 5f96f3bba20fcacbe7115b7d27bc50cad56850d4 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Wed, 4 Feb 2015 15:48:22 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - fixed Mac build --- indra/newview/llnotificationlistitem.cpp | 2 +- indra/newview/llnotificationlistitem.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index a55c7b8541..4fdd6b1a54 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -179,7 +179,7 @@ LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) if (!p.sender.empty()) { LLStringUtil::format_map_t string_args; - string_args["[SENDER_RESIDENT]"] = llformat("%s", p.sender); + string_args["[SENDER_RESIDENT]"] = llformat("%s", p.sender.c_str()); std::string sender_text = getString("sender_resident_text", string_args); mSenderBox->setValue(sender_text); mSenderBox->setVisible(TRUE); diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index bc77d873a4..89de0487be 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -60,8 +60,8 @@ public: // get item's ID LLUUID getID() { return mID; } - std::string getTitle() { return mTitle; } - std::string getNotificationName() { return mNotificationName; } + std::string& getTitle() { return mTitle; } + std::string& getNotificationName() { return mNotificationName; } // handlers virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); -- cgit v1.2.3 From cf5a5a0e9727cbcc8ea9dd8d0ea25d5ba03c93e7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 4 Feb 2015 19:25:55 +0200 Subject: MAINT-4806 sub-models fix --- indra/newview/llfloatermodelpreview.cpp | 88 +++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 27c2a1ed42..a672d05760 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1554,20 +1554,6 @@ void LLModelPreview::rebuildUploadData() setLoadState( LLModelLoader::ERROR_MATERIALS ); mFMP->childDisable( "calculate_btn" ); } - else - { - if (mBaseModel.size() == mModel[i].size()) - { - for (U32 idx = 0; idx < mBaseModel.size(); ++idx) - { - if (mModel[i][idx] && !mModel[i][idx]->matchMaterialOrder(mBaseModel[idx], refFaceCnt, modelFaceCnt ) ) - { - setLoadState( LLModelLoader::ERROR_MATERIALS ); - mFMP->childDisable( "calculate_btn" ); - } - } - } - } } } instance.mTransform = mat; @@ -1575,6 +1561,79 @@ void LLModelPreview::rebuildUploadData() } } + // Since sub-models affect verification, we need to know number of original/primary models + U32 base_primary_count = 0; + U32 base_total_count = mBaseModel.size(); + for (U32 base_ind = 0; base_ind < base_total_count; ++base_ind) + { + if (mBaseModel[base_ind] && !mBaseModel[base_ind]->mSubmodelID) + { + base_primary_count++; + } + } + + //reorder materials to match mBaseModel + for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) + { + int refFaceCnt = 0; + int modelFaceCnt = 0; + + U32 model_primary_count = 0; + U32 model_total_count = mModel[i].size(); + for (U32 model_ind = 0; model_ind < model_total_count; ++model_ind) + { + if (mModel[i][model_ind] && !mModel[i][model_ind]->mSubmodelID) + { + model_primary_count++; + } + } + + // Since we don't have a reliable method to check sub-models, check only original/primary models + // + // Note: we can matchMaterialOrder() for sub-models if they have same id and same label, + // but since sub-models are leftovers from original models with random material order, we + // can't warranty that checking sub-models is valid. + // Original model retains full material list, so we should get ERROR_MATERIALS even + // if we don't check sub-models. See LLDAELoader::loadModelsFromDomMesh() + if (base_primary_count == model_primary_count) + { + U32 model_ind = 0; + U32 base_ind = 0; + U32 models_matched = 0; + + while (models_matched < base_primary_count) + { + // filter out sub-models + while (mModel[i][model_ind] + && mModel[i][model_ind]->mSubmodelID + && model_ind < model_primary_count) + { + model_ind++; + } + while (mBaseModel[base_ind] + && mBaseModel[base_ind]->mSubmodelID + && base_ind < base_total_count) + { + base_ind++; + } + if (model_ind >= model_total_count || base_ind >= base_total_count) + { + // Safeguard, shouldn't happen unless something is wrong with models in the list + LL_WARNS() << "Materials of some models were not verified and reordered" << LL_ENDL; + break; + } + if (mModel[i][model_ind] && !mModel[i][model_ind]->matchMaterialOrder(mBaseModel[base_ind], refFaceCnt, modelFaceCnt ) ) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + } + models_matched++; + model_ind++; + base_ind++; + } + } + } + F32 max_import_scale = (DEFAULT_MAX_PRIM_SCALE-0.1f)/max_scale; F32 max_axis = llmax(mPreviewScale.mV[0], mPreviewScale.mV[1]); @@ -1901,6 +1960,7 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) } mModel[lod][idx] = list_iter->mModel; + mModel[lod][idx]->mLabel = list_iter->mLabel; if (!list_iter->mModel->mSkinWeights.empty()) { skin_weights = true; -- cgit v1.2.3 From 5a455a53e6454afa1127c89054658d8eb833b9e3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 10 Feb 2015 19:48:45 +0200 Subject: MAINT-4813 FIXED "failed to upload: MAV_BLOCK_MISSING" appears when try to upload a large mesh --- indra/newview/llfloatermodelpreview.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index a672d05760..823e0879d1 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1960,7 +1960,6 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) } mModel[lod][idx] = list_iter->mModel; - mModel[lod][idx]->mLabel = list_iter->mLabel; if (!list_iter->mModel->mSkinWeights.empty()) { skin_weights = true; -- cgit v1.2.3 From 9d8bbe16007ef9292a04856f55f71016cf1220bf Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Tue, 10 Feb 2015 19:56:32 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - introduced different design for System, Incoming/Outcoming Transactions, Invites --- indra/newview/llnotificationlistitem.cpp | 120 ++++++++++++++------- indra/newview/llnotificationlistitem.h | 14 ++- .../textures/icons/Incoming_Transaction_Small.png | Bin 0 -> 1666 bytes .../textures/icons/Outcoming_Transaction_Small.png | Bin 0 -> 1322 bytes .../textures/icons/System_Notification_Small.png | Bin 0 -> 661 bytes indra/newview/skins/default/textures/textures.xml | 3 + .../xui/en/panel_notification_list_item.xml | 60 +++++++++++ .../xui/en/panel_notification_tabbed_item.xml | 57 ---------- 8 files changed, 155 insertions(+), 99 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png create mode 100644 indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png create mode 100644 indra/newview/skins/default/textures/icons/System_Notification_Small.png create mode 100644 indra/newview/skins/default/xui/en/panel_notification_list_item.xml delete mode 100644 indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml (limited to 'indra/newview') diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 4fdd6b1a54..7f0e3460b1 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -35,25 +35,26 @@ #include "lluicolortable.h" LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), + mParams(p), mTitleBox(NULL), - mCloseBtn(NULL), - mSenderBox(NULL) + mCloseBtn(NULL) { - buildFromFile( "panel_notification_tabbed_item.xml"); + mID = p.notification_id; + mNotificationName = p.notification_name; +} - mTitleBox = getChild("GroupName_NoticeTitle"); - mTimeBox = getChild("Time_Box"); +BOOL LLNotificationListItem::postBuild() +{ + BOOL rv = LLPanel::postBuild(); + mTitleBox = getChild("notification_title"); + mTimeBox = getChild("notification_time"); mCloseBtn = getChild("close_btn"); - mSenderBox = getChild("Sender_Resident"); - mTitleBox->setValue(p.title); - mTimeBox->setValue(buildNotificationDate(p.time_stamp)); - mSenderBox->setVisible(FALSE); + mTitleBox->setValue(mParams.title); + mTimeBox->setValue(buildNotificationDate(mParams.time_stamp)); mCloseBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCloseBtn,this)); - - mID = p.notification_id; - mNotificationName = p.notification_name; + return rv; } LLNotificationListItem::~LLNotificationListItem() @@ -151,46 +152,87 @@ std::set LLTransactionNotificationListItem::getTypes() std::set LLSystemNotificationListItem::getTypes() { std::set types; - types.insert("AddPrimitiveFailure"); - types.insert("AddToNavMeshNoCopy"); - types.insert("AssetServerTimeoutObjReturn"); - types.insert("AvatarEjected"); - types.insert("AutoUnmuteByIM"); - types.insert("AutoUnmuteByInventory"); - types.insert("AutoUnmuteByMoney"); - types.insert("BuyInventoryFailedNoMoney"); - types.insert("DeactivatedGesturesTrigger"); - types.insert("DeedFailedNoPermToDeedForGroup"); - types.insert("WhyAreYouTryingToWearShrubbery"); - types.insert("YouDiedAndGotTPHome"); - types.insert("YouFrozeAvatar"); - - types.insert("OfferCallingCard"); - //ExpireExplanation + //types.insert("AddPrimitiveFailure"); + //types.insert("AddToNavMeshNoCopy"); + //types.insert("AssetServerTimeoutObjReturn"); + //types.insert("AvatarEjected"); + //types.insert("AutoUnmuteByIM"); + //types.insert("AutoUnmuteByInventory"); + //types.insert("AutoUnmuteByMoney"); + //types.insert("BuyInventoryFailedNoMoney"); + //types.insert("DeactivatedGesturesTrigger"); + //types.insert("DeedFailedNoPermToDeedForGroup"); + //types.insert("WhyAreYouTryingToWearShrubbery"); + //types.insert("YouDiedAndGotTPHome"); + //types.insert("YouFrozeAvatar"); + //types.insert("OfferCallingCard"); return types; } LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) - : LLNotificationListItem(p) + : LLNotificationListItem(p), + mSenderBox(NULL) { - mGroupIcon = getChild("group_icon_small"); - mGroupIcon->setValue(p.group_id); - mGroupID = p.group_id; - if (!p.sender.empty()) + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLInviteNotificationListItem::postBuild() +{ + BOOL rv = LLNotificationListItem::postBuild(); + mGroupIcon = getChild("group_icon"); + mGroupIcon->setValue(mParams.group_id); + mGroupIcon->setVisible(TRUE); + mGroupID = mParams.group_id; + mSenderBox = getChild("sender_resident"); + if (!mParams.sender.empty()) { LLStringUtil::format_map_t string_args; - string_args["[SENDER_RESIDENT]"] = llformat("%s", p.sender.c_str()); + string_args["[SENDER_RESIDENT]"] = llformat("%s", mParams.sender.c_str()); std::string sender_text = getString("sender_resident_text", string_args); mSenderBox->setValue(sender_text); mSenderBox->setVisible(TRUE); - } + } else { + mSenderBox->setVisible(FALSE); + } + return rv; } LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) - : LLNotificationListItem(p) -{} + : LLNotificationListItem(p), + mTransactionIcon(NULL) +{ + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLTransactionNotificationListItem::postBuild() +{ + BOOL rv = LLNotificationListItem::postBuild(); + if (mParams.notification_name == "PaymentReceived") + { + mTransactionIcon = getChild("incoming_transaction_icon"); + } + else if (mParams.notification_name == "PaymentSent") + { + mTransactionIcon = getChild("outcoming_transaction_icon"); + } + if(mTransactionIcon) + mTransactionIcon->setVisible(TRUE); + return rv; +} LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p) - :LLNotificationListItem(p) -{} + : LLNotificationListItem(p), + mSystemNotificationIcon(NULL) +{ + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLSystemNotificationListItem::postBuild() +{ + BOOL rv = LLNotificationListItem::postBuild(); + mSystemNotificationIcon = getChild("system_notification_icon"); + if (mSystemNotificationIcon) + mSystemNotificationIcon->setVisible(TRUE); + return rv; +} diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 89de0487be..da6d792fb8 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -30,7 +30,7 @@ #include "llpanel.h" #include "lltextbox.h" #include "llbutton.h" -#include "lliconctrl.h" +#include "llgroupiconctrl.h" #include "llgroupmgr.h" @@ -76,6 +76,7 @@ public: boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } + virtual BOOL postBuild(); protected: LLNotificationListItem(const Params& p); virtual ~LLNotificationListItem(); @@ -83,13 +84,13 @@ protected: static std::string buildNotificationDate(const LLDate&); void onClickCloseBtn(); + Params mParams; LLTextBox* mTitleBox; LLTextBox* mTimeBox; LLButton* mCloseBtn; LLUUID mID; std::string mTitle; std::string mNotificationName; - LLTextBox* mSenderBox; }; class LLInviteNotificationListItem : public LLNotificationListItem @@ -99,36 +100,43 @@ public: //void setGroupIconID(const LLUUID& group_icon_id); //void setGroupName(const std::string& group_name); static std::set getTypes(); + + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLInviteNotificationListItem(const Params& p); LLInviteNotificationListItem(const LLInviteNotificationListItem &); LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); - LLIconCtrl* mGroupIcon; + LLGroupIconCtrl* mGroupIcon; LLUUID mGroupID; + LLTextBox* mSenderBox; }; class LLTransactionNotificationListItem : public LLNotificationListItem { public: static std::set getTypes(); + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLTransactionNotificationListItem(const Params& p); LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); + LLIconCtrl* mTransactionIcon; }; class LLSystemNotificationListItem : public LLNotificationListItem { public: static std::set getTypes(); + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLSystemNotificationListItem(const Params& p); LLSystemNotificationListItem(const LLSystemNotificationListItem &); LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); + LLIconCtrl* mSystemNotificationIcon; }; #endif // LL_LLNOTIFICATIONLISTITEM_H diff --git a/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png new file mode 100644 index 0000000000..8b39770c63 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png differ diff --git a/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png new file mode 100644 index 0000000000..96c6150f3b Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png differ diff --git a/indra/newview/skins/default/textures/icons/System_Notification_Small.png b/indra/newview/skins/default/textures/icons/System_Notification_Small.png new file mode 100644 index 0000000000..027a8446d8 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/System_Notification_Small.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 0744962064..66fe119848 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -801,5 +801,8 @@ with the same filename but different name + + + diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml new file mode 100644 index 0000000000..9bd9742a20 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -0,0 +1,60 @@ + + + + + Sender: "[SENDER_RESIDENT]" + + + + + + + + + + + + + + + Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle + + + + + + Sender:Resident + + + + + + + + @@ -118,48 +118,4 @@ - - - - diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml index ecedb27438..2c5176cf01 100755 --- a/indra/newview/skins/default/xui/en/floater_sys_well.xml +++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml @@ -23,10 +23,6 @@ name="title_im_well_window"> CONVERSATIONS - - NOTIFICATIONS - second,datetime,local hour,datetime,local min,datetime,local - year,datetime,local + year,datetime,local weekday,datetime,utc day,datetime,utc diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 0d9612990d..e91eea04d1 100755 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -303,7 +303,7 @@ - - - + + - Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle - - - Sender:Resident + + Sender: "Resident R e s i d e n t R e s i d e n t" @@ -76,19 +74,17 @@ - - - - - - + + + + - Notice Title Notice Title N o t i c e T i t l e + Notice Title Notice Title N o t i c e T i t l e N o t i c e T i t l e @@ -96,27 +92,20 @@ - Sender: "Resident R e s i d e n t R e s i d e n t" - Notice text goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla . - - - Attachment goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla . - - -- cgit v1.2.3 From dfd19ed84322c7129509756e1c7fcc63a55f459e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 23 Mar 2015 11:23:28 +0200 Subject: MAINT-4998 FIXED Ignore loadedCallback if Modelpreview floater is already closed. --- indra/newview/llfloatermodelpreview.cpp | 11 ++++++++++- indra/newview/llfloatermodelpreview.h | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b2f237e71f..e9f98a5c5f 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -93,6 +93,8 @@ S32 LLFloaterModelPreview::sUploadAmount = 10; LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL; +bool LLModelPreview::sIgnoreLoadedCallback = false; + const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; @@ -788,9 +790,16 @@ BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks) /*virtual*/ void LLFloaterModelPreview::onOpen(const LLSD& key) { + LLModelPreview::sIgnoreLoadedCallback = false; requestAgentUploadPermissions(); } +/*virtual*/ +void LLFloaterModelPreview::onClose(bool app_quitting) +{ + LLModelPreview::sIgnoreLoadedCallback = true; +} + //static void LLFloaterModelPreview::onPhysicsParamCommit(LLUICtrl* ctrl, void* data) { @@ -3193,7 +3202,7 @@ void LLModelPreview::loadedCallback( void* opaque) { LLModelPreview* pPreview = static_cast< LLModelPreview* >(opaque); - if (pPreview) + if (pPreview && !LLModelPreview::sIgnoreLoadedCallback) { pPreview->loadModelCallback(lod); } diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 0991980575..4a67c60943 100755 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -89,6 +89,7 @@ public: BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); static void onMouseCaptureLostModelPreview(LLMouseHandler*); static void setUploadAmount(S32 amount) { sUploadAmount = amount; } @@ -297,6 +298,8 @@ public: LLVector3 getTranslationForJointOffset( std::string joint ); + static bool sIgnoreLoadedCallback; + protected: static void loadedCallback(LLModelLoader::scene& scene,LLModelLoader::model_list& model_list, S32 lod, void* opaque); @@ -388,7 +391,7 @@ private: bool mLegacyRigValid; bool mLastJointUpdate; - + JointSet mJointsFromNode; JointTransformMap mJointTransformMap; -- cgit v1.2.3 From ab9e83030671f0d309eada847af7055213dfe501 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Tue, 24 Mar 2015 00:42:42 +0100 Subject: Refer to new QuickTime third party package with fixes for VS2013 & re-add QuickTime media plugin --- indra/newview/CMakeLists.txt | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8c5bc9777c..82de50ee64 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -44,7 +44,6 @@ include(OPENAL) include(OpenGL) include(OpenSSL) include(PNG) -include(Prebuilt) include(TemplateCheck) include(UI) include(UnixInstall) @@ -62,9 +61,6 @@ if(FMODEX) include_directories(${FMODEX_INCLUDE_DIR}) endif(FMODEX) -# install SLPlugin host executable and its dynamic-library plugins -use_prebuilt_binary(slplugins) - include_directories( ${DBUSGLIB_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR} @@ -1824,10 +1820,10 @@ if (WINDOWS) add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts) endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) -## add_dependencies(${VIEWER_BINARY_NAME} -## SLPlugin -## windows-crash-logger -## ) + add_dependencies(${VIEWER_BINARY_NAME} + SLPlugin + windows-crash-logger + ) # sets the 'working directory' for debugging from visual studio. if (NOT UNATTENDED) @@ -1994,9 +1990,9 @@ if (LINUX) set(COPY_INPUT_DEPENDENCIES ${VIEWER_BINARY_NAME} linux-crash-logger -## SLPlugin -## media_plugin_webkit -## media_plugin_gstreamer010 + SLPlugin + media_plugin_webkit + media_plugin_gstreamer010 llcommon ) @@ -2108,7 +2104,7 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) -##add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger) add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger) if (ENABLE_SIGNING) @@ -2163,20 +2159,20 @@ if (PACKAGE) if (DARWIN) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") # *TODO: Generate these search dirs in the cmake files related to each binary. -## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}") list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}") -## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") -## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") + list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") ## list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2") -## set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger") + set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger") set(VIEWER_EXE_GLOBS "'Second Life' mac-crash-logger") set(VIEWER_LIB_GLOB "*.dylib") endif (DARWIN) if (LINUX) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2") -## set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") + set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin") set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest) -- cgit v1.2.3 From f8989216a4dff518655a9af540f0404449e37a20 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 24 Mar 2015 16:41:47 -0400 Subject: Attempt to restore copying newly-built SLPlugin et al. - UNTESTED --- indra/newview/viewer_manifest.py | 117 +++++++++++++++++++++++++-------------- 1 file changed, 74 insertions(+), 43 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 32cf9d3df6..e7affd4f63 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -340,9 +340,9 @@ class Windows_i686_Manifest(ViewerManifest): self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) # Plugin host application - # The current slplugin package places slplugin.exe right into the - # packages base directory. - self.path2basename(pkgdir, "slplugin.exe") + self.path2basename(os.path.join(os.pardir, + 'llplugin', 'slplugin', self.args['configuration']), + "slplugin.exe") self.path2basename("../viewer_components/updater/scripts/windows", "update_install.bat") # Get shared libs from the shared libs staging directory @@ -424,16 +424,63 @@ class Windows_i686_Manifest(ViewerManifest): self.path("featuretable_xp.txt") # Media plugins - QuickTime - # Media plugins - WebKit/Qt - if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"): + if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_quicktime.dll") + self.end_prefix() + + # Media plugins - WebKit/Qt + if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_webkit.dll") - self.path("qtcore4.dll") - self.path("qtgui4.dll") - self.path("qtnetwork4.dll") - self.path("qtopengl4.dll") - self.path("qtwebkit4.dll") - self.path("qtxmlpatterns4.dll") + self.end_prefix() + + # winmm.dll shim + if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst=""): + self.path("winmm.dll") + self.end_prefix() + + + if self.args['configuration'].lower() == 'debug': + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'debug'), + dst="llplugin"): + self.path("libeay32.dll") + self.path("qtcored4.dll") + self.path("qtguid4.dll") + self.path("qtnetworkd4.dll") + self.path("qtopengld4.dll") + self.path("qtwebkitd4.dll") + self.path("qtxmlpatternsd4.dll") + self.path("ssleay32.dll") + + # For WebKit/Qt plugin runtimes (image format plugins) + if self.prefix(src="imageformats", dst="imageformats"): + self.path("qgifd4.dll") + self.path("qicod4.dll") + self.path("qjpegd4.dll") + self.path("qmngd4.dll") + self.path("qsvgd4.dll") + self.path("qtiffd4.dll") + self.end_prefix() + + # For WebKit/Qt plugin runtimes (codec/character encoding plugins) + if self.prefix(src="codecs", dst="codecs"): + self.path("qcncodecsd4.dll") + self.path("qjpcodecsd4.dll") + self.path("qkrcodecsd4.dll") + self.path("qtwcodecsd4.dll") + self.end_prefix() + + self.end_prefix() + else: + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release'), + dst="llplugin"): + self.path("libeay32.dll") + self.path("qtcore4.dll") + self.path("qtgui4.dll") + self.path("qtnetwork4.dll") + self.path("qtopengl4.dll") + self.path("qtwebkit4.dll") + self.path("qtxmlpatterns4.dll") + self.path("ssleay32.dll") # For WebKit/Qt plugin runtimes (image format plugins) if self.prefix(src="imageformats", dst="imageformats"): @@ -455,23 +502,6 @@ class Windows_i686_Manifest(ViewerManifest): self.end_prefix() - # winmm.dll shim - if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst=""): - self.path("winmm.dll") - self.end_prefix() - - if self.args['configuration'].lower() == 'debug': - if self.prefix(src=debpkgdir, dst="llplugin"): - self.path("libeay32.dll") - self.path("ssleay32.dll") - self.end_prefix() - - else: - if self.prefix(src=relpkgdir, dst="llplugin"): - self.path("libeay32.dll") - self.path("ssleay32.dll") - self.end_prefix() - # pull in the crash logger and updater from other projects # tag:"crash-logger" here as a cue to the exporter self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'], @@ -735,14 +765,13 @@ class Darwin_i386_Manifest(ViewerManifest): dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) # our apps - for app_bld_dir, app in ((os.path.join(os.pardir, - "mac_crash_logger", - self.args['configuration']), - "mac-crash-logger.app"), + for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"), # plugin launcher - (pkgdir, "SLPlugin.app"), + (os.path.join("llplugin", "slplugin"), "SLPlugin.app"), ): - self.path2basename(app_bld_dir, app) + self.path2basename(os.path.join(os.pardir, + app_bld_dir, self.args['configuration']), + app) # our apps dependencies on shared libs # for each app, for each dylib we collected in dylibs, @@ -776,19 +805,21 @@ class Darwin_i386_Manifest(ViewerManifest): # Qt4 codecs go to llplugin. Not certain why but this is the first # location probed according to dtruss so we'll go with that. - if self.prefix(src=os.path.join(pkgdir, "llplugin/codecs/"), dst="llplugin/codecs"): + if self.prefix(src="../packages/plugins/codecs/", dst="llplugin/codecs"): self.path("libq*.dylib") self.end_prefix("llplugin/codecs") # Similarly for imageformats. - if self.prefix(src=os.path.join(pkgdir, "llplugin/imageformats/"), dst="llplugin/imageformats"): + if self.prefix(src="../packages/plugins/imageformats/", dst="llplugin/imageformats"): self.path("libq*.dylib") self.end_prefix("llplugin/imageformats") # SLPlugin plugins proper - if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="llplugin"): - self.path("media_plugin_quicktime.dylib") - self.path("media_plugin_webkit.dylib") + if self.prefix(src="", dst="llplugin"): + self.path2basename("../media_plugins/quicktime/" + self.args['configuration'], + "media_plugin_quicktime.dylib") + self.path2basename("../media_plugins/webkit/" + self.args['configuration'], + "media_plugin_webkit.dylib") self.end_prefix("llplugin") self.end_prefix("Resources") @@ -981,7 +1012,7 @@ class LinuxManifest(ViewerManifest): if self.prefix(src="", dst="bin"): self.path("secondlife-bin","do-not-directly-run-secondlife-bin") self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin") - self.path2basename(pkgdir, "SLPlugin") + self.path2basename("../llplugin/slplugin", "SLPlugin") self.path2basename("../viewer_components/updater/scripts/linux", "update_install") self.end_prefix("bin") @@ -1001,9 +1032,9 @@ class LinuxManifest(ViewerManifest): self.end_prefix(icon_path) # plugins - if self.prefix(src=os.path.join(pkgdir, "llplugin"), dst="bin/llplugin"): - self.path("libmedia_plugin_webkit.so") - self.path("libmedia_plugin_gstreamer.so") + if self.prefix(src="", dst="bin/llplugin"): + self.path2basename("../media_plugins/webkit", "libmedia_plugin_webkit.so") + self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so") self.end_prefix("bin/llplugin") # llcommon -- cgit v1.2.3 From dbdef626d650de288697848977155e223cbba9ad Mon Sep 17 00:00:00 2001 From: callum_linden Date: Tue, 24 Mar 2015 17:22:58 -0700 Subject: Add new media plugin (currently renders squares as example) in preparation for new CEF code --- indra/newview/CMakeLists.txt | 4 +-- indra/newview/llviewermedia.cpp | 2 +- indra/newview/skins/default/xui/en/mime_types.xml | 40 +++++++++++------------ indra/newview/viewer_manifest.py | 6 ++-- 4 files changed, 26 insertions(+), 26 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 82de50ee64..b03f1717aa 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1775,7 +1775,7 @@ if (WINDOWS) ${ARCH_PREBUILT_DIRS_RELEASE}/codecs/qtwcodecsd4.dll SLPlugin media_plugin_quicktime - media_plugin_webkit + media_plugin_cef winmm_shim windows-crash-logger ) @@ -2104,7 +2104,7 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-crash-logger) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_cef mac-crash-logger) add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger) if (ENABLE_SIGNING) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index c758bbcc9e..fd24bbf891 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1803,7 +1803,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ // HACK: we always try to keep a spare running webkit plugin around to improve launch times. // If a spare was already created before PluginAttachDebuggerToPlugins was set, don't use it. // Do not use a spare if launching with full viewer control (e.g. Facebook, Twitter and few others) - if ((plugin_basename == "media_plugin_webkit") && + if ((plugin_basename == "media_plugin_cef") && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins") && !clean_browser) { media_source = LLViewerMedia::getSpareBrowserMediaSource(); diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index f5f2223330..7cb4a6e53b 100755 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -7,7 +7,7 @@ none - media_plugin_webkit + media_plugin_cef + ImporterModelLimit + + Comment + Limits amount of importer generated models for dae files + Persist + 1 + Type + U32 + Value + 768 + IMShowTime Comment diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e9f98a5c5f..9e2e8f4bc0 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1754,7 +1754,8 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable &LLModelPreview::stateChangedCallback, this, mJointTransformMap, - mJointsFromNode ); + mJointsFromNode, + gSavedSettings.getU32("ImporterModelLimit")); if (force_disable_slm) { -- cgit v1.2.3 From 834a94caec7691a957c0816f38ac00d765fa5021 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 26 Mar 2015 04:35:13 +0100 Subject: point to new cef tpl with right headers, update cmaake and viewer_manifest logic to copy files to right place --- indra/newview/viewer_manifest.py | 142 +++++++++++++++++++++++---------------- 1 file changed, 85 insertions(+), 57 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 62467750a0..8613cbed57 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -438,69 +438,97 @@ class Windows_i686_Manifest(ViewerManifest): self.path("winmm.dll") self.end_prefix() - + # CEF runtime files - debug if self.args['configuration'].lower() == 'debug': - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'debug'), - dst="llplugin"): - self.path("libeay32.dll") - self.path("qtcored4.dll") - self.path("qtguid4.dll") - self.path("qtnetworkd4.dll") - self.path("qtopengld4.dll") - self.path("qtwebkitd4.dll") - self.path("qtxmlpatternsd4.dll") - self.path("ssleay32.dll") - - # For WebKit/Qt plugin runtimes (image format plugins) - if self.prefix(src="imageformats", dst="imageformats"): - self.path("qgifd4.dll") - self.path("qicod4.dll") - self.path("qjpegd4.dll") - self.path("qmngd4.dll") - self.path("qsvgd4.dll") - self.path("qtiffd4.dll") - self.end_prefix() - - # For WebKit/Qt plugin runtimes (codec/character encoding plugins) - if self.prefix(src="codecs", dst="codecs"): - self.path("qcncodecsd4.dll") - self.path("qjpcodecsd4.dll") - self.path("qkrcodecsd4.dll") - self.path("qtwcodecsd4.dll") - self.end_prefix() - + if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"): + self.path("d3dcompiler_43.dll") + self.path("d3dcompiler_47.dll") + self.path("ffmpegsumo.dll") + self.path("libcef.dll") + self.path("libEGL.dll") + self.path("libGLESv2.dll") + self.path("llceflib_host.exe") + self.path("pdf.dll") + self.path("wow_helper.exe") self.end_prefix() else: - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release'), - dst="llplugin"): - self.path("libeay32.dll") - self.path("qtcore4.dll") - self.path("qtgui4.dll") - self.path("qtnetwork4.dll") - self.path("qtopengl4.dll") - self.path("qtwebkit4.dll") - self.path("qtxmlpatterns4.dll") - self.path("ssleay32.dll") - - # For WebKit/Qt plugin runtimes (image format plugins) - if self.prefix(src="imageformats", dst="imageformats"): - self.path("qgif4.dll") - self.path("qico4.dll") - self.path("qjpeg4.dll") - self.path("qmng4.dll") - self.path("qsvg4.dll") - self.path("qtiff4.dll") + # CEF runtime files - not debug (release, relwithdebinfo etc.) + if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"): + self.path("d3dcompiler_43.dll") + self.path("d3dcompiler_47.dll") + self.path("ffmpegsumo.dll") + self.path("libcef.dll") + self.path("libEGL.dll") + self.path("libGLESv2.dll") + self.path("llceflib_host.exe") + self.path("pdf.dll") + self.path("wow_helper.exe") self.end_prefix() - # For WebKit/Qt plugin runtimes (codec/character encoding plugins) - if self.prefix(src="codecs", dst="codecs"): - self.path("qcncodecs4.dll") - self.path("qjpcodecs4.dll") - self.path("qkrcodecs4.dll") - self.path("qtwcodecs4.dll") - self.end_prefix() + # CEF files common to all configurations + if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources'), dst="llplugin"): + self.path("cef.pak") + self.path("cef_100_percent.pak") + self.path("cef_200_percent.pak") + self.path("devtools_resources.pak") + self.path("icudtl.dat") + self.end_prefix() - self.end_prefix() + if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources', 'locales'), dst=os.path.join('llplugin', 'locales')): + self.path("am.pak") + self.path("ar.pak") + self.path("bg.pak") + self.path("bn.pak") + self.path("ca.pak") + self.path("cs.pak") + self.path("da.pak") + self.path("de.pak") + self.path("el.pak") + self.path("en-GB.pak") + self.path("en-US.pak") + self.path("es-419.pak") + self.path("es.pak") + self.path("et.pak") + self.path("fa.pak") + self.path("fi.pak") + self.path("fil.pak") + self.path("fr.pak") + self.path("gu.pak") + self.path("he.pak") + self.path("hi.pak") + self.path("hr.pak") + self.path("hu.pak") + self.path("id.pak") + self.path("it.pak") + self.path("ja.pak") + self.path("kn.pak") + self.path("ko.pak") + self.path("lt.pak") + self.path("lv.pak") + self.path("ml.pak") + self.path("mr.pak") + self.path("ms.pak") + self.path("nb.pak") + self.path("nl.pak") + self.path("pl.pak") + self.path("pt-BR.pak") + self.path("pt-PT.pak") + self.path("ro.pak") + self.path("ru.pak") + self.path("sk.pak") + self.path("sl.pak") + self.path("sr.pak") + self.path("sv.pak") + self.path("sw.pak") + self.path("ta.pak") + self.path("te.pak") + self.path("th.pak") + self.path("tr.pak") + self.path("uk.pak") + self.path("vi.pak") + self.path("zh-CN.pak") + self.path("zh-TW.pak") + self.end_prefix() # pull in the crash logger and updater from other projects # tag:"crash-logger" here as a cue to the exporter -- cgit v1.2.3 From 06f50c52e1bae3eb67c620c64879dcc6918280dc Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 1 Apr 2015 19:02:55 +0300 Subject: MAINT-3818 FIXED Certain dae files that used to display skin weights successfully now crash when ticking skin weights in model preview on ALL viewers --- indra/newview/llfloatermodelpreview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 9e2e8f4bc0..672b2ee02b 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3787,7 +3787,7 @@ BOOL LLModelPreview::render() if (!model->mSkinWeights.empty()) { - for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i) + for (U32 i = 0, e = mVertexBuffer[mPreviewLOD][model].size(); i < e; ++i) { LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i]; @@ -3856,6 +3856,7 @@ BOOL LLModelPreview::render() position[j] = v; } + llassert(model->mMaterialList.size() > i); const std::string& binding = instance.mModel->mMaterialList[i]; const LLImportMaterial& material = instance.mMaterial[binding]; -- cgit v1.2.3 From 60d28437e616a6afda51a368ea40ad49a707d16c Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Wed, 8 Apr 2015 19:51:39 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) added GroupNotice notification type and tab "Group" for it; 2) added Attachment field to group notice notifications which may contain inventory offers, notecards, etc; 3) added Fee field to Group Invite notifications; 4) added notification resize depending on attachment field. --- indra/newview/llfloaternotificationstabbed.cpp | 24 ++- indra/newview/llfloaternotificationstabbed.h | 3 +- indra/newview/llnotificationlistitem.cpp | 166 ++++++++++++++++----- indra/newview/llnotificationlistitem.h | 82 +++++++--- indra/newview/lltoastgroupnotifypanel.cpp | 2 +- indra/newview/llviewermessage.cpp | 1 + indra/newview/skins/default/textures/textures.xml | 2 + .../xui/en/floater_notifications_tabbed.xml | 29 +++- .../xui/en/panel_notification_list_item.xml | 69 ++++++--- 9 files changed, 289 insertions(+), 89 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 05a0af01ce..fd5f1486d9 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -41,7 +41,8 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), mChannel(NULL), mSysWellChiclet(NULL), - mInviteMessageList(NULL), + mGroupInviteMessageList(NULL), + mGroupNoticeMessageList(NULL), mTransactionMessageList(NULL), mSystemMessageList(NULL), mNotificationsSeparator(NULL), @@ -59,10 +60,12 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL //--------------------------------------------------------------------------------- BOOL LLFloaterNotificationsTabbed::postBuild() { - mInviteMessageList = getChild("invite_notification_list"); + mGroupInviteMessageList = getChild("group_invite_notification_list"); + mGroupNoticeMessageList = getChild("group_notice_notification_list"); mTransactionMessageList = getChild("transaction_notification_list"); mSystemMessageList = getChild("system_notification_list"); - mNotificationsSeparator->initTaggedList(LLNotificationListItem::getInviteTypes(), mInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getGroupInviteTypes(), mGroupInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getGroupNoticeTypes(), mGroupNoticeMessageList); mNotificationsSeparator->initTaggedList(LLNotificationListItem::getTransactionTypes(), mTransactionMessageList); mNotificationsSeparator->initUnTaggedList(mSystemMessageList); mNotificationsTabContainer = getChild("notifications_tab_container"); @@ -257,7 +260,8 @@ void LLFloaterNotificationsTabbed::updateNotificationCounters() { updateNotificationCounter(0, mSystemMessageList->size(), "system_tab_title"); updateNotificationCounter(1, mTransactionMessageList->size(), "transactions_tab_title"); - updateNotificationCounter(2, mInviteMessageList->size(), "invitations_tab_title"); + updateNotificationCounter(2, mGroupInviteMessageList->size(), "group_invitations_tab_title"); + updateNotificationCounter(3, mGroupNoticeMessageList->size(), "group_notices_tab_title"); } //--------------------------------------------------------------------------------- @@ -316,7 +320,10 @@ void LLFloaterNotificationsTabbed::getAllItemsOnCurrentTab(std::vector mTransactionMessageList->getItems(items); break; case 2: - mInviteMessageList->getItems(items); + mGroupInviteMessageList->getItems(items); + break; + case 3: + mGroupNoticeMessageList->getItems(items); break; default: break; @@ -379,10 +386,15 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLSD payload = notify->getPayload(); p.notification_name = notify->getName(); p.group_id = payload["group_id"]; - p.sender = payload["name"].asString(); + p.fee = payload["fee"]; + p.subject = payload["subject"].asString(); + p.message = payload["message"].asString(); + p.sender = payload["sender_name"].asString(); p.time_stamp = notify->getDate(); + p.received_time = payload["received_time"].asDate(); p.paid_from_id = payload["from_id"]; p.paid_to_id = payload["dest_id"]; + p.inventory_offer = payload["inventory_offer"]; addItem(p); } diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 5191b783f6..8dd20b18c4 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -158,7 +158,8 @@ private: // ID of a toast loaded by user (by clicking notification well item) LLUUID mLoadedToastId; - LLNotificationListView* mInviteMessageList; + LLNotificationListView* mGroupInviteMessageList; + LLNotificationListView* mGroupNoticeMessageList; LLNotificationListView* mTransactionMessageList; LLNotificationListView* mSystemMessageList; LLNotificationSeparator* mNotificationsSeparator; diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 4c4dd07d7f..6b674fcc7d 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -29,10 +29,13 @@ #include "llnotificationlistitem.h" +#include "llagent.h" +#include "llinventoryicon.h" #include "llwindow.h" #include "v4color.h" #include "lltrans.h" #include "lluicolortable.h" +#include "message.h" LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), @@ -42,7 +45,9 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mCloseBtn(NULL), mCondensedViewPanel(NULL), mExpandedViewPanel(NULL), - mMainPanel(NULL) + mCondensedHeight(0), + mExpandedHeight(0), + mExpandedHeightResize(0) { mNotificationName = p.notification_name; } @@ -60,7 +65,6 @@ BOOL LLNotificationListItem::postBuild() mCondenseBtn = getChild("condense_btn"); mCloseBtn = getChild("close_btn"); mCloseBtnExp = getChild("close_expanded_btn"); - mVerticalStack = getChild("item_vertical_stack"); mTitleBox->setValue(mParams.title); mTitleBoxExp->setValue(mParams.title); @@ -78,14 +82,13 @@ BOOL LLNotificationListItem::postBuild() mCondensedViewPanel = getChild("layout_panel_condensed_view"); mExpandedViewPanel = getChild("layout_panel_expanded_view"); - mMainPanel = getChild("main_panel"); - std::string expanded_heigt_str = getString("item_expanded_height"); - std::string condensed_heigt_str = getString("item_condensed_height"); - - mExpandedHeight = (S32)atoi(expanded_heigt_str.c_str()); - mCondensedHeight = (S32)atoi(condensed_heigt_str.c_str()); + std::string expanded_height_str = getString("item_expanded_height"); + std::string condensed_height_str = getString("item_condensed_height"); + mExpandedHeight = (S32)atoi(expanded_height_str.c_str()); + mCondensedHeight = (S32)atoi(condensed_height_str.c_str()); + setExpanded(FALSE); return rv; } @@ -124,9 +127,13 @@ BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask) //static LLNotificationListItem* LLNotificationListItem::create(const Params& p) { - if (LLNotificationListItem::getInviteTypes().count(p.notification_name)) + if (LLNotificationListItem::getGroupInviteTypes().count(p.notification_name)) + { + return new LLGroupInviteNotificationListItem(p); + } + else if (LLNotificationListItem::getGroupNoticeTypes().count(p.notification_name)) { - return new LLInviteNotificationListItem(p); + return new LLGroupNoticeNotificationListItem(p); } else if (LLNotificationListItem::getTransactionTypes().count(p.notification_name)) { @@ -136,9 +143,15 @@ LLNotificationListItem* LLNotificationListItem::create(const Params& p) } //static -std::set LLNotificationListItem::getInviteTypes() +std::set LLNotificationListItem::getGroupInviteTypes() +{ + return LLGroupInviteNotificationListItem::getTypes(); +} + + +std::set LLNotificationListItem::getGroupNoticeTypes() { - return LLInviteNotificationListItem::getTypes(); + return LLGroupNoticeNotificationListItem::getTypes(); } //static @@ -164,7 +177,7 @@ void LLNotificationListItem::setExpanded(BOOL value) S32 width = this->getRect().getWidth(); if (value) { - this->reshape(width, mExpandedHeight, FALSE); + this->reshape(width, mExpandedHeight + mExpandedHeightResize, FALSE); } else { @@ -172,13 +185,20 @@ void LLNotificationListItem::setExpanded(BOOL value) } } -std::set LLInviteNotificationListItem::getTypes() +std::set LLGroupInviteNotificationListItem::getTypes() { std::set types; types.insert("JoinGroup"); return types; } +std::set LLGroupNoticeNotificationListItem::getTypes() +{ + std::set types; + types.insert("GroupNotice"); + return types; +} + std::set LLTransactionNotificationListItem::getTypes() { std::set types; @@ -187,14 +207,94 @@ std::set LLTransactionNotificationListItem::getTypes() return types; } -LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) +LLGroupNotificationListItem::LLGroupNotificationListItem(const Params& p) : LLNotificationListItem(p), - mSenderBox(NULL) + mSenderOrFeeBox(NULL) +{ +} + +LLGroupInviteNotificationListItem::LLGroupInviteNotificationListItem(const Params& p) + : LLGroupNotificationListItem(p) +{ + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLGroupInviteNotificationListItem::postBuild() +{ + BOOL rv = LLGroupNotificationListItem::postBuild(); + setFee(mParams.fee); + return rv; +} + +void LLGroupInviteNotificationListItem::setFee(S32 fee) +{ + LLStringUtil::format_map_t string_args; + string_args["[GROUP_FEE]"] = llformat("%d", fee); + std::string fee_text = getString("group_fee_text", string_args); + mSenderOrFeeBox->setValue(fee_text); + mSenderOrFeeBoxExp->setValue(fee_text); + mSenderOrFeeBox->setVisible(TRUE); + mSenderOrFeeBoxExp->setVisible(TRUE); +} + +LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Params& p) + : LLGroupNotificationListItem(p), + mAttachmentPanel(NULL), + mAttachmentTextBox(NULL), + mAttachmentIcon(NULL), + mAttachmentIconExp(NULL), + mInventoryOffer(NULL) { + if (mParams.inventory_offer.isDefined()) + { + mInventoryOffer = new LLOfferInfo(mParams.inventory_offer); + } + buildFromFile("panel_notification_list_item.xml"); } -BOOL LLInviteNotificationListItem::postBuild() +BOOL LLGroupNoticeNotificationListItem::postBuild() +{ + BOOL rv = LLGroupNotificationListItem::postBuild(); + + mAttachmentTextBox = getChild("attachment_text"); + mAttachmentIcon = getChild("attachment_icon"); + mAttachmentIconExp = getChild("attachment_icon_exp"); + mAttachmentPanel = getChild("attachment_panel"); + mAttachmentPanel->setVisible(FALSE); + + + mTitleBox->setValue(mParams.subject); + mTitleBoxExp->setValue(mParams.subject); + mNoticeTextExp->setValue(mParams.message); + //Workaround: in case server timestamp is 0 - we use the time when notification was actually received + if (mParams.time_stamp.isNull()) + { + mTimeBox->setValue(buildNotificationDate(mParams.received_time)); + mTimeBoxExp->setValue(buildNotificationDate(mParams.received_time)); + } + setSender(mParams.sender); + + if (mInventoryOffer != NULL) + { + mAttachmentTextBox->setValue(mInventoryOffer->mDesc); + mAttachmentIcon->setVisible(TRUE); + + std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, + LLInventoryType::IT_TEXTURE); + + mAttachmentIconExp->setValue(icon_name); + mAttachmentIconExp->setVisible(TRUE); + + std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment"); + mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str()); + + mAttachmentPanel->setVisible(TRUE); + } + return rv; +} + +BOOL LLGroupNotificationListItem::postBuild() { BOOL rv = LLNotificationListItem::postBuild(); @@ -210,10 +310,8 @@ BOOL LLInviteNotificationListItem::postBuild() mGroupId = mParams.group_id; - mSenderBox = getChild("sender_resident"); - mSenderBoxExp = getChild("sender_resident_exp"); - - setSender(mParams.sender); + mSenderOrFeeBox = getChild("sender_or_fee_box"); + mSenderOrFeeBoxExp = getChild("sender_or_fee_box_exp"); LLSD value(mParams.group_id); setGroupId(value); @@ -221,7 +319,7 @@ BOOL LLInviteNotificationListItem::postBuild() return rv; } -void LLInviteNotificationListItem::changed(LLGroupChange gc) +void LLGroupNotificationListItem::changed(LLGroupChange gc) { if (GC_PROPERTIES == gc) { @@ -229,7 +327,7 @@ void LLInviteNotificationListItem::changed(LLGroupChange gc) } } -bool LLInviteNotificationListItem::updateFromCache() +bool LLGroupNotificationListItem::updateFromCache() { LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mGroupId); if (!group_data) return false; @@ -237,7 +335,7 @@ bool LLInviteNotificationListItem::updateFromCache() return true; } -void LLInviteNotificationListItem::setGroupId(const LLUUID& value) +void LLGroupNotificationListItem::setGroupId(const LLUUID& value) { LLGroupMgr* gm = LLGroupMgr::getInstance(); if (mGroupId.notNull()) @@ -255,7 +353,7 @@ void LLInviteNotificationListItem::setGroupId(const LLUUID& value) } } -void LLInviteNotificationListItem::setGroupName(std::string name) +void LLGroupNotificationListItem::setGroupName(std::string name) { if (!name.empty()) { @@ -272,22 +370,22 @@ void LLInviteNotificationListItem::setGroupName(std::string name) } } -void LLInviteNotificationListItem::setSender(std::string sender) +void LLGroupNoticeNotificationListItem::setSender(std::string sender) { if (!sender.empty()) { LLStringUtil::format_map_t string_args; string_args["[SENDER_RESIDENT]"] = llformat("%s", sender.c_str()); std::string sender_text = getString("sender_resident_text", string_args); - mSenderBox->setValue(sender_text); - mSenderBox->setVisible(TRUE); - mSenderBoxExp->setValue(sender_text); - mSenderBoxExp->setVisible(TRUE); + mSenderOrFeeBox->setValue(sender_text); + mSenderOrFeeBoxExp->setValue(sender_text); + mSenderOrFeeBox->setVisible(TRUE); + mSenderOrFeeBoxExp->setVisible(TRUE); } else { - mSenderBox->setValue(LLStringUtil::null); - mSenderBoxExp->setValue(LLStringUtil::null); - mSenderBox->setVisible(FALSE); - mSenderBoxExp->setVisible(FALSE); + mSenderOrFeeBox->setValue(LLStringUtil::null); + mSenderOrFeeBoxExp->setValue(LLStringUtil::null); + mSenderOrFeeBox->setVisible(FALSE); + mSenderOrFeeBoxExp->setVisible(FALSE); } } diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 22003a3a6a..bd76d17fe8 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -35,6 +35,7 @@ #include "llavatariconctrl.h" #include "llgroupmgr.h" +#include "llviewermessage.h" #include @@ -49,15 +50,21 @@ public: LLUUID paid_to_id; std::string notification_name; std::string title; + std::string subject; + std::string message; std::string sender; - LLDate time_stamp; + S32 fee; + LLDate time_stamp; + LLDate received_time; + LLSD inventory_offer; Params() {}; }; static LLNotificationListItem* create(const Params& p); - static std::set getInviteTypes(); static std::set getTransactionTypes(); + static std::set getGroupInviteTypes(); + static std::set getGroupNoticeTypes(); // title void setTitle( std::string title ); @@ -99,43 +106,80 @@ protected: LLButton* mCondenseBtn; LLButton* mCloseBtn; LLButton* mCloseBtnExp; - LLLayoutStack* mVerticalStack; LLPanel* mCondensedViewPanel; LLPanel* mExpandedViewPanel; - LLPanel* mMainPanel; std::string mTitle; std::string mNotificationName; - S32 mCondensedHeight; - S32 mExpandedHeight; + S32 mCondensedHeight; + S32 mExpandedHeight; + S32 mExpandedHeightResize; }; -class LLInviteNotificationListItem +class LLGroupNotificationListItem : public LLNotificationListItem, public LLGroupMgrObserver { public: - static std::set getTypes(); virtual BOOL postBuild(); void setGroupId(const LLUUID& value); // LLGroupMgrObserver observer trigger virtual void changed(LLGroupChange gc); -private: - friend class LLNotificationListItem; - LLInviteNotificationListItem(const Params& p); - LLInviteNotificationListItem(const LLInviteNotificationListItem &); - LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); - void setSender(std::string sender); - void setGroupName(std::string name); - - bool updateFromCache(); + friend class LLNotificationListItem; +protected: + LLGroupNotificationListItem(const Params& p); LLGroupIconCtrl* mGroupIcon; LLGroupIconCtrl* mGroupIconExp; LLUUID mGroupId; - LLTextBox* mSenderBox; - LLTextBox* mSenderBoxExp; + LLTextBox* mSenderOrFeeBox; + LLTextBox* mSenderOrFeeBoxExp; LLTextBox* mGroupNameBoxExp; + +private: + LLGroupNotificationListItem(const LLGroupNotificationListItem &); + LLGroupNotificationListItem & operator=(LLGroupNotificationListItem &); + + void setGroupName(std::string name); + bool updateFromCache(); +}; + +class LLGroupInviteNotificationListItem + : public LLGroupNotificationListItem +{ +public: + static std::set getTypes(); + virtual BOOL postBuild(); + +private: + friend class LLNotificationListItem; + LLGroupInviteNotificationListItem(const Params& p); + LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem &); + LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &); + + void setFee(S32 fee); +}; + +class LLGroupNoticeNotificationListItem + : public LLGroupNotificationListItem +{ +public: + static std::set getTypes(); + virtual BOOL postBuild(); + +private: + friend class LLNotificationListItem; + LLGroupNoticeNotificationListItem(const Params& p); + LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem &); + LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &); + + void setSender(std::string sender); + + LLPanel* mAttachmentPanel; + LLTextBox* mAttachmentTextBox; + LLIconCtrl* mAttachmentIcon; + LLIconCtrl* mAttachmentIconExp; + LLOfferInfo* mInventoryOffer; }; class LLTransactionNotificationListItem : public LLNotificationListItem diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index e00b18dedb..def5a0ac7c 100755 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -92,7 +92,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi +LLTrans::getString("UTCTimeSec")+"] [" +LLTrans::getString("UTCTimeTimezone")+"]"; const LLDate timeStamp = notification->getDate(); - LLDate notice_date = timeStamp.notNull() ? timeStamp : LLDate::now(); + LLDate notice_date = timeStamp.notNull() ? timeStamp : payload["received_time"]; LLSD substitution; substitution["datetime"] = (S32) notice_date.secondsSinceEpoch(); LLStringUtil::format(timeStr, substitution); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6507794cdd..99db3ff093 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2681,6 +2681,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["sender_name"] = name; payload["group_id"] = group_id; payload["inventory_name"] = item_name; + payload["received_time"] = LLDate::now(); if(info && info->asLLSD()) { payload["inventory_offer"] = info->asLLSD(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index e47e0c03f1..4f8962182e 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -798,4 +798,6 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml index 55ecfb637b..0fdd9ed0c6 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -28,9 +28,13 @@ Transactions ([COUNT]) + name="group_invitations_tab_title"> Invitations ([COUNT]) + + Group ([COUNT]) + @@ -72,7 +76,7 @@ follows="left|top|right|bottom" label="Transactions (0)" layout="topleft" - name="TransactionNotificationsTab"> + name="transaction_notifications_tab"> + name="group_invite_notifications_tab"> + + + Group: "[GROUP_NAME]" + + Fee: [GROUP_FEE] + 50 - 200 + 175 + + + 27 - + @@ -49,10 +57,11 @@ use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_title" > Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle + + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false"> Sender: "Resident R e s i d e n t R e s i d e n t" - - - + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..975b08be05 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml @@ -0,0 +1,103 @@ + + + + Postcard from [SECOND_LIFE]. + + + Check this out! + + + Sending... + + + + E-mail + + + + + + + + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..81a067a81b --- /dev/null +++ b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Postal desde [SECOND_LIFE]. + + + ¡Mira esto! + + + Enviando... + + + Correo-e + + + + + diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..3f5ef04022 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Carte postale de [SECOND_LIFE]. + + + Ouvrez-moi ! + + + Envoi en cours... + + + E-mail + + + + + diff --git a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..333ce5c12b --- /dev/null +++ b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Cartolina da [SECOND_LIFE]. + + + Dai un'occhiata! + + + Invio... + + + E-mail + + + + + diff --git a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..756df9ecc2 --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + [SECOND_LIFE] からのポストカードです。 + + + ぜひご覧ください! + + + 送信中... + + + メール + + + + + diff --git a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..efcbec66ba --- /dev/null +++ b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Postal do [SECOND_LIFE]. + + + Confira! + + + Enviando... + + + E-mail + + + + + diff --git a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..6e1b3a7516 --- /dev/null +++ b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + Открытка из [SECOND_LIFE]. + + + Побывай здесь! + + + Отправка... + + + Электронное письмо + + + + + diff --git a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..9b9e60d2e0 --- /dev/null +++ b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + SECOND_LIFE]'dan posta kartı. + + + Buna bakın! + + + Gönderiyor... + + + E-posta + + + + + diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml new file mode 100755 index 0000000000..6dfeaf2505 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml @@ -0,0 +1,18 @@ + + + + 來自 [SECOND_LIFE] 的明信片。 + + + 快來看看這個! + + + 傳送中... + + + 電郵 + + + + + -- cgit v1.2.3 From 9c7f424371b33d027fc58f0bf83bc30b53707bb3 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine Date: Thu, 7 May 2015 19:51:52 +0300 Subject: MAINT-4812 Restore sending snapshot as email from the viewer. --- indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml | 1 + indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml | 1 + 8 files changed, 8 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml index 81a067a81b..3373c29821 100755 --- a/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/es/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml index 3f5ef04022..19e7b02cf8 100755 --- a/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/fr/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml index 333ce5c12b..e79e7aecbc 100755 --- a/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/it/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml index 756df9ecc2..000a59117e 100755 --- a/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/ja/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml index efcbec66ba..08bc60996d 100755 --- a/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/pt/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml index 6e1b3a7516..fa8ca1f9b4 100755 --- a/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/ru/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml index 9b9e60d2e0..e9b36b70a7 100755 --- a/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/tr/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + diff --git a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml index 6dfeaf2505..a360822af5 100755 --- a/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/zh/panel_snapshot_postcard.xml @@ -15,4 +15,5 @@ + -- cgit v1.2.3 From a37ac9d12c8d3163806cd2be9e38ca7294757e3d Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 8 May 2015 14:01:29 +0300 Subject: MAINT-4688 FIXED Menu item names were changed. --- indra/newview/skins/default/xui/da/menu_viewer.xml | 2 +- indra/newview/skins/default/xui/de/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/es/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/fr/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/it/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/ja/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/pl/menu_viewer.xml | 2 +- indra/newview/skins/default/xui/pt/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/ru/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/tr/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/zh/menu_viewer.xml | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index aa6bc53672..299322001b 100755 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -37,7 +37,7 @@ - + diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 50a6dafa91..ff051634d8 100755 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index b75d614dcc..807c4e9813 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -127,7 +127,7 @@ + name="WalkRunFly"> @@ -495,7 +495,7 @@ + name="RegionEstate"> diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 9596a8277e..ef963a60c9 100755 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 2c30fe07b4..940cf6fe9c 100755 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index d25e11e7a4..215bdd37a5 100755 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 0b85c693f0..bb65c3bb0d 100755 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index a354cca9ad..65311c134c 100755 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -37,7 +37,7 @@ - + diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index 0bbb9683a0..f96137cc94 100755 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index 266a1fb877..c7acc2018b 100755 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index a488a0916f..ff260b166e 100755 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index adc29a3944..0c82776081 100755 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + -- cgit v1.2.3 From 0d5d0060950b632eacd865b18af8bb5cf94732fb Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 8 May 2015 21:24:47 +0300 Subject: MAINT-5195 Text mismatch referencing Developer menu --- indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 2e778014c5..3e96160834 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -216,7 +216,7 @@ control_name="QAMode" follows="top|left" height="15" - label="Show Developer Menu" + label="Show Develop Menu" layout="topleft" left="30" name="show_develop_menu_check" -- cgit v1.2.3 From 91f3bd942ade61dba00f76d7dd59ab48a7f64c04 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 7 May 2015 18:33:31 +0300 Subject: MAINT-5187 FIXED Add control for local logging of viewer stat packet contents --- indra/newview/llviewerstats.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index f60829e9e8..24a6758312 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -60,6 +60,7 @@ #include "llfeaturemanager.h" #include "llviewernetwork.h" #include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived +#include "llsdserialize.h" namespace LLStatViewer { @@ -616,8 +617,10 @@ void send_stats() body["DisplayNamesShowUsername"] = gSavedSettings.getBOOL("NameTagShowUsernames"); body["MinimalSkin"] = false; - + LLViewerStats::getInstance()->addToMessage(body); + + LL_INFOS("LogViewerStatsPacket") << "Sending viewer statistics: " << body << LL_ENDL; LLHTTPClient::post(url, body, new ViewerStatsResponder()); LLViewerStats::instance().getRecording().resume(); -- cgit v1.2.3 From 102908a2f204247005ae4a562c4f34668a983f4a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 15 May 2015 11:43:13 +0300 Subject: MAINT-5206 FIXED always show Nearby chat on first opening of IMcontainer floater. --- indra/newview/llfloaterimcontainer.cpp | 6 +++++- indra/newview/llfloaterimcontainer.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index ab57e8c170..66278f4987 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -261,6 +261,8 @@ BOOL LLFloaterIMContainer::postBuild() mInitialized = true; + mIsFirstOpen = true; + // Add callbacks: // We'll take care of view updates on idle gIdleCallbacks.addFunction(idle, this); @@ -636,14 +638,16 @@ void LLFloaterIMContainer::setVisible(BOOL visible) { // Make sure we have the Nearby Chat present when showing the conversation container nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); - if (nearby_chat == NULL) + if ((nearby_chat == NULL) || mIsFirstOpen) { // If not found, force the creation of the nearby chat conversation panel // *TODO: find a way to move this to XML as a default panel or something like that LLSD name("nearby_chat"); LLFloaterReg::toggleInstanceOrBringToFront(name); selectConversationPair(LLUUID(NULL), false, false); + mIsFirstOpen = false; } + flashConversationItemWidget(mSelectedSession,false); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index f21c0b9947..60cef83d9a 100755 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -193,6 +193,8 @@ private: bool mInitialized; bool mIsFirstLaunch; + bool mIsFirstOpen; + LLUUID mSelectedSession; std::string mGeneralTitle; -- cgit v1.2.3 From 496139fe56bd456b6bdc1a32726e32fd1b07631a Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 15 May 2015 06:56:05 +0300 Subject: MAINT-5096 FIXED Camming is broken in freeze frame mode once snapshot is refreshed... --- indra/newview/llsnapshotlivepreview.cpp | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index fbbbead264..abab3174cd 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -194,8 +194,8 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail // Stop shining animation. mShineAnimTimer.stop(); - mSnapshotDelayTimer.setTimerExpirySec(delay); mSnapshotDelayTimer.start(); + mSnapshotDelayTimer.resetWithExpiry(delay); mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); @@ -671,10 +671,27 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) return FALSE; } - // If we're in freeze-frame mode and camera has moved, update snapshot. + if (previewp->mSnapshotDelayTimer.getStarted()) // Wait for a snapshot delay timer + { + if (!previewp->mSnapshotDelayTimer.hasExpired()) + { + return FALSE; + } + previewp->mSnapshotDelayTimer.stop(); + } + + if (LLToolCamera::getInstance()->hasMouseCapture()) // Hide full-screen preview while camming, either don't take snapshots while ALT-zoom active + { + previewp->setVisible(FALSE); + return FALSE; + } + + // If we're in freeze-frame and/or auto update mode and camera has moved, update snapshot. LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin(); LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion(); - if (previewp->mForceUpdateSnapshot || (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview && + if (previewp->mForceUpdateSnapshot || + (((gSavedSettings.getBOOL("AutoSnapshot") && LLView::isAvailable(previewp->mViewContainer)) || + (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview)) && (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))) { previewp->mCameraPos = new_camera_pos; @@ -689,11 +706,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mForceUpdateSnapshot = FALSE; } - // see if it's time yet to snap the shot and bomb out otherwise. - previewp->mSnapshotActive = - (previewp->mSnapshotDelayTimer.getStarted() && previewp->mSnapshotDelayTimer.hasExpired()) - && !LLToolCamera::getInstance()->hasMouseCapture(); // don't take snapshots while ALT-zoom active - if (!previewp->mSnapshotActive && previewp->getSnapshotUpToDate() && previewp->getThumbnailUpToDate()) + if (previewp->getSnapshotUpToDate() && previewp->getThumbnailUpToDate()) { return FALSE; } @@ -707,6 +720,8 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mPreviewImage = new LLImageRaw; } + previewp->mSnapshotActive = TRUE; + previewp->setVisible(FALSE); previewp->setEnabled(FALSE); @@ -778,7 +793,6 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) } previewp->getWindow()->decBusyCount(); previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview); // only show fullscreen preview when in freeze frame mode - previewp->mSnapshotDelayTimer.stop(); previewp->mSnapshotActive = FALSE; LL_DEBUGS() << "done creating snapshot" << LL_ENDL; } -- cgit v1.2.3 From 695ff76cb79598fd8e3402f797924f265ebbda1e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 18 May 2015 17:55:34 +0300 Subject: MAINT-5214 FIXED physics layer isn't shown in the Preview Window while uploading model --- indra/newview/llfloatermodelpreview.cpp | 20 +++++++++++++++++++- indra/newview/llfloatermodelpreview.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index d13db542d7..2e3e3aa239 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -457,6 +457,11 @@ void LLFloaterModelPreview::disableViewOption(const std::string& option) void LLFloaterModelPreview::loadModel(S32 lod) { mModelPreview->mLoading = true; + if (lod == LLModel::LOD_PHYSICS) + { + // loading physics from file + mModelPreview->mPhysicsSearchLOD = lod; + } (new LLMeshFilePicker(mModelPreview, lod))->getFile(); } @@ -1167,6 +1172,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) , mPelvisZOffset( 0.0f ) , mLegacyRigValid( false ) , mRigValidJointUpload( false ) +, mPhysicsSearchLOD( LLModel::LOD_PHYSICS ) , mResetJoints( false ) , mModelNoErrors( true ) , mRigParityWithScene( false ) @@ -1416,8 +1422,19 @@ void LLModelPreview::rebuildUploadData() std::string name_to_match = instance.mLabel; llassert(!name_to_match.empty()); + int extensionLOD; + if (i != LLModel::LOD_PHYSICS || mModel[LLModel::LOD_PHYSICS].empty()) + { + extensionLOD = i; + } + else + { + //Physics can be inherited from other LODs or loaded, so we need to adjust what extension we are searching for + extensionLOD = mPhysicsSearchLOD; + } + std::string toAdd; - switch (i) + switch (extensionLOD) { case LLModel::LOD_IMPOSTOR: toAdd = "_LOD0"; break; case LLModel::LOD_LOW: toAdd = "_LOD1"; break; @@ -1776,6 +1793,7 @@ void LLModelPreview::setPhysicsFromLOD(S32 lod) if (lod >= 0 && lod <= 3) { + mPhysicsSearchLOD = lod; mModel[LLModel::LOD_PHYSICS] = mModel[lod]; mScene[LLModel::LOD_PHYSICS] = mScene[lod]; mLODFile[LLModel::LOD_PHYSICS].clear(); diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index e101a6f21e..7a518c798b 100755 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -341,6 +341,7 @@ private: LLVector3 mPreviewTarget; LLVector3 mPreviewScale; S32 mPreviewLOD; + S32 mPhysicsSearchLOD; U32 mResourceCost; std::string mLODFile[LLModel::NUM_LODS]; bool mLoading; -- cgit v1.2.3 From 76872412a26911e37bd13602ca6c29885dfd0f11 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 19 May 2015 00:44:43 +0300 Subject: MAINT-5138 FIXED Second Life Viewer's window title is "Second Life " with a trailing space --- indra/newview/llappviewer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6dc71bc94e..5a5d2eb744 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2783,10 +2783,12 @@ bool LLAppViewer::initConfiguration() // gWindowTitle = LLTrans::getString("APP_NAME"); #if LL_DEBUG - gWindowTitle += std::string(" [DEBUG] ") + gArgs; -#else - gWindowTitle += std::string(" ") + gArgs; + gWindowTitle += std::string(" [DEBUG]") #endif + if (!gArgs.empty()) + { + gWindowTitle += std::string(" ") + gArgs; + } LLStringUtil::truncate(gWindowTitle, 255); //RN: if we received a URL, hand it off to the existing instance. -- cgit v1.2.3 From 193a298266c251a6be153cf37f5b2d2aa8513101 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 19 May 2015 12:01:32 +0300 Subject: MAINT-5201 FIXED 'Chat history' option in context menu does not works for multiperson chat. --- indra/newview/llconversationlog.h | 3 ++- indra/newview/llfloaterimcontainer.cpp | 26 +++++++++++++++++++++++++- indra/newview/lllogchat.cpp | 16 ++++++++++++++++ indra/newview/lllogchat.h | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index b38d472156..62f08144b9 100755 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -153,6 +153,7 @@ public: * file name is conversation.log */ std::string getFileName(); + LLConversation* findConversation(const LLIMModel::LLIMSession* session); private: @@ -184,7 +185,7 @@ private: void updateConversationName(const LLIMModel::LLIMSession* session, const std::string& name); void updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages); - LLConversation* findConversation(const LLIMModel::LLIMSession* session); + typedef std::vector conversations_vec_t; std::vector mConversations; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 66278f4987..04f8c09ca0 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1220,7 +1220,22 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, { if (selectedIDS.size() > 0) { - LLAvatarActions::viewChatHistory(selectedIDS.front()); + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_GROUP) + { + LLFloaterReg::showInstance("preview_conversation", conversationItem->getUUID(), true); + } + else if(conversationItem->getType() == LLConversationItem::CONV_SESSION_AD_HOC) + { + LLConversation* conv = LLConversationLog::instance().findConversation(LLIMModel::getInstance()->findIMSession(conversationItem->getUUID())); + if(conv) + { + LLFloaterReg::showInstance("preview_conversation", conv->getSessionID(), true); + } + } + else + { + LLAvatarActions::viewChatHistory(selectedIDS.front()); + } } } else @@ -1320,6 +1335,15 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) { return LLLogChat::isNearbyTranscriptExist(); } + else if (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_AD_HOC) + { + const LLConversation* conv = LLConversationLog::instance().findConversation(LLIMModel::getInstance()->findIMSession(uuids.front())); + if(conv) + { + return LLLogChat::isAdHocTranscriptExist(conv->getHistoryFileName()); + } + return false; + } else { bool is_group = (getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP); diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 7ddacf3033..4116e38f11 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -804,6 +804,22 @@ bool LLLogChat::isNearbyTranscriptExist() return false; } +bool LLLogChat::isAdHocTranscriptExist(std::string file_name) +{ + std::vector list_of_transcriptions; + LLLogChat::getListOfTranscriptFiles(list_of_transcriptions); + + file_name = makeLogFileName(file_name); + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) + { + if (transcript_file_name == file_name) + { + return true; + } + } + return false; +} + //*TODO mark object's names in a special way so that they will be distinguishable form avatar name //which are more strict by its nature (only firstname and secondname) //Example, an object's name can be written like "Object " diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index ca597599dd..6022e539a9 100755 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -120,6 +120,7 @@ public: static void deleteTranscripts(); static bool isTranscriptExist(const LLUUID& avatar_id, bool is_group=false); static bool isNearbyTranscriptExist(); + static bool isAdHocTranscriptExist(std::string file_name); static bool historyThreadsFinished(LLUUID session_id); static LLLoadHistoryThread* getLoadHistoryThread(LLUUID session_id); -- cgit v1.2.3 From f479235aaa94555ee0ea7a663187ae9930d7d5f4 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Tue, 19 May 2015 13:20:46 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) disabled popup show (toast) when clicking on notification in expanded view; 2) made attachment in Group Notice notification clickable (copied logic from LLToastGroupNotifyPanel); 3) removed border around notification text in expanded view and made lighter background; 4) removed border around attachment field in expanded notification view. --- indra/newview/llfloaternotificationstabbed.cpp | 2 +- indra/newview/llnotificationlistitem.cpp | 55 +++++- indra/newview/llnotificationlistitem.h | 52 +++--- .../xui/en/panel_notification_list_item.xml | 196 ++++++++++----------- 4 files changed, 180 insertions(+), 125 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index fd5f1486d9..70213680f3 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -402,7 +402,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLUUID id = item->getID(); - LLFloaterReg::showInstance("inspect_toast", id); + //LLFloaterReg::showInstance("inspect_toast", id); } //--------------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 6b674fcc7d..8e7671897d 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -57,7 +57,7 @@ BOOL LLNotificationListItem::postBuild() BOOL rv = LLPanel::postBuild(); mTitleBox = getChild("notification_title"); mTitleBoxExp = getChild("notification_title_exp"); - mNoticeTextExp = getChild("notification_text_exp"); + mNoticeTextExp = getChild("notification_text_exp"); mTimeBox = getChild("notification_time"); mTimeBoxExp = getChild("notification_time_exp"); @@ -115,6 +115,7 @@ std::string LLNotificationListItem::buildNotificationDate(const LLDate& time_sta void LLNotificationListItem::onClickCloseBtn() { mOnItemClose(this); + close(); } BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask) @@ -278,14 +279,17 @@ BOOL LLGroupNoticeNotificationListItem::postBuild() if (mInventoryOffer != NULL) { mAttachmentTextBox->setValue(mInventoryOffer->mDesc); + mAttachmentTextBox->setVisible(TRUE); mAttachmentIcon->setVisible(TRUE); std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, LLInventoryType::IT_TEXTURE); - mAttachmentIconExp->setValue(icon_name); mAttachmentIconExp->setVisible(TRUE); + mAttachmentTextBox->setClickedCallback(boost::bind( + &LLGroupNoticeNotificationListItem::onClickAttachment, this)); + std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment"); mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str()); @@ -388,6 +392,53 @@ void LLGroupNoticeNotificationListItem::setSender(std::string sender) mSenderOrFeeBoxExp->setVisible(FALSE); } } +void LLGroupNoticeNotificationListItem::close() +{ + // The group notice dialog may be an inventory offer. + // If it has an inventory save button and that button is still enabled + // Then we need to send the inventory declined message + if (mInventoryOffer != NULL) + { + mInventoryOffer->forceResponse(IOR_DECLINE); + mInventoryOffer = NULL; + } +} + +void LLGroupNoticeNotificationListItem::onClickAttachment() +{ + if (mInventoryOffer != NULL) { + mInventoryOffer->forceResponse(IOR_ACCEPT); + + static const LLUIColor textColor = LLUIColorTable::instance().getColor( + "GroupNotifyDimmedTextColor"); + mAttachmentTextBox->setColor(textColor); + mAttachmentIconExp->setEnabled(FALSE); + + //if attachment isn't openable - notify about saving + if (!isAttachmentOpenable(mInventoryOffer->mType)) { + LLNotifications::instance().add("AttachmentSaved", LLSD(), LLSD()); + } + + mInventoryOffer = NULL; + } +} + +//static +bool LLGroupNoticeNotificationListItem::isAttachmentOpenable(LLAssetType::EType type) +{ + switch (type) + { + case LLAssetType::AT_LANDMARK: + case LLAssetType::AT_NOTECARD: + case LLAssetType::AT_IMAGE_JPEG: + case LLAssetType::AT_IMAGE_TGA: + case LLAssetType::AT_TEXTURE: + case LLAssetType::AT_TEXTURE_TGA: + return true; + default: + return false; + } +} LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) : LLNotificationListItem(p), diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index bd76d17fe8..f8d9fc0330 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -30,6 +30,7 @@ #include "llpanel.h" #include "lllayoutstack.h" #include "lltextbox.h" +#include "llviewertexteditor.h" #include "llbutton.h" #include "llgroupiconctrl.h" #include "llavatariconctrl.h" @@ -95,24 +96,25 @@ protected: void onClickExpandBtn(); void onClickCondenseBtn(); void onClickCloseBtn(); - - Params mParams; - LLTextBox* mTitleBox; - LLTextBox* mTitleBoxExp; - LLTextBox* mNoticeTextExp; - LLTextBox* mTimeBox; - LLTextBox* mTimeBoxExp; - LLButton* mExpandBtn; - LLButton* mCondenseBtn; - LLButton* mCloseBtn; - LLButton* mCloseBtnExp; - LLPanel* mCondensedViewPanel; - LLPanel* mExpandedViewPanel; - std::string mTitle; - std::string mNotificationName; - S32 mCondensedHeight; - S32 mExpandedHeight; - S32 mExpandedHeightResize; + virtual void close() {}; + + Params mParams; + LLTextBox* mTitleBox; + LLTextBox* mTitleBoxExp; + LLViewerTextEditor* mNoticeTextExp; + LLTextBox* mTimeBox; + LLTextBox* mTimeBoxExp; + LLButton* mExpandBtn; + LLButton* mCondenseBtn; + LLButton* mCloseBtn; + LLButton* mCloseBtnExp; + LLPanel* mCondensedViewPanel; + LLPanel* mExpandedViewPanel; + std::string mTitle; + std::string mNotificationName; + S32 mCondensedHeight; + S32 mExpandedHeight; + S32 mExpandedHeightResize; }; class LLGroupNotificationListItem @@ -174,12 +176,16 @@ private: LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &); void setSender(std::string sender); + void onClickAttachment(); + /*virtual*/ void close(); + + static bool isAttachmentOpenable(LLAssetType::EType); - LLPanel* mAttachmentPanel; - LLTextBox* mAttachmentTextBox; - LLIconCtrl* mAttachmentIcon; - LLIconCtrl* mAttachmentIconExp; - LLOfferInfo* mInventoryOffer; + LLPanel* mAttachmentPanel; + LLTextBox* mAttachmentTextBox; + LLIconCtrl* mAttachmentIcon; + LLIconCtrl* mAttachmentIconExp; + LLOfferInfo* mInventoryOffer; }; class LLTransactionNotificationListItem : public LLNotificationListItem diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 7b57cddd7b..971042eee7 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -11,10 +11,10 @@ height="202" can_resize="true" layout="topleft" - follows="left|top|right|bottom" - background_opaque="false" - background_visible="true" - bg_alpha_color="PanelNotificationListItem" > + follows="left|top|right|bottom" > + + + Sender: "[SENDER_RESIDENT]" @@ -41,105 +41,103 @@ - - - - - - - - - - - - - - Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle - - - - - - Sender: "Resident R e s i d e n t R e s i d e n t" - - - - - - - - - + @@ -1439,6 +1439,12 @@ function="Floater.Show" parameter="sl_about" /> + + + + + +An update is available! +It's downloading in the background and we will prompt you to restart your viewer to finish installing it as soon as it's ready. + confirm + + + + +An update was downloaded. It will be installed during restart. + confirm + + + + +An error occured while checking for update. +Please try again later. + confirm + + + + +Your viewer is up to date! +If you can't wait to try out the latest features and fixes, check out the Alternate Viewers page. http://wiki.secondlife.com/wiki/Linden_Lab_Official:Alternate_Viewers. + confirm + + Date: Fri, 10 Jul 2015 01:01:07 +0100 Subject: Initial support for keyboard (in progress) but includes many viewer changes to plumb in Key Up events --- indra/newview/llmediactrl.cpp | 27 +++++++++++++++++++----- indra/newview/llmediactrl.h | 3 ++- indra/newview/llviewerkeyboard.cpp | 5 ++++- indra/newview/llviewerkeyboard.h | 1 + indra/newview/llviewermedia.cpp | 41 +++++++++++++++++++++++++++--------- indra/newview/llviewermedia.h | 1 + indra/newview/llviewermediafocus.cpp | 7 ++++++ indra/newview/llviewermediafocus.h | 1 + indra/newview/llviewerwindow.cpp | 38 +++++++++++++++++++++++++++++++-- indra/newview/llviewerwindow.h | 3 ++- 10 files changed, 107 insertions(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index b96bdd73ff..d1bb799015 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -410,18 +410,35 @@ void LLMediaCtrl::onOpenWebInspector() //////////////////////////////////////////////////////////////////////////////// // -BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) +BOOL LLMediaCtrl::handleKeyHere(KEY key, MASK mask) { BOOL result = FALSE; - + if (mMediaSource) { result = mMediaSource->handleKeyHere(key, mask); } - - if ( ! result ) + + if (!result) result = LLPanel::handleKeyHere(key, mask); - + + return result; +} + +//////////////////////////////////////////////////////////////////////////////// +// +BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask) +{ + BOOL result = FALSE; + + if (mMediaSource) + { + result = mMediaSource->handleKeyUpHere(key, mask); + } + + if (!result) + result = LLPanel::handleKeyUpHere(key, mask); + return result; } diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 785c57b78a..469ff38ee6 100755 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -150,7 +150,8 @@ public: void setTrustedContent(bool trusted); // over-rides - virtual BOOL handleKeyHere( KEY key, MASK mask); + virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual BOOL handleKeyUpHere(KEY key, MASK mask); virtual void onVisibilityChange ( BOOL new_visibility ); virtual BOOL handleUnicodeCharHere(llwchar uni_char); virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE); diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index ada829eb4b..1ab672aafc 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -729,7 +729,10 @@ BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL return mKeyHandledByUI[translated_key]; } - +BOOL LLViewerKeyboard::handleKeyUp(KEY translated_key, MASK translated_mask) +{ + return gViewerWindow->handleKeyUp(translated_key, translated_mask); +} BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name) { diff --git a/indra/newview/llviewerkeyboard.h b/indra/newview/llviewerkeyboard.h index ca73212ed1..110dc89d28 100755 --- a/indra/newview/llviewerkeyboard.h +++ b/indra/newview/llviewerkeyboard.h @@ -89,6 +89,7 @@ public: LLViewerKeyboard(); BOOL handleKey(KEY key, MASK mask, BOOL repeated); + BOOL handleKeyUp(KEY key, MASK mask); S32 loadBindings(const std::string& filename); // returns number bound, 0 on error S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index aa4943b8e8..60a5f99e19 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2698,27 +2698,48 @@ void LLViewerMediaImpl::navigateStop() bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask) { bool result = false; - + if (mMediaSource) { // FIXME: THIS IS SO WRONG. // Menu keys should be handled by the menu system and not passed to UI elements, but this is how LLTextEditor and LLLineEditor do it... - if( MASK_CONTROL & mask && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) + if (MASK_CONTROL & mask && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) { result = true; } - - if(!result) + + if (!result) { - + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); - - result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask, native_key_data); - // Since the viewer internal event dispatching doesn't give us key-up events, simulate one here. - (void)mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_UP ,key, mask, native_key_data); + result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN, key, mask, native_key_data); } } - + + return result; +} + +////////////////////////////////////////////////////////////////////////////////////////// +bool LLViewerMediaImpl::handleKeyUpHere(KEY key, MASK mask) +{ + bool result = false; + + if (mMediaSource) + { + // FIXME: THIS IS SO WRONG. + // Menu keys should be handled by the menu system and not passed to UI elements, but this is how LLTextEditor and LLLineEditor do it... + if (MASK_CONTROL & mask && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) + { + result = true; + } + + if (!result) + { + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); + result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_UP, key, mask, native_key_data); + } + } + return result; } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 6803adfaa2..f2da30e10b 100755 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -238,6 +238,7 @@ public: void navigateInternal(); void navigateStop(); bool handleKeyHere(KEY key, MASK mask); + bool handleKeyUpHere(KEY key, MASK mask); bool handleUnicodeCharHere(llwchar uni_char); bool canNavigateForward(); bool canNavigateBack(); diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index aa019dfdd8..1265ca0a70 100755 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -352,6 +352,13 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) return true; } +BOOL LLViewerMediaFocus::handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) +{ + return true; +} + + + BOOL LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) { LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index f03dd8751e..42c841df15 100755 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -56,6 +56,7 @@ public: /*virtual*/ bool getFocus(); /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + /*virtual*/ BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent); /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e317989f04..ed4acfddc4 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1399,10 +1399,9 @@ BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask) tool_inspectp->keyUp(key, mask); } - return FALSE; + return gViewerKeyboard.handleKeyUp(key, mask); } - void LLViewerWindow::handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) { LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); @@ -2542,6 +2541,41 @@ void LLViewerWindow::draw() //#endif } +// Takes a single keydown event, usually when UI is visible +BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask) +{ + if (gFocusMgr.getKeyboardFocus() + && !(mask & (MASK_CONTROL | MASK_ALT)) + && !gFocusMgr.getKeystrokesOnly()) + { + // We have keyboard focus, and it's not an accelerator + if (key < 0x80) + { + // Not a special key, so likely (we hope) to generate a character. Let it fall through to character handler first. + return (gFocusMgr.getKeyboardFocus() != NULL); + } + } + + LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus(); + if (keyboard_focus) + { + if (keyboard_focus->handleKeyUp(key, mask, FALSE)) + { + LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned true" << LL_ENDL; + LLViewerEventRecorder::instance().logKeyEvent(key, mask); + return TRUE; + } + else { + LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned FALSE" << LL_ENDL; + } + } + + // don't pass keys on to world when something in ui has focus + return gFocusMgr.childHasKeyboardFocus(mRootView) + || LLMenuGL::getKeyboardMode() + || (gMenuBarView && gMenuBarView->getHighlightedItem() && gMenuBarView->getHighlightedItem()->isActive()); +} + // Takes a single keydown event, usually when UI is visible BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 7fde52d4e1..dac6328eaa 100755 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -314,7 +314,8 @@ public: LLView* getHintHolder() { return mHintHolder.get(); } LLView* getLoginPanelHolder() { return mLoginPanelHolder.get(); } BOOL handleKey(KEY key, MASK mask); - void handleScrollWheel (S32 clicks); + BOOL handleKeyUp(KEY key, MASK mask); + void handleScrollWheel(S32 clicks); // add and remove views from "popup" layer void addPopup(LLView* popup); -- cgit v1.2.3 From f9929bb62eb79f80acd49c74f83edee0abc1ab66 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 10 Jul 2015 15:55:25 +0300 Subject: MAINT-5363 FIXED Selecting an inventory item plus an inventory link displays delete menu twice but both delete options are greyed out. --- indra/newview/llinventorybridge.cpp | 10 +--------- indra/newview/skins/default/xui/en/menu_inventory.xml | 8 -------- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ddf72bc8cf..31bca6b9a9 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -863,15 +863,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, return; } - // "Remove link" and "Delete" are the same operation. - if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) - { - items.push_back(std::string("Remove Link")); - } - else - { - items.push_back(std::string("Delete")); - } + items.push_back(std::string("Delete")); if (!isItemRemovable()) { diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 7099db63ab..c0dddfc625 100755 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -487,14 +487,6 @@ - - - Date: Mon, 13 Jul 2015 16:58:41 +0300 Subject: build fix for linux --- indra/newview/llfloaterabout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index d88a869d60..c5d637d1fc 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -111,13 +111,13 @@ private: void setSupportText(const std::string& server_release_notes_url); // notifications for user requested checks - static void LLFloaterAbout::showCheckUpdateNotification(S32 state); + static void showCheckUpdateNotification(S32 state); // callback method for manual checks - static bool LLFloaterAbout::callbackCheckUpdate(LLSD const & event); + static bool callbackCheckUpdate(LLSD const & event); // listener name for update checks - static const std::string LLFloaterAbout::sCheckUpdateListenerName; + static const std::string sCheckUpdateListenerName; }; -- cgit v1.2.3 From f2c82b096b994556cdcb7e31276e278d0327d392 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 13 Jul 2015 17:02:56 +0300 Subject: MAINT-5347 FIXED Set Landmark title field as the name of the region with coordinates, if the name of parcel is blank. --- indra/newview/llpanellandmarkinfo.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index d4894d4a42..06bb886ae8 100755 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -147,6 +147,7 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type) } else { + LLAgentUI::buildLocationString(desc, LLAgentUI::LOCATION_FORMAT_NORMAL, agent_pos); region_name = desc; } -- cgit v1.2.3 From 33c5a3974c210af259d3572193bcdcd65137d888 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 13 Jul 2015 17:52:42 +0300 Subject: MAINT-5369 FIXED Unable to accept group invite using Notification floater --- indra/newview/llfloaternotificationstabbed.cpp | 1 + indra/newview/llnotificationlistitem.cpp | 64 +++++++++++++++++++++- indra/newview/llnotificationlistitem.h | 10 ++++ .../xui/en/panel_notification_list_item.xml | 9 ++- 4 files changed, 81 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 70213680f3..57109c6763 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -385,6 +385,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLNotificationPtr notify = mChannel->getToastByNotificationID(id)->getNotification(); LLSD payload = notify->getPayload(); p.notification_name = notify->getName(); + p.transaction_id = payload["transaction_id"]; p.group_id = payload["group_id"]; p.fee = payload["fee"]; p.subject = payload["subject"].asString(); diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 8e7671897d..23a2399ed3 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -30,13 +30,14 @@ #include "llnotificationlistitem.h" #include "llagent.h" +#include "llgroupactions.h" #include "llinventoryicon.h" #include "llwindow.h" #include "v4color.h" #include "lltrans.h" #include "lluicolortable.h" #include "message.h" - +#include "llnotificationsutil.h" LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), mTitleBox(NULL), @@ -224,9 +225,70 @@ BOOL LLGroupInviteNotificationListItem::postBuild() { BOOL rv = LLGroupNotificationListItem::postBuild(); setFee(mParams.fee); + mInviteButtonPanel = getChild("button_panel"); + mInviteButtonPanel->setVisible(TRUE); + mJoinBtn = getChild("join_btn"); + mDeclineBtn = getChild("decline_btn"); + mInfoBtn = getChild("info_btn"); + + mJoinBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickJoinBtn,this)); + mDeclineBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickDeclineBtn,this)); + mInfoBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickInfoBtn,this)); + + std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment"); + mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str()); + return rv; } +void LLGroupInviteNotificationListItem::onClickJoinBtn() +{ + if (!gAgent.canJoinGroups()) + { + LLNotificationsUtil::add("JoinedTooManyGroups"); + return; + } + + if(mParams.fee > 0) + { + LLSD args; + args["COST"] = llformat("%d", mParams.fee); + // Set the fee for next time to 0, so that we don't keep + // asking about a fee. + LLSD next_payload; + next_payload["group_id"]= mParams.group_id; + next_payload["transaction_id"]= mParams.transaction_id; + next_payload["fee"] = 0; + LLNotificationsUtil::add("JoinGroupCanAfford", args, next_payload); + } + else + { + send_improved_im(mParams.group_id, + std::string("name"), + std::string("message"), + IM_ONLINE, + IM_GROUP_INVITATION_ACCEPT, + mParams.transaction_id); + } + LLNotificationListItem::onClickCloseBtn(); +} + +void LLGroupInviteNotificationListItem::onClickDeclineBtn() +{ + send_improved_im(mParams.group_id, + std::string("name"), + std::string("message"), + IM_ONLINE, + IM_GROUP_INVITATION_DECLINE, + mParams.transaction_id); + LLNotificationListItem::onClickCloseBtn(); +} + +void LLGroupInviteNotificationListItem::onClickInfoBtn() +{ + LLGroupActions::show(mParams.group_id); +} + void LLGroupInviteNotificationListItem::setFee(S32 fee) { LLStringUtil::format_map_t string_args; diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index f8d9fc0330..6801e77342 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -46,6 +46,7 @@ public: struct Params : public LLInitParam::Block { LLUUID notification_id; + LLUUID transaction_id; LLUUID group_id; LLUUID paid_from_id; LLUUID paid_to_id; @@ -160,6 +161,15 @@ private: LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &); void setFee(S32 fee); + + void onClickJoinBtn(); + void onClickDeclineBtn(); + void onClickInfoBtn(); + + LLPanel* mInviteButtonPanel; + LLButton* mJoinBtn; + LLButton* mDeclineBtn; + LLButton* mInfoBtn; }; class LLGroupNoticeNotificationListItem diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 3dbe11387a..6af0115a07 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -123,10 +123,15 @@ Attachment goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla . + + + + People Icons: + + -- cgit v1.2.3 From bc8fe00b991522ea310efd2eac3af24a11a05964 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 3 Sep 2015 19:21:49 +0300 Subject: MAINT-5268 (Rotating an object that's used as grid reference goes crazy) --- indra/newview/llmaniprotate.cpp | 4 ++-- indra/newview/llselectmgr.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index f172aa0955..aa520a728c 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -591,7 +591,7 @@ void LLManipRotate::drag( S32 x, S32 y ) continue; } } - + LLQuaternion new_rot = selectNode->mSavedRotation * mRotation; std::vector& child_positions = object->mUnselectedChildrenPositions ; std::vector child_rotations; @@ -1294,7 +1294,7 @@ LLVector3 LLManipRotate::getConstraintAxis() else { S32 axis_dir = mManipPart - LL_ROT_X; - if ((axis_dir >= 0) && (axis_dir < 3)) + if ((axis_dir >= LL_NO_PART) && (axis_dir < LL_Z_ARROW)) { axis.mV[axis_dir] = 1.f; } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 55bcb3dc65..49a7ab3280 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1235,7 +1235,13 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & } else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull()) { - mGridRotation = first_grid_object->getRenderRotation(); + LLSelectNode *node = mSelectedObjects->findNode(first_grid_object); + if (node) { + mGridRotation = node->mSavedRotation; + } + else { + mGridRotation = first_grid_object->getRenderRotation(); + } LLVector4a min_extents(F32_MAX); LLVector4a max_extents(-F32_MAX); -- cgit v1.2.3 From 236b3b9f842c86e1f176068ab70b82f83874e2ab Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 3 Sep 2015 18:16:46 -0700 Subject: support for external links and location_changed messages --- indra/newview/llmediactrl.cpp | 30 +++++++++++++---------- indra/newview/skins/default/xui/en/menu_login.xml | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index d1bb799015..40d352f9b7 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -993,19 +993,23 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) std::string target = self->getClickTarget(); std::string uuid = self->getClickUUID(); - LLNotification::Params notify_params; - notify_params.name = "PopupAttempt"; - notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", mMediaTextureID); - notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2); - - if (mTrusted) - { - LLNotifications::instance().forceResponse(notify_params, 0); - } - else - { - LLNotifications::instance().add(notify_params); - } + LLWeb::loadURL(url, target, std::string()); + + // CP: removing this code because we no longer support popups so this breaks the flow. + // replaced with a bare call to LLWeb::LoadURL(...) + //LLNotification::Params notify_params; + //notify_params.name = "PopupAttempt"; + //notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", mMediaTextureID); + //notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2); + + //if (mTrusted) + //{ + // LLNotifications::instance().forceResponse(notify_params, 0); + //} + //else + //{ + // LLNotifications::instance().add(notify_params); + //} break; }; diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index e91eea04d1..f59c5e35a6 100755 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -230,7 +230,7 @@ name="Web Content Floater Debug Test"> + parameter="https://callum-linden.s3.amazonaws.com/ceftests.html"/> Date: Thu, 3 Sep 2015 19:59:57 -0700 Subject: point to new version of llceflib with fixed support for secondlife:// URLs --- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2463c5f43b..a633ef3a52 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3185,7 +3185,7 @@ shortcut="control|shift|Z"> + parameter="https://callum-linden.s3.amazonaws.com/ceftests.html"/> Date: Fri, 4 Sep 2015 17:59:31 +0300 Subject: MAINT-5488 ADD FIX [Experience Tools] Opening an experience compiled script in an object in an adjacent region fails to show the script is compiled with an experience in the script editor. This change is needed for related MAINT-5470 --- indra/newview/llexperienceassociationresponder.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llexperienceassociationresponder.cpp b/indra/newview/llexperienceassociationresponder.cpp index 7f2363aadc..f62ca7d75f 100644 --- a/indra/newview/llexperienceassociationresponder.cpp +++ b/indra/newview/llexperienceassociationresponder.cpp @@ -51,10 +51,18 @@ void ExperienceAssociationResponder::fetchAssociatedExperience(LLSD& request, ca LLViewerObject* object = gObjectList.findObject(request["object-id"]); if (!object) { - LL_WARNS() << "Failed to find object with ID " << request["object-id"] << " in fetchAssociatedExperience" << LL_ENDL; - return; + LL_DEBUGS() << "Object with ID " << request["object-id"] << " not found via gObjectList.findObject() in fetchAssociatedExperience" << LL_ENDL; + LL_DEBUGS() << "Using gAgent.getRegion() instead of object->getRegion()" << LL_ENDL; + } + LLViewerRegion* region = NULL; + if (object) + { + region = object->getRegion(); + } + else + { + region = gAgent.getRegion(); } - LLViewerRegion* region = object->getRegion(); if (region) { std::string lookup_url=region->getCapability("GetMetadata"); @@ -66,6 +74,10 @@ void ExperienceAssociationResponder::fetchAssociatedExperience(LLSD& request, ca LLHTTPClient::post(lookup_url, request, new ExperienceAssociationResponder(callback)); } } + else + { + LL_WARNS() << "Failed to lookup region in fetchAssociatedExperience. Fetch request not sent." << LL_ENDL; + } } void ExperienceAssociationResponder::httpFailure() -- cgit v1.2.3 From 67757ddd5b1196ebab004095e202d9dc012f520f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 4 Sep 2015 21:06:22 +0300 Subject: MAINT-5416 FIXED Cannot right-click a rigged mesh that's worn --HG-- branch : maint-5416 --- indra/newview/llspatialpartition.cpp | 17 ++++++++++------- indra/newview/llspatialpartition.h | 1 + indra/newview/lltooldraganddrop.cpp | 4 ++-- indra/newview/lltoolpie.cpp | 6 +++--- indra/newview/lltoolplacer.cpp | 2 +- indra/newview/lltoolselect.cpp | 2 +- indra/newview/lltoolselectrect.cpp | 2 +- indra/newview/llviewerobject.cpp | 1 + indra/newview/llviewerobject.h | 1 + indra/newview/llviewerwindow.cpp | 25 +++++++++++++++---------- indra/newview/llviewerwindow.h | 6 +++++- indra/newview/llvoavatar.cpp | 4 +++- indra/newview/llvoavatar.h | 2 ++ indra/newview/llvograss.cpp | 2 +- indra/newview/llvograss.h | 1 + indra/newview/llvopartgroup.cpp | 1 + indra/newview/llvopartgroup.h | 1 + indra/newview/llvosurfacepatch.cpp | 2 +- indra/newview/llvosurfacepatch.h | 1 + indra/newview/llvotree.cpp | 2 +- indra/newview/llvotree.h | 1 + indra/newview/llvovolume.cpp | 16 +++++++--------- indra/newview/llvovolume.h | 3 ++- indra/newview/pipeline.cpp | 13 +++++++------ indra/newview/pipeline.h | 1 + 25 files changed, 71 insertions(+), 46 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 5e342099d7..22944493c9 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3770,8 +3770,9 @@ public: LLVector4a *mTangent; LLDrawable* mHit; BOOL mPickTransparent; + BOOL mPickRigged; - LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, + LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) : mStart(start), mEnd(end), @@ -3781,7 +3782,8 @@ public: mNormal(normal), mTangent(tangent), mHit(NULL), - mPickTransparent(pick_transparent) + mPickTransparent(pick_transparent), + mPickRigged(pick_rigged) { } @@ -3864,9 +3866,9 @@ public: if (vobj->isAvatar()) { LLVOAvatar* avatar = (LLVOAvatar*) vobj; - if (avatar->isSelf() && LLFloater::isVisible(gFloaterTools)) + if ((mPickRigged) || ((avatar->isSelf()) && (LLFloater::isVisible(gFloaterTools)))) { - LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); + LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent); if (hit) { mEnd = intersection; @@ -3882,7 +3884,7 @@ public: } } - if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) + if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) { mEnd = intersection; // shorten ray so we only find CLOSER hits if (mIntersection) @@ -3900,7 +3902,8 @@ public: } LL_ALIGN_POSTFIX(16); LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -3909,7 +3912,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co ) { - LLOctreeIntersect intersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent); + LLOctreeIntersect intersect(start, end, pick_transparent, pick_rigged, face_hit, intersection, tex_coord, normal, tangent); LLDrawable* drawable = intersect.check(mOctree); return drawable; diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 08a4d00d0f..7633e46200 100755 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -386,6 +386,7 @@ public: LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index ff71028a9b..78d9c7a3f4 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -861,12 +861,12 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep if (mDrop) { // don't allow drag and drop onto transparent objects - pick(gViewerWindow->pickImmediate(x, y, FALSE)); + pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE)); } else { // don't allow drag and drop onto transparent objects - gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE); } *acceptance = mLastAccept; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 2081297717..904cf32ec8 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -107,7 +107,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mMouseDownY = y; //left mouse down always picks transparent - mPick = gViewerWindow->pickImmediate(x, y, TRUE); + mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); mPick.mKeyMask = mask; mMouseButtonDown = true; @@ -546,7 +546,7 @@ void LLToolPie::selectionPropertiesReceived() BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) { - mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE); + mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace); @@ -592,7 +592,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) else { // perform a separate pick that detects transparent objects since they respond to 1-click actions - LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE); + LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); LLViewerObject* click_action_object = click_action_pick.getObject(); diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index ceb57d0172..814bade56a 100755 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -80,7 +80,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, // Viewer-side pick to find the right sim to create the object on. // First find the surface the object will be created on. - LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE); + LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); // Note: use the frontmost non-flora version because (a) plants usually have lots of alpha and (b) pants' Havok // representations (if any) are NOT the same as their viewer representation. diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 812abe9dbd..1fcc9a0711 100755 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -63,7 +63,7 @@ LLToolSelect::LLToolSelect( LLToolComposite* composite ) BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) { // do immediate pick query - mPick = gViewerWindow->pickImmediate(x, y, TRUE); + mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); // Pass mousedown to agent LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index c5616fb208..71dc8001d4 100755 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -71,7 +71,7 @@ void dialog_refresh_all(void); BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask) { - handlePick(gViewerWindow->pickImmediate(x, y, TRUE)); + handlePick(gViewerWindow->pickImmediate(x, y, TRUE, FALSE)); LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index c4d3829ee9..2153754d3f 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4098,6 +4098,7 @@ LLViewerObject* LLViewerObject::getRootEdit() const BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 65d6f8225f..95654ae1ff 100755 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -268,6 +268,7 @@ public: virtual BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ba84d7aa2c..0e30c79796 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1137,7 +1137,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (prim_media_dnd_enabled) { - LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/ ); + LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/, FALSE ); LLUUID object_id = pick_info.getObjectID(); S32 object_face = pick_info.mObjectFace; @@ -2936,7 +2936,7 @@ void LLViewerWindow::updateUI() if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) { gDebugRaycastFaceHit = -1; - gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, + gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, &gDebugRaycastFaceHit, &gDebugRaycastIntersection, &gDebugRaycastTexCoord, @@ -3764,6 +3764,7 @@ void LLViewerWindow::pickAsync( S32 x, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent, + BOOL pick_rigged, BOOL pick_unselectable) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); @@ -3774,7 +3775,7 @@ void LLViewerWindow::pickAsync( S32 x, pick_transparent = TRUE; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, pick_unselectable, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, callback); schedulePick(pick_info); } @@ -3830,7 +3831,7 @@ void LLViewerWindow::returnEmptyPicks() } // Performs the GL object/land pick. -LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_particle) +LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) @@ -3842,7 +3843,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans // shortcut queueing in mPicks and just update mLastPick in place MASK key_mask = gKeyboard->currentMask(TRUE); - mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, FALSE, NULL); + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, TRUE, FALSE, NULL); mLastPick.fetchResults(); return mLastPick; @@ -3878,6 +3879,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de LLViewerObject *this_object, S32 this_face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a *intersection, LLVector2 *uv, @@ -3948,7 +3950,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de { if (this_object->isHUDAttachment()) // is a HUD object? { - if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, + if (this_object->lineSegmentIntersect(mh_start, mh_end, this_face, pick_transparent, pick_rigged, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -3956,7 +3958,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de } else // is a world object { - if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, + if (this_object->lineSegmentIntersect(mw_start, mw_end, this_face, pick_transparent, pick_rigged, face_hit, intersection, uv, normal, tangent)) { found = this_object; @@ -3970,7 +3972,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de if (!found) // if not found in HUD, look in world: { - found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, + found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, face_hit, intersection, uv, normal, tangent); if (found && !pick_transparent) { @@ -5246,6 +5248,7 @@ LLPickInfo::LLPickInfo() mBinormal(), mHUDIcon(NULL), mPickTransparent(FALSE), + mPickRigged(FALSE), mPickParticle(FALSE) { } @@ -5253,6 +5256,7 @@ LLPickInfo::LLPickInfo() LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, BOOL pick_transparent, + BOOL pick_rigged, BOOL pick_particle, BOOL pick_uv_coords, BOOL pick_unselectable, @@ -5271,6 +5275,7 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, mBinormal(), mHUDIcon(NULL), mPickTransparent(pick_transparent), + mPickRigged(pick_rigged), mPickParticle(pick_particle), mPickUnselectable(pick_unselectable) { @@ -5302,7 +5307,7 @@ void LLPickInfo::fetchResults() } LLViewerObject* hit_object = gViewerWindow->cursorIntersect(mMousePt.mX, mMousePt.mY, 512.f, - NULL, -1, mPickTransparent, &face_hit, + NULL, -1, mPickTransparent, mPickRigged, &face_hit, &intersection, &uv, &normal, &tangent, &start, &end); mPickPt = mMousePt; @@ -5447,7 +5452,7 @@ void LLPickInfo::getSurfaceInfo() if (objectp) { if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f, - objectp, -1, mPickTransparent, + objectp, -1, mPickTransparent, mPickRigged, &mObjectFace, &intersection, &mSTCoords, diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 7fde52d4e1..52f51d4c97 100755 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -89,6 +89,7 @@ public: LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, BOOL pick_transparent, + BOOL pick_rigged, BOOL pick_particle, BOOL pick_surface_info, BOOL pick_unselectable, @@ -123,6 +124,7 @@ public: LLVector4 mTangent; LLVector3 mBinormal; BOOL mPickTransparent; + BOOL mPickRigged; BOOL mPickParticle; BOOL mPickUnselectable; void getSurfaceInfo(); @@ -367,8 +369,9 @@ public: MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, BOOL pick_unselectable = FALSE); - LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE); + LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE); LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth, LLVector4a* intersection); @@ -376,6 +379,7 @@ public: LLViewerObject *this_object = NULL, S32 this_face = -1, BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, LLVector4a *intersection = NULL, LLVector2 *uv = NULL, diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b97a1bde99..6f7b23ba01 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1511,6 +1511,7 @@ void LLVOAvatar::renderJoints() BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -1610,6 +1611,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -1640,7 +1642,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector { LLViewerObject* attached_object = (*attachment_iter); - if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, face_hit, &local_intersection, tex_coord, normal, tangent)) + if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent)) { local_end = local_intersection; if (intersection) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 5b4379165a..09d8662034 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -165,6 +165,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -173,6 +174,7 @@ public: LLViewerObject* lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 8d8f33b601..de63a3963c 100755 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -770,7 +770,7 @@ void LLVOGrass::updateDrawable(BOOL force_damped) } // virtual -BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index 71d358362d..5634e048eb 100755 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -78,6 +78,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 1ba0868544..6e5db526b0 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -469,6 +469,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index a94a2291ed..2ef8b1c848 100755 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -72,6 +72,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 79e1921f1b..897bace4e1 100755 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -936,7 +936,7 @@ void LLVOSurfacePatch::getGeomSizesEast(const S32 stride, const S32 east_stride, } } -BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index 3383b16dd9..884dbb3be3 100755 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -84,6 +84,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 367fa21b91..4dcc267e96 100755 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -1110,7 +1110,7 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) mDrawable->setPositionGroup(pos); } -BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index c862de8230..c16ed70bb4 100755 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -108,6 +108,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4b0e4514a0..46e853c1e0 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3883,7 +3883,7 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const } -BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp, +BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { @@ -3902,9 +3902,9 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& if (mDrawable->isState(LLDrawable::RIGGED)) { - if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf()) + if ((pick_rigged) || ((getAvatar()->isSelf()) && (LLFloater::isVisible(gFloaterTools)))) { - updateRiggedVolume(); + updateRiggedVolume(true); volume = mRiggedVolume; transform = false; } @@ -4083,10 +4083,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& bool LLVOVolume::treatAsRigged() { - return LLFloater::isVisible(gFloaterTools) && - isAttachment() && - getAvatar() && - getAvatar()->isSelf() && + return isSelected() && + isAttachment() && mDrawable.notNull() && mDrawable->isState(LLDrawable::RIGGED); } @@ -4105,12 +4103,12 @@ void LLVOVolume::clearRiggedVolume() } } -void LLVOVolume::updateRiggedVolume() +void LLVOVolume::updateRiggedVolume(bool force_update) { //Update mRiggedVolume to match current animation frame of avatar. //Also update position/size in octree. - if (!treatAsRigged()) + if ((!force_update) && (!treatAsRigged())) { clearRiggedVolume(); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index ff7438ac09..de87c85c89 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -140,6 +140,7 @@ public: /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -312,7 +313,7 @@ public: //rigged volume update (for raycasting) - void updateRiggedVolume(); + void updateRiggedVolume(bool force_update = false); LLRiggedVolume* getRiggedVolume(); //returns true if volume should be treated as a rigged volume diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 03712c1065..3c58ce0c09 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7059,7 +7059,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, face_hit, &position, NULL, NULL, NULL); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, FALSE, face_hit, &position, NULL, NULL, NULL); if (hit) { drawable = hit; @@ -7085,7 +7085,8 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, } LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -7117,7 +7118,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(j); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent); if (hit) { drawable = hit; @@ -7174,7 +7175,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent); if (hit) { LLVector4a delta; @@ -7262,7 +7263,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD); if (part) { - LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, face_hit, intersection, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, face_hit, intersection, tex_coord, normal, tangent); if (hit) { drawable = hit; @@ -7709,7 +7710,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) LLVector4a result; result.clear(); - gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, + gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, NULL, &result); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index ce2f4b17b1..97e11a151f 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -183,6 +183,7 @@ public: //get the object between start and end that's closest to start. LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, + BOOL pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point -- cgit v1.2.3 From 9ce8f7bfb425bc71942a654447fdddd430a3d250 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 7 Sep 2015 02:59:36 +0300 Subject: MAINT-5602 FIXED Viewer crashes when loading physics from file --HG-- branch : develop --- indra/newview/llfloatermodelpreview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 20ba7548e5..a2a1dfbdb8 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3768,7 +3768,7 @@ BOOL LLModelPreview::render() genBuffers(LLModel::LOD_PHYSICS, false); } - U32 num_models = mVertexBuffer[mPreviewLOD][model].size(); + U32 num_models = mVertexBuffer[LLModel::LOD_PHYSICS][model].size(); for (U32 i = 0; i < num_models; ++i) { LLVertexBuffer* buffer = mVertexBuffer[LLModel::LOD_PHYSICS][model][i]; -- cgit v1.2.3 From 9bfd0f75c3e18a4743e4b5f7e0d5d15d99aca656 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 8 Sep 2015 20:08:07 +0300 Subject: MAINT-5268 (Rotating an object that's used as grid reference goes crazy) - changeset 2 --- indra/newview/llmaniprotate.cpp | 2 +- indra/newview/llselectmgr.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index aa520a728c..e917b0ae52 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -591,7 +591,7 @@ void LLManipRotate::drag( S32 x, S32 y ) continue; } } - + LLQuaternion new_rot = selectNode->mSavedRotation * mRotation; std::vector& child_positions = object->mUnselectedChildrenPositions ; std::vector child_rotations; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 49a7ab3280..577c336ac7 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1236,10 +1236,12 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull()) { LLSelectNode *node = mSelectedObjects->findNode(first_grid_object); - if (node) { + if (node) + { mGridRotation = node->mSavedRotation; } - else { + else + { mGridRotation = first_grid_object->getRenderRotation(); } -- cgit v1.2.3 From b996f2ca55b31ed055233e59bf356a84632c9e10 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 9 Sep 2015 16:22:40 +0300 Subject: MAINT-5588 FIXED Make bumpiness and shininess easier to find in the texture tab, with radio buttons --- indra/newview/llpanelface.cpp | 70 +++++++++++----------- .../skins/default/xui/en/panel_tools_texture.xml | 55 ++++++++++------- 2 files changed, 67 insertions(+), 58 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index afc1a789c4..21d8b4248c 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -49,6 +49,7 @@ #include "llmaterialmgr.h" #include "llmediaentry.h" #include "llnotificationsutil.h" +#include "llradiogroup.h" #include "llresmgr.h" #include "llselectmgr.h" #include "llspinctrl.h" @@ -90,10 +91,10 @@ std::string USE_TEXTURE; LLRender::eTexIndex LLPanelFace::getTextureChannelToEdit() { LLComboBox* combobox_matmedia = getChild("combobox matmedia"); - LLComboBox* combobox_mattype = getChild("combobox mattype"); + LLRadioGroup* radio_mat_type = getChild("radio_material_type"); LLRender::eTexIndex channel_to_edit = (combobox_matmedia && combobox_matmedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? - (combobox_mattype ? (LLRender::eTexIndex)combobox_mattype->getCurrentIndex() : LLRender::DIFFUSE_MAP) : LLRender::DIFFUSE_MAP; + (radio_mat_type ? (LLRender::eTexIndex)radio_mat_type->getSelectedIndex() : LLRender::DIFFUSE_MAP) : LLRender::DIFFUSE_MAP; channel_to_edit = (channel_to_edit == LLRender::NORMAL_MAP) ? (getCurrentNormalMap().isNull() ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit; channel_to_edit = (channel_to_edit == LLRender::SPECULAR_MAP) ? (getCurrentSpecularMap().isNull() ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit; @@ -162,7 +163,6 @@ BOOL LLPanelFace::postBuild() LLComboBox* mComboTexGen; LLComboBox* mComboMatMedia; - LLComboBox* mComboMatType; LLCheckBoxCtrl *mCheckFullbright; @@ -283,12 +283,12 @@ BOOL LLPanelFace::postBuild() mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL); } - mComboMatType = getChild("combobox mattype"); - if(mComboMatType) - { - mComboMatType->setCommitCallback(LLPanelFace::onCommitMaterialType, this); - mComboMatType->selectNthItem(MATTYPE_DIFFUSE); - } + LLRadioGroup* radio_mat_type = getChild("radio_material_type"); + if(radio_mat_type) + { + radio_mat_type->setCommitCallback(LLPanelFace::onCommitMaterialType, this); + radio_mat_type->selectNthItem(MATTYPE_DIFFUSE); + } mCtrlGlow = getChild("glow"); if(mCtrlGlow) @@ -676,20 +676,21 @@ void LLPanelFace::updateUI() } getChildView("combobox matmedia")->setEnabled(editable); - LLComboBox* combobox_mattype = getChild("combobox mattype"); - if (combobox_mattype) + LLRadioGroup* radio_mat_type = getChild("radio_material_type"); + if(radio_mat_type) { - if (combobox_mattype->getCurrentIndex() < MATTYPE_DIFFUSE) - { - combobox_mattype->selectNthItem(MATTYPE_DIFFUSE); - } + if (radio_mat_type->getSelectedIndex() < MATTYPE_DIFFUSE) + { + radio_mat_type->selectNthItem(MATTYPE_DIFFUSE); + } + } else { - LL_WARNS("Materials") << "failed getChild for 'combobox mattype'" << LL_ENDL; + LL_WARNS("Materials") << "failed getChild for 'radio_material_type'" << LL_ENDL; } - getChildView("combobox mattype")->setEnabled(editable); + getChildView("radio_material_type")->setEnabled(editable); updateVisibility(); bool identical = true; // true because it is anded below @@ -1200,8 +1201,7 @@ void LLPanelFace::updateUI() BOOL identical_repeats = true; F32 repeats = 1.0f; - U32 material_type = (combobox_matmedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? combobox_mattype->getCurrentIndex() : MATTYPE_DIFFUSE; - + U32 material_type = (combobox_matmedia->getCurrentIndex() == MATMEDIA_MATERIAL) ? radio_mat_type->getSelectedIndex() : MATTYPE_DIFFUSE; LLSelectMgr::getInstance()->setTextureChannel(LLRender::eTexIndex(material_type)); switch (material_type) @@ -1466,22 +1466,21 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata) void LLPanelFace::updateVisibility() { LLComboBox* combo_matmedia = getChild("combobox matmedia"); - LLComboBox* combo_mattype = getChild("combobox mattype"); + LLRadioGroup* radio_mat_type = getChild("radio_material_type"); LLComboBox* combo_shininess = getChild("combobox shininess"); LLComboBox* combo_bumpiness = getChild("combobox bumpiness"); - if (!combo_mattype || !combo_matmedia || !combo_shininess || !combo_bumpiness) + if (!radio_mat_type || !combo_matmedia || !combo_shininess || !combo_bumpiness) { LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL; return; } U32 materials_media = combo_matmedia->getCurrentIndex(); - U32 material_type = combo_mattype->getCurrentIndex(); + U32 material_type = radio_mat_type->getSelectedIndex(); bool show_media = (materials_media == MATMEDIA_MEDIA) && combo_matmedia->getEnabled(); bool show_texture = (show_media || ((material_type == MATTYPE_DIFFUSE) && combo_matmedia->getEnabled())); bool show_bumpiness = (!show_media) && (material_type == MATTYPE_NORMAL) && combo_matmedia->getEnabled(); bool show_shininess = (!show_media) && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled(); - getChildView("combobox mattype")->setVisible(!show_media); - getChildView("rptctrl")->setVisible(true); + getChildView("radio_material_type")->setVisible(!show_media); // Media controls getChildView("media_info")->setVisible(show_media); @@ -1608,9 +1607,9 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh } LLComboBox* combo_matmedia = getChild("combobox matmedia"); - LLComboBox* combo_mattype = getChild("combobox mattype"); + LLRadioGroup* radio_mat_type = getChild("radio_material_type"); U32 materials_media = combo_matmedia->getCurrentIndex(); - U32 material_type = combo_mattype->getCurrentIndex(); + U32 material_type = radio_mat_type->getSelectedIndex(); bool show_media = (materials_media == MATMEDIA_MEDIA) && combo_matmedia->getEnabled(); bool show_shininess = (!show_media) && (material_type == MATTYPE_SPECULAR) && combo_matmedia->getEnabled(); U32 shiny_value = comboShiny->getCurrentIndex(); @@ -1693,11 +1692,11 @@ void LLPanelFace::updateAlphaControls() mat_media = combobox_matmedia->getCurrentIndex(); } - LLComboBox* combobox_mattype = getChild("combobox mattype"); U32 mat_type = MATTYPE_DIFFUSE; - if (combobox_mattype) + LLRadioGroup* radio_mat_type = getChild("radio_material_type"); + if(radio_mat_type) { - mat_type = combobox_mattype->getCurrentIndex(); + mat_type = radio_mat_type->getSelectedIndex(); } show_alphactrls = show_alphactrls && (mat_media == MATMEDIA_MATERIAL); @@ -1985,12 +1984,11 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata) LLUICtrl* repeats_ctrl = self->getChild("rptctrl"); LLComboBox* combo_matmedia = self->getChild("combobox matmedia"); - LLComboBox* combo_mattype = self->getChild("combobox mattype"); + LLRadioGroup* radio_mat_type = self->getChild("radio_material_type"); U32 materials_media = combo_matmedia->getCurrentIndex(); - - U32 material_type = (materials_media == MATMEDIA_MATERIAL) ? combo_mattype->getCurrentIndex() : 0; + U32 material_type = (materials_media == MATMEDIA_MATERIAL) ? radio_mat_type->getSelectedIndex() : 0; F32 repeats_per_meter = repeats_ctrl->getValue().asReal(); F32 obj_scale_s = 1.0f; @@ -2114,12 +2112,12 @@ void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata) void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp) { LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL; - LLComboBox* combo_mattype = getChild("combobox mattype"); - if (!combo_mattype) + LLRadioGroup* radio_mat_type = getChild("radio_material_type"); + if(radio_mat_type) { - return; + return; } - U32 mattype = combo_mattype->getCurrentIndex(); + U32 mattype = radio_mat_type->getSelectedIndex(); std::string which_control="texture control"; switch (mattype) { diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index cb6b2fafd8..a90bb18d48 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -117,26 +117,37 @@ name="Media" value="Media" /> - - - - - + + + + + Mapping -- cgit v1.2.3 From 744c1453ed595681cb30badfdd2cfc0bb4c6ccb3 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 10 Sep 2015 11:22:35 +0300 Subject: MAINT-909 FIXED Opening a notecard with the same name as one that is already open does not work --- indra/newview/llassetuploadresponders.cpp | 5 ++++- indra/newview/llpanelobjectinventory.cpp | 5 ++++- indra/newview/llpreviewnotecard.cpp | 16 +++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index d2b1dcbf35..121ce647a6 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -618,7 +618,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content) case LLAssetType::AT_NOTECARD: { // Update the UI with the new asset. - LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance("preview_notecard", LLSD(item_id)); + LLSD floater_key; + floater_key["taskid"] = task_id; + floater_key["itemid"] = item_id; + LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance("preview_notecard", floater_key); if(nc) { // *HACK: we have to delete the asset in the VFS so diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index c8af5b6718..7e65ccad98 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1171,7 +1171,10 @@ void LLTaskNotecardBridge::openItem() || object->permModify() || gAgent.isGodlike()) { - LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES); + LLSD floater_key; + floater_key["taskid"] = mPanel->getTaskUUID(); + floater_key["itemid"] = mUUID; + LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance("preview_notecard", floater_key, TAKE_FOCUS_YES); if (preview) { preview->setObjectID(mPanel->getTaskUUID()); diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 9f88b0db5f..f100c996b3 100755 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -233,6 +233,7 @@ void LLPreviewNotecard::loadAsset() else { LLHost source_sim = LLHost::invalid; + LLSD* user_data = new LLSD(); if (mObjectUUID.notNull()) { LLViewerObject *objectp = gObjectList.findObject(mObjectUUID); @@ -251,7 +252,13 @@ void LLPreviewNotecard::loadAsset() mAssetStatus = PREVIEW_ASSET_LOADED; return; } + user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID); } + else + { + user_data = new LLSD(mItemUUID); + } + gAssetStorage->getInvItemAsset(source_sim, gAgent.getID(), gAgent.getSessionID(), @@ -261,7 +268,7 @@ void LLPreviewNotecard::loadAsset() item->getAssetUUID(), item->getType(), &onLoadComplete, - (void*)new LLUUID(mItemUUID), + (void*)user_data, TRUE); mAssetStatus = PREVIEW_ASSET_LOADING; } @@ -304,9 +311,8 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, void* user_data, S32 status, LLExtStat ext_status) { LL_INFOS() << "LLPreviewNotecard::onLoadComplete()" << LL_ENDL; - LLUUID* item_id = (LLUUID*)user_data; - - LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance("preview_notecard", LLSD(*item_id)); + LLSD* floater_key = (LLSD*)user_data; + LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance("preview_notecard", *floater_key); if( preview ) { if(0 == status) @@ -362,7 +368,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, preview->mAssetStatus = PREVIEW_ASSET_ERROR; } } - delete item_id; + delete floater_key; } // static -- cgit v1.2.3 From 7048679ac8c6cea9238c1602d75ead4d983cdbc0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 10 Sep 2015 16:16:50 +0300 Subject: MAINT-5584 FIXED On voice disabled parcel or region, speak button remains disabled in ad-hoc and group voice calls - you can hear but not speak. --- indra/newview/llagent.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 297bd9a05b..3f32be1d68 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -275,9 +275,24 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) if (param == "speak") { - if ( gAgent.isVoiceConnected() && - LLViewerParcelMgr::getInstance()->allowAgentVoice() && - ! LLVoiceClient::getInstance()->inTuningMode() ) + bool allow_agent_voice = false; + LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel(); + if (channel != NULL) + { + if (channel->getSessionName().empty() && channel->getSessionID().isNull()) + { + // default channel + allow_agent_voice = LLViewerParcelMgr::getInstance()->allowAgentVoice(); + } + else + { + allow_agent_voice = channel->isActive() && channel->callStarted(); + } + } + + if (gAgent.isVoiceConnected() && + allow_agent_voice && + !LLVoiceClient::getInstance()->inTuningMode()) { retval = true; } -- cgit v1.2.3 From 0466ba380f11b30319f9dffd7e833f314829a12c Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 10 Sep 2015 13:55:27 -0700 Subject: MAINT-5619 : Viewer seems to parse LSL syntax file three times, has warnings --- .../newview/app_settings/keywords_lsl_default.xml | 611 ++++++++++++++++++++- 1 file changed, 610 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml index cea7a58949..ddd287faf4 100755 --- a/indra/newview/app_settings/keywords_lsl_default.xml +++ b/indra/newview/app_settings/keywords_lsl_default.xml @@ -2314,6 +2314,15 @@ tooltip Gets the attachment point to which the object is attached.\nReturns 0 if the object is not an attachment (or is an avatar, etc). + OBJECT_BODY_SHAPE_TYPE + + type + integer + value + 26 + tooltip + This is a flag used with llGetObjectDetails to get the body type of the avatar, based on shape data.\nIf no data is available, -1.0 is returned.\nThis is normally between 0 and 1.0, with 0.5 and larger considered 'male' + OBJECT_CHARACTER_TIME type @@ -2323,6 +2332,15 @@ tooltip Units in seconds + OBJECT_CLICK_ACTION + + type + integer + value + 28 + tooltip + This is a flag used with llGetObjectDetails to get the click action.\nThe default is 0 + OBJECT_CREATOR type @@ -2350,6 +2368,24 @@ tooltip Gets the prims's group key. If id is an avatar, a NULL_KEY is returned. + OBJECT_HOVER_HEIGHT + + type + integer + value + 25 + tooltip + This is a flag used with llGetObjectDetails to get hover height of the avatar\nIf no data is available, 0.0 is returned. + + OBJECT_LAST_OWNER_ID + + type + integer + value + 27 + tooltip + Gets the object's last owner ID. + OBJECT_NAME type @@ -3277,6 +3313,51 @@ tooltip Play animation going forwards, then backwards. + PRIM_ALPHA_MODE + + type + integer + value + 38 + tooltip + Prim parameter for materials using integer face, integer alpha_mode, integer alpha_cutoff.\nDefines how the alpha channel of the diffuse texture should be rendered.\nValid options for alpha_mode are PRIM_ALPHA_MODE_BLEND, _NONE, _MASK, and _EMISSIVE.\nalpha_cutoff is used only for PRIM_ALPHA_MODE_MASK. + + PRIM_ALPHA_MODE_NONE + + type + integer + value + 0 + tooltip + Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be ignored. + + PRIM_ALPHA_MODE_BLEND + + type + integer + value + 1 + tooltip + Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be rendered as alpha-blended. + + PRIM_ALPHA_MODE_MASK + + type + integer + value + 2 + tooltip + Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be rendered as fully opaque for alpha values above alpha_cutoff and fully transparent otherwise. + + PRIM_ALPHA_MODE_EMISSIVE + + type + integer + value + 3 + tooltip + Prim parameter setting for PRIM_ALPHA_MODE.\nIndicates that the diffuse texture's alpha channel should be rendered as an emissivity mask. + PRIM_BUMP_BARK type @@ -3882,6 +3963,15 @@ tooltip + PRIM_NORMAL + + type + integer + value + 37 + tooltip + Prim parameter for materials using integer face, string texture, vector repeats, vector offsets, float rotation_in_radians + PRIM_OMEGA type @@ -4108,6 +4198,15 @@ tooltip + PRIM_SPECULAR + + type + integer + value + 36 + tooltip + Prim parameter for materials using integer face, string texture, vector repeats, vector offsets, float rotation_in_radians, vector color, integer glossy, integer environment + PRIM_TEMP_ON_REZ type @@ -5020,6 +5119,15 @@ tooltip + REGION_FLAG_BLOCK_FLYOVER + + type + integer + value + 0x8000000 + tooltip + + REGION_FLAG_BLOCK_TERRAFORM type @@ -5979,6 +6087,177 @@ tooltip + XP_ERROR_EXPERIENCES_DISABLED + + type + integer + value + 2 + tooltip + The region currently has experiences disabled. + + XP_ERROR_EXPERIENCE_DISABLED + + type + integer + value + 8 + tooltip + The experience owner has temporarily disabled the experience. + + XP_ERROR_EXPERIENCE_SUSPENDED + + type + integer + value + 9 + tooltip + The experience has been suspended by Linden Customer Support. + + XP_ERROR_INVALID_EXPERIENCE + + type + integer + value + 7 + tooltip + The script is associated with an experience that no longer exists. + + XP_ERROR_INVALID_PARAMETERS + + type + integer + value + 3 + tooltip + One of the string arguments was too big to fit in the key-value store. + + XP_ERROR_KEY_NOT_FOUND + + type + integer + value + 14 + tooltip + The requested key does not exist. + + XP_ERROR_MATURITY_EXCEEDED + + type + integer + value + 16 + tooltip + The content rating of the experience exceeds that of the region. + + XP_ERROR_NONE + + type + integer + value + 0 + tooltip + No error was detected. + + XP_ERROR_NOT_FOUND + + type + integer + value + 6 + tooltip + The sim was unable to verify the validity of the experience. Retrying after a short wait is advised. + + XP_ERROR_NOT_PERMITTED + + type + integer + value + 4 + tooltip + This experience is not allowed to run by the requested agent. + + XP_ERROR_NOT_PERMITTED_LAND + + type + integer + value + 17 + tooltip + This experience is not allowed to run on the current region. + + XP_ERROR_NO_EXPERIENCE + + type + integer + value + 5 + tooltip + This script is not associated with an experience. + + XP_ERROR_QUOTA_EXCEEDED + + type + integer + value + 11 + tooltip + An attempted write data to the key-value store failed due to the data quota being met. + + LSL_XP_ERROR_REQUEST_PERM_TIMEOUT + + type + integer + value + 18 + tooltip + The request for experience permissions was ignored and timed out. + + XP_ERROR_RETRY_UPDATE + + type + integer + value + 15 + tooltip + A checked update failed due to an out of date request. + + XP_ERROR_STORAGE_EXCEPTION + + type + integer + value + 13 + tooltip + Unable to communicate with the key-value store. + + XP_ERROR_STORE_DISABLED + + type + integer + value + 12 + tooltip + The key-value store is currently disabled on this region. + + XP_ERROR_THROTTLED + + type + integer + value + 1 + tooltip + The call failed due to too many recent calls. + + XP_ERROR_UNKNOWN_ERROR + + type + integer + value + 10 + tooltip + Other unknown error. + ZERO_ROTATION type @@ -6280,6 +6559,34 @@ This event is triggered when an email sent to this script arrives. The number remaining tells how many more emails are known to be still pending. + experience_permissions + + arguments + + agent_id + + type + key + tooltip + ID of the agent approving permission for the Experience. + + + + experience_permissions_denied + + arguments + + agent_id + + type + key + tooltip + ID of the agent denying permission for the Experience. + + + tooltip + One of the XP_ERROR_... constants describing the reason why the Experience permissions were denied for the agent. + http_request arguments @@ -6965,6 +7272,29 @@ tooltip Adjusts the volume (0.0 - 1.0) of the currently playing attached sound.\nThis function has no effect on sounds started with llTriggerSound. + llAgentInExperience + + energy + 10.0 + sleep + 0.0 + return + integer + arguments + + AgentID + + type + key + tooltip + + + + tooltip + + Returns TRUE if the agent is in the Experience and the Experience can run in the current location. + + llAllowInventoryDrop energy @@ -7696,6 +8026,36 @@ tooltip Convert link-set to AI/Physics character.\nCreates a path-finding entity, known as a "character", from the object containing the script. Required to activate use of path-finding functions.\nOptions is a list of key/value pairs. + llCreateKeyValue + + energy + 10.0 + sleep + 0.0 + return + key + arguments + + Key + + type + string + tooltip + + + Value + + type + string + tooltip + + + + tooltip + + Starts an asychronous transaction to create a key-value pair. Will fail with XP_ERROR_STORAGE_EXCEPTION if the key already exists. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value passed to the function. + + llCreateLink energy @@ -7751,6 +8111,21 @@ tooltip Create a list from a string of comma separated values specified in Text. + llDataSizeKeyValue + + energy + 10.0 + sleep + 0.0 + return + key + arguments + + tooltip + + Starts an asychronous transaction the request the used and total amount of data allocated for the Experience. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the the amount in use and the third item will be the total available. + + llDeleteCharacter energy @@ -7764,6 +8139,29 @@ tooltip Convert link-set from AI/Physics character to Physics object.\nConvert the current link-set back to a standard object, removing all path-finding properties. + llDeleteKeyValue + + energy + 10.0 + sleep + 0.0 + return + key + arguments + + Key + + type + string + tooltip + + + + tooltip + + Starts an asychronous transaction to delete a key-value pair. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value associated with the key. + + llDeleteSubList energy @@ -8915,7 +9313,30 @@ arguments tooltip - Returns the object's attachment point, or 0 if not attached.\nReturns the object attachment point, or 0 if not attached. + Returns the object's attachment point, or 0 if not attached. + + llGetAttachedList + + energy + 10.0 + sleep + 0.0 + return + list + arguments + + + ID + + type + key + tooltip + Avatar to get attachments + + + + tooltip + Returns a list of keys of all visible (not HUD) attachments on the avatar identified by the ID argument llGetBoundingBox @@ -9119,6 +9540,52 @@ tooltip Returns a string with the requested data about the region. + llGetExperienceDetails + + energy + 10.0 + sleep + 0.0 + return + list + arguments + + ExperienceID + + type + key + tooltip + May be NULL_KEY to retrieve the details for the script's Experience + + + tooltip + + Returns a list with the following Experience properties: [Experience Name, Owner ID, Group ID, Experience ID, State, State Message]. State is an integer corresponding to one of the constants XP_ERROR_... and State Message is the string returned by llGetExperienceErrorMessage for that integer. + + + llGetExperienceErrorMessage + + energy + 10.0 + sleep + 0.0 + return + string + arguments + + Error + + type + integer + tooltip + An Experience error code to translate. + + + tooltip + + Returns a string describing the error code passed or the string corresponding with XP_ERROR_UNKNOWN_ERROR if the value is not a valid Experience error code. + + llGetForce energy @@ -11446,6 +11913,51 @@ tooltip Returns the name of the prim or avatar specified by ID. The ID must be a valid rezzed prim or avatar key in the current simulator, otherwise an empty string is returned.\nFor avatars, the returned name is the legacy name + llKeyCountKeyValue + + energy + 10.0 + sleep + 0.0 + return + key + arguments + + tooltip + + Starts an asychronous transaction the request the number of keys in the data store. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will the the number of keys in the system. + + + llKeysKeyValue + + energy + 10.0 + sleep + 0.0 + return + key + arguments + + First + + type + string + tooltip + Index of the first key to return. + + Count + + type + string + tooltip + The number of keys to return. + + + tooltip + + Starts an asychronous transaction the request a number of keys from the data store. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. The error XP_ERROR_KEY_NOT_FOUND is returned if First is greater than or equal to the number of keys in the data store. In the success case the subsequent items will be the keys requested. The number of keys returned may be less than requested if the return value is too large or if there is not enough keys remaining. The order keys are returned is not guaranteed but is stable between subsequent calls as long as no keys are added or removed. Because the keys are returned in a comma-delimited list it is not recommended to use commas in key names if this function is used. + + llLinkParticleSystem energy @@ -13577,6 +14089,29 @@ tooltip Applies Impulse and AngularImpulse to ObjectID.\nApplies the supplied impulse and angular impulse to the object specified. + llReadKeyValue + + energy + 10.0 + sleep + 0.0 + return + key + arguments + + Key + + type + string + tooltip + + + + tooltip + + Starts an asychronous transaction to retrieve the value associated with the key given. Will fail with XP_ERROR_KEY_NOT_FOUND if the key does not exist. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value associated with the key. + + llRefreshPrimURL energy @@ -13997,6 +14532,36 @@ tooltip Requests the display name of the agent. When the display name is available the dataserver event will be raised.\nThe avatar identified does not need to be in the same region or online at the time of the request.\nReturns a key that is used to identify the dataserver event when it is raised. + llRequestExperiencePermissions + + energy + 10.0 + sleep + 0.0 + return + void + arguments + + AvatarID + + type + key + tooltip + + + unused + + type + string + tooltip + Not used, should be "" + + + tooltip + + Ask the agent for permission to participate in an experience. This request is similar to llRequestPermissions with the following permissions: PERMISSION_TAKE_CONTROLS, PERMISSION_TRIGGER_ANIMATION, PERMISSION_ATTACH, PERMISSION_TRACK_CAMERA, PERMISSION_CONTROL_CAMERA and PERMISSION_TELEPORT. However, unlike llRequestPermissions the decision to allow or block the request is persistent and applies to all scripts using the experience grid wide. Subsequent calls to llRequestExperiencePermissions from scripts in the experience will receive the same response automatically with no user interaction. One of experience_permissions or experience_permissions_denied will be generated in response to this call. Outstanding permission requests will be lost if the script is derezzed, moved to another region or reset. + + llRequestInventoryData energy @@ -17913,6 +18478,50 @@ tooltip Updates settings for a pathfinding character. + llUpdateKeyValue + + energy + 10.0 + sleep + 0.0 + return + key + arguments + + Key + + type + string + tooltip + + + Value + + type + string + tooltip + + + Checked + + type + integer + tooltip + + + OriginalValue + + type + string + tooltip + + + + tooltip + + Starts an asychronous transaction to update the value associated with the key given. The dataserver callback will be executed with the key returned from this call and a string describing the result. The result is a two element commma-delimited list. The first item is an integer specifying if the transaction succeeded (1) or not (0). In the failure case, the second item will be an integer corresponding to one of the XP_ERROR_... constants. In the success case the second item will be the value associated with the key. If Checked is 1 the existing value in the data store must match the OriginalValue passed or XP_ERROR_RETRY_UPDATE will be returned. If Checked is 0 the key will be created if necessary. + + llVecDist energy -- cgit v1.2.3 From 0eba1287413f2e6362ca5db10aa14bef02f506ff Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 11 Sep 2015 00:15:53 +0300 Subject: MAINT-5601 FIXED Physics model not previewed, physics model not applied to mesh on upload --- indra/newview/llfloatermodelpreview.cpp | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index a2a1dfbdb8..b74f10f5cb 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1986,6 +1986,46 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) mBaseScene = mScene[loaded_lod]; mVertexBuffer[5].clear(); } + else + { + BOOL importerDebug = gSavedSettings.getBOOL("ImporterDebug"); + BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching"); + if (!legacyMatching) + { + if (!mBaseModel.empty()) + { // replace the name of the model loaded for any non-HIGH LOD to match the others (MAINT-5601) + for (U32 idx = 0; idx < mModel[loaded_lod].size() && idx < mBaseModel.size(); ++idx) + { + std::string name = mBaseModel[idx]->mLabel; + std::string loaded_name = mModel[loaded_lod][idx]->mLabel; + + if ((loaded_name.find("_LOD") != -1) || (loaded_name.find("_PHYS") != -1)) + { // base model is LOD_HIGH so its name has no suffix, stripping loaded LOD name to match it + loaded_name = loaded_name.substr(0, loaded_name.rfind('_')); + } + + if (loaded_name != name) + { + switch (loaded_lod) + { + case LLModel::LOD_IMPOSTOR: name += "_LOD0"; break; + case LLModel::LOD_LOW: name += "_LOD1"; break; + case LLModel::LOD_MEDIUM: name += "_LOD2"; break; + case LLModel::LOD_PHYSICS: name += "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } + + if (importerDebug) + { + LL_INFOS() << "Loded model name " << mModel[loaded_lod][idx]->mLabel << " for LOD " << loaded_lod << " doesn't match the base model. Renaming to " << name << LL_ENDL; + } + + mModel[loaded_lod][idx]->mLabel = name; + } + } + } + } + } clearIncompatible(loaded_lod); -- cgit v1.2.3 From 1d58d69d1e0bf5bf7f686d3764362b90fd79bfa7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 14 Sep 2015 13:05:24 +0300 Subject: MAINT-5627 FIXED "Copy to merchant outbox" menu item is removed --- indra/newview/llinventorybridge.cpp | 28 ---------------------- .../skins/default/xui/en/menu_inventory.xml | 8 ------- 2 files changed, 36 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 36a3204391..c990eda074 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -777,14 +777,6 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, { items.push_back(std::string("Marketplace Separator")); - if (gMenuHolder->getChild("MerchantOutbox")->getVisible()) - { - items.push_back(std::string("Merchant Copy")); - if (!canListOnOutboxNow()) - { - disabled_items.push_back(std::string("Merchant Copy")); - } - } if (gMenuHolder->getChild("MarketplaceListings")->getVisible()) { items.push_back(std::string("Marketplace Copy")); @@ -1706,16 +1698,6 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) folder_view_itemp->getViewModelItem()->pasteLinkFromClipboard(); return; } - else if (isMarketplaceCopyAction(action)) - { - LL_INFOS() << "Copy item to marketplace action!" << LL_ENDL; - - LLInventoryItem* itemp = model->getItem(mUUID); - if (!itemp) return; - - const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); - copy_item_to_outbox(itemp, outbox_id, LLUUID::null, LLToolDragAndDrop::getOperationId()); - } else if (("move_to_marketplace_listings" == action) || ("copy_to_marketplace_listings" == action) || ("copy_or_move_to_marketplace_listings" == action)) { LLInventoryItem* itemp = model->getItem(mUUID); @@ -3304,16 +3286,6 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) removeSystemFolder(); } #endif - else if (isMarketplaceCopyAction(action)) - { - LL_INFOS() << "Copy folder to marketplace action!" << LL_ENDL; - - LLInventoryCategory * cat = gInventory.getCategory(mUUID); - if (!cat) return; - - const LLUUID outbox_id = getInventoryModel()->findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false); - copy_folder_to_outbox(cat, outbox_id, cat->getUUID(), LLToolDragAndDrop::getOperationId()); - } else if (("move_to_marketplace_listings" == action) || ("copy_to_marketplace_listings" == action) || ("copy_or_move_to_marketplace_listings" == action)) { LLInventoryCategory * cat = gInventory.getCategory(mUUID); diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 033a10c9ec..61002bf1b5 100755 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -776,14 +776,6 @@ - - - Date: Mon, 14 Sep 2015 11:01:22 -0400 Subject: SL-133 WIP, SL-134 WIP - more extra joint handling --- .../shaders/class1/avatar/objectSkinV.glsl | 3 +-- indra/newview/lldrawpoolavatar.cpp | 22 +++++++++------- indra/newview/llvovolume.cpp | 29 +++++----------------- 3 files changed, 20 insertions(+), 34 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index 6cd38d8ef5..3060307b21 100755 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -37,8 +37,7 @@ mat4 getObjectSkinnedTransform() index = min(index, vec4(51.0)); index = max(index, vec4( 0.0)); - float scale = 1.0/(w.x+w.y+w.z+w.w); - w *= scale; + w *= 1.0/(w.x+w.y+w.z+w.w); int i1 = int(index.x); int i2 = int(index.y); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index f828b56f7f..8bbc529244 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1553,7 +1553,8 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* (drawable && drawable->isState(LLDrawable::REBUILD_ALL))) { if (drawable && drawable->isState(LLDrawable::REBUILD_ALL)) - { //rebuild EVERY face in the drawable, not just this one, to avoid missing drawable wide rebuild issues + { + //rebuild EVERY face in the drawable, not just this one, to avoid missing drawable wide rebuild issues for (S32 i = 0; i < drawable->getNumFaces(); ++i) { LLFace* facep = drawable->getFace(i); @@ -1570,13 +1571,15 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* buffer = face->getVertexBuffer(); } else - { //just rebuild this face + { + //just rebuild this face getRiggedGeometry(face, buffer, data_mask, skin, volume, vol_face); } } if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime()) - { //perform software vertex skinning for this face + { + //perform software vertex skinning for this face LLStrider position; LLStrider normal; @@ -1604,10 +1607,6 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* { joint = avatar->getJoint("mPelvis"); } - if (!joint) - { - LL_DEBUGS("Avatar") << "Failed to find " << skin->mJointNames[j] << LL_ENDL; - } if (joint) { mat[j] = skin->mInvBindMatrix[j]; @@ -1632,12 +1631,13 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* { F32 w = weight[j][k]; - idx[k] = llclamp((S32) floorf(w), 0, JOINT_COUNT-1); + idx[k] = llclamp((S32) floorf(w), (S32)0, (S32)JOINT_COUNT-1); wght[k] = w - floorf(w); scale += wght[k]; } - + // This is enforced in unpackVolumeFaces() + llassert(scale>0.f); wght *= 1.f/scale; for (U32 k = 0; k < 4; k++) @@ -1737,6 +1737,10 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) for (U32 i = 0; i < count; ++i) { LLJoint* joint = avatar->getJoint(skin->mJointNames[i]); + if (!joint) + { + joint = avatar->getJoint("mPelvis"); + } if (joint) { mat[i] = skin->mInvBindMatrix[i]; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 1f07d93cc7..dabf6acecf 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4163,7 +4163,7 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons } //build matrix palette - static const size_t kMaxJoints = 64; + static const size_t kMaxJoints = 52; LLMatrix4a mp[kMaxJoints]; LLMatrix4* mat = (LLMatrix4*) mp; @@ -4183,12 +4183,6 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons mat[j] = skin->mInvBindMatrix[j]; mat[j] *= joint->getWorldMatrix(); } - else - { - // This shouldn't be possible unless the avatar skeleton - // is corrupt. - llassert(false); - } } for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i) @@ -4228,21 +4222,9 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons wght[k] = w - floorf(w); scale += wght[k]; } - if (scale > 0.f) - { - wght *= 1.f / scale; - } - else - { - // Complete weighting fail - all zeroes. Just - // pick some values that add up to 1.0 so we - // don't wind up with garbage vertices - // pointing off at (0,0,0) - wght[0] = 1.f; - wght[1] = 0.f; - wght[2] = 0.f; - wght[3] = 0.f; - } + // This is enforced in unpackVolumeFaces() + llassert(scale>0.f); + wght *= 1.f / scale; for (U32 k = 0; k < 4; k++) { @@ -4251,7 +4233,8 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons LLMatrix4a src; // Insure ref'd bone is in our clamped array of mats // clamp idx to maxJoints to avoid reading garbage off stack in release - src.setMul(mp[(idx[k] Date: Tue, 15 Sep 2015 16:43:32 +0300 Subject: MAINT-5427 Group notices and invitation will expand on left-clicking --- indra/newview/llfloaternotificationstabbed.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 5823983b76..4b5fe4989a 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -408,6 +408,10 @@ void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLFloaterReg::showInstance("inspect_toast", id); } + else + { + item->setExpanded(TRUE); + } } //--------------------------------------------------------------------------------- -- cgit v1.2.3 From 182f799281f1f85453aed08c845c4650df79de66 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 15 Sep 2015 23:43:43 +0300 Subject: MAINT-5601 Physics model not previewed, physics model not applied to mesh on upload Some improvements: renaming to act like "legacy matching" would apply only to the models simple enough for this --- indra/newview/llfloatermodelpreview.cpp | 88 +++++++++++++++++++++++++-------- 1 file changed, 67 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b74f10f5cb..918dc98a3a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -202,6 +202,15 @@ LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& mater return NULL; } +std::string stripSuffix(std::string name) +{ + if ((name.find("_LOD") != -1) || (name.find("_PHYS") != -1)) + { + return name.substr(0, name.rfind('_')); + } + return name; +} + LLMeshFilePicker::LLMeshFilePicker(LLModelPreview* mp, S32 lod) : LLFilePickerThread(LLFilePicker::FFLOAD_COLLADA) { @@ -1993,34 +2002,71 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) if (!legacyMatching) { if (!mBaseModel.empty()) - { // replace the name of the model loaded for any non-HIGH LOD to match the others (MAINT-5601) - for (U32 idx = 0; idx < mModel[loaded_lod].size() && idx < mBaseModel.size(); ++idx) + { + BOOL name_based = FALSE; + BOOL has_submodels = FALSE; + for (U32 idx = 0; idx < mBaseModel.size(); ++idx) { - std::string name = mBaseModel[idx]->mLabel; - std::string loaded_name = mModel[loaded_lod][idx]->mLabel; + if (mBaseModel[idx]->mSubmodelID) + { // don't do index-based renaming when the base model has submodels + has_submodels = TRUE; + if (importerDebug) + { + LL_INFOS() << "High LOD has submodels" << LL_ENDL; + } + break; + } + } - if ((loaded_name.find("_LOD") != -1) || (loaded_name.find("_PHYS") != -1)) - { // base model is LOD_HIGH so its name has no suffix, stripping loaded LOD name to match it - loaded_name = loaded_name.substr(0, loaded_name.rfind('_')); + for (U32 idx = 0; idx < mModel[loaded_lod].size(); ++idx) + { + std::string loaded_name = stripSuffix(mModel[loaded_lod][idx]->mLabel); + + LLModel* found_model = NULL; + LLMatrix4 transform; + FindModel(mBaseScene, loaded_name, found_model, transform); + if (found_model) + { // don't rename correctly named models (even if they are placed in a wrong order) + name_based = TRUE; } - if (loaded_name != name) - { - switch (loaded_lod) - { - case LLModel::LOD_IMPOSTOR: name += "_LOD0"; break; - case LLModel::LOD_LOW: name += "_LOD1"; break; - case LLModel::LOD_MEDIUM: name += "_LOD2"; break; - case LLModel::LOD_PHYSICS: name += "_PHYS"; break; - case LLModel::LOD_HIGH: break; - } + if (mModel[loaded_lod][idx]->mSubmodelID) + { // don't rename the models when loaded LOD model has submodels + has_submodels = TRUE; + } + } - if (importerDebug) + if (importerDebug) + { + LL_INFOS() << "Loaded LOD " << loaded_lod << ": correct names" << (name_based ? "" : "NOT ") << "found; submodels " << (has_submodels ? "" : "NOT ") << "found" << LL_ENDL; + } + + if (!name_based && !has_submodels) + { // replace the name of the model loaded for any non-HIGH LOD to match the others (MAINT-5601) + // this actually works like "ImporterLegacyMatching" for this particular LOD + for (U32 idx = 0; idx < mModel[loaded_lod].size() && idx < mBaseModel.size(); ++idx) + { + std::string name = mBaseModel[idx]->mLabel; + std::string loaded_name = stripSuffix(mModel[loaded_lod][idx]->mLabel); + + if (loaded_name != name) { - LL_INFOS() << "Loded model name " << mModel[loaded_lod][idx]->mLabel << " for LOD " << loaded_lod << " doesn't match the base model. Renaming to " << name << LL_ENDL; - } + switch (loaded_lod) + { + case LLModel::LOD_IMPOSTOR: name += "_LOD0"; break; + case LLModel::LOD_LOW: name += "_LOD1"; break; + case LLModel::LOD_MEDIUM: name += "_LOD2"; break; + case LLModel::LOD_PHYSICS: name += "_PHYS"; break; + case LLModel::LOD_HIGH: break; + } - mModel[loaded_lod][idx]->mLabel = name; + if (importerDebug) + { + LL_WARNS() << "Loded model name " << mModel[loaded_lod][idx]->mLabel << " for LOD " << loaded_lod << " doesn't match the base model. Renaming to " << name << LL_ENDL; + } + + mModel[loaded_lod][idx]->mLabel = name; + } } } } -- cgit v1.2.3 From 1dd2a17f6876fdb2f8856a2f2fb2b69d2bb4b265 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 18 Sep 2015 15:59:53 +0300 Subject: MAINT-5427 Expand notifications according to message length --- indra/newview/llnotificationlistitem.cpp | 22 +++++++++++++++++++--- indra/newview/llnotificationlistitem.h | 6 ++++-- .../xui/en/floater_notifications_tabbed.xml | 3 ++- .../xui/en/panel_notification_list_item.xml | 18 +++++++----------- 4 files changed, 32 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 6e2cc39a06..62b3ee3093 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -38,6 +38,7 @@ #include "lluicolortable.h" #include "message.h" #include "llnotificationsutil.h" + LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), mTitleBox(NULL), @@ -48,7 +49,8 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mExpandedViewPanel(NULL), mCondensedHeight(0), mExpandedHeight(0), - mExpandedHeightResize(0) + mExpandedHeightResize(0), + mExpanded(false) { mNotificationName = p.notification_name; } @@ -58,7 +60,7 @@ BOOL LLNotificationListItem::postBuild() BOOL rv = LLPanel::postBuild(); mTitleBox = getChild("notification_title"); mTitleBoxExp = getChild("notification_title_exp"); - mNoticeTextExp = getChild("notification_text_exp"); + mNoticeTextExp = getChild("notification_text_exp"); mTimeBox = getChild("notification_time"); mTimeBoxExp = getChild("notification_time_exp"); @@ -70,6 +72,8 @@ BOOL LLNotificationListItem::postBuild() mTitleBox->setValue(mParams.title); mTitleBoxExp->setValue(mParams.title); mNoticeTextExp->setValue(mParams.title); + mNoticeTextExp->setEnabled(FALSE); + mNoticeTextExp->setTextExpandedCallback(boost::bind(&LLNotificationListItem::reshapeNotification, this)); mTimeBox->setValue(buildNotificationDate(mParams.time_stamp)); mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp)); @@ -206,19 +210,31 @@ void LLNotificationListItem::onClickCondenseBtn() setExpanded(FALSE); } +void LLNotificationListItem::reshapeNotification() +{ + if(mExpanded) + { + S32 width = this->getRect().getWidth(); + this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE); + } +} + void LLNotificationListItem::setExpanded(BOOL value) { mCondensedViewPanel->setVisible(!value); mExpandedViewPanel->setVisible(value); S32 width = this->getRect().getWidth(); + if (value) { - this->reshape(width, mExpandedHeight + mExpandedHeightResize, FALSE); + this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE); } else { this->reshape(width, mCondensedHeight, FALSE); } + mExpanded = value; + } std::set LLGroupInviteNotificationListItem::getTypes() diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 950b75c39a..9a4ce2be4b 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -34,7 +34,7 @@ #include "llbutton.h" #include "llgroupiconctrl.h" #include "llavatariconctrl.h" - +#include "llchatentry.h" #include "llgroupmgr.h" #include "llviewermessage.h" @@ -93,6 +93,7 @@ public: virtual bool showPopup() { return true; } void setExpanded(BOOL value); virtual BOOL postBuild(); + void reshapeNotification(); typedef enum e_time_type { @@ -114,7 +115,7 @@ protected: Params mParams; LLTextBox* mTitleBox; LLTextBox* mTitleBoxExp; - LLViewerTextEditor* mNoticeTextExp; + LLChatEntry* mNoticeTextExp; LLTextBox* mTimeBox; LLTextBox* mTimeBoxExp; LLButton* mExpandBtn; @@ -128,6 +129,7 @@ protected: S32 mCondensedHeight; S32 mExpandedHeight; S32 mExpandedHeightResize; + bool mExpanded; }; class LLGroupNotificationListItem diff --git a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml index b18c6b1e82..afc609de52 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -8,8 +8,9 @@ save_rect="true" title="NOTIFICATIONS" width="350" - min_width="320" + min_width="435" height="550" + min_height="150" can_minimize="false" can_tear_off="false" can_resize="true" diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 73f90f73aa..0c173261a3 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -33,7 +33,7 @@ - 175 + 87 @@ -91,9 +91,7 @@ - - - + Notice Title Notice Title N o t i c e T i t l e N o t i c e T i t l e @@ -103,7 +101,7 @@ Group Name Group Name Group Na m e e - + Sender: "Resident R e s i d e n t R e s i d e n t" @@ -111,11 +109,11 @@ - - + Notice text goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla . - + - + - + - + diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index a909028f9f..efaaefd0e4 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -9,7 +9,6 @@ left="0" width="331" height="202" - can_resize="true" layout="topleft" follows="left|top|right|bottom" > @@ -45,12 +44,12 @@ - + - + - + - - People Icons: - - -- cgit v1.2.3 From d6284458e562c3c792415d1f64929d0e20f2963c Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 19 Nov 2015 22:17:54 +0200 Subject: MAINT-5297 Backed out changeset: bfef055de5f5 --- indra/newview/app_settings/settings.xml | 11 --- indra/newview/llconversationview.cpp | 81 +++------------------- indra/newview/llconversationview.h | 5 +- indra/newview/llfloaterimcontainer.cpp | 8 --- .../skins/default/xui/en/menu_participant_view.xml | 13 ---- 5 files changed, 11 insertions(+), 107 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 73f50c5ce2..5f378c64e8 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1730,17 +1730,6 @@ Value 1 - ChatShowIcons - - Comment - Show/hide people icons in chat - Persist - 1 - Type - Boolean - Value - 1 - CheesyBeacon Comment diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 924a8d7206..b18e543f0a 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -85,8 +85,7 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes mHasArrow(true), mIsInActiveVoiceChannel(false), mFlashStateOn(false), - mFlashStarted(false), - mShowIcons(true) + mFlashStarted(false) { mFlashTimer = new LLFlashTimer(); } @@ -174,7 +173,7 @@ BOOL LLConversationViewSession::postBuild() if (session) { LLAvatarIconCtrl* icon = mItemPanel->getChild("avatar_icon"); - icon->setVisible(mShowIcons); + icon->setVisible(true); icon->setValue(session->mOtherParticipantID); mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true); mHasArrow = false; @@ -427,49 +426,6 @@ void LLConversationViewSession::showVoiceIndicator(bool visible) requestArrange(); } -void LLConversationViewSession::setIconsVisible(bool visible) -{ - if (visible == mShowIcons) // nothing to be done here. - return; - - // Save the new value for new items to use. - mShowIcons = visible; - - // Show/hide icons for the 1-n-1 chat. - LLConversationItem* vmi = dynamic_cast(getViewModelItem()); - if (vmi) - { - switch (vmi->getType()) - { - case LLConversationItem::CONV_PARTICIPANT: - case LLConversationItem::CONV_SESSION_1_ON_1: - { - LLIconCtrl* icon = mItemPanel->getChild("avatar_icon"); - icon->setVisible(mShowIcons); - break; - } - /* - case LLConversationItem::CONV_SESSION_AD_HOC: - case LLConversationItem::CONV_SESSION_GROUP: - { - LLIconCtrl* icon = mItemPanel->getChild("group_icon"); - icon->setVisible(mShowIcons); - break; - } - */ - default: - break; - } - } - - // Show/hide icons for all existing items. - items_t::const_iterator iter; - for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) - { - dynamic_cast(*iter)->setAvatarIconVisible(mShowIcons); - } -} - void LLConversationViewSession::refresh() { // Refresh the session view from its model data @@ -502,9 +458,6 @@ void LLConversationViewSession::refresh() } } } - - setIconsVisible(gSavedSettings.getBOOL("ChatShowIcons")); - requestArrange(); // Do the regular upstream refresh LLFolderViewFolder::refresh(); @@ -556,7 +509,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti LLAvatarIconCtrl::Params avatar_icon_params(params.avatar_icon()); applyXUILayout(avatar_icon_params, this); LLAvatarIconCtrl * avatarIcon = LLUICtrlFactory::create(avatar_icon_params); - addChild(avatarIcon); + addChild(avatarIcon); LLButton::Params info_button_params(params.info_button()); applyXUILayout(info_button_params, this); @@ -572,7 +525,6 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti BOOL LLConversationViewParticipant::postBuild() { mAvatarIcon = getChild("avatar_icon"); - mAvatarIcon->setVisible(gSavedSettings.getBOOL("ChatShowIcons")); mInfoBtn = getChild("info_btn"); mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); @@ -636,12 +588,12 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height) S32 arranged = LLFolderViewItem::arrange(width, height); //Adjusts the avatar icon based upon the indentation - LLRect avatarRect(getIndentation(), - mAvatarIcon->getRect().mTop, - getIndentation() + mAvatarIcon->getRect().getWidth(), - mAvatarIcon->getRect().mBottom); - mAvatarIcon->setShape(avatarRect); - + LLRect avatarRect(getIndentation(), + mAvatarIcon->getRect().mTop, + getIndentation() + mAvatarIcon->getRect().getWidth(), + mAvatarIcon->getRect().mBottom); + mAvatarIcon->setShape(avatarRect); + //Since dimensions changed, adjust the children (info button, speaker indicator) updateChildren(); @@ -713,7 +665,7 @@ void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask) S32 LLConversationViewParticipant::getLabelXPos() { - return getIndentation() + (mAvatarIcon->getVisible() ? mAvatarIcon->getRect().getWidth() : 0) + mIconPad; + return getIndentation() + mAvatarIcon->getRect().getWidth() + mIconPad; } // static @@ -792,18 +744,5 @@ void LLConversationViewParticipant::hideSpeakingIndicator() mSpeakingIndicator->setVisible(false); } -void LLConversationViewParticipant::setAvatarIconVisible(bool visible) -{ - // Already done? Then do nothing. - if (mAvatarIcon->getVisible() == (BOOL)visible) - { - return; - } - - // Show/hide avatar icon. - mAvatarIcon->setVisible(visible); - updateChildren(); -} - // EOF diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 6aaba9b59c..5a74974302 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -83,7 +83,7 @@ public: LLConversationViewParticipant* findParticipant(const LLUUID& participant_id); void showVoiceIndicator(bool visible); - void setIconsVisible(bool visible); + virtual void refresh(); /*virtual*/ void setFlashState(bool flash_state); @@ -110,8 +110,6 @@ private: bool mIsInActiveVoiceChannel; - bool mShowIcons; - LLVoiceClientStatusObserver* mVoiceClientObserver; boost::signals2::connection mActiveVoiceChannelConnection; @@ -147,7 +145,6 @@ public: /*virtual*/ S32 getLabelXPos(); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); void hideSpeakingIndicator(); - void setAvatarIconVisible(bool visible); protected: friend class LLUICtrlFactory; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index fc87e5dc5a..15b67b905d 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -924,10 +924,6 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) { setSortOrderParticipants(LLConversationFilter::SO_DISTANCE); } - if ("view_icons" == command) - { - gSavedSettings.setBOOL("ChatShowIcons", !gSavedSettings.getBOOL("ChatShowIcons")); - } if ("chat_preferences" == command) { LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance("preferences"); @@ -978,10 +974,6 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) { return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE); } - if ("view_icons" == command) - { - return gSavedSettings.getBOOL("ChatShowIcons"); - } if ("Translating.Enabled" == command) { return gSavedPerAccountSettings.getBOOL("TranslatingEnabled"); diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 658238bf41..7ea87ee05c 100755 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -59,19 +59,6 @@ function="IMFloaterContainer.Check" parameter="sort_participants_by_recent" /> - - - - - Date: Mon, 23 Nov 2015 08:33:55 +0200 Subject: MAINT-5892 FIXED Alt camming on rigged mesh makes the camera judder, get stuck or fly off into the distance. --- indra/newview/lltoolfocus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 15f3c36674..db362459cf 100755 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -135,7 +135,7 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) gViewerWindow->hideCursor(); - gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE, TRUE); return TRUE; } -- cgit v1.2.3 From 749a0266bae75aa5c0dab3b207719d6b08675b83 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 24 Nov 2015 18:27:45 +0200 Subject: MAINT-5892 Added the comments to the function parameters --- indra/newview/lltoolcomp.cpp | 2 +- indra/newview/lltoolfocus.cpp | 2 +- indra/newview/lltoolgrab.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 5a63f6e286..76a791c6e9 100755 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -267,7 +267,7 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask) BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask) { mMouseDown = TRUE; - gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE); return TRUE; } diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index db362459cf..c4696c3a01 100755 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -135,7 +135,7 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) gViewerWindow->hideCursor(); - gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE, TRUE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, /*BOOL pick_rigged*/ FALSE, /*BOOL pick_unselectable*/ TRUE); return TRUE; } diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index fa6694b93b..92e8af985b 100755 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -146,7 +146,7 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask) if (!gAgent.leftButtonGrabbed()) { // can grab transparent objects (how touch event propagates, scripters rely on this) - gViewerWindow->pickAsync(x, y, mask, pickCallback, TRUE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE); } mClickedInMouselook = gAgentCamera.cameraMouselook(); return TRUE; -- cgit v1.2.3 From 17158103dd3a0cf87c7d30bd5c453cf5d1fa7bad Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 24 Nov 2015 20:14:14 +0200 Subject: SL-192 Edit Experience Profile shows up once an Exp is acquired --- indra/newview/llfloaterexperienceprofile.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index 4d60d01922..fd226d656c 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -337,7 +337,13 @@ BOOL LLFloaterExperienceProfile::postBuild() LLEventPumps::instance().obtain("experience_permission").listen(mExperienceId.asString()+"-profile", boost::bind(&LLFloaterExperienceProfile::experiencePermission, getDerivedHandle(this), _1)); - + + if (mPostEdit && mExperienceId.notNull()) + { + mPostEdit = false; + changeToEdit(); + } + return TRUE; } @@ -621,12 +627,6 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) mDirty=false; mForceClose = false; getChild(BTN_SAVE)->setEnabled(mDirty); - - if (mPostEdit) - { - mPostEdit = false; - changeToEdit(); - } } void LLFloaterExperienceProfile::setPreferences( const LLSD& content ) -- cgit v1.2.3 From b5c4565c62433d603a673d94f691c687ac907c7d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 25 Nov 2015 15:33:05 -0500 Subject: MAINT-5901: Make avatar auto pilot work correctly through transparent objects --- indra/newview/lltoolpie.cpp | 86 ++++++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 25 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 2081297717..60a7d284ef 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -106,7 +106,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mMouseDownX = x; mMouseDownY = y; - //left mouse down always picks transparent + //left mouse down always picks transparent (but see handleMouseUp) mPick = gViewerWindow->pickImmediate(x, y, TRUE); mPick.mKeyMask = mask; @@ -661,30 +661,52 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) && gAgentAvatarp && !gAgentAvatarp->isSitting() && !mBlockClickToWalk // another behavior hasn't cancelled click to walk - && !mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick - && (mPick.mPickType == LLPickInfo::PICK_LAND // we clicked on land - || mPick.mObjectID.notNull())) // or on an object - { - // handle special cases of steering picks - LLViewerObject* avatar_object = mPick.getObject(); - - // get pointer to avatar - while (avatar_object && !avatar_object->isAvatar()) - { - avatar_object = (LLViewerObject*)avatar_object->getParent(); - } - - if (avatar_object && ((LLVOAvatar*)avatar_object)->isSelf()) - { - const F64 SELF_CLICK_WALK_DISTANCE = 3.0; - // pretend we picked some point a bit in front of avatar - mPick.mPosGlobal = gAgent.getPositionGlobal() + LLVector3d(LLViewerCamera::instance().getAtAxis()) * SELF_CLICK_WALK_DISTANCE; - } - gAgentCamera.setFocusOnAvatar(TRUE, TRUE); - walkToClickedLocation(); - LLFirstUse::notMoving(false); - - return TRUE; + ) + { + // We may be doing click to walk, but we don't want to use a target on + // a transparent object because the user thought they were clicking on + // whatever they were seeing through it, so recompute what was clicked on + // ignoring transparent objects + LLPickInfo savedPick = mPick; + mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY, + FALSE /* ignore transparent */, + FALSE /* ignore particles */); + + if (!mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick + && (mPick.mPickType == LLPickInfo::PICK_LAND // we clicked on land + || mPick.mObjectID.notNull())) // or on an object + { + // handle special cases of steering picks + LLViewerObject* avatar_object = mPick.getObject(); + + // get pointer to avatar + while (avatar_object && !avatar_object->isAvatar()) + { + avatar_object = (LLViewerObject*)avatar_object->getParent(); + } + + if (avatar_object && ((LLVOAvatar*)avatar_object)->isSelf()) + { + const F64 SELF_CLICK_WALK_DISTANCE = 3.0; + // pretend we picked some point a bit in front of avatar + mPick.mPosGlobal = gAgent.getPositionGlobal() + LLVector3d(LLViewerCamera::instance().getAtAxis()) * SELF_CLICK_WALK_DISTANCE; + } + gAgentCamera.setFocusOnAvatar(TRUE, TRUE); + walkToClickedLocation(); + LLFirstUse::notMoving(false); + + return TRUE; + } + else + { + LL_DEBUGS("maint5901") << "walk target was " + << (mPick.mPosGlobal.isExactlyZero() ? "zero" : "not zero") + << ", pick type was " << (mPick.mPickType == LLPickInfo::PICK_LAND ? "land" : "not land") + << ", pick object was " << mPick.mObjectID + << LL_ENDL; + // we didn't click to walk, so restore the original target + mPick = savedPick; + } } gViewerWindow->setCursor(UI_CURSOR_ARROW); if (hasMouseCapture()) @@ -718,12 +740,26 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) { + // We may be doing double click to walk, but we don't want to use a target on + // a transparent object because the user thought they were clicking on + // whatever they were seeing through it, so recompute what was clicked on + // ignoring transparent objects + LLPickInfo savedPick = mPick; + mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY, + FALSE /* ignore transparent */, + FALSE /* ignore particles */); + if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) || (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero())) { walkToClickedLocation(); return TRUE; } + else + { + // restore the original pick for any other purpose + mPick = savedPick; + } } else if (gSavedSettings.getBOOL("DoubleClickTeleport")) { -- cgit v1.2.3 From 9ab1cb7ae003687ae90ec0a920a0f5932cc4acc7 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 4 Dec 2015 20:51:11 +0200 Subject: MAINT-5892 Argument fix --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 904cf32ec8..154090543c 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -122,7 +122,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask) { // don't pick transparent so users can't "pay" transparent objects - mPick = gViewerWindow->pickImmediate(x, y, FALSE, TRUE); + mPick = gViewerWindow->pickImmediate(x, y, /*BOOL pick_transparent*/ FALSE, /*BOOL pick_rigged*/ TRUE, /*BOOL pick_particle*/ TRUE); mPick.mKeyMask = mask; // claim not handled so UI focus stays same -- cgit v1.2.3 From c3877be95468b3c26157cc98e9d40e264645a883 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 4 Dec 2015 11:21:32 -0800 Subject: MAINT-5941 [Valhalla] Default flash to on by default (reverts MAINT-5773) --- indra/newview/app_settings/settings.xml | 108 ++++++++++++++++---------------- 1 file changed, 54 insertions(+), 54 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bedbed2dcc..1fdfdb51a8 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -734,7 +734,7 @@ F32 Value 60 - + AvatarRotateThresholdFast Comment @@ -745,7 +745,7 @@ F32 Value 2 - + AvatarBakedTextureUploadTimeout Comment @@ -1339,7 +1339,7 @@ String Value - + CacheNumberOfRegionsForObjects Comment @@ -2005,7 +2005,7 @@ Type Boolean Value - 0 + 1 ChatBarCustomWidth @@ -3788,7 +3788,7 @@ Boolean Value 0 - + FirstSelectedEnabledPopups Comment @@ -3799,7 +3799,7 @@ Boolean Value 0 - + FixedWeather Comment @@ -3921,7 +3921,7 @@ Value SW - + FloaterStatisticsRect Comment @@ -4448,7 +4448,7 @@ String Value http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/howto/index.html - + HomeSidePanelURL Comment @@ -4514,7 +4514,7 @@ Boolean Value 0 - + HostID Comment @@ -4602,7 +4602,7 @@ Boolean Value 0 - + IgnorePixelDepth Comment @@ -4657,7 +4657,7 @@ F32 Value 0.5 - + InspectorShowTime Comment @@ -4668,7 +4668,7 @@ F32 Value 3.0 - + InstallLanguage Comment @@ -5230,7 +5230,7 @@ Value 0.0.0 - + LastSnapshotToProfileHeight Comment @@ -6309,7 +6309,7 @@ Boolean Value 0 - + MenuAccessKeyTime Comment @@ -6474,7 +6474,7 @@ Boolean Value 0 - + MouseSun Comment @@ -6639,7 +6639,7 @@ String Value - + NextLoginLocation Comment @@ -6763,7 +6763,7 @@ String Value toast - + NotificationFriendIMOptions Comment @@ -6819,7 +6819,7 @@ String Value toast - + NotificationObjectIMOptions Comment @@ -6833,7 +6833,7 @@ String Value toast - + NotificationToastLifeTime Comment @@ -7392,7 +7392,7 @@ Boolean Value 0 - + PlaySoundFriendIM Comment @@ -7503,7 +7503,7 @@ Value 0.9 - + PlainTextChatHistory Comment @@ -7515,7 +7515,7 @@ Value 0 - + PluginInstancesLow Comment @@ -7769,7 +7769,7 @@ 0.4 - + PreviewDirection2 Comment @@ -8379,7 +8379,7 @@ RenderComplexityStaticMax Comment - Sets a static max value for scaling of RenderComplexity + Sets a static max value for scaling of RenderComplexity display (-1 for dynamic scaling) Persist 1 @@ -8457,7 +8457,7 @@ Value 0 - + RenderLocalLights Comment @@ -8684,7 +8684,7 @@ Persist 1 Type - Boolean + Boolean Value 0 @@ -8721,7 +8721,7 @@ Value 0 - + RenderAnimateRes Comment @@ -8894,7 +8894,7 @@ Value 0 - + RenderDepthOfField Comment @@ -9023,7 +9023,7 @@ Value 0.1 - + RenderHighlightBrightness Comment @@ -9047,7 +9047,7 @@ Value 0.6 - + RenderHighlightColor Comment @@ -9076,7 +9076,7 @@ Value 0 - + RenderSpecularResX Comment @@ -9981,7 +9981,7 @@ Value 1 - + RenderAutoMuteByteLimit Comment @@ -10036,7 +10036,7 @@ Boolean Value 0 - + RenderAutoHideSurfaceAreaLimit Comment @@ -10522,7 +10522,7 @@ Boolean Value 0 - + SelectMovableOnly Comment @@ -10764,7 +10764,7 @@ Boolean Value 1 - + ShowCrosshairs Comment @@ -10841,7 +10841,7 @@ Boolean Value 0 - + ShowMiniMapButton Comment @@ -10908,7 +10908,7 @@ Value 1 - ShowObjectRenderingCost + ShowObjectRenderingCost Comment Show the object rendering cost in build tools @@ -10917,9 +10917,9 @@ Type Boolean Value - 1 - - ShowNavbarFavoritesPanel + 1 + + ShowNavbarFavoritesPanel Comment Show/hide navigation bar favorites panel @@ -10928,9 +10928,9 @@ Type Boolean Value - 1 + 1 - ShowNavbarNavigationPanel + ShowNavbarNavigationPanel Comment Show/hide navigation bar navigation panel @@ -10939,7 +10939,7 @@ Type Boolean Value - 1 + 1 ShowWorldMapButton @@ -11095,7 +11095,7 @@ Value 1 - ShowPGSearchAll + ShowPGSearchAll Comment Display results of search All that are flagged as general @@ -11611,7 +11611,7 @@ S32 Value 0 - + SnapshotQuality Comment @@ -12480,7 +12480,7 @@ String Value B56AF90D-6684-48E4-B1E4-722D3DEB2CB6 - + NearByChatChannelUUID Comment @@ -12491,7 +12491,7 @@ String Value E1158BD6-661C-4981-9DAD-4DCBFF062502 - + NotificationChannelUUID Comment @@ -12502,7 +12502,7 @@ String Value AEED3193-8709-4693-8558-7452CCA97AE5 - + AlertChannelUUID Comment @@ -12513,7 +12513,7 @@ String Value F3E07BC8-A973-476D-8C7F-F3B7293975D1 - + UIImgWhiteUUID Comment @@ -12535,7 +12535,7 @@ S32 Value 2 - + UIMaxComboWidth Comment @@ -13448,7 +13448,7 @@ String Value [i800,i600] - + sourceid Comment @@ -14669,7 +14669,7 @@ Boolean Value 1 - + EnablePlaceProfile Comment @@ -15491,7 +15491,7 @@ Value 0 - + PathfindingLineWidth Comment @@ -15532,7 +15532,7 @@ 1.0 - + HideUIControls Comment -- cgit v1.2.3 From 9384eac91b974dfd918d0edf6022cc3e0b0c9daf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 9 Dec 2015 07:36:06 -0500 Subject: MAINT-5862: Change the Linux wording in the ToS floater per Grumpity. --- indra/newview/skins/default/xui/en/floater_tos.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml index c5313391c6..590d9d1844 100755 --- a/indra/newview/skins/default/xui/en/floater_tos.xml +++ b/indra/newview/skins/default/xui/en/floater_tos.xml @@ -70,7 +70,7 @@ top="32" word_wrap="true" width="552"> - To continue logging in to [SECOND_LIFE], you must accept the [https://id.secondlife.com/openid/login?return_to=https%3A%2F%2Fmy.secondlife.com%2Fopenid Terms of Service and Privacy Policy]. + You will need to go to my.secondlife.com and log in to accept the Terms of Service before you can proceed. Thank you! Date: Mon, 14 Dec 2015 14:14:29 -0800 Subject: MAINT-5962: Added routine for checking MoaP double click and forwarding those double click events into to the plugin. --- indra/newview/lltoolpie.cpp | 141 ++++++++++++++++++++++++++++------------ indra/newview/lltoolpie.h | 3 +- indra/newview/llviewermedia.cpp | 11 ++++ indra/newview/llviewermedia.h | 3 +- 4 files changed, 115 insertions(+), 43 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 60a7d284ef..4d41c792ca 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -738,6 +738,11 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) LL_INFOS() << "LLToolPie handleDoubleClick (becoming mouseDown)" << LL_ENDL; } + if (handleMediaDblClick(mPick)) + { + return TRUE; + } + if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) { // We may be doing double click to walk, but we don't want to use a target on @@ -1440,56 +1445,110 @@ static void handle_click_action_play() bool LLToolPie::handleMediaClick(const LLPickInfo& pick) { - //FIXME: how do we handle object in different parcel than us? - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - LLPointer objectp = pick.getObject(); + //FIXME: how do we handle object in different parcel than us? + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLPointer objectp = pick.getObject(); - if (!parcel || - objectp.isNull() || - pick.mObjectFace < 0 || - pick.mObjectFace >= objectp->getNumTEs()) - { - LLViewerMediaFocus::getInstance()->clearFocus(); + if (!parcel || + objectp.isNull() || + pick.mObjectFace < 0 || + pick.mObjectFace >= objectp->getNumTEs()) + { + LLViewerMediaFocus::getInstance()->clearFocus(); - return false; - } + return false; + } - // Does this face have media? - const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace); - if(!tep) - return false; + // Does this face have media? + const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace); + if (!tep) + return false; - LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL; - if(!mep) - return false; - - viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); + LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL; + if (!mep) + return false; - if (gSavedSettings.getBOOL("MediaOnAPrimUI")) - { - if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull()) - { - // It's okay to give this a null impl - LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal); - } - else - { - // Make sure keyboard focus is set to the media focus object. - gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance()); - LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl(); - - media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE)); - mMediaMouseCaptureID = mep->getMediaID(); - setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture. - } + viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); - return true; - } + if (gSavedSettings.getBOOL("MediaOnAPrimUI")) + { + if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull()) + { + // It's okay to give this a null impl + LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal); + } + else + { + // Make sure keyboard focus is set to the media focus object. + gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance()); + LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl(); - LLViewerMediaFocus::getInstance()->clearFocus(); + media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE)); + mMediaMouseCaptureID = mep->getMediaID(); + setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture. + } - return false; + return true; + } + + LLViewerMediaFocus::getInstance()->clearFocus(); + + return false; +} + +bool LLToolPie::handleMediaDblClick(const LLPickInfo& pick) +{ + //FIXME: how do we handle object in different parcel than us? + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLPointer objectp = pick.getObject(); + + + if (!parcel || + objectp.isNull() || + pick.mObjectFace < 0 || + pick.mObjectFace >= objectp->getNumTEs()) + { + LLViewerMediaFocus::getInstance()->clearFocus(); + + return false; + } + + // Does this face have media? + const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace); + if (!tep) + return false; + + LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL; + if (!mep) + return false; + + viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); + + if (gSavedSettings.getBOOL("MediaOnAPrimUI")) + { + if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull()) + { + // It's okay to give this a null impl + LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal); + } + else + { + // Make sure keyboard focus is set to the media focus object. + gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance()); + LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl(); + + media_impl->mouseDoubleClick(pick.mUVCoords, gKeyboard->currentMask(TRUE)); + mMediaMouseCaptureID = mep->getMediaID(); + setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture. + } + + return true; + } + + LLViewerMediaFocus::getInstance()->clearFocus(); + + return false; } bool LLToolPie::handleMediaHover(const LLPickInfo& pick) diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 68fe8bc4a5..c4a2f4a35b 100755 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -88,7 +88,8 @@ private: ECursorType cursorFromObject(LLViewerObject* object); bool handleMediaClick(const LLPickInfo& info); - bool handleMediaHover(const LLPickInfo& info); + bool handleMediaDblClick(const LLPickInfo& info); + bool handleMediaHover(const LLPickInfo& info); bool handleMediaMouseUp(); BOOL handleTooltipLand(std::string line, std::string tooltip_msg); BOOL handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index cc56a9db8d..ab685205cf 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2426,6 +2426,17 @@ void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords, MASK mask) } } +void LLViewerMediaImpl::mouseDoubleClick(const LLVector2& texture_coords, MASK mask) +{ + if (mMediaSource) + { + S32 x, y; + scaleTextureCoords(texture_coords, &x, &y); + + mouseDoubleClick(x, y, mask); + } +} + ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 01d4b0786f..ede408dd0c 100755 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -226,7 +226,8 @@ public: void mouseDown(const LLVector2& texture_coords, MASK mask, S32 button = 0); void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0); void mouseMove(const LLVector2& texture_coords, MASK mask); - void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0); + void mouseDoubleClick(const LLVector2& texture_coords, MASK mask); + void mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button = 0); void scrollWheel(S32 x, S32 y, MASK mask); void mouseCapture(); -- cgit v1.2.3 From 3bf8929d932a6253177be55766cd2a80bb6e224d Mon Sep 17 00:00:00 2001 From: callum_linden Date: Tue, 15 Dec 2015 15:24:41 -0800 Subject: MAINT-5966 - file download failures need feedback --- indra/newview/llmediactrl.cpp | 8 ++++++++ indra/newview/llviewermedia.cpp | 7 +++++++ indra/newview/skins/default/xui/en/notifications.xml | 17 +++++++++++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 9b8e24a8e8..9cf3249983 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -57,6 +57,7 @@ #include "llbutton.h" #include "llcheckboxctrl.h" #include "llnotifications.h" +#include "llnotificationsutil.h" #include "lllineeditor.h" #include "llfloaterwebcontent.h" #include "llwindowshade.h" @@ -1093,6 +1094,13 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) }; break; + case MEDIA_EVENT_FILE_DOWNLOAD: + { + //llinfos << "Media event - file download requested - filename is " << self->getFileDownloadFilename() << llendl; + //LLNotificationsUtil::add("MediaFileDownloadUnsupported"); + }; + break; + case MEDIA_EVENT_DEBUG_MESSAGE: { LL_INFOS("media") << self->getDebugMessageText() << LL_ENDL; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ab685205cf..ffae3c0e1f 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3300,6 +3300,13 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla } break; + case LLViewerMediaObserver::MEDIA_EVENT_FILE_DOWNLOAD: + { + //llinfos << "Media event - file download requested - filename is " << self->getFileDownloadFilename() << llendl; + LLNotificationsUtil::add("MediaFileDownloadUnsupported"); + } + break; + case LLViewerMediaObserver::MEDIA_EVENT_NAVIGATE_BEGIN: { LL_DEBUGS("Media") << "MEDIA_EVENT_NAVIGATE_BEGIN, uri is: " << plugin->getNavigateURI() << LL_ENDL; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 70ba4d5077..b4c5cba1fd 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1592,10 +1592,23 @@ The object may be out of range or may have been deleted. icon="alertmodal.tga" name="CannotDownloadFile" type="alertmodal"> -Unable to download file - fail + Unable to download file + fail + + + confirm + You have requested a file download, which is not supported within [SECOND_LIFE]. + + + Date: Tue, 15 Dec 2015 16:34:06 -0800 Subject: Fix for OS X and Linux - their compilers do not like missing entries in case statement --- indra/newview/llviewerparcelmedia.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 37b249dddd..fc275eb2f0 100755 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -590,7 +590,13 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_PICK_FILE_REQUEST" << LL_ENDL; } break; - + + case MEDIA_EVENT_FILE_DOWNLOAD: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_FILE_DOWNLOAD" << LL_ENDL; + } + break; + case MEDIA_EVENT_GEOMETRY_CHANGE: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_GEOMETRY_CHANGE, uuid is " << self->getClickUUID() << LL_ENDL; -- cgit v1.2.3 From dd3b3a4fcae6b144d9ca38e10f01872d2cc3ed6f Mon Sep 17 00:00:00 2001 From: callum_linden Date: Wed, 16 Dec 2015 18:09:30 -0800 Subject: maint-5875 fix llceflib_host.exe' error about missing MSVCP120.dll --- indra/newview/viewer_manifest.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 9a65171d44..f7992dba90 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -471,6 +471,12 @@ class Windows_i686_Manifest(ViewerManifest): self.path("wow_helper.exe") self.end_prefix() + # MSVC DLLs needed for CEF and have to be in same directory as plugin + if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', 'Release'), dst="llplugin"): + self.path("msvcp120.dll") + self.path("msvcr120.dll") + self.end_prefix() + # CEF files common to all configurations if self.prefix(src=os.path.join(os.pardir, 'packages', 'resources'), dst="llplugin"): self.path("cef.pak") -- cgit v1.2.3 From 7b993d15b70d419dc0a7c8d92286d34a2635537d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 18 Dec 2015 06:30:19 -0500 Subject: increment viewer version to 4.0.1 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index fcdb2e109f..1454f6ed4b 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -4.0.0 +4.0.1 -- cgit v1.2.3 From 3892685922c4a64d05f98ba12c55fe6e5bc26497 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 12 Jan 2016 15:48:00 +0200 Subject: MAINT-6040 FIXED crash in LLFavoritesOrderStorage --- indra/newview/llfavoritesbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index d6b86cd746..b779d8f461 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1622,7 +1622,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() { LLSD user_llsd = fav_llsd[av_name.getUserName()]; - if (user_llsd.beginArray()->has("id")) + if ((user_llsd.beginArray()!= user_llsd.endArray()) && user_llsd.beginArray()->has("id")) { for (LLSD::array_iterator iter = user_llsd.beginArray();iter != user_llsd.endArray(); ++iter) { -- cgit v1.2.3 From 30446d6afc974ff07bde69b0f969bc5fbd3902ef Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 11 Jan 2016 03:24:36 +0200 Subject: MAINT-6018 Open URL dialog spam Added the ability to close all notifications from one owner at once --- indra/newview/llchiclet.cpp | 4 ++++ indra/newview/llscriptfloater.cpp | 12 ++++++++++++ indra/newview/llscriptfloater.h | 5 +++++ indra/newview/skins/default/xui/en/menu_script_chiclet.xml | 8 ++++++++ 4 files changed, 29 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index dedb06c945..ad26bbd491 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1092,6 +1092,10 @@ void LLScriptChiclet::onMenuItemClicked(const LLSD& user_data) { LLScriptFloaterManager::instance().removeNotification(getSessionId()); } + else if ("end_owner" == action) + { + LLScriptFloaterManager::instance().removeAllNotificationsByOwner(getSessionId()); + } } void LLScriptChiclet::createPopupMenu() diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 1d021ec28f..b5b5bc855d 100755 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -420,6 +420,18 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) toggleScriptFloater(notification_id, set_new_message); } +void LLScriptFloaterManager::removeAllNotificationsByOwner(const LLUUID& notification_id) +{ + LLNotificationPtr notification = LLNotifications::instance().find(notification_id); + if (notification != NULL && !notification->isCancelled()) + { + LLSD payload = notification->getPayload(); + LLUUID owner = payload.get("owner_id").asUUID(); + + LLNotifications::instance().cancelByOwner(owner); + } +} + void LLScriptFloaterManager::removeNotification(const LLUUID& notification_id) { LLNotificationPtr notification = LLNotifications::instance().find(notification_id); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 70451194b3..bb35526cf7 100755 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -59,6 +59,11 @@ public: */ void onAddNotification(const LLUUID& notification_id); + /** + * Removes all notifications by owner id. + */ + void removeAllNotificationsByOwner(const LLUUID& notification_id); + /** * Removes notification. */ diff --git a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml index db29d9cebc..ceeef1cd46 100755 --- a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml +++ b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml @@ -16,4 +16,12 @@ function="ScriptChiclet.Action" parameter="end" /> + + + -- cgit v1.2.3 From f6d995b0a2a1eff20a1d0c00ed905354ec440cec Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 11 Jan 2016 03:35:24 +0200 Subject: MAINT-6018 Open URL dialog spam Remove notifications of muted agents --- indra/newview/llmutelist.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index d79baf90e7..3f4f2446e8 100755 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -315,6 +315,11 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) { LLPipeline::removeMutedAVsLights(avatarp); } + //remove agent's notifications as well + if (localmute.mType == LLMute::AGENT) + { + LLNotifications::instance().cancelByOwner(localmute.mID); + } return TRUE; } } -- cgit v1.2.3 From 61f3a060031d840329328fdb5bae3fc90cbdcc93 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 12 Jan 2016 21:08:27 +0200 Subject: MAINT-6018 Open URL dialog spam Removed "close by owner" item form chiclet's right-click menu --- indra/newview/llchiclet.cpp | 4 ---- indra/newview/llscriptfloater.cpp | 12 ------------ indra/newview/llscriptfloater.h | 5 ----- indra/newview/skins/default/xui/en/menu_script_chiclet.xml | 8 -------- 4 files changed, 29 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index ad26bbd491..dedb06c945 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1092,10 +1092,6 @@ void LLScriptChiclet::onMenuItemClicked(const LLSD& user_data) { LLScriptFloaterManager::instance().removeNotification(getSessionId()); } - else if ("end_owner" == action) - { - LLScriptFloaterManager::instance().removeAllNotificationsByOwner(getSessionId()); - } } void LLScriptChiclet::createPopupMenu() diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index b5b5bc855d..1d021ec28f 100755 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -420,18 +420,6 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) toggleScriptFloater(notification_id, set_new_message); } -void LLScriptFloaterManager::removeAllNotificationsByOwner(const LLUUID& notification_id) -{ - LLNotificationPtr notification = LLNotifications::instance().find(notification_id); - if (notification != NULL && !notification->isCancelled()) - { - LLSD payload = notification->getPayload(); - LLUUID owner = payload.get("owner_id").asUUID(); - - LLNotifications::instance().cancelByOwner(owner); - } -} - void LLScriptFloaterManager::removeNotification(const LLUUID& notification_id) { LLNotificationPtr notification = LLNotifications::instance().find(notification_id); diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index bb35526cf7..70451194b3 100755 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -59,11 +59,6 @@ public: */ void onAddNotification(const LLUUID& notification_id); - /** - * Removes all notifications by owner id. - */ - void removeAllNotificationsByOwner(const LLUUID& notification_id); - /** * Removes notification. */ diff --git a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml index ceeef1cd46..db29d9cebc 100755 --- a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml +++ b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml @@ -16,12 +16,4 @@ function="ScriptChiclet.Action" parameter="end" /> - - - -- cgit v1.2.3 From 5a5c023e291990a463b1a91846ce82c70da8daab Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 15 Jan 2016 14:19:20 -0500 Subject: increment viewer version to 4.0.2 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 1454f6ed4b..4d54daddb6 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -4.0.1 +4.0.2 -- cgit v1.2.3