SL-12896 BOM texture settings - replaced isRiggedMesh() call with faster check

meow-7.2.2
Andrey Lihatskiy 2020-05-19 19:56:59 +03:00
parent d9cdef171a
commit 8b8a57a977
1 changed files with 3 additions and 1 deletions

View File

@ -4800,7 +4800,9 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id)
}
LLVOAvatar* avatar = getAvatar();
if (avatar && isRiggedMesh() && !isHUDAttachment())
if (avatar && !isHUDAttachment()
&& isMesh()
&& getVolume() && getVolume()->getParams().getSculptID().notNull()) // checking for the rigged mesh by params instead of using isRiggedMesh() to avoid false negatives when skin info isn't ready
{
LLAvatarAppearanceDefines::EBakedTextureIndex texIndex = LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::assetIdToBakedTextureIndex(id);
LLViewerTexture* bakedTexture = avatar->getBakedTexture(texIndex);