# Conflicts:
#	indra/cmake/00-Common.cmake
meow-7.2.2
Ansariel 2023-03-30 02:49:33 +02:00
commit 69fd2d9973
19 changed files with 230 additions and 23 deletions

View File

@ -5,6 +5,7 @@ env:
EXTRA_ARGS: -DFMODSTUDIO=ON -DUSE_KDU=ON --crashreporting
build_secrets_checkout: ${{github.workspace}}/signing
jobs:
build_matrix:
strategy:
@ -31,6 +32,18 @@ jobs:
- name: Check python version
run: python -V
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
swap-storage: false
- name: Set gcc version on Linux
if: runner.os == 'Linux'
run: |
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
- name: Install Bash 4 and GNU sed on Mac
if: runner.os == 'macOS'
run: |
@ -117,12 +130,14 @@ jobs:
security set-key-partition-list -S apple-tool:,apple:, -s -k "$FS_KEYCHAIN_PASS" -t private ~/Library/Keychains/viewer.keychain
security list-keychain -d user -s ~/Library/Keychains/viewer.keychain
- name: Install required Ubuntu packages
- name: Install required Ubuntu packages and release some space.
if: runner.os == 'Linux'
run: |
dependencies=("python3-setuptools" "mesa-common-dev" "libgl1-mesa-dev" "libxinerama-dev" "libxrandr-dev" "libpulse-dev" "libglu1-mesa-dev" "libfreetype6-dev" "libfontconfig1")
sudo apt-get update
sudo apt-get install -y "${dependencies[@]}"
sudo apt-get autoremove --purge
sudo apt-get clean
- name: test macOS bundles are present
if: runner.os == 'MacOS'
@ -168,7 +183,9 @@ jobs:
fi
done
shell: bash
- name: Clean up packages to give more space
run: rm *${{ env.fallback_platform }}*bz2
shell: bash
- name: Configure
run: autobuild configure --debug -c ReleaseFS -A${{matrix.addrsize}} -- --package --chan ${{env.FS_RELEASE_CHAN}} ${{env.EXTRA_ARGS}} ${{env.FS_GRID}}
shell: bash

View File

@ -1098,11 +1098,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>e610f49fa7ed5b10b0cc6409b9bf4afc</string>
<string>5fee0f9587f50531211ff9e1e860692f</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>file:///opt/firestorm/fmodstudio-2.02.11-linux64-230190114.tar.bz2</string>
<string>file:///opt/firestorm/fmodstudio-2.02.13-linux64-230861132.tar.bz2</string>
</map>
<key>name</key>
<string>linux64</string>
@ -1112,11 +1112,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>8b2fff1a0a7e057da99fdade1f9e82ff</string>
<string>99c928b18a0d2f08b0ee33fca90c4118</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.02.11-windows-230181802.tar.bz2</string>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.02.13-windows-230860911.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -1126,18 +1126,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>6cf457e2268ed83326c6d77f3475e8f5</string>
<string>01946a6427d126570607c02b75560f02</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.02.11-windows64-230181820.tar.bz2</string>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.02.13-windows64-230860913.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>2.02.11</string>
<string>2.02.13</string>
</map>
<key>fontconfig</key>
<map>

View File

@ -65,6 +65,8 @@
#include "llcheckboxctrl.h"
#include "llagentbenefits.h"
#include "llnotificationsutil.h" // <FS:Zi> detect and strip empty alpha layers from images on upload
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
@ -72,6 +74,10 @@ const S32 PREVIEW_VPAD = -24 + 35; // yuk, hard coded
const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16 + 35;
const S32 PREVIEW_TEXTURE_HEIGHT = 320;
// <FS:Zi> detect and strip empty alpha layers from images on upload
const U8 ALPHA_EMPTY_THRESHOLD = 253;
const F32 ALPHA_EMPTY_THRESHOLD_RATIO = 0.999f;
// </FS:Zi>
//-----------------------------------------------------------------------------
// LLFloaterImagePreview()
//-----------------------------------------------------------------------------
@ -168,16 +174,99 @@ BOOL LLFloaterImagePreview::postBuild()
}
}
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
// <FS:Zi> detect and strip empty alpha layers from images on upload
// getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this));
getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterImagePreview::onBtnUpload, this));
if (mRawImagep->getComponents() != 4)
{
return TRUE;
}
U32 imageBytes = mRawImagep->getWidth() * mRawImagep->getHeight() * 4;
U32 emptyAlphaCount = 0;
U8* data = mRawImagep->getData();
for (U32 i = 3; i < imageBytes; i += 4)
{
if (data[i] > ALPHA_EMPTY_THRESHOLD)
{
emptyAlphaCount++;
}
}
mEmptyAlphaCheck = getChild<LLCheckBoxCtrl>("strip_alpha_check");
if (emptyAlphaCount > (imageBytes / 4 * ALPHA_EMPTY_THRESHOLD_RATIO))
{
getChild<LLUICtrl>("image_alpha_warning")->setVisible(true);
mEmptyAlphaCheck->setCommitCallback(boost::bind(&LLFloaterImagePreview::emptyAlphaCheckboxCallback, this));
mEmptyAlphaCheck->setValue(true);
}
else
{
getChild<LLUICtrl>("image_alpha_warning")->setVisible(false);
mEmptyAlphaCheck->setValue(false);
}
// </FS:Zi>
return TRUE;
}
// <FS:Zi> detect and strip empty alpha layers from images on upload
void LLFloaterImagePreview::emptyAlphaCheckboxCallback()
{
if (!mEmptyAlphaCheck->getValue())
{
LLNotificationsUtil::add("ImageEmptyAlphaLayer", LLSD(), LLSD(), boost::bind(&LLFloaterImagePreview::imageEmptyAlphaCallback, this, _1, _2));
}
}
bool LLFloaterImagePreview::imageEmptyAlphaCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
// 0 = strip alpha
if (option == 0)
{
mEmptyAlphaCheck->setValue(true);
}
return true;
}
void LLFloaterImagePreview::onBtnUpload()
{
if(mEmptyAlphaCheck->getValue())
{
LLPointer<LLImageRaw> stripped_image = new LLImageRaw(mRawImagep->getWidth(), mRawImagep->getHeight(), 3);
stripped_image->copyUnscaled4onto3(mRawImagep);
LLPointer<LLImageFormatted> stripped_png = new LLImagePNG;
// 0.0 = encode time, apparently not used in the encode() function
stripped_png->encode(stripped_image, 0.0f);
mFilenameAndPath = gDirUtilp->getTempFilename() + "." + stripped_png->getExtension();
stripped_png->save(mFilenameAndPath);
mDeleteTempFile = mFilenameAndPath;
}
onBtnOK();
}
// </FS:Zi>
//-----------------------------------------------------------------------------
// LLFloaterImagePreview()
//-----------------------------------------------------------------------------
LLFloaterImagePreview::~LLFloaterImagePreview()
{
// <FS:Zi> detect and strip empty alpha layers from images on upload
if (!mDeleteTempFile.empty())
{
LLFile::remove(mDeleteTempFile);
}
// </FS:Zi>
clearAllPreviewTextures();
mRawImagep = NULL;

View File

@ -39,6 +39,7 @@ class LLVOAvatar;
class LLTextBox;
class LLVertexBuffer;
class LLVolume;
class LLCheckBoxCtrl; // <FS:Zi> detect and strip empty alpha layers from images on upload
class LLImagePreviewSculpted : public LLViewerDynamicTexture
{
@ -129,6 +130,11 @@ protected:
void draw();
bool loadImage(const std::string& filename);
// <FS:Zi> detect and strip empty alpha layers from images on upload
void onBtnUpload();
void emptyAlphaCheckboxCallback();
bool imageEmptyAlphaCallback(const LLSD& notification, const LLSD& response);
// </FS:Zi>
LLPointer<LLImageRaw> mRawImagep;
LLPointer<LLImagePreviewAvatar> mAvatarPreview;
LLPointer<LLImagePreviewSculpted> mSculptedPreview;
@ -139,6 +145,10 @@ protected:
LLPointer<LLViewerTexture> mImagep ;
std::string mImageLoadError;
// <FS:Zi> detect and strip empty alpha layers from images on upload
std::string mDeleteTempFile;
LLCheckBoxCtrl* mEmptyAlphaCheck;
// </FS:Zi>
};
#endif // LL_LLFLOATERIMAGEPREVIEW_H

View File

@ -21,6 +21,9 @@
<item label="Rock" name="Skirt" value="Rock"/>
<item label="Geformtes Primitiv" name="SculptedPrim" value="Geformtes Primitiv"/>
</combo_box>
<panel name="image_alpha_warning">
<check_box name="strip_alpha_check" label="Leeren Alpha-Kanal entfernen"/>
</panel>
<text name="bad_image_text">
Bild kann nicht gelesen werden.

View File

@ -5604,4 +5604,7 @@ URL auf Standard zurücksetzen?
Gruppierung durch den Ordner „[FOLDER_NAME]“ aufheben?
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="Okay"/>
</notification>
<notification name="ImageEmptyAlphaLayer" label="Textur enthält leeren Alpha-Kanal">
Die Textur, die Sie hochladen möchten, enthält einen leeren oder fast-leeren Alpha-Kanal (Transparenz-Informationen). Dies ist fast immer nicht gewünscht und der Kanel sollte daher entfernt werden. Das Hinzufügen eines Alpha-Kanals kann zu Textur-Flackern bei übereinanderliegenden Texturen bei unterschiedlichem Kamerawinkel führen. Zudem verringert sich dadurch die Darstellungsgeschwindigkeit. Sofern diese Textur nicht unbedingt einen (fast-)leeren Alpgha-Kanal benötigt, sollte dieser möglichst entfernt werden.
</notification>
</notifications>

View File

@ -47,9 +47,9 @@
<text
type="string"
length="1"
bottom_delta="30"
top_pad="8"
follows="top|left"
height="25"
height="16"
width="105"
word_wrap="true"
layout="topleft"
@ -105,6 +105,38 @@
value="Sculpted Prim"
name="SculptedPrim" />
</combo_box>
<panel
follows="left|right"
height="32"
layout="topleft"
left="10"
name="image_alpha_warning"
right="-10"
top_pad="4"
visible="false">
<icon
height="24"
image_name="Popup_Caution"
left="0"
top="0"
width="24"
/>
<check_box
follows="top|left|right"
height="12"
label="Empty alpha channel will be removed"
layout="topleft"
left_pad="8"
name="strip_alpha_check"
right="-1"
top_delta="10"
/>
</panel>
<text
type="string"
length="1"

View File

@ -13944,4 +13944,26 @@ Camera reset might be inhibited by the following objects:
yestext="Okay"/>
</notification>
<!-- <FS:Zi> detect and strip empty alpha layers from images on upload -->
<notification
icon="alertmodal.tga"
label="Image Contains Empty Alpha Channel"
name="ImageEmptyAlphaLayer"
type="alertmodal">
The image you are trying to upload contains an empty, or almost empty alpha channel (transparency information). This is almost always not desired and should be stripped off. Adding an alpha channel to an image will lead to textures flipping on top of each other at different camera angles, and it makes rendering slower. So, unless you really need this texture to have an empty / almost empty alpha channel, consider stripping it out.
<tag>confirm_strip</tag>
<form name="form">
<button
default="true"
index="0"
name="strip"
text="Strip Alpha"/>
<button
index="1"
name="use_as_is"
text="Use As Is"/>
</form>
</notification>
<!-- </FS:Zi> -->
</notifications>

View File

@ -2775,7 +2775,7 @@ name="Command_360_Capture_Tooltip">Capture a 360° equirectangular image</string
<string name="Command_Groundsit_Tooltip">Toggle ground sit mode on/off (CTRL+ALT+S)</string>
<string name="Command_Sound_Explorer_Tooltip">Opens the sound explorer</string>
<string name="Command_Asset_Blacklist_Tooltip">Opens the list of all the items you have blacklisted</string>
<string name="Command_Phototools_Tooltip">Tools for full-featured image making (ATL+P).</string>
<string name="Command_Phototools_Tooltip">Tools for full-featured image making (ALT+P).</string>
<string name="Command_Phototools_View_Tooltip">Advanced phototools camera controls (CTRL+SHIFT+C)</string>
<string name="Command_Contact_Sets_Tooltip">Opens contact sets (CTRL+ALT+SHIFT+C)</string>
<string name="Command_Mouselook_Tooltip">Enter mouselook mode (M)</string>

View File

@ -15,9 +15,13 @@
<item label="Jupe" name="Skirt"/>
<item label="Prim sculpté" name="SculptedPrim"/>
</combo_box>
<panel name="image_alpha_warning">
<check_box name="strip_alpha_check" label="Le canal alpha vide sera supprimé"/>
</panel>
<text name="bad_image_text">
Impossible de lire l'image.
Essayez d'enregistrer l'image au format Targa 24 bits (.tga).
Impossible de lire l'image.
Essayez d'enregistrer l'image au format Targa 24 bits (.tga).
</text>
<check_box label="Utiliser une compression sans pertes" name="lossless_check"/>
<check_box name="temp_check" label="Temporaire (Gratuit)" tool_tip="Défini l'envoi comme étant temporaire, celui-ci étant gratuit, mais disponible uniquement pour un temps limité avant qu'il ne cesse d'exister définitivement."/>

View File

@ -5419,4 +5419,11 @@ La réinitialisation de la caméra peut être empêchée par les objets suivants
Dégrouper le dossier "[FOLDER_NAME]" ?
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="Ok"/>
</notification>
<notification label="L'image contient un canal alpha vide" name="ImageEmptyAlphaLayer">
L'image que vous essayez de télécharger contient un canal alpha (informations de transparence) vide ou presque vide. Ce canal est presque toujours indésirable et doit être supprimé. L'ajout d'un canal alpha à une image entraînera le superposition des textures les unes sur les autres selon l'angle de la caméra, et rendra le rendu plus lent. Par conséquent, à moins que vous n'ayez vraiment besoin que cette texture ait un canal alpha vide ou presque vide, pensez à le supprimer.
<form name="form">
<button name="strip" text="Supprimer l'alpha'"/>
<button name="use_as_is" text="Utiliser tel quel"/>
</form>
</notification>
</notifications>

View File

@ -6085,7 +6085,7 @@ Essayez avec le chemin d&apos;accès à l&apos;éditeur entre guillemets doubles
Affiche la liste de tous les éléments mis dans la liste noire
</string>
<string name="Command_Phototools_Tooltip">
Outils pour la création d'image (ATL+P).
Outils pour la création d'image (ALT+P).
</string>
<string name="Command_Phototools_View_Tooltip">
Contrôles avancés de la caméra (CTRL+SHIFT+C)

View File

@ -21,6 +21,9 @@
<item label="Spódnica" name="Skirt" />
<item label="Prim skulptowy" name="SculptedPrim" />
</combo_box>
<panel name="image_alpha_warning">
<check_box label="Pusty kanał alfa zostanie usunięty" name="strip_alpha_check" />
</panel>
<text name="bad_image_text">
Nie można wczytać obrazu.

View File

@ -5219,4 +5219,11 @@ Zresetować adres URL do domyślnego?
Rozgrupować folder "[FOLDER_NAME]"?
<usetemplate name="okcancelbuttons" notext="Anuluj" yestext="Tak" />
</notification>
<notification label="Obraz zawiera pusty kanał alfa" name="ImageEmptyAlphaLayer">
Obraz, który próbujesz przesłać, zawiera pusty (lub prawie pusty) kanał alfa (informacje o przezroczystości). Jest on prawie zawsze niepożądany i powinien zostać usunięty. Dodanie kanału alfa do obrazu spowoduje, że tekstury będą nakładać się na siebie pod różnymi kątami patrzenia kamery, co spowolni renderowanie. Jeśli naprawdę nie potrzebujesz by ta tekstura miała pusty/prawie pusty kanał alfa, to rozważ usunięcie go.
<form name="form">
<button name="strip" text="Usuń alfę" />
<button name="use_as_is" text="Zostaw jak jest" />
</form>
</notification>
</notifications>

View File

@ -5541,7 +5541,7 @@ Spróbuj załączyć ścieżkę do edytora w cytowaniu.
Otwiera listę obiektów, jakie masz na swojej czarnej liście zasobów danych (assetów)
</string>
<string name="Command_Phototools_Tooltip">
Narzędzia do zaawansowanego tworzenia obrazów (ATL+P)
Narzędzia do zaawansowanego tworzenia obrazów (ALT+P)
</string>
<string name="Command_Phototools_View_Tooltip">
Zaawansowane ustawienia kamery fotograficznej (CTRL+SHIFT+C)

View File

@ -21,6 +21,9 @@
<item label="Юбка" name="Skirt" value="Юбка"/>
<item label="Скульптурный примитив" name="SculptedPrim" value="Скульптурный примитив"/>
</combo_box>
<panel name="image_alpha_warning">
<check_box label="Пустой альфа-канал будет удален" name="strip_alpha_check"/>
</panel>
<text name="bad_image_text">
Невозможно прочитать изображение.
Попробуйте сохранить изображение как 24-битный TGA-файл (Targa).

View File

@ -5335,4 +5335,16 @@ https://wiki.firestormviewer.org/fs_voice
Разгруппировать папку "[FOLDER_NAME]"?
<usetemplate name="okcancelbuttons" notext="Отмена" yestext="Да"/>
</notification>
<!-- <FS:Zi> detect and strip empty alpha layers from images on upload -->
<notification
label="Изображение содержит пустой альфа-канал"
name="ImageEmptyAlphaLayer">
Изображение, которое вы пытаетесь загрузить, содержит пустой или почти пустой альфа-канал (информация о прозрачности). Это почти всегда нежелательно и должно быть удалено. Добавление альфа-канала к изображению приведет к тому, что текстуры будут переворачиваться друг над другом под разными углами камеры, что замедлит рендеринг. Итак, если вам действительно не нужна эта текстура с пустым/почти пустым альфа-каналом, рассмотрите возможность ее удаления.
<form name="form">
<button name="strip" text="Удалить Альфу"/>
<button name="use_as_is" text="Оставить как есть"/>
</form>
</notification>
<!-- </FS:Zi> -->
</notifications>

View File

@ -5834,7 +5834,7 @@ https://www.firestormviewer.org/support за помощь в решении эт
Открыть черный список
</string>
<string name="Command_Phototools_Tooltip">
Инструменты для создания фотографий (ATL+P).
Инструменты для создания фотографий (ALT+P).
</string>
<string name="Command_Phototools_View_Tooltip">
Расширенные настройки фотокамеры (CTRL+SHIFT+C)

View File

@ -26,11 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
$/LicenseInfo$
"""
#<FS:TS> Remove this line if Python 2 compatibility is not needed.
# Note that, as is, the script works under both versions, so no
# matter what version "/usr/bin/env python" returns, it'll run.
from __future__ import print_function, division
import errno
import glob
import itertools