diff options
author | Graham Linden <graham@lindenlab.com> | 2018-08-15 21:34:06 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-08-15 21:34:06 +0100 |
commit | c5b0d4ccd074b7062e5100c3b021da53170eb30c (patch) | |
tree | 6600bff8fd4d7f8af3f8d7929c511fbe3d6dc533 | |
parent | ec0fe8078c1f64c1579f382a686282ddbb82f470 (diff) | |
parent | f028ddd0754d5a2fd2f2300aa02eff4fe6cfa96f (diff) |
Merge
-rw-r--r-- | indra/llinventory/llsettingsdaycycle.cpp | 7 | ||||
-rw-r--r-- | indra/llinventory/llsettingsdaycycle.h | 1 | ||||
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llsettingspicker.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llsettingsvo.h | 1 |
7 files changed, 55 insertions, 16 deletions
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp index ea57c8987f..4a99be0c4b 100644 --- a/indra/llinventory/llsettingsdaycycle.cpp +++ b/indra/llinventory/llsettingsdaycycle.cpp @@ -366,12 +366,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; } } } diff --git a/indra/llinventory/llsettingsdaycycle.h b/indra/llinventory/llsettingsdaycycle.h index 974ca8660d..0ee5ce3e0b 100644 --- a/indra/llinventory/llsettingsdaycycle.h +++ b/indra/llinventory/llsettingsdaycycle.h @@ -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; } diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index e3dcc44c4d..ad4df751fd 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -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); } } diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 165971b943..958329d7e1 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -919,10 +919,10 @@ 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::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); synchronizeTabs(); updateTabs(); refresh(); @@ -936,7 +936,7 @@ void LLFloaterEditExtDayCycle::loadLiveEnvironment(LLEnvironment::EnvSelection_t if (day) { - mEditDay = day->buildClone(); + mEditDay = day->buildDeepCloneAndUncompress(); break; } } @@ -949,7 +949,7 @@ void LLFloaterEditExtDayCycle::loadLiveEnvironment(LLEnvironment::EnvSelection_t updateEditEnvironment(); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT); - LLEnvironment::instance().updateEnvironment(); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); synchronizeTabs(); updateTabs(); refresh(); @@ -974,7 +974,8 @@ void LLFloaterEditExtDayCycle::updateEditEnvironment(void) reblendSettings(); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, mScratchSky, mScratchWater); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, mEditSky, mEditWater); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); } void LLFloaterEditExtDayCycle::synchronizeTabs() @@ -1007,6 +1008,7 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() { psettingW = mScratchWater; } + mEditWater = psettingW; setTabsData(tabs, psettingW, canedit); @@ -1035,11 +1037,13 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() { psettingS = mScratchSky; } + mEditSky = psettingS; doCloseInventoryFloater(); setTabsData(tabs, psettingS, canedit); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, psettingS, psettingW); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, mEditSky, mEditWater); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); } void LLFloaterEditExtDayCycle::setTabsData(LLTabContainer * tabcontainer, const LLSettingsBase::ptr_t &settings, bool editable) diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp index b386243777..e1a3269c5d 100644 --- a/indra/newview/llsettingspicker.cpp +++ b/indra/newview/llsettingspicker.cpp @@ -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); diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 80797ae21c..2cdc3e79c3 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -1092,6 +1092,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); diff --git a/indra/newview/llsettingsvo.h b/indra/newview/llsettingsvo.h index 15b51d0988..fedb758b48 100644 --- a/indra/newview/llsettingsvo.h +++ b/indra/newview/llsettingsvo.h @@ -156,6 +156,7 @@ public: static ptr_t buildDefaultDayCycle(); static ptr_t buildFromEnvironmentMessage(LLSD settings); virtual ptr_t buildClone() override; + virtual ptr_t buildDeepCloneAndUncompress(); static LLSD convertToLegacy(const ptr_t &); |