diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2014-05-05 02:37:18 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-05-05 02:39:15 +0400 |
commit | 362b25b38287cb75e4d22b30bdbc7f47e8eb3fdf (patch) | |
tree | 6d4b60050f1a98c1fa8ac6446f451d5fe3200218 /source/gameengine/Ketsji/KX_Scene.cpp | |
parent | d27eea6dc6886ff900d62d77863e432d724d4de1 (diff) |
Fix T39928: Blender crash/freeze when game engine is started with animation played directly on camera object with parents.
Updating object IPOs is not currently thread-safe since it also updates
children. This leads to problems when parents and children are both
animated. For now, updating object IPOs is done in its own loop to avoid
threading issues.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 5a33a612d2e..4c9fba8a10b 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1658,6 +1658,10 @@ void KX_Scene::UpdateAnimations(double curtime) BLI_task_pool_work_and_wait(pool); BLI_task_pool_free(pool); + + for (int i=0; i<m_animatedlist->GetCount(); ++i) { + ((KX_GameObject*)m_animatedlist->GetValue(i))->UpdateActionIPOs(); + } } void KX_Scene::LogicUpdateFrame(double curtime, bool frame) |