#51 LOADER_ROTATE_X_AXIS not applied in some cases

open
nobody
cal3d (30)
5
2014-09-13
2004-08-25
Anonymous
No

I think the method:

int CalCoreModel::loadCoreAnimation(const std::string&
strFilename)

should use his 'm_pCoreSkeleton' as second argument to
CalLoader::loadCoreAnimation(strFilename);

becoming

...
CalCoreAnimation *pCoreAnimation =
CalLoader::loadCoreAnimation(strFilename,
m_pCoreSkeleton);
...

If not, later, when loading the tracks:

CalCoreTrack *CalLoader::loadCoreTrack
(CalDataSource& dataSrc, CalCoreSkeleton *skel) {

...
if (loadingMode & LOADER_ROTATE_X_AXIS)
{
// Check for anim rotation
if (skel && skel->getCoreBone(coreBoneId)-
>getParentId() == -1) // root bone
...
}

The skel param is NULL (default value) and if
loadingMode = LOADER_ROTATE_X_AXIS, as the skel =
NULL, we don't get the rot_x.

Thnks

Discussion