Fix for GLTF scenes not uploading (#1994)

master
Dave Parks 2024-07-11 11:36:36 -05:00 committed by GitHub
parent 067c400803
commit 98941831e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View File

@ -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;
}

View File

@ -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);