Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions indra/newview/llskinningutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ void LLSkinningUtil::initSkinningMatrixPalette(

initJointNums(const_cast<LLMeshSkinInfo*>(skin), avatar);

if (skin->mInvBindMatrix.size() < count )
{
// faulty model? mInvBindMatrix.size() should have matched mJointNames.size()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invBindMatrix may not be present despite the model being rigged. Per the spec, the inverse bind matrices must be the same size as the joints array, but only when inverse bind matrices are present.

Copy link
Contributor Author

@akleshchev akleshchev May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code below assumes that they match, crash happened on invBind. I know that it isn't nessesary, but I'm not certain if it should have been present in this particular case or if initSkinningMatrixPalette shoudn't have been called.

return;
}

LLMatrix4a world[LL_CHARACTER_MAX_ANIMATED_JOINTS];

for (S32 j = 0; j < count; ++j)
Expand Down
7 changes: 6 additions & 1 deletion indra/newview/llvovolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3783,7 +3783,12 @@ bool LLVOVolume::canBeAnimatedObject() const

bool LLVOVolume::isAnimatedObject() const
{
LLVOVolume *root_vol = (LLVOVolume*)getRootEdit();
LLViewerObject *root_obj = getRootEdit();
if (root_obj->getPCode() != LL_PCODE_VOLUME)
{
return false; // at the moment only volumes can be animated
}
LLVOVolume* root_vol = (LLVOVolume*)root_obj;
mIsAnimatedObject = root_vol->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
return mIsAnimatedObject;
}
Expand Down