From 01dd9929e21228e4e6e04d9e3f7c310ffdc834db Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 28 Jan 2011 16:00:57 -0800 Subject: STORM-937 : Makes all python paths use consistent syntax --- indra/copy_win_scripts/start-client.py | 2 +- indra/develop.py | 2 +- indra/lib/python/indra/util/simperf_host_xml_parser.py | 2 +- indra/lib/python/indra/util/simperf_oprof_interface.py | 2 +- indra/lib/python/indra/util/test_win32_manifest.py | 2 +- indra/newview/generate_breakpad_symbols.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/copy_win_scripts/start-client.py b/indra/copy_win_scripts/start-client.py index 5f7ff2f293..2a96503f01 100644 --- a/indra/copy_win_scripts/start-client.py +++ b/indra/copy_win_scripts/start-client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python import sys, getopt import os import llstart diff --git a/indra/develop.py b/indra/develop.py index 36c947327a..d43cf3aadc 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python # # @file develop.py # @authors Bryan O'Sullivan, Mark Palange, Aaron Brashears diff --git a/indra/lib/python/indra/util/simperf_host_xml_parser.py b/indra/lib/python/indra/util/simperf_host_xml_parser.py index 672c1050c2..7801d9fa66 100755 --- a/indra/lib/python/indra/util/simperf_host_xml_parser.py +++ b/indra/lib/python/indra/util/simperf_host_xml_parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python """\ @file simperf_host_xml_parser.py @brief Digest collector's XML dump and convert to simple dict/list structure diff --git a/indra/lib/python/indra/util/simperf_oprof_interface.py b/indra/lib/python/indra/util/simperf_oprof_interface.py index 547d2f9980..e3d55d7922 100755 --- a/indra/lib/python/indra/util/simperf_oprof_interface.py +++ b/indra/lib/python/indra/util/simperf_oprof_interface.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python """\ @file simperf_oprof_interface.py @brief Manage OProfile data collection on a host diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py index da8ee6c545..d4e6115a5a 100644 --- a/indra/lib/python/indra/util/test_win32_manifest.py +++ b/indra/lib/python/indra/util/test_win32_manifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python # @file test_win32_manifest.py # @brief Test an assembly binding version and uniqueness in a windows dll or exe. # diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py index 4fd04d780e..018871d9d3 100644 --- a/indra/newview/generate_breakpad_symbols.py +++ b/indra/newview/generate_breakpad_symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python # @file generate_breakpad_symbols.py # @author Brad Kittenbrink # @brief Simple tool for generating google_breakpad symbol information -- cgit v1.2.3 From 896bc12a2b9564a770e3eef584c9ec234f39bb3b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 9 Feb 2011 15:23:07 -0800 Subject: STORM-937 : Fix python scripts shebang line and license header for consistency --- indra/cmake/run_build_test.py | 2 +- indra/copy_win_scripts/start-client.py | 26 ++++++++++- indra/develop.py | 53 ++++++++++----------- indra/lib/python/indra/util/llperformance.py | 26 ++++++++++- .../python/indra/util/simperf_host_xml_parser.py | 2 +- .../python/indra/util/simperf_oprof_interface.py | 2 +- .../python/indra/util/simperf_proc_interface.py | 2 +- indra/lib/python/indra/util/test_win32_manifest.py | 51 ++++++++++---------- indra/llmessage/tests/test_llsdmessage_peer.py | 2 +- indra/llmessage/tests/testrunner.py | 2 +- indra/newview/generate_breakpad_symbols.py | 54 +++++++++++----------- indra/newview/tests/test_llxmlrpc_peer.py | 2 +- indra/newview/viewer_manifest.py | 54 +++++++++++----------- indra/test/test_llmanifest.py | 2 +- 14 files changed, 167 insertions(+), 113 deletions(-) (limited to 'indra') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 37aa75e364..320a9be8ab 100644 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """\ @file run_build_test.py @author Nat Goodspeed diff --git a/indra/copy_win_scripts/start-client.py b/indra/copy_win_scripts/start-client.py index 2a96503f01..5699f5273f 100644 --- a/indra/copy_win_scripts/start-client.py +++ b/indra/copy_win_scripts/start-client.py @@ -1,4 +1,28 @@ -#!/usr/bin/python +#!/usr/bin/env python +"""\ +@file start-client.py + +$LicenseInfo:firstyear=2010&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010-2011, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" import sys, getopt import os import llstart diff --git a/indra/develop.py b/indra/develop.py index d43cf3aadc..d9a66352f3 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -1,29 +1,30 @@ -#!/usr/bin/python -# -# @file develop.py -# @authors Bryan O'Sullivan, Mark Palange, Aaron Brashears -# @brief Fire and forget script to appropriately configure cmake for SL. -# -# $LicenseInfo:firstyear=2007&license=viewerlgpl$ -# Second Life Viewer Source Code -# Copyright (C) 2010, Linden Research, Inc. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; -# version 2.1 of the License only. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -# $/LicenseInfo$ +#!/usr/bin/env python +"""\ +@file develop.py +@authors Bryan O'Sullivan, Mark Palange, Aaron Brashears +@brief Fire and forget script to appropriately configure cmake for SL. + +$LicenseInfo:firstyear=2007&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2007-2011, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" import errno diff --git a/indra/lib/python/indra/util/llperformance.py b/indra/lib/python/indra/util/llperformance.py index 7c52730b5e..57dd64de3f 100755 --- a/indra/lib/python/indra/util/llperformance.py +++ b/indra/lib/python/indra/util/llperformance.py @@ -1,4 +1,28 @@ -#!/usr/bin/python +#!/usr/bin/env python +"""\ +@file llperformance.py + +$LicenseInfo:firstyear=2010&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010-2011, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" # ------------------------------------------------ # Sim metrics utility functions. diff --git a/indra/lib/python/indra/util/simperf_host_xml_parser.py b/indra/lib/python/indra/util/simperf_host_xml_parser.py index 7801d9fa66..672c1050c2 100755 --- a/indra/lib/python/indra/util/simperf_host_xml_parser.py +++ b/indra/lib/python/indra/util/simperf_host_xml_parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """\ @file simperf_host_xml_parser.py @brief Digest collector's XML dump and convert to simple dict/list structure diff --git a/indra/lib/python/indra/util/simperf_oprof_interface.py b/indra/lib/python/indra/util/simperf_oprof_interface.py index e3d55d7922..547d2f9980 100755 --- a/indra/lib/python/indra/util/simperf_oprof_interface.py +++ b/indra/lib/python/indra/util/simperf_oprof_interface.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """\ @file simperf_oprof_interface.py @brief Manage OProfile data collection on a host diff --git a/indra/lib/python/indra/util/simperf_proc_interface.py b/indra/lib/python/indra/util/simperf_proc_interface.py index da6304a274..de061f68cc 100755 --- a/indra/lib/python/indra/util/simperf_proc_interface.py +++ b/indra/lib/python/indra/util/simperf_proc_interface.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """\ @file simperf_proc_interface.py @brief Utility to extract log messages from *..llsd files containing performance statistics. diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py index d4e6115a5a..0532cb0065 100644 --- a/indra/lib/python/indra/util/test_win32_manifest.py +++ b/indra/lib/python/indra/util/test_win32_manifest.py @@ -1,28 +1,29 @@ -#!/usr/bin/python -# @file test_win32_manifest.py -# @brief Test an assembly binding version and uniqueness in a windows dll or exe. -# -# $LicenseInfo:firstyear=2009&license=viewerlgpl$ -# Second Life Viewer Source Code -# Copyright (C) 2010, Linden Research, Inc. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; -# version 2.1 of the License only. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -# $/LicenseInfo$ - +#!/usr/bin/env python +"""\ +@file test_win32_manifest.py +@brief Test an assembly binding version and uniqueness in a windows dll or exe. + +$LicenseInfo:firstyear=2009&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2009-2011, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" import sys, os import tempfile from xml.dom.minidom import parse diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index 7eb198bb34..580ee7f8b4 100644 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """\ @file test_llsdmessage_peer.py @author Nat Goodspeed diff --git a/indra/llmessage/tests/testrunner.py b/indra/llmessage/tests/testrunner.py index 4d58ef7130..b70ce91ee7 100644 --- a/indra/llmessage/tests/testrunner.py +++ b/indra/llmessage/tests/testrunner.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """\ @file testrunner.py @author Nat Goodspeed diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py index 018871d9d3..5ebec1563e 100644 --- a/indra/newview/generate_breakpad_symbols.py +++ b/indra/newview/generate_breakpad_symbols.py @@ -1,29 +1,31 @@ -#!/usr/bin/python -# @file generate_breakpad_symbols.py -# @author Brad Kittenbrink -# @brief Simple tool for generating google_breakpad symbol information -# for the crash reporter. -# -# $LicenseInfo:firstyear=2010&license=viewerlgpl$ -# Second Life Viewer Source Code -# Copyright (C) 2010, Linden Research, Inc. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; -# version 2.1 of the License only. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -# $/LicenseInfo$ +#!/usr/bin/env python +"""\ +@file generate_breakpad_symbols.py +@author Brad Kittenbrink +@brief Simple tool for generating google_breakpad symbol information + for the crash reporter. + +$LicenseInfo:firstyear=2010&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010-2011, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" import collections diff --git a/indra/newview/tests/test_llxmlrpc_peer.py b/indra/newview/tests/test_llxmlrpc_peer.py index aeebb0cfd1..1c7204a6b6 100644 --- a/indra/newview/tests/test_llxmlrpc_peer.py +++ b/indra/newview/tests/test_llxmlrpc_peer.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """\ @file test_llxmlrpc_peer.py @author Nat Goodspeed diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 338c62b9fb..1722c84d34 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1,29 +1,31 @@ -#!/usr/bin/python -# @file viewer_manifest.py -# @author Ryan Williams -# @brief Description of all installer viewer files, and methods for packaging -# them into installers for all supported platforms. -# -# $LicenseInfo:firstyear=2006&license=viewerlgpl$ -# Second Life Viewer Source Code -# Copyright (C) 2010, Linden Research, Inc. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; -# version 2.1 of the License only. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -# $/LicenseInfo$ +#!/usr/bin/env python +"""\ +@file viewer_manifest.py +@author Ryan Williams +@brief Description of all installer viewer files, and methods for packaging + them into installers for all supported platforms. + +$LicenseInfo:firstyear=2006&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2006-2011, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" import sys import os.path import re diff --git a/indra/test/test_llmanifest.py b/indra/test/test_llmanifest.py index 89c36f95dd..a97abbc6ee 100644 --- a/indra/test/test_llmanifest.py +++ b/indra/test/test_llmanifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ @file test_llmanifest.py @author Ryan Williams -- cgit v1.2.3 From 10cf492ef1730e869389b704345a6604ed363427 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 11 Feb 2011 16:56:28 -0800 Subject: STORM-937 : Use subprocess instead os commands in python, suppress crufty svn code --- indra/lib/python/indra/util/llversion.py | 57 +++++++++++--------------------- 1 file changed, 19 insertions(+), 38 deletions(-) (limited to 'indra') diff --git a/indra/lib/python/indra/util/llversion.py b/indra/lib/python/indra/util/llversion.py index 2718a85f41..ba6f567b60 100644 --- a/indra/lib/python/indra/util/llversion.py +++ b/indra/lib/python/indra/util/llversion.py @@ -1,7 +1,9 @@ -"""@file llversion.py -@brief Utility for parsing llcommon/llversion${server}.h - for the version string and channel string - Utility that parses hg or svn info for branch and revision +#!/usr/bin/env python +"""\ +@file llversion.py +@brief Parses llcommon/llversionserver.h and llcommon/llversionviewer.h + for the version string and channel string. + Parses hg info for branch and revision. $LicenseInfo:firstyear=2006&license=mit$ @@ -27,7 +29,7 @@ THE SOFTWARE. $/LicenseInfo$ """ -import re, sys, os, commands +import re, sys, os, subprocess # Methods for gathering version information from # llversionviewer.h and llversionserver.h @@ -73,29 +75,13 @@ def get_viewer_channel(): def get_server_channel(): return get_channel('server') -# Methods for gathering subversion information -def get_svn_status_matching(regular_expression): - # Get the subversion info from the working source tree - status, output = commands.getstatusoutput('svn info %s' % get_src_root()) - m = regular_expression.search(output) - if not m: - print >> sys.stderr, "Failed to parse svn info output, result follows:" - print >> sys.stderr, output - raise Exception, "No matching svn status in "+src_root - return m.group(1) - -def get_svn_branch(): - branch_re = re.compile('URL: (\S+)') - return get_svn_status_matching(branch_re) - -def get_svn_revision(): - last_rev_re = re.compile('Last Changed Rev: (\d+)') - return get_svn_status_matching(last_rev_re) - +# Methods for gathering hg information def get_hg_repo(): - status, output = commands.getstatusoutput('hg showconfig paths.default') + child = subprocess.Popen(["hg","showconfig","paths.default"], stdout=subprocess.PIPE) + output, error = child.communicate() + status = child.returncode if status: - print >> sys.stderr, output + print >> sys.stderr, error sys.exit(1) if not output: print >> sys.stderr, 'ERROR: cannot find repo we cloned from' @@ -103,24 +89,19 @@ def get_hg_repo(): return output def get_hg_changeset(): - # The right thing to do: - # status, output = commands.getstatusoutput('hg id -i') - # if status: - # print >> sys.stderr, output - # sys.exit(1) - - # The temporary hack: - status, output = commands.getstatusoutput('hg parents --template "{rev}"') + # The right thing to do would be to use the *global* revision id: + # "hg id -i" + # For the moment though, we use the parent revision: + child = subprocess.Popen(["hg","parents","--template","{rev}"], stdout=subprocess.PIPE) + output, error = child.communicate() + status = child.returncode if status: - print >> sys.stderr, output + print >> sys.stderr, error sys.exit(1) lines = output.splitlines() if len(lines) > 1: print >> sys.stderr, 'ERROR: working directory has %d parents' % len(lines) return lines[0] -def using_svn(): - return os.path.isdir(os.path.join(get_src_root(), '.svn')) - def using_hg(): return os.path.isdir(os.path.join(get_src_root(), '.hg')) -- cgit v1.2.3 From cfb3ee50c23c32dc0470d8e6bf1a2527d2d425bd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 18 Feb 2011 13:52:40 -0600 Subject: SH-948 don't occlusion cull everything when deferred rendering is enabled --- indra/newview/llviewerdisplay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 97d6a222c5..b45d1aa3a6 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -616,10 +616,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) && gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery) ? 2 : 0; - if (LLPipeline::sUseOcclusion && LLPipeline::sRenderDeferred) - { //force occlusion on for all render types if doing deferred render + /*if (LLPipeline::sUseOcclusion && LLPipeline::sRenderDeferred) + { //force occlusion on for all render types if doing deferred render (tighter shadow frustum) LLPipeline::sUseOcclusion = 3; - } + }*/ LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred"); LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred"); -- cgit v1.2.3 From b53ffe4eae9700ad78f01cfec3458b5611330027 Mon Sep 17 00:00:00 2001 From: prep linden Date: Fri, 18 Feb 2011 17:43:08 -0500 Subject: Code cleanup and removed hacky code support for some old legacy rig types --- indra/newview/llvoavatar.cpp | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b90c136b21..e982df1c92 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1332,32 +1332,7 @@ const LLVector3 LLVOAvatar::getRenderPosition() const } else if (isRoot()) { - //Rebase the pelvis position if the avatar contains a pelvis offset - if ( mHasPelvisOffset ) - { - LLVector3 returnVec( mDrawable->getPositionAgent() ); - if ( mLastPelvisToFoot > mPelvisToFoot ) - { - F32 diff = mLastPelvisToFoot - mPelvisToFoot; - //1. Move the pelvis down by the difference of the old amount and the new pelvis to foot amount - returnVec[VZ] -= (diff); - //2. Now move the pelvis up by the new pelvis to foot amount - returnVec[VZ] += mPelvisToFoot; - } - else - { - //1. Move the pelvis down by the old pelvis to foot amount - returnVec[VZ] -= (mLastPelvisToFoot); - //2. Now move the pelvis up by the new pelvis to foot amount - returnVec[VZ] += mPelvisToFoot; - } - //Return the fixed up pelvis position - return returnVec; - } - else - { - return mDrawable->getPositionAgent(); - } + return mDrawable->getPositionAgent(); } else { @@ -3498,15 +3473,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // correct for the fact that the pelvis is not necessarily the center // of the agent's physical representation - if ( !mHasPelvisOffset ) - { - root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; - } - else - { - root_pos.mdV[VZ] -= (0.65f * mBodySize.mV[VZ]) - mPelvisToFoot; - } - + root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; + LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); if (newPosition != mRoot.getXform()->getWorldPosition()) -- cgit v1.2.3