summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-07-11 11:36:36 -0500
committerGitHub <noreply@github.com>2024-07-11 11:36:36 -0500
commit98941831e4afab1cd5ccb5bab995a671df320f72 (patch)
tree1786c51cf711e4c11969c3458cd12c8c13a78e6f /indra/newview
parent067c4008032ae815c4fc6dbaf347bb91cefd5490 (diff)
Fix for GLTF scenes not uploading (#1994)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/gltf/asset.cpp6
-rw-r--r--indra/newview/gltfscenemanager.cpp10
2 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp
index 5ba5951064..c210b9c61d 100644
--- a/indra/newview/gltf/asset.cpp
+++ b/indra/newview/gltf/asset.cpp
@@ -991,6 +991,12 @@ bool Image::prep(Asset& asset)
return false;
}
+ if (!asset.mFilename.empty())
+ { // local preview, boost image so it doesn't discard and force to save raw image in case we save out or upload
+ mTexture->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
+ mTexture->forceToSaveRawImage(0, F32_MAX);
+ }
+
return true;
}
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index 9bda70e643..44564b7926 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -148,6 +148,16 @@ void GLTFSceneManager::uploadSelection()
raw = image.mTexture->getRawImage();
}
+ if (raw.isNull())
+ {
+ raw = image.mTexture->getSavedRawImage();
+ }
+
+ if (raw.isNull())
+ {
+ image.mTexture->readbackRawImage();
+ }
+
if (raw.notNull())
{
LLPointer<LLImageJ2C> j2c = LLViewerTextureList::convertToUploadFile(raw);