Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-05-06 13:12:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-06 13:12:08 +0400
commitc1e1091f027e2d1b8a84ff5595e9a85b092f1b88 (patch)
tree94fed2d523ef0f3fa548645798dadcc2141e746d /source/gameengine/GameLogic/SCA_PythonController.h
parent25b415f310bd181671f11afbe9d9b0ab899a87ec (diff)
moved py controller functions from SCA_PythonController to SCA_IController - the base controller class so python can get the sensors & actuators from any controller (not just SCA_PythonController types)
also deprecated getActuators() and getSensors() for 'sensors' and 'actuators' attributes. an example of getting every sensor connected to an object. all_sensors = [s for c in ob.controllers for s in c.sensors]
Diffstat (limited to 'source/gameengine/GameLogic/SCA_PythonController.h')
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h
index 587e6264d8c..0c2af79c3a3 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.h
+++ b/source/gameengine/GameLogic/SCA_PythonController.h
@@ -96,21 +96,18 @@ class SCA_PythonController : public SCA_IController
static PyObject* sPyAddActiveActuator(PyObject* self,
PyObject* args);
static SCA_IActuator* LinkedActuatorFromPy(PyObject *value);
+
virtual PyObject* py_getattro(PyObject *attr);
+ virtual PyObject* py_getattro_dict();
virtual int py_setattro(PyObject *attr, PyObject *value);
KX_PYMETHOD_O(SCA_PythonController,Activate);
KX_PYMETHOD_O(SCA_PythonController,DeActivate);
- KX_PYMETHOD_DOC_NOARGS(SCA_PythonController,GetSensors);
- KX_PYMETHOD_DOC_NOARGS(SCA_PythonController,GetActuators);
- KX_PYMETHOD_DOC_O(SCA_PythonController,GetSensor);
- KX_PYMETHOD_DOC_O(SCA_PythonController,GetActuator);
KX_PYMETHOD_O(SCA_PythonController,SetScript);
KX_PYMETHOD_NOARGS(SCA_PythonController,GetScript);
- KX_PYMETHOD_NOARGS(SCA_PythonController,GetState);
+
- static PyObject* pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);