Add temporary code for GE spm
This commit is contained in:
parent
3b0df18167
commit
350773d316
@ -256,7 +256,8 @@ void ModelViewWidget::setupRTTScene()
|
||||
scene::ISceneNode* parent = bone_attachment ?
|
||||
animated_node->getJointNode(m_bone_attached[n].c_str()) :
|
||||
m_rtt_main_node;
|
||||
assert(parent);
|
||||
if (!parent)
|
||||
continue;
|
||||
if (m_model_frames[n].first == -1)
|
||||
{
|
||||
scene::ISceneNode* node =
|
||||
|
@ -1328,6 +1328,8 @@ void KartModel::initInverseBoneMatrices()
|
||||
node->setCurrentFrame(striaght_frame);
|
||||
node->OnAnimate(0);
|
||||
scene::IBoneSceneNode* bone = node->getJointNode(i);
|
||||
if (!bone)
|
||||
continue;
|
||||
bone->updateAbsolutePosition();
|
||||
node->setCurrentFrame(striaght_frame);
|
||||
node->OnAnimate(0);
|
||||
@ -1352,8 +1354,11 @@ void KartModel::initInverseBoneMatrices()
|
||||
const core::matrix4& KartModel::getInverseBoneMatrix
|
||||
(const std::string& bone_name) const
|
||||
{
|
||||
// Remove after GESPM animation is done
|
||||
static core::matrix4 unused;
|
||||
assert(m_version >= 3);
|
||||
auto ret = m_inverse_bone_matrices.find(bone_name);
|
||||
assert(ret != m_inverse_bone_matrices.end());
|
||||
if (ret == m_inverse_bone_matrices.end())
|
||||
return unused;
|
||||
return ret->second;
|
||||
} // getInverseBoneMatrix
|
||||
|
Loading…
Reference in New Issue
Block a user