diff options
author | Ken Hughes <khughes@pacific.edu> | 2007-03-21 05:23:28 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2007-03-21 05:23:28 +0300 |
commit | 3a834803ef5d74d68d5aa37b9a23f205a473d27f (patch) | |
tree | 10821ce011ca877281ef494dacdcaefde886990b /source/blender/python/api2_2x/Scene.c | |
parent | a6db9c59494c1ecf00ba165fff3d9007f0b0fe32 (diff) |
Python API
----------
Support for new bpy.libraries module, which is being proposed to replace
the Blender.Library module.
Diffstat (limited to 'source/blender/python/api2_2x/Scene.c')
-rw-r--r-- | source/blender/python/api2_2x/Scene.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 13258b32f53..ff0eb3ff20d 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -72,6 +72,7 @@ struct View3D; #include "Metaball.h" #include "IDProp.h" #include "Text3d.h" +#include "Library.h" #include "gen_utils.h" #include "gen_library.h" @@ -1419,6 +1420,13 @@ static PyObject *SceneObSeq_link( BPy_SceneObSeq * self, PyObject *pyobj ) "Cannot modify scene objects while iterating" ); */ + if( PyTuple_Size(pyobj) == 1 ) { + BPy_LibraryData *seq = ( BPy_LibraryData * )PyTuple_GET_ITEM( pyobj, 0 ); + if( BPy_LibraryData_Check( seq ) ) + return LibraryData_importLibData( seq, seq->name, + ( seq->kind == OBJECT_IS_LINK ? FILE_LINK : 0 ), + self->bpyscene->scene ); + } return Scene_link(self->bpyscene, pyobj); } |