Merge branch 'release/2024.09-ExtraFPS' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/llprimitive/lldaeloader.cpp
#	indra/newview/llvotree.cpp
master
Ansariel 2024-11-22 18:01:53 +01:00
commit 812d46c351
14 changed files with 139 additions and 119 deletions

View File

@ -2149,88 +2149,93 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da
{
if (domMesh* mesh = daeSafeCast<domMesh>(geo->getDescendant(daeElement::matchType(domMesh::ID()))))
{
for (LLModel* model : mModelsMap.find(mesh)->second)
dae_model_map::iterator it = mModelsMap.find(mesh);
if (it != mModelsMap.end())
{
LLMatrix4 transformation = mTransform;
if (mTransform.determinant() < 0)
{ //negative scales are not supported
LL_INFOS() << "Negative scale detected, unsupported transform. domInstance_geometry: " << getElementLabel(instance_geo) << LL_ENDL;
LLSD args;
args["Message"] = "NegativeScaleTrans";
args["LABEL"] = getElementLabel(instance_geo);
mWarningsArray.append(args);
badElement = true;
}
LLModelLoader::material_map materials = getMaterials(model, instance_geo, dae);
// adjust the transformation to compensate for mesh normalization
LLVector3 mesh_scale_vector;
LLVector3 mesh_translation_vector;
model->getNormalizedScaleTranslation(mesh_scale_vector, mesh_translation_vector);
LLMatrix4 mesh_translation;
mesh_translation.setTranslation(mesh_translation_vector);
mesh_translation *= transformation;
transformation = mesh_translation;
LLMatrix4 mesh_scale;
mesh_scale.initScale(mesh_scale_vector);
mesh_scale *= transformation;
transformation = mesh_scale;
if (transformation.determinant() < 0)
{ //negative scales are not supported
LL_INFOS() << "Negative scale detected, unsupported post-normalization transform. domInstance_geometry: " << getElementLabel(instance_geo) << LL_ENDL;
LLSD args;
args["Message"] = "NegativeScaleNormTrans";
args["LABEL"] = getElementLabel(instance_geo);
mWarningsArray.append(args);
badElement = true;
}
std::string label;
if (model->mLabel.empty())
for (LLModel* model : it->second)
{
label = getLodlessLabel(instance_geo);
LLMatrix4 transformation = mTransform;
llassert(!label.empty());
if (mTransform.determinant() < 0)
{ //negative scales are not supported
LL_INFOS() << "Negative scale detected, unsupported transform. domInstance_geometry: " << getElementLabel(instance_geo) << LL_ENDL;
LLSD args;
args["Message"] = "NegativeScaleTrans";
args["LABEL"] = getElementLabel(instance_geo);
mWarningsArray.append(args);
if (model->mSubmodelID)
{
label += (char)((int)'a' + model->mSubmodelID);
badElement = true;
}
// <FS:Beq> Support altenate LOD naming conventions
// model->mLabel = label + sLODSuffix[mLod];
if ( sLODSuffix[mLod].size() > 0 )
LLModelLoader::material_map materials = getMaterials(model, instance_geo, dae);
// adjust the transformation to compensate for mesh normalization
LLVector3 mesh_scale_vector;
LLVector3 mesh_translation_vector;
model->getNormalizedScaleTranslation(mesh_scale_vector, mesh_translation_vector);
LLMatrix4 mesh_translation;
mesh_translation.setTranslation(mesh_translation_vector);
mesh_translation *= transformation;
transformation = mesh_translation;
LLMatrix4 mesh_scale;
mesh_scale.initScale(mesh_scale_vector);
mesh_scale *= transformation;
transformation = mesh_scale;
if (transformation.determinant() < 0)
{ //negative scales are not supported
LL_INFOS() << "Negative scale detected, unsupported post-normalization transform. domInstance_geometry: " << getElementLabel(instance_geo) << LL_ENDL;
LLSD args;
args["Message"] = "NegativeScaleNormTrans";
args["LABEL"] = getElementLabel(instance_geo);
mWarningsArray.append(args);
badElement = true;
}
std::string label;
if (model->mLabel.empty())
{
model->mLabel = label + '_' + sLODSuffix[mLod];
label = getLodlessLabel(instance_geo);
llassert(!label.empty());
if (model->mSubmodelID)
{
label += (char)((int)'a' + model->mSubmodelID);
}
// <FS:Beq> Support altenate LOD naming conventions
//model->mLabel = label + lod_suffix[mLod];
if (sLODSuffix[mLod].size() > 0)
{
model->mLabel = label + '_' + sLODSuffix[mLod];
}
else
{
model->mLabel = label;
}
// </FS:Beq>
}
else
{
model->mLabel = label;
// Don't change model's name if possible, it will play havoc with scenes that already use said model.
size_t ext_pos = getSuffixPosition(model->mLabel);
if (ext_pos != -1)
{
label = model->mLabel.substr(0, ext_pos);
}
else
{
label = model->mLabel;
}
}
// </FS:Beq>
}
else
{
// Don't change model's name if possible, it will play havoc with scenes that already use said model.
size_t ext_pos = getSuffixPosition(model->mLabel);
if (ext_pos != -1)
{
label = model->mLabel.substr(0, ext_pos);
}
else
{
label = model->mLabel;
}
}
mScene[transformation].push_back(LLModelInstance(model, label, transformation, materials));
stretch_extents(model, transformation);
mScene[transformation].push_back(LLModelInstance(model, label, transformation, materials));
stretch_extents(model, transformation);
}
}
}
}

View File

@ -1979,21 +1979,21 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
return;
}
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
if (index >= 0)
{
// Prespecified material
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
me->loadMaterial(model_in, filename, index);
}
else if (model_in.materials.size() == 1)
{
// Only one, just load it
// Only one material, just load it
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
me->loadMaterial(model_in, filename, 0);
}
else
{
// Promt user to select material
// Multiple materials, Promt user to select material
std::list<std::string> material_list;
std::vector<tinygltf::Material>::const_iterator mat_iter = model_in.materials.begin();
std::vector<tinygltf::Material>::const_iterator mat_end = model_in.materials.end();
@ -2011,15 +2011,19 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind
}
}
material_list.push_back(me->getString("material_batch_import_text"));
material_list.push_back(LLTrans::getString("material_batch_import_text"));
LLFloaterComboOptions::showUI(
[me, model_in, filename](const std::string& option, S32 index)
[model_in, filename](const std::string& option, S32 index)
{
me->loadMaterial(model_in, filename, index);
if (index >= 0) // -1 on cancel
{
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
me->loadMaterial(model_in, filename, index);
}
},
me->getString("material_selection_title"),
me->getString("material_selection_text"),
LLTrans::getString("material_selection_title"),
LLTrans::getString("material_selection_text"),
material_list
);
}

View File

@ -560,7 +560,7 @@ private:
F32 mImagePriority; // should map to max virtual size
F32 mRequestedPriority;
S32 mDesiredDiscard;
S32 mSimRequestedDiscard;
S32 mSimRequestedDiscard; // <FS:Ansariel> OpenSim compatibility
S32 mRequestedDiscard;
S32 mLoadedDiscard;
S32 mDecodedDiscard;
@ -912,7 +912,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mImagePriority(priority),
mRequestedPriority(0.f),
mDesiredDiscard(-1),
mSimRequestedDiscard(-1),
mSimRequestedDiscard(-1), // <FS:Ansariel> OpenSim compatibility
mRequestedDiscard(-1),
mLoadedDiscard(-1),
mDecodedDiscard(-1),

View File

@ -1178,10 +1178,15 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
pos.load3(center.mV);
mDrawable->setPositionGroup(pos);
LLFace* facep = mDrawable->getFace(0);
if (!facep) return; // <FS:Beq/> FIRE-34565 Repeatable Bugsplat crash while driving on mainland.
facep->mExtents[0] = newMin;
facep->mExtents[1] = newMax;
if (mDrawable->getNumFaces() > 0)
{
LLFace* facep = mDrawable->getFace(0);
if (facep)
{
facep->mExtents[0] = newMin;
facep->mExtents[1] = newMax;
}
}
}
bool LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp,

View File

@ -6,15 +6,6 @@
<string name="upload_fee_string">
[FEE] L$ Upload-Geb.
</string>
<string name="material_selection_title">
Material-Auswahl
</string>
<string name="material_selection_text">
Material auswählen:
</string>
<string name="material_batch_import_text">
--- Alle hochladen ---
</string>
<string name="material_override_title">
Material bearbeiten
</string>

View File

@ -6505,6 +6505,15 @@ Setzen Sie den Editorpfad in Anführungszeichen
<string name="Material Texture Name Header">
Vorhandene Texturen im Material:
</string>
<string name="material_selection_title">
Material-Auswahl
</string>
<string name="material_selection_text">
Material auswählen:
</string>
<string name="material_batch_import_text">
--- Alle hochladen ---
</string>
<string name="logging_calls_disabled_log_empty">
Unterhaltungen werden nicht protokolliert. Um ein Protokoll zu starten, wählen Sie „Speichern: nur Protokoll“ oder „Speichern: Protokoll und Transkripte“ unter „Einstellungen“ &gt; „Chat“.
</string>

View File

@ -13,9 +13,6 @@
title="[MATERIAL_NAME]">
<string name="no_upload_fee_string">no upload fee</string>
<string name="upload_fee_string">L$[FEE] upload fee</string>
<string name="material_selection_title">Material selection</string>
<string name="material_selection_text">Select material:</string>
<string name="material_batch_import_text">--- Bulk Upload All ---</string>
<string name="material_override_title">Editing Material</string>
<scroll_container

View File

@ -2962,6 +2962,9 @@ name="Command_360_Capture_Tooltip">Capture a 360° equirectangular image</string
<!-- PBR Materials -->
<string name="Material Texture Name Header">Textures present this material: </string>
<string name="material_selection_title">Material selection</string>
<string name="material_selection_text">Select material:</string>
<string name="material_batch_import_text">--- Bulk Upload All ---</string>
<!-- Conversation log messages -->
<string name="logging_calls_disabled_log_empty">

View File

@ -2,9 +2,6 @@
<floater name="material editor" title="[MATERIAL_NAME]">
<string name="no_upload_fee_string">pas de frais d'envoi</string>
<string name="upload_fee_string">Frais d'envoi L$[FEE]</string>
<string name="material_selection_title">Sélection des matériaux</string>
<string name="material_selection_text">Sélectionner un matériau l:</string>
<string name="material_batch_import_text">--- Les charger tous ---</string>
<string name="material_override_title">Modification du matériau</string>
<panel name="button_panel">
<text name="unsaved_changes">

View File

@ -6474,6 +6474,15 @@ Essayez avec le chemin d&apos;accès à l&apos;éditeur entre guillemets doubles
<string name="ExperiencePermissionShort17">
Environnement
</string>
<string name="material_selection_title">
Sélection des matériaux
</string>
<string name="material_selection_text">
Sélectionner un matériau l:
</string>
<string name="material_batch_import_text">
--- Les charger tous ---
</string>
<string name="logging_calls_disabled_log_empty">
Les conversations ne sont pas archivées. Pour commencer à tenir un journal, choisissez Enregistrer : Journal seul ou Enregistrer : Journal et transcriptions sous Préférences &gt; Chat.
</string>

View File

@ -6,15 +6,6 @@
<string name="upload_fee_string">
Costo upload: [FEE]L$
</string>
<string name="material_selection_title">
Selezione del materiale
</string>
<string name="material_selection_text">
Seleziona materiale:
</string>
<string name="material_batch_import_text">
--- Carica tutto ---
</string>
<string name="material_override_title">
Modifica materiale
</string>

View File

@ -6068,6 +6068,15 @@ Prova a racchiudere il percorso dell&apos;editor in doppie virgolette.
<string name="Material Texture Name Header">
Texture esistenti nel materiale:
</string>
<string name="material_selection_title">
Selezione del materiale
</string>
<string name="material_selection_text">
Seleziona materiale:
</string>
<string name="material_batch_import_text">
--- Carica tutto ---
</string>
<string name="logging_calls_disabled_log_empty">
Le conversazioni non vengono registrate. Per iniziare a registrare, seleziona &quot;Salva: Solo registro&quot; oppure &quot;Salva: Registri e trascrizioni&quot; in Preferenze &gt; Chat.
</string>

View File

@ -6,15 +6,6 @@
<string name="upload_fee_string">
Opłata: [FEE]L$
</string>
<string name="material_selection_title">
Wybór materiału
</string>
<string name="material_selection_text">
Wybierz materiał:
</string>
<string name="material_batch_import_text">
--- Prześlij zbiorczo ---
</string>
<string name="material_override_title">
Edycja materiału
</string>

View File

@ -5975,6 +5975,15 @@ Spróbuj załączyć ścieżkę do edytora w cytowaniu.
<string name="Material Texture Name Header">
Tekstury przedstawiają materiał:
</string>
<string name="material_selection_title">
Wybór materiału
</string>
<string name="material_selection_text">
Wybierz materiał:
</string>
<string name="material_batch_import_text">
--- Prześlij zbiorczo ---
</string>
<string name="logging_calls_disabled_log_empty">
Rozmowy nie są zapisywane do dziennika. Jeśli chcesz zacząć je logować wybierz "Zapisywanie: tylko dziennik" lub "Zapisywanie: dziennik i logi rozmów" w Preferencje > Prywatność.
</string>