[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15984] trunk/blender/source: * blenderplayer wasnt useing the scenes frame rate.
Campbell Barton
ideasman42 at gmail.com
Wed Aug 6 06:09:12 CEST 2008
Revision: 15984
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15984
Author: campbellbarton
Date: 2008-08-06 06:09:10 +0200 (Wed, 06 Aug 2008)
Log Message:
-----------
* blenderplayer wasnt useing the scenes frame rate.
* GBE Python API's alignToVect wasnt clamping the align ammount from 0.0-1.0
* Generated images arnt animated - use for a test to see if the textures animated.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/texture.c
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
Modified: trunk/blender/source/blender/blenkernel/intern/texture.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/texture.c 2008-08-06 00:37:27 UTC (rev 15983)
+++ trunk/blender/source/blender/blenkernel/intern/texture.c 2008-08-06 04:09:10 UTC (rev 15984)
@@ -850,10 +850,8 @@
if(texture->plugin) {
// assume all plugins depend on time
return 1;
- } else if(texture->ima &&
- ( texture->ima->source == IMA_SRC_SEQUENCE ||
- texture->ima->source == IMA_SRC_MOVIE ||
- texture->ima->source == IMA_SRC_GENERATED ) ) {
+ } else if( texture->ima &&
+ ELEM(texture->ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
return 1;
} else if(texture->ipo) {
// assume any ipo means the texture is animated
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp 2008-08-06 00:37:27 UTC (rev 15983)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_Application.cpp 2008-08-06 04:09:10 UTC (rev 15984)
@@ -56,6 +56,7 @@
#include "BLO_readfile.h"
#include "BKE_global.h"
#include "BKE_main.h"
+#include "DNA_scene_types.h"
#ifdef __cplusplus
}
#endif // __cplusplus
@@ -669,6 +670,11 @@
m_ketsjiengine->StartEngine(true);
m_engineRunning = true;
+ // Set the animation playback rate for ipo's and actions
+ // the framerate below should patch with FPS macro defined in blendef.h
+ // Could be in StartEngine set the framerate, we need the scene to do this
+ m_ketsjiengine->SetAnimFrameRate( (((double) G.scene->r.frs_sec) / G.scene->r.frs_sec_base) );
+
}
if (!m_engineRunning)
Modified: trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp 2008-08-06 00:37:27 UTC (rev 15983)
+++ trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp 2008-08-06 04:09:10 UTC (rev 15984)
@@ -1490,6 +1490,9 @@
MT_Vector3 vect;
if (PyVecTo(pyvect, vect))
{
+ if (fac<=0.0) Py_RETURN_NONE; // Nothing to do.
+ if (fac< 1.0) fac= 1.0;
+
AlignAxisToVect(vect,axis,fac);
NodeUpdateGS(0.f,true);
Py_RETURN_NONE;
More information about the Bf-blender-cvs
mailing list