Trim trailing whitespace

Start trimming trailing whitespace, but limit the blast radius to a
handful of file types.
master
Bennett Goble 2024-05-29 08:10:00 -07:00
parent 83e80d7967
commit a0b3021bdc
30 changed files with 159 additions and 157 deletions

View File

@ -1,6 +1,6 @@
llappearance: llappearance:
- indra/llappearance/**/* - indra/llappearance/**/*
llaudio: llaudio:
- indra/llaudio/**/* - indra/llaudio/**/*

View File

@ -412,7 +412,7 @@ jobs:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
pattern: "*-metadata" pattern: "*-metadata"
- name: Rename metadata - name: Rename metadata
run: | run: |
cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml
@ -441,7 +441,7 @@ jobs:
append_body: true append_body: true
fail_on_unmatched_files: true fail_on_unmatched_files: true
files: | files: |
macOS-installer/*.dmg macOS-installer/*.dmg
Windows-installer/*.exe Windows-installer/*.exe
*-autobuild-package.xml *-autobuild-package.xml
*-viewer_version.txt *-viewer_version.txt

View File

@ -1,4 +1,4 @@
name: Stale PRs name: Stale PRs
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:

View File

@ -1,5 +1,5 @@
repos: repos:
- repo: https://github.com/secondlife/git-hooks.git - repo: https://github.com/secondlife/git-hooks.git
rev: v1.0.2 rev: v1.0.2
hooks: hooks:
- id: opensource-license - id: opensource-license
@ -16,3 +16,5 @@ repos:
hooks: hooks:
- id: check-xml - id: check-xml
- id: mixed-line-ending - id: mixed-line-ending
- id: trailing-whitespace
files: \.(cpp|c|h|inl|py|glsl|cmake|yaml|sh)$

View File

@ -199,14 +199,14 @@ package_llphysicsextensions_tpv()
tpv_status=0 tpv_status=0
# nat 2016-12-21: without HAVOK, can't build PhysicsExtensions_TPV. # nat 2016-12-21: without HAVOK, can't build PhysicsExtensions_TPV.
if [ "$variant" = "Release" -a "${HAVOK:-}" != "OFF" ] if [ "$variant" = "Release" -a "${HAVOK:-}" != "OFF" ]
then then
tpvconfig="$build_dir/packages/llphysicsextensions/autobuild-tpv.xml" tpvconfig="$build_dir/packages/llphysicsextensions/autobuild-tpv.xml"
test -r "$tpvconfig" || fatal "No llphysicsextensions_tpv autobuild configuration found" test -r "$tpvconfig" || fatal "No llphysicsextensions_tpv autobuild configuration found"
# SL-19942: autobuild ignores -c switch if AUTOBUILD_CONFIGURATION set # SL-19942: autobuild ignores -c switch if AUTOBUILD_CONFIGURATION set
unset AUTOBUILD_CONFIGURATION unset AUTOBUILD_CONFIGURATION
"$autobuild" build --quiet --config-file "$(native_path "$tpvconfig")" -c Tpv \ "$autobuild" build --quiet --config-file "$(native_path "$tpvconfig")" -c Tpv \
|| fatal "failed to build llphysicsextensions_tpv" || fatal "failed to build llphysicsextensions_tpv"
# capture the package file name for use in upload later... # capture the package file name for use in upload later...
PKGTMP=`mktemp -t pgktpv.XXXXXX` PKGTMP=`mktemp -t pgktpv.XXXXXX`
cleanup="$cleanup ; rm $PKGTMP* 2>/dev/null" cleanup="$cleanup ; rm $PKGTMP* 2>/dev/null"
@ -239,7 +239,7 @@ build()
|| fatal "failed building $variant" || fatal "failed building $variant"
echo true >"$build_dir"/build_ok echo true >"$build_dir"/build_ok
end_section "autobuild $variant" end_section "autobuild $variant"
begin_section "extensions $variant" begin_section "extensions $variant"
# Run build extensions # Run build extensions
if [ -d ${build_dir}/packages/build-extensions ] if [ -d ${build_dir}/packages/build-extensions ]
@ -312,7 +312,7 @@ begin_section "select viewer channel"
# Look for a branch-specific viewer_channel setting # Look for a branch-specific viewer_channel setting
# changeset_branch is set in the sling-buildscripts # changeset_branch is set in the sling-buildscripts
viewer_build_branch=$(echo -n "${changeset_branch:-$(repo_branch ${BUILDSCRIPTS_SRC:-$(pwd)})}" | tr -Cs 'A-Za-z0-9_' '_' | sed -E 's/^_+//; s/_+$//') viewer_build_branch=$(echo -n "${changeset_branch:-$(repo_branch ${BUILDSCRIPTS_SRC:-$(pwd)})}" | tr -Cs 'A-Za-z0-9_' '_' | sed -E 's/^_+//; s/_+$//')
if [ -n "$viewer_build_branch" ] if [ -n "$viewer_build_branch" ]
then then
branch_viewer_channel_var="${viewer_build_branch}_viewer_channel" branch_viewer_channel_var="${viewer_build_branch}_viewer_channel"
if [ -n "${!branch_viewer_channel_var}" ] if [ -n "${!branch_viewer_channel_var}" ]
@ -434,7 +434,7 @@ do
record_event "configure for $variant failed: build skipped" record_event "configure for $variant failed: build skipped"
fi fi
if ! $succeeded if ! $succeeded
then then
record_event "remaining variants skipped due to $variant failure" record_event "remaining variants skipped due to $variant failure"
break break
@ -499,7 +499,7 @@ then
fi fi
done done
end_section "Upload Debian Repository" end_section "Upload Debian Repository"
else else
record_event "debian build not enabled" record_event "debian build not enabled"
fi fi

View File

@ -50,7 +50,7 @@ if(WINDOWS)
endif (ADDRESS_SIZE EQUAL 64) endif (ADDRESS_SIZE EQUAL 64)
#******************************* #*******************************
# Misc shared libs # Misc shared libs
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(release_files set(release_files

View File

@ -1,25 +1,25 @@
/** /**
* @file lltextvalidate.cpp * @file lltextvalidate.cpp
* @brief Text validation helper functions * @brief Text validation helper functions
* *
* $LicenseInfo:firstyear=2001&license=viewerlgpl$ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code * Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc. * Copyright (C) 2010, Linden Research, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; * License as published by the Free Software Foundation;
* version 2.1 of the License only. * version 2.1 of the License only.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*/ */

View File

@ -1,4 +1,4 @@
/** /**
* @file lltextbase.h * @file lltextbase.h
* @author Martin Reddy * @author Martin Reddy
* @brief The base class of text box/editor, providing Url handling support * @brief The base class of text box/editor, providing Url handling support
@ -6,21 +6,21 @@
* $LicenseInfo:firstyear=2009&license=viewerlgpl$ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
* Second Life Viewer Source Code * Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc. * Copyright (C) 2010, Linden Research, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; * License as published by the Free Software Foundation;
* version 2.1 of the License only. * version 2.1 of the License only.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*/ */

View File

@ -17,7 +17,7 @@ if [[ -f "$CONFIG_FILE" ]]; then
--asc-provider $ASC_PROVIDER \ --asc-provider $ASC_PROVIDER \
--file "$zip_file" 2>&1) --file "$zip_file" 2>&1)
echo $res echo $res
requestUUID=$(echo $res | awk '/RequestUUID/ { print $NF; }') requestUUID=$(echo $res | awk '/RequestUUID/ { print $NF; }')
if [[ -n $requestUUID ]]; then if [[ -n $requestUUID ]]; then
in_progress=1 in_progress=1
@ -26,7 +26,7 @@ if [[ -f "$CONFIG_FILE" ]]; then
res=$(xcrun altool --notarization-info "$requestUUID" \ res=$(xcrun altool --notarization-info "$requestUUID" \
--username $USERNAME \ --username $USERNAME \
--password $PASSWORD 2>&1) --password $PASSWORD 2>&1)
if [[ $res != *"in progress"* ]]; then if [[ $res != *"in progress"* ]]; then
in_progress=0 in_progress=0
fi fi
echo "." echo "."

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# just run this script each time after you change the installer's name to fix the icon misalignment # just run this script each time after you change the installer's name to fix the icon misalignment
mydir="$(dirname "$0")" mydir="$(dirname "$0")"
# If there's more than one DMG in more than one build directory, pick the most # If there's more than one DMG in more than one build directory, pick the most
# recent one. # recent one.

