diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-01 02:50:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-01 02:50:02 +0300 |
commit | 7f24dbe5fc5a00ee161717070deb6baf4af8e83e (patch) | |
tree | 3d62a641123bdd8c61e9d2bf5b40203befac2597 /source/blender/makesdna/DNA_sdna_types.h | |
parent | b589489ef8d56976165fb88ebf7b59dbc417d443 (diff) |
RNA / Data API
This is the first code for the Data API, also known as RNA system in the
2.5 Branch. It does not include a user interface, and only wraps some
Scene properties for testing. It is integrated with Scons and Makefiles,
and compiles a 'makesrna' program that generates an RNA.c file.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataAPI
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
The changes are quite local, basically adding a makesrna module which
works similar to the makesdna module. The one external change is in
moving genfile.c from blenloader to the makesdna module, so that it can
be reused by the RNA code. This also meant changing the DNA makefiles.
It seems to be doing dependencies correct still in my tests, but if
there is an issue with the DNA not being rebuilt this commit might be
the one causing it. Also it seems for scons the makesdna and makesrna
modules are compiling without warnings. Not a new issue but this should
be fixed.
The RNA code supports all types as defined in the Data API design, so
in that sense it is fairly complete and I hope that aspect will not
have to change much. Some obviously missing parts are context related
code, notify() functions for updates and user defined / ID properties.
Diffstat (limited to 'source/blender/makesdna/DNA_sdna_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_sdna_types.h | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index ac0b77aacf9..5726837a723 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -33,21 +33,31 @@ # # -struct SDNA { - char *data; - int datalen, nr_names; - char **names; - int nr_types, pointerlen; - char **types; - short *typelens; - int nr_structs; - short **structs; +typedef struct SDNA { + char *data; /* full copy of 'encoded' data */ + int datalen; /* length of data */ + + int nr_names; /* total number of struct members */ + char **names; /* struct member names */ + + int pointerlen; /* size of a pointer in bytes */ + + int nr_types; /* number of basic types + struct types */ + char **types; /* type names */ + short *typelens; /* type lengths */ + + int nr_structs; /* number of struct types */ + short **structs; /* sp= structs[a] is the adress of a struct definintion + sp[0] is struct type number, sp[1] amount of members + + (sp[2], sp[3]), (sp[4], sp[5]), .. are the member + type and name numbers respectively */ /* wrong place for this really, its a simple * cache for findstruct_nr. */ int lastfind; -}; +} SDNA; # # |