diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-05-29 11:54:56 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-05-29 11:54:56 +0800 |
| commit | 11d75418fce8372e9976b069070d9d0506766d0d (patch) | |
| tree | d0fc6b405dbcffefcd85f3ba52a8248c0128acde /indra/newview/llfloaterenvironmentadjust.cpp | |
| parent | b6c3d47c007c59cbd3c9913a0b99f9d42bdb8d75 (diff) | |
| parent | 0421e7b846b03d316740d759348c3aaa723d0b14 (diff) | |
Merge branch '2025.04'
Diffstat (limited to 'indra/newview/llfloaterenvironmentadjust.cpp')
| -rw-r--r-- | indra/newview/llfloaterenvironmentadjust.cpp | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index 35f8340997..4825cbf7fb 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -242,9 +242,7 @@ void LLFloaterEnvironmentAdjust::captureCurrentEnvironment() environment.setEnvironment(LLEnvironment::ENV_LOCAL, mLiveSky, FLOATER_ENVIRONMENT_UPDATE); environment.setEnvironment(LLEnvironment::ENV_LOCAL, mLiveWater, FLOATER_ENVIRONMENT_UPDATE); } - environment.setSelectedEnvironment(LLEnvironment::ENV_LOCAL); - environment.updateEnvironment(LLEnvironment::TRANSITION_INSTANT); - + environment.setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT); } void LLFloaterEnvironmentAdjust::onButtonReset() @@ -258,7 +256,6 @@ void LLFloaterEnvironmentAdjust::onButtonReset() this->closeFloater(); LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); - LLEnvironment::instance().updateEnvironment(); } }); @@ -455,9 +452,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() |
