diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-22 00:05:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-22 00:05:16 +0400 |
commit | 6b8dae0874d774888374992fc3923affb451c45a (patch) | |
tree | 3783cb8c8039971d1ddfaad1a93cc1738be0f5b3 /source/blender/blenkernel/BKE_screen.h | |
parent | b8445173c4c8588a64870e93dd781d181d31c78b (diff) |
RNA
* ID blocks can now get RNA properties defined from python, e.g.:
bpy.types.Scene.BoolProperty(..)
* RNA structs/functions/properties can now get pointers duplicated
(mostly strings), since we can't point to some static string then.
* Added ExtensionRNA struct to add into *Type structs for subclassing,
is a bit more compact than defining the 4 variables each time.
Only disadvantage is it requires including RNA in more places.
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 5a12c04780a..4fcb7c881be 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -46,10 +46,8 @@ struct wmWindow; struct wmWindowManager; struct uiLayout; struct uiMenuItem; -struct StructRNA; -struct PointerRNA; -struct FunctionRNA; -struct ParameterList; + +#include "RNA_types.h" /* spacetype has everything stored to get an editor working, it gets initialized via ED_spacetypes_init() in editors/area/spacetypes.c */ @@ -169,11 +167,8 @@ typedef struct PanelType { /* draw entirely, view changes should be handled here */ void (*draw)(const struct bContext *, struct Panel *); - /* python integration */ - void *py_data; - struct StructRNA *py_srna; - int (*py_call)(struct PointerRNA *, struct FunctionRNA *, struct ParameterList *); - void (*py_free)(void *py_data); + /* RNA integration */ + ExtensionRNA ext; } PanelType; /* header types */ @@ -187,11 +182,8 @@ typedef struct HeaderType { /* draw entirely, view changes should be handled here */ void (*draw)(const struct bContext *, struct Header *); - /* python integration */ - void *py_data; - struct StructRNA *py_srna; - int (*py_call)(struct PointerRNA *, struct FunctionRNA *, struct ParameterList *); - void (*py_free)(void *py_data); + /* RNA integration */ + ExtensionRNA ext; } HeaderType; typedef struct Header { @@ -214,11 +206,8 @@ typedef struct MenuType { /* draw entirely, view changes should be handled here */ void (*draw)(const struct bContext *, struct Menu *); - /* python integration */ - void *py_data; - struct StructRNA *py_srna; - int (*py_call)(struct PointerRNA *, struct FunctionRNA *, struct ParameterList *); - void (*py_free)(void *py_data); + /* RNA integration */ + ExtensionRNA ext; } MenuType; typedef struct Menu { |