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/Scene.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/Scene.c')
-rw-r--r-- | source/blender/python/api2_2x/Scene.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index fdea1aa8ca2..5279142c03b 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -294,7 +294,10 @@ static PyObject *Scene_getAttr( BPy_Scene * self, char *name ) else if ( strcmp( name, "properties" ) == 0 ) return BPy_Wrap_IDProperty( (ID*)self->scene, IDP_GetProperties((ID*)self->scene, 1), NULL ); - + + else if ( strcmp( name, "lib" ) == 0 ) + return EXPP_GetIdLib((ID *)self->scene); + /* accept both Layer (for compatibility with ob.Layer) and Layers */ else if( strncmp( name, "Layer", 5 ) == 0 ) attr = PyInt_FromLong( self->scene->lay & ((1<<20)-1) ); @@ -305,7 +308,7 @@ static PyObject *Scene_getAttr( BPy_Scene * self, char *name ) return Scene_getObjects(self); else if( strcmp( name, "__members__" ) == 0 ) - attr = Py_BuildValue( "[sss]", "name", "Layers", "layers", "objects"); + attr = Py_BuildValue( "[ssssss]", "name", "Layers", "layers", "objects", "properties", "lib"); if( !attr ) return ( EXPP_ReturnPyObjError( PyExc_MemoryError, |