summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-06-16 15:58:55 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-06-16 15:58:55 -0400
commit8114464a729ef54b850a91f3677d78304e9c5648 (patch)
treef1054041c54a82e0bcc5be73599d1badda21b8b6 /indra/newview/llmeshrepository.cpp
parentcc6e80412949639f52138adde5b909a298cd2242 (diff)
parent9d9d9197a05935a544e585651e7895a366cc6cae (diff)
merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 083038acba..76079b2bf5 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1586,16 +1586,12 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
std::stringstream texture_str;
if (texture != NULL && include_textures && mUploadTextures)
{
- // Get binary rep of texture, if needed.
- LLTextureUploadData data(texture, material.mDiffuseMapLabel);
- if (!data.mTexture->isRawImageValid())
- {
- data.mTexture->reloadRawImage(data.mTexture->getDiscardLevel());
+ if(texture->hasSavedRawImage())
+ {
+ LLPointer<LLImageJ2C> upload_file =
+ LLViewerTextureList::convertToUploadFile(texture->getSavedRawImage());
+ texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize());
}
-
- LLPointer<LLImageJ2C> upload_file =
- LLViewerTextureList::convertToUploadFile(data.mTexture->getRawImage());
- texture_str.write((const char*) upload_file->getData(), upload_file->getDataSize());
}
if (texture != NULL &&
@@ -2898,9 +2894,12 @@ void LLMeshUploadThread::doUploadTexture(LLTextureUploadData& data)
data.mTexture->reloadRawImage(data.mTexture->getDiscardLevel());
}
- LLPointer<LLImageJ2C> upload_file = LLViewerTextureList::convertToUploadFile(data.mTexture->getRawImage());
+ if(data.mTexture->hasSavedRawImage())
+ {
+ LLPointer<LLImageJ2C> upload_file = LLViewerTextureList::convertToUploadFile(data.mTexture->getSavedRawImage());
- ostr.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ ostr.write((const char*) upload_file->getData(), upload_file->getDataSize());
+ }
data.mAssetData = ostr.str();