diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-08-17 08:26:00 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-08-17 08:26:00 +0400 |
commit | 446e1fae7c14cd4b5035d447c5b011f6fab9e806 (patch) | |
tree | 1c9cbf850f59111d6c1d38dfd8ed021934743c94 /source/blender/src/drawscript.c | |
parent | 5a39312392858daafa6b05664a1cc03971f9ca42 (diff) |
** Note: two new files added, projectfiles will need an update.
Scripts:
Campbell Barton (Ideasman, thanks) updated his Wavefront OBJ importer.
BPython:
- Finally committed pending contributions:
Chris Keith wrote the Blender.Sound module -- still some testing to do this week;
Joseph (joeedh) added the OnLoad scene script event;
Satish Goda added 6 GLU functions to Blender.BGL. Great additions, thanks all!
- Small changes to Blender.Load (leave editmode as Blender wants) and Window.EditMode (allow definition of "undo string");
- Fixed bug #1539: Window.RedrawAll() crashed Blender if an empty spacescript was available while using it in a gui-less script.
- doc updates.
Diffstat (limited to 'source/blender/src/drawscript.c')
-rw-r--r-- | source/blender/src/drawscript.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/src/drawscript.c b/source/blender/src/drawscript.c index 1ab13355f70..5fc48370d75 100644 --- a/source/blender/src/drawscript.c +++ b/source/blender/src/drawscript.c @@ -91,13 +91,21 @@ void drawscriptspace(ScrArea *sa, void *spacedata) glClear(GL_COLOR_BUFFER_BIT); myortho2(-0.5, curarea->winrct.xmax-curarea->winrct.xmin-0.5, -0.5, curarea->winrct.ymax-curarea->winrct.ymin-0.5); - if(!sc->script) { - if (G.main->script.first) - sc->script = G.main->script.first; - else - return; + if (!sc->script) { + Script *script = G.main->script.first; + + while (script) { + + if (script->py_draw || script->py_event || script->py_button) { + sc->script = script; + break; + } + else script = script->id.next; + } } + if (!sc->script) return; + BPY_spacescript_do_pywin_draw(sc); } |