diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-11-29 10:45:43 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-11-29 10:45:43 +0200 |
commit | d1c0a5b840e9ec2d3a468216339ae5367aed4bf5 (patch) | |
tree | 30a47a8bf5ba4561c0f6d3839afd1a9f35dac873 /indra/newview/llfloaterpreference.cpp | |
parent | 6f99a844efe4e7809ed0a995b0118851e6f0d8d5 (diff) | |
parent | 53e958a2638705572ed7dbf61369d92b332c4b60 (diff) |
Merge branch 'DRTVWR-559' into marchcat/587-v-pbr-merge
# Conflicts:
# indra/llcommon/CMakeLists.txt
# indra/newview/llspatialpartition.cpp
# indra/newview/llviewergenericmessage.cpp
# indra/newview/llvoavatar.cpp
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 47a78c049a..aa723eb3a8 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -79,7 +79,6 @@ #include "llviewerthrottle.h" #include "llvoavatarself.h" #include "llvotree.h" -#include "llvosky.h" #include "llfloaterpathfindingconsole.h" // linden library includes #include "llavatarnamecache.h" @@ -439,6 +438,7 @@ BOOL LLFloaterPreference::postBuild() gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this)); gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this)); + gSavedPerAccountSettings.getControl("PBRUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangePBRFolder, this)); gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this)); gSavedPerAccountSettings.getControl("SoundUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeSoundFolder, this)); gSavedPerAccountSettings.getControl("AnimationUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeAnimationFolder, this)); @@ -732,6 +732,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) onChangeMaturity(); onChangeModelFolder(); + onChangePBRFolder(); onChangeTextureFolder(); onChangeSoundFolder(); onChangeAnimationFolder(); @@ -1227,29 +1228,10 @@ void LLFloaterPreference::buildPopupLists() void LLFloaterPreference::refreshEnabledState() { - LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders"); - LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); + LLCheckBoxCtrl* ctrl_pbr = getChild<LLCheckBoxCtrl>("UsePBRShaders"); - // if vertex shaders off, disable all shader related products - if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) - { - ctrl_wind_light->setEnabled(FALSE); - ctrl_wind_light->setValue(FALSE); - } - else - { - ctrl_wind_light->setEnabled(TRUE); - } - - //Deferred/SSAO/Shadows - BOOL bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump"); - BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); - BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && - bumpshiny && - shaders && - (ctrl_wind_light->get()) ? TRUE : FALSE; - - ctrl_deferred->setEnabled(enabled); + //PBR + ctrl_pbr->setEnabled(TRUE); // Cannot have floater active until caps have been received getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true); @@ -1257,7 +1239,6 @@ void LLFloaterPreference::refreshEnabledState() getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess()); } -// static void LLAvatarComplexityControls::setIndirectControls() { /* @@ -1680,6 +1661,14 @@ void LLFloaterPreference::onChangeModelFolder() } } +void LLFloaterPreference::onChangePBRFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild<LLTextBox>("upload_pbr")->setText(get_category_path(LLFolderType::FT_MATERIAL)); + } +} + void LLFloaterPreference::onChangeTextureFolder() { if (gInventory.isInventoryUsable()) @@ -1774,7 +1763,7 @@ void LLFloaterPreference::onAtmosShaderChange() if(ctrl_alm) { //Deferred/SSAO/Shadows - BOOL bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump"); + BOOL bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump"); BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && bumpshiny && |