BPython:
-- fixing a last minute bug: scripts w/o guis that called the file selector were not being checked for errors, which could cause crash dumps upon exiting. -- docs: updates for Draw (fixed example) and Material (added tex related methods docs) Scripts: -- added some more scripts, all I could get in shape in time (at least they export / import back). Only tested on linux.
This commit is contained in:
@@ -396,8 +396,6 @@ int BPY_txt_do_python(struct SpaceText* st)
|
||||
|
||||
if (!st->text) return 0;
|
||||
|
||||
PyErr_Clear();
|
||||
|
||||
/* check if this text is already running */
|
||||
while (script) {
|
||||
if (!strcmp(script->id.name+2, st->text->id.name+2)) {
|
||||
@@ -488,8 +486,6 @@ int BPY_menu_do_python(short menutype, int event)
|
||||
|
||||
if (!pym) return 0;
|
||||
|
||||
PyErr_Clear();
|
||||
|
||||
if (pym->version > G.version)
|
||||
notice ("Version mismatch: script was written for Blender %d. "
|
||||
"It may fail with yours: %d.", pym->version, G.version);
|
||||
@@ -632,6 +628,11 @@ void BPY_free_finished_script(Script *script)
|
||||
{
|
||||
if (!script) return;
|
||||
|
||||
if (PyErr_Occurred()) { /* if script ended after filesel */
|
||||
PyErr_Print(); /* eventual errors are handled now */
|
||||
error ("Python script error: check console");
|
||||
}
|
||||
|
||||
free_libblock(&G.main->script, script);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user