diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2025-04-09 17:34:04 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-09 17:34:04 -0400 | 
| commit | 42dc4501b5c66ddeb9d1fa16ee424e2de988028b (patch) | |
| tree | af5b2c5c5111a81ae780fca05327a3ad751f79a4 /indra | |
| parent | be2e7e9d185d82e1e4aa60f6a73bd7ba4abbfeb5 (diff) | |
| parent | 1fcabcdd324305ccfafb59b9c9ef5e04ef859a4d (diff) | |
Merge pull request #3853 from williamweaver/fix/cloud-texture-loading
Fix: Apply Cloud Texture Changes from Environment Settings Floater
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llfloaterenvironmentadjust.cpp | 24 | 
1 files changed, 22 insertions, 2 deletions
| diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index 35f8340997..58616995d3 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -455,9 +455,29 @@ void LLFloaterEnvironmentAdjust::onMoonAzimElevChanged()  void LLFloaterEnvironmentAdjust::onCloudMapChanged()  {      if (!mLiveSky) +    {          return; -    mLiveSky->setCloudNoiseTextureId(getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->getValue().asUUID()); -    mLiveSky->update(); +    } + +    LLTextureCtrl* picker_ctrl = getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP); + +    LLUUID new_texture_id = picker_ctrl->getValue().asUUID(); + +    LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + +    LLSettingsSky::ptr_t sky_to_set = mLiveSky->buildClone(); +    if (!sky_to_set) +    { +        return; +    } + +    sky_to_set->setCloudNoiseTextureId(new_texture_id); + +    LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, sky_to_set); + +    LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true); + +    picker_ctrl->setValue(new_texture_id);  }  void LLFloaterEnvironmentAdjust::onWaterMapChanged() | 
