diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-01 16:43:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-01 16:43:07 +0400 |
commit | 3224efc38419201b44503982541aca8eaeb29486 (patch) | |
tree | 77a09bed4e1668427c48ceac7fdb8021eaa7f729 /source/blender/python/intern/bpy_ui.c | |
parent | 3a28a7450596f46281431bd163b9a237eb481055 (diff) |
Python Panels WIP
- Register python panels
- Added a generic class checking function BPY_class_validate() for panels/operators.
- No button drawing yet
Brecht, Added RNA_enum_value_from_id() and RNA_enum_id_from_value() to rna_access.c to do lookups between identifiers and values of EnumPropertyItem's, Not sure if these should go here.
Diffstat (limited to 'source/blender/python/intern/bpy_ui.c')
-rw-r--r-- | source/blender/python/intern/bpy_ui.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_ui.c b/source/blender/python/intern/bpy_ui.c index 7b3b4c01c55..608086843ba 100644 --- a/source/blender/python/intern/bpy_ui.c +++ b/source/blender/python/intern/bpy_ui.c @@ -27,6 +27,8 @@ #include "bpy_rna.h" /* for rna buttons */ #include "bpy_operator.h" /* for setting button operator properties */ #include "bpy_compat.h" +#include "bpy_panel_wrap.h" /* for setting button operator properties */ + #include "WM_types.h" /* for WM_OP_INVOKE_DEFAULT & friends */ #include "BLI_dynstr.h" @@ -423,6 +425,10 @@ static struct PyMethodDef ui_methods[] = { {"getScreenPtr", (PyCFunction)Method_getScreenPtr, METH_NOARGS, ""}, {"getSpacePtr", (PyCFunction)Method_getSpacePtr, METH_NOARGS, ""}, {"getWindowPtr", (PyCFunction)Method_getWindowPtr, METH_NOARGS, ""}, + + /* Adding panels should be moved, at the moment there is no obvious place as there is with operators */ + {"addPanel", (PyCFunction)PyPanel_wrap_add, METH_VARARGS, ""}, + {"removePanel", (PyCFunction)PyPanel_wrap_remove, METH_VARARGS, ""}, {NULL, NULL, 0, NULL} }; |