missing implementation Ogre::Mesh::clearBoneAssignments

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


User avatar
bishopnator
Goblin
Posts: 299
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 11

missing implementation Ogre::Mesh::clearBoneAssignments

Post by bishopnator »

The mentioned member method is declared, but not implemented. I am trying to clear the skeleton animations from the loaded mesh, but get the linker error, when I called the function.

However it seems that clearing existing skeleton is not so direct as I thought - it is necessary to set empty skeleton name, clear bone assignments and call SubMesh::_buildBoneIndexMap. It think it would be a good idea to pack everything together - e.g. when set empty name of the skeleton.

Note that I never needed to work with skeletal animations so I have zero experience here about the restrictions / possibilities and why there is no such method implemented.

Something like this is working for me:

Code: Select all

        for (uint32_t k = 0; k < pMesh->getNumSubMeshes(); ++k)
        {
            pMesh->getSubMesh(k)->clearBoneAssignments();
            pMesh->getSubMesh(k)->_compileBoneAssignments();
            pMesh->getSubMesh(k)->_buildBoneIndexMap();
        }
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5433
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1341

Re: missing implementation Ogre::Mesh::clearBoneAssignments

Post by dark_sylinc »

Yeah that looks like a bug (unimplemented function).

But I have a question though:

I am trying to clear the skeleton animations from the loaded mesh

This is a bit ambiguous phrasing. What you're trying to do is basically to get rid of the Skeleton from the Mesh entirely? (i.e. as if the Mesh never had a Skeleton in the first place).

User avatar
bishopnator
Goblin
Posts: 299
Joined: Thu Apr 26, 2007 11:43 am
Location: Slovakia / Switzerland
x 11

Re: missing implementation Ogre::Mesh::clearBoneAssignments

Post by bishopnator »

yes, exactly that I am trying to achieve.