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:
authorWillian Padovani Germano <wpgermano@gmail.com>2004-08-17 08:26:00 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2004-08-17 08:26:00 +0400
commit446e1fae7c14cd4b5035d447c5b011f6fab9e806 (patch)
tree1c9cbf850f59111d6c1d38dfd8ed021934743c94 /source/blender/python/api2_2x/Blender.c
parent5a39312392858daafa6b05664a1cc03971f9ca42 (diff)
** Note: two new files added, projectfiles will need an update.
Scripts: Campbell Barton (Ideasman, thanks) updated his Wavefront OBJ importer. BPython: - Finally committed pending contributions: Chris Keith wrote the Blender.Sound module -- still some testing to do this week; Joseph (joeedh) added the OnLoad scene script event; Satish Goda added 6 GLU functions to Blender.BGL. Great additions, thanks all! - Small changes to Blender.Load (leave editmode as Blender wants) and Window.EditMode (allow definition of "undo string"); - Fixed bug #1539: Window.RedrawAll() crashed Blender if an empty spacescript was available while using it in a gui-less script. - doc updates.
Diffstat (limited to 'source/blender/python/api2_2x/Blender.c')
-rw-r--r--source/blender/python/api2_2x/Blender.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c
index b8d87a040f0..c4ca58ceed3 100644
--- a/source/blender/python/api2_2x/Blender.c
+++ b/source/blender/python/api2_2x/Blender.c
@@ -41,6 +41,7 @@
#include <io.h>
#endif
+#include <BDR_editobject.h> /* exit_editmode() */
#include <BIF_usiblender.h>
#include <BLI_blenlib.h>
#include <BLO_writefile.h>
@@ -391,6 +392,8 @@ static PyObject *Blender_Load(PyObject *self, PyObject *args)
BIF_write_autosave(); /* for safety let's preserve the current data */
}
+ if (G.obedit) exit_editmode(1);
+
/* for safety, any filename with .B.blend is considered the default one.
* It doesn't seem necessary to compare file attributes (like st_ino and
* st_dev, according to the glibc info pages) to find out if the given
@@ -524,6 +527,7 @@ void M_Blender_Init (void)
PyDict_SetItemString (dict, "Noise", Noise_Init());
PyDict_SetItemString (dict, "Mathutils",Mathutils_Init());
PyDict_SetItemString (dict, "Library", Library_Init());
+ PyDict_SetItemString (dict, "Sound", Sound_Init());
PyDict_SetItemString (dict, "CurNurb", CurNurb_Init());