From b6f6eeb02e2eae93f2de2bd3224e33cbbb0e8c8a Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 1 Mar 2016 10:01:35 +0200 Subject: [PATCH 1/5] MAINT-6174 FIXED Graphics parameters are wrong after closing the Advanced Graphics floater --- indra/newview/llfloaterpreference.cpp | 19 ++++++++++++++++++- indra/newview/llfloaterpreference.h | 4 +--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 718b068c8a..c4e9292d90 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -824,6 +824,13 @@ void LLFloaterPreference::updateShowFavoritesCheckbox(bool val) void LLFloaterPreference::setHardwareDefaults() { + std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive"); + if (!preset_graphic_active.empty()) + { + saveGraphicsPreset(preset_graphic_active); + saveSettings(); // save here to be able to return to the previous preset by Cancel + } + LLFeatureManager::getInstance()->applyRecommendedSettings(); // reset indirects before refresh because we may have changed what they control @@ -2478,6 +2485,12 @@ void LLPanelPreferenceGraphics::onPresetsListChange() { resetDirtyChilds(); setPresetText(); + + LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); + if (instance && !gSavedSettings.getString("PresetGraphicActive").empty()) + { + instance->saveSettings(); //make cancel work correctly after changing the preset + } } void LLPanelPreferenceGraphics::setPresetText() @@ -2486,13 +2499,17 @@ void LLPanelPreferenceGraphics::setPresetText() std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive"); - if (hasDirtyChilds() && !preset_graphic_active.empty()) + if (!preset_graphic_active.empty() && preset_graphic_active != preset_text->getText()) { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); if (instance) { instance->saveGraphicsPreset(preset_graphic_active); } + } + + if (hasDirtyChilds() && !preset_graphic_active.empty()) + { gSavedSettings.setString("PresetGraphicActive", ""); preset_graphic_active.clear(); // This doesn't seem to cause an infinite recursion. This trigger is needed to cause the pulldown diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 8de65b733b..ed692c903e 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -125,12 +125,10 @@ protected: // updates click/double-click action controls depending on values from settings.xml void updateClickActionControls(); +public: // This function squirrels away the current values of the controls so that // cancel() can restore them. void saveSettings(); - - -public: void setCacheLocation(const LLStringExplicit& location); From 511bf30a2e97f543c5acbd9a2501d7ea5c7414ce Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 7 Mar 2016 15:40:39 -0500 Subject: [PATCH 2/5] make shader loading messages LL_DEBUGS --- indra/llrender/llshadermgr.cpp | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index b2be3cc3b6..b297223c2e 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -515,29 +515,13 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns, const std::string& if (log.length() > 0 || warns) { + LL_DEBUGS("ShaderLoading") << "Shader loading "; + if (!filename.empty()) { - if (warns) - { - LL_WARNS("ShaderLoading") << "From " << filename << ":" << LL_ENDL; - } - else - { - LL_INFOS("ShaderLoading") << "From " << filename << ":" << LL_ENDL; - } - } - } - - if ( log.length() > 0 ) - { - if (warns) - { - LL_WARNS("ShaderLoading") << log << LL_ENDL; - } - else - { - LL_INFOS("ShaderLoading") << log << LL_ENDL; - } + LL_CONT << "From " << filename << ":\n"; + } + LL_CONT << log << LL_ENDL; } } From 910edc7bebe33f9d19cc0968883944dc8c7d9ba7 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 9 Mar 2016 08:36:21 -0500 Subject: [PATCH 3/5] remove upload of installed-packages (not needed now that autobuild-package is uploaded) --- build.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build.sh b/build.sh index 1576c40791..90288feed7 100755 --- a/build.sh +++ b/build.sh @@ -398,12 +398,6 @@ then upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream done - # Upload the actual dependencies used - if [ -r "$build_dir/packages/installed-packages.xml" ] - then - upload_item installer "$build_dir/packages/installed-packages.xml" text/xml - fi - # Upload the llphysicsextensions_tpv package, if one was produced # *TODO: Make this an upload-extension if [ -r "$build_dir/llphysicsextensions_package" ] From 79e09fa942e5dca8ed277f2235a7ec12654c94dc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 9 Mar 2016 13:20:32 -0500 Subject: [PATCH 4/5] big hammer hack to get past additional packaging problem for Linux --- build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.sh b/build.sh index 90288feed7..0f3091fb17 100755 --- a/build.sh +++ b/build.sh @@ -206,6 +206,13 @@ fi # load autobuild provided shell functions and variables eval "$("$autobuild" source_environment)" +if [ "$arch" = "Linux" ] +then + ## something about the additional_packages mechanism messes up buildscripts results.py + ## since we don't care about those packages on Linux, just zero it out, yes - a HACK + export additional_packages="" +fi + # dump environment variables for debugging begin_section "Environment" env|sort From 27fd7fdee6e80aa3520d5740d0197c64ad3837e9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 9 Mar 2016 12:21:34 +0100 Subject: [PATCH 5/5] More elegant solution to keep fix for MAINT-2879 --- indra/newview/llagent.cpp | 44 ++-------------------------- indra/newview/llscriptruntimeperms.h | 4 +++ 2 files changed, 6 insertions(+), 42 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 66d24db15e..790c76e216 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -63,6 +63,7 @@ #include "llpaneltopinfobar.h" #include "llparcel.h" #include "llrendersphere.h" +#include "llscriptruntimeperms.h" #include "llsdmessage.h" #include "llsdutil.h" #include "llsky.h" @@ -4173,48 +4174,7 @@ void LLAgent::stopCurrentAnimations() if (mRegionp && gSavedSettings.getBOOL("RevokePermsOnStopAnimation")) { - typedef enum e_lscript_runtime_permissions - { - SCRIPT_PERMISSION_DEBIT, - SCRIPT_PERMISSION_TAKE_CONTROLS, - SCRIPT_PERMISSION_REMAP_CONTROLS, - SCRIPT_PERMISSION_TRIGGER_ANIMATION, - SCRIPT_PERMISSION_ATTACH, - SCRIPT_PERMISSION_RELEASE_OWNERSHIP, - SCRIPT_PERMISSION_CHANGE_LINKS, - SCRIPT_PERMISSION_CHANGE_JOINTS, - SCRIPT_PERMISSION_CHANGE_PERMISSIONS, - SCRIPT_PERMISSION_TRACK_CAMERA, - SCRIPT_PERMISSION_CONTROL_CAMERA, - SCRIPT_PERMISSION_TELEPORT, - SCRIPT_PERMISSION_EXPERIENCE, - SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT, - SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS, - SCRIPT_PERMISSION_RETURN_OBJECTS, - SCRIPT_PERMISSION_EOF - } LSCRIPTRunTimePermissions; - - const U32 LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_EOF] = - { - (0x1 << 1), // SCRIPT_PERMISSION_DEBIT, - (0x1 << 2), // SCRIPT_PERMISSION_TAKE_CONTROLS, - (0x1 << 3), // SCRIPT_PERMISSION_REMAP_CONTROLS, - (0x1 << 4), // SCRIPT_PERMISSION_TRIGGER_ANIMATION, - (0x1 << 5), // SCRIPT_PERMISSION_ATTACH, - (0x1 << 6), // SCRIPT_PERMISSION_RELEASE_OWNERSHIP, - (0x1 << 7), // SCRIPT_PERMISSION_CHANGE_LINKS, - (0x1 << 8), // SCRIPT_PERMISSION_CHANGE_JOINTS, - (0x1 << 9), // SCRIPT_PERMISSION_CHANGE_PERMISSIONS - (0x1 << 10),// SCRIPT_PERMISSION_TRACK_CAMERA - (0x1 << 11),// SCRIPT_PERMISSION_CONTROL_CAMERA - (0x1 << 12),// SCRIPT_PERMISSION_TELEPORT - (0x1 << 13),// SCRIPT_PERMISSION_EXPERIENCE - (0x1 << 14),// SCRIPT_PERMISSION_SILENT_ESTATE_MANAGEMENT - (0x1 << 15),// SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS - (0x1 << 16),// SCRIPT_PERMISSION_RETURN_OBJECTS - }; - - U32 permissions = LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_TRIGGER_ANIMATION] | LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS]; + U32 permissions = SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_TRIGGER_ANIMATION].permbit | SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS].permbit; sendRevokePermissions(mRegionp->getRegionID(), permissions); if (gAgentAvatarp->isSitting()) { // Also stand up, since auto-granted sit animation permission has been revoked diff --git a/indra/newview/llscriptruntimeperms.h b/indra/newview/llscriptruntimeperms.h index 4a8e4288d2..51f57afdc9 100644 --- a/indra/newview/llscriptruntimeperms.h +++ b/indra/newview/llscriptruntimeperms.h @@ -27,6 +27,8 @@ #ifndef LL_LLSCRIPTRUNTIME_PERMS_H #define LL_LLSCRIPTRUNTIME_PERMS_H +#include + typedef struct _script_perm { std::string question; U32 permbit; @@ -37,6 +39,8 @@ typedef struct _script_perm { const U32 NUM_SCRIPT_PERMISSIONS = 16; const S32 SCRIPT_PERMISSION_DEBIT = 0; +const S32 SCRIPT_PERMISSION_TRIGGER_ANIMATION = 3; +const S32 SCRIPT_PERMISSION_OVERRIDE_ANIMATIONS = 14; static const boost::array SCRIPT_PERMISSIONS = {{ _script_perm("ScriptTakeMoney", (0x1 << 1), true),