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>2003-10-26 19:51:53 +0300
committerJacques Guignot <guignot@wanadoo.fr>2003-10-26 19:51:53 +0300
commit6b1b9c1890633fb45c7e1f826d2fb2cb491f68aa (patch)
tree6517462093e2a27570c8b661af49461cf7b380ad /source/blender/python/api2_2x/Material.c
parente63a938c456f9edcd3d79857649cdd1a93364746 (diff)
iaccess to the IPOs of a Camera, a World, or of a Material
Diffstat (limited to 'source/blender/python/api2_2x/Material.c')
-rw-r--r--source/blender/python/api2_2x/Material.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c
index 16195bd73b6..17111f38e7a 100644
--- a/source/blender/python/api2_2x/Material.c
+++ b/source/blender/python/api2_2x/Material.c
@@ -317,6 +317,7 @@ PyObject *Material_Init (void)
/*****************************************************************************/
/* Python BPy_Material methods declarations: */
/*****************************************************************************/
+static PyObject *Material_getIpo(BPy_Material *self);
static PyObject *Material_getName(BPy_Material *self);
static PyObject *Material_getMode(BPy_Material *self);
static PyObject *Material_getRGBCol(BPy_Material *self);
@@ -624,6 +625,16 @@ Material * GetMaterialByName (char * name)
/*****************************************************************************/
/* Python BPy_Material methods: */
/*****************************************************************************/
+
+static PyObject *Material_getIpo(BPy_Material *self)
+{
+ typedef struct Ipo Ipo;
+PyObject *Ipo_CreatePyObject (Ipo *ipo);
+ struct Ipo*ipo = self->material->ipo;
+ if (!ipo) return EXPP_ReturnPyObjError(PyExc_RuntimeError,"Material has no Ipo");
+ return Ipo_CreatePyObject (ipo);
+}
+
static PyObject *Material_getName(BPy_Material *self)
{
PyObject *attr = PyString_FromString(self->material->id.name+2);