Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2004-03-31 08:18:39 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2004-03-31 08:18:39 +0400
commitfa0196b8f920c6662cf7bc1d74161febb36787cb (patch)
tree73d9b4be486aaccd67aafc7c73f9be1be52ffedd /source/blender/python/api2_2x/Blender.h
parent2b27a909f022ba568a7404d5283f70f8a569ff0e (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/api2_2x/Blender.h')
-rw-r--r--source/blender/python/api2_2x/Blender.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/python/api2_2x/Blender.h b/source/blender/python/api2_2x/Blender.h
index ff72d3bbd36..f44df3e3cb0 100644
--- a/source/blender/python/api2_2x/Blender.h
+++ b/source/blender/python/api2_2x/Blender.h
@@ -50,11 +50,6 @@
/* From Window.h, used here by Blender_Redraw */
PyObject *M_Window_Redraw(PyObject *self, PyObject *args);
-/* This global variable controls whether the global Interpreter dictionary
- * should be cleared after a script is run. Default is to clear it.
- * See Blender.ReleaseGlobalDict(bool) */
-extern short EXPP_releaseGlobalDict;
-
/*****************************************************************************/
/* Python API function prototypes for the Blender module. */
/*****************************************************************************/
@@ -62,6 +57,7 @@ PyObject *Blender_Set (PyObject *self, PyObject *args);
PyObject *Blender_Get (PyObject *self, PyObject *args);
PyObject *Blender_Redraw(PyObject *self, PyObject *args);
PyObject *Blender_ReleaseGlobalDict(PyObject *self, PyObject *args);
+PyObject *Blender_Quit(PyObject *self);
/*****************************************************************************/
/* The following string definitions are used for documentation strings. */
@@ -88,10 +84,10 @@ char Blender_Get_doc[] =
char Blender_Redraw_doc[] = "() - Redraw all 3D windows";
char Blender_ReleaseGlobalDict_doc[] =
-"(int) - Define whether the global Python Interpreter dictionary\n\
- should be cleared after the script is run. Default is\n\
- to clear (non-zero int).\n\
-() - Return the current behavior as a bool value (0 is false, 1 is true)\n";
+"Deprecated, please use the Blender.Registry module solution instead.";
+
+char Blender_Quit_doc[] =
+"() - Quit Blender. Experimental, please use with caution.";
/*****************************************************************************/
/* Python method structure definition. */
@@ -100,6 +96,7 @@ struct PyMethodDef Blender_methods[] = {
{"Set", &Blender_Set, METH_VARARGS, Blender_Set_doc},
{"Get", &Blender_Get, METH_VARARGS, Blender_Get_doc},
{"Redraw", &Blender_Redraw, METH_VARARGS, Blender_Redraw_doc},
+ {"Quit", &Blender_Quit, METH_NOARGS, Blender_Quit_doc},
{"ReleaseGlobalDict", &Blender_ReleaseGlobalDict,
METH_VARARGS, Blender_ReleaseGlobalDict_doc},
{NULL, NULL}