[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37238] branches/soc-2011-pepper/source/ gameengine/Converter/BL_ActionActuator.cpp: BGE Animations: Getting the Frame Property option of the Action Actuator working again.

Mitchell Stokes mogurijin at gmail.com
Mon Jun 6 08:31:42 CEST 2011


Revision: 37238
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37238
Author:   moguri
Date:     2011-06-06 06:31:42 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
BGE Animations: Getting the Frame Property option of the Action Actuator working again.

Modified Paths:
--------------
    branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp

Modified: branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp
===================================================================
--- branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp	2011-06-06 06:06:01 UTC (rev 37237)
+++ branches/soc-2011-pepper/source/gameengine/Converter/BL_ActionActuator.cpp	2011-06-06 06:31:42 UTC (rev 37238)
@@ -190,6 +190,19 @@
 		obj->StopAction(0); // Stop the action after getting the frame
 	}
 
+	// Handle a frame property if it's defined
+	if (m_framepropname[0] != 0)
+	{
+		CValue* oldprop = obj->GetProperty(m_framepropname);
+		CValue* newval = new CFloatValue(obj->GetActionFrame(0));
+		if (oldprop)
+			oldprop->SetValue(newval);
+		else
+			obj->SetProperty(m_framepropname, newval);
+
+		newval->Release();
+	}
+
 	// Handle a finished animation
 	if (m_is_going && obj->IsActionDone(0))
 	{




More information about the Bf-blender-cvs mailing list