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))
        {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to