Fix addon stk mercuy crash
Please avoid using 2nd uv layer on animated mesh
This commit is contained in:
parent
ffedf637de
commit
40fe84ddbd
@ -254,7 +254,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
|
|||||||
Vertices_SkinnedMesh.push_back(Vertex);
|
Vertices_SkinnedMesh.push_back(Vertex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (VertexType==video::EVT_TANGENTS)
|
else if (VertexType==video::EVT_TANGENTS)
|
||||||
{
|
{
|
||||||
for(u32 n=0;n<Vertices_Tangents.size();++n)
|
for(u32 n=0;n<Vertices_Tangents.size();++n)
|
||||||
{
|
{
|
||||||
|
@ -338,6 +338,16 @@ void STKAnimatedMesh::resetSkinningState(scene::IAnimatedMesh* mesh)
|
|||||||
{
|
{
|
||||||
if (!CVS->supportsHardwareSkinning()) return;
|
if (!CVS->supportsHardwareSkinning()) return;
|
||||||
m_skinning_offset = -1;
|
m_skinning_offset = -1;
|
||||||
|
m_skinned_mesh = NULL;
|
||||||
|
if (mesh == NULL) return;
|
||||||
|
for (u32 i = 0; i < mesh->getMeshBufferCount(); ++i)
|
||||||
|
{
|
||||||
|
scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i);
|
||||||
|
if (!mb)
|
||||||
|
continue;
|
||||||
|
if (mb->getVertexType() == video::EVT_2TCOORDS)
|
||||||
|
return;
|
||||||
|
}
|
||||||
setHardwareSkinning(true);
|
setHardwareSkinning(true);
|
||||||
if (m_skinned_mesh)
|
if (m_skinned_mesh)
|
||||||
m_skinned_mesh->convertForSkinning();
|
m_skinned_mesh->convertForSkinning();
|
||||||
|
Loading…
Reference in New Issue
Block a user