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/Window.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/Window.c')
-rw-r--r--source/blender/python/api2_2x/Window.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c
index 9acf91211f4..ab014977468 100644
--- a/source/blender/python/api2_2x/Window.c
+++ b/source/blender/python/api2_2x/Window.c
@@ -765,17 +765,20 @@ static PyObject *M_Window_GetViewMatrix(PyObject *self)
static PyObject *M_Window_EditMode(PyObject *self, PyObject *args)
{
short status = -1;
+ char *undo_str = "From script";
+ int undo_str_len = 11;
- if (!PyArg_ParseTuple(args, "|h", &status))
+ if (!PyArg_ParseTuple(args, "|hs#", &status, &undo_str, &undo_str_len))
return EXPP_ReturnPyObjError (PyExc_TypeError,
- "expected nothing or an int (bool) as argument");
+ "expected nothing or an int (bool) and a string as arguments");
if (status >= 0) {
if (status) {
if (!G.obedit) enter_editmode();
}
else if (G.obedit) {
- undo_push_mesh("From script"); /* use better solution after 2.34 */
+ if (undo_str_len > 63) undo_str[63] = '\0'; /* 64 is max */
+ undo_push_mesh(undo_str); /* use better solution after 2.34 */
exit_editmode(1);
}
}