diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2007-01-29 04:27:07 +0300 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2007-01-29 04:27:07 +0300 |
commit | d89a7388eaa38015264eb68f056346a4d1fcbfe5 (patch) | |
tree | 699476f82db9b168c986e448cd6b90e99362e087 /source/blender/python/api2_2x/Window.c | |
parent | 2133d87d2141ce779e6c08c537ba3de5232b19b7 (diff) |
Bugfix for #5846 erratic error with in "ob.getData(mesh=1)"
It looks like the changes for bug
#5000 Changin EditMode in Script wrecks memory
break the python interpreter.
Since this is critical, I have #ifdef'ed those out of
BPY_interface.c and Window.c. Did not touch Armature.c.
The ifdefs are tagged with /* bug 5000 */
This means bug #5000 is back in play. Interesting to note
that according to #5846, only scripts run from the script menu
and not via Alt-P were broken.
Diffstat (limited to 'source/blender/python/api2_2x/Window.c')
-rw-r--r-- | source/blender/python/api2_2x/Window.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index 0bed7d9241d..cf1c6e1688f 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -890,9 +890,12 @@ static PyObject *M_Window_EditMode( PyObject * self, PyObject * args ) char *undo_str = "From script"; int undo_str_len = 11; int do_undo = 1; +#if 0 +/* bug 5000 */ PyObject *maindict = NULL, *armlist = NULL; PyObject *pyarmature = NULL; int x; +#endif if( !PyArg_ParseTuple( args, "|hs#i", &status, &undo_str, &undo_str_len, &do_undo ) ) @@ -901,7 +904,9 @@ static PyObject *M_Window_EditMode( PyObject * self, PyObject * args ) if( status >= 0 ) { if( status ) { - if( !G.obedit ) + if( !G.obedit ){ +#if 0 +/* bug 5000 */ //update armatures maindict= PyModule_GetDict(PyImport_AddModule( "__main__")); armlist = PyDict_GetItemString(maindict, "armatures"); @@ -910,14 +915,18 @@ static PyObject *M_Window_EditMode( PyObject * self, PyObject * args ) if (pyarmature != Py_None) Armature_RebuildEditbones(pyarmature); } +#endif //enter editmode enter_editmode(0); + } } else if( G.obedit ) { if( undo_str_len > 63 ) undo_str[63] = '\0'; /* 64 is max */ BIF_undo_push( undo_str ); /* This checks user undo settings */ exit_editmode( EM_FREEDATA ); +#if 0 +/* bug 5000 */ //update armatures maindict= PyModule_GetDict(PyImport_AddModule( "__main__")); armlist = PyDict_GetItemString(maindict, "armatures"); @@ -926,7 +935,7 @@ static PyObject *M_Window_EditMode( PyObject * self, PyObject * args ) if (pyarmature != Py_None) Armature_RebuildBones(pyarmature); } - +#endif } } |