Fix T42919 & T42218: BGE: Python-driven armature animation got buggy

Due to changes in the way animation updates were handled,
BL_ArmatureObjects were no longer registering to KX_Scene as animated.

Moguri says: It might have been relying on the deformer update which
moved rom being called on every object in the render step. Now
armature deformers are only updated if they need to be.

Fix T42919 & Fix T42218
This commit is contained in:
Sybren A. Stüvel 2015-02-15 02:00:25 +01:00
parent a83b2d3fd9
commit bf157ce927
Notes: blender-bot 2023-02-14 10:22:22 +01:00
Referenced by issue #42919, BGE: Python-driven armature animation got buggy after 2.70
Referenced by issue #42218, Python controlled armature animation not working in BGE
Referenced by issue #41619, Skinned mesh and object with bone parent differs one frame. (Broken after official 2.71)
Referenced by issue #41006, Armature Modifier broken
1 changed files with 3 additions and 0 deletions

View File

@ -234,6 +234,9 @@ BL_ArmatureObject::BL_ArmatureObject(
// need this to get iTaSC working ok in the BGE
m_pose->flag |= POSE_GAME_ENGINE;
memcpy(m_obmat, m_objArma->obmat, sizeof(m_obmat));
// The side-effect of this method registers this object as "animatable" with the KX_Scene.
GetActionManager();
}
BL_ArmatureObject::~BL_ArmatureObject()