[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22810] branches/blender2.5/blender/source : BGE shape key actuator working, though only tried a simple testcase.

Campbell Barton ideasman42 at gmail.com
Wed Aug 26 22:06:17 CEST 2009


Revision: 22810
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22810
Author:   campbellbarton
Date:     2009-08-26 22:06:16 +0200 (Wed, 26 Aug 2009)

Log Message:
-----------
BGE shape key actuator working, though only tried a simple testcase.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenkernel/intern/sca.c
    branches/blender2.5/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp

Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/sca.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/sca.c	2009-08-26 19:30:02 UTC (rev 22809)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/sca.c	2009-08-26 20:06:16 UTC (rev 22810)
@@ -418,12 +418,10 @@
 	act->data= 0;
 	
 	switch(act->type) {
-#ifdef __NLA
 	case ACT_ACTION:
 	case ACT_SHAPEACTION:
 		act->data= MEM_callocN(sizeof(bActionActuator), "actionact");
 		break;
-#endif
 	case ACT_SOUND:
 		sa = act->data= MEM_callocN(sizeof(bSoundActuator), "soundact");
 		sa->volume = 1.0f;

Modified: branches/blender2.5/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp	2009-08-26 19:30:02 UTC (rev 22809)
+++ branches/blender2.5/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp	2009-08-26 20:06:16 UTC (rev 22810)
@@ -40,6 +40,7 @@
 #include "STR_HashedString.h"
 #include "DNA_nla_types.h"
 #include "DNA_action_types.h"
+#include "DNA_anim_types.h"
 #include "DNA_scene_types.h"
 #include "BKE_action.h"
 #include "DNA_armature_types.h"
@@ -51,6 +52,10 @@
 #include "FloatValue.h"
 #include "PyObjectPlus.h"
 
+extern "C" {
+	#include "BKE_animsys.h"
+}
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -370,8 +375,11 @@
 					m_blendstart = curtime;
 				}
 				// only interested in shape channel
-				// XXX extract_ipochannels_from_action(&tchanbase, &key->id, m_action, "Shape", m_localtime);
-		
+
+				// in 2.4x was // extract_ipochannels_from_action(&tchanbase, &key->id, m_action, "Shape", m_localtime);
+				BKE_animsys_evaluate_animdata(&key->id, key->adt, m_localtime, ADT_RECALC_ANIM);
+
+				// XXX - in 2.5 theres no way to do this. possibly not that important to support - Campbell
 				if (0) { // XXX !execute_ipochannels(&tchanbase)) {
 					// no update, this is possible if action does not match the keys, stop the action
 					keepgoing = false;





More information about the Bf-blender-cvs mailing list