diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-02-23 17:51:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-02-23 17:51:20 +0300 |
commit | 086d51c822774ec68e95d9ab68679fb219ad8a12 (patch) | |
tree | 49591a038e005b8aaa7263668929d645dbfc8ca1 /source/blender/python/api2_2x/Object.c | |
parent | 260af5f3c1590900353cce62657536bc96d3f53b (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/Object.c')
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 9f7d8f75023..1593fa2ed1e 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -347,6 +347,7 @@ static PyObject *Object_getLocation( BPy_Object * self, PyObject * args ); static PyObject *Object_getMaterials( BPy_Object * self, PyObject * args ); static PyObject *Object_getMatrix( BPy_Object * self, PyObject * args ); static PyObject *Object_getName( BPy_Object * self ); +static PyObject *Object_getLib( BPy_Object * self ); static PyObject *Object_getParent( BPy_Object * self ); static PyObject *Object_getParentBoneName( BPy_Object * self ); static int Object_setParentBoneName( BPy_Object * self, PyObject * value ); @@ -1323,6 +1324,11 @@ static PyObject *Object_getName( BPy_Object * self ) return PyString_FromString( self->object->id.name + 2 ); } +static PyObject *Object_getLib( BPy_Object * self ) +{ + return EXPP_GetIdLib((ID *)self->object); +} + static PyObject *Object_getParent( BPy_Object * self ) { if( self->object->parent ) @@ -4921,6 +4927,10 @@ static PyGetSetDef BPy_Object_getseters[] = { (getter)Object_getName, (setter)Object_setName, "Object data name", NULL}, + {"lib", + (getter)Object_getLib, (setter)NULL, + "Objects linked library", + NULL}, {"oopsLoc", (getter)Object_getOopsLoc, (setter)Object_setOopsLoc, "Object OOPs location", |