diff options
| author | Cosmic Linden <cosmic@lindenlab.com> | 2024-05-15 19:27:37 -0700 |
|---|---|---|
| committer | Cosmic Linden <cosmic@lindenlab.com> | 2024-06-07 18:14:32 -0700 |
| commit | 6de0086ae9c678dafa8a26eb117279a487860f2f (patch) | |
| tree | 76ca4b883e977ec5a12bc9ec9a9a42509f098cda /indra/newview/llviewerregion.cpp | |
| parent | 33ddedd6b557ed9130dd8cd3b8327a697614a3ac (diff) | |
secondlife/viewer#1475: Add PBR terrain repeats editing
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
| -rwxr-xr-x | indra/newview/llviewerregion.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index bf4bdfd252..699cde8969 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -55,6 +55,7 @@ #include "llfloaterregioninfo.h" #include "llgltfmateriallist.h" #include "llhttpnode.h" +#include "llpbrterrainfeatures.h" #include "llregioninfomodel.h" #include "llsdutil.h" #include "llstartup.h" @@ -2462,6 +2463,26 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) gSavedSettings.setS32("max_texture_dimension_Y", 1024); } + if (features.has("PBRTerrainEnabled")) + { + bool enabled = features["PBRTerrainEnabled"]; + gSavedSettings.setBOOL("RenderTerrainPBREnabled", enabled); + } + else + { + gSavedSettings.setBOOL("RenderTerrainPBREnabled", false); + } + + if (features.has("PBRMaterialSwatchEnabled")) + { + bool enabled = features["PBRMaterialSwatchEnabled"]; + gSavedSettings.setBOOL("UIPreviewMaterial", enabled); + } + else + { + gSavedSettings.setBOOL("UIPreviewMaterial", false); + } + if (features.has("GLTFEnabled")) { bool enabled = features["GLTFEnabled"]; @@ -2471,6 +2492,16 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) { gSavedSettings.setBOOL("GLTFEnabled", false); } + + if (features.has("PBRTerrainTransformsEnabled")) + { + bool enabled = features["PBRTerrainTransformsEnabled"]; + gSavedSettings.setBOOL("RenderTerrainTransformsPBREnabled", enabled); + } + else + { + gSavedSettings.setBOOL("RenderTerrainTransformsPBREnabled", false); + } }; @@ -3109,6 +3140,17 @@ void LLViewerRegion::unpackRegionHandshake() { compp->setParamsReady(); } + + LLPBRTerrainFeatures::queueQuery(*this, [](LLUUID region_id, bool success, const LLModifyRegion& composition_changes) + { + if (!success) { return; } + LLViewerRegion* region = LLWorld::getInstance()->getRegionFromID(region_id); + if (!region) { return; } + LLVLComposition* compp = region->getComposition(); + if (!compp) { return; } + compp->apply(composition_changes); + LLFloaterRegionInfo::sRefreshFromRegion(region); + }); } @@ -3206,6 +3248,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("MapLayerGod"); capabilityNames.append("MeshUploadFlag"); capabilityNames.append("ModifyMaterialParams"); + capabilityNames.append("ModifyRegion"); capabilityNames.append("NavMeshGenerationStatus"); capabilityNames.append("NewFileAgentInventory"); capabilityNames.append("ObjectAnimation"); |
