python support for defining region drawing callbacks, while not directly related to operators, this means python can now make operators that draw in the 3D viewport interactively.

nicer then 2.4x space handelers because you can register draw handelers to draw pre/post 3d space or in pixel space.
This commit is contained in:
2010-02-27 13:27:06 +00:00
parent 34857189bc
commit b6acf0bb48
5 changed files with 153 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
#include "bpy_rna.h"
#include "bpy_props.h"
#include "bpy_util.h"
#include "bpy_rna_callback.h"
//#include "blendef.h"
#include "BLI_dynstr.h"
#include "BLI_listbase.h"
@@ -2662,6 +2663,11 @@ static struct PyMethodDef pyrna_struct_methods[] = {
{"path_to_id", (PyCFunction)pyrna_struct_path_to_id, METH_VARARGS, NULL},
{"recast_type", (PyCFunction)pyrna_struct_recast_type, METH_NOARGS, NULL},
{"__dir__", (PyCFunction)pyrna_struct_dir, METH_NOARGS, NULL},
/* experemental */
{"callback_add", (PyCFunction)pyrna_callback_add, METH_VARARGS, NULL},
{"callback_remove", (PyCFunction)pyrna_callback_remove, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}
};