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/python/api2_2x/gen_utils.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/python/api2_2x/gen_utils.c')
-rw-r--r-- | source/blender/python/api2_2x/gen_utils.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/gen_utils.c b/source/blender/python/api2_2x/gen_utils.c index 3f8ff62cee2..8072e70fa11 100644 --- a/source/blender/python/api2_2x/gen_utils.c +++ b/source/blender/python/api2_2x/gen_utils.c @@ -130,6 +130,8 @@ char * event_to_name(short event) return "FrameChanged"; case SCRIPT_ONLOAD: return "OnLoad"; + case SCRIPT_ONSAVE: + return "OnSave"; case SCRIPT_REDRAW: return "Redraw"; default: @@ -272,9 +274,11 @@ PyObject *EXPP_getScriptLinks (ScriptLink *slink, PyObject *args, int is_scene) event = SCRIPT_REDRAW; else if (is_scene && !strcmp(eventname, "OnLoad")) event = SCRIPT_ONLOAD; + else if (is_scene && !strcmp(eventname, "OnSave")) + event = SCRIPT_ONSAVE; else return EXPP_ReturnPyObjError (PyExc_AttributeError, - "invalid event name."); + "invalid event name"); for (i = 0; i < slink->totscript; i++) { if ((slink->flag[i] == event) && slink->scripts[i]) @@ -335,6 +339,8 @@ int EXPP_addScriptLink (ScriptLink *slink, PyObject *args, int is_scene) event = SCRIPT_REDRAW; else if (is_scene && !strcmp(eventname, "OnLoad")) event = SCRIPT_ONLOAD; + else if (is_scene && !strcmp(eventname, "OnSave")) + event = SCRIPT_ONSAVE; else return EXPP_ReturnIntError (PyExc_AttributeError, "invalid event name."); |