diff options
author | Hecklezz <tj8@live.com.au> | 2025-06-07 23:22:09 +1000 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-06-10 21:47:56 +0300 |
commit | 86a8f5a55874c9b43c4b9ca01b78a68b2bc8c567 (patch) | |
tree | c66b1a1486583b0f7bf235922a3545c794f6eef4 | |
parent | a0be1e7dfbe74531becd49613351f9a688c8f908 (diff) |
Fixed adding skies to day cycle by ensuring mAbsorptionConfigs, mMieConfigs and mRayleightConfigs don't become null
-rw-r--r-- | indra/llinventory/llsettingsbase.cpp | 6 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index d483b33288..d7a94d61a5 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -361,14 +361,12 @@ LLSD LLSettingsBase::interpolateSDValue(const std::string& key_name, const LLSD new_array = q.getValue(); } else - { // TODO: We could expand this to inspect the type and do a deep lerp based on type. - // for now assume a heterogeneous array of reals. + { size_t len = std::max(value.size(), other_value.size()); for (size_t i = 0; i < len; ++i) { - - new_array[i] = lerp((F32)value[i].asReal(), (F32)other_value[i].asReal(), (F32)mix); + new_array[i] = interpolateSDValue(key_name, value[i], other_value[i], defaults, mix, skip, slerps); } } diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 06e4c20d6f..4957cf3c02 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -664,9 +664,9 @@ void LLSettingsSky::blend(LLSettingsBase::ptr_t &end, F64 blendf) parammapping_t defaults = other->getParameterMap(); stringset_t skip = getSkipInterpolateKeys(); stringset_t slerps = getSlerpKeys(); - mAbsorptionConfigs = interpolateSDMap(mAbsorptionConfigs, other->mAbsorptionConfigs, defaults, blendf, skip, slerps); - mMieConfigs = interpolateSDMap(mMieConfigs, other->mMieConfigs, defaults, blendf, skip, slerps); - mRayleighConfigs = interpolateSDMap(mRayleighConfigs, other->mRayleighConfigs, defaults, blendf, skip, slerps); + mAbsorptionConfigs = interpolateSDValue("absorption_config", mAbsorptionConfigs, other->mAbsorptionConfigs, defaults, blendf, skip, slerps); + mMieConfigs = interpolateSDValue("mie_config", mMieConfigs, other->mMieConfigs, defaults, blendf, skip, slerps); + mRayleighConfigs = interpolateSDValue("rayleigh_config", mRayleighConfigs, other->mRayleighConfigs, defaults, blendf, skip, slerps); setDirtyFlag(true); setReplaced(); |