Go to file
William Weaver 1fcabcdd32 Fix(EnvAdjust): Properly update sky after cloud texture selection
Problem:
When selecting a new cloud texture in the Personal Lighting floater (LLFloaterEnvironmentAdjust), the sky did not visually update. The code previously only updated LiveSky->setCloudNoiseTextureId() and called mLiveSky->update(), which failed to notify the global LLEnvironment mechanism or the renderer about the new texture.

Cause:
Relying solely on mLiveSky for environment changes is insufficient. To update the live environment layer (ENV_LOCAL) and trigger a render refresh, calls to LLEnvironment::setEnvironment() and LLEnvironment::updateEnvironment() are required.

Solution:
1. Remove an unnecessary null-check for getChild<LLTextureCtrl>, as getChild() never returns null.
2. Clone the current sky settings (mLiveSky->buildClone()) to avoid modifying a shared environment object directly.
3. Apply the new cloud texture ID to the clone.
4. Use LLEnvironment::setEnvironment(ENV_LOCAL, sky_to_set) to apply the updated settings to the user's local environment override.
5. Call LLEnvironment::updateEnvironment(LLEnvironment::TRANSITION_INSTANT, true) to ensure the renderer recognizes and displays the updated texture immediately.
6. Reset the picker control’s value to match the newly applied texture for UI consistency.

Additional Note:
A partial implementation was inadvertently committed earlier (commit`04af042`) due to a local staging error. This commit supersedes that incomplete change by correctly implementing the intended fix.

Result:
Selecting a new cloud texture from LLFloaterEnvironmentAdjust now immediately updates both the in-world sky rendering and the texture preview UI, ensuring consistency and clarity for users.

Testing:
- Open the Personal Lighting floater and select various cloud textures.
- Verify that the sky updates immediately for each new selection.
- Confirm that the texture picker also updates to reflect the selected texture.
2025-04-04 16:02:08 +03:00
.github Allow QA workflow to run on Second_Life_X branches 2025-03-27 15:28:15 -07:00
doc secondlife/viewer#2483: Fix label typo in PBR terrain texture transforms tab 2024-09-03 10:10:32 -07:00
etc fixup tabs 2024-03-11 14:41:12 -07:00
indra Fix(EnvAdjust): Properly update sky after cloud texture selection 2025-04-04 16:02:08 +03:00
scripts message_template.msg to agree with master-message-template 2025-03-17 13:01:47 -07:00
.clang-format More changes to Clang-Format to match the current coding standard (#2375) 2024-08-21 19:46:49 +03:00
.editorconfig Add editorconfig 2024-05-01 08:23:35 -07:00
.git-blame-ignore-revs add some more whitespace commits to .git-blame-ignore-revs 2024-09-18 20:04:24 -07:00
.gitattributes Protect NSIS scripts from eol-style translations. (#1556) 2024-05-23 11:23:50 -07:00
.gitignore Merge branch 'main' into DRTVWR-489 2023-12-15 07:06:15 +02:00
.pre-commit-config.yaml Trim trailing whitespace 2024-05-29 08:10:00 -07:00
CONTRIBUTING.md Add discord channel for open source discussion. 2025-04-03 12:58:26 -04:00
LICENSE Renamed LICENSE.txt to follow naming scheme of other repos 2022-11-18 17:10:03 -05:00
README.md Add a basic CONTRIBUTING.md 2024-01-26 23:58:47 -08:00
autobuild.xml Introduce OpenXR SDK prebuilt package and cmake setup (#2503) 2024-09-04 23:10:50 -04:00
build.sh remove dead code in build.sh 2024-09-19 12:02:57 -07:00
buildscripts_support_functions SL-18837: Get buildscripts_support_functions from sling-buildscripts 2023-06-28 16:58:32 -04:00

README.md

Second Life Logo

Second Life is a free 3D virtual world where users can create, connect and chat with others from around the world. This repository contains the source code for the official client.

Open Source

Second Life provides a huge variety of tools for expression, content creation, socialization and play. Its vibrancy is only possible because of input and contributions from its residents. The client codebase has been open source since 2007 and is available under the LGPL license. The Open Source Portal contains additional information about Linden Lab's open source history and projects.

Download

Most people use a pre-built viewer release to access Second Life. Windows and macOS builds are published on the official website. More experimental viewers, such as release candidates and project viewers, are detailed on the Alternate Viewers page.

Third Party Viewers

Third party maintained forks, which include Linux compatible builds, are indexed in the Third Party Viewer Directory.

Build Instructions

Windows

Mac

Linux

Contribute

Help make Second Life better! You can get involved with improvements by filing bugs, suggesting enhancements, submitting pull requests and more. See the CONTRIBUTING and the open source portal for details.