<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/newview/llfloaterenvironmentadjust.cpp, branch cef_147</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=cef_147</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=cef_147'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2025-04-18T18:36:56Z</updated>
<entry>
<title>Merge develop into release/2025.04</title>
<updated>2025-04-18T18:36:56Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>117672381+akleshchev@users.noreply.github.com</email>
</author>
<published>2025-04-18T18:36:56Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=9a333e65c4019540d5675e72ac57ef5ab106aab0'/>
<id>urn:sha1:9a333e65c4019540d5675e72ac57ef5ab106aab0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#3887 Fix clouds not updating</title>
<updated>2025-04-15T18:40:17Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2025-04-15T17:43:36Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=a99c1e36de575c008ea6f16c74cbcdb99ea29c5b'/>
<id>urn:sha1:a99c1e36de575c008ea6f16c74cbcdb99ea29c5b</id>
<content type='text'>
setSelectedEnvironment for a default transition was conflicting with
updateEnvironment for an instant transition.
setSelectedEnvironment already has updateEnvironment, so remove the
update and fix time
</content>
</entry>
<entry>
<title>Fix(EnvAdjust): Properly update sky after cloud texture selection</title>
<updated>2025-04-04T13:02:08Z</updated>
<author>
<name>William Weaver</name>
<email>paperwork.resident@gmail.com</email>
</author>
<published>2025-04-04T13:02:08Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=1fcabcdd324305ccfafb59b9c9ef5e04ef859a4d'/>
<id>urn:sha1:1fcabcdd324305ccfafb59b9c9ef5e04ef859a4d</id>
<content type='text'>
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-&gt;setCloudNoiseTextureId() and called mLiveSky-&gt;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&lt;LLTextureCtrl&gt;, as getChild() never returns null.
2. Clone the current sky settings (mLiveSky-&gt;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.
</content>
</entry>
<entry>
<title>Fix(EnvAdjust): Ensure cloud texture selection updates the sky</title>
<updated>2025-04-01T23:13:01Z</updated>
<author>
<name>William Weaver</name>
<email>paperwork.resident@gmail.com</email>
</author>
<published>2025-04-01T23:13:01Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=04af0424359d55ddb8056dc1693c078eadaee239'/>
<id>urn:sha1:04af0424359d55ddb8056dc1693c078eadaee239</id>
<content type='text'>
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-&gt;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-&gt;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 -&gt; Environment Editor -&gt; 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.
</content>
</entry>
<entry>
<title>viewer#3169 Legacy settings should no longer be automatically converted</title>
<updated>2024-12-10T19:05:41Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>andreykproductengine@lindenlab.com</email>
</author>
<published>2024-12-02T19:22:04Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=97826b555b74044887b765e7a029e2763ea86308'/>
<id>urn:sha1:97826b555b74044887b765e7a029e2763ea86308</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now</title>
<updated>2024-07-08T18:27:14Z</updated>
<author>
<name>Ansariel</name>
<email>ansariel.hiller@phoenixviewer.com</email>
</author>
<published>2024-07-08T18:27:14Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=9fdca96f8bd2211a99fe88e57b70cbecefa20b6d'/>
<id>urn:sha1:9fdca96f8bd2211a99fe88e57b70cbecefa20b6d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Post-merge - trim trailing whitespace</title>
<updated>2024-06-10T17:45:59Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2024-06-10T17:42:42Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=c95b4bf3ea2b681d6d05468b07e60fedb71fa2cf'/>
<id>urn:sha1:c95b4bf3ea2b681d6d05468b07e60fedb71fa2cf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'main' into DRTVWR-600-maint-A</title>
<updated>2024-03-26T22:45:06Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2024-03-26T22:45:06Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=71ed19839eb95d918329b2c776c8af3b8724f1da'/>
<id>urn:sha1:71ed19839eb95d918329b2c776c8af3b8724f1da</id>
<content type='text'>
# Conflicts:
#	indra/newview/llappviewer.cpp
#	indra/newview/llfloaterchangeitemthumbnail.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltexturectrl.h
#	indra/newview/lltooldraganddrop.cpp
#	indra/newview/llviewerdisplay.cpp
#	indra/newview/llvovolume.cpp
</content>
</entry>
<entry>
<title>Convert remaining BOOL to bool</title>
<updated>2024-02-21T21:14:31Z</updated>
<author>
<name>Ansariel</name>
<email>ansariel.hiller@phoenixviewer.com</email>
</author>
<published>2024-02-21T20:05:14Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=60d3dd98a44230c21803c1606552ee098ed9fa7c'/>
<id>urn:sha1:60d3dd98a44230c21803c1606552ee098ed9fa7c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Convert BOOL to bool in llui</title>
<updated>2024-02-21T01:00:25Z</updated>
<author>
<name>Ansariel</name>
<email>ansariel.hiller@phoenixviewer.com</email>
</author>
<published>2024-02-20T22:46:23Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=a5261a5fa8fad810ecb5c260d92c3e771822bf58'/>
<id>urn:sha1:a5261a5fa8fad810ecb5c260d92c3e771822bf58</id>
<content type='text'>
</content>
</entry>
</feed>
