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-04-07 04:49:39 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-07 04:49:39 +0400
commit767db1b71674efb599f03b5892c32d207647acd3 (patch)
treefc64129bea43fe563bc0ad1448e17405e1b04bb0 /source/blender/makesrna/intern/rna_internal.h
parent88ab62c03189a04f6a74b040ad269e5a901c4af1 (diff)
RNA: Commit of the API patch by vekoon. This adds Functions to RNA,
which can be defined to call C functions with defined parameters. * Parameters are RNA properties, with the same types. * Parameters are stored in a ParameterList, which is like a small stack with the values. This is then used to call the C function. * Includes Python integration. * Only one test function is part of this commit, ID.rename. * Integration with the editors/ module is not included in this commit, there's some issues to be worked out for that still.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 4101291e825..572c8b2ae14 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -34,10 +34,25 @@ struct SDNA;
/* Data structures used during define */
+typedef struct ContainerDefRNA {
+ void *next, *prev;
+
+ ContainerRNA *cont;
+ ListBase properties;
+} ContainerDefRNA;
+
+typedef struct FunctionDefRNA {
+ ContainerDefRNA cont;
+
+ FunctionRNA *func;
+ const char *srna;
+ const char *call;
+} FunctionDefRNA;
+
typedef struct PropertyDefRNA {
struct PropertyDefRNA *next, *prev;
- struct StructRNA *srna;
+ struct ContainerRNA *cont;
struct PropertyRNA *prop;
/* struct */
@@ -61,7 +76,7 @@ typedef struct PropertyDefRNA {
} PropertyDefRNA;
typedef struct StructDefRNA {
- struct StructDefRNA *next, *prev;
+ ContainerDefRNA cont;
struct StructRNA *srna;
const char *filename;
@@ -72,7 +87,7 @@ typedef struct StructDefRNA {
const char *dnafromname;
const char *dnafromprop;
- ListBase properties;
+ ListBase functions;
} StructDefRNA;
typedef struct AllocDefRNA {
@@ -221,10 +236,18 @@ void rna_addtail(struct ListBase *listbase, void *vlink);
void rna_freelinkN(struct ListBase *listbase, void *vlink);
void rna_freelistN(struct ListBase *listbase);
+StructDefRNA *rna_find_struct_def(StructRNA *srna);
+FunctionDefRNA *rna_find_function_def(FunctionRNA *func);
+PropertyDefRNA *rna_find_parameter_def(PropertyRNA *parm);
+
/* Pointer Handling */
PointerRNA rna_pointer_inherit_refine(struct PointerRNA *ptr, struct StructRNA *type, void *data);
+/* Functions */
+
+int rna_parameter_size(struct PropertyRNA *parm);
+
#endif /* RNA_INTERNAL_H */