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>2007-02-23 17:51:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-02-23 17:51:20 +0300
commit086d51c822774ec68e95d9ab68679fb219ad8a12 (patch)
tree49591a038e005b8aaa7263668929d645dbfc8ca1 /source/blender/python/api2_2x/Material.c
parent260af5f3c1590900353cce62657536bc96d3f53b (diff)
BPython API
* Added data.lib attributes to almost all data types, (except for Text3d and NLA) This is None or the path of the library as a string. * Main was giving a warning, Include Curve.h rather then CurNurb.h * Added Library.LinkedLibs(), returns a list of externaly linked libs.
Diffstat (limited to 'source/blender/python/api2_2x/Material.c')
-rw-r--r--source/blender/python/api2_2x/Material.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c
index b8de13637ec..82b9371e4f1 100644
--- a/source/blender/python/api2_2x/Material.c
+++ b/source/blender/python/api2_2x/Material.c
@@ -533,6 +533,7 @@ static PyObject *Material_getColorComponent( BPy_Material * self,
void * closure );
static PyObject *Material_getOopsLoc( BPy_Material * self );
static PyObject *Material_getOopsSel( BPy_Material * self );
+static PyObject *Material_getLib( BPy_Material * self );
static PyObject *Material_getUsers( BPy_Material * self );
static PyObject *Material_getFakeUser( BPy_Material * self );
/*static int Material_setSeptex( BPy_Material * self, PyObject * value );
@@ -1092,6 +1093,10 @@ static PyGetSetDef BPy_Material_getseters[] = {
(getter)Material_getFakeUser, (setter)Material_setFakeUser,
"The fake user status of this material",
NULL},
+ {"lib",
+ (getter)Material_getLib, (setter)NULL,
+ "Materials external library",
+ NULL},
{"properties", (getter) Material_getProperties, (setter)NULL,
"Get material's ID properties"},
{NULL,NULL,NULL,NULL,NULL} /* Sentinel */
@@ -2845,6 +2850,11 @@ static int Material_setOopsSel ( BPy_Material * self, PyObject * value )
return 0;
}
+static PyObject *Material_getLib(BPy_Material *self)
+{
+ return EXPP_GetIdLib((ID *)self->material);
+}
+
static PyObject *Material_getUsers( BPy_Material * self )
{
return PyInt_FromLong( self->material->id.us );