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.
This commit is contained in:
Stephen Swaney
2007-01-29 01:27:07 +00:00
parent 2133d87d21
commit d89a7388ea
2 changed files with 14 additions and 2 deletions

View File

@@ -525,11 +525,14 @@ int BPY_txt_do_python_Text( struct Text *text )
py_dict = CreateGlobalDictionary( );
#if 0
/* bug 5000 */
//setup a weakref dictionary on __main__
maindict= PyModule_GetDict(PyImport_AddModule( "__main__"));
if (PyDict_SetItemString(maindict, "armatures", PyList_New(0)) == -1){
return 0;
}
#endif
script->py_globaldict = py_dict;