summaryrefslogtreecommitdiff
path: root/indra/doxygen
diff options
context:
space:
mode:
authorWilliam Weaver <paperwork.resident@gmail.com>2025-04-02 02:13:01 +0300
committerWilliam Weaver <paperwork.resident@gmail.com>2025-04-02 02:13:01 +0300
commit04af0424359d55ddb8056dc1693c078eadaee239 (patch)
tree987fdb4ce0e3c6d6f45a9581a55042cceafd55d0 /indra/doxygen
parente1ebb33ab2966a20b63741dd84a0826e82b6a807 (diff)
Fix(EnvAdjust): Ensure cloud texture selection updates the sky
Problem: When selecting a new cloud texture in the Personal Lighting floater (LLFloaterEnvironmentAdjust) using the cloud map texture picker, the sky rendering did not update to reflect the selected texture. The callback only updated the internal mLiveSky object and its subsequent call to mLiveSky->update() was insufficient to trigger a live render update. Cause: The onCloudMapChanged callback modified the mLiveSky settings object directly and called its update() method. However, in the context of live environment adjustments, changes require propagation through the central LLEnvironment singleton to correctly update the active environment layer (ENV_LOCAL) and signal the renderer. Relying solely on the settings object's update() method bypassed this necessary mechanism. Solution: This commit refactors onCloudMapChanged to correctly handle the update: 1. Uses the LLEnvironment singleton to manage the state change: - Explicitly targets the local environment layer (ENV_LOCAL) via setSelectedEnvironment(). - Clones the mLiveSky settings object. - Uses LLEnvironment::setEnvironment() to apply the modified clone to the ENV_LOCAL layer. - Uses LLEnvironment::updateEnvironment() to trigger the render update. 2. Synchronizes the UI preview: - Calls picker_ctrl->setValue() on the LLTextureCtrl widget after the environment update to ensure the UI preview matches the applied texture. Result: Selecting a cloud texture in the Environment Settings floater now correctly updates both the sky rendering and the UI preview widget simultaneously. Testing: - Open World -> Environment Editor -> Environment Settings. - Go to the Clouds tab. - Click the cloud texture preview to open the texture picker. - Select a new cloud texture and click OK. - Verify the sky updates immediately to use the selected texture. - Verify the texture preview in the floater also updates immediately. - Repeat with several different textures to confirm consistent behavior.
Diffstat (limited to 'indra/doxygen')
0 files changed, 0 insertions, 0 deletions