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:
authorJacques Guignot <guignot@wanadoo.fr>2004-06-14 13:24:50 +0400
committerJacques Guignot <guignot@wanadoo.fr>2004-06-14 13:24:50 +0400
commitde9e455088ff73140823ddbad9a6d48783e6ac8e (patch)
tree8e141191c17aa080db21a4947cb6f047ff452185 /source/blender/python/api2_2x/World.c
parent8e48c5c412484d5e9e6d361b7160cd8fb8638090 (diff)
added a [get/set]Range function.
Updated documentation accordingly. (suggested by Stephane SOPPERA, tks!)
Diffstat (limited to 'source/blender/python/api2_2x/World.c')
-rw-r--r--source/blender/python/api2_2x/World.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/World.c b/source/blender/python/api2_2x/World.c
index 172a6c3ac4e..2010a46b02a 100644
--- a/source/blender/python/api2_2x/World.c
+++ b/source/blender/python/api2_2x/World.c
@@ -229,6 +229,21 @@ PyObject *World_Init (void)
/*****************************************************************************/
/* Python BPy_World methods: */
/*****************************************************************************/
+static PyObject *World_getRange(BPy_World *self)
+{
+ return PyFloat_FromDouble(self->world->range);
+}
+
+static PyObject *World_setRange(BPy_World *self, PyObject *args)
+{
+ float range=0.f;
+ if (!PyArg_ParseTuple(args, "f", &range))
+ return (EXPP_ReturnPyObjError (PyExc_TypeError,"expected a float argument"));
+ self->world->range = range;
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
static PyObject *World_getIpo(BPy_World *self)
{