diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-02-26 12:04:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-02-26 12:04:06 +0300 |
commit | c785532becca59aa2d1b3ae67784b7ac2b733ec2 (patch) | |
tree | 307355d1dec68595375840ec9546f1e9c8c7a535 /source/gameengine/Ketsji/KXNetwork | |
parent | 936a6eeda87bfd36ada735e5edac06f161a5de25 (diff) |
Py BGE API
Python dir(ob) for game types now includes attributes names,
* Use "__dict__" rather then "__methods__" attribute to be Python 3.0 compatible
* Added _getattr_dict() for getting the method and attribute names from a PyObject, rather then building it in the macro.
* Added place holder *::Attribute array, needed for the _getattr_up macro.
Diffstat (limited to 'source/gameengine/Ketsji/KXNetwork')
-rw-r--r-- | source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp index 31f1d2dd3ee..4e5f27df2da 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp @@ -143,6 +143,10 @@ PyMethodDef KX_NetworkMessageActuator::Methods[] = { {NULL,NULL} // Sentinel }; +PyAttributeDef KX_NetworkMessageActuator::Attributes[] = { + { NULL } //Sentinel +}; + PyObject* KX_NetworkMessageActuator::_getattr(const char *attr) { _getattr_up(SCA_IActuator); } diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp index cb9956d4616..ac89d8b0716 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp @@ -213,6 +213,10 @@ PyMethodDef KX_NetworkMessageSensor::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef KX_NetworkMessageSensor::Attributes[] = { + { NULL } //Sentinel +}; + PyObject* KX_NetworkMessageSensor::_getattr(const char *attr) { _getattr_up(SCA_ISensor); // implicit return! } |