Modify env settings blender to not skip.
master
Graham Linden 2019-06-26 13:37:07 -07:00
parent 9eeb4c9750
commit cfdcd0fc8c
1 changed files with 6 additions and 9 deletions

View File

@ -167,6 +167,8 @@ LLSD LLSettingsBase::interpolateSDMap(const LLSD &settings, const LLSD &other, c
stringset_t skip = getSkipInterpolateKeys();
stringset_t slerps = getSlerpKeys();
llassert(mix >= 0.0f && mix <= 1.0f);
for (LLSD::map_const_iterator it = settings.beginMap(); it != settings.endMap(); ++it)
{
std::string key_name = (*it).first;
@ -678,9 +680,9 @@ bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, S32 length)
void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf)
{
F64 res = setBlendFactor(blendf);
if ((res >= 0.0001) && (res < 1.0))
mTarget->update();
llassert(res >= 0.0 && res <= 1.0);
(void)res;
mTarget->update();
}
F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_in)
@ -689,17 +691,12 @@ F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_
if (blendf >= 1.0)
{
triggerComplete();
return 1.0;
}
blendf = llclamp(blendf, 0.0f, 1.0f);
if (mTarget)
{
mTarget->replaceSettings(mInitial->getSettings());
if (!mFinal || (mInitial == mFinal) || (blendf == 0.0))
{ // this is a trivial blend. Results will be identical to the initial.
return blendf;
}
mTarget->blend(mFinal, blendf);
}
else
@ -720,7 +717,7 @@ void LLSettingsBlender::triggerComplete()
}
//-------------------------------------------------------------------------
const LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::MIN_BLEND_DELTA(0.001);
const LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::MIN_BLEND_DELTA(FLT_EPSILON);
LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::calculateBlend(const LLSettingsBase::TrackPosition& spanpos, const LLSettingsBase::TrackPosition& spanlen) const
{