Blender Git Commit Log

Git Commits -> Revision 6b9f3b5

Revision 6b9f3b5 by Campbell Barton (master)
June 28, 2009, 11:22 (GMT)
BGE Python API
Remove the last of the odd C++/python wrapper code from http://www.python.org/doc/PyCPP.html (~1998)

* Use python subclasses rather then having fake subclassing through get/set attributes calling parent types.
* PyObject getset arrays are created while initializing the types, converted from our own attribute arrays. This way python deals with subclasses and we dont have to define getattro or setattro functions for each type.
* GameObjects and Scenes no longer have attribute access to properties. only dictionary style access - ob['prop']
* remove each class's get/set/dir functions.
* remove isA() methods, can use PyObject_TypeCheck() in C and issubclass() in python.
* remove Parents[] array for each C++ class, was only used for isA() and wasnt correct in quite a few cases.
* remove PyTypeObject that was being passed as the last argument to each class (the parent classes too).

TODO -
* Light and VertexProxy need to be converted to using attributes.
* memory for getset arrays is never freed, not that bad since its will only allocates once.

Commit Details:

Full Hash: 6b9f3b5f5c8d918585e01461a6202ae3df2df621
SVN Revision: 21214
Parent Commit: 6998a0f
Lines Changed: +951, -2729

132 Modified Paths:

/source/gameengine/Converter/BL_ActionActuator.cpp (+9, -24) (Diff)
/source/gameengine/Converter/BL_ActionActuator.h (+2, -7) (Diff)
/source/gameengine/Converter/BL_ShapeActionActuator.cpp (+9, -24) (Diff)
/source/gameengine/Converter/BL_ShapeActionActuator.h (+2, -7) (Diff)
/source/gameengine/Expressions/ListValue.cpp (+9, -26) (Diff)
/source/gameengine/Expressions/ListValue.h (+1, -3) (Diff)
/source/gameengine/Expressions/PyObjectPlus.cpp (+31, -163) (Diff)
/source/gameengine/Expressions/PyObjectPlus.h (+4, -71) (Diff)
/source/gameengine/Expressions/Value.cpp (+12, -87) (Diff)
/source/gameengine/Expressions/Value.h (+3, -11) (Diff)
/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp (+11, -32) (Diff)
/source/gameengine/GameLogic/SCA_2DFilterActuator.h (+1, -12) (Diff)
/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp (+11, -27) (Diff)
/source/gameengine/GameLogic/SCA_ActuatorSensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp (+11, -23) (Diff)
/source/gameengine/GameLogic/SCA_AlwaysSensor.h (+1, -11) (Diff)
/source/gameengine/GameLogic/SCA_ANDController.cpp (+11, -23) (Diff)
/source/gameengine/GameLogic/SCA_ANDController.h (+1, -9) (Diff)
/source/gameengine/GameLogic/SCA_DelaySensor.cpp (+11, -28) (Diff)
/source/gameengine/GameLogic/SCA_DelaySensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_ExpressionController.cpp (+2, -3) (Diff)
/source/gameengine/GameLogic/SCA_ExpressionController.h (+1, -10) (Diff)
/source/gameengine/GameLogic/SCA_IActuator.cpp (+2, -3) (Diff)
/source/gameengine/GameLogic/SCA_IActuator.h (+1, -2) (Diff)
/source/gameengine/GameLogic/SCA_IController.cpp (+11, -29) (Diff)
/source/gameengine/GameLogic/SCA_IController.h (+1, -5) (Diff)
/source/gameengine/GameLogic/SCA_ILogicBrick.cpp (+11, -32) (Diff)
/source/gameengine/GameLogic/SCA_ILogicBrick.h (+1, -5) (Diff)
/source/gameengine/GameLogic/SCA_IObject.cpp (+14, -25) (Diff)
/source/gameengine/GameLogic/SCA_IObject.h (+2, -5) (Diff)
/source/gameengine/GameLogic/SCA_ISensor.cpp (+11, -26) (Diff)
/source/gameengine/GameLogic/SCA_ISensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_JoystickSensor.cpp (+11, -31) (Diff)
/source/gameengine/GameLogic/SCA_JoystickSensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp (+11, -29) (Diff)
/source/gameengine/GameLogic/SCA_KeyboardSensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_MouseSensor.cpp (+11, -29) (Diff)
/source/gameengine/GameLogic/SCA_MouseSensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_NANDController.cpp (+11, -23) (Diff)
/source/gameengine/GameLogic/SCA_NANDController.h (+1, -5) (Diff)
/source/gameengine/GameLogic/SCA_NORController.cpp (+11, -23) (Diff)
/source/gameengine/GameLogic/SCA_NORController.h (+1, -9) (Diff)
/source/gameengine/GameLogic/SCA_ORController.cpp (+11, -24) (Diff)
/source/gameengine/GameLogic/SCA_ORController.h (+1, -8) (Diff)
/source/gameengine/GameLogic/SCA_PropertyActuator.cpp (+11, -26) (Diff)
/source/gameengine/GameLogic/SCA_PropertyActuator.h (+1, -7) (Diff)
/source/gameengine/GameLogic/SCA_PropertySensor.cpp (+11, -28) (Diff)
/source/gameengine/GameLogic/SCA_PropertySensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_PythonController.cpp (+16, -30) (Diff)
/source/gameengine/GameLogic/SCA_PythonController.h (+1, -5) (Diff)
/source/gameengine/GameLogic/SCA_RandomActuator.cpp (+11, -28) (Diff)
/source/gameengine/GameLogic/SCA_RandomActuator.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_RandomSensor.cpp (+11, -28) (Diff)
/source/gameengine/GameLogic/SCA_RandomSensor.h (+1, -6) (Diff)
/source/gameengine/GameLogic/SCA_XNORController.cpp (+11, -23) (Diff)
/source/gameengine/GameLogic/SCA_XNORController.h (+1, -4) (Diff)
/source/gameengine/GameLogic/SCA_XORController.cpp (+11, -23) (Diff)
/source/gameengine/GameLogic/SCA_XORController.h (+1, -9) (Diff)
/source/gameengine/Ketsji/BL_Shader.cpp (+11, -25) (Diff)
/source/gameengine/Ketsji/BL_Shader.h (+1, -3) (Diff)
/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp (+12, -28) (Diff)
/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp (+12, -28) (Diff)
/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_BlenderMaterial.cpp (+11, -31) (Diff)
/source/gameengine/Ketsji/KX_BlenderMaterial.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_Camera.cpp (+9, -34) (Diff)
/source/gameengine/Ketsji/KX_Camera.h (+2, -5) (Diff)
/source/gameengine/Ketsji/KX_CameraActuator.cpp (+11, -27) (Diff)
/source/gameengine/Ketsji/KX_CameraActuator.h (+1, -7) (Diff)
/source/gameengine/Ketsji/KX_CDActuator.cpp (+11, -35) (Diff)
/source/gameengine/Ketsji/KX_CDActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_ConstraintActuator.cpp (+11, -30) (Diff)
/source/gameengine/Ketsji/KX_ConstraintActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp (+11, -30) (Diff)
/source/gameengine/Ketsji/KX_ConstraintWrapper.h (+1, -4) (Diff)
/source/gameengine/Ketsji/KX_GameActuator.cpp (+11, -35) (Diff)
/source/gameengine/Ketsji/KX_GameActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+10, -143) (Diff)
/source/gameengine/Ketsji/KX_GameObject.h (+1, -14) (Diff)
/source/gameengine/Ketsji/KX_IpoActuator.cpp (+11, -27) (Diff)
/source/gameengine/Ketsji/KX_IpoActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_Light.cpp (+10, -34) (Diff)
/source/gameengine/Ketsji/KX_Light.h (+1, -5) (Diff)
/source/gameengine/Ketsji/KX_MeshProxy.cpp (+10, -28) (Diff)
/source/gameengine/Ketsji/KX_MeshProxy.h (+0, -3) (Diff)
/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp (+11, -25) (Diff)
/source/gameengine/Ketsji/KX_MouseFocusSensor.h (+1, -4) (Diff)
/source/gameengine/Ketsji/KX_NearSensor.cpp (+12, -37) (Diff)
/source/gameengine/Ketsji/KX_NearSensor.h (+2, -7) (Diff)
/source/gameengine/Ketsji/KX_ObjectActuator.cpp (+11, -29) (Diff)
/source/gameengine/Ketsji/KX_ObjectActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_ParentActuator.cpp (+11, -27) (Diff)
/source/gameengine/Ketsji/KX_ParentActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp (+11, -39) (Diff)
/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h (+1, -5) (Diff)
/source/gameengine/Ketsji/KX_PolygonMaterial.cpp (+11, -26) (Diff)
/source/gameengine/Ketsji/KX_PolygonMaterial.h (+1, -4) (Diff)
/source/gameengine/Ketsji/KX_PolyProxy.cpp (+12, -16) (Diff)
/source/gameengine/Ketsji/KX_PolyProxy.h (+0, -2) (Diff)
/source/gameengine/Ketsji/KX_PyMath.h (+6, -6) (Diff)
/source/gameengine/Ketsji/KX_PythonInitTypes.cpp (+114, -76) (Diff)
/source/gameengine/Ketsji/KX_RadarSensor.cpp (+12, -31) (Diff)
/source/gameengine/Ketsji/KX_RadarSensor.h (+2, -5) (Diff)
/source/gameengine/Ketsji/KX_RaySensor.cpp (+11, -29) (Diff)
/source/gameengine/Ketsji/KX_RaySensor.h (+1, -7) (Diff)
/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp (+11, -29) (Diff)
/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp (+12, -34) (Diff)
/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h (+1, -7) (Diff)
/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp (+11, -27) (Diff)
/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.h (+1, -5) (Diff)
/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp (+12, -34) (Diff)
/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h (+2, -7) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+10, -77) (Diff)
/source/gameengine/Ketsji/KX_Scene.h (+0, -8) (Diff)
/source/gameengine/Ketsji/KX_SceneActuator.cpp (+12, -35) (Diff)
/source/gameengine/Ketsji/KX_SceneActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_SoundActuator.cpp (+11, -31) (Diff)
/source/gameengine/Ketsji/KX_SoundActuator.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_StateActuator.cpp (+12, -32) (Diff)
/source/gameengine/Ketsji/KX_StateActuator.h (+2, -7) (Diff)
/source/gameengine/Ketsji/KX_TouchSensor.cpp (+11, -28) (Diff)
/source/gameengine/Ketsji/KX_TouchSensor.h (+1, -6) (Diff)
/source/gameengine/Ketsji/KX_TrackToActuator.cpp (+11, -35) (Diff)
/source/gameengine/Ketsji/KX_TrackToActuator.h (+1, -4) (Diff)
/source/gameengine/Ketsji/KX_VehicleWrapper.cpp (+11, -28) (Diff)
/source/gameengine/Ketsji/KX_VehicleWrapper.h (+1, -4) (Diff)
/source/gameengine/Ketsji/KX_VertexProxy.cpp (+44, -45) (Diff)
/source/gameengine/Ketsji/KX_VertexProxy.h (+0, -3) (Diff)
/source/gameengine/Ketsji/KX_VisibilityActuator.cpp (+12, -34) (Diff)
/source/gameengine/Ketsji/KX_VisibilityActuator.h (+1, -7) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021