diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-03-31 08:18:39 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-03-31 08:18:39 +0400 |
commit | fa0196b8f920c6662cf7bc1d74161febb36787cb (patch) | |
tree | 73d9b4be486aaccd67aafc7c73f9be1be52ffedd /source/blender/python/BPY_extern.h | |
parent | 2b27a909f022ba568a7404d5283f70f8a569ff0e (diff) |
BPython:
- tentative fix for scripts with CR/LF endings and split lines:
in 2.32, the ac3d and vrml2 exporters, for example, had lines
split with '\\\\' and so gave syntax errors when executed on Win
platforms, because the scripts bundled with Win binaries had dos
line endings.
- Chris Keith has written code to execute Python scripts from the
command-line, with '-P ' switch: "blender -P filename":
a Blender.Quit function was also added, so Blender can quit after
running the script (end the script with Blender.Quit()), but there's
still work to be done in this part, including adding more functions,
to load / save .blend files and to run scripts. More testing and
discussions are necessary.
Thanks Chris, for both your contributions and your patience, since I
wasn't available to check / commit this for a while.
Diffstat (limited to 'source/blender/python/BPY_extern.h')
-rw-r--r-- | source/blender/python/BPY_extern.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index 66fd86a57a4..608f1f2d1f0 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -25,17 +25,13 @@ * * The Original Code is: source/blender/bpyton/include/BPY_extern.h * - * Contributor(s): Michel Selten, Willian P. Germano + * Contributor(s): Michel Selten, Willian P. Germano, Chris Keith * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ extern char bprogname[]; /* holds a copy of argv[0], from creator.c */ -/* Global to control whether the global dictionary should be preserved or not - * each time a script is executed by the Python Interpreter: */ -extern short EXPP_releaseGlobalDict; /* defaults to TRUE */ - struct Text; /* defined in DNA_text_types.h */ struct ID; /* defined in DNA_ID.h */ struct ScriptLink; /* defined in DNA_scriptlink_types.h */ @@ -54,6 +50,7 @@ int BPY_Err_getLinenumber(void); const char *BPY_Err_getFilename(void); /* void BPY_Err_Handle(struct Text *text); */ int BPY_txt_do_python(struct SpaceText* st); +void BPY_run_python_script(char *filename); void BPY_free_compiled_text(struct Text* text); /*void BPY_clear_bad_scriptlink(struct ID *id, struct Text *byebye); */ void BPY_clear_bad_scriptlinks(struct Text *byebye); |