View File

@ -27,7 +27,7 @@ for LLKDECONFIG in kde-config kde4-config; do
LLKDEPROTODIR=`$LLKDECONFIG --path services | cut -d ':' -f 1` LLKDEPROTODIR=`$LLKDECONFIG --path services | cut -d ':' -f 1`
if [ -d "$LLKDEPROTODIR" ]; then if [ -d "$LLKDEPROTODIR" ]; then
LLKDEPROTOFILE=${LLKDEPROTODIR}/secondlife.protocol LLKDEPROTOFILE=${LLKDEPROTODIR}/secondlife.protocol
cat > ${LLKDEPROTOFILE} <<EOF || echo Warning: Did not register secondlife:// handler with KDE: Could not write ${LLKDEPROTOFILE} cat > ${LLKDEPROTOFILE} <<EOF || echo Warning: Did not register secondlife:// handler with KDE: Could not write ${LLKDEPROTOFILE}
[Protocol] [Protocol]
exec=${HANDLER} '%u' exec=${HANDLER} '%u'
protocol=secondlife protocol=secondlife

View File

@ -39,9 +39,9 @@
#include "llscrolllistctrl.h" #include "llscrolllistctrl.h"
#include "llscrolllistitem.h" #include "llscrolllistitem.h"
#include "llsdserialize.h" #include "llsdserialize.h"
#include "lltextbox.h" #include "lltextbox.h"
#include "lltrans.h" #include "lltrans.h"
#include "llviewerchat.h" #include "llviewerchat.h"
namespace { namespace {
// The following variables and constants are used for storing the floater state // The following variables and constants are used for storing the floater state

View File

@ -1,25 +1,25 @@
/** /**
* @file llfloaterprofiletexture.h * @file llfloaterprofiletexture.h
* @brief LLFloaterProfileTexture class definition * @brief LLFloaterProfileTexture class definition
* *
* $LicenseInfo:firstyear=2022&license=viewerlgpl$ * $LicenseInfo:firstyear=2022&license=viewerlgpl$
* Second Life Viewer Source Code * Second Life Viewer Source Code
* Copyright (C) 2022, Linden Research, Inc. * Copyright (C) 2022, Linden Research, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; * License as published by the Free Software Foundation;
* version 2.1 of the License only. * version 2.1 of the License only.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*/ */

View File

@ -187,7 +187,7 @@ LLInventoryGallery::~LLInventoryGallery()
mHiddenItems.pop_back(); mHiddenItems.pop_back();
panelp->die(); panelp->die();
} }
if (gInventory.containsObserver(mCategoriesObserver)) if (gInventory.containsObserver(mCategoriesObserver))
{ {
@ -200,7 +200,7 @@ LLInventoryGallery::~LLInventoryGallery()
gInventory.removeObserver(mThumbnailsObserver); gInventory.removeObserver(mThumbnailsObserver);
} }
delete mThumbnailsObserver; delete mThumbnailsObserver;
LLGestureMgr::instance().removeObserver(mGestureObserver); LLGestureMgr::instance().removeObserver(mGestureObserver);
delete mGestureObserver; delete mGestureObserver;
} }
@ -263,7 +263,7 @@ void LLInventoryGallery::updateRootFolder()
updateRemovedItem(mHiddenItems[i]->getUUID()); updateRemovedItem(mHiddenItems[i]->getUUID());
} }
mItemBuildQuery.clear(); mItemBuildQuery.clear();
if (gInventory.containsObserver(mCategoriesObserver)) if (gInventory.containsObserver(mCategoriesObserver))
{ {
gInventory.removeObserver(mCategoriesObserver); gInventory.removeObserver(mCategoriesObserver);
@ -284,7 +284,7 @@ void LLInventoryGallery::updateRootFolder()
mRootChangedSignal(); mRootChangedSignal();
gInventory.addObserver(mCategoriesObserver); gInventory.addObserver(mCategoriesObserver);
// Start observing changes in selected category. // Start observing changes in selected category.
mCategoriesObserver->addCategory(mFolderID, mCategoriesObserver->addCategory(mFolderID,
boost::bind(&LLInventoryGallery::refreshList, this, mFolderID)); boost::bind(&LLInventoryGallery::refreshList, this, mFolderID));
@ -294,7 +294,7 @@ void LLInventoryGallery::updateRootFolder()
// the observer will refresh the list as soon as the new items // the observer will refresh the list as soon as the new items
// arrive. // arrive.
category->fetch(); category->fetch();
//refreshList(cat_id); //refreshList(cat_id);
LLInventoryModel::cat_array_t* cat_array; LLInventoryModel::cat_array_t* cat_array;
LLInventoryModel::item_array_t* item_array; LLInventoryModel::item_array_t* item_array;
@ -308,7 +308,7 @@ void LLInventoryGallery::updateRootFolder()
{ {
mItemBuildQuery.insert((*iter)->getUUID()); mItemBuildQuery.insert((*iter)->getUUID());
} }
for (LLInventoryModel::item_array_t::const_iterator iter = item_array->begin(); for (LLInventoryModel::item_array_t::const_iterator iter = item_array->begin();
iter != item_array->end(); iter != item_array->end();
iter++) iter++)
@ -448,7 +448,7 @@ void LLInventoryGallery::reArrangeRows(S32 row_diff)
buf_items.push_back(*it); buf_items.push_back(*it);
} }
mHiddenItems.clear(); mHiddenItems.clear();
mItemsInRow+= row_diff; mItemsInRow+= row_diff;
updateGalleryWidth(); updateGalleryWidth();
@ -458,7 +458,7 @@ void LLInventoryGallery::reArrangeRows(S32 row_diff)
{ {
return compareGalleryItem(item1, item2, sort_by_date, sort_folders_by_name); return compareGalleryItem(item1, item2, sort_by_date, sort_folders_by_name);
}); });
for (std::vector<LLInventoryGalleryItem*>::const_iterator it = buf_items.begin(); it != buf_items.end(); ++it) for (std::vector<LLInventoryGalleryItem*>::const_iterator it = buf_items.begin(); it != buf_items.end(); ++it)
{ {
(*it)->setHidden(false); (*it)->setHidden(false);
@ -735,7 +735,7 @@ void LLInventoryGallery::setFilterSubString(const std::string& string)
{ {
mFilterSubString = string; mFilterSubString = string;
mFilter->setFilterSubString(string); mFilter->setFilterSubString(string);
//reArrangeRows(); //reArrangeRows();
} }
@ -763,7 +763,7 @@ bool LLInventoryGallery::checkAgainstFilters(LLInventoryGalleryItem* item, const
{ {
return false; return false;
} }
bool hidden = false; bool hidden = false;
if(mFilter->getFilterCreatorType() == LLInventoryFilter::FILTERCREATOR_SELF) if(mFilter->getFilterCreatorType() == LLInventoryFilter::FILTERCREATOR_SELF)
@ -806,7 +806,7 @@ bool LLInventoryGallery::checkAgainstFilters(LLInventoryGalleryItem* item, const
desc = item->getItemName() + item->getItemNameSuffix(); desc = item->getItemName() + item->getItemNameSuffix();
break; break;
} }
LLStringUtil::toUpper(desc); LLStringUtil::toUpper(desc);
std::string cur_filter = filter_substring; std::string cur_filter = filter_substring;
@ -2012,7 +2012,7 @@ void LLInventoryGallery::deleteSelection()
if (item && get_is_item_worn(item)) if (item && get_is_item_worn(item))
{ {
has_worn = true; has_worn = true;
LLWearableType::EType type = item->getWearableType(); LLWearableType::EType type = item->getWearableType();
if (type == LLWearableType::WT_SHAPE if (type == LLWearableType::WT_SHAPE
|| type == LLWearableType::WT_SKIN || type == LLWearableType::WT_SKIN
|| type == LLWearableType::WT_HAIR || type == LLWearableType::WT_HAIR
@ -2355,7 +2355,7 @@ void LLInventoryGallery::onCOFChanged()
LLCommonUtils::computeDifference(vnew, mCOFLinkedItems, vadded, vremoved); LLCommonUtils::computeDifference(vnew, mCOFLinkedItems, vadded, vremoved);
mCOFLinkedItems = vnew; mCOFLinkedItems = vnew;
for (uuid_vec_t::const_iterator iter = vadded.begin(); for (uuid_vec_t::const_iterator iter = vadded.begin();
iter != vadded.end(); iter != vadded.end();
++iter) ++iter)
@ -2386,7 +2386,7 @@ void LLInventoryGallery::onGesturesChanged()
LLCommonUtils::computeDifference(vnew, mActiveGestures, vadded, vremoved); LLCommonUtils::computeDifference(vnew, mActiveGestures, vadded, vremoved);
mActiveGestures = vnew; mActiveGestures = vnew;
for (uuid_vec_t::const_iterator iter = vadded.begin(); for (uuid_vec_t::const_iterator iter = vadded.begin();
iter != vadded.end(); iter != vadded.end();
++iter) ++iter)
@ -2564,7 +2564,7 @@ void LLInventoryGallery::startDrag()
ids.push_back(selected_id); ids.push_back(selected_id);
} }
const LLViewerInventoryCategory* cat = gInventory.getCategory(selected_id); const LLViewerInventoryCategory* cat = gInventory.getCategory(selected_id);
if (cat) if (cat)
{ {
if (gInventory.isObjectDescendentOf(selected_id, gInventory.getLibraryRootFolderID())) if (gInventory.isObjectDescendentOf(selected_id, gInventory.getLibraryRootFolderID()))
@ -2642,7 +2642,7 @@ bool LLInventoryGallery::checkAgainstFilterType(const LLUUID& object_id)
break; break;
} }
} }
if (filterTypes & LLInventoryFilter::FILTERTYPE_DATE) if (filterTypes & LLInventoryFilter::FILTERTYPE_DATE)
{ {
const U16 HOURS_TO_SECONDS = 3600; const U16 HOURS_TO_SECONDS = 3600;
@ -3085,7 +3085,7 @@ void LLThumbnailsObserver::changed(U32 mask)
{ {
const LLUUID& obj_id = (*iter).first; const LLUUID& obj_id = (*iter).first;
LLItemData& data = (*iter).second; LLItemData& data = (*iter).second;
LLInventoryObject* obj = gInventory.getObject(obj_id); LLInventoryObject* obj = gInventory.getObject(obj_id);
if (!obj) if (!obj)
{ {
@ -3296,7 +3296,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// //
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Determine if item can be moved & dropped // Determine if item can be moved & dropped
// Note: if user_confirm is false, we already went through those accept logic test and can skip them // Note: if user_confirm is false, we already went through those accept logic test and can skip them
@ -3323,7 +3323,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
{ {
//disable dropping in or out of marketplace for now //disable dropping in or out of marketplace for now
return FALSE; return FALSE;
/*const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(marketplacelistings_id, folder_id); /*const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(marketplacelistings_id, folder_id);
LLViewerInventoryCategory * dest_folder = cat; LLViewerInventoryCategory * dest_folder = cat;
accept = can_move_item_to_marketplace(master_folder, dest_folder, inv_item, tooltip_msg, LLToolDragAndDrop::instance().getCargoCount() - LLToolDragAndDrop::instance().getCargoIndex());*/ accept = can_move_item_to_marketplace(master_folder, dest_folder, inv_item, tooltip_msg, LLToolDragAndDrop::instance().getCargoCount() - LLToolDragAndDrop::instance().getCargoIndex());*/
@ -3335,7 +3335,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
LLViewerInventoryCategory * dest_folder = cat; LLViewerInventoryCategory * dest_folder = cat;
accept = dest_folder->acceptItem(inv_item); accept = dest_folder->acceptItem(inv_item);
} }
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
if (accept && drop) if (accept && drop)
@ -3409,7 +3409,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
gInventory.changeItemParent((LLViewerInventoryItem*)inv_item, folder_id, move_is_into_trash); gInventory.changeItemParent((LLViewerInventoryItem*)inv_item, folder_id, move_is_into_trash);
} }
if (move_is_from_marketplacelistings) if (move_is_from_marketplacelistings)
{ {
// If we move from an active (listed) listing, checks that it's still valid, if not, unlist // If we move from an active (listed) listing, checks that it's still valid, if not, unlist
@ -3629,7 +3629,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
//const LLUUID from_folder_uuid = inv_cat->getParentUUID(); //const LLUUID from_folder_uuid = inv_cat->getParentUUID();
const BOOL move_is_into_current_outfit = (dest_id == current_outfit_id); const BOOL move_is_into_current_outfit = (dest_id == current_outfit_id);
const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(dest_id, marketplacelistings_id); const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(dest_id, marketplacelistings_id);
const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id);
@ -3738,7 +3738,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
is_movable = FALSE; is_movable = FALSE;
// tooltip? // tooltip?
} }
LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::cat_array_t descendent_categories;
LLInventoryModel::item_array_t descendent_items; LLInventoryModel::item_array_t descendent_items;
if (is_movable) if (is_movable)
@ -3804,7 +3804,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
} }
} }
} }
if (is_movable && move_is_into_marketplacelistings) if (is_movable && move_is_into_marketplacelistings)
{ {
const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(marketplacelistings_id, dest_id); const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(marketplacelistings_id, dest_id);
@ -3877,7 +3877,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
{ {
//disable dropping in or out of marketplace for now //disable dropping in or out of marketplace for now
return FALSE; return FALSE;
// If we are moving a folder at the listing folder level (i.e. its parent is the marketplace listings folder) // If we are moving a folder at the listing folder level (i.e. its parent is the marketplace listings folder)
/*if (from_folder_uuid == marketplacelistings_id) /*if (from_folder_uuid == marketplacelistings_id)
{ {

View File

@ -62,7 +62,7 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu()
registrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, uuids, gFloaterView->getParentFloater(mGallery))); registrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, uuids, gFloaterView->getParentFloater(mGallery)));
enable_registrar.add("Inventory.CanSetUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::canSetUploadLocation, this, _2)); enable_registrar.add("Inventory.CanSetUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::canSetUploadLocation, this, _2));
LLContextMenu* menu = createFromFile("menu_gallery_inventory.xml"); LLContextMenu* menu = createFromFile("menu_gallery_inventory.xml");
updateMenuItemsVisibility(menu); updateMenuItemsVisibility(menu);
@ -321,7 +321,7 @@ void LLInventoryGalleryContextMenu::onRename(const LLSD& notification, const LLS
if (!new_name.empty()) if (!new_name.empty())
{ {
LLUUID id = notification["payload"]["id"].asUUID(); LLUUID id = notification["payload"]["id"].asUUID();
LLViewerInventoryCategory* cat = gInventory.getCategory(id); LLViewerInventoryCategory* cat = gInventory.getCategory(id);
if(cat && (cat->getName() != new_name)) if(cat && (cat->getName() != new_name))
{ {
@ -330,7 +330,7 @@ void LLInventoryGalleryContextMenu::onRename(const LLSD& notification, const LLS
update_inventory_category(cat->getUUID(),updates, NULL); update_inventory_category(cat->getUUID(),updates, NULL);
return; return;
} }
LLViewerInventoryItem* item = gInventory.getItem(id); LLViewerInventoryItem* item = gInventory.getItem(id);
if(item && (item->getName() != new_name)) if(item && (item->getName() != new_name))
{ {
@ -379,12 +379,12 @@ bool LLInventoryGalleryContextMenu::canSetUploadLocation(const LLSD& userdata)
bool is_inbox_folder(LLUUID item_id) bool is_inbox_folder(LLUUID item_id)
{ {
const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
if (inbox_id.isNull()) if (inbox_id.isNull())
{ {
return false; return false;
} }
return gInventory.isObjectDescendentOf(item_id, inbox_id); return gInventory.isObjectDescendentOf(item_id, inbox_id);
} }
@ -625,7 +625,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
disabled_items.push_back(std::string("Open")); disabled_items.push_back(std::string("Open"));
disabled_items.push_back(std::string("Open Original")); disabled_items.push_back(std::string("Open Original"));
} }
if(LLAssetType::AT_GESTURE == obj->getType()) if(LLAssetType::AT_GESTURE == obj->getType())
{ {
items.push_back(std::string("Gesture Separator")); items.push_back(std::string("Gesture Separator"));

View File

@ -56,7 +56,7 @@ void LLReflectionMap::update(U32 resolution, U32 face)
llassert(mCubeArray.notNull()); llassert(mCubeArray.notNull());
llassert(mCubeIndex != -1); llassert(mCubeIndex != -1);
//llassert(LLPipeline::sRenderDeferred); //llassert(LLPipeline::sRenderDeferred);
// make sure we don't walk off the edge of the render target // make sure we don't walk off the edge of the render target
while (resolution > gPipeline.mRT->deferredScreen.getWidth() || while (resolution > gPipeline.mRT->deferredScreen.getWidth() ||
resolution > gPipeline.mRT->deferredScreen.getHeight()) resolution > gPipeline.mRT->deferredScreen.getHeight())
@ -142,7 +142,7 @@ void LLReflectionMap::autoAdjustOrigin()
LLVector3 origin(fp); LLVector3 origin(fp);
F32 height = LLWorld::instance().resolveLandHeightAgent(origin) + 2.f; F32 height = LLWorld::instance().resolveLandHeightAgent(origin) + 2.f;
fp[2] = llmax(fp[2], height); fp[2] = llmax(fp[2], height);
// make sure radius encompasses all objects // make sure radius encompasses all objects
LLSimdScalar r2 = 0.0; LLSimdScalar r2 = 0.0;
for (int i = 0; i < 8; ++i) for (int i = 0; i < 8; ++i)
@ -162,7 +162,7 @@ void LLReflectionMap::autoAdjustOrigin()
// make sure near clip doesn't poke through ground // make sure near clip doesn't poke through ground
fp[2] = llmax(fp[2], height+mRadius*0.5f); fp[2] = llmax(fp[2], height+mRadius*0.5f);
} }
} }
else if (mViewerObject) else if (mViewerObject)
@ -234,7 +234,7 @@ F32 LLReflectionMap::getNearClip()
bool LLReflectionMap::getIsDynamic() bool LLReflectionMap::getIsDynamic()
{ {
if (gSavedSettings.getS32("RenderReflectionProbeDetail") > (S32) LLReflectionMapManager::DetailLevel::STATIC_ONLY && if (gSavedSettings.getS32("RenderReflectionProbeDetail") > (S32) LLReflectionMapManager::DetailLevel::STATIC_ONLY &&
mViewerObject && mViewerObject &&
mViewerObject->getVolume()) mViewerObject->getVolume())
{ {
return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic(); return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic();
@ -244,7 +244,7 @@ bool LLReflectionMap::getIsDynamic()
} }
bool LLReflectionMap::getBox(LLMatrix4& box) bool LLReflectionMap::getBox(LLMatrix4& box)
{ {
if (mViewerObject) if (mViewerObject)
{ {
LLVolume* volume = mViewerObject->getVolume(); LLVolume* volume = mViewerObject->getVolume();
@ -267,7 +267,7 @@ bool LLReflectionMap::getBox(LLMatrix4& box)
// construct object to camera space (with scale) // construct object to camera space (with scale)
mv = mv * rm * scale; mv = mv * rm * scale;
// inverse is camera space to object unit cube // inverse is camera space to object unit cube
mv = mv.inverse(); mv = mv.inverse();
box = LLMatrix4(mv.m); box = LLMatrix4(mv.m);
@ -334,7 +334,7 @@ void LLReflectionMap::doOcclusion(const LLVector4a& eye)
mOccluded = false; mOccluded = false;
return; return;
} }
if (mOcclusionQuery == 0) if (mOcclusionQuery == 0)
{ // no query was previously issued, allocate one and issue { // no query was previously issued, allocate one and issue
LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("rmdo - glGenQueries"); LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("rmdo - glGenQueries");

View File

@ -1,25 +1,25 @@
/** /**
* @file llsetkeybinddialog.cpp * @file llsetkeybinddialog.cpp
* @brief LLSetKeyBindDialog class implementation. * @brief LLSetKeyBindDialog class implementation.
* *
* $LicenseInfo:firstyear=2019&license=viewerlgpl$ * $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Second Life Viewer Source Code * Second Life Viewer Source Code
* Copyright (C) 2019, Linden Research, Inc. * Copyright (C) 2019, Linden Research, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; * License as published by the Free Software Foundation;
* version 2.1 of the License only. * version 2.1 of the License only.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$ * $/LicenseInfo$
*/ */

View File

@ -59,7 +59,7 @@ class ViewerManifest(LLManifest):
# files during the build (see copy_w_viewer_manifest # files during the build (see copy_w_viewer_manifest
# and copy_l_viewer_manifest targets) # and copy_l_viewer_manifest targets)
return 'package' in self.args['actions'] return 'package' in self.args['actions']
def construct(self): def construct(self):
super(ViewerManifest, self).construct() super(ViewerManifest, self).construct()
self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
@ -87,7 +87,7 @@ class ViewerManifest(LLManifest):
# ... and the entire image filters directory # ... and the entire image filters directory
self.path("filters") self.path("filters")
# ... and the included spell checking dictionaries # ... and the included spell checking dictionaries
pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
with self.prefix(src=pkgdir): with self.prefix(src=pkgdir):
@ -260,14 +260,14 @@ class ViewerManifest(LLManifest):
def app_name_oneword(self): def app_name_oneword(self):
return ''.join(self.app_name().split()) return ''.join(self.app_name().split())
def icon_path(self): def icon_path(self):
return "icons/" + self.channel_type() return "icons/" + self.channel_type()
def extract_names(self,src): def extract_names(self,src):
"""Extract contributor names from source file, returns string""" """Extract contributor names from source file, returns string"""
try: try:
with open(src, 'r') as contrib_file: with open(src, 'r') as contrib_file:
lines = contrib_file.readlines() lines = contrib_file.readlines()
except IOError: except IOError:
print("Failed to open '%s'" % src) print("Failed to open '%s'" % src)
@ -491,7 +491,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
raise Exception("Directories are not supported by test_CRT_and_copy_action()") raise Exception("Directories are not supported by test_CRT_and_copy_action()")
else: else:
print("Doesn't exist:", src) print("Doesn't exist:", src)
def construct(self): def construct(self):
super().construct() super().construct()
@ -543,7 +543,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
self.path2basename(os.path.join(os.pardir, self.path2basename(os.path.join(os.pardir,
'llplugin', 'slplugin', self.args['configuration']), 'llplugin', 'slplugin', self.args['configuration']),
"slplugin.exe") "slplugin.exe")
# Get shared libs from the shared libs staging directory # Get shared libs from the shared libs staging directory
with self.prefix(src=os.path.join(self.args['build'], os.pardir, with self.prefix(src=os.path.join(self.args['build'], os.pardir,
'sharedlibs', self.args['buildtype'])): 'sharedlibs', self.args['buildtype'])):
@ -578,7 +578,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
# Vivox libraries # Vivox libraries
self.path("vivoxsdk_x64.dll") self.path("vivoxsdk_x64.dll")
self.path("ortp_x64.dll") self.path("ortp_x64.dll")
# OpenSSL # OpenSSL
self.path("libcrypto-1_1-x64.dll") self.path("libcrypto-1_1-x64.dll")
self.path("libssl-1_1-x64.dll") self.path("libssl-1_1-x64.dll")
@ -705,7 +705,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
self.path("plugins/") self.path("plugins/")
if not self.is_packaging_viewer(): if not self.is_packaging_viewer():
self.package_file = "copied_deps" self.package_file = "copied_deps"
def nsi_file_commands(self, install=True): def nsi_file_commands(self, install=True):
def INSTDIR(path): def INSTDIR(path):
@ -764,7 +764,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
installer_file = self.installer_base_name() + '_Setup.exe' installer_file = self.installer_base_name() + '_Setup.exe'
substitution_strings['installer_file'] = installer_file substitution_strings['installer_file'] = installer_file
version_vars = """ version_vars = """
!define INSTEXE "SLVersionChecker.exe" !define INSTEXE "SLVersionChecker.exe"
!define VERSION "%(version_short)s" !define VERSION "%(version_short)s"
@ -773,7 +773,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
!define VERSION_REGISTRY "%(version_registry)s" !define VERSION_REGISTRY "%(version_registry)s"
!define VIEWER_EXE "%(final_exe)s" !define VIEWER_EXE "%(final_exe)s"
""" % substitution_strings """ % substitution_strings
if self.channel_type() == 'release': if self.channel_type() == 'release':
substitution_strings['caption'] = CHANNEL_VENDOR_BASE substitution_strings['caption'] = CHANNEL_VENDOR_BASE
else: else:
@ -904,7 +904,7 @@ class Darwin_x86_64_Manifest(ViewerManifest):
# yields a slightly smaller binary but makes crash # yields a slightly smaller binary but makes crash
# logs mostly useless. This may be desirable for the # logs mostly useless. This may be desirable for the
# final release. Or not. # final release. Or not.
if ("package" in self.args['actions'] or if ("package" in self.args['actions'] or
"unpacked" in self.args['actions']): "unpacked" in self.args['actions']):
self.run_command( self.run_command(
['strip', '-S', executable]) ['strip', '-S', executable])
@ -929,7 +929,7 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src=relpkgdir, dst=""): with self.prefix(src=relpkgdir, dst=""):
self.path("libndofdev.dylib") self.path("libndofdev.dylib")
self.path("libhunspell-*.dylib") self.path("libhunspell-*.dylib")
with self.prefix(src_dst="cursors_mac"): with self.prefix(src_dst="cursors_mac"):
self.path("*.tif") self.path("*.tif")

View File

@ -72,7 +72,7 @@ def save_xml(tree, file_path, xml_decl, indent_text=False, indent_tab=False, rm_
if rm_space: if rm_space:
xml_string = xml_string.replace(' />', '/>') xml_string = xml_string.replace(' />', '/>')
xml_decl = (xml_decl if (xml_decl and not rewrite_decl) xml_decl = (xml_decl if (xml_decl and not rewrite_decl)
else '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>') else '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>')
try: try:

View File

@ -38,11 +38,11 @@ do
-h|--help) -h|--help)
Action=USAGE Action=USAGE
;; ;;
-v|--verbose) -v|--verbose)
Verbose=true Verbose=true
;; ;;
## ##
## Select the revision to compare against ## Select the revision to compare against
## ##
@ -79,7 +79,7 @@ do
break break
fi fi
;; ;;
esac esac
shift # always consume 1 shift # always consume 1
done done
@ -107,10 +107,10 @@ then
cat <<USAGE cat <<USAGE
Usage: Usage:
modified-strings.sh [ { -v | --verbose } ] [-r <revision>] [<path-to-xui>] modified-strings.sh [ { -v | --verbose } ] [-r <revision>] [<path-to-xui>]
where where
--verbose shows progress messages on stderr (the command takes a while, so this is reassuring) --verbose shows progress messages on stderr (the command takes a while, so this is reassuring)
-r <revision> specifies a git revision (branch, tag, commit, or relative specifier) -r <revision> specifies a git revision (branch, tag, commit, or relative specifier)
@ -124,9 +124,9 @@ Usage:
the path of a file that has a string change (columns 2 and 3 are empty for lines with a filename) the path of a file that has a string change (columns 2 and 3 are empty for lines with a filename)
name name
the name attribute of a string or label whose value changed the name attribute of a string or label whose value changed
English value English value
the current value of the string or label whose value changed the current value of the string or label whose value changed
for strings, newlines are changed to '\n' and tab characters are changed to '\t' for strings, newlines are changed to '\n' and tab characters are changed to '\t'
There is also a column for each of the language directories following the English. There is also a column for each of the language directories following the English.

