Skip to content

Commit ad84bf5

Browse files
committed
viewer#3169 Legacy settings should no longer be automatically converted
1 parent f891b66 commit ad84bf5

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

indra/newview/app_settings/settings.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11460,6 +11460,17 @@
1146011460
<key>Value</key>
1146111461
<string />
1146211462
</map>
11463+
<key>SkyAutoAdjustLegacy</key>
11464+
<map>
11465+
<key>Comment</key>
11466+
<string>If true, environment edition floater will auto adjust to use HDR. This is the "opt-out" button for HDR and tonemapping when coupled with a sky setting that predates PBR.</string>
11467+
<key>Persist</key>
11468+
<integer>1</integer>
11469+
<key>Type</key>
11470+
<string>Boolean</string>
11471+
<key>Value</key>
11472+
<integer>0</integer>
11473+
</map>
1146311474
<key>SkyAmbientScale</key>
1146411475
<map>
1146511476
<key>Comment</key>

indra/newview/llfloatereditextdaycycle.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,7 @@ void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id, S32 track)
17121712

17131713
void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &pday)
17141714
{
1715+
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "SkyAutoAdjustLegacy", false);
17151716
for (U32 i = LLSettingsDay::TRACK_GROUND_LEVEL; i <= LLSettingsDay::TRACK_MAX; i++)
17161717
{
17171718
LLSettingsDay::CycleTrack_t &day_track = pday->getCycleTrack(i);
@@ -1722,7 +1723,8 @@ void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &p
17221723
while (iter != end)
17231724
{
17241725
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
1725-
if (sky
1726+
if (should_auto_adjust()
1727+
&& sky
17261728
&& sky->canAutoAdjust()
17271729
&& sky->getReflectionProbeAmbiance(true) != 0.f)
17281730
{

indra/newview/llfloaterfixedenvironment.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
182182
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
183183

184184
// teach user about HDR settings
185+
static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "SkyAutoAdjustLegacy", false);
185186
if (mSettings
186187
&& mSettings->getSettingsType() == "sky"
188+
&& should_auto_adjust
187189
&& ((LLSettingsSky*)mSettings.get())->canAutoAdjust()
188190
&& ((LLSettingsSky*)mSettings.get())->getReflectionProbeAmbiance(true) != 0.f)
189191
{

0 commit comments

Comments
 (0)