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-03-26 23:44:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-03-26 23:44:44 +0400
commit2b8bed8598004683bb20efad6e9bd15243ad2d24 (patch)
tree740c4ad4f81b7c2ad5a06f89514cf1a044b4a2cc /source/blender/python/BPY_interface.c
parente968f6ec4bdfdacb1148340c137e2a50ce740139 (diff)
py api
* stopped bpy from importing automaticaly as decieded in the meeting. * removed Blender.Main, since we agree it will be called bpy, renamed files also. * updated epydocs from this and last commit. * updated scripts to use bpy.*, and bugfix's for widgetwizard
Diffstat (limited to 'source/blender/python/BPY_interface.c')
-rw-r--r--source/blender/python/BPY_interface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c
index c8173866f97..a6f150fe1e9 100644
--- a/source/blender/python/BPY_interface.c
+++ b/source/blender/python/BPY_interface.c
@@ -65,7 +65,7 @@
#include "api2_2x/Camera.h"
#include "api2_2x/Draw.h"
#include "api2_2x/Registry.h"
-#include "api2_2x/Main.h" /* for the "bpy" default module */
+#include "api2_2x/BPyModule.h" /* for the "bpy" default module */
/* for scriptlinks */
#include "DNA_lamp_types.h"
@@ -116,6 +116,7 @@ int setup_armature_weakrefs()
*support for packages here e.g. import `package.module` */
static struct _inittab BPy_Inittab_Modules[] = {
{"Blender", M_Blender_Init},
+ {"bpy", M_BPy_Init},
{NULL, NULL}
};
@@ -1972,8 +1973,9 @@ void init_ourImport( void )
m = PyImport_AddModule( "__builtin__" );
d = PyModule_GetDict( m );
- /* add in "bpy" as a default module */
- PyDict_SetItemString(d, "bpy", Main_Init() );
+ /* add in "bpy" as a default module
+ * This has been disabled, import like Blender*/
+ /*PyDict_SetItemString(d, "bpy", M_BPy_Init() );*/
EXPP_dict_set_item_str( d, "__import__", import );
}