diff options
Diffstat (limited to 'indra/newview')
22 files changed, 535 insertions, 146 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5d8d4b199c..75c78d1ace 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9543,7 +9543,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>-0.004</real> + <real>-0.002</real> </map> <key>RenderShadowOffset</key> <map> diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl index f3e7b2ee72..183354b9bd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl @@ -57,5 +57,8 @@ void main() frag_data[1] = vec4(0.0); frag_data[2] = vec4(0.0, 0.0, 0.0, GBUFFER_FLAG_HAS_ATMOS); frag_data[3] = vec4(c.rgb, c.a); + + // Added and commented out for a ground truth. Do not uncomment - Geenz + //gl_FragDepth = 0.999985f; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl index 032245a01c..c2a1dccb33 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonV.glsl @@ -39,7 +39,8 @@ void main() vec4 pos = (modelview_projection_matrix * vert); // smash to *almost* far clip plane -- stars are still behind - pos.z = pos.w*0.999999; + // SL-19283 - finagle the moon position to be between clouds and stars. + pos.z = pos.w*0.999991; gl_Position = pos; vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; diff --git a/indra/newview/llfloatereditenvironmentbase.cpp b/indra/newview/llfloatereditenvironmentbase.cpp index cd24d79b7f..e7e0ff717e 100644 --- a/indra/newview/llfloatereditenvironmentbase.cpp +++ b/indra/newview/llfloatereditenvironmentbase.cpp @@ -47,6 +47,7 @@ #include "llsettingsvo.h" #include "llinventorymodel.h" +#include "pipeline.h" namespace { @@ -106,6 +107,9 @@ void LLFloaterEditEnvironmentBase::onFocusReceived() { updateEditEnvironment(); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_FAST); + + // HACK -- resume reflection map manager because setSelectedEnvironment may pause it (SL-20456) + gPipeline.mReflectionMapManager.resume(); } } diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index f3133ecb37..c64ee5a69c 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -36,6 +36,7 @@ #include "llvirtualtrackball.h" #include "llenvironment.h" #include "llviewercontrol.h" +#include "pipeline.h" //========================================================================= namespace @@ -134,6 +135,9 @@ void LLFloaterEnvironmentAdjust::onOpen(const LLSD& key) mEventConnection = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env, S32 version){ onEnvironmentUpdated(env, version); }); + // HACK -- resume reflection map manager because "setEnvironmentChanged" may pause it (SL-20456) + gPipeline.mReflectionMapManager.resume(); + LLFloater::onOpen(key); refresh(); } diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index bb6584302d..8e28fd6234 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -184,7 +184,9 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); // teach user about HDR settings - if (mSettings && ((LLSettingsSky*)mSettings.get())->canAutoAdjust()) + if (mSettings + && mSettings->getSettingsType() == "sky" + && ((LLSettingsSky*)mSettings.get())->canAutoAdjust()) { LLNotificationsUtil::add("AutoAdjustHDRSky"); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 22dd884b91..cb5316ddf4 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -765,7 +765,7 @@ void hide_context_entries(LLMenuGL& menu, // descend into split menus: LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(menu_item); - if ((name == "More") && branchp) + if (((name == "More") || (name == "create_new")) && branchp) { hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries); } @@ -820,7 +820,7 @@ void hide_context_entries(LLMenuGL& menu, // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); - bool enabled = (menu_item->getEnabled() == TRUE); + bool enabled = true; for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2) { enabled &= (*itor2 != name); @@ -4282,6 +4282,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Folder")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("create_new")); } if (favorites == mUUID) { @@ -4304,6 +4305,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items { disabled_items.push_back(std::string("New Folder")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("create_new")); } if (marketplace_listings_id == mUUID) { @@ -4367,6 +4369,18 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items if (!isMarketplaceListingsFolder()) { items.push_back(std::string("upload_def")); + items.push_back(std::string("create_new")); + items.push_back(std::string("New Script")); + items.push_back(std::string("New Note")); + items.push_back(std::string("New Gesture")); + items.push_back(std::string("New Material")); + items.push_back(std::string("New Clothes")); + items.push_back(std::string("New Body Parts")); + items.push_back(std::string("New Settings")); + if (!LLEnvironment::instance().isInventoryEnabled()) + { + disabled_items.push_back("New Settings"); + } } if (menu_items_added) { diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 4838ba7a47..62180bb066 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -2390,17 +2390,11 @@ void LLInventoryGallery::startDrag() { std::vector<EDragAndDropType> types; uuid_vec_t ids; - LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_AGENT; for (LLUUID& selected_id : mSelectedItemIDs) { const LLInventoryItem* item = gInventory.getItem(selected_id); if (item) { - if (item->getPermissions().getOwner() == ALEXANDRIA_LINDEN_ID) - { - src = LLToolDragAndDrop::SOURCE_LIBRARY; - } - EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(item->getType()); types.push_back(type); ids.push_back(selected_id); @@ -2410,11 +2404,6 @@ void LLInventoryGallery::startDrag() if (cat && gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID()) && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType())) { - if (cat->getOwnerID() == ALEXANDRIA_LINDEN_ID) - { - src = LLToolDragAndDrop::SOURCE_LIBRARY; - } - EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType()); types.push_back(type); ids.push_back(selected_id); diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index be6f8d72e5..7a65231a2d 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1571,7 +1571,11 @@ void LLMaterialEditor::onSaveAsMsgCallback(const LLSD& notification, const LLSD& } else { - LLNotificationsUtil::add("InvalidMaterialName"); + LLNotificationsUtil::add("InvalidMaterialName", LLSD(), LLSD(), [this](const LLSD& notification, const LLSD& response) + { + LLNotificationsUtil::add("SaveMaterialAs", LLSD().with("DESC", mMaterialName), LLSD(), + boost::bind(&LLMaterialEditor::onSaveAsMsgCallback, this, _1, _2)); + }); } } } @@ -3195,7 +3199,11 @@ S32 LLMaterialEditor::saveTextures() { mUploadingTexturesCount++; work_count++; - saveTexture(mBaseColorJ2C, mBaseColorName, mBaseColorTextureUploadId, [key](LLUUID newAssetId, LLSD response) + + // For ease of inventory management, we prepend the material name. + std::string name = mMaterialName + ": " + mBaseColorName; + + saveTexture(mBaseColorJ2C, name, mBaseColorTextureUploadId, [key](LLUUID newAssetId, LLSD response) { LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", key); if (me) @@ -3233,7 +3241,11 @@ S32 LLMaterialEditor::saveTextures() { mUploadingTexturesCount++; work_count++; - saveTexture(mNormalJ2C, mNormalName, mNormalTextureUploadId, [key](LLUUID newAssetId, LLSD response) + + // For ease of inventory management, we prepend the material name. + std::string name = mMaterialName + ": " + mNormalName; + + saveTexture(mNormalJ2C, name, mNormalTextureUploadId, [key](LLUUID newAssetId, LLSD response) { LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", key); if (me) @@ -3271,7 +3283,11 @@ S32 LLMaterialEditor::saveTextures() { mUploadingTexturesCount++; work_count++; - saveTexture(mMetallicRoughnessJ2C, mMetallicRoughnessName, mMetallicTextureUploadId, [key](LLUUID newAssetId, LLSD response) + + // For ease of inventory management, we prepend the material name. + std::string name = mMaterialName + ": " + mMetallicRoughnessName; + + saveTexture(mMetallicRoughnessJ2C, name, mMetallicTextureUploadId, [key](LLUUID newAssetId, LLSD response) { LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", key); if (me) @@ -3310,7 +3326,11 @@ S32 LLMaterialEditor::saveTextures() { mUploadingTexturesCount++; work_count++; - saveTexture(mEmissiveJ2C, mEmissiveName, mEmissiveTextureUploadId, [key](LLUUID newAssetId, LLSD response) + + // For ease of inventory management, we prepend the material name. + std::string name = mMaterialName + ": " + mEmissiveName; + + saveTexture(mEmissiveJ2C, name, mEmissiveTextureUploadId, [key](LLUUID newAssetId, LLSD response) { LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", LLSD(key)); if (me) diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 915c8893a4..72f7e23b0c 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -39,6 +39,8 @@ extern BOOL gCubeSnapshot; extern BOOL gTeleportDisplay; +static U32 sUpdateCount = 0; + // get the next highest power of two of v (or v if v is already a power of two) //defined in llvertexbuffer.cpp extern U32 nhpo2(U32 v); @@ -91,7 +93,7 @@ static bool check_priority(LLReflectionMap* a, LLReflectionMap* b) return false; } else if (b->mCubeIndex == -1) - { // certainly higher priority than b + { // b is not a candidate for updating, a is higher priority by default return true; } else if (!a->mComplete && !b->mComplete) @@ -103,7 +105,13 @@ static bool check_priority(LLReflectionMap* a, LLReflectionMap* b) return update_score(a) > update_score(b); } - // one of these probes is not complete, if b is complete, a is higher priority + // a or b is not complete, + if (sUpdateCount % 3 == 0) + { // every third update, allow complete probes to cut in line in front of non-complete probes to avoid spammy probe generators from deadlocking scheduler (SL-20258)) + return !b->mComplete; + } + + // prioritize incomplete probe return b->mComplete; } @@ -351,6 +359,7 @@ void LLReflectionMapManager::update() probe->autoAdjustOrigin(); + sUpdateCount++; mUpdatingProbe = probe; doProbeUpdate(); } @@ -537,8 +546,14 @@ void LLReflectionMapManager::doProbeUpdate() updateProbeFace(mUpdatingProbe, mUpdatingFace); + bool debug_updates = gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PROBE_UPDATES) && mUpdatingProbe->mViewerObject; + if (++mUpdatingFace == 6) { + if (debug_updates) + { + mUpdatingProbe->mViewerObject->setDebugText(llformat("%.1f", (F32)gFrameTimeSeconds), LLColor4(1, 1, 1, 1)); + } updateNeighbors(mUpdatingProbe); mUpdatingFace = 0; if (isRadiancePass()) @@ -552,6 +567,10 @@ void LLReflectionMapManager::doProbeUpdate() mRadiancePass = true; } } + else if (debug_updates) + { + mUpdatingProbe->mViewerObject->setDebugText(llformat("%.1f", (F32)gFrameTimeSeconds), LLColor4(1, 1, 0, 1)); + } } // Do the reflection map update render passes. @@ -1239,13 +1258,18 @@ void LLReflectionMapManager::initReflectionMaps() mProbeResolution = nhpo2(llclamp(gSavedSettings.getU32("RenderReflectionProbeResolution"), (U32)64, (U32)512)); mMaxProbeLOD = log2f(mProbeResolution) - 1.f; // number of mips - 1 - mTexture = new LLCubeMapArray(); + if (mTexture.isNull() || + mTexture->getWidth() != mProbeResolution || + mReflectionProbeCount + 2 != mTexture->getCount()) + { + mTexture = new LLCubeMapArray(); - // store mReflectionProbeCount+2 cube maps, final two cube maps are used for render target and radiance map generation source) - mTexture->allocate(mProbeResolution, 3, mReflectionProbeCount + 2); + // store mReflectionProbeCount+2 cube maps, final two cube maps are used for render target and radiance map generation source) + mTexture->allocate(mProbeResolution, 3, mReflectionProbeCount + 2); - mIrradianceMaps = new LLCubeMapArray(); - mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, FALSE); + mIrradianceMaps = new LLCubeMapArray(); + mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, FALSE); + } // reset probe state mUpdatingFace = 0; @@ -1253,6 +1277,9 @@ void LLReflectionMapManager::initReflectionMaps() mRadiancePass = false; mRealtimeRadiancePass = false; + // if default probe already exists, remember whether or not it's complete (SL-20498) + bool default_complete = mDefaultProbe.isNull() ? false : mDefaultProbe->mComplete; + for (auto& probe : mProbes) { probe->mLastUpdateTime = 0.f; @@ -1280,6 +1307,8 @@ void LLReflectionMapManager::initReflectionMaps() mDefaultProbe->mDistance = 64.f; mDefaultProbe->mRadius = 4096.f; mDefaultProbe->mProbeIndex = 0; + mDefaultProbe->mComplete = default_complete; + touch_default_probe(mDefaultProbe); } diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 29d42b3c00..a63d46f502 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -261,11 +261,11 @@ void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXfor LLVector3(mExtents[1].getF32ptr()) }; - LLQuaternion backwardRotation = ~currentTransform.getRotation(); + LLQuaternion backwardRotation = ~currentTransform.getWorldRotation(); for (LLVector3& corner : corners) { // Make coordinates relative to the current position - corner -= currentTransform.getPosition(); + corner -= currentTransform.getWorldPosition(); // Rotate coordinates backward to the current rotation corner.rotVec(backwardRotation); // Expand root extents on the current corner diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index e669393dba..38c9b3717d 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1379,7 +1379,9 @@ bool LLTextureFetchWorker::doWork(S32 param) // // If it looks like we're busy, keep this request here. // Otherwise, advance into the HTTP states. - if (mFetcher->getHttpWaitersCount() || ! acquireHttpSemaphore()) + + if (!mHttpHasResource && // sometimes we get into this state when we already have an http resource, go ahead and send the request in that case + (mFetcher->getHttpWaitersCount() || ! acquireHttpSemaphore())) { setState(WAIT_HTTP_RESOURCE2); mFetcher->addHttpWaiter(this->mID); diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index d35833fac9..8bf078477a 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -295,7 +295,8 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->setText(edit_text_contents); std::string notif_name = mNotification->getName(); - if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name) || ("CreateLandmarkFolder" == notif_name) || ("CreateSubfolder" == notif_name)) + if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name) || ("CreateLandmarkFolder" == notif_name) || + ("CreateSubfolder" == notif_name) || ("SaveMaterialAs" == notif_name)) { mLineEditor->setPrevalidate(&LLTextValidate::validateASCII); } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index f1813c9d17..97be78df77 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1114,6 +1114,54 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, hit_obj->sendTEUpdate(); } +void LLToolDragAndDrop::dropMaterial(LLViewerObject* hit_obj, + S32 hit_face, + LLInventoryItem* item, + LLToolDragAndDrop::ESource source, + const LLUUID& src_id, + bool all_faces) +{ + LLSelectNode* nodep = nullptr; + if (hit_obj->isSelected()) + { + // update object's saved materials + nodep = LLSelectMgr::getInstance()->getSelection()->findNode(hit_obj); + } + + // If user dropped a material onto face it implies + // applying texture now without cancel, save to selection + if (all_faces) + { + dropMaterialAllFaces(hit_obj, item, source, src_id); + + if (nodep) + { + uuid_vec_t material_ids; + gltf_materials_vec_t override_materials; + S32 num_faces = hit_obj->getNumTEs(); + for (S32 face = 0; face < num_faces; face++) + { + material_ids.push_back(hit_obj->getRenderMaterialID(face)); + override_materials.push_back(nullptr); + } + nodep->saveGLTFMaterials(material_ids, override_materials); + } + } + else + { + dropMaterialOneFace(hit_obj, hit_face, item, source, src_id); + + // If user dropped a material onto face it implies + // applying texture now without cancel, save to selection + if (nodep + && gFloaterTools->getVisible() + && nodep->mSavedGLTFMaterialIds.size() > hit_face) + { + nodep->mSavedGLTFMaterialIds[hit_face] = hit_obj->getRenderMaterialID(hit_face); + nodep->mSavedGLTFOverrideMaterials[hit_face] = nullptr; + } + } +} void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj, S32 hit_face, @@ -1219,6 +1267,71 @@ void LLToolDragAndDrop::dropTextureOneFaceAvatar(LLVOAvatar* avatar, S32 hit_fac avatar->userSetOptionalTE( hit_face, image); } */ +void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj, + S32 hit_face, + LLInventoryItem* item, + ESource source, + const LLUUID& src_id, + bool all_faces, + S32 tex_channel) +{ + LLSelectNode* nodep = nullptr; + if (hit_obj->isSelected()) + { + // update object's saved textures + nodep = LLSelectMgr::getInstance()->getSelection()->findNode(hit_obj); + } + + if (all_faces) + { + dropTextureAllFaces(hit_obj, item, source, src_id); + + // If user dropped a texture onto face it implies + // applying texture now without cancel, save to selection + if (nodep) + { + uuid_vec_t texture_ids; + S32 num_faces = hit_obj->getNumTEs(); + for (S32 face = 0; face < num_faces; face++) + { + LLViewerTexture* tex = hit_obj->getTEImage(face); + if (tex != nullptr) + { + texture_ids.push_back(tex->getID()); + } + else + { + texture_ids.push_back(LLUUID::null); + } + } + nodep->saveTextures(texture_ids); + } + } + else + { + dropTextureOneFace(hit_obj, hit_face, item, source, src_id); + + // If user dropped a texture onto face it implies + // applying texture now without cancel, save to selection + LLPanelFace* panel_face = gFloaterTools->getPanelFace(); + if (nodep + && gFloaterTools->getVisible() + && panel_face + && panel_face->getTextureDropChannel() == 0 /*texture*/ + && nodep->mSavedTextures.size() > hit_face) + { + LLViewerTexture* tex = hit_obj->getTEImage(hit_face); + if (tex != nullptr) + { + nodep->mSavedTextures[hit_face] = tex->getID(); + } + else + { + nodep->mSavedTextures[hit_face] = LLUUID::null; + } + } + } +} void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, S32 hit_face, @@ -2128,104 +2241,48 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( { if (cargo_type == DAD_TEXTURE) { - LLSelectNode *nodep = nullptr; - if (obj->isSelected()) + bool all_faces = mask & MASK_SHIFT; + if (item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) { - // update object's saved textures - nodep = LLSelectMgr::getInstance()->getSelection()->findNode(obj); + dropTexture(obj, face, item, mSource, mSourceID, all_faces); + } + else + { + ESource source = mSource; + LLUUID source_id = mSourceID; + LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces](const LLSD& notification, const LLSD& response) + { + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + // if Cancel pressed + if (option == 1) + { + return; + } + dropTexture(obj, face, item, source, source_id, all_faces); + }); } - - if((mask & MASK_SHIFT)) - { - dropTextureAllFaces(obj, item, mSource, mSourceID); - - // If user dropped a texture onto face it implies - // applying texture now without cancel, save to selection - if (nodep) - { - uuid_vec_t texture_ids; - S32 num_faces = obj->getNumTEs(); - for (S32 face = 0; face < num_faces; face++) - { - LLViewerTexture *tex = obj->getTEImage(face); - if (tex != nullptr) - { - texture_ids.push_back(tex->getID()); - } - else - { - texture_ids.push_back(LLUUID::null); - } - } - nodep->saveTextures(texture_ids); - } - } - else - { - dropTextureOneFace(obj, face, item, mSource, mSourceID); - - // If user dropped a texture onto face it implies - // applying texture now without cancel, save to selection - LLPanelFace* panel_face = gFloaterTools->getPanelFace(); - if (nodep - && gFloaterTools->getVisible() - && panel_face - && panel_face->getTextureDropChannel() == 0 /*texture*/ - && nodep->mSavedGLTFMaterialIds.size() > face) - { - LLViewerTexture *tex = obj->getTEImage(face); - if (tex != nullptr) - { - nodep->mSavedTextures[face] = tex->getID(); - } - else - { - nodep->mSavedTextures[face] = LLUUID::null; - } - } - } } else if (cargo_type == DAD_MATERIAL) { - LLSelectNode *nodep = nullptr; - if (obj->isSelected()) - { - // update object's saved materials - nodep = LLSelectMgr::getInstance()->getSelection()->findNode(obj); - } - - // If user dropped a material onto face it implies - // applying texture now without cancel, save to selection - if ((mask & MASK_SHIFT)) + bool all_faces = mask & MASK_SHIFT; + if (item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) { - dropMaterialAllFaces(obj, item, mSource, mSourceID); - - if (nodep) - { - uuid_vec_t material_ids; - gltf_materials_vec_t override_materials; - S32 num_faces = obj->getNumTEs(); - for (S32 face = 0; face < num_faces; face++) - { - material_ids.push_back(obj->getRenderMaterialID(face)); - override_materials.push_back(nullptr); - } - nodep->saveGLTFMaterials(material_ids, override_materials); - } + dropMaterial(obj, face, item, mSource, mSourceID, all_faces); } else { - dropMaterialOneFace(obj, face, item, mSource, mSourceID); - - // If user dropped a material onto face it implies - // applying texture now without cancel, save to selection - if (nodep - && gFloaterTools->getVisible() - && nodep->mSavedGLTFMaterialIds.size() > face) - { - nodep->mSavedGLTFMaterialIds[face] = obj->getRenderMaterialID(face); - nodep->mSavedGLTFOverrideMaterials[face] = nullptr; - } + ESource source = mSource; + LLUUID source_id = mSourceID; + LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces](const LLSD& notification, const LLSD& response) + { + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + // if Cancel pressed + if (option == 1) + { + return; + } + dropMaterial(obj, face, item, source, source_id, all_faces); + }); } } else if (cargo_type == DAD_MESH) diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index bf35840964..7bdd2d1a49 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -243,7 +243,15 @@ public: BOOL active, ESource source, const LLUUID& src_id); - static void dropTextureOneFace(LLViewerObject* hit_obj, S32 hit_face, + static void dropTexture(LLViewerObject* hit_obj, + S32 hit_face, + LLInventoryItem* item, + ESource source, + const LLUUID& src_id, + bool all_faces, + S32 tex_channel = -1); + static void dropTextureOneFace(LLViewerObject* hit_obj, + S32 hit_face, LLInventoryItem* item, ESource source, const LLUUID& src_id, @@ -252,7 +260,14 @@ public: LLInventoryItem* item, ESource source, const LLUUID& src_id); - static void dropMaterialOneFace(LLViewerObject* hit_obj, S32 hit_face, + static void dropMaterial(LLViewerObject* hit_obj, + S32 hit_face, + LLInventoryItem* item, + ESource source, + const LLUUID& src_id, + bool all_faces); + static void dropMaterialOneFace(LLViewerObject* hit_obj, + S32 hit_face, LLInventoryItem* item, ESource source, const LLUUID& src_id); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 935d61f7ea..83a707472e 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -128,11 +128,9 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) // left mouse down always picks transparent (but see handleMouseUp). // Also see LLToolPie::handleHover() - priorities are a bit different there. // Todo: we need a more consistent set of rules to work with - if (transp_object == visible_object || !visible_object) + if (transp_object == visible_object || !visible_object || + !transp_object) // avoid potential for null dereference below, don't make assumptions about behavior of pickImmediate { - // Note: if transparent object is null, then visible object is also null - // since transparent pick includes non-tranpsarent one. - // !transparent_object check will be covered by transparent_object == visible_object. mPick = transparent_pick; } else diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3708ad82e8..553eaaf9b2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1089,7 +1089,11 @@ U64 info_display_from_string(std::string info_display) } else if ("reflection probes" == info_display) { - return LLPipeline::RENDER_DEBUG_REFLECTION_PROBES; + return LLPipeline::RENDER_DEBUG_REFLECTION_PROBES; + } + else if ("probe updates" == info_display) + { + return LLPipeline::RENDER_DEBUG_PROBE_UPDATES; } else { diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9336d99555..4a1cf0109e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1827,7 +1827,7 @@ bool LLViewerFetchedTexture::updateFetch() if (mIsMissingAsset) { LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - missing asset"); - llassert_always(!mHasFetcher); + llassert(!mHasFetcher); return false; // skip } if (!mLoadedCallbackList.empty() && mRawImage.notNull()) @@ -2099,8 +2099,8 @@ bool LLViewerFetchedTexture::updateFetch() } } - llassert_always(mRawImage.notNull() || !mIsRawImageValid); - llassert_always(mRawImage.notNull() || !mNeedsCreateTexture); + llassert(mRawImage.notNull() || !mIsRawImageValid); + llassert(mRawImage.notNull() || !mNeedsCreateTexture); return mIsFetching ? true : false; } @@ -2527,8 +2527,8 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() destroyRawImage(); reloadRawImage(mLoadedCallbackDesiredDiscardLevel); - llassert_always(mRawImage.notNull()); - llassert_always(!mNeedsAux || mAuxRawImage.notNull()); + llassert(mRawImage.notNull()); + llassert(!mNeedsAux || mAuxRawImage.notNull()); } // @@ -2552,7 +2552,6 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // we're going to call them. mLastCallBackActiveTime = sCurrentTime; - //llassert_always(mRawImage.notNull()); if(mNeedsAux && mAuxRawImage.isNull()) { LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL; @@ -2641,9 +2640,9 @@ void LLViewerFetchedTexture::forceImmediateUpdate() LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) { - llassert_always(mGLTexturep.notNull()); - llassert_always(discard_level >= 0); - llassert_always(mComponents > 0); + llassert(mGLTexturep.notNull()); + llassert(discard_level >= 0); + llassert(mComponents > 0); if (mRawImage.notNull()) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index d4c6432e55..6e4c9c7a97 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -605,7 +605,8 @@ public: RENDER_DEBUG_TEXEL_DENSITY = 0x40000000, RENDER_DEBUG_TRIANGLE_COUNT = 0x80000000, RENDER_DEBUG_IMPOSTORS = 0x100000000, - RENDER_DEBUG_REFLECTION_PROBES = 0x200000000 + RENDER_DEBUG_REFLECTION_PROBES = 0x200000000, + RENDER_DEBUG_PROBE_UPDATES = 0x400000000 }; public: diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 1907dc2438..3a8f360e2d 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -144,14 +144,6 @@ parameter="rename" /> </menu_item_call> <menu_item_call - label="New Folder" - layout="topleft" - name="New Folder"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="category" /> - </menu_item_call> - <menu_item_call label="New Outfit" layout="topleft" name="New Outfit"> @@ -699,6 +691,234 @@ <menu_item_separator layout="topleft" name="Subfolder Separator" /> + <menu + label="Create new" + layout="topleft" + name="create_new"> + <menu_item_call + label="New Folder" + layout="topleft" + name="New Folder"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="category" /> + </menu_item_call> + <menu_item_call + label="New Script" + layout="topleft" + name="New Script"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="lsl" /> + </menu_item_call> + <menu_item_call + label="New Notecard" + layout="topleft" + name="New Note"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="notecard" /> + </menu_item_call> + <menu_item_call + label="New Gesture" + layout="topleft" + name="New Gesture"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="gesture" /> + </menu_item_call> + <menu_item_call + label="New Material" + layout="topleft" + name="New Material"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="material" /> + <menu_item_call.on_enable + function="Inventory.MaterialsEnabled" /> + </menu_item_call> + <menu + label="New Clothes" + layout="topleft" + name="New Clothes"> + <menu_item_call + label="New Shirt" + layout="topleft" + name="New Shirt"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="shirt" /> + </menu_item_call> + <menu_item_call + label="New Pants" + layout="topleft" + name="New Pants"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="pants" /> + </menu_item_call> + <menu_item_call + label="New Shoes" + layout="topleft" + name="New Shoes"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="shoes" /> + </menu_item_call> + <menu_item_call + label="New Socks" + layout="topleft" + name="New Socks"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="socks" /> + </menu_item_call> + <menu_item_call + label="New Jacket" + layout="topleft" + name="New Jacket"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="jacket" /> + </menu_item_call> + <menu_item_call + label="New Skirt" + layout="topleft" + name="New Skirt"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="skirt" /> + </menu_item_call> + <menu_item_call + label="New Gloves" + layout="topleft" + name="New Gloves"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="gloves" /> + </menu_item_call> + <menu_item_call + label="New Undershirt" + layout="topleft" + name="New Undershirt"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="undershirt" /> + </menu_item_call> + <menu_item_call + label="New Underpants" + layout="topleft" + name="New Underpants"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="underpants" /> + </menu_item_call> + <menu_item_call + label="New Alpha Mask" + layout="topleft" + name="New Alpha Mask"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="alpha" /> + </menu_item_call> + <menu_item_call + label="New Tattoo" + layout="topleft" + name="New Tattoo"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="tattoo" /> + </menu_item_call> + <menu_item_call + label="New Universal" + layout="topleft" + name="New Universal"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="universal" /> + </menu_item_call> + <menu_item_call + label="New Physics" + layout="topleft" + name="New Physics"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="physics" /> + </menu_item_call> + </menu> + <menu + label="New Body Parts" + layout="topleft" + name="New Body Parts"> + <menu_item_call + label="New Shape" + layout="topleft" + name="New Shape"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="shape" /> + </menu_item_call> + <menu_item_call + label="New Skin" + layout="topleft" + name="New Skin"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="skin" /> + </menu_item_call> + <menu_item_call + label="New Hair" + layout="topleft" + name="New Hair"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="hair" /> + </menu_item_call> + <menu_item_call + label="New Eyes" + layout="topleft" + name="New Eyes"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="eyes" /> + </menu_item_call> + </menu> + <menu + label="New Settings" + layout="topleft" + name="New Settings"> + <menu_item_call + label="New Sky" + layout="topleft" + name="New Sky"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="sky"/> + <menu_item_call.on_enable + function="Inventory.EnvironmentEnabled" /> + </menu_item_call> + <menu_item_call + label="New Water" + layout="topleft" + name="New Water"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="water"/> + <menu_item_call.on_enable + function="Inventory.EnvironmentEnabled" /> + </menu_item_call> + <menu_item_call + label="New Day Cycle" + layout="topleft" + name="New Day Cycle"> + <menu_item_call.on_click + function="Inventory.DoCreate" + parameter="daycycle"/> + <menu_item_call.on_enable + function="Inventory.EnvironmentEnabled" /> + </menu_item_call> + </menu> + </menu> <menu_item_call label="Create folder from selected" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 8b39ea192b..0bfdead6e7 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2975,6 +2975,16 @@ function="World.EnvPreset" parameter="reflection probes" /> </menu_item_check> <menu_item_check + label="Probe Updates" + name="Probe Updates"> + <menu_item_check.on_check + function="Advanced.CheckInfoDisplay" + parameter="probe updates" /> + <menu_item_check.on_click + function="Advanced.ToggleInfoDisplay" + parameter="probe updates" /> + </menu_item_check> + <menu_item_check label="Particles" name="Particles"> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f2473e98d3..d1838fc7ef 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5962,6 +5962,22 @@ You have updated the location of this pick but the other details will retain the <notification icon="alertmodal.tga" + name="ApplyInventoryToObject" + type="alertmodal"> +You are applying 'no copy' inventory item. +This item will be moved to object's inventory, not copied. + +Move the inventory item? + <tag>confirm</tag> + <usetemplate + ignoretext="Warn me before I apply 'no-copy' items to an object" + name="okcancelignore" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="MoveInventoryFromObject" type="alertmodal"> You have selected 'no copy' inventory items. |