diff --git a/.hgtags b/.hgtags index eec9227ebb..a45039e14c 100755 --- a/.hgtags +++ b/.hgtags @@ -592,3 +592,4 @@ a3143db58a0f6b005232bf9018e7fef17ff9ec90 6.1.0-release 706bdc7e25c6e6b8fb56f4a13fcce2936e70a79c 6.2.1-release ec09daf1899c1c01c4ba0ba950fae572f2a612a8 6.2.2-release ab2ec5c5423b277d23fd0511ce50c15123ff2e03 6.2.3-release +67297f9902857e357570c44722ad84de3aff974e 6.2.4-release diff --git a/autobuild.xml b/autobuild.xml index ab857d7f78..c3c1e874c7 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1034,11 +1034,11 @@ archive hash - f44299c9cf9c4224c6aee350284c3175 + a0d1821154e7ce5c418e3cdc2f26f3fc hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.01-windows-191591202.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.03-windows-192171947.tar.bz2 name windows @@ -1048,18 +1048,18 @@ archive hash - fd45c9663bbd413f779b3bd5ad6f3567 + b98d2da1ed02f8ba218de414a83d0edc hash_algorithm md5 url - file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.01-windows64-191591204.tar.bz2 + file:///c:/cygwin/opt/firestorm/fmodstudio-2.00.03-windows64-192171948.tar.bz2 name windows64 version - 2.00.01 + 2.00.03 fmodex diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 99b18f8808..abad9eb7e1 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5287,6 +5287,28 @@ bool LLVolumeFace::cacheOptimize() llassert(!mOptimized); mOptimized = TRUE; + // FIRE-23370/BUG-8801/MAIN-5060 + // cacheOptimize will destroy triangles. This is due to LLVCacheVertexData pointing to vertices in the vector vertex_data. + // Once vertex_data is sorted (std::sort(triangle_data.begin(), triangle_data.end()) ) this will invalidate those pointers and + // LLVCacheVertexData suddenly does point to unrelated vertices. It is an interesting fact that this is no problem for the + // windows version. + // + // To solve the issue with the pointer invalidation it would make sense to use a std::vector< U16 > for triangle indices, sort this + // using + // std::sort( v.begin(), v.end(), [&triangle_data](U16 rhs, U16 lhs ){ return triangle_data[rhs].mScore > triangle_data[lhs].mScore; } + // Then access all LLVCacheTriangleData> via triangle_data[ v[ idx ] ]. + // + // This will help indeed with the destroyed triangles; but the result will still not be perfect and there are problems with alpha due to + // what looks like z order. + // + // It is peculiar that none of this happens when compiling with MSVC. + // Sadly for Linux it seems to be a decision between two evils + // - Disable cacheOptimize and have correct meshes but potentially a bit of less FPS. + // - Enable/fix cacheOptimize, potentially have a bit higher FPS but broken meshes. + // + // Having meshes correctly seems to be a bit of a lesser evil. Then do some wider testing on different systems to test for any other potential sideeffects. + +#ifndef LL_LINUX LLVCacheLRU cache; if (mNumVertices < 3) @@ -5512,6 +5534,8 @@ bool LLVolumeFace::cacheOptimize() //std::string result = llformat("ACMR pre/post: %.3f/%.3f -- %d triangles %d breaks", pre_acmr, post_acmr, mNumIndices/3, breaks); //LL_INFOS() << result << LL_ENDL; +#endif // + return true; } diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 1d5cba8a07..a2a58f15b5 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -507,7 +507,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) dullahan::dullahan_settings settings; settings.accept_language_list = mHostLanguage; - settings.background_color = 0xff282828; + settings.background_color = 0xffffffff; settings.cache_enabled = true; settings.cache_path = mCachePath; settings.cookies_enabled = mCookiesEnabled; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 354a6aa402..555674682d 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1125,7 +1125,7 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po // Returns the necessary texture transform to align this face's TE to align_to's TE bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offset, - LLVector2* res_st_scale, F32* res_st_rot) const + LLVector2* res_st_scale, F32* res_st_rot, LLRender::eTexIndex map) const { if (!align_to) { @@ -1138,6 +1138,43 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs return false; } + F32 map_rot = 0.f, map_scaleS = 0.f, map_scaleT = 0.f, map_offsS = 0.f, map_offsT = 0.f; + + switch (map) + { + case LLRender::DIFFUSE_MAP: + map_rot = orig_tep->getRotation(); + map_scaleS = orig_tep->mScaleS; + map_scaleT = orig_tep->mScaleT; + map_offsS = orig_tep->mOffsetS; + map_offsT = orig_tep->mOffsetT; + break; + case LLRender::NORMAL_MAP: + if (orig_tep->getMaterialParams()->getNormalID().isNull()) + { + return false; + } + map_rot = orig_tep->getMaterialParams()->getNormalRotation(); + map_scaleS = orig_tep->getMaterialParams()->getNormalRepeatX(); + map_scaleT = orig_tep->getMaterialParams()->getNormalRepeatY(); + map_offsS = orig_tep->getMaterialParams()->getNormalOffsetX(); + map_offsT = orig_tep->getMaterialParams()->getNormalOffsetY(); + break; + case LLRender::SPECULAR_MAP: + if (orig_tep->getMaterialParams()->getSpecularID().isNull()) + { + return false; + } + map_rot = orig_tep->getMaterialParams()->getSpecularRotation(); + map_scaleS = orig_tep->getMaterialParams()->getSpecularRepeatX(); + map_scaleT = orig_tep->getMaterialParams()->getSpecularRepeatY(); + map_offsS = orig_tep->getMaterialParams()->getSpecularOffsetX(); + map_offsT = orig_tep->getMaterialParams()->getSpecularOffsetY(); + break; + default: /*make compiler happy*/ + break; + } + LLVector3 orig_pos, this_pos; LLQuaternion orig_face_rot, this_face_rot; F32 orig_proj_scale, this_proj_scale; @@ -1145,7 +1182,7 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs getPlanarProjectedParams(&this_face_rot, &this_pos, &this_proj_scale); // The rotation of "this face's" texture: - LLQuaternion orig_st_rot = LLQuaternion(orig_tep->getRotation(), LLVector3::z_axis) * orig_face_rot; + LLQuaternion orig_st_rot = LLQuaternion(map_rot, LLVector3::z_axis) * orig_face_rot; LLQuaternion this_st_rot = orig_st_rot * ~this_face_rot; F32 x_ang, y_ang, z_ang; this_st_rot.getEulerAngles(&x_ang, &y_ang, &z_ang); @@ -1153,10 +1190,10 @@ bool LLFace::calcAlignedPlanarTE(const LLFace* align_to, LLVector2* res_st_offs // Offset and scale of "this face's" texture: LLVector3 centers_dist = (this_pos - orig_pos) * ~orig_st_rot; - LLVector3 st_scale(orig_tep->mScaleS, orig_tep->mScaleT, 1.f); + LLVector3 st_scale(map_scaleS, map_scaleT, 1.f); st_scale *= orig_proj_scale; centers_dist.scaleVec(st_scale); - LLVector2 orig_st_offset(orig_tep->mOffsetS, orig_tep->mOffsetT); + LLVector2 orig_st_offset(map_offsS, map_offsT); *res_st_offset = orig_st_offset + (LLVector2)centers_dist; res_st_offset->mV[VX] -= (S32)res_st_offset->mV[VX]; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index becf40ff26..b47e0face7 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -115,7 +115,7 @@ public: LLVector2 surfaceToTexture(LLVector2 surface_coord, const LLVector4a& position, const LLVector4a& normal); void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const; bool calcAlignedPlanarTE(const LLFace* align_to, LLVector2* st_offset, - LLVector2* st_scale, F32* st_rot) const; + LLVector2* st_scale, F32* st_rot, LLRender::eTexIndex map = LLRender::DIFFUSE_MAP) const; U32 getState() const { return mState; } void setState(U32 state) { mState |= state; } diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 9b4d746dbd..c4ba9d9bbb 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -527,7 +527,7 @@ void LLFloaterPay::onGive(give_money_ptr info) // FIRE-16092: Make payment confirmation customizable //if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) - if (gSavedSettings.getBOOL("FSConfirmPayments") && amount > gSavedSettings.getS32("FSPaymentConfirmationThreshold") && gStatusBar && gStatusBar->getBalance() > amount) + if (gSavedSettings.getBOOL("FSConfirmPayments") && amount > gSavedSettings.getS32("FSPaymentConfirmationThreshold") && gStatusBar && gStatusBar->getBalance() >= amount) // { LLUUID payee_id = LLUUID::null; @@ -553,11 +553,26 @@ void LLFloaterPay::onGive(give_money_ptr info) payee_id = floater->mTargetUUID; } - LLSD args; - args["TARGET"] = LLSLURL(is_group ? "group" : "agent", payee_id, "completename").getSLURLString(); - args["AMOUNT"] = amount; + // FIRE-24208: Skip notification if paying yourself + //LLSD args; + //args["TARGET"] = LLSLURL(is_group ? "group" : "agent", payee_id, "completename").getSLURLString(); + //args["AMOUNT"] = amount; - LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info)); + //LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info)); + if (is_group || payee_id != gAgentID) + { + LLSD args; + args["TARGET"] = LLSLURL(is_group ? "group" : "agent", payee_id, "completename").getSLURLString(); + args["AMOUNT"] = amount; + + LLNotificationsUtil::add("PayConfirmation", args, LLSD(), boost::bind(&LLFloaterPay::payConfirmationCallback, _1, _2, info)); + } + else + { + floater->give(amount); + floater->closeFloater(); + } + // } else { diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ba0abf5641..d3bcc95f89 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1239,9 +1239,6 @@ void LLFloaterPreference::onOpen(const LLSD& key) getChild("client_tags_panel")->setVisible(in_opensim); // - // Force HTTP features on SL - getChild("TexturesHTTP")->setEnabled(in_opensim); - // Group mutes backup LLScrollListItem* groupmute_item = getChild("restore_per_account_files_list")->getItem(LLSD("groupmutes")); groupmute_item->setEnabled(in_opensim); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 9c3f472809..c86180b498 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -903,6 +903,7 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data) previewp->setSnapshotBufferType((LLSnapshotModel::ESnapshotLayerType)combobox->getCurrentIndex()); } view->impl->checkAutoSnapshot(previewp, TRUE); + previewp->updateSnapshot(TRUE, TRUE); } } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 3e2a36fb63..cb0325c1cc 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -819,7 +819,18 @@ void log_upload_error(LLCore::HttpStatus status, const LLSD& content, for (; mav_errors_it != mav_errors.end(); ++mav_errors_it) { std::string mav_details = "Mav_Details_" + *mav_errors_it; - details << "Message: '" << *mav_errors_it << "': " << LLTrans::getString(mav_details) << std::endl << std::endl; + // Details error can be some message already. + //details << "Message: '" << *mav_errors_it << "': " << LLTrans::getString(mav_details) << std::endl << std::endl; + std::string translated_details; + if (LLTrans::findString(translated_details, mav_details)) + { + details << "Message: '" << *mav_errors_it << "': " << translated_details << std::endl << std::endl; + } + else + { + details << "Message: '" << *mav_errors_it << "'" << std::endl << std::endl; + } + // } std::string details_str = details.str(); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index c38a7c2bd4..efdc326522 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -84,6 +84,8 @@ const S32 ALPHAMODE_MASK = 2; // Alpha masking mode const S32 BUMPY_TEXTURE = 18; // use supplied normal map const S32 SHINY_TEXTURE = 4; // use supplied specular map +BOOST_STATIC_ASSERT(MATTYPE_DIFFUSE == LLRender::DIFFUSE_MAP && MATTYPE_NORMAL == LLRender::NORMAL_MAP && MATTYPE_SPECULAR == LLRender::SPECULAR_MAP); + // // "Use texture" label for normal/specular type comboboxes // Filled in at initialization from translated strings @@ -253,6 +255,7 @@ BOOL LLPanelFace::postBuild() // childSetAction("button align",&LLPanelFace::onClickAutoFix,this); + childSetAction("button align textures", &LLPanelFace::onAlignTexture, this); // Moved to the header so other functions can use them too. //LLTextureCtrl* mTextureCtrl; @@ -544,11 +547,28 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor { BOOL valid; F32 value; - //LLSpinCtrl* ctrlTexScaleS = mPanel->getChild("TexScaleU"); - //LLSpinCtrl* ctrlTexScaleT = mPanel->getChild("TexScaleV"); - //LLSpinCtrl* ctrlTexOffsetS = mPanel->getChild("TexOffsetU"); - //LLSpinCtrl* ctrlTexOffsetT = mPanel->getChild("TexOffsetV"); - //LLSpinCtrl* ctrlTexRotation = mPanel->getChild("TexRot"); + + LLRadioGroup * radio_mat_type = mPanel->getChild("radio_material_type"); + std::string prefix; + switch (radio_mat_type->getSelectedIndex()) + { + case MATTYPE_DIFFUSE: + prefix = "Tex"; + break; + case MATTYPE_NORMAL: + prefix = "bumpy"; + break; + case MATTYPE_SPECULAR: + prefix = "shiny"; + break; + } + + LLSpinCtrl * ctrlTexScaleS = mPanel->getChild(prefix + "ScaleU"); + LLSpinCtrl * ctrlTexScaleT = mPanel->getChild(prefix + "ScaleV"); + LLSpinCtrl * ctrlTexOffsetS = mPanel->getChild(prefix + "OffsetU"); + LLSpinCtrl * ctrlTexOffsetT = mPanel->getChild(prefix + "OffsetV"); + LLSpinCtrl * ctrlTexRotation = mPanel->getChild(prefix + "Rot"); + LLComboBox* comboTexGen = mPanel->getChild("combobox texgen"); LLCheckBoxCtrl* cb_planar_align = mPanel->getChild("checkbox planar align"); bool align_planar = (cb_planar_align && cb_planar_align->get()); @@ -556,12 +576,12 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor llassert(comboTexGen); llassert(object); - if (mPanel->mCtrlTexScaleU) + if (ctrlTexScaleS) { - valid = !mPanel->mCtrlTexScaleU->getTentative(); + valid = !ctrlTexScaleS->getTentative(); if (valid || align_planar) { - value = mPanel->mCtrlTexScaleU->get(); + value = ctrlTexScaleS->get(); if (comboTexGen && comboTexGen->getCurrentIndex() == 1) { @@ -571,18 +591,18 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, value, te, object->getID()); } } } - if (mPanel->mCtrlTexScaleV) + if (ctrlTexScaleT) { - valid = !mPanel->mCtrlTexScaleV->getTentative(); + valid = !ctrlTexScaleT->getTentative(); if (valid || align_planar) { - value = mPanel->mCtrlTexScaleV->get(); + value = ctrlTexScaleT->get(); if (comboTexGen && comboTexGen->getCurrentIndex() == 1) { @@ -592,56 +612,56 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, value, te, object->getID()); } } } - if (mPanel->mCtrlTexOffsetU) + if (ctrlTexOffsetS) { - valid = !mPanel->mCtrlTexOffsetU->getTentative(); + valid = !ctrlTexOffsetS->getTentative(); if (valid || align_planar) { - value = mPanel->mCtrlTexOffsetU->get(); + value = ctrlTexOffsetS->get(); object->setTEOffsetS( te, value ); if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, value, te, object->getID()); } } } - if (mPanel->mCtrlTexOffsetV) + if (ctrlTexOffsetT) { - valid = !mPanel->mCtrlTexOffsetV->getTentative(); + valid = !ctrlTexOffsetT->getTentative(); if (valid || align_planar) { - value = mPanel->mCtrlTexOffsetV->get(); + value = ctrlTexOffsetT->get(); object->setTEOffsetT( te, value ); if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, value, te, object->getID()); } } } - if (mPanel->mCtrlTexRot) + if (ctrlTexRotation) { - valid = !mPanel->mCtrlTexRot->getTentative(); + valid = !ctrlTexRotation->getTentative(); if (valid || align_planar) { - value = mPanel->mCtrlTexRot->get() * DEG_TO_RAD; + value = ctrlTexRotation->get() * DEG_TO_RAD; object->setTERotation( te, value ); if (align_planar) { - LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, value, te); - LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, value, te); + LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, value, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, value, te, object->getID()); } } } @@ -713,6 +733,68 @@ private: LLFace* mCenterFace; }; +struct LLPanelFaceSetAlignedConcreteTEFunctor : public LLSelectedTEFunctor +{ + LLPanelFaceSetAlignedConcreteTEFunctor(LLPanelFace* panel, LLFace* center_face, LLRender::eTexIndex map) : + mPanel(panel), + mChefFace(center_face), + mMap(map) + {} + + virtual bool apply(LLViewerObject* object, S32 te) + { + LLFace* facep = object->mDrawable->getFace(te); + if (!facep) + { + return true; + } + + if (facep->getViewerObject()->getVolume()->getNumVolumeFaces() <= te) + { + return true; + } + + if (mChefFace != facep) + { + LLVector2 uv_offset, uv_scale; + F32 uv_rot; + if (facep->calcAlignedPlanarTE(mChefFace, &uv_offset, &uv_scale, &uv_rot, mMap)) + { + switch (mMap) + { + case LLRender::DIFFUSE_MAP: + object->setTEOffset(te, uv_offset.mV[VX], uv_offset.mV[VY]); + object->setTEScale(te, uv_scale.mV[VX], uv_scale.mV[VY]); + object->setTERotation(te, uv_rot); + break; + case LLRender::NORMAL_MAP: + LLPanelFace::LLSelectedTEMaterial::setNormalRotation(mPanel, uv_rot, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetX(mPanel, uv_offset.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalOffsetY(mPanel, uv_offset.mV[VY], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatX(mPanel, uv_scale.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setNormalRepeatY(mPanel, uv_scale.mV[VY], te, object->getID()); + break; + case LLRender::SPECULAR_MAP: + LLPanelFace::LLSelectedTEMaterial::setSpecularRotation(mPanel, uv_rot, te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetX(mPanel, uv_offset.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularOffsetY(mPanel, uv_offset.mV[VY], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatX(mPanel, uv_scale.mV[VX], te, object->getID()); + LLPanelFace::LLSelectedTEMaterial::setSpecularRepeatY(mPanel, uv_scale.mV[VY], te, object->getID()); + break; + default: /*make compiler happy*/ + break; + } + } + } + + return true; + } +private: + LLPanelFace* mPanel; + LLFace* mChefFace; + LLRender::eTexIndex mMap; +}; + // Functor that tests if a face is aligned to mCenterFace struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor { @@ -798,6 +880,17 @@ void LLPanelFace::sendTextureInfo() LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); } +void LLPanelFace::alignTestureLayer() +{ + LLFace* last_face = NULL; + bool identical_face = false; + LLSelectedTE::getFace(last_face, identical_face); + + LLRadioGroup * radio_mat_type = getChild("radio_material_type"); + LLPanelFaceSetAlignedConcreteTEFunctor setfunc(this, last_face, static_cast(radio_mat_type->getSelectedIndex())); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); +} + void LLPanelFace::getState() { updateUI(); @@ -1093,6 +1186,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) bool enabled = (editable && isIdenticalPlanarTexgen()); childSetValue("checkbox planar align", align_planar && enabled); childSetEnabled("checkbox planar align", enabled); + childSetEnabled("button align textures", enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1); if (align_planar && enabled) { @@ -2275,7 +2369,18 @@ void LLPanelFace::onCommitMaterialBumpyRot(LLUICtrl* ctrl, void* userdata) } else { - LLSelectedTEMaterial::setNormalRotation(self,self->getCurrentBumpyRot() * DEG_TO_RAD); + if ((bool)self->childGetValue("checkbox planar align").asBoolean()) + { + LLFace* last_face = NULL; + bool identical_face = false; + LLSelectedTE::getFace(last_face, identical_face); + LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); + } + else + { + LLSelectedTEMaterial::setNormalRotation(self, self->getCurrentBumpyRot() * DEG_TO_RAD); + } } } @@ -2292,7 +2397,18 @@ void LLPanelFace::onCommitMaterialShinyRot(LLUICtrl* ctrl, void* userdata) } else { - LLSelectedTEMaterial::setSpecularRotation(self,self->getCurrentShinyRot() * DEG_TO_RAD); + if ((bool)self->childGetValue("checkbox planar align").asBoolean()) + { + LLFace* last_face = NULL; + bool identical_face = false; + LLSelectedTE::getFace(last_face, identical_face); + LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face); + LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc); + } + else + { + LLSelectedTEMaterial::setSpecularRotation(self, self->getCurrentShinyRot() * DEG_TO_RAD); + } } } @@ -2549,6 +2665,11 @@ void LLPanelFace::onClickAutoFix(void* userdata) LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc); } +void LLPanelFace::onAlignTexture(void* userdata) +{ + LLPanelFace* self = (LLPanelFace*)userdata; + self->alignTestureLayer(); +} // TODO: I don't know who put these in or what these are for??? diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index ff4eb365e6..7aae9ff3e1 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -128,6 +128,7 @@ protected: void sendFullbright(); // applies and sends full bright void sendGlow(); void sendMedia(); + void alignTestureLayer(); // this function is to return TRUE if the drag should succeed. static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item); @@ -204,6 +205,7 @@ protected: static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata); static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo); static void onClickAutoFix(void*); + static void onAlignTexture(void*); static F32 valueGlow(LLViewerObject* object, S32 face); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 53064bf487..430b09b70d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6061,6 +6061,84 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) gGL.scalef(cur_zoom, cur_zoom, cur_zoom); } + bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections; + F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0); + + static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha); + static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha); + + auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor) + { + //Need to because crash on ATI 3800 (and similar cards) MAINT-5018 + LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); + + LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; + + if (shader) + { + gDebugProgram.bind(); + } + + gGL.matrixMode(LLRender::MM_MODELVIEW); + gGL.pushMatrix(); + + BOOL is_hud_object = objectp->isHUDAttachment(); + + if (!is_hud_object) + { + gGL.loadIdentity(); + gGL.multMatrix(gGLModelView); + } + + if (objectp->mDrawable->isActive()) + { + gGL.multMatrix((F32*)objectp->getRenderMatrix().mMatrix); + } + else if (!is_hud_object) + { + LLVector3 trans = objectp->getRegion()->getOriginAgent(); + gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]); + } + + bool bRenderHidenSelection = node->isTransient() ? false : LLSelectMgr::sRenderHiddenSelections; + + + LLVOVolume* vobj = objectp->mDrawable->getVOVolume(); + if (vobj) + { + LLVertexBuffer::unbind(); + gGL.pushMatrix(); + gGL.multMatrix((F32*)vobj->getRelativeXform().mMatrix); + + if (objectp->mDrawable->isState(LLDrawable::RIGGED)) + { + vobj->updateRiggedVolume(true); + } + } + + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + + S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces + for (S32 te = 0; te < num_tes; ++te) + { + if (node->isTESelected(te)) + { + objectp->mDrawable->getFace(te)->renderOneWireframe(hlColor, fogCfx, wireframe_selection, bRenderHidenSelection, nullptr != shader); + } + } + + gGL.popMatrix(); + gGL.popMatrix(); + + glLineWidth(1.f); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + + if (shader) + { + shader->bind(); + } + }; + if (mSelectedObjects->getNumNodes()) { LLUUID inspect_item_id= LLUUID::null; @@ -6078,12 +6156,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) } } - bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections; - F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0); - - static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha); - static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha); - LLUUID focus_item_id = LLViewerMediaFocus::getInstance()->getFocusedObjectID(); // Improve selection silhouette rendering speed by Drake Arconis //for (S32 pass = 0; pass < 2; pass++) @@ -6104,72 +6176,16 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) && objectp->mDrawable->getVOVolume() && objectp->mDrawable->getVOVolume()->isMesh()) { - //Need to because crash on ATI 3800 (and similar cards) MAINT-5018 - LLGLDisable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0); - - LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; - - if (shader) - { - gDebugProgram.bind(); - } - - gGL.matrixMode(LLRender::MM_MODELVIEW); - gGL.pushMatrix(); - - BOOL is_hud_object = objectp->isHUDAttachment(); - - if (objectp->mDrawable->isActive()) - { - gGL.loadMatrix(gGLModelView); - gGL.multMatrix((F32*)objectp->getRenderMatrix().mMatrix); - } - else if (!is_hud_object) - { - gGL.loadIdentity(); - gGL.multMatrix(gGLModelView); - LLVector3 trans = objectp->getRegion()->getOriginAgent(); - gGL.translatef(trans.mV[0], trans.mV[1], trans.mV[2]); - } - LLColor4 hlColor = objectp->isRootEdit() ? sParentColor : sChildColor; - bool bRenderHidenSelection = node->isTransient() ? false : LLSelectMgr::sRenderHiddenSelections; - - - LLVOVolume* vobj = objectp->mDrawable->getVOVolume(); - if (vobj) + if (objectp->getID() == inspect_item_id) { - LLVertexBuffer::unbind(); - gGL.pushMatrix(); - gGL.multMatrix((F32*)vobj->getRelativeXform().mMatrix); - - if (objectp->mDrawable->isState(LLDrawable::RIGGED)) - { - vobj->updateRiggedVolume(); - } + hlColor = sHighlightInspectColor; } - - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - - S32 num_tes = llmin((S32)objectp->getNumTEs(), (S32)objectp->getNumFaces()); // avatars have TEs but no faces - for (S32 te = 0; te < num_tes; ++te) + else if (node->isTransient()) { - if (node->isTESelected(te)) - { - objectp->mDrawable->getFace(te)->renderOneWireframe(hlColor, fogCfx, wireframe_selection, bRenderHidenSelection, nullptr != shader); - } - } - - gGL.popMatrix(); - gGL.popMatrix(); - - glLineWidth(1.f); - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - if (shader) - { - shader->bind(); + hlColor = sContextSilhouetteColor; } + renderMeshSelection_f(node, objectp, hlColor); } else { @@ -6222,14 +6238,20 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) { continue; } - - if (subtracting_from_selection) + + LLColor4 highlight_color = objectp->isRoot() ? sHighlightParentColor : sHighlightChildColor; + if (objectp->mDrawable + && objectp->mDrawable->getVOVolume() + && objectp->mDrawable->getVOVolume()->isMesh()) + { + renderMeshSelection_f(node, objectp, subtracting_from_selection ? LLColor4::red : highlight_color); + } + else if (subtracting_from_selection) { node->renderOneSilhouette(LLColor4::red); } else if (!objectp->isSelected()) { - LLColor4 highlight_color = objectp->isRoot() ? sHighlightParentColor : sHighlightChildColor; node->renderOneSilhouette(highlight_color); } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 189c5d07df..7816ffe9ba 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5796,7 +5796,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) && (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) { - if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true)) + if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT, true, true)) { original_width = gPipeline.mDeferredScreen.getWidth(); original_height = gPipeline.mDeferredScreen.getHeight(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b2ffc9798c..cb4182e2d6 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5838,6 +5838,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) U32 mask = mat->getShaderMask(alpha_mode); pool->addRiggedFace(facep, mask); } + + if(vobj->isAnimatedObject() && vobj->isRiggedMesh()) + { + pool->updateRiggedVertexBuffers(vobj->getAvatar()); + } } else if (mat) { diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 398f85a765..62b41bac04 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1062,7 +1062,6 @@ void LLWorldMapView::drawFrustum() F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * LLUI::getScaleFactor().mV[VX]); F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]); - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); // Since we don't rotate the map, we have to rotate the frustum. diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index e94c1644ff..8dd794c897 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -5123,7 +5123,7 @@ Export unerwartet fehlgeschlagen. Siehe Log-Datei für weitergehende Details. -[OBJECT] erfolreich als [FILENAME] gespeichert. +[OBJECT] erfolgreich als [FILENAME] gespeichert. diff --git a/indra/newview/skins/default/xui/de/panel_tools_texture.xml b/indra/newview/skins/default/xui/de/panel_tools_texture.xml index da344ec6f2..25155022ac 100644 --- a/indra/newview/skins/default/xui/de/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/de/panel_tools_texture.xml @@ -118,6 +118,7 @@ -