From ed4075cb3410f7e51ea766ab771eee690e3da71c Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 23 Sep 2014 07:52:34 -0700 Subject: Fix T41259: Objects parented to non-armature objects cannot play shape actions in the BGE --- source/gameengine/Ketsji/KX_Scene.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 625bbee2c8e..d0eab9de1c1 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1577,7 +1577,7 @@ void KX_Scene::AddAnimatedObject(CValue* gameobj) static void update_anim_thread_func(TaskPool *pool, void *taskdata, int UNUSED(threadid)) { - KX_GameObject *gameobj, *child; + KX_GameObject *gameobj, *child, *parent; CListValue *children; bool needs_update; double curtime = *(double*)BLI_task_pool_userdata(pool); @@ -1621,8 +1621,11 @@ static void update_anim_thread_func(TaskPool *pool, void *taskdata, int UNUSED(t if (needs_update) { gameobj->UpdateActionManager(curtime); children = gameobj->GetChildren(); + parent = gameobj->GetParent(); - if (!gameobj->GetParent() && gameobj->GetDeformer()) + // Only do deformers here if they are not parented to an armature, otherwise the armature will + // handle updating its children + if (gameobj->GetDeformer() && (!parent || (parent && parent->GetGameObjectType() != SCA_IObject::OBJ_ARMATURE))) gameobj->GetDeformer()->Update(); for (int j=0; jGetCount(); ++j) { -- cgit v1.2.3