[Bf-blender-cvs] [e3c6585] soc-2014-bge: Merge remote-tracking branch 'origin/master' into soc-2014-bge and resolving conflicts

Ines Almeida noreply at git.blender.org
Sat Jul 12 20:16:40 CEST 2014


Commit: e3c65855027257c65c96d761882de591d3030cf6
Author: Ines Almeida
Date:   Sat Jul 12 11:49:07 2014 +0100
https://developer.blender.org/rBe3c65855027257c65c96d761882de591d3030cf6

Merge remote-tracking branch 'origin/master' into soc-2014-bge and resolving conflicts

===================================================================



===================================================================

diff --cc doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
index d1490b2,a6d03de..1ee0ad9
--- a/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst
@@@ -851,3 -869,11 +869,11 @@@ base class --- :class:`SCA_IObject
        :return: Whether or not the action is playing
        :rtype: boolean
  
+    .. method:: addDebugProperty (name, debug = True)
+ 
+       Adds a single debug property to the debug list.
+ 
+       :arg name: name of the property that added to the debug list.
+       :type name: string
+       :arg debug: the debug state.
 -      :type debug: boolean
++      :type debug: boolean
diff --cc source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index cf495f4,5a2cb0c..df2ebd0
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@@ -740,26 -730,64 +730,6 @@@ bool KX_KetsjiEngine::NextFrame(
  		frames--;
  	}
  
- 	// Handle the animations independently of the logic time step
- 	if (GetRestrictAnimationFPS())
- 	{
- 		double clocktime = m_kxsystem->GetTimeInSeconds();
- 		m_logger->StartLog(tc_animations, clocktime, true);
- 		SG_SetActiveStage(SG_STAGE_ANIMATION_UPDATE);
 -	bool bUseAsyncLogicBricks= false;//true;
--
- 		double anim_timestep = 1.0/KX_GetActiveScene()->GetAnimationFPS();
- 		if (clocktime - m_previousAnimTime > anim_timestep)
 -	if (bUseAsyncLogicBricks)
 -	{
 -		// Logic update sub frame: this will let some logic bricks run at the
 -		// full frame rate.
 -		for (sceneit = m_scenes.begin();sceneit != m_scenes.end(); ++sceneit)
 -		// for each scene, call the proceed functions
--		{
- 			// Sanity/debug print to make sure we're actually going at the fps we want (should be close to anim_timestep)
- 			// printf("Anim fps: %f\n", 1.0/(m_clockTime - m_previousAnimTime));
- 			m_previousAnimTime = clocktime;
- 			for (sceneit = m_scenes.begin();sceneit != m_scenes.end(); ++sceneit)
 -			KX_Scene* scene = *sceneit;
 -
 -			if (!scene->IsSuspended())
--			{
- 				(*sceneit)->UpdateAnimations(clocktime);
- 			}
 -				// if the scene was suspended recalcutlate the delta tu "curtime"
 -				m_suspendedtime = scene->getSuspendedTime();
 -				if (scene->getSuspendedTime()!=0.0)
 -					scene->setSuspendedDelta(scene->getSuspendedDelta()+m_clockTime-scene->getSuspendedTime());
 -				m_suspendeddelta = scene->getSuspendedDelta();
 -				
 -				// set Python hooks for each scene
 -#ifdef WITH_PYTHON
 -				PHY_SetActiveEnvironment(scene->GetPhysicsEnvironment());
 -#endif
 -				KX_SetActiveScene(scene);
 -				
 -				m_logger->StartLog(tc_scenegraph, m_kxsystem->GetTimeInSeconds(), true);
 -				SG_SetActiveStage(SG_STAGE_PHYSICS1);
 -				scene->UpdateParents(m_clockTime);
 -
 -				// Perform physics calculations on the scene. This can involve 
 -				// many iterations of the physics solver.
 -				m_logger->StartLog(tc_physics, m_kxsystem->GetTimeInSeconds(), true);
 -				scene->GetPhysicsEnvironment()->ProceedDeltaTime(m_clockTime,timestep,timestep);
 -				// Update scenegraph after physics step. This maps physics calculations
 -				// into node positions.
 -				m_logger->StartLog(tc_scenegraph, m_kxsystem->GetTimeInSeconds(), true);
 -				SG_SetActiveStage(SG_STAGE_PHYSICS2);
 -				scene->UpdateParents(m_clockTime);
 -				
 -				// Do some cleanup work for this logic frame
 -				m_logger->StartLog(tc_logic, m_kxsystem->GetTimeInSeconds(), true);
 -				scene->LogicUpdateFrame(m_clockTime, false);
 -
 -				// Actuators can affect the scenegraph
 -				m_logger->StartLog(tc_scenegraph, m_kxsystem->GetTimeInSeconds(), true);
 -				SG_SetActiveStage(SG_STAGE_ACTUATOR);
 -				scene->UpdateParents(m_clockTime);
 -
 -				scene->setSuspendedTime(0.0);
 -			} // suspended
 -			else
 -				if (scene->getSuspendedTime()==0.0)
 -					scene->setSuspendedTime(m_clockTime);
 -
 -			m_logger->StartLog(tc_services, m_kxsystem->GetTimeInSeconds(), true);
--		}
--	}
--	
  	// Start logging time spend outside main loop
  	m_logger->StartLog(tc_outside, m_kxsystem->GetTimeInSeconds(), true);
  	
diff --cc source/gameengine/Ketsji/KX_PythonInit.cpp
index c63615a,fa52fab..bce3486
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@@ -1395,11 -1389,71 +1395,76 @@@ static PyObject *gPyGetVsync(PyObject *
  	return PyLong_FromLong(gp_Canvas->GetSwapInterval());
  }
  
+ static PyObject *gPyShowFramerate(PyObject *, PyObject *args)
+ {
+ 	int visible;
+ 	if (!PyArg_ParseTuple(args,"i:showFramerate",&visible))
+ 		return NULL;
+ 
+ 	if (visible && gp_KetsjiEngine)
+ 		gp_KetsjiEngine->SetShowFramerate(true);
+ 	else
+ 		gp_KetsjiEngine->SetShowFramerate(false);
+ 
+ 	Py_RETURN_NONE;
+ }
+ 
+ static PyObject *gPyShowProfile(PyObject *, PyObject *args)
+ {
+ 	int visible;
+ 	if (!PyArg_ParseTuple(args,"i:showProfile",&visible))
+ 		return NULL;
+ 
+ 	if (visible && gp_KetsjiEngine)
+ 		gp_KetsjiEngine->SetShowProfile(true);
+ 	else
+ 		gp_KetsjiEngine->SetShowProfile(false);
+ 
+ 	Py_RETURN_NONE;
+ }
+ 
+ static PyObject *gPyShowProperties(PyObject *, PyObject *args)
+ {
+ 	int visible;
+ 	if (!PyArg_ParseTuple(args,"i:showProperties",&visible))
+ 		return NULL;
+ 
+ 	if (visible && gp_KetsjiEngine)
+ 		gp_KetsjiEngine->SetShowProperties(true);
+ 	else
+ 		gp_KetsjiEngine->SetShowProperties(false);
+ 
+ 	Py_RETURN_NONE;
+ }
+ 
+ static PyObject *gPyAutoDebugList(PyObject *, PyObject *args)
+ {
+ 	int add;
+ 	if (!PyArg_ParseTuple(args,"i:autoAddProperties",&add))
+ 		return NULL;
+ 
+ 	if (add && gp_KetsjiEngine)
+ 		gp_KetsjiEngine->SetAutoAddDebugProperties(true);
+ 	else
+ 		gp_KetsjiEngine->SetAutoAddDebugProperties(false);
+ 
+ 	Py_RETURN_NONE;
+ }
+ 
+ static PyObject *gPyClearDebugList(PyObject *)
+ {
+ 	if (gp_KetsjiScene)
+ 		gp_KetsjiScene->RemoveAllDebugProperties();
+ 
+ 	Py_RETURN_NONE;
+ }
+ 
+ 
 +
 +PyDoc_STRVAR(Rasterizer_module_documentation,
 +	"This is the Python API for the game engine of Rasterizer"
 +);
 +
  static struct PyMethodDef rasterizer_methods[] = {
  	{"getWindowWidth",(PyCFunction) gPyGetWindowWidth,
  	 METH_VARARGS, "getWindowWidth doc"},




More information about the Bf-blender-cvs mailing list