diff options
author | Graham Linden <graham@lindenlab.com> | 2018-11-30 09:08:56 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-11-30 09:08:56 -0800 |
commit | 79049c49bd34d58c3a3140d4fc50f586e45f3047 (patch) | |
tree | bb1941153a12040abb44f66e25a4255e2f7bad54 /indra/newview | |
parent | 65d56f53cd9a2028af177ec0315b721f59868d19 (diff) | |
parent | d66012f85e885679738cf8c488fd8ff460319c85 (diff) |
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llenvironment.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llenvironment.h | 2 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloatermyenvironment.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpaneleditsky.cpp | 103 | ||||
-rw-r--r-- | indra/newview/llpreviewnotecard.cpp | 16 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory.xml | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_region_environment.xml | 1 |
10 files changed, 96 insertions, 79 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 580d0e785a..3a030bb09d 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1731,6 +1731,13 @@ void LLEnvironment::clearExperienceEnvironment(LLUUID experience_id, F32 transit updateEnvironment(LLSettingsBase::Seconds(transition_time)); } +void LLEnvironment::setSharedEnvironment() +{ + clearEnvironment(LLEnvironment::ENV_LOCAL); + setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + updateEnvironment(); +} + void LLEnvironment::setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time) { LLSettingsVOBase::getSettingsAsset(asset_id, diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 55881f1c75..7e35fdcfac 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -144,6 +144,8 @@ public: void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); void setEnvironment(EnvSelection_t env, const LLUUID &assetId); + void setSharedEnvironment(); + void clearEnvironment(EnvSelection_t env); LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); LLSettingsDay::Seconds getEnvironmentDayLength(EnvSelection_t env); diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 5a47e02926..a30e16ab2b 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -208,7 +208,7 @@ BOOL LLFloaterEditExtDayCycle::postBuild() // Must be before operation on all tabs below if (gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics")) { - panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("panel_settings_sky_density")); + panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->findChildView("panel_settings_sky_density")); if (!panel) { panel = new LLPanelSettingsSkyDensityTab; @@ -218,7 +218,7 @@ BOOL LLFloaterEditExtDayCycle::postBuild() } else { - panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("panel_settings_sky_density")); + panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->findChildView("panel_settings_sky_density")); if (panel) { tab_container->removeTabPanel(panel); @@ -958,7 +958,7 @@ void LLFloaterEditExtDayCycle::updateTabs() void LLFloaterEditExtDayCycle::updateWaterTabs(const LLSettingsWaterPtr_t &p_water) { LLView* tab_container = mWaterTabLayoutContainer->getChild<LLView>(TABS_WATER); //can't extract panels directly, since it is in 'tuple' - LLPanelSettingsWaterMainTab* panel = dynamic_cast<LLPanelSettingsWaterMainTab*>(tab_container->getChildView("water_panel")); + LLPanelSettingsWaterMainTab* panel = dynamic_cast<LLPanelSettingsWaterMainTab*>(tab_container->findChildView("water_panel")); if (panel) { panel->setWater(p_water); @@ -970,17 +970,17 @@ void LLFloaterEditExtDayCycle::updateSkyTabs(const LLSettingsSkyPtr_t &p_sky) LLTabContainer* tab_container = mSkyTabLayoutContainer->getChild<LLTabContainer>(TABS_SKYS); //can't extract panels directly, since they are in 'tuple' LLPanelSettingsSky* panel; - panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("atmosphere_panel")); + panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->findChildView("atmosphere_panel")); if (panel) { panel->setSky(p_sky); } - panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("clouds_panel")); + panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->findChildView("clouds_panel")); if (panel) { panel->setSky(p_sky); } - panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("moon_panel")); + panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->findChildView("moon_panel")); if (panel) { panel->setSky(p_sky); @@ -988,7 +988,7 @@ void LLFloaterEditExtDayCycle::updateSkyTabs(const LLSettingsSkyPtr_t &p_sky) if (gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics")) { - panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("panel_settings_sky_density")); + panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->findChildView("panel_settings_sky_density")); if (!panel) { panel = new LLPanelSettingsSkyDensityTab; @@ -1000,12 +1000,12 @@ void LLFloaterEditExtDayCycle::updateSkyTabs(const LLSettingsSkyPtr_t &p_sky) } else { - panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->getChildView("panel_settings_sky_density")); + panel = dynamic_cast<LLPanelSettingsSky*>(tab_container->findChildView("panel_settings_sky_density")); if (panel) { tab_container->removeTabPanel(panel); + delete panel; } - delete panel; } } diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index c34ca9e458..f93d7ce8ed 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -325,6 +325,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context) if (context == PARAMETER_REGION) { LLEnvironment::instance().updateRegion(asset_id, name, -1, -1); + LLEnvironment::instance().setSharedEnvironment(); } else if (context == PARAMETER_PARCEL) { @@ -335,6 +336,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context) return; } LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, -1, -1); + LLEnvironment::instance().setSharedEnvironment(); } else if (context == PARAMETER_LOCAL) { diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bc953f3ed1..f2d418fc9d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6945,19 +6945,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, -1, -1); - } - else if ("apply_settings_region" == action) - { - // Single item only - LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem()); - if (!item) - return; - LLUUID asset_id = item->getAssetUUID(); - std::string name = item->getName(); - - LL_WARNS("LAPRAS") << "Applyng asset id " << asset_id << " to region." << LL_ENDL; - - LLEnvironment::instance().updateRegion(asset_id, name, -1, -1); + LLEnvironment::instance().setSharedEnvironment(); } else LLItemBridge::performAction(model, action); diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 90c2325948..2650ad7dfd 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -149,15 +149,20 @@ BOOL LLPanelSettingsSkyAtmosTab::postBuild() void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled) { LLPanelSettingsSky::setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_ICE_LEVEL)->setEnabled(enabled); + + // Make sure we have initialized children (initialized) + if (getFirstChild()) + { + getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MOISTURE_LEVEL)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_DROPLET_RADIUS)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_ICE_LEVEL)->setEnabled(enabled); + } } void LLPanelSettingsSkyAtmosTab::refresh() @@ -314,15 +319,20 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild() void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled) { LLPanelSettingsSky::setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_VARIANCE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->setEnabled(enabled); + + // Make sure we have children (initialized) + if (getFirstChild()) + { + getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_VARIANCE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->setEnabled(enabled); + } } void LLPanelSettingsSkyCloudTab::refresh() @@ -455,12 +465,17 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild() void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled) { LLPanelSettingsSky::setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled); + + // Make sure we have children + if (getFirstChild()) + { + getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled); + } } void LLPanelSettingsSkySunMoonTab::refresh() @@ -608,24 +623,28 @@ void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled) { LLPanelSettingsSky::setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_LINEAR)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_CONSTANT)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_MAX_ALTITUDE)->setEnabled(enabled); - - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_EXPONENTIAL)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_EXPONENTIAL_SCALE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_LINEAR)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_CONSTANT)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_ANISO)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_MAX_ALTITUDE)->setEnabled(enabled); - - getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_EXPONENTIAL)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_EXPONENTIAL_SCALE)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_LINEAR)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_CONSTANT)->setEnabled(enabled); - getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_MAX_ALTITUDE)->setEnabled(enabled); + // Make sure we have children + if (getFirstChild()) + { + getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_LINEAR)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_CONSTANT)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_RAYLEIGH_MAX_ALTITUDE)->setEnabled(enabled); + + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_EXPONENTIAL)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_EXPONENTIAL_SCALE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_LINEAR)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_CONSTANT)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_ANISO)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_MIE_MAX_ALTITUDE)->setEnabled(enabled); + + getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_EXPONENTIAL)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_EXPONENTIAL_SCALE)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_LINEAR)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_CONSTANT)->setEnabled(enabled); + getChild<LLUICtrl>(FIELD_SKY_DENSITY_ABSORPTION_MAX_ALTITUDE)->setEnabled(enabled); + } } void LLPanelSettingsSkyDensityTab::refresh() diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index fec16998d6..9a0a80147a 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -110,13 +110,15 @@ bool LLPreviewNotecard::saveItem() void LLPreviewNotecard::setEnabled( BOOL enabled ) { - - LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor"); - - getChildView("Notecard Editor")->setEnabled(enabled); - getChildView("lock")->setVisible( !enabled); - getChildView("desc")->setEnabled(enabled); - getChildView("Save")->setEnabled(enabled && editor && (!editor->isPristine())); + LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor"); + // editor is part of xml, if it doesn't exists, nothing else does + if (editor) + { + editor->setEnabled(enabled); + getChildView("lock")->setVisible( !enabled); + getChildView("desc")->setEnabled(enabled); + getChildView("Save")->setEnabled(enabled && (!editor->isPristine())); + } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 60a28822bd..21b70e9c60 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2432,6 +2432,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl LLGLDisable test(GL_ALPHA_TEST); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + +// glh::matrix4f modelview = get_last_modelview(); +// glh::matrix4f proj = get_last_projection(); + LLGLDepthTest depth(GL_TRUE, GL_FALSE); bool bound_shader = false; diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 6f04785e8c..33ecb4477a 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -880,14 +880,6 @@ function="Inventory.DoToSelected" parameter="apply_settings_parcel" /> </menu_item_call> - <menu_item_call - name="Settings Apply Region" - layout="topleft" - label="Apply To Region"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="apply_settings_region" /> - </menu_item_call> <menu_item_separator layout="topleft" name="Marketplace Separator" /> diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml index 18364bbf0b..2f91252d9b 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -252,6 +252,7 @@ width="17" orientation="vertical" increment="10" + overlap_threshold="100" min_val="100" max_val="4000" layout="topleft" |