diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-28 21:46:29 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-07-28 21:46:29 +0400 |
commit | 6b1eb45dda4e61c143c608de8e429a34a31e453f (patch) | |
tree | d9b06405b2c7deb69c00105173b2949ed31c3a6f /source/blender/python/api2_2x/Window.c | |
parent | d2da4f7160974717ee0c7fd2c4030055cffe1312 (diff) |
Scripts:
- Campbell Barton updated his sel_same.py script;
- Added to Mesh scripts a call to Window.EditMode(0) to leave editmode before changing meshes.
BPython:
- small doc fixes / updates;
- added a call to undo_push_mesh inside Window.EditMode(0).
Mesh scripts could change the mesh but not the editmesh -- that would then overwrite the changed mesh. Made all mesh scripts leave edit mode before changing a mesh.
Diffstat (limited to 'source/blender/python/api2_2x/Window.c')
-rw-r--r-- | source/blender/python/api2_2x/Window.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index 754831e89a8..fd66819b0d5 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -42,6 +42,7 @@ #include <BIF_mywindow.h> #include <BSE_headerbuttons.h> #include <BSE_filesel.h> +#include <BIF_editmesh.h> /* for undo_push_mesh() */ #include <BIF_screen.h> #include <BIF_space.h> #include <BIF_drawtext.h> @@ -666,7 +667,6 @@ static PyObject *M_Window_SetViewQuat(PyObject *self, PyObject *args) { int ok = 0; float val[4]; - float *vec; if (!G.vd) { Py_INCREF (Py_None); @@ -715,7 +715,6 @@ static PyObject *M_Window_SetViewOffset(PyObject *self, PyObject *args) { int ok = 0; float val[3]; - float *vec; if (!G.vd) { Py_INCREF (Py_None); @@ -773,7 +772,10 @@ static PyObject *M_Window_EditMode(PyObject *self, PyObject *args) if (status) { if (!G.obedit) enter_editmode(); } - else if (G.obedit) exit_editmode(1); + else if (G.obedit) { + undo_push_mesh("From script"); /* use better solution after 2.34 */ + exit_editmode(1); + } } return Py_BuildValue("h", G.obedit?1:0); |