Blender Git Loki
Git Commits -> Revision 4fb1915
Revision 4fb1915 by Brecht Van Lommel (master) August 18, 2009, 01:29 (GMT) |
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 |
Commit Details:
Full Hash: 4fb19159ea47027bbaf31d379da3d6b0ea0f0f28
SVN Revision: 22589
Parent Commit: a5da26f
Lines Changed: +358, -77
15 Modified Paths:
/source/blender/blenkernel/intern/idprop.c (+1, -1) (Diff)
/source/blender/blenloader/intern/readfile.c (+3, -4) (Diff)
/source/blender/blenloader/intern/writefile.c (+3, -3) (Diff)
/source/blender/editors/screen/screen_ops.c (+0, -1) (Diff)
/source/blender/makesrna/intern/rna_access.c (+23, -13) (Diff)
/source/blender/makesrna/intern/rna_define.c (+17, -0) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+26, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_main.c (+29, -29) (Diff)
/source/blender/makesrna/intern/rna_render.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_ui.c (+3, -3) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -1) (Diff)
/source/blender/makesrna/RNA_types.h (+1, -1) (Diff)
/source/blender/python/intern/bpy_rna.c (+242, -18) (Diff)
/source/blender/python/intern/bpy_rna.h (+5, -2) (Diff)
/source/blender/blenloader/intern/readfile.c (+3, -4) (Diff)
/source/blender/blenloader/intern/writefile.c (+3, -3) (Diff)
/source/blender/editors/screen/screen_ops.c (+0, -1) (Diff)
/source/blender/makesrna/intern/rna_access.c (+23, -13) (Diff)
/source/blender/makesrna/intern/rna_define.c (+17, -0) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+26, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_main.c (+29, -29) (Diff)
/source/blender/makesrna/intern/rna_render.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_ui.c (+3, -3) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -1) (Diff)
/source/blender/makesrna/RNA_types.h (+1, -1) (Diff)
/source/blender/python/intern/bpy_rna.c (+242, -18) (Diff)
/source/blender/python/intern/bpy_rna.h (+5, -2) (Diff)