View File

@ -49,7 +49,7 @@ into google sheets.
If the --rev revision already contains a translation for the text, it If the --rev revision already contains a translation for the text, it
will be included in the spreadsheet for reference. will be included in the spreadsheet for reference.
Normally you would want --rev_base to be the last revision to have Normally you would want --rev_base to be the last revision to have
translations added, and --rev to be the tip of the current translations added, and --rev to be the tip of the current
project. You can find the last commit with translation work using "git log --grep INTL- | head" project. You can find the last commit with translation work using "git log --grep INTL- | head"
@ -242,7 +242,7 @@ def find_deletions(mod_tree, base_tree, lang, args, f):
mod_filename = transl_filename.replace("/xui/{}/".format(lang), "/xui/{}/".format(args.base_lang)) mod_filename = transl_filename.replace("/xui/{}/".format(lang), "/xui/{}/".format(args.base_lang))
#print("checking",transl_filename,"against",mod_filename) #print("checking",transl_filename,"against",mod_filename)
try: try:
mod_blob = mod_tree[mod_filename] mod_blob = mod_tree[mod_filename]
except: except:
print(" delete file", transl_filename, file=f) print(" delete file", transl_filename, file=f)
continue continue
@ -257,7 +257,7 @@ def find_deletions(mod_tree, base_tree, lang, args, f):
if not elt_key in mod_dict: if not elt_key in mod_dict:
if lines == 0: if lines == 0:
print(" in file", transl_filename, file=f) print(" in file", transl_filename, file=f)
lines += 1 lines += 1
print(" delete element", elt_key, file=f) print(" delete element", elt_key, file=f)
else: else:
transl_elt = transl_dict[elt_key] transl_elt = transl_dict[elt_key]
@ -266,14 +266,14 @@ def find_deletions(mod_tree, base_tree, lang, args, f):
if not a in mod_elt.attrib: if not a in mod_elt.attrib:
if lines == 0: if lines == 0:
print(" in file", transl_filename, file=f) print(" in file", transl_filename, file=f)
lines += 1 lines += 1
print(" delete attribute", a, "from", elt_key, file=f) print(" delete attribute", a, "from", elt_key, file=f)
if transl_elt.text and (not mod_elt.text): if transl_elt.text and (not mod_elt.text):
if lines == 0: if lines == 0:
print(" in file", transl_filename, file=f) print(" in file", transl_filename, file=f)
lines += 1 lines += 1
print(" delete text from", elt_key, file=f) print(" delete text from", elt_key, file=f)
def save_translation_file(per_lang_data, aux_data, outfile): def save_translation_file(per_lang_data, aux_data, outfile):
langs = sorted(per_lang_data.keys()) langs = sorted(per_lang_data.keys())
@ -310,12 +310,12 @@ def save_translation_file(per_lang_data, aux_data, outfile):
# Reference info, not for translation # Reference info, not for translation
for aux, data in list(aux_data.items()): for aux, data in list(aux_data.items()):
df = pd.DataFrame(data, columns = ["Key", "Value"]) df = pd.DataFrame(data, columns = ["Key", "Value"])
df.to_excel(writer, index=False, sheet_name=aux) df.to_excel(writer, index=False, sheet_name=aux)
worksheet = writer.sheets[aux] worksheet = writer.sheets[aux]
worksheet.set_column('A:A', 50, bold_wrap_format) worksheet.set_column('A:A', 50, bold_wrap_format)
worksheet.set_column('B:B', 80, wrap_format) worksheet.set_column('B:B', 80, wrap_format)
print("Writing", outfile) print("Writing", outfile)
writer.save() writer.save()

View File

@ -92,7 +92,7 @@ class FilePacker(object):
# Now pad what's left of str out to 'size' with nul bytes. # Now pad what's left of str out to 'size' with nul bytes.
buf = str + ("\000" * (size-len(str))) buf = str + ("\000" * (size-len(str)))
self.buffer.write(buf) self.buffer.write(buf)
class FileUnpacker(object): class FileUnpacker(object):
def __init__(self, filename): def __init__(self, filename):
with open(filename,"rb") as f: with open(filename,"rb") as f:
@ -103,7 +103,7 @@ class FileUnpacker(object):
result = struct.unpack_from(fmt, self.buffer, self.offset) result = struct.unpack_from(fmt, self.buffer, self.offset)
self.offset += struct.calcsize(fmt) self.offset += struct.calcsize(fmt)
return result return result
def unpack_string(self, size=0): def unpack_string(self, size=0):
# Nonzero size means we must consider exactly the next 'size' # Nonzero size means we must consider exactly the next 'size'
# characters in self.buffer. # characters in self.buffer.
@ -131,7 +131,7 @@ def F32_to_U16(val, lower, upper):
# make sure that the value is positive and normalized to <0, 1> # make sure that the value is positive and normalized to <0, 1>
val -= lower; val -= lower;
val /= (upper - lower); val /= (upper - lower);
# return the U16 # return the U16
return int(math.floor(val*U16MAX)) return int(math.floor(val*U16MAX))
@ -149,7 +149,7 @@ def U16_to_F32(ival, lower, upper):
# make sure that zeroes come through as zero # make sure that zeroes come through as zero
if abs(val) < max_error: if abs(val) < max_error:
val = 0.0 val = 0.0
return val; return val;
class RotKey(object): class RotKey(object):
def __init__(self, time, duration, rot): def __init__(self, time, duration, rot):
@ -185,7 +185,7 @@ class RotKey(object):
fp.pack("<H",self.time_short) fp.pack("<H",self.time_short)
(x,y,z) = [F32_to_U16(v, -1.0, 1.0) for v in self.rotation] (x,y,z) = [F32_to_U16(v, -1.0, 1.0) for v in self.rotation]
fp.pack("<HHH",x,y,z) fp.pack("<HHH",x,y,z)
class PosKey(object): class PosKey(object):
def __init__(self, time, duration, pos): def __init__(self, time, duration, pos):
""" """
@ -216,7 +216,7 @@ class PosKey(object):
def dump(self, f): def dump(self, f):
print(" pos_key: t %.3f" % self.time,"pos ",",".join("%.3f" % f for f in self.position), file=f) print(" pos_key: t %.3f" % self.time,"pos ",",".join("%.3f" % f for f in self.position), file=f)
def pack(self, fp): def pack(self, fp):
fp.pack("<H",self.time_short) fp.pack("<H",self.time_short)
(x,y,z) = [F32_to_U16(v, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET) for v in self.position] (x,y,z) = [F32_to_U16(v, -LL_MAX_PELVIS_OFFSET, LL_MAX_PELVIS_OFFSET) for v in self.position]
@ -259,7 +259,7 @@ class Constraint(object):
print(" ease_in_stop",self.ease_in_stop, file=f) print(" ease_in_stop",self.ease_in_stop, file=f)
print(" ease_out_start",self.ease_out_start, file=f) print(" ease_out_start",self.ease_out_start, file=f)
print(" ease_out_stop",self.ease_out_stop, file=f) print(" ease_out_stop",self.ease_out_stop, file=f)
class Constraints(object): class Constraints(object):
@staticmethod @staticmethod
def unpack(duration, fup): def unpack(duration, fup):
@ -340,7 +340,7 @@ class RotationCurve(object):
print(" num_rot_keys", len(self.keys), file=f) print(" num_rot_keys", len(self.keys), file=f)
for k in self.keys: for k in self.keys:
k.dump(f) k.dump(f)
class JointInfo(object): class JointInfo(object):
def __init__(self, name, priority): def __init__(self, name, priority):
self.joint_name = name self.joint_name = name
@ -434,11 +434,11 @@ class Anim(object):
# find that parent in list of joints, set its index in index list # find that parent in list of joints, set its index in index list
self.emote_name = fup.unpack_string() self.emote_name = fup.unpack_string()
(self.loop_in_point, self.loop_out_point, self.loop, (self.loop_in_point, self.loop_out_point, self.loop,
self.ease_in_duration, self.ease_out_duration, self.hand_pose, num_joints) = \ self.ease_in_duration, self.ease_out_duration, self.hand_pose, num_joints) = \
fup.unpack("@ffiffII") fup.unpack("@ffiffII")
self.joints = [JointInfo.unpack(self.duration, fup) self.joints = [JointInfo.unpack(self.duration, fup)
for j in range(num_joints)] for j in range(num_joints)]
if self.verbose: if self.verbose:
@ -446,7 +446,7 @@ class Anim(object):
print("unpacked joint",joint_info.joint_name) print("unpacked joint",joint_info.joint_name)
self.constraints = Constraints.unpack(self.duration, fup) self.constraints = Constraints.unpack(self.duration, fup)
self.buffer = fup.buffer self.buffer = fup.buffer
def pack(self, fp): def pack(self, fp):
fp.pack("@HHhf", self.version, self.sub_version, self.base_priority, self.duration) fp.pack("@HHhf", self.version, self.sub_version, self.base_priority, self.duration)
fp.pack_string(self.emote_name, 0) fp.pack_string(self.emote_name, 0)
@ -475,7 +475,7 @@ class Anim(object):
for j in self.joints: for j in self.joints:
j.dump(f) j.dump(f)
self.constraints.dump(f) self.constraints.dump(f)
def write(self, filename): def write(self, filename):
fp = FilePacker() fp = FilePacker()
self.pack(fp) self.pack(fp)
@ -603,7 +603,7 @@ def main(*argv):
# Use sys.argv[0] because (a) this script lives where it lives regardless # Use sys.argv[0] because (a) this script lives where it lives regardless
# of what our caller passes and (b) we don't expect our caller to pass the # of what our caller passes and (b) we don't expect our caller to pass the
# script name anyway. # script name anyway.
pathname = os.path.dirname(sys.argv[0]) pathname = os.path.dirname(sys.argv[0])
# we're in scripts/content_tools; hop back to base of repository clone # we're in scripts/content_tools; hop back to base of repository clone
path_to_skel = os.path.join(os.path.abspath(pathname),os.pardir,os.pardir, path_to_skel = os.path.join(os.path.abspath(pathname),os.pardir,os.pardir,
"indra","newview","character") "indra","newview","character")

View File

@ -78,7 +78,7 @@ def compare_trees(file_trees):
compare_matched_nodes(key,items,summary) compare_matched_nodes(key,items,summary)
print("Summary:") print("Summary:")
print(summary) print(summary)
def dump_appearance_params(tree): def dump_appearance_params(tree):
vals = [] vals = []
for e in tree.getroot().iter(): for e in tree.getroot().iter():
@ -89,8 +89,8 @@ def dump_appearance_params(tree):
#print e.get("id"), e.get("name"), e.get("group"), e.get("u8") #print e.get("id"), e.get("name"), e.get("group"), e.get("u8")
if len(vals)==253: if len(vals)==253:
print(", ".join(vals)) print(", ".join(vals))
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description="compare avatar XML archetype files") parser = argparse.ArgumentParser(description="compare avatar XML archetype files")

View File

@ -58,7 +58,7 @@ def mesh_lock_offsets(tree, joints):
floats[11] += 0.0001 floats[11] += 0.0001
matrix_node.text = " ".join([str(f) for f in floats]) matrix_node.text = " ".join([str(f) for f in floats])
print(joint_node.get("name"),matrix_node.tag,"text",matrix_node.text,len(floats),floats) print(joint_node.get("name"),matrix_node.tag,"text",matrix_node.text,len(floats),floats)
def mesh_random_offsets(tree, joints): def mesh_random_offsets(tree, joints):
print("mesh_random_offsets",tree,joints) print("mesh_random_offsets",tree,joints)
@ -80,7 +80,7 @@ def mesh_random_offsets(tree, joints):
floats[11] += random.uniform(-1.0,1.0) floats[11] += random.uniform(-1.0,1.0)
matrix_node.text = " ".join([str(f) for f in floats]) matrix_node.text = " ".join([str(f) for f in floats])
print(joint_node.get("name"),matrix_node.tag,"text",matrix_node.text,len(floats),floats) print(joint_node.get("name"),matrix_node.tag,"text",matrix_node.text,len(floats),floats)
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description="process SL animations") parser = argparse.ArgumentParser(description="process SL animations")
@ -92,7 +92,7 @@ if __name__ == "__main__":
parser.add_argument("--summary", action="store_true", help="print summary info about input file") parser.add_argument("--summary", action="store_true", help="print summary info about input file")
args = parser.parse_args() args = parser.parse_args()
mesh = None mesh = None
tree = None tree = None
if args.infilename: if args.infilename:
@ -103,7 +103,7 @@ if __name__ == "__main__":
if args.summary: if args.summary:
print("summarizing",args.infilename) print("summarizing",args.infilename)
mesh_summary(mesh) mesh_summary(mesh)
if args.lock_offsets: if args.lock_offsets:
print("locking offsets for",args.lock_offsets) print("locking offsets for",args.lock_offsets)
mesh_lock_offsets(tree, args.lock_offsets) mesh_lock_offsets(tree, args.lock_offsets)
@ -116,4 +116,4 @@ if __name__ == "__main__":
print("writing",args.outfilename) print("writing",args.outfilename)
f = open(args.outfilename,"w") f = open(args.outfilename,"w")
print(etree.tostring(tree, pretty_print=True), file=f) #need update to get: , short_empty_elements=True) print(etree.tostring(tree, pretty_print=True), file=f) #need update to get: , short_empty_elements=True)

View File

@ -29,7 +29,7 @@ $/LicenseInfo$
import argparse import argparse
from lxml import etree from lxml import etree
def get_joint_names(tree): def get_joint_names(tree):
joints = [element.get('name') for element in tree.getroot().iter() if element.tag in ['bone','collision_volume']] joints = [element.get('name') for element in tree.getroot().iter() if element.tag in ['bone','collision_volume']]
print("joints:",joints) print("joints:",joints)
@ -45,10 +45,10 @@ def get_aliases(tree):
val = element.get('aliases') val = element.get('aliases')
aliases[name] = val aliases[name] = val
return aliases return aliases
def fix_name(element): def fix_name(element):
pass pass
def enforce_precision_rules(element): def enforce_precision_rules(element):
pass pass
@ -104,7 +104,7 @@ def enforce_symmetry(tree, element, field, fix=False):
def get_element_by_name(tree,name): def get_element_by_name(tree,name):
if tree is None: if tree is None:
return None return None
matches = [elt for elt in tree.getroot().iter() if elt.get("name")==name] matches = [elt for elt in tree.getroot().iter() if elt.get("name")==name]
if len(matches)==1: if len(matches)==1:
return matches[0] return matches[0]
elif len(matches)>1: elif len(matches)>1:
@ -117,7 +117,7 @@ def list_skel_tree(tree):
for element in tree.getroot().iter(): for element in tree.getroot().iter():
if element.tag == "bone": if element.tag == "bone":
print(element.get("name"),"-",element.get("support")) print(element.get("name"),"-",element.get("support"))
def validate_child_order(tree, ogtree, fix=False): def validate_child_order(tree, ogtree, fix=False):
unfixable = 0 unfixable = 0
@ -182,7 +182,7 @@ def validate_skel_tree(tree, ogtree, reftree, fix=False):
print("validate_skel_tree") print("validate_skel_tree")
(num_bones,num_cvs) = (0,0) (num_bones,num_cvs) = (0,0)
unfixable = 0 unfixable = 0
defaults = {"connected": "false", defaults = {"connected": "false",
"group": "Face" "group": "Face"
} }
for element in tree.getroot().iter(): for element in tree.getroot().iter():
@ -232,7 +232,7 @@ def validate_skel_tree(tree, ogtree, reftree, fix=False):
if element.get("support")=="extended": if element.get("support")=="extended":
if element.get("pos") != element.get("pivot"): if element.get("pos") != element.get("pivot"):
print("extended joint",element.get("name"),"has mismatched pos, pivot") print("extended joint",element.get("name"),"has mismatched pos, pivot")
if element.tag == "linden_skeleton": if element.tag == "linden_skeleton":
num_bones = int(element.get("num_bones")) num_bones = int(element.get("num_bones"))
@ -253,7 +253,7 @@ def validate_skel_tree(tree, ogtree, reftree, fix=False):
if fix and (unfixable > 0): if fix and (unfixable > 0):
print("BAD FILE:", unfixable,"errs could not be fixed") print("BAD FILE:", unfixable,"errs could not be fixed")
def slider_info(ladtree,skeltree): def slider_info(ladtree,skeltree):
for param in ladtree.iter("param"): for param in ladtree.iter("param"):
@ -287,7 +287,7 @@ def slider_info(ladtree,skeltree):
print(" Offset MaxX", offset_max[0]) print(" Offset MaxX", offset_max[0])
print(" Offset MaxY", offset_max[1]) print(" Offset MaxY", offset_max[1])
print(" Offset MaxZ", offset_max[2]) print(" Offset MaxZ", offset_max[2])
# Check contents of avatar_lad file relative to a specified skeleton # Check contents of avatar_lad file relative to a specified skeleton
def validate_lad_tree(ladtree,skeltree,orig_ladtree): def validate_lad_tree(ladtree,skeltree,orig_ladtree):
print("validate_lad_tree") print("validate_lad_tree")
@ -344,7 +344,7 @@ def validate_lad_tree(ladtree,skeltree,orig_ladtree):
expected_offset = tuple([bone_offset[0],-bone_offset[1],bone_offset[2]]) expected_offset = tuple([bone_offset[0],-bone_offset[1],bone_offset[2]])
if left_offset != expected_offset: if left_offset != expected_offset:
print("offset mismatch between",bone_name,"and",left_name,"in param",param.get("id","-1")) print("offset mismatch between",bone_name,"and",left_name,"in param",param.get("id","-1"))
drivers = {} drivers = {}
for driven_param in ladtree.iter("driven"): for driven_param in ladtree.iter("driven"):
driver = driven_param.getparent().getparent() driver = driven_param.getparent().getparent()
@ -380,7 +380,7 @@ def validate_lad_tree(ladtree,skeltree,orig_ladtree):
print("removed",set(orig_message_ids) - set(message_ids)) print("removed",set(orig_message_ids) - set(message_ids))
else: else:
print("message ids OK") print("message ids OK")
def remove_joint_by_name(tree, name): def remove_joint_by_name(tree, name):
print("remove joint:",name) print("remove joint:",name)
elt = get_element_by_name(tree,name) elt = get_element_by_name(tree,name)
@ -395,7 +395,7 @@ def remove_joint_by_name(tree, name):
elt[:] = [] elt[:] = []
print("parent now:",[e.get("name") for e in list(parent)]) print("parent now:",[e.get("name") for e in list(parent)])
elt = get_element_by_name(tree,name) elt = get_element_by_name(tree,name)
def compare_skel_trees(atree,btree): def compare_skel_trees(atree,btree):
diffs = {} diffs = {}
realdiffs = {} realdiffs = {}
@ -513,7 +513,7 @@ if __name__ == "__main__":
if ladtree and tree and args.slider_info: if ladtree and tree and args.slider_info:
slider_info(ladtree,tree) slider_info(ladtree,tree)
if args.outfilename: if args.outfilename:
f = open(args.outfilename,"w") f = open(args.outfilename,"w")
print(etree.tostring(tree, pretty_print=True), file=f) #need update to get: , short_empty_elements=True) print(etree.tostring(tree, pretty_print=True), file=f) #need update to get: , short_empty_elements=True)

View File

@ -63,7 +63,7 @@ def update_stats(stats,rec):
# handle fps record as special case # handle fps record as special case
pass pass
else: else:
#print "field",field #print "field",field
stats.setdefault(field,{}) stats.setdefault(field,{})
type_stats = stats.get(field) type_stats = stats.get(field)
newcount = val["resp_count"] newcount = val["resp_count"]
@ -75,9 +75,9 @@ def update_stats(stats,rec):
type_stats["sum_bytes"] = type_stats.get("sum_bytes",0) + val["resp_count"] * val.get("resp_mean_bytes",0) type_stats["sum_bytes"] = type_stats.get("sum_bytes",0) + val["resp_count"] * val.get("resp_mean_bytes",0)
type_stats["enqueued"] = type_stats.get("enqueued",0) + val["enqueued"] type_stats["enqueued"] = type_stats.get("enqueued",0) + val["enqueued"]
type_stats["dequeued"] = type_stats.get("dequeued",0) + val["dequeued"] type_stats["dequeued"] = type_stats.get("dequeued",0) + val["dequeued"]
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description="process metric xml files for viewer asset fetching") parser = argparse.ArgumentParser(description="process metric xml files for viewer asset fetching")

View File

@ -144,7 +144,7 @@ def get_used_strings(root_dir):
#if ext not in [".cpp", ".hpp", ".h", ".xml"]: #if ext not in [".cpp", ".hpp", ".h", ".xml"]:
# skipped_ext.add(ext) # skipped_ext.add(ext)
# continue # continue
full_name = os.path.join(dir_name,fname) full_name = os.path.join(dir_name,fname)
with open(full_name,"r") as f: with open(full_name,"r") as f:
@ -158,8 +158,8 @@ def get_used_strings(root_dir):
print("skipped extensions", skipped_ext) print("skipped extensions", skipped_ext)
print("got used_str", len(used_str)) print("got used_str", len(used_str))
return used_str return used_str
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description="process tab-separated table containing viewerstats logs") parser = argparse.ArgumentParser(description="process tab-separated table containing viewerstats logs")
@ -184,7 +184,7 @@ if __name__ == "__main__":
if args.preferences: if args.preferences:
print("\nSETTINGS.XML") print("\nSETTINGS.XML")
settings_sd = parse_settings_xml("settings.xml") settings_sd = parse_settings_xml("settings.xml")
#for skey,svals in settings_sd.items(): #for skey,svals in settings_sd.items():
# print skey, "=>", svals # print skey, "=>", svals
(all_str,_,_,_) = show_stats_by_key(recs,["preferences","settings"],settings_sd) (all_str,_,_,_) = show_stats_by_key(recs,["preferences","settings"],settings_sd)
print() print()
@ -211,16 +211,16 @@ if __name__ == "__main__":
print("PREFIX_USED", len(prefix_used), ",".join(list(prefix_used))) print("PREFIX_USED", len(prefix_used), ",".join(list(prefix_used)))
print() print()
unref_strings = unref_strings - prefix_used unref_strings = unref_strings - prefix_used
print("\nUNREF_IN_CODE " + str(len(unref_strings)) + "\n") print("\nUNREF_IN_CODE " + str(len(unref_strings)) + "\n")
print("\n".join(list(unref_strings))) print("\n".join(list(unref_strings)))
settings_str = read_raw_settings_xml("settings.xml") settings_str = read_raw_settings_xml("settings.xml")
# Do this via direct string munging to generate minimal changeset # Do this via direct string munging to generate minimal changeset
settings_edited = remove_settings(settings_str,unref_strings) settings_edited = remove_settings(settings_str,unref_strings)
write_raw_settings_xml("settings.xml.edit",settings_edited) write_raw_settings_xml("settings.xml.edit",settings_edited)

View File

@ -73,8 +73,8 @@ from indra.ipc import tokenstream
from indra.ipc import llmessage from indra.ipc import llmessage
def getstatusall(command): def getstatusall(command):
""" Like commands.getstatusoutput, but returns stdout and """ Like commands.getstatusoutput, but returns stdout and
stderr separately(to get around "killed by signal 15" getting stderr separately(to get around "killed by signal 15" getting
included as part of the file). Also, works on Windows.""" included as part of the file). Also, works on Windows."""
(input, out, err) = os.popen3(command, 't') (input, out, err) = os.popen3(command, 't')
status = input.close() # send no input to the command status = input.close() # send no input to the command
@ -257,7 +257,7 @@ http://wiki.secondlife.com/wiki/Template_verifier.py
elif len(args) == 1: elif len(args) == 1:
master_url = None master_url = None
current_filename = args[0] current_filename = args[0]
print("master:", options.master_url) print("master:", options.master_url)
print("current:", current_filename) print("current:", current_filename)
current_url = 'file://%s' % current_filename current_url = 'file://%s' % current_filename
# nothing specified, use defaults for everything # nothing specified, use defaults for everything
@ -269,7 +269,7 @@ http://wiki.secondlife.com/wiki/Template_verifier.py
if master_url is None: if master_url is None:
master_url = options.master_url master_url = options.master_url
if current_url is None: if current_url is None:
current_filename = local_template_filename() current_filename = local_template_filename()
print("master:", options.master_url) print("master:", options.master_url)
@ -307,7 +307,7 @@ http://wiki.secondlife.com/wiki/Template_verifier.py
print("Syntax-checking the local template ONLY, no compatibility check is being run.") print("Syntax-checking the local template ONLY, no compatibility check is being run.")
print("Cause: %s\n\n" % e) print("Cause: %s\n\n" % e)
return 0 return 0
acceptable, compat = compare( acceptable, compat = compare(
master_parsed, current_parsed, options.mode) master_parsed, current_parsed, options.mode)

View File

@ -1,4 +1,4 @@
/** /**
* @file #filename#.cpp * @file #filename#.cpp
* @brief Implementation of #filename# * @brief Implementation of #filename#
* @author #getpass.getuser()#@lindenlab.com * @author #getpass.getuser()#@lindenlab.com

View File

@ -1,4 +1,4 @@
/** /**
* @file #filename#.h * @file #filename#.h
* @brief Header file for #filename# * @brief Header file for #filename#
* @author #getpass.getuser()#@lindenlab.com * @author #getpass.getuser()#@lindenlab.com