blender/source/gameengine/GameLogic
Campbell Barton fd2b115678 Python BGE API
- Initialize python types with PyType_Ready, which adds methods to the type dictionary.
- use Pythons get/setattro (uses a python string for the attribute rather then char*). Using basic C strings seems nice but internally python converts them to python strings and discards them for most functions that accept char arrays.
- Method lookups use the PyTypes dictionary (should be faster then Py_FindMethod)
- Renamed __getattr -> py_base_getattro, _getattr -> py_getattro, __repr -> py_base_repr, py_delattro, py_getattro_self etc.

From here is possible to put all the parent classes methods into each python types dictionary to avoid nested lookups (api has 4 levels of lookups in some places), tested this but its not ready yet.

Simple tests for getting a method within a loop show this to be between 0.5 and 3.2x faster then using Py_FindMethod()
2009-04-03 14:51:06 +00:00
..
Joystick remove warnings for the BGE 2009-02-25 03:26:02 +00:00
CMakeLists.txt Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
Makefile converted my gen_utils.h fix to PyObjectPlus.h 2008-09-06 14:13:31 +00:00
SCA_2DFilterActuator.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_2DFilterActuator.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ActuatorEventManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_ActuatorEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_ActuatorSensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ActuatorSensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_AlwaysEventManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_AlwaysEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_AlwaysSensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_AlwaysSensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ANDController.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ANDController.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_DelaySensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_DelaySensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_EventManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_EventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_ExpressionController.cpp BGE patch 18368: Modulus (ie %) expression controller in BGE. Implement a cache for the expression for better performance. 2009-03-11 22:11:52 +00:00
SCA_ExpressionController.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_IActuator.cpp remove warnings for the BGE 2009-02-25 03:26:02 +00:00
SCA_IActuator.h remove warnings for the BGE 2009-02-25 03:26:02 +00:00
SCA_IController.cpp remove warnings for the BGE 2009-02-25 03:26:02 +00:00
SCA_IController.h BGE patch: add state engine support in the logic bricks. 2008-06-22 14:23:57 +00:00
SCA_IInputDevice.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
SCA_IInputDevice.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
SCA_ILogicBrick.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ILogicBrick.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_IObject.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_IObject.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_IScene.cpp BGE bug fix: crash at exit when object with Radar/Near sensor has debug properties 2008-04-19 21:15:37 +00:00
SCA_IScene.h BGE bug fix: crash at exit when object with Radar/Near sensor has debug properties 2008-04-19 21:15:37 +00:00
SCA_ISensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ISensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_JoystickManager.cpp Fix for a relative paths issue in the game engine. G.sce was being 2008-10-11 00:56:49 +00:00
SCA_JoystickManager.h BGE patch approved: BGE Multiple Joysticks 2008-08-31 18:42:58 +00:00
SCA_JoystickSensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_JoystickSensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_KeyboardManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_KeyboardManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_KeyboardSensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_KeyboardSensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_LogicManager.cpp BGE state system improvement: the sensor with Level option enabled will trigger the controller of a newly activated state, even if the sensor is already connected to an active state; new isTriggered() python function to determine which sensor triggered the current controller. 2008-08-23 11:54:27 +00:00
SCA_LogicManager.h BGE state system improvement: the sensor with Level option enabled will trigger the controller of a newly activated state, even if the sensor is already connected to an active state; new isTriggered() python function to determine which sensor triggered the current controller. 2008-08-23 11:54:27 +00:00
SCA_MouseManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_MouseManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_MouseSensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_MouseSensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_NANDController.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_NANDController.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_NORController.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_NORController.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ORController.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_ORController.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_PropertyActuator.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_PropertyActuator.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_PropertyEventManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_PropertyEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_PropertySensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_PropertySensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_PythonController.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_PythonController.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_RandomActuator.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_RandomActuator.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_RandomEventManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_RandomEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_RandomNumberGenerator.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
SCA_RandomNumberGenerator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
SCA_RandomSensor.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_RandomSensor.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_TimeEventManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_TimeEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
SCA_XNORController.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_XNORController.h Python BGE API 2009-04-03 14:51:06 +00:00
SCA_XORController.cpp Python BGE API 2009-04-03 14:51:06 +00:00
SCA_XORController.h Python BGE API 2009-04-03 14:51:06 +00:00
SConscript SCons: 2009-02-15 23:26:00 +00:00