* Added 3 missing functions, 2 of them called by blender/src/drawtext.c:

Callbacks registered with Draw.Register in Python are called now.
    That should fix submodule Blender.Draw.
* Added a few other missing functions to BPY_interface.c
* Finished implementing Get() function for Camera, Lamp, Image and Text:
    Both the .Get(name) and .Get() cases are handled now.
* Added function Blender.ReleaseGlobalDict():
    This function should give script writers control over whether the
    global Python Interpreter Dict should be cleared after the script is
    run (default is to clear).  This is a test.
This commit is contained in:
2003-05-13 01:54:28 +00:00
parent eca049b177
commit b9f6d66328
17 changed files with 741 additions and 378 deletions

View File

@@ -24,7 +24,7 @@
*
* This is a new part of Blender.
*
* Contributor(s): Michel Selten
* Contributor(s): Michel Selten, Willian P. Germano
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
@@ -50,12 +50,18 @@
/* 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. */
/*****************************************************************************/
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);
/*****************************************************************************/
/* The following string definitions are used for documentation strings. */
@@ -81,6 +87,12 @@ 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";
/*****************************************************************************/
/* Python method structure definition. */
/*****************************************************************************/
@@ -88,6 +100,8 @@ 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},
{"ReleaseGlobalDict", &Blender_ReleaseGlobalDict,
METH_VARARGS, Blender_ReleaseGlobalDict_doc},
{NULL, NULL}
};