Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2014-09-23 18:52:34 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-09-23 18:52:44 +0400
commited4075cb3410f7e51ea766ab771eee690e3da71c (patch)
treeed716c9bcf5ff1e1beb0f4a7eee261fa6f0026b9
parentd342f46682a7def4ba84ab6bc939473385d85f08 (diff)
Fix T41259: Objects parented to non-armature objects cannot play shape actions in the BGE
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp7
1 files changed, 5 insertions, 2 deletions
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; j<children->GetCount(); ++j) {