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-06-29 23:15:51 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-29 23:15:51 +0400
commite7928dd4b4b797295e2a3c6f73a57cb242c3423e (patch)
tree9db4afda53f2a7afbccdaf05faf4d221be7e0c7f /source/blender/makesrna/intern/rna_internal_types.h
parent9a7ea9664e27679935adaea3093630d7a6a30b5d (diff)
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 8bae21cca2b..401b430ebc9 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -146,6 +146,10 @@ struct PropertyRNA {
/* callback for testing if editable/evaluated */
EditableFunc editable;
+
+ /* raw access */
+ int rawoffset;
+ RawPropertyType rawtype;
};
/* Property Types */