Blender Git Commit Log
Git Commits -> Revision e7928dd
Revision e7928dd by Brecht Van Lommel (master) June 29, 2009, 19:15 (GMT) |
RNA Implementation of RNA side of foreach_get/foreach_set, Campbell will do python code. Three functions for efficiently setting some property for all items in a collection. RNA_property_collection_raw_array gives access to the properties as an array with length, stride, and type specified, if this is possible, i.e. not when it uses a ListBase, or if a manual get/set function is implemented. Two other functions take a C array pointer and get/set it using the a collection + property name, using efficient array access if possible, and otherwise using slower RNA iterator. RNA_property_collection_raw_get RNA_property_collection_raw_set The number of type conversion required here got a bit out of hand, it could be more efficient still if checking for more cases, but function is already long enough. Example: http://www.pasteall.org/6362/c |
Commit Details:
Full Hash: e7928dd4b4b797295e2a3c6f73a57cb242c3423e
SVN Revision: 21239
Parent Commit: 9a7ea96
Lines Changed: +427, -28
8 Modified Paths:
/source/blender/makesrna/intern/makesrna.c (+76, -13) (Diff)
/source/blender/makesrna/intern/rna_access.c (+307, -0) (Diff)
/source/blender/makesrna/intern/rna_define.c (+6, -6) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_rna.c (+10, -8) (Diff)
/source/blender/makesrna/RNA_access.h (+5, -0) (Diff)
/source/blender/makesrna/RNA_types.h (+18, -1) (Diff)
/source/blender/makesrna/intern/rna_access.c (+307, -0) (Diff)
/source/blender/makesrna/intern/rna_define.c (+6, -6) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_rna.c (+10, -8) (Diff)
/source/blender/makesrna/RNA_access.h (+5, -0) (Diff)
/source/blender/makesrna/RNA_types.h (+18, -1) (Diff)