diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-07 00:25:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-07 00:25:15 +0300 |
commit | 08f306c81cb8015db59fe63ad1ef2c977751652e (patch) | |
tree | 94f656dbf98fba2bf3d47547d34c06131d0a88cf /source/blender/python/api2_2x/Draw.c | |
parent | 3796abf092c9de4d43131dbce05102b126e14896 (diff) |
Made python scripts save and load in the blend file so you can have the same scripts running when you open a blend file.
Also scripts will re-run on undo rather then closing.
This is done by saving and loading the name of the script or textblock of the 'Script' datablock, connected to the ScriptSpace. This way when there is a name but the script dosnt run.
Blender runs the script or text block if available.
Diffstat (limited to 'source/blender/python/api2_2x/Draw.c')
-rw-r--r-- | source/blender/python/api2_2x/Draw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index 284a6d92ba2..a4bbeba65ac 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -52,7 +52,7 @@ #include "BIF_space.h" #include "BIF_interface.h" #include "BIF_toolbox.h" -#include "BPI_script.h" /* script struct */ +#include "DNA_space_types.h" /* script struct */ #include "Image.h" /* for accessing Blender.Image objects */ #include "IMB_imbuf_types.h" /* for the IB_rect define */ #include "interface.h" @@ -912,6 +912,8 @@ static PyObject *Method_Exit( PyObject * self ) /* remove our lock to the current namespace */ script->flags &= ~SCRIPT_GUI; + script->scriptname[0] = '\0'; + script->scriptarg[0] = '\0'; Py_RETURN_NONE; } |