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:
Diffstat (limited to 'source/gameengine/Expressions/ListValue.h')
-rw-r--r--source/gameengine/Expressions/ListValue.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h
index 104e3e63283..2af5a330c43 100644
--- a/source/gameengine/Expressions/ListValue.h
+++ b/source/gameengine/Expressions/ListValue.h
@@ -36,7 +36,7 @@ public:
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype,
VALUE_OPERATOR op,
CValue* val);
- virtual float GetNumber();
+ virtual double GetNumber();
virtual CValue* GetReplica();
public:
@@ -59,12 +59,21 @@ public:
bool CheckEqual(CValue* first,CValue* second);
- virtual PyObject* _getattr(const char *attr);
+ virtual PyObject* py_getattro(PyObject* attr);
+ virtual PyObject* py_repr(void) {
+ PyObject *py_proxy= this->GetProxy();
+ PyObject *py_list= PySequence_List(py_proxy);
+ PyObject *py_string= PyObject_Repr(py_list);
+ Py_DECREF(py_list);
+ Py_DECREF(py_proxy);
+ return py_string;
+ }
KX_PYMETHOD_O(CListValue,append);
KX_PYMETHOD_NOARGS(CListValue,reverse);
KX_PYMETHOD_O(CListValue,index);
KX_PYMETHOD_O(CListValue,count);
+ KX_PYMETHOD_O(CListValue,from_id);
private: