diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-28 22:16:50 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-28 22:16:50 +0300 |
commit | bdc624452b29ea53741dfc2223eb478921d16cbc (patch) | |
tree | 845e200cfc8ce392c74acd8b359ac380deea555c /source/blender/python/BPY_interface.c | |
parent | abe7425f3c0d84e7722b4ace1017aec9ad8bdf87 (diff) |
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.
Diffstat (limited to 'source/blender/python/BPY_interface.c')
-rw-r--r-- | source/blender/python/BPY_interface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index ba826ace4bc..2e9cbd7b3f2 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -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; } |