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-04-18 00:06:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-18 00:06:06 +0400
commitdf8cf26404c7e922751643b1095e38f1ab430811 (patch)
treeb4258cc6c90913c379f5cdd05edebd8785230647 /source/gameengine/Ketsji/KX_Scene.h
parent90c6cf77f10961de756f6ff06329d3fa65ce3da4 (diff)
Added m_zombie to the base python class (PyObjectPlus), when this is set all the subclasses will raise an error on access to their members.
Other small changes... - KX_Camera and KX_Light didnt have get/setitem access in their PyType definition. - CList.from_id() error checking for a long was checking for -1 against an unsigned value (own fault) - CValue::SpecialRelease was incrementing an int for no reason. - renamed m_attrlist to m_attr_dict since its a PyDict type. - removed custom getattro/setattro functions for KX_Scene and KX_GameObject, use py_base_getattro, py_base_setattro for all subclasses of PyObjectPlus. - lowercase windows.h in VideoBase.cpp for cross compiling.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.h')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index e1e89e253ed..a06c66ec5dd 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -295,7 +295,7 @@ protected:
/**
* This stores anything from python
*/
- PyObject* m_attrlist;
+ PyObject* m_attr_dict;
struct Scene* m_blenderScene;
@@ -597,34 +597,14 @@ public:
/* for dir(), python3 uses __dir__() */
static PyObject* pyattr_get_dir_dict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
- static int py_base_setattro_scene(PyObject * self, PyObject *attr, PyObject *value)
- {
- if (value==NULL)
- return ((PyObjectPlus*) self)->py_delattro(attr);
-
- int ret= ((PyObjectPlus*) self)->py_setattro(attr, value);
-
- if (ret==PY_SET_ATTR_MISSING) {
- if (PyDict_SetItem(((KX_Scene *) self)->m_attrlist, attr, value)==0) {
- PyErr_Clear();
- ret= PY_SET_ATTR_SUCCESS;
- }
- else {
- PyErr_Format(PyExc_AttributeError, "failed assigning value to KX_Scenes internal dictionary");
- ret= PY_SET_ATTR_FAIL;
- }
- }
-
- return ret;
- }
-
-
virtual PyObject* py_getattro(PyObject *attr); /* name, active_camera, gravity, suspended, viewport, framing, activity_culling, activity_culling_radius */
virtual int py_setattro(PyObject *attr, PyObject *pyvalue);
virtual int py_delattro(PyObject *attr);
virtual PyObject* py_repr(void) { return PyString_FromString(GetName().ReadPtr()); }
+ PyObject* py_getattro__internal(PyObject *attr);
+ int py_setattro__internal(PyObject *attr, PyObject *pyvalue);
/**
* Sets the time the scene was suspended