Merge
commit
d4aa55eade
|
|
@ -377,12 +377,7 @@ bool LLSettingsDay::initialize(bool validate_frames)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build clone since:
|
||||
// - can use settings from "used" multiple times
|
||||
// - settings can reuse LLSDs they were initialized from
|
||||
// - LLSDs are 'smart' and can reuse them self multiple times
|
||||
mDayTracks[i][keyframe] = setting->buildDerivedClone();
|
||||
mDayTracks[i][keyframe] = setting;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ public:
|
|||
bool initialize(bool validate_frames = false);
|
||||
|
||||
virtual ptr_t buildClone() = 0;
|
||||
virtual ptr_t buildDeepCloneAndUncompress() = 0;
|
||||
virtual LLSD getSettings() const SETTINGS_OVERRIDE;
|
||||
virtual LLSettingsType::type_e getSettingsTypeValue() const SETTINGS_OVERRIDE { return LLSettingsType::ST_DAYCYCLE; }
|
||||
|
||||
|
|
|
|||
|
|
@ -589,19 +589,32 @@ void LLDrawPoolWater::shade()
|
|||
//bind normal map
|
||||
S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP);
|
||||
|
||||
if (mWaterNormp[0] && mWaterNormp[1])
|
||||
if (mWaterNormp[0])
|
||||
{
|
||||
gGL.getTexUnit(bumpTex)->bind(mWaterNormp[0]) ;
|
||||
gGL.getTexUnit(bumpTex + 1)->bind(mWaterNormp[1]) ;
|
||||
|
||||
if (gSavedSettings.getBOOL("RenderWaterMipNormal"))
|
||||
{
|
||||
mWaterNormp[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
|
||||
mWaterNormp[1]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
|
||||
}
|
||||
else
|
||||
{
|
||||
mWaterNormp[0]->setFilteringOption(LLTexUnit::TFO_POINT);
|
||||
}
|
||||
}
|
||||
|
||||
if (mWaterNormp[1])
|
||||
{
|
||||
bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP2);
|
||||
|
||||
gGL.getTexUnit(bumpTex)->bind(mWaterNormp[1]) ;
|
||||
|
||||
if (gSavedSettings.getBOOL("RenderWaterMipNormal"))
|
||||
{
|
||||
mWaterNormp[1]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
|
||||
}
|
||||
else
|
||||
{
|
||||
mWaterNormp[1]->setFilteringOption(LLTexUnit::TFO_POINT);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -908,7 +908,7 @@ void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::pt
|
|||
closeFloater();
|
||||
return;
|
||||
}
|
||||
mEditDay = std::dynamic_pointer_cast<LLSettingsDay>(settings);
|
||||
mEditDay = std::dynamic_pointer_cast<LLSettingsDay>(settings)->buildDeepCloneAndUncompress();
|
||||
updateEditEnvironment();
|
||||
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT);
|
||||
LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT);
|
||||
|
|
@ -925,7 +925,7 @@ void LLFloaterEditExtDayCycle::loadLiveEnvironment(LLEnvironment::EnvSelection_t
|
|||
|
||||
if (day)
|
||||
{
|
||||
mEditDay = day->buildClone();
|
||||
mEditDay = day->buildDeepCloneAndUncompress();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ LLFloaterSettingsPicker::LLFloaterSettingsPicker(LLView * owner, LLUUID initial_
|
|||
mLabel(label),
|
||||
mActive(true),
|
||||
mContextConeOpacity(0.0f),
|
||||
mSettingAssetID(initial_asset_id)
|
||||
mSettingAssetID(initial_asset_id),
|
||||
mImmediateFilterPermMask(PERM_NONE)
|
||||
{
|
||||
buildFromFile(FLOATER_DEFINITION_XML);
|
||||
setCanMinimize(FALSE);
|
||||
|
|
|
|||
|
|
@ -1131,6 +1131,30 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildClone()
|
|||
return dayp;
|
||||
}
|
||||
|
||||
LLSettingsDay::ptr_t LLSettingsVODay::buildDeepCloneAndUncompress()
|
||||
{
|
||||
// no need for SETTING_TRACKS or SETTING_FRAMES, so take base LLSD
|
||||
LLSD settings = llsd_clone(mSettings);
|
||||
|
||||
LLSettingsDay::ptr_t day_clone = std::make_shared<LLSettingsVODay>(settings);
|
||||
|
||||
for (S32 i = 0; i < LLSettingsDay::TRACK_MAX; ++i)
|
||||
{
|
||||
LLSettingsDay::CycleTrack_t track = getCycleTrack(i);
|
||||
LLSettingsDay::CycleTrack_t::iterator iter = track.begin();
|
||||
while (iter != track.end())
|
||||
{
|
||||
// 'Unpack', usually for editing
|
||||
// - frames 'share' settings multiple times
|
||||
// - settings can reuse LLSDs they were initialized from
|
||||
// We do not want for edited frame to change multiple frames in same track, so do a clone
|
||||
day_clone->setSettingsAtKeyframe(iter->second->buildDerivedClone(), iter->first, i);
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
return day_clone;
|
||||
}
|
||||
|
||||
LLSD LLSettingsVODay::convertToLegacy(const LLSettingsVODay::ptr_t &pday)
|
||||
{
|
||||
CycleTrack_t &trackwater = pday->getCycleTrack(TRACK_WATER);
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ public:
|
|||
static ptr_t buildFromEnvironmentMessage(LLSD settings);
|
||||
static void buildFromOtherSetting(LLSettingsBase::ptr_t settings, asset_built_fn cb);
|
||||
virtual ptr_t buildClone() override;
|
||||
virtual ptr_t buildDeepCloneAndUncompress();
|
||||
|
||||
static LLSD convertToLegacy(const ptr_t &);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue