mirror of https://github.com/axmolengine/axmol.git
fix animation bug
This commit is contained in:
parent
ccb39e51b2
commit
2175b25730
|
@ -95,7 +95,7 @@ void Animate3D::startWithTarget(Node *target)
|
|||
|
||||
_boneCurves.clear();
|
||||
auto skin = sprite->getSkin();
|
||||
for (unsigned int i = 0; i < skin->getSkinBoneCount(); i++) {
|
||||
for (unsigned int i = 0; i < skin->getBoneCount(); i++) {
|
||||
auto bone = skin->getBoneByIndex(i);
|
||||
auto curve = _animation->getBoneCurveByName(bone->getName());
|
||||
if (curve)
|
||||
|
|
|
@ -324,9 +324,9 @@ bool MeshSkin::initFromSkinData(const SkinData& skindata)
|
|||
return true;
|
||||
}
|
||||
|
||||
ssize_t MeshSkin::getSkinBoneCount() const
|
||||
ssize_t MeshSkin::getBoneCount() const
|
||||
{
|
||||
return _skinBones.size();
|
||||
return _skinBones.size() + _nodeBones.size();
|
||||
}
|
||||
|
||||
//get bone
|
||||
|
|
|
@ -189,8 +189,8 @@ public:
|
|||
/**create a new meshskin if do not want to share meshskin*/
|
||||
static MeshSkin* create(const std::string& filename, const std::string& name);
|
||||
|
||||
/**get skin bone count*/
|
||||
ssize_t getSkinBoneCount() const;
|
||||
/**get total bone count, skin bone + node bone*/
|
||||
ssize_t getBoneCount() const;
|
||||
|
||||
/**get bone*/
|
||||
Bone* getBoneByIndex(unsigned int index) const;
|
||||
|
|
Loading…
Reference in New Issue