diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt index 9f9ca6c39c..2186d8d62c 100644 --- a/indra/edit-me-to-trigger-new-build.txt +++ b/indra/edit-me-to-trigger-new-build.txt @@ -2,3 +2,4 @@ + diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 58bc5bc50f..8aaf19b270 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13022,13 +13022,13 @@ Change of this parameter will affect the layout of buttons in notification toast RenderVolumeLODFactor Comment - Controls level of detail of primitives (multiplier for current screen area when calculated level of detail) + Influences the distance at which the viewer will display a lower detail model. Higher values = more lag. IMPORTANT: Please disregard advice to increase this value, such as is commonly distributed in notecards. Persist 1 Type F32 Value - 1.0 + 2.0 SanityCheckType LessThanEquals SanityValue diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index b06f9f070c..1ce9b0c15e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -126,6 +126,9 @@ void commit_radio_group_land(LLUICtrl* ctrl); void commit_grid_mode(LLUICtrl *); void commit_slider_zoom(LLUICtrl *ctrl); +// show/hide build highlight +void commit_show_highlight(void *ctrl); + /** * Class LLLandImpactsObserver * @@ -268,9 +271,13 @@ BOOL LLFloaterTools::postBuild() // show highlight mCheckShowHighlight = getChild("checkbox show highlight"); + mCheckShowHighlight->setValue(gSavedSettings.getBOOL("RenderHighlightSelections")); + LLSelectMgr::instance().setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_NORMAL); + mCheckActualRoot = getChild("checkbox actual root"); // + // // Create Buttons // @@ -476,6 +483,9 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) // FIRE-7802: Grass and tree selection in build tool mCommitCallbackRegistrar.add("BuildTool.TreeGrass", boost::bind(&LLFloaterTools::onSelectTreeGrassCombo, this)); + // show/hide build highlight + mCommitCallbackRegistrar.add("BuildTool.commitShowHighlight", boost::bind(&commit_show_highlight, this)); + mLandImpactsObserver = new LLLandImpactsObserver(); LLViewerParcelMgr::getInstance()->addObserver(mLandImpactsObserver); } @@ -1070,6 +1080,15 @@ void LLFloaterTools::onOpen(const LLSD& key) { mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection(); mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); + + // Set the check box value from the saved setting + // this function runs on selection change + if (!mOpen) + { + mOpen = TRUE; + mCheckShowHighlight->setValue(gSavedSettings.getBOOL("RenderHighlightSelections")); + } + // std::string panel = key.asString(); if (!panel.empty()) @@ -1099,6 +1118,12 @@ void LLFloaterTools::onClose(bool app_quitting) LLSelectMgr::getInstance()->promoteSelectionToRoot(); gSavedSettings.setBOOL("EditLinkedParts", FALSE); + // + LLSelectMgr::instance().setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_NORMAL); + + mOpen = FALSE; //hack cause onOpen runs on every selection change but onClose doesnt. + // + gViewerWindow->showCursor(); resetToolState(); @@ -1295,6 +1320,23 @@ void commit_select_component(void *data) } } +// show/hide build highlight +void commit_show_highlight(void *data) +{ + LLFloaterTools* floaterp = (LLFloaterTools*)data; + BOOL show_highlight = floaterp->mCheckShowHighlight->get(); + if (show_highlight) + { + LLSelectMgr::getInstance()->setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_SHOW); + } + else + { + LLSelectMgr::getInstance()->setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_HIDE); + } +} +// + + // static void LLFloaterTools::setObjectType( LLPCode pcode ) { diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 7ee3221080..f7ef1ebd63 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -224,12 +224,14 @@ public: private: BOOL mDirty; BOOL mHasSelection; + BOOL mOpen; //Phoenix:KC //Phoenix:KC S32 mCollapsedHeight; S32 mExpandedHeight; std::map mStatusText; + protected: LLSD mMediaSettings; diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 608507a0d2..98b253f291 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -72,7 +72,10 @@ LLUUID notification_id_to_object_id(const LLUUID& notification_id) LLScriptFloater::LLScriptFloater(const LLSD& key) -: LLDockableFloater(NULL, true, key) +// FIRE-21546: Don't close docked floater if IMs arrive, but only if IMs shown in tabs - still hide when using docked windows! +//: LLDockableFloater(NULL, true, key) +: LLDockableFloater(NULL, gSavedSettings.getS32("FSChatWindow") != 1, key) +// , mScriptForm(NULL) , mSaveFloaterPosition(false) { diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index f3926f8659..21aaa33f3d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -238,6 +238,11 @@ LLSelectMgr::LLSelectMgr() mForceSelection = FALSE; mShowSelection = FALSE; + + // show/hide build highlight + mFSShowHideHighlight = FS_SHOW_HIDE_HIGHLIGHT_NORMAL; + // + } @@ -5948,7 +5953,10 @@ void LLSelectMgr::updateSelectionSilhouette(LLObjectSelectionHandle object_handl } void LLSelectMgr::renderSilhouettes(BOOL for_hud) { - if (!mRenderSilhouettes || !mRenderHighlightSelections) + // show/hide build highlight + // if (!mRenderSilhouettes || !mRenderHighlightSelections) + if (((mFSShowHideHighlight == FS_SHOW_HIDE_HIGHLIGHT_NORMAL) && (!mRenderSilhouettes || !mRenderHighlightSelections)) || (mFSShowHideHighlight == FS_SHOW_HIDE_HIGHLIGHT_HIDE)) + // { return; } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 4f8944828c..d551c28496 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -69,6 +69,15 @@ const S32 MAX_CHILDREN_PER_TASK = 255; const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; // +// show/hide build highlight +enum EFSShowHideHighlight +{ + FS_SHOW_HIDE_HIGHLIGHT_NORMAL = 0, + FS_SHOW_HIDE_HIGHLIGHT_SHOW = 1, + FS_SHOW_HIDE_HIGHLIGHT_HIDE = 2 +}; +// + // This is used by the DeRezObject message to determine where to put // derezed tasks. enum EDeRezDestination @@ -612,6 +621,10 @@ public: void renderSilhouettes(BOOL for_hud); void enableSilhouette(BOOL enable) { mRenderSilhouettes = enable; } + // show/hide build highlight + void setFSShowHideHighlight(EFSShowHideHighlight state) { mFSShowHideHighlight = state; } + // + //////////////////////////////////////////////////////////////// // Utility functions that operate on the current selection //////////////////////////////////////////////////////////////// @@ -913,6 +926,10 @@ private: LLAnimPauseRequest mPauseRequest; +// show/hide build highlight + EFSShowHideHighlight mFSShowHideHighlight; +// + // Warning when trying to duplicate while in edit linked parts/select face mode public: // returns TRUE if current selection does not contain individual selections diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a2ca0bf8d5..552abc3af9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1085,6 +1085,36 @@ bool idle_startup() // *TODO: Does this need to be here? LLStringOps::setupDatetimeInfo(false); + // [FIRE-22130] for LOD Factors > 4 reset to the detected dafault + if (gSavedSettings.getF32("RenderVolumeLODFactor") > 4.f) + { + bool feature_table_success = false; + LLFeatureManager& feature_manager = LLFeatureManager::instance(); + U32 level = gSavedSettings.getU32("RenderQualityPerformance"); + if (feature_manager.isValidGraphicsLevel(level)) + { + std::string level_name = feature_manager.getNameForGraphicsLevel(level); + LLFeatureList* feature_list = feature_manager.findMask(level_name); + if (feature_list) + { + F32 new_val = feature_list->getRecommendedValue("RenderVolumeLODFactor"); + if (new_val > 0.f) + { + feature_table_success = true; + gSavedSettings.setF32("RenderVolumeLODFactor", new_val); + LL_INFOS("AppInit") << "LOD Factor too high. Resetting to recommended value for graphics level '" << level_name << "': " << new_val << LL_ENDL; + } + } + } + + if (!feature_table_success) + { + gSavedSettings.getControl("RenderVolumeLODFactor")->resetToDefault(true); + LL_INFOS("AppInit") << "LOD Factor too high. Resetting to recommended value for global default: " << gSavedSettings.getF32("RenderVolumeLODFactor") << LL_ENDL; + } + } + // + // Go to the next startup state LLStartUp::setStartupState( STATE_BROWSER_INIT ); return FALSE; @@ -3051,14 +3081,6 @@ void login_show() //LLPanelLogin::show( gViewerWindow->getWindowRectScaled(), login_callback, NULL ); FSPanelLogin::show( gViewerWindow->getWindowRectScaled(), login_callback, NULL ); // [FS Login Panel] - - // Warning about too high LOD on startup - if (gSavedSettings.getF32("RenderVolumeLODFactor") >= 4.0f) - { - LLNotificationsUtil::add("RenderVolumeLODFactorWarning"); - } - // - } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 291745ae7a..5c9aacb58e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -286,7 +286,7 @@ static bool handleVolumeLODChanged(const LLSD& newvalue) LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; // Warning about too high LOD on LOD change - if (LLVOVolume::sLODFactor >= 4.0f) + if (LLVOVolume::sLODFactor > 4.0f) { LLNotificationsUtil::add("RenderVolumeLODFactorWarning"); } diff --git a/indra/newview/skins/default/xui/de/floater_phototools.xml b/indra/newview/skins/default/xui/de/floater_phototools.xml index 415ab97838..61fff0ec46 100644 --- a/indra/newview/skins/default/xui/de/floater_phototools.xml +++ b/indra/newview/skins/default/xui/de/floater_phototools.xml @@ -332,7 +332,7 @@