Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
095c624d
Commit
095c624d
authored
2 years ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
SL-19745 Fix for resetting reflection probes when reapplying the same sky setting.
parent
a9746a36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llenvironment.cpp
+14
-6
14 additions, 6 deletions
indra/newview/llenvironment.cpp
indra/newview/llenvironment.h
+1
-1
1 addition, 1 deletion
indra/newview/llenvironment.h
with
15 additions
and
7 deletions
indra/newview/llenvironment.cpp
+
14
−
6
View file @
095c624d
...
@@ -1179,13 +1179,14 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
...
@@ -1179,13 +1179,14 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
return
;
return
;
}
}
DayInstance
::
ptr_t
environment
=
getEnvironmentInstance
(
env
,
true
)
;
bool
reset_probes
=
false
;
DayInstance
::
ptr_t
environment
=
getEnvironmentInstance
(
env
,
true
);
if
(
fixed
.
first
)
if
(
fixed
.
first
)
{
{
logEnvironment
(
env
,
fixed
.
first
,
env_version
);
logEnvironment
(
env
,
fixed
.
first
,
env_version
);
environment
->
setSky
(
fixed
.
first
);
reset_probes
=
environment
->
setSky
(
fixed
.
first
);
environment
->
setFlags
(
DayInstance
::
NO_ANIMATE_SKY
);
environment
->
setFlags
(
DayInstance
::
NO_ANIMATE_SKY
);
}
}
else
if
(
!
environment
->
getSky
())
else
if
(
!
environment
->
getSky
())
...
@@ -1196,7 +1197,7 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
...
@@ -1196,7 +1197,7 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
// and then add water/sky on top
// and then add water/sky on top
// This looks like it will result in sky using single keyframe instead of whole day if day is present
// This looks like it will result in sky using single keyframe instead of whole day if day is present
// when setting static water without static sky
// when setting static water without static sky
environment
->
setSky
(
mCurrentEnvironment
->
getSky
());
reset_probes
=
environment
->
setSky
(
mCurrentEnvironment
->
getSky
());
environment
->
setFlags
(
DayInstance
::
NO_ANIMATE_SKY
);
environment
->
setFlags
(
DayInstance
::
NO_ANIMATE_SKY
);
}
}
else
else
...
@@ -1214,7 +1215,7 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
...
@@ -1214,7 +1215,7 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
if
(
substitute
&&
substitute
->
getSky
())
if
(
substitute
&&
substitute
->
getSky
())
{
{
environment
->
setSky
(
substitute
->
getSky
());
reset_probes
=
environment
->
setSky
(
substitute
->
getSky
());
environment
->
setFlags
(
DayInstance
::
NO_ANIMATE_SKY
);
environment
->
setFlags
(
DayInstance
::
NO_ANIMATE_SKY
);
}
}
else
else
...
@@ -1266,7 +1267,10 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
...
@@ -1266,7 +1267,10 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
}
}
}
}
gPipeline
.
mReflectionMapManager
.
reset
();
if
(
reset_probes
)
{
// the sky changed in a way that merits a reset of reflection probes
gPipeline
.
mReflectionMapManager
.
reset
();
}
if
(
!
mSignalEnvChanged
.
empty
())
if
(
!
mSignalEnvChanged
.
empty
())
mSignalEnvChanged
(
env
,
env_version
);
mSignalEnvChanged
(
env
,
env_version
);
...
@@ -2788,10 +2792,12 @@ void LLEnvironment::DayInstance::setDay(const LLSettingsDay::ptr_t &pday, LLSett
...
@@ -2788,10 +2792,12 @@ void LLEnvironment::DayInstance::setDay(const LLSettingsDay::ptr_t &pday, LLSett
}
}
void
LLEnvironment
::
DayInstance
::
setSky
(
const
LLSettingsSky
::
ptr_t
&
psky
)
bool
LLEnvironment
::
DayInstance
::
setSky
(
const
LLSettingsSky
::
ptr_t
&
psky
)
{
{
mInitialized
=
false
;
mInitialized
=
false
;
bool
changed
=
psky
==
nullptr
||
mSky
==
nullptr
||
mSky
->
getHash
()
!=
psky
->
getHash
();
bool
different_sky
=
mSky
!=
psky
;
bool
different_sky
=
mSky
!=
psky
;
mSky
=
psky
;
mSky
=
psky
;
...
@@ -2805,6 +2811,8 @@ void LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
...
@@ -2805,6 +2811,8 @@ void LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
LLEnvironment
::
getAtmosphericModelSettings
(
settings
,
psky
);
LLEnvironment
::
getAtmosphericModelSettings
(
settings
,
psky
);
gAtmosphere
->
configureAtmosphericModel
(
settings
);
gAtmosphere
->
configureAtmosphericModel
(
settings
);
}
}
return
changed
;
}
}
void
LLEnvironment
::
DayInstance
::
setWater
(
const
LLSettingsWater
::
ptr_t
&
pwater
)
void
LLEnvironment
::
DayInstance
::
setWater
(
const
LLSettingsWater
::
ptr_t
&
pwater
)
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llenvironment.h
+
1
−
1
View file @
095c624d
...
@@ -264,7 +264,7 @@ class LLEnvironment : public LLSimpleton<LLEnvironment>
...
@@ -264,7 +264,7 @@ class LLEnvironment : public LLSimpleton<LLEnvironment>
virtual
bool
applyTimeDelta
(
const
LLSettingsBase
::
Seconds
&
delta
);
virtual
bool
applyTimeDelta
(
const
LLSettingsBase
::
Seconds
&
delta
);
virtual
void
setDay
(
const
LLSettingsDay
::
ptr_t
&
pday
,
LLSettingsDay
::
Seconds
daylength
,
LLSettingsDay
::
Seconds
dayoffset
);
virtual
void
setDay
(
const
LLSettingsDay
::
ptr_t
&
pday
,
LLSettingsDay
::
Seconds
daylength
,
LLSettingsDay
::
Seconds
dayoffset
);
virtual
void
setSky
(
const
LLSettingsSky
::
ptr_t
&
psky
);
bool
setSky
(
const
LLSettingsSky
::
ptr_t
&
psky
);
virtual
void
setWater
(
const
LLSettingsWater
::
ptr_t
&
pwater
);
virtual
void
setWater
(
const
LLSettingsWater
::
ptr_t
&
pwater
);
void
initialize
();
void
initialize
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment