summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-29 07:07:29 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-29 07:07:29 +0800
commitcb759bf9e0580b0c0799e33b8e7af1ea46a4c336 (patch)
tree403de432ee5431fdb5195cb21d81b1c0a01cec54 /indra/newview/llmaterialeditor.cpp
parent2ec9d7fa779456112f36e963d1e169a71149662a (diff)
parent288bce100d1239dd98e1d0730c905cc5cbe6ad1b (diff)
Merge tag 'Second_Life_Release#288bce10-2025.05' into 2025.05
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 5b3ac53d51..3cab060357 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2479,6 +2479,42 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::
pack_textures(base_color_img, normal_img, mr_img, emissive_img, occlusion_img,
mBaseColorJ2C, mNormalJ2C, mMetallicRoughnessJ2C, mEmissiveJ2C);
+ if (open_floater)
+ {
+ bool textures_scaled = false;
+ if (mBaseColorFetched && mBaseColorJ2C
+ && (mBaseColorFetched->getWidth() != mBaseColorJ2C->getWidth()
+ || mBaseColorFetched->getHeight() != mBaseColorJ2C->getHeight()))
+ {
+ textures_scaled = true;
+ }
+ else if (mNormalFetched && mNormalJ2C
+ && (mNormalFetched->getWidth() != mNormalJ2C->getWidth()
+ || mNormalFetched->getHeight() != mNormalJ2C->getHeight()))
+ {
+ textures_scaled = true;
+ }
+ else if (mMetallicRoughnessFetched && mMetallicRoughnessJ2C
+ && (mMetallicRoughnessFetched->getWidth() != mMetallicRoughnessJ2C->getWidth()
+ || mMetallicRoughnessFetched->getHeight() != mMetallicRoughnessJ2C->getHeight()))
+ {
+ textures_scaled = true;
+ }
+ else if (mEmissiveFetched && mEmissiveJ2C
+ && (mEmissiveFetched->getWidth() != mEmissiveJ2C->getWidth()
+ || mEmissiveFetched->getHeight() != mEmissiveJ2C->getHeight()))
+ {
+ textures_scaled = true;
+ }
+
+ if (textures_scaled)
+ {
+ LLSD args;
+ args["MAX_SIZE"] = LLViewerTexture::MAX_IMAGE_SIZE_DEFAULT;
+ LLNotificationsUtil::add("MaterialImagesWereScaled", args);
+ }
+ }
+
LLUUID base_color_id;
if (mBaseColorFetched.notNull())
{