Commit: ed4075cb3410f7e51ea766ab771eee690e3da71c
Author: Mitchell Stokes
Date: Tue Sep 23 07:52:34 2014 -0700
Branches: master
https://developer.blender.org/rBed4075cb3410f7e51ea766ab771eee690e3da71c
Fix T41259: Objects parented to non-armature objects cannot play shape actions
in the BGE
===================================================================
M source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp
b/source/gameengine/Ketsji/KX_Scene.cpp
index 625bbee..d0eab9d 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) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs