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:
authorKen Hughes <khughes@pacific.edu>2007-03-21 05:23:28 +0300
committerKen Hughes <khughes@pacific.edu>2007-03-21 05:23:28 +0300
commit3a834803ef5d74d68d5aa37b9a23f205a473d27f (patch)
tree10821ce011ca877281ef494dacdcaefde886990b /source/blender/python/api2_2x/Main.c
parenta6db9c59494c1ecf00ba165fff3d9007f0b0fe32 (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/Main.c')
-rw-r--r--source/blender/python/api2_2x/Main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Main.c b/source/blender/python/api2_2x/Main.c
index 4eddea59ab0..ef0804a9bb4 100644
--- a/source/blender/python/api2_2x/Main.c
+++ b/source/blender/python/api2_2x/Main.c
@@ -105,7 +105,7 @@
#include "NLA.h"
#include "Main.h"
#include "Scene.h"
-
+#include "Library.h"
#include "Config.h" /* config pydata */
@@ -746,6 +746,8 @@ static char M_Main_doc[] = "The Blender.Main submodule";
PyObject *Main_Init( void )
{
PyObject *submodule;
+ PyObject *dict;
+
if( PyType_Ready( &MainSeq_Type ) < 0 )
return NULL;
@@ -753,6 +755,10 @@ PyObject *Main_Init( void )
return NULL;
submodule = Py_InitModule3( "Blender.Main", NULL, M_Main_doc );
+ dict = PyModule_GetDict( submodule );
+
+ PyDict_SetItemString( dict, "libraries", Library_Init( ) );
+
/* Python Data Types */
PyModule_AddObject( submodule, "scenes", MainSeq_CreatePyObject(NULL, ID_SCE) );