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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-18 05:29:25 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-08-18 05:29:25 +0400
commit4fb19159ea47027bbaf31d379da3d6b0ea0f0f28 (patch)
treeb50c21dd7873b33912516c9f59429afec5a856c7 /source/blender/makesrna/intern/rna_ui.c
parenta5da26f59d8cd820ca4d27a06028dd6aaee65784 (diff)
2.5: RNA, defining enums, pointers and collections properties is now
possible from python, but it's still work in progress. Pointers and collections are restricted to types derived from IDPropertyGroup (same as for operators), because RNA knows how to allocate/deallocate those. Collections have .add() and .remove(number) functions that can be used. The remove function should be fixed to take an other argument than a number. With the IDPropertyGroup restriction, pointers are more like nested structs. They don't have add(), remove() yet, not sure where to put them. Currently the pointer / nested struct is automatically allocated in the get() function, this needs to be fixed, rule is that RNA get() will not change any data for thread safety. Also, it is only possible to add properties to structs after they have been registered, which needs to be improved as well. Example code: http://www.pasteall.org/7201/python
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 660dbb49027..f16180451a7 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -148,7 +148,7 @@ static void rna_Panel_unregister(const bContext *C, StructRNA *type)
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Panel_register(const bContext *C, ReportList *reports, void *data, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Panel_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
PanelType *pt, dummypt = {0};
@@ -245,7 +245,7 @@ static void rna_Header_unregister(const bContext *C, StructRNA *type)
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Header_register(const bContext *C, ReportList *reports, void *data, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Header_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
HeaderType *ht, dummyht = {0};
@@ -361,7 +361,7 @@ static void rna_Menu_unregister(const bContext *C, StructRNA *type)
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void *data, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
MenuType *mt, dummymt = {